diff --git a/code/WorkInProgress/BS12/uplinks.dm b/code/WorkInProgress/BS12/uplinks.dm index 6734182e76e..040acf69ef8 100644 --- a/code/WorkInProgress/BS12/uplinks.dm +++ b/code/WorkInProgress/BS12/uplinks.dm @@ -316,7 +316,8 @@ A list of items and costs is stored under the datum of every game mode, alongsid var/temp = null //Temporary storage area for a message offering the option to destroy the radio var/selfdestruct = 0 //Set to 1 while the radio is self destructing itself. var/obj/item/device/radio/origradio = null - flags = FPRINT | TABLEPASS | CONDUCT | ONBELT + flags = FPRINT | TABLEPASS | CONDUCT + slot_flags = SLOT_BELT w_class = 2.0 item_state = "radio" throwforce = 5 diff --git a/code/defines/obj.dm b/code/defines/obj.dm index 5ca6b43baf3..22046c5c2c8 100644 --- a/code/defines/obj.dm +++ b/code/defines/obj.dm @@ -286,6 +286,7 @@ var/hitsound = null var/w_class = 3.0 flags = FPRINT | TABLEPASS + var/slot_flags = 0 //This is used to determine on which slots an item can fit. pass_flags = PASSTABLE pressure_resistance = 50 // causeerrorheresoifixthis diff --git a/code/defines/obj/clothing/ears.dm b/code/defines/obj/clothing/ears.dm index adfb51e4373..12a0a2d4e55 100644 --- a/code/defines/obj/clothing/ears.dm +++ b/code/defines/obj/clothing/ears.dm @@ -4,6 +4,7 @@ name = "ears" w_class = 1.0 throwforce = 2 + slot_flags = SLOT_EARS /obj/item/clothing/ears/earmuffs name = "earmuffs" diff --git a/code/defines/obj/clothing/gloves.dm b/code/defines/obj/clothing/gloves.dm index 4d7d210e363..f8c28d7e0aa 100644 --- a/code/defines/obj/clothing/gloves.dm +++ b/code/defines/obj/clothing/gloves.dm @@ -12,6 +12,7 @@ var/wired = 0 var/obj/item/weapon/cell/cell = 0 body_parts_covered = HANDS + slot_flags = SLOT_GLOVES /obj/item/clothing/gloves/boxing diff --git a/code/defines/obj/clothing/head.dm b/code/defines/obj/clothing/head.dm index 3d0713be74a..71d492f17a2 100644 --- a/code/defines/obj/clothing/head.dm +++ b/code/defines/obj/clothing/head.dm @@ -4,6 +4,7 @@ icon = 'hats.dmi' body_parts_covered = HEAD var/list/allowed = list() + slot_flags = SLOT_HEAD /obj/item/clothing/head/cakehat name = "cake-hat" diff --git a/code/defines/obj/clothing/jumpsuit.dm b/code/defines/obj/clothing/jumpsuit.dm index e2060fac70d..df2ee9348ee 100644 --- a/code/defines/obj/clothing/jumpsuit.dm +++ b/code/defines/obj/clothing/jumpsuit.dm @@ -8,6 +8,7 @@ heat_transfer_coefficient = 0.30 permeability_coefficient = 0.90 flags = FPRINT | TABLEPASS | ONESIZEFITSALL + slot_flags = SLOT_ICLOTHING var/has_sensor = 1//For the crew computer 2 = unable to change mode var/sensor_mode = 0 /* diff --git a/code/defines/obj/clothing/mask.dm b/code/defines/obj/clothing/mask.dm index 4d477396b77..db4059f08c3 100644 --- a/code/defines/obj/clothing/mask.dm +++ b/code/defines/obj/clothing/mask.dm @@ -7,7 +7,7 @@ icon = 'masks.dmi' body_parts_covered = HEAD armor = list(melee = 0, bullet = 0, laser = 2,energy = 2, bomb = 0, bio = 0, rad = 0) - + slot_flags = SLOT_MASK /obj/item/clothing/mask/breath desc = "A close-fitting mask that can be connected to an air supply." diff --git a/code/defines/obj/clothing/shoes.dm b/code/defines/obj/clothing/shoes.dm index 1529eabaaf0..2406493feb8 100644 --- a/code/defines/obj/clothing/shoes.dm +++ b/code/defines/obj/clothing/shoes.dm @@ -5,6 +5,7 @@ gender = PLURAL //Carn: for grammarically correct text-parsing body_parts_covered = FEET + slot_flags = SLOT_FEET protective_temperature = 500 heat_transfer_coefficient = 0.10 diff --git a/code/defines/obj/clothing/z_gimmick.dm b/code/defines/obj/clothing/z_gimmick.dm index 9b430ba11b8..ce4f90c36ab 100644 --- a/code/defines/obj/clothing/z_gimmick.dm +++ b/code/defines/obj/clothing/z_gimmick.dm @@ -296,7 +296,8 @@ icon = 'weapons.dmi' icon_state = "baton" item_state = "classic_baton" - flags = FPRINT | ONBELT | TABLEPASS + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT force = 10 /obj/item/clothing/under/pirate diff --git a/code/defines/obj/hydro.dm b/code/defines/obj/hydro.dm index 8aaa42b3a2c..48a3e495228 100644 --- a/code/defines/obj/hydro.dm +++ b/code/defines/obj/hydro.dm @@ -1844,7 +1844,8 @@ name = "bottle of Plant-B-Gone" icon_state = "plantbgone" item_state = "plantbgone" - flags = ONBELT|TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY + flags = TABLEPASS | OPENCONTAINER | FPRINT | USEDELAY + slot_flags = SLOT_BELT throwforce = 3 w_class = 2.0 throw_speed = 2 @@ -1858,7 +1859,8 @@ name = "weed-spray" icon_state = "weedspray" item_state = "spray" - flags = ONBELT|TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY + flags = TABLEPASS | OPENCONTAINER | FPRINT | USEDELAY + slot_flags = SLOT_BELT throwforce = 4 w_class = 2.0 throw_speed = 2 @@ -1872,7 +1874,8 @@ name = "pest-spray" icon_state = "pestspray" item_state = "spray" - flags = ONBELT|TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY + flags = TABLEPASS | OPENCONTAINER | FPRINT | USEDELAY + slot_flags = SLOT_BELT throwforce = 4 w_class = 2.0 throw_speed = 2 diff --git a/code/defines/obj/toy.dm b/code/defines/obj/toy.dm index f808c757e78..e5a7150672c 100644 --- a/code/defines/obj/toy.dm +++ b/code/defines/obj/toy.dm @@ -129,7 +129,8 @@ icon = 'gun.dmi' icon_state = "revolver" item_state = "gun" - flags = FPRINT | TABLEPASS | CONDUCT | ONBELT | USEDELAY + flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY + slot_flags = SLOT_BELT w_class = 3.0 g_amt = 10 m_amt = 10 diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index d9b346d12da..0c4682f12e0 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -10,7 +10,8 @@ desc = "A shield adept at blocking blunt objects from connecting with the torso of the shield wielder." icon = 'weapons.dmi' icon_state = "riot" - flags = FPRINT | TABLEPASS| CONDUCT| ONBACK + flags = FPRINT | TABLEPASS| CONDUCT + slot_flags = SLOT_BACK force = 5.0 throwforce = 5.0 throw_speed = 1 @@ -29,7 +30,8 @@ desc = "A rod of pure obsidian, its very presence disrupts and dampens the powers of Nar-Sie's followers." icon_state = "nullrod" item_state = "nullrod" - flags = FPRINT | ONBELT | TABLEPASS + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT force = 15 throw_speed = 1 throw_range = 4 @@ -41,7 +43,8 @@ desc = "This thing is so unspeakably shitty you are having a hard time even holding it." icon_state = "sord" item_state = "sord" - flags = FPRINT | ONBELT | TABLEPASS + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT force = 2 throwforce = 1 w_class = 3 @@ -51,7 +54,8 @@ desc = "What are you standing around staring at this for? Get to killing!" icon_state = "claymore" item_state = "claymore" - flags = FPRINT | ONBELT | TABLEPASS + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT force = 40 throwforce = 10 w_class = 3 @@ -165,7 +169,8 @@ icon_state = "spectrometer" item_state = "analyzer" w_class = 2.0 - flags = FPRINT | TABLEPASS| CONDUCT | ONBELT | OPENCONTAINER + flags = FPRINT | TABLEPASS| CONDUCT | OPENCONTAINER + slot_flags = SLOT_BELT throwforce = 5 throw_speed = 4 throw_range = 20 @@ -187,7 +192,8 @@ desc = "A stun baton for hitting people with." icon_state = "stunbaton" item_state = "baton" - flags = FPRINT | ONBELT | TABLEPASS + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT force = 10 throwforce = 7 w_class = 3 @@ -201,7 +207,8 @@ desc = "The Captain is first and all other heads are last." icon_state = "chainofcommand" item_state = "chainofcommand" - flags = FPRINT | ONBELT | TABLEPASS + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT force = 10 throwforce = 7 w_class = 3 @@ -483,6 +490,7 @@ item_state = "card-id" var/access = list() var/registered_name = null // The name registered_name on the card + slot_flags = SLOT_ID var/assignment = null var/dorm = 0 // determines if this ID has claimed a dorm already @@ -547,7 +555,8 @@ throw_range = 5 m_amt = 50 g_amt = 20 - flags = TABLEPASS|USEDELAY|FPRINT|CONDUCT | ONBELT + flags = TABLEPASS | USEDELAY | FPRINT | CONDUCT + slot_flags = SLOT_BELT item_state = "coil_red" /obj/item/weapon/cable_coil/cut @@ -576,7 +585,8 @@ desc = "Used to hit floors" icon = 'items.dmi' icon_state = "crowbar" - flags = FPRINT | TABLEPASS| CONDUCT | ONBELT + flags = FPRINT | TABLEPASS| CONDUCT + slot_flags = SLOT_BELT force = 5.0 throwforce = 7.0 item_state = "wrench" @@ -734,7 +744,8 @@ gender = PLURAL icon = 'items.dmi' icon_state = "handcuff" - flags = FPRINT | TABLEPASS | CONDUCT | ONBELT + flags = FPRINT | TABLEPASS | CONDUCT + slot_flags = SLOT_BELT throwforce = 5 w_class = 2.0 throw_speed = 2 @@ -833,7 +844,8 @@ name = "banhammer" icon = 'items.dmi' icon_state = "toyhammer" - flags = FPRINT | ONBELT | TABLEPASS + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT throwforce = 0 w_class = 1.0 throw_speed = 7 @@ -841,12 +853,14 @@ /obj/item/weapon/pen/sleepypen desc = "It's a normal black ink pen with a sharp point and a carefully engraved \"Waffle Co.\"" - flags = FPRINT | ONBELT | TABLEPASS | OPENCONTAINER + flags = FPRINT | TABLEPASS | OPENCONTAINER + slot_flags = SLOT_BELT origin_tech = "materials=2;biotech=1;syndicate=7" /obj/item/weapon/pen/paralysis desc = "It's a normal black ink pen with a sharp point." - flags = FPRINT | ONBELT | TABLEPASS | OPENCONTAINER + flags = FPRINT | TABLEPASS | OPENCONTAINER + slot_flags = SLOT_BELT origin_tech = "materials=2;biotech=1;syndicate=5" /obj/item/weapon/rack_parts @@ -870,7 +884,8 @@ desc = "You can be totally screwwy with this." icon = 'items.dmi' icon_state = "screwdriver" - flags = FPRINT | TABLEPASS| CONDUCT | ONBELT + flags = FPRINT | TABLEPASS| CONDUCT + slot_flags = SLOT_BELT force = 5.0 w_class = 1.0 throwforce = 5.0 @@ -919,7 +934,8 @@ var/selfdestruct = 0.0 var/traitor_frequency = 0.0 var/obj/item/device/radio/origradio = null - flags = FPRINT | TABLEPASS| CONDUCT | ONBELT + flags = FPRINT | TABLEPASS| CONDUCT + slot_flags = SLOT_BELT item_state = "radio" throwforce = 5 w_class = 2.0 diff --git a/code/game/asteroid/device.dm b/code/game/asteroid/device.dm index 7407f45f672..3472aecdd0e 100644 --- a/code/game/asteroid/device.dm +++ b/code/game/asteroid/device.dm @@ -2,7 +2,8 @@ name = "GPS" icon = 'device.dmi' icon_state = "pinoff" - flags = FPRINT | TABLEPASS| CONDUCT | ONBELT + flags = FPRINT | TABLEPASS| CONDUCT + slot_flags = SLOT_BELT w_class = 2.0 item_state = "electronic" throw_speed = 4 diff --git a/code/game/chemistry.dm b/code/game/chemistry.dm index 4bd485a2c1f..ec1980df685 100644 --- a/code/game/chemistry.dm +++ b/code/game/chemistry.dm @@ -11,7 +11,8 @@ item_state = "flashbang" throw_speed = 4 throw_range = 20 - flags = FPRINT | TABLEPASS | ONBELT | USEDELAY + flags = FPRINT | TABLEPASS | USEDELAY + slot_flags = SLOT_BELT var/datum/effect/effect/system/bad_smoke_spread/smoke /obj/item/weapon/mustardbomb @@ -25,7 +26,8 @@ item_state = "flashbang" throw_speed = 4 throw_range = 20 - flags = FPRINT | TABLEPASS | CONDUCT | ONBELT + flags = FPRINT | TABLEPASS | CONDUCT + slot_flags = SLOT_BELT var/datum/effect/effect/system/mustard_gas_spread/mustard_gas /obj/item/weapon/smokebomb/New() diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm index e003c70eb34..832f63aed27 100644 --- a/code/game/gamemodes/cult/cult_items.dm +++ b/code/game/gamemodes/cult/cult_items.dm @@ -3,7 +3,8 @@ desc = "An arcane weapon wielded by the followers of Nar-Sie" icon_state = "cultblade" item_state = "cultblade" - flags = FPRINT | ONBELT | TABLEPASS + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT force = 40 throwforce = 10 diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm index e0dd9ed0544..6ace15abac1 100644 --- a/code/game/gamemodes/nuclear/pinpointer.dm +++ b/code/game/gamemodes/nuclear/pinpointer.dm @@ -2,7 +2,8 @@ name = "pinpointer" icon = 'device.dmi' icon_state = "pinoff" - flags = FPRINT | TABLEPASS| CONDUCT | ONBELT + flags = FPRINT | TABLEPASS| CONDUCT + slot_flags = SLOT_BELT w_class = 2.0 item_state = "electronic" throw_speed = 4 diff --git a/code/game/gamemodes/wizard/soulstone.dm b/code/game/gamemodes/wizard/soulstone.dm index a1d3a3876e0..9ab7d518b21 100644 --- a/code/game/gamemodes/wizard/soulstone.dm +++ b/code/game/gamemodes/wizard/soulstone.dm @@ -5,7 +5,8 @@ item_state = "electronic" desc = "A fragment of the legendary treasure known simply as the 'Soul Stone'. The shard still flickers with a fraction of the full artefacts power." w_class = 1.0 - flags = FPRINT | TABLEPASS | ONBELT + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT origin_tech = "bluespace=4;materials=4" var/imprinted = "empty" diff --git a/code/game/objects/devices/PDA/PDA.dm b/code/game/objects/devices/PDA/PDA.dm index 76eac4e2aab..2b096353980 100644 --- a/code/game/objects/devices/PDA/PDA.dm +++ b/code/game/objects/devices/PDA/PDA.dm @@ -8,7 +8,8 @@ icon_state = "pda" item_state = "electronic" w_class = 1.0 - flags = FPRINT | TABLEPASS | ONBELT + flags = FPRINT | TABLEPASS + slot_flags = SLOT_ID | SLOT_BELT //Main variables var/owner = null diff --git a/code/game/objects/devices/aicard.dm b/code/game/objects/devices/aicard.dm index 725b7d12dff..59fb6a7d21e 100644 --- a/code/game/objects/devices/aicard.dm +++ b/code/game/objects/devices/aicard.dm @@ -4,7 +4,8 @@ icon_state = "aicard" // aicard-full item_state = "electronic" w_class = 2.0 - flags = FPRINT | TABLEPASS | ONBELT + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT var/flush = null origin_tech = "programming=4;materials=4" diff --git a/code/game/objects/devices/chameleonproj.dm b/code/game/objects/devices/chameleonproj.dm index 0526ec5ff29..c8e7ff754c0 100644 --- a/code/game/objects/devices/chameleonproj.dm +++ b/code/game/objects/devices/chameleonproj.dm @@ -42,7 +42,8 @@ /obj/item/device/chameleon name = "chameleon-projector" icon_state = "shield0" - flags = FPRINT | TABLEPASS| CONDUCT | USEDELAY | ONBELT + flags = FPRINT | TABLEPASS| CONDUCT | USEDELAY + slot_flags = SLOT_BELT item_state = "electronic" throwforce = 5.0 throw_speed = 1 diff --git a/code/game/objects/devices/flashlight.dm b/code/game/objects/devices/flashlight.dm index 242e84fb9e4..3819255c145 100644 --- a/code/game/objects/devices/flashlight.dm +++ b/code/game/objects/devices/flashlight.dm @@ -4,14 +4,14 @@ icon_state = "flight0" w_class = 2 item_state = "flight" - flags = FPRINT | ONBELT | TABLEPASS | CONDUCT + flags = FPRINT | TABLEPASS | CONDUCT + slot_flags = SLOT_BELT m_amt = 50 g_amt = 20 - var - on = 0 - brightness_on = 4 //luminosity when on - icon_on = "flight1" - icon_off = "flight0" + var/on = 0 + var/brightness_on = 4 //luminosity when on + var/icon_on = "flight1" + var/icon_off = "flight0" /obj/item/device/flashlight/initialize() ..() diff --git a/code/game/objects/devices/paicard.dm b/code/game/objects/devices/paicard.dm index 4dd15add607..a875dc383ec 100644 --- a/code/game/objects/devices/paicard.dm +++ b/code/game/objects/devices/paicard.dm @@ -4,7 +4,8 @@ icon_state = "pai" item_state = "electronic" w_class = 2.0 - flags = FPRINT | TABLEPASS | ONBELT + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT origin_tech = "programming=2" var/obj/item/device/radio/radio var/looking_for_personality = 0 diff --git a/code/game/objects/devices/scanners.dm b/code/game/objects/devices/scanners.dm index e1ab5899cc3..6249553089b 100644 --- a/code/game/objects/devices/scanners.dm +++ b/code/game/objects/devices/scanners.dm @@ -14,7 +14,8 @@ MASS SPECTROMETER desc = "A terahertz-ray emitter and scanner used to detect underfloor objects such as cables and pipes." icon_state = "t-ray0" var/on = 0 - flags = FPRINT|ONBELT|TABLEPASS + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT w_class = 2 item_state = "electronic" m_amt = 150 @@ -64,7 +65,8 @@ MASS SPECTROMETER icon_state = "health" item_state = "analyzer" desc = "A hand-held body scanner able to distinguish vital signs of the subject." - flags = FPRINT | ONBELT | TABLEPASS | CONDUCT + flags = FPRINT | TABLEPASS | CONDUCT + slot_flags = SLOT_BELT throwforce = 3 w_class = 1.0 throw_speed = 5 @@ -146,7 +148,8 @@ MASS SPECTROMETER icon_state = "atmos" item_state = "analyzer" w_class = 2.0 - flags = FPRINT | TABLEPASS| CONDUCT | ONBELT + flags = FPRINT | TABLEPASS| CONDUCT + slot_flags = SLOT_BELT throwforce = 5 throw_speed = 4 throw_range = 20 diff --git a/code/game/objects/items/candle.dm b/code/game/objects/items/candle.dm index e930a057ea3..006a075c28a 100644 --- a/code/game/objects/items/candle.dm +++ b/code/game/objects/items/candle.dm @@ -94,7 +94,8 @@ w_class = 1 throwforce = 2 var/candlecount = 5 - flags = ONBELT | TABLEPASS + flags = TABLEPASS + slot_flags = SLOT_BELT /obj/item/weapon/candlepack/update_icon() diff --git a/code/game/objects/items/robot_parts.dm b/code/game/objects/items/robot_parts.dm index 0e788e4b85b..15dc72e6606 100644 --- a/code/game/objects/items/robot_parts.dm +++ b/code/game/objects/items/robot_parts.dm @@ -3,7 +3,8 @@ icon = 'robot_parts.dmi' item_state = "buildpipe" icon_state = "blank" - flags = FPRINT | ONBELT | TABLEPASS | CONDUCT + flags = FPRINT | TABLEPASS | CONDUCT + slot_flags = SLOT_BELT var/construction_time = 100 var/list/construction_cost = list("metal"=20000,"glass"=5000) diff --git a/code/game/objects/items/trash.dm b/code/game/objects/items/trash.dm index ecb7bc49f02..b4f967d7353 100644 --- a/code/game/objects/items/trash.dm +++ b/code/game/objects/items/trash.dm @@ -58,7 +58,8 @@ desc = "A heavy-duty, no fun allowed trash bag." var/mode = 1; //0 = pick one at a time, 1 = pick all on tile var/capacity = 25; //the number of trash it can carry. - flags = FPRINT | TABLEPASS | ONBELT + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT w_class = 2.0 /obj/item/weapon/trashbag/update_icon() diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index 9593c9e6269..d5da4c9d228 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -56,7 +56,8 @@ ZIPPO icon_state = "matchbox" item_state = "zippo" w_class = 1 - flags = ONBELT | TABLEPASS + flags = TABLEPASS + slot_flags = SLOT_BELT var/matchcount = 10 w_class = 1.0 @@ -328,9 +329,9 @@ ZIPPO item_state = "cigpacket" w_class = 1 throwforce = 2 - flags = ONBELT | TABLEPASS - var - cigcount = 6 + flags = TABLEPASS + slot_flags = SLOT_BELT + var/cigcount = 6 update_icon() @@ -377,7 +378,8 @@ ZIPPO var/icon_off = "lighter-g" w_class = 1 throwforce = 4 - flags = ONBELT | TABLEPASS | CONDUCT + flags = TABLEPASS | CONDUCT + slot_flags = SLOT_BELT var/lit = 0 /obj/item/weapon/lighter/zippo diff --git a/code/game/objects/items/weapons/grenades.dm b/code/game/objects/items/weapons/grenades.dm index 8e8653353ec..6176a06f5c7 100644 --- a/code/game/objects/items/weapons/grenades.dm +++ b/code/game/objects/items/weapons/grenades.dm @@ -14,15 +14,17 @@ FLASHBANG item_state = "emp" throw_speed = 4 throw_range = 20 - flags = FPRINT | TABLEPASS | CONDUCT | ONBELT + flags = FPRINT | TABLEPASS | CONDUCT + slot_flags = SLOT_BELT origin_tech = "materials=2;magnets=3" - var - active = 0 - det_time = 50 - proc - prime() - clown_check(var/mob/living/user) + var/active = 0 + var/det_time = 50 + proc/prime() + return + + proc/clown_check(var/mob/living/user) + return afterattack(atom/target as mob|obj|turf|area, mob/user as mob) if (istype(target, /obj/item/weapon/storage)) return ..() // Trying to put it in a full container @@ -88,17 +90,21 @@ FLASHBANG item_state = "flashbang" throw_speed = 4 throw_range = 20 - flags = FPRINT | TABLEPASS | CONDUCT | ONBELT + flags = FPRINT | TABLEPASS | CONDUCT + slot_flags = SLOT_BELT origin_tech = "materials=2;combat=1" - var - active = 0 - det_time = 30 - banglet = 0 - proc - bang(var/turf/T , var/mob/living/carbon/M) - prime() - clown_check(var/mob/living/user) + var/active = 0 + var/det_time = 30 + var/banglet = 0 + proc/bang(var/turf/T , var/mob/living/carbon/M) + return + + proc/prime() + return + + proc/clown_check(var/mob/living/user) + return attackby(obj/item/weapon/W as obj, mob/user as mob) if (isscrewdriver(W)) diff --git a/code/game/objects/items/weapons/mops_cleaners.dm b/code/game/objects/items/weapons/mops_cleaners.dm index 978e3feef97..9dfbe21b429 100644 --- a/code/game/objects/items/weapons/mops_cleaners.dm +++ b/code/game/objects/items/weapons/mops_cleaners.dm @@ -4,7 +4,8 @@ name = "space cleaner" icon_state = "cleaner" item_state = "cleaner" - flags = ONBELT|TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY + flags = TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY + slot_flags = SLOT_BELT throwforce = 3 w_class = 2.0 throw_speed = 2 @@ -101,7 +102,8 @@ name = "chem sprayer" icon_state = "chemsprayer" item_state = "chemsprayer" - flags = ONBELT|TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY + flags = TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY + slot_flags = SLOT_BELT throwforce = 3 w_class = 3.0 throw_speed = 2 @@ -203,7 +205,8 @@ name = "pepperspray" icon_state = "pepperspray" item_state = "pepperspray" - flags = ONBELT|TABLEPASS|FPRINT|USEDELAY + flags = TABLEPASS|FPRINT|USEDELAY + slot_flags = SLOT_BELT throwforce = 3 w_class = 2.0 throw_speed = 2 diff --git a/code/game/objects/items/weapons/plant_bag.dm b/code/game/objects/items/weapons/plant_bag.dm index 1cbb6f7903c..4f13ee45e1b 100644 --- a/code/game/objects/items/weapons/plant_bag.dm +++ b/code/game/objects/items/weapons/plant_bag.dm @@ -7,7 +7,8 @@ name = "Plant Bag" var/mode = 1; //0 = pick one at a time, 1 = pick all on tile var/capacity = 50; //the number of plant pieces it can carry. - flags = FPRINT | TABLEPASS | ONBELT + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT w_class = 1 /obj/item/weapon/plantbag/attack_self(mob/user as mob) diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 13108000545..b5cb4dd8ab5 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -13,7 +13,8 @@ WELDINGTOOOL desc = "A wrench with common uses. Can be found in your hand." icon = 'items.dmi' icon_state = "wrench" - flags = FPRINT | TABLEPASS| CONDUCT | ONBELT + flags = FPRINT | TABLEPASS| CONDUCT + slot_flags = SLOT_BELT force = 5.0 throwforce = 7.0 w_class = 2.0 @@ -44,7 +45,8 @@ WELDINGTOOOL name = "Welding Tool" icon = 'items.dmi' icon_state = "welder" - flags = FPRINT | TABLEPASS| CONDUCT | ONBELT + flags = FPRINT | TABLEPASS| CONDUCT + slot_flags = SLOT_BELT force = 3.0 throwforce = 5.0 throw_speed = 1 @@ -288,7 +290,8 @@ WELDINGTOOOL desc = "This cuts wires." icon = 'items.dmi' icon_state = "cutters" - flags = FPRINT | TABLEPASS| CONDUCT | ONBELT + flags = FPRINT | TABLEPASS| CONDUCT + slot_flags = SLOT_BELT force = 6.0 throw_speed = 2 throw_range = 9 diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index b39e32a55b9..14eff5ba0f0 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -93,7 +93,7 @@ desc = "Truly, the weapon of a madman. Who would think to fight fire with an axe?" force = 5 w_class = 4.0 - flags = ONBACK + slot_flags = SLOT_BACK force_unwielded = 5 force_wielded = 18 diff --git a/code/game/objects/new_year.dm b/code/game/objects/new_year.dm index 6c0f369b333..ba344090f60 100644 --- a/code/game/objects/new_year.dm +++ b/code/game/objects/new_year.dm @@ -55,7 +55,8 @@ item_state = "flashbang" throw_speed = 4 throw_range = 20 - flags = FPRINT | TABLEPASS | CONDUCT | ONBELT + flags = FPRINT | TABLEPASS | CONDUCT + slot_flags = SLOT_BELT /obj/item/weapon/firbang/afterattack(atom/target as mob|obj|turf|area, mob/user as mob) if (user.equipped() == src) diff --git a/code/game/objects/radio/headset.dm b/code/game/objects/radio/headset.dm index 74e93a6bbaa..54bf58dcfff 100644 --- a/code/game/objects/radio/headset.dm +++ b/code/game/objects/radio/headset.dm @@ -8,6 +8,7 @@ subspace_transmission = 1 canhear_range = 1 // can't hear headsets from very far away + slot_flags = SLOT_EARS var/protective_temperature = 0 var/translate_binary = 0 var/translate_hive = 0 diff --git a/code/game/objects/storage/belt.dm b/code/game/objects/storage/belt.dm index 35fde52410a..0f5cfca0474 100644 --- a/code/game/objects/storage/belt.dm +++ b/code/game/objects/storage/belt.dm @@ -4,7 +4,8 @@ icon = 'belts.dmi' icon_state = "utilitybelt" item_state = "utility" - flags = FPRINT | TABLEPASS | ONBELT + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT proc/can_use() diff --git a/code/game/objects/tank.dm b/code/game/objects/tank.dm index 0eb0f29b74a..64080063c1a 100644 --- a/code/game/objects/tank.dm +++ b/code/game/objects/tank.dm @@ -5,7 +5,8 @@ var/datum/gas_mixture/air_contents = null var/distribute_pressure = ONE_ATMOSPHERE - flags = FPRINT | TABLEPASS | CONDUCT | ONBACK + flags = FPRINT | TABLEPASS | CONDUCT + slot_flags = SLOT_BACK pressure_resistance = ONE_ATMOSPHERE*5 diff --git a/code/game/objects/tanks/emergency.dm b/code/game/objects/tanks/emergency.dm index 01ee00d670b..8bd707ec9a3 100644 --- a/code/game/objects/tanks/emergency.dm +++ b/code/game/objects/tanks/emergency.dm @@ -2,7 +2,8 @@ name = "emergency oxygen tank" desc = "Used for emergencies. Contains very little oxygen, so try to conserve it until you actually need it." icon_state = "emergency" - flags = FPRINT | TABLEPASS | ONBELT | CONDUCT + flags = FPRINT | TABLEPASS | CONDUCT + slot_flags = SLOT_BELT w_class = 2.0 force = 4.0 distribute_pressure = ONE_ATMOSPHERE*O2STANDARD diff --git a/code/modules/chemical/Chemistry-Tools.dm b/code/modules/chemical/Chemistry-Tools.dm index 527dab5f0a2..55d5f7426f0 100644 --- a/code/modules/chemical/Chemistry-Tools.dm +++ b/code/modules/chemical/Chemistry-Tools.dm @@ -22,7 +22,8 @@ var/affected_area = 3 throw_speed = 4 throw_range = 20 - flags = FPRINT | TABLEPASS | CONDUCT | ONBELT | USEDELAY + flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY + slot_flags = SLOT_BELT New() var/datum/reagents/R = new/datum/reagents(1000) reagents = R @@ -1227,7 +1228,8 @@ amount_per_transfer_from_this = 5 volume = 30 possible_transfer_amounts = null - flags = FPRINT | ONBELT | TABLEPASS | OPENCONTAINER + flags = FPRINT | TABLEPASS | OPENCONTAINER + slot_flags = SLOT_BELT /obj/item/weapon/reagent_containers/hypospray/attack_paw(mob/user as mob) return src.attack_hand(user) diff --git a/code/modules/clothing/glasses.dm b/code/modules/clothing/glasses.dm index 4c1002a97b8..958c275f2c9 100644 --- a/code/modules/clothing/glasses.dm +++ b/code/modules/clothing/glasses.dm @@ -3,10 +3,10 @@ icon = 'glasses.dmi' w_class = 2.0 flags = GLASSESCOVERSEYES - var - vision_flags = 0 - darkness_view = 0//Base human is 2 - invisa_view = 0 + slot_flags = SLOT_EYES + var/vision_flags = 0 + var/darkness_view = 0//Base human is 2 + var/invisa_view = 0 /* SEE_SELF // can see self, no matter what diff --git a/code/modules/clothing/suit.dm b/code/modules/clothing/suit.dm index b312d4e6bd3..73d1ab4dda8 100644 --- a/code/modules/clothing/suit.dm +++ b/code/modules/clothing/suit.dm @@ -5,3 +5,4 @@ flags = FPRINT | TABLEPASS | ONESIZEFITSALL var/list/allowed = list(/obj/item/weapon/tank/emergency_oxygen) armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) + slot_flags = SLOT_OCLOTHING diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index 817b1a840bc..a2eb23859be 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -157,7 +157,8 @@ proc/move_mining_shuttle() name = "Miner's pickaxe" icon = 'items.dmi' icon_state = "pickaxe" - flags = FPRINT | TABLEPASS| CONDUCT | ONBELT + flags = FPRINT | TABLEPASS| CONDUCT + slot_flags = SLOT_BELT force = 15.0 throwforce = 4.0 item_state = "pickaxe" @@ -241,7 +242,8 @@ proc/move_mining_shuttle() name = "Shovel" icon = 'items.dmi' icon_state = "shovel" - flags = FPRINT | TABLEPASS| CONDUCT | ONBELT + flags = FPRINT | TABLEPASS| CONDUCT + slot_flags = SLOT_BELT force = 8.0 throwforce = 4.0 item_state = "shovel" diff --git a/code/modules/mining/satchel_ore_boxdm.dm b/code/modules/mining/satchel_ore_boxdm.dm index d8f06801690..d116cb00580 100644 --- a/code/modules/mining/satchel_ore_boxdm.dm +++ b/code/modules/mining/satchel_ore_boxdm.dm @@ -6,7 +6,8 @@ name = "Mining Satchel" var/mode = 1; //0 = pick one at a time, 1 = pick all on tile var/capacity = 50; //the number of ore pieces it can carry. - flags = FPRINT | TABLEPASS | ONBELT + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT w_class = 1 /obj/item/weapon/satchel/attack_self(mob/user as mob) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 93e41a166f2..22cca9f9b7f 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -454,7 +454,7 @@ return if (!istype(W, /obj/item)) return - if (!( W.flags & ONBACK )) + if (!( W.slot_flags & SLOT_BACK )) return if(istype(W,/obj/item/weapon/twohanded) && W:wielded) usr << "Unwield the [initial(W.name)] first!" @@ -478,7 +478,9 @@ if (emptyHand) wear_suit.DblClick() return - if (!( istype(W, /obj/item/clothing/suit) )) + if (!istype(W, /obj/item)) + return + if (!( W.slot_flags & SLOT_OCLOTHING )) return if (mutations & FAT && !(W.flags & ONESIZEFITSALL)) src << "\red You're too fat to wear the [W.name]!" @@ -491,7 +493,9 @@ if (emptyHand) gloves.DblClick() return - if (!( istype(W, /obj/item/clothing/gloves) )) + if (!istype(W, /obj/item)) + return + if (!( W.slot_flags & SLOT_GLOVES )) return u_equip(W) gloves = W @@ -501,7 +505,9 @@ if (emptyHand) shoes.DblClick() return - if (!( istype(W, /obj/item/clothing/shoes) )) + if (!istype(W, /obj/item)) + return + if (!( W.slot_flags & SLOT_FEET )) return u_equip(W) shoes = W @@ -511,7 +517,9 @@ if (emptyHand) belt.DblClick() return - if (!W || !W.flags || !( W.flags & ONBELT )) + if (!istype(W, /obj/item)) + return + if (!( W.slot_flags & SLOT_BELT )) return u_equip(W) belt = W @@ -521,7 +529,9 @@ if (emptyHand) glasses.DblClick() return - if (!( istype(W, /obj/item/clothing/glasses) )) + if (!istype(W, /obj/item)) + return + if (!( W.slot_flags & SLOT_EYES )) return u_equip(W) glasses = W @@ -531,10 +541,9 @@ if (emptyHand) head.DblClick() return - if (( istype(W, /obj/item/weapon/paper) )) - u_equip(W) - head = W - else if (!( istype(W, /obj/item/clothing/head) )) + if (!istype(W, /obj/item)) + return + if (!( W.slot_flags & SLOT_HEAD )) return u_equip(W) head = W @@ -550,7 +559,9 @@ if (emptyHand) ears.DblClick() return - if (!( istype(W, /obj/item/clothing/ears) ) && !( istype(W, /obj/item/device/radio/headset) )) + if (!istype(W, /obj/item)) + return + if (!( W.slot_flags & SLOT_EARS )) return u_equip(W) ears = W @@ -560,7 +571,9 @@ if (emptyHand) w_uniform.DblClick() return - if (!( istype(W, /obj/item/clothing/under) )) + if (!istype(W, /obj/item)) + return + if (!( W.slot_flags & SLOT_ICLOTHING )) return if (mutations & FAT && !(W.flags & ONESIZEFITSALL)) src << "\red You're too fat to wear the [W.name]!" @@ -575,7 +588,9 @@ return if (!w_uniform) return - if (!istype(W, /obj/item/weapon/card/id) && !istype(W, /obj/item/device/pda) ) + if (!istype(W, /obj/item)) + return + if (!( W.slot_flags & SLOT_ID )) return u_equip(W) wear_id = W @@ -585,19 +600,25 @@ if (emptyHand) l_store.DblClick() return - if ((!( istype(W, /obj/item) ) || W.w_class > 2 || !( w_uniform ))) + if (!istype(W, /obj/item)) return - u_equip(W) - l_store = W + if ( ( W.slot_flags & SLOT_DENYPOCKET ) ) + return + if ( W.w_class <= 2 || ( W.slot_flags & SLOT_POCKET ) ) + u_equip(W) + l_store = W if("storage2") if (r_store) if (emptyHand) r_store.DblClick() return - if ((!( istype(W, /obj/item) ) || W.w_class > 2 || !( w_uniform ))) + if (!istype(W, /obj/item)) return - u_equip(W) - r_store = W + if ( ( W.slot_flags & SLOT_DENYPOCKET ) ) + return + if ( W.w_class <= 2 || ( W.slot_flags & SLOT_POCKET ) ) + u_equip(W) + r_store = W if("suit storage") if (s_store) if (emptyHand) diff --git a/code/modules/paperwork/clipboard.dm b/code/modules/paperwork/clipboard.dm index 1d6dfeb0f32..5bb535e00ef 100644 --- a/code/modules/paperwork/clipboard.dm +++ b/code/modules/paperwork/clipboard.dm @@ -9,7 +9,8 @@ throw_range = 10 var/obj/item/weapon/pen/haspen //The stored pen. var/obj/item/weapon/paper/toppaper //The topmost piece of paper. - flags = FPRINT | TABLEPASS | ONBELT + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT pressure_resistance = 10 /obj/item/weapon/clipboard/New() diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index b814cd1295f..0b5f86bbb21 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -9,279 +9,276 @@ throw_range = 15 layer = 4 pressure_resistance = 1 + slot_flags = SLOT_HEAD - var - info //What's actually written on the paper. - info_links //A different version of the paper which includes html links at fields and EOF - stamps //The (text for the) stamps on the paper. - fields //Amount of user created fields - list/stamped - see_face = 1 - body_parts_covered = HEAD - protective_temperature = 0 - rigged = 0 - spam_flag = 0 + var/info //What's actually written on the paper. + var/info_links //A different version of the paper which includes html links at fields and EOF + var/stamps //The (text for the) stamps on the paper. + var/fields //Amount of user created fields + var/list/stamped + var/see_face = 1 + var/body_parts_covered = HEAD + var/protective_temperature = 0 + var/rigged = 0 + var/spam_flag = 0 - const - deffont = "Verdana" - signfont = "Times New Roman" - crayonfont = "Comic Sans MS" + var/const/deffont = "Verdana" + var/const/signfont = "Times New Roman" + var/const/crayonfont = "Comic Sans MS" - New() - ..() - src.pixel_y = rand(-8, 8) - src.pixel_x = rand(-9, 9) - spawn(2) - if(src.info) - src.overlays += "paper_words" - updateinfolinks() - return - - update_icon() +/obj/item/weapon/paper/New() + ..() + src.pixel_y = rand(-8, 8) + src.pixel_x = rand(-9, 9) + spawn(2) if(src.info) src.overlays += "paper_words" - return - - examine() - set src in oview(1) - - // ..() //We don't want them to see the dumb "this is a paper" thing every time. - if(!(istype(usr, /mob/living/carbon/human) || istype(usr, /mob/dead/observer) || istype(usr, /mob/living/silicon))) - usr << browse("