From 829cc3d81ccc82f6ab2ff6cc147b613efbf29ead Mon Sep 17 00:00:00 2001 From: Linzolle Date: Wed, 27 Nov 2019 20:23:33 -0600 Subject: [PATCH] Revert "Merge pull request #9613 from Linzolle/hat-toss" This reverts commit d67b7f620dd4995f8bc1980f8cef34f277bf6e7f, reversing changes made to dabfba8a0dbb4ebd82d6fb485d4b948fc29cf790. --- code/__DEFINES/obj_flags.dm | 11 ++++----- code/_globalvars/bitfields.dm | 3 +-- code/modules/clothing/head/_head.dm | 24 ++++++------------- code/modules/clothing/head/collectable.dm | 10 +++----- code/modules/clothing/head/hardhat.dm | 1 - code/modules/clothing/head/helmet.dm | 2 +- code/modules/clothing/head/misc.dm | 8 ------- code/modules/clothing/head/misc_special.dm | 6 +---- .../clothing/spacesuits/_spacesuits.dm | 2 +- code/modules/clothing/suits/bio.dm | 2 +- code/modules/clothing/suits/cloaks.dm | 2 -- code/modules/clothing/suits/utility.dm | 4 ++-- code/modules/clothing/suits/wiz_robe.dm | 1 - .../hydroponics/beekeeping/beekeeper_suit.dm | 2 +- 14 files changed, 23 insertions(+), 55 deletions(-) diff --git a/code/__DEFINES/obj_flags.dm b/code/__DEFINES/obj_flags.dm index d3e724aefb..94c2c372f0 100644 --- a/code/__DEFINES/obj_flags.dm +++ b/code/__DEFINES/obj_flags.dm @@ -25,23 +25,22 @@ #define NO_MAT_REDEMPTION (1<<5) //Stops you from putting things like an RCD or other items into an ORM or protolathe for materials. #define DROPDEL (1<<6) //When dropped, it calls qdel on itself #define NOBLUDGEON (1<<7) //when an item has this it produces no "X has been hit by Y with Z" message in the default attackby() -#define ABSTRACT (1<<8) //for all things that are technically items but used for various different stuff +#define ABSTRACT (1<<8) //for all things that are technically items but used for various different stuff #define IMMUTABLE_SLOW (1<<9) //When players should not be able to change the slowdown of the item (Speed potions, ect) #define SURGICAL_TOOL (1<<10) //Tool commonly used for surgery: won't attack targets in an active surgical operation on help intent (in case of mistakes) -#define NO_UNIFORM_REQUIRED (1<<11) //Can be worn on certain slots (currently belt and id) that would otherwise require an uniform. +#define NO_UNIFORM_REQUIRED (1<<11) //Can be worn on certain slots (currently belt and id) that would otherwise require an uniform. // Flags for the clothing_flags var on /obj/item/clothing #define LAVAPROTECT (1<<0) #define STOPSPRESSUREDAMAGE (1<<1) //SUIT and HEAD items which stop pressure damage. To stop you taking all pressure damage you must have both a suit and head item with this flag. #define BLOCK_GAS_SMOKE_EFFECT (1<<2) //blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY! -#define ALLOWINTERNALS (1<<3) //mask allows internals +#define ALLOWINTERNALS (1<<3) //mask allows internals #define NOSLIP (1<<4) //prevents from slipping on wet floors, in space etc #define THICKMATERIAL (1<<5) //prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body. #define VOICEBOX_TOGGLABLE (1<<6) //The voicebox in this clothing can be toggled. #define VOICEBOX_DISABLED (1<<7) //The voicebox is currently turned off. -#define SNUG_FIT (1<<8) //Prevents knock-off from things like hat-throwing. -#define ANTI_TINFOIL_MANEUVER (1<<9) //Hats with negative effects when worn (i.e the tinfoil hat). +#define IGNORE_HAT_TOSS (1<<8) //Hats with negative effects when worn (i.e the tinfoil hat). // Flags for the organ_flags var on /obj/item/organ @@ -50,4 +49,4 @@ #define ORGAN_FAILING (1<<2) //Failing organs perform damaging effects until replaced or fixed #define ORGAN_EXTERNAL (1<<3) //Was this organ implanted/inserted/etc, if true will not be removed during species change. #define ORGAN_VITAL (1<<4) //Currently only the brain -#define ORGAN_NO_SPOIL (1<<5) //Do not spoil under any circumstances \ No newline at end of file +#define ORGAN_NO_SPOIL (1<<5) //Do not spoil under any circumstances diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index 91f5105553..e0cf8ebdd5 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -142,8 +142,7 @@ GLOBAL_LIST_INIT(bitfields, list( "THICKMATERIAL" = THICKMATERIAL, "VOICEBOX_TOGGLABLE" = VOICEBOX_TOGGLABLE, "VOICEBOX_DISABLED" = VOICEBOX_DISABLED, - "SNUG_FIT" = SNUG_FIT, - "ANTI_TINFOIL_MANEUVER" = ANTI_TINFOIL_MANEUVER, + "IGNORE_HAT_TOSS" = IGNORE_HAT_TOSS, ), "tesla_flags" = list( "TESLA_MOB_DAMAGE" = TESLA_MOB_DAMAGE, diff --git a/code/modules/clothing/head/_head.dm b/code/modules/clothing/head/_head.dm index 358942627d..ec6db20cc4 100644 --- a/code/modules/clothing/head/_head.dm +++ b/code/modules/clothing/head/_head.dm @@ -41,14 +41,14 @@ H.update_inv_head() -///Special throw_impact for hats to frisbee hats at people to place them on their heads/attempt to de-hat them. +///Special throw_impact for hats to frisbee hats at people to place them on their heads. /obj/item/clothing/head/throw_impact(atom/hit_atom, datum/thrownthing/thrownthing) . = ..() ///if the thrown object's target zone isn't the head if(thrownthing.target_zone != BODY_ZONE_HEAD) return - ///ignore any hats with the tinfoil counter-measure enabled - if(clothing_flags & ANTI_TINFOIL_MANEUVER) + ///ignore any hats with downsides when worn + if(clothing_flags & IGNORE_HAT_TOSS) return ///if the hat happens to be capable of holding contents and has something in it. mostly to prevent super cheesy stuff like stuffing a mini-bomb in a hat and throwing it if(LAZYLEN(contents)) @@ -57,20 +57,8 @@ var/mob/living/carbon/H = hit_atom if(istype(H.head, /obj/item)) var/obj/item/WH = H.head - ///check if the item has NODROP - if(HAS_TRAIT(WH, TRAIT_NODROP)) - H.visible_message("[src] bounces off [H]'s [WH.name]!", "[src] bounces off your [WH.name], falling to the floor.") - return - ///check if the item is an actual clothing head item, since some non-clothing items can be worn - if(istype(WH, /obj/item/clothing/head)) - var/obj/item/clothing/head/WHH = WH - ///SNUG_FIT hats are immune to being knocked off - if(WHH.clothing_flags & SNUG_FIT) - H.visible_message("[src] bounces off [H]'s [WHH.name]!", "[src] bounces off your [WHH.name], falling to the floor.") - return - ///if the hat manages to knock something off - if(H.dropItemToGround(WH)) - H.visible_message("[src] knocks [WH] off [H]'s head!", "[WH] is suddenly knocked off your head by [src]!") + H.visible_message("[src] bounces off [H]'s [WH.name]!", "[src] bounces off your [WH.name], falling to the floor.") + return if(H.equip_to_slot_if_possible(src, SLOT_HEAD, FALSE, TRUE)) H.visible_message("[src] lands neatly on [H]'s head!", "[src] lands perfectly onto your head!") return @@ -84,6 +72,8 @@ R.visible_message("[src] lands neatly on top of [R].", "[src] lands perfectly on top of you.") R.place_on_head(src) //hats aren't designed to snugly fit borg heads or w/e so they'll always manage to knock eachother off + + /obj/item/clothing/head/worn_overlays(isinhands = FALSE) . = list() if(!isinhands) diff --git a/code/modules/clothing/head/collectable.dm b/code/modules/clothing/head/collectable.dm index 5457d32e8a..90c0690534 100644 --- a/code/modules/clothing/head/collectable.dm +++ b/code/modules/clothing/head/collectable.dm @@ -13,14 +13,12 @@ /obj/item/clothing/head/collectable/slime name = "collectable slime cap!" desc = "It just latches right in place!" - clothing_flags = SNUG_FIT icon_state = "slime" dynamic_hair_suffix = "" /obj/item/clothing/head/collectable/xenom name = "collectable xenomorph helmet!" desc = "Hiss hiss hiss!" - clothing_flags = SNUG_FIT icon_state = "xenom" /obj/item/clothing/head/collectable/chef @@ -73,14 +71,13 @@ desc = "A collectable welding helmet. Now with 80% less lead! Not for actual welding. Any welding done while wearing this helmet is done so at the owner's own risk!" icon_state = "welding" item_state = "welding" - clothing_flags = SNUG_FIT + resistance_flags = NONE /obj/item/clothing/head/collectable/slime name = "collectable slime hat" desc = "Just like a real brain slug!" icon_state = "headslime" item_state = "headslime" - clothing_flags = SNUG_FIT /obj/item/clothing/head/collectable/flatcap name = "collectable flat cap" @@ -124,7 +121,6 @@ /obj/item/clothing/head/collectable/hardhat name = "collectable hard hat" desc = "WARNING! Offers no real protection, or luminosity, but damn, is it fancy!" - clothing_flags = SNUG_FIT icon_state = "hardhat0_yellow" item_state = "hardhat0_yellow" @@ -147,7 +143,7 @@ desc = "Go Red! I mean Green! I mean Red! No Green!" icon_state = "thunderdome" item_state = "thunderdome" - clothing_flags = SNUG_FIT + resistance_flags = NONE flags_inv = HIDEHAIR /obj/item/clothing/head/collectable/swat @@ -155,5 +151,5 @@ desc = "That's not real blood. That's red paint." //Reference to the actual description icon_state = "swat" item_state = "swat" - clothing_flags = SNUG_FIT + resistance_flags = NONE flags_inv = HIDEHAIR diff --git a/code/modules/clothing/head/hardhat.dm b/code/modules/clothing/head/hardhat.dm index d72e4ba1d7..fa61b81177 100644 --- a/code/modules/clothing/head/hardhat.dm +++ b/code/modules/clothing/head/hardhat.dm @@ -11,7 +11,6 @@ armor = list("melee" = 15, "bullet" = 5, "laser" = 20,"energy" = 10, "bomb" = 20, "bio" = 10, "rad" = 20, "fire" = 100, "acid" = 50) flags_inv = 0 actions_types = list(/datum/action/item_action/toggle_helmet_light) - clothing_flags = SNUG_FIT resistance_flags = FIRE_PROOF dynamic_hair_suffix = "+generic" diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index 8a1cc01bd5..be6e270e45 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -10,7 +10,7 @@ heat_protection = HEAD max_heat_protection_temperature = HELMET_MAX_TEMP_PROTECT strip_delay = 60 - clothing_flags = SNUG_FIT + resistance_flags = NONE flags_cover = HEADCOVERSEYES flags_inv = HIDEHAIR diff --git a/code/modules/clothing/head/misc.dm b/code/modules/clothing/head/misc.dm index 071e52b46d..909d23e49b 100644 --- a/code/modules/clothing/head/misc.dm +++ b/code/modules/clothing/head/misc.dm @@ -67,14 +67,12 @@ desc = "A plastic replica of a Syndicate agent's space helmet. You'll look just like a real murderous Syndicate agent in this! This is a toy, it is not made for use in space!" flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT mutantrace_variation = MUTANTRACE_VARIATION - clothing_flags = SNUG_FIT /obj/item/clothing/head/cueball name = "cueball helmet" desc = "A large, featureless white orb meant to be worn on your head. How do you even see out of this thing?" icon_state = "cueball" item_state="cueball" - clothing_flags = SNUG_FIT flags_cover = HEADCOVERSEYES|HEADCOVERSMOUTH flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT @@ -83,7 +81,6 @@ desc = "A ball of white styrofoam. So festive." icon_state = "snowman_h" item_state = "snowman_h" - clothing_flags = SNUG_FIT flags_cover = HEADCOVERSEYES flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT @@ -93,7 +90,6 @@ icon_state = "justicered" item_state = "justicered" flags_inv = HIDEHAIR|HIDEEARS|HIDEEYES|HIDEFACE|HIDEFACIALHAIR|HIDESNOUT - clothing_flags = SNUG_FIT flags_cover = HEADCOVERSEYES /obj/item/clothing/head/justice/blue @@ -165,7 +161,6 @@ icon_state = "chickenhead" item_state = "chickensuit" flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT - clothing_flags = SNUG_FIT /obj/item/clothing/head/griffin name = "griffon head" @@ -173,7 +168,6 @@ icon_state = "griffinhat" item_state = "griffinhat" flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT - clothing_flags = SNUG_FIT /obj/item/clothing/head/bearpelt name = "bear pelt hat" @@ -187,7 +181,6 @@ item_state = "xenos_helm" desc = "A helmet made out of chitinous alien hide." flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT - clothing_flags = SNUG_FIT /obj/item/clothing/head/fedora name = "fedora" @@ -309,7 +302,6 @@ desc = "When everything's going to crab, protecting your head is the best choice." icon_state = "lobster_hat" flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT - clothing_flags = SNUG_FIT /obj/item/clothing/head/drfreezehat name = "doctor freeze's wig" diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index a3a4f1d859..aac8b38043 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -29,7 +29,6 @@ visor_flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH resistance_flags = FIRE_PROOF mutantrace_variation = MUTANTRACE_VARIATION - clothing_flags = SNUG_FIT /obj/item/clothing/head/welding/attack_self(mob/user) weldingvisortoggle(user) @@ -116,7 +115,6 @@ item_state = "hardhat0_pumpkin" item_color = "pumpkin" flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT - clothing_flags = SNUG_FIT armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) brightness_on = 2 //luminosity when on flags_cover = HEADCOVERSEYES @@ -165,7 +163,6 @@ desc = "A helmet made out of a box." icon_state = "cardborg_h" item_state = "cardborg_h" - clothing_flags = SNUG_FIT flags_cover = HEADCOVERSEYES flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT @@ -230,7 +227,6 @@ desc = "A crude helmet made out of bronze plates. It offers very little in the way of protection." icon = 'icons/obj/clothing/clockwork_garb.dmi' icon_state = "clockwork_helmet_old" - clothing_flags = SNUG_FIT flags_inv = HIDEEARS|HIDEHAIR armor = list("melee" = 5, "bullet" = 0, "laser" = -5, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 20, "acid" = 20) @@ -243,7 +239,7 @@ equip_delay_other = 140 var/datum/brain_trauma/mild/phobia/paranoia var/warped = FALSE - clothing_flags = ANTI_TINFOIL_MANEUVER + clothing_flags = IGNORE_HAT_TOSS /obj/item/clothing/head/foilhat/Initialize(mapload) . = ..() diff --git a/code/modules/clothing/spacesuits/_spacesuits.dm b/code/modules/clothing/spacesuits/_spacesuits.dm index 117fbc49e0..57866b5131 100644 --- a/code/modules/clothing/spacesuits/_spacesuits.dm +++ b/code/modules/clothing/spacesuits/_spacesuits.dm @@ -4,7 +4,7 @@ name = "space helmet" icon_state = "spaceold" desc = "A special helmet with solar UV shielding to protect your eyes from harmful rays." - clothing_flags = STOPSPRESSUREDAMAGE | THICKMATERIAL | BLOCK_GAS_SMOKE_EFFECT | ALLOWINTERNALS | SNUG_FIT + clothing_flags = STOPSPRESSUREDAMAGE | THICKMATERIAL | BLOCK_GAS_SMOKE_EFFECT | ALLOWINTERNALS item_state = "spaceold" permeability_coefficient = 0.01 armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 50, "fire" = 80, "acid" = 70) diff --git a/code/modules/clothing/suits/bio.dm b/code/modules/clothing/suits/bio.dm index 369ddba7b9..5d0a9b9914 100644 --- a/code/modules/clothing/suits/bio.dm +++ b/code/modules/clothing/suits/bio.dm @@ -4,7 +4,7 @@ icon_state = "bio" desc = "A hood that protects the head and face from biological contaminants." permeability_coefficient = 0.01 - clothing_flags = THICKMATERIAL | BLOCK_GAS_SMOKE_EFFECT | SNUG_FIT + clothing_flags = THICKMATERIAL | BLOCK_GAS_SMOKE_EFFECT armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 60, "fire" = 30, "acid" = 100) flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEHAIR|HIDEFACIALHAIR|HIDEFACE|HIDESNOUT resistance_flags = ACID_PROOF diff --git a/code/modules/clothing/suits/cloaks.dm b/code/modules/clothing/suits/cloaks.dm index be81374868..b8287c7f4c 100644 --- a/code/modules/clothing/suits/cloaks.dm +++ b/code/modules/clothing/suits/cloaks.dm @@ -69,7 +69,6 @@ icon_state = "golhood" desc = "A protective & concealing hood." armor = list("melee" = 35, "bullet" = 10, "laser" = 25, "energy" = 10, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 60, "acid" = 60) - clothing_flags = SNUG_FIT flags_inv = HIDEEARS|HIDEEYES|HIDEHAIR|HIDEFACIALHAIR /obj/item/clothing/suit/hooded/cloak/drake @@ -89,7 +88,6 @@ icon_state = "dragon" desc = "The skull of a dragon." armor = list("melee" = 70, "bullet" = 30, "laser" = 50, "energy" = 40, "bomb" = 70, "bio" = 60, "rad" = 50, "fire" = 100, "acid" = 100) - clothing_flags = SNUG_FIT heat_protection = HEAD max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT resistance_flags = FIRE_PROOF | ACID_PROOF diff --git a/code/modules/clothing/suits/utility.dm b/code/modules/clothing/suits/utility.dm index b98d8207d9..fbdca6ddbc 100644 --- a/code/modules/clothing/suits/utility.dm +++ b/code/modules/clothing/suits/utility.dm @@ -58,7 +58,7 @@ name = "bomb hood" desc = "Use in case of bomb." icon_state = "bombsuit" - clothing_flags = THICKMATERIAL | SNUG_FIT + clothing_flags = THICKMATERIAL armor = list("melee" = 20, "bullet" = 0, "laser" = 20,"energy" = 10, "bomb" = 100, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 50) flags_inv = HIDEFACE|HIDEMASK|HIDEEARS|HIDEEYES|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT dynamic_hair_suffix = "" @@ -123,7 +123,7 @@ name = "radiation hood" icon_state = "rad" desc = "A hood with radiation protective properties. The label reads, 'Made with lead. Please do not consume insulation.'" - clothing_flags = THICKMATERIAL|SNUG_FIT + clothing_flags = THICKMATERIAL flags_inv = HIDEMASK|HIDEEARS|HIDEFACE|HIDEEYES|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 60, "rad" = 100, "fire" = 30, "acid" = 30) strip_delay = 60 diff --git a/code/modules/clothing/suits/wiz_robe.dm b/code/modules/clothing/suits/wiz_robe.dm index 93eb8181c7..9d1a47f231 100644 --- a/code/modules/clothing/suits/wiz_robe.dm +++ b/code/modules/clothing/suits/wiz_robe.dm @@ -7,7 +7,6 @@ armor = list("melee" = 30, "bullet" = 20, "laser" = 20, "energy" = 20, "bomb" = 20, "bio" = 20, "rad" = 20, "fire" = 100, "acid" = 100) strip_delay = 50 equip_delay_other = 50 - clothing_flags = SNUG_FIT resistance_flags = FIRE_PROOF | ACID_PROOF dog_fashion = /datum/dog_fashion/head/blue_wizard diff --git a/code/modules/hydroponics/beekeeping/beekeeper_suit.dm b/code/modules/hydroponics/beekeeping/beekeeper_suit.dm index fd9f879f5e..7fa1a0dd2c 100644 --- a/code/modules/hydroponics/beekeeping/beekeeper_suit.dm +++ b/code/modules/hydroponics/beekeeping/beekeeper_suit.dm @@ -4,7 +4,7 @@ desc = "Keeps the lil buzzing buggers out of your eyes." icon_state = "beekeeper" item_state = "beekeeper" - clothing_flags = THICKMATERIAL | SNUG_FIT + clothing_flags = THICKMATERIAL /obj/item/clothing/suit/beekeeper_suit