From 2f4711ea6de691a189aecdeaf1e1582237c408ef Mon Sep 17 00:00:00 2001 From: Firecage Date: Fri, 30 Dec 2016 13:34:10 +0200 Subject: [PATCH] Changes how hoods of hooded clothing functions...kinda. --- code/game/gamemodes/cult/cult_items.dm | 12 ++-- code/modules/clothing/suits/cloaks.dm | 5 +- code/modules/clothing/suits/jobs.dm | 6 +- code/modules/clothing/suits/miscellaneous.dm | 65 ++++++++----------- code/modules/clothing/suits/toggles.dm | 24 ++++++- code/modules/mining/equipment.dm | 6 +- .../simple_animal/hostile/mining_mobs.dm | 2 +- 7 files changed, 60 insertions(+), 60 deletions(-) diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm index 1b5668b525d..bb086e57c6c 100644 --- a/code/game/gamemodes/cult/cult_items.dm +++ b/code/game/gamemodes/cult/cult_items.dm @@ -163,16 +163,14 @@ body_parts_covered = CHEST|GROIN|LEGS|ARMS allowed = list(/obj/item/weapon/tome,/obj/item/weapon/melee/cultblade) var/current_charges = 3 - hooded = 1 - hoodtype = /obj/item/clothing/head/cult_hoodie + hoodtype = /obj/item/clothing/head/hooded/cult_hoodie -/obj/item/clothing/head/cult_hoodie +/obj/item/clothing/head/hooded/cult_hoodie name = "empowered cultist armor" desc = "Empowered garb which creates a powerful shield around the user." icon_state = "cult_hoodalt" armor = list(melee = 50, bullet = 40, laser = 50,energy = 30, bomb = 50, bio = 30, rad = 30, fire = 50, acid = 50) body_parts_covered = HEAD - flags = NODROP flags_inv = HIDEHAIR|HIDEFACE|HIDEEARS /obj/item/clothing/suit/hooded/cultrobes/cult_shield/equipped(mob/living/user, slot) @@ -217,15 +215,13 @@ body_parts_covered = CHEST|GROIN|LEGS|ARMS armor = list(melee = -50, bullet = -50, laser = -100,energy = -50, bomb = -50, bio = -50, rad = -50, fire = 0, acid = 0) slowdown = -1 - hooded = 1 - hoodtype = /obj/item/clothing/head/berserkerhood + hoodtype = /obj/item/clothing/head/hooded/berserkerhood -/obj/item/clothing/head/berserkerhood +/obj/item/clothing/head/hooded/berserkerhood name = "flagellant's robes" desc = "Blood-soaked garb infused with dark magic; allows the user to move at inhuman speeds, but at the cost of increased damage." icon_state = "culthood" body_parts_covered = HEAD - flags = NODROP flags_inv = HIDEHAIR|HIDEFACE|HIDEEARS armor = list(melee = -50, bullet = -50, laser = -50, energy = -50, bomb = -50, bio = -50, rad = -50, fire = 0, acid = 0) diff --git a/code/modules/clothing/suits/cloaks.dm b/code/modules/clothing/suits/cloaks.dm index cad3e4bf782..920f5769e28 100644 --- a/code/modules/clothing/suits/cloaks.dm +++ b/code/modules/clothing/suits/cloaks.dm @@ -57,14 +57,13 @@ desc = "A suit of armour fashioned from the remains of an ash drake. " allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/internals, /obj/item/weapon/resonator, /obj/item/device/mining_scanner, /obj/item/device/t_scanner/adv_mining_scanner, /obj/item/weapon/gun/energy/kinetic_accelerator, /obj/item/weapon/pickaxe, /obj/item/weapon/twohanded/spear) armor = list(melee = 70, bullet = 30, laser = 50, energy = 40, bomb = 70, bio = 60, rad = 50, fire = 100, acid = 100) - hooded = 1 - hoodtype = /obj/item/clothing/head/cloakhood/drake + hoodtype = /obj/item/clothing/head/hooded/cloakhood/drake heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT resistance_flags = FIRE_PROOF | ACID_PROOF -/obj/item/clothing/head/cloakhood/drake +/obj/item/clothing/head/hooded/cloakhood/drake name = "drake helm" icon_state = "dragon" desc = "The skull of a dragon." diff --git a/code/modules/clothing/suits/jobs.dm b/code/modules/clothing/suits/jobs.dm index e6be9055599..2c1cff23d04 100644 --- a/code/modules/clothing/suits/jobs.dm +++ b/code/modules/clothing/suits/jobs.dm @@ -30,15 +30,13 @@ item_state = "chaplain_hoodie" body_parts_covered = CHEST|GROIN|LEGS|ARMS allowed = list(/obj/item/weapon/storage/book/bible, /obj/item/weapon/nullrod, /obj/item/weapon/reagent_containers/food/drinks/bottle/holywater, /obj/item/weapon/storage/fancy/candle_box, /obj/item/candle, /obj/item/weapon/tank/internals/emergency_oxygen) - hooded = 1 - hoodtype = /obj/item/clothing/head/chaplain_hood + hoodtype = /obj/item/clothing/head/hooded/chaplain_hood -/obj/item/clothing/head/chaplain_hood +/obj/item/clothing/head/hooded/chaplain_hood name = "chaplain hood" desc = "For protecting your identity when immolating demons." icon_state = "chaplain_hood" body_parts_covered = HEAD - flags = NODROP flags_inv = HIDEHAIR|HIDEFACE|HIDEEARS /obj/item/clothing/suit/nun diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index 6f06a6105ef..1dc3ef23e5f 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -232,17 +232,15 @@ cold_protection = CHEST|GROIN|ARMS min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT //Space carp like space, so you should too allowed = list(/obj/item/weapon/tank/internals/emergency_oxygen, /obj/item/weapon/gun/ballistic/automatic/speargun) - hooded = 1 - hoodtype = /obj/item/clothing/head/carp_hood + hoodtype = /obj/item/clothing/head/hooded/carp_hood -/obj/item/clothing/head/carp_hood +/obj/item/clothing/head/hooded/carp_hood name = "carp hood" desc = "A hood attached to a carp costume." icon_state = "carp_casual" body_parts_covered = HEAD cold_protection = HEAD min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT - flags = NODROP flags_inv = HIDEHAIR|HIDEEARS /obj/item/clothing/suit/hooded/ian_costume //It's Ian, rub his bell- oh god what happened to his inside parts? @@ -254,18 +252,16 @@ //cold_protection = CHEST|GROIN|ARMS //min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT allowed = list() - hooded = 1 - hoodtype = /obj/item/clothing/head/ian_hood + hoodtype = /obj/item/clothing/head/hooded/ian_hood dog_fashion = /datum/dog_fashion/back -/obj/item/clothing/head/ian_hood +/obj/item/clothing/head/hooded/ian_hood name = "corgi hood" desc = "A hood that looks just like a corgi's head, it won't guarantee dog biscuits." icon_state = "ian" body_parts_covered = HEAD //cold_protection = HEAD //min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT - flags = NODROP flags_inv = HIDEHAIR|HIDEEARS /obj/item/clothing/suit/hooded/bee_costume // It's Hip! @@ -275,15 +271,14 @@ item_state = "labcoat" body_parts_covered = CHEST|GROIN|ARMS flags = THICKMATERIAL - hooded = 1 - hoodtype = /obj/item/clothing/head/bee_hood + hoodtype = /obj/item/clothing/head/hooded/bee_hood -/obj/item/clothing/head/bee_hood +/obj/item/clothing/head/hooded/bee_hood name = "bee hood" desc = "A hood attached to a bee costume." icon_state = "bee" body_parts_covered = HEAD - flags = NODROP|THICKMATERIAL + flags = THICKMATERIAL flags_inv = HIDEHAIR|HIDEEARS /obj/item/clothing/suit/hooded/bloated_human //OH MY GOD WHAT HAVE YOU DONE!?!?!? @@ -293,17 +288,15 @@ item_state = "labcoat" body_parts_covered = CHEST|GROIN|ARMS allowed = list() - hooded = 1 actions_types = list(/datum/action/item_action/toggle_human_head) - hoodtype = /obj/item/clothing/head/human_head + hoodtype = /obj/item/clothing/head/hooded/human_head -/obj/item/clothing/head/human_head +/obj/item/clothing/head/hooded/human_head name = "bloated human head" desc = "A horribly bloated and mismatched human head." icon_state = "lingspacehelmet" body_parts_covered = HEAD - flags = NODROP flags_cover = HEADCOVERSEYES flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR @@ -441,16 +434,14 @@ min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0, fire = 0, acid = 0) allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/internals/emergency_oxygen,/obj/item/toy,/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/lighter) - hooded = 1 -/obj/item/clothing/head/winterhood +/obj/item/clothing/head/hooded/winterhood name = "winter hood" desc = "A hood attached to a heavy winter jacket." icon_state = "winterhood" body_parts_covered = HEAD cold_protection = HEAD min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT - flags = NODROP flags_inv = HIDEHAIR|HIDEEARS /obj/item/clothing/suit/hooded/wintercoat/captain @@ -458,9 +449,9 @@ icon_state = "coatcaptain" armor = list(melee = 25, bullet = 30, laser = 30, energy = 10, bomb = 25, bio = 0, rad = 0, fire = 0, acid = 50) allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/ballistic,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/device/flashlight/seclite,/obj/item/weapon/melee/classic_baton/telescopic) - hoodtype = /obj/item/clothing/head/winterhood/captain + hoodtype = /obj/item/clothing/head/hooded/winterhood/captain -/obj/item/clothing/head/winterhood/captain +/obj/item/clothing/head/hooded/winterhood/captain icon_state = "winterhood_captain" /obj/item/clothing/suit/hooded/wintercoat/security @@ -468,9 +459,9 @@ icon_state = "coatsecurity" armor = list(melee = 25, bullet = 15, laser = 30, energy = 10, bomb = 25, bio = 0, rad = 0, fire = 0, acid = 45) allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/ballistic,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/device/flashlight/seclite,/obj/item/weapon/melee/classic_baton/telescopic) - hoodtype = /obj/item/clothing/head/winterhood/security + hoodtype = /obj/item/clothing/head/hooded/winterhood/security -/obj/item/clothing/head/winterhood/security +/obj/item/clothing/head/hooded/winterhood/security icon_state = "winterhood_security" /obj/item/clothing/suit/hooded/wintercoat/medical @@ -478,9 +469,9 @@ icon_state = "coatmedical" allowed = list(/obj/item/device/analyzer,/obj/item/stack/medical,/obj/item/weapon/dnainjector,/obj/item/weapon/reagent_containers/dropper,/obj/item/weapon/reagent_containers/syringe,/obj/item/weapon/reagent_containers/hypospray,/obj/item/device/healthanalyzer,/obj/item/device/flashlight/pen,/obj/item/weapon/reagent_containers/glass/bottle,/obj/item/weapon/reagent_containers/glass/beaker,/obj/item/weapon/reagent_containers/pill,/obj/item/weapon/storage/pill_bottle,/obj/item/weapon/paper,/obj/item/weapon/melee/classic_baton/telescopic) armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 50, rad = 0, fire = 0, acid = 45) - hoodtype = /obj/item/clothing/head/winterhood/medical + hoodtype = /obj/item/clothing/head/hooded/winterhood/medical -/obj/item/clothing/head/winterhood/medical +/obj/item/clothing/head/hooded/winterhood/medical icon_state = "winterhood_medical" /obj/item/clothing/suit/hooded/wintercoat/science @@ -488,9 +479,9 @@ icon_state = "coatscience" allowed = list(/obj/item/device/analyzer,/obj/item/stack/medical,/obj/item/weapon/dnainjector,/obj/item/weapon/reagent_containers/dropper,/obj/item/weapon/reagent_containers/syringe,/obj/item/weapon/reagent_containers/hypospray,/obj/item/device/healthanalyzer,/obj/item/device/flashlight/pen,/obj/item/weapon/reagent_containers/glass/bottle,/obj/item/weapon/reagent_containers/glass/beaker,/obj/item/weapon/reagent_containers/pill,/obj/item/weapon/storage/pill_bottle,/obj/item/weapon/paper,/obj/item/weapon/melee/classic_baton/telescopic) armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 10, bio = 0, rad = 0, fire = 0, acid = 0) - hoodtype = /obj/item/clothing/head/winterhood/science + hoodtype = /obj/item/clothing/head/hooded/winterhood/science -/obj/item/clothing/head/winterhood/science +/obj/item/clothing/head/hooded/winterhood/science icon_state = "winterhood_science" /obj/item/clothing/suit/hooded/wintercoat/engineering @@ -498,34 +489,34 @@ icon_state = "coatengineer" armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 20, fire = 30, acid = 45) allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/internals/emergency_oxygen,/obj/item/device/t_scanner, /obj/item/weapon/rcd, /obj/item/weapon/pipe_dispenser) - hoodtype = /obj/item/clothing/head/winterhood/engineering + hoodtype = /obj/item/clothing/head/hooded/winterhood/engineering -/obj/item/clothing/head/winterhood/engineering +/obj/item/clothing/head/hooded/winterhood/engineering icon_state = "winterhood_engineer" /obj/item/clothing/suit/hooded/wintercoat/engineering/atmos name = "atmospherics winter coat" icon_state = "coatatmos" - hoodtype = /obj/item/clothing/head/winterhood/engineering/atmos + hoodtype = /obj/item/clothing/head/hooded/winterhood/engineering/atmos -/obj/item/clothing/head/winterhood/engineering/atmos +/obj/item/clothing/head/hooded/winterhood/engineering/atmos icon_state = "winterhood_atmos" /obj/item/clothing/suit/hooded/wintercoat/hydro name = "hydroponics winter coat" icon_state = "coathydro" allowed = list(/obj/item/weapon/reagent_containers/spray/plantbgone,/obj/item/device/plant_analyzer,/obj/item/seeds,/obj/item/weapon/reagent_containers/glass/bottle,/obj/item/weapon/cultivator,/obj/item/weapon/reagent_containers/spray/pestspray,/obj/item/weapon/hatchet,/obj/item/weapon/storage/bag/plants) - hoodtype = /obj/item/clothing/head/winterhood/hydro + hoodtype = /obj/item/clothing/head/hooded/winterhood/hydro -/obj/item/clothing/head/winterhood/hydro +/obj/item/clothing/head/hooded/winterhood/hydro icon_state = "winterhood_hydro" /obj/item/clothing/suit/hooded/wintercoat/cargo name = "cargo winter coat" icon_state = "coatcargo" - hoodtype = /obj/item/clothing/head/winterhood/cargo + hoodtype = /obj/item/clothing/head/hooded/winterhood/cargo -/obj/item/clothing/head/winterhood/cargo +/obj/item/clothing/head/hooded/winterhood/cargo icon_state = "winterhood_cargo" /obj/item/clothing/suit/hooded/wintercoat/miner @@ -533,9 +524,9 @@ icon_state = "coatminer" allowed = list(/obj/item/weapon/pickaxe,/obj/item/device/flashlight,/obj/item/weapon/tank/internals/emergency_oxygen,/obj/item/toy,/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/lighter) armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0) - hoodtype = /obj/item/clothing/head/winterhood/miner + hoodtype = /obj/item/clothing/head/hooded/winterhood/miner -/obj/item/clothing/head/winterhood/miner +/obj/item/clothing/head/hooded/winterhood/miner icon_state = "winterhood_miner" /obj/item/clothing/suit/spookyghost diff --git a/code/modules/clothing/suits/toggles.dm b/code/modules/clothing/suits/toggles.dm index 35049b25351..32ed6b1ae1c 100644 --- a/code/modules/clothing/suits/toggles.dm +++ b/code/modules/clothing/suits/toggles.dm @@ -2,8 +2,9 @@ /obj/item/clothing/suit/hooded actions_types = list(/datum/action/item_action/toggle_hood) - var/obj/item/clothing/head/hood - var/hoodtype = /obj/item/clothing/head/winterhood //so the chaplain hoodie or other hoodies can override this + var/obj/item/clothing/head/hooded/hood + var/hoodtype = /obj/item/clothing/head/hooded/winterhood //so the chaplain hoodie or other hoodies can override this + hooded = 1 /obj/item/clothing/suit/hooded/New() MakeHood() @@ -15,7 +16,8 @@ /obj/item/clothing/suit/hooded/proc/MakeHood() if(!hood) - var/obj/item/clothing/head/W = new hoodtype(src) + var/obj/item/clothing/head/hooded/W = new hoodtype(src) + W.suit = src hood = W /obj/item/clothing/suit/hooded/ui_action_click() @@ -66,6 +68,22 @@ else RemoveHood() +/obj/item/clothing/head/hooded + var/obj/item/clothing/suit/hooded/suit + +/obj/item/clothing/head/hooded/dropped() + ..() + if(suit) + suit.RemoveHood() + +/obj/item/clothing/head/hooded/equipped(mob/user, slot) + ..() + if(slot != slot_head) + if(suit) + suit.RemoveHood() + else + qdel(src) + //Toggle exosuits for different aesthetic styles (hoodies, suit jacket buttons, etc) /obj/item/clothing/suit/toggle/AltClick(mob/user) diff --git a/code/modules/mining/equipment.dm b/code/modules/mining/equipment.dm index d1f7d1104f7..c4c4e55ca8f 100644 --- a/code/modules/mining/equipment.dm +++ b/code/modules/mining/equipment.dm @@ -10,18 +10,16 @@ cold_protection = CHEST|GROIN|LEGS|ARMS max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT heat_protection = CHEST|GROIN|LEGS|ARMS - hooded = 1 - hoodtype = /obj/item/clothing/head/explorer + hoodtype = /obj/item/clothing/head/hooded/explorer armor = list(melee = 30, bullet = 20, laser = 20, energy = 20, bomb = 50, bio = 100, rad = 50, fire = 50, acid = 50) allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/internals, /obj/item/weapon/resonator, /obj/item/device/mining_scanner, /obj/item/device/t_scanner/adv_mining_scanner, /obj/item/weapon/gun/energy/kinetic_accelerator, /obj/item/weapon/pickaxe) resistance_flags = FIRE_PROOF -/obj/item/clothing/head/explorer +/obj/item/clothing/head/hooded/explorer name = "explorer hood" desc = "An armoured hood for exploring harsh environments." icon_state = "explorer" body_parts_covered = HEAD - flags = NODROP flags_inv = HIDEHAIR|HIDEFACE|HIDEEARS min_cold_protection_temperature = FIRE_HELM_MIN_TEMP_PROTECT max_heat_protection_temperature = FIRE_HELM_MAX_TEMP_PROTECT diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm index 1f23d07bd2f..2bdd60d8af1 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm @@ -532,7 +532,7 @@ /obj/item/stack/sheet/animalhide/goliath_hide/afterattack(atom/target, mob/user, proximity_flag) if(proximity_flag) - if(istype(target, /obj/item/clothing/suit/space/hardsuit/mining) || istype(target, /obj/item/clothing/head/helmet/space/hardsuit/mining) || istype(target, /obj/item/clothing/suit/hooded/explorer) || istype(target, /obj/item/clothing/head/explorer)) + if(istype(target, /obj/item/clothing/suit/space/hardsuit/mining) || istype(target, /obj/item/clothing/head/helmet/space/hardsuit/mining) || istype(target, /obj/item/clothing/suit/hooded/explorer) || istype(target, /obj/item/clothing/head/hooded/explorer)) var/obj/item/clothing/C = target var/list/current_armor = C.armor if(current_armor.["melee"] < 60)