Module:Body Part Variants: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
local variants = {['Nuclear Protrusion'] = 'Head', | local variants = { | ||
-- Head -- | |||
['Nuclear Protrusion'] = 'Head', | |||
['Central Node'] = 'Head', | ['Central Node'] = 'Head', | ||
['Blossom'] = 'Head', | ['Blossom'] = 'Head', | ||
Line 18: | Line 20: | ||
['Central Mass'] = 'Head', | ['Central Mass'] = 'Head', | ||
['Neck'] = 'Head', | ['Neck'] = 'Head', | ||
-- Face -- | |||
['Antennae'] = 'Face', | ['Antennae'] = 'Face', | ||
['Feelers'] = 'Face', | ['Feelers'] = 'Face', | ||
Line 31: | Line 34: | ||
['Lip'] = 'Face', | ['Lip'] = 'Face', | ||
['Extra Face'] = 'Face', | ['Extra Face'] = 'Face', | ||
['Sensory Nodule'] = 'Face', | |||
['Sensory Frill'] = 'Face', | |||
['Sensory Ganglion'] = 'Face', | |||
-- Back -- | |||
['Chassis'] = 'Back', | ['Chassis'] = 'Back', | ||
['Membrane'] = 'Back', | ['Membrane'] = 'Back', | ||
Line 40: | Line 47: | ||
['Case'] = 'Back', | ['Case'] = 'Back', | ||
['Equipment Rack'] = 'Back', | ['Equipment Rack'] = 'Back', | ||
-- Arm -- | |||
['Armature'] = 'Arm', | ['Armature'] = 'Arm', | ||
['Leg'] = 'Arm', | ['Leg'] = 'Arm', | ||
Line 61: | Line 69: | ||
['Arm Section'] = 'Arm', | ['Arm Section'] = 'Arm', | ||
['Robo-Arm'] = 'Arm', | ['Robo-Arm'] = 'Arm', | ||
-- Hand -- | |||
['Manipulator'] = 'Hand', | ['Manipulator'] = 'Hand', | ||
['Pincer'] = 'Hand', | ['Pincer'] = 'Hand', | ||
['Pinnule'] = 'Hand', | |||
['Pseudopod'] = 'Hand', | ['Pseudopod'] = 'Hand', | ||
['Tentacle'] = 'Hand', | ['Tentacle'] = 'Hand', | ||
Line 87: | Line 97: | ||
['Handle'] = 'Hand', | ['Handle'] = 'Hand', | ||
['Robo-Hand'] = 'Hand', | ['Robo-Hand'] = 'Hand', | ||
-- Hands -- | |||
['Manipulators'] = 'Hands', | ['Manipulators'] = 'Hands', | ||
['Pincers'] = 'Hands', | ['Pincers'] = 'Hands', | ||
Line 104: | Line 115: | ||
['Hand Sections'] = 'Hands', | ['Hand Sections'] = 'Hands', | ||
['Robo-Hands'] = 'Hands', | ['Robo-Hands'] = 'Hands', | ||
-- Feet -- | |||
['Legs'] = 'Feet', | ['Legs'] = 'Feet', | ||
['Support Struts'] = 'Feet', | ['Support Struts'] = 'Feet', | ||
Line 115: | Line 127: | ||
['Rockers'] = 'Feet', | ['Rockers'] = 'Feet', | ||
['Bottom'] = 'Feet', | ['Bottom'] = 'Feet', | ||
-- Roots -- | |||
['Lower Hyphae'] = 'Roots', | ['Lower Hyphae'] = 'Roots', | ||
['Stakes'] = 'Roots', | ['Stakes'] = 'Roots', | ||
['Mulch'] = 'Roots', | ['Mulch'] = 'Roots', | ||
-- Tread -- | |||
['Wheels'] = 'Tread', | ['Wheels'] = 'Tread', | ||
-- Fin -- | |||
['Dorsal Fin'] = 'Fin', | ['Dorsal Fin'] = 'Fin', | ||
['Tail Fin'] = 'Fin', | ['Tail Fin'] = 'Fin', | ||
-- Missile Weapon -- | |||
['Hardpoint'] = 'Missile Weapon', | ['Hardpoint'] = 'Missile Weapon', | ||
['Cybernetic Arm'] = 'Missile Weapon', | ['Cybernetic Arm'] = 'Missile Weapon', | ||
-- Thrown Weapon -- | |||
['Middle Hardpoint'] = 'Thrown Weapon' | ['Middle Hardpoint'] = 'Thrown Weapon' | ||
} | } |
Revision as of 22:07, 21 September 2020
local p = {}
local variants = {
-- Head --
['Nuclear Protrusion'] = 'Head',
['Central Node'] = 'Head',
['Blossom'] = 'Head',
['Central Lobe'] = 'Head',
['Cap'] = 'Head',
['Top Rail'] = 'Head',
['Header'] = 'Head',
['Skull'] = 'Head',
['Centerpiece'] = 'Head',
['Ear'] = 'Head',
['Pillow'] = 'Head',
['Top'] = 'Head',
['Control Unit'] = 'Head',
['Head Section'] = 'Head',
['Upper Dome'] = 'Head',
['Central Mass'] = 'Head',
['Neck'] = 'Head',
-- Face --
['Antennae'] = 'Face',
['Feelers'] = 'Face',
['Sensor Array'] = 'Face',
['Sensory Bulb'] = 'Face',
['Knocker'] = 'Face',
['Skull Face'] = 'Face',
['Decoration'] = 'Face',
['Splat'] = 'Face',
['Pillowcase'] = 'Face',
['Access Panel'] = 'Face',
['Faceplate'] = 'Face',
['Lip'] = 'Face',
['Extra Face'] = 'Face',
['Sensory Nodule'] = 'Face',
['Sensory Frill'] = 'Face',
['Sensory Ganglion'] = 'Face',
-- Back --
['Chassis'] = 'Back',
['Membrane'] = 'Back',
['Frame'] = 'Back',
['Molding'] = 'Back',
['Breadth'] = 'Back',
['Tablecloth'] = 'Back',
['Blanket'] = 'Back',
['Case'] = 'Back',
['Equipment Rack'] = 'Back',
-- Arm --
['Armature'] = 'Arm',
['Leg'] = 'Arm',
['Support Strut'] = 'Arm',
['Frond'] = 'Arm',
['Stem'] = 'Arm',
['Tendril'] = 'Arm',
['Branch'] = 'Arm',
['Lobe'] = 'Arm',
['Taproot'] = 'Arm',
['Stalk'] = 'Arm',
['Fibrous Node'] = 'Arm',
['Hinge'] = 'Arm',
['Stud'] = 'Arm',
['Knot'] = 'Arm',
['Armbone'] = 'Arm',
['Support Pole'] = 'Arm',
['Pipe'] = 'Arm',
['Reinforcement'] = 'Arm',
['Side Rail'] = 'Arm',
['Arm Section'] = 'Arm',
['Robo-Arm'] = 'Arm',
-- Hand --
['Manipulator'] = 'Hand',
['Pincer'] = 'Hand',
['Pinnule'] = 'Hand',
['Pseudopod'] = 'Hand',
['Tentacle'] = 'Hand',
['Leaf'] = 'Hand',
['Twig'] = 'Hand',
['Bifurcation'] = 'Hand',
['Fine Root'] = 'Hand',
['Hypha'] = 'Hand',
['Knob'] = 'Hand',
['Small Crack'] = 'Hand',
['Shelf'] = 'Hand',
['Handbone'] = 'Hand',
['Tie Point'] = 'Hand',
['Divider'] = 'Hand',
['Drawer'] = 'Hand',
['Top Drawer'] = 'Hand',
['Bottom Drawer'] = 'Hand',
['Arm Stump'] = 'Hand',
['Side'] = 'Hand',
['Vane'] = 'Hand',
['Rail'] = 'Hand',
['Hand Section'] = 'Hand',
['Opening'] = 'Hand',
['Handle'] = 'Hand',
['Robo-Hand'] = 'Hand',
-- Hands --
['Manipulators'] = 'Hands',
['Pincers'] = 'Hands',
['Pseudopods'] = 'Hands',
['Tentacles'] = 'Hands',
['Side Fins'] = 'Hands',
['Leaves'] = 'Hands',
['Twigs'] = 'Hands',
['Bifurcations'] = 'Hands',
['Lateral Hyphae'] = 'Hands',
['Knobs'] = 'Hands',
['Handbones'] = 'Hands',
['Arm Stumps'] = 'Hands',
['Sides'] = 'Hands',
['Vanes'] = 'Hands',
['Rails'] = 'Hands',
['Hand Sections'] = 'Hands',
['Robo-Hands'] = 'Hands',
-- Feet --
['Legs'] = 'Feet',
['Support Struts'] = 'Feet',
['Undercarriage'] = 'Feet',
['Bottom Rail'] = 'Feet',
['Foundation'] = 'Feet',
['Base'] = 'Feet',
['Footbones'] = 'Feet',
['Front Legs'] = 'Feet',
['Rear Legs'] = 'Feet',
['Rockers'] = 'Feet',
['Bottom'] = 'Feet',
-- Roots --
['Lower Hyphae'] = 'Roots',
['Stakes'] = 'Roots',
['Mulch'] = 'Roots',
-- Tread --
['Wheels'] = 'Tread',
-- Fin --
['Dorsal Fin'] = 'Fin',
['Tail Fin'] = 'Fin',
-- Missile Weapon --
['Hardpoint'] = 'Missile Weapon',
['Cybernetic Arm'] = 'Missile Weapon',
-- Thrown Weapon --
['Middle Hardpoint'] = 'Thrown Weapon'
}
function p.gettype(part)
return variants[part]
end
function p.gettypeframe(frame)
return p.gettype(frame.args[1])
end
function p.listallvariantsoftype(type)
-- returns a string of a list of all body parts that are a variant of the base type.
returntbl = {}
for v, p in pairs(variants) do
if p == type then --if the base type is the same, return it
returntbl[#returntbl + 1] = v
end
end
return table.concat(returntbl, ', ')
end
function p.listvariants(frame)
return p.listallvariantsoftype(frame.args[1])
end
return p