From 7d45e045a3249a70449a1ee00e330ecf11fa6946 Mon Sep 17 00:00:00 2001 From: oranges Date: Sat, 28 Apr 2018 13:13:56 +1200 Subject: [PATCH 01/63] Uppercases slot defines. --- code/__DEFINES/flags.dm | 2 +- code/__DEFINES/inventory.dm | 124 +++--- code/__HELPERS/pronouns.dm | 16 +- code/__HELPERS/type2type.dm | 14 +- code/_onclick/hud/drones.dm | 4 +- code/_onclick/hud/guardian.dm | 2 +- code/_onclick/hud/hud.dm | 2 +- code/_onclick/hud/human.dm | 30 +- code/_onclick/hud/monkey.dm | 158 ++++++++ code/_onclick/telekinesis.dm | 2 +- code/datums/action.dm | 2 +- code/datums/diseases/_MobProcs.dm | 4 +- code/datums/diseases/wizarditis.dm | 6 +- code/datums/martial/boxing.dm | 4 +- code/datums/martial/krav_maga.dm | 4 +- code/datums/martial/sleeping_carp.dm | 2 +- code/datums/martial/wrestling.dm | 4 +- code/datums/outfit.dm | 32 +- code/datums/traits/_trait.dm | 2 +- code/datums/traits/negative.dm | 8 +- code/game/gamemodes/changeling/changeling.dm | 2 +- code/game/gamemodes/clock_cult/clock_cult.dm | 2 +- .../game/gamemodes/clown_ops/bananium_bomb.dm | 6 +- .../game/gamemodes/clown_ops/clown_weapons.dm | 2 +- code/game/gamemodes/nuclear/nuclear.dm | 7 +- code/game/gamemodes/objective.dm | 2 +- code/game/machinery/launch_pad.dm | 2 +- code/game/objects/items.dm | 28 +- code/game/objects/items/airlock_painter.dm | 2 +- code/game/objects/items/cards_ids.dm | 2 +- code/game/objects/items/chrono_eraser.dm | 4 +- code/game/objects/items/cigs_lighters.dm | 10 +- code/game/objects/items/defib.dm | 14 +- code/game/objects/items/devices/PDA/PDA.dm | 2 +- code/game/objects/items/devices/aicard.dm | 2 +- .../objects/items/devices/chameleonproj.dm | 2 +- code/game/objects/items/devices/flashlight.dm | 4 +- .../items/devices/forcefieldprojector.dm | 2 +- .../objects/items/devices/geiger_counter.dm | 2 +- code/game/objects/items/devices/gps.dm | 2 +- .../game/objects/items/devices/instruments.dm | 2 +- .../objects/items/devices/laserpointer.dm | 2 +- .../objects/items/devices/lightreplacer.dm | 2 +- code/game/objects/items/devices/paicard.dm | 2 +- .../items/devices/radio/electropack.dm | 2 +- .../objects/items/devices/radio/headset.dm | 5 + .../game/objects/items/devices/radio/radio.dm | 2 +- .../items/devices/reverse_bear_trap.dm | 15 +- code/game/objects/items/devices/scanners.dm | 6 +- .../objects/items/devices/sensor_device.dm | 2 +- .../objects/items/devices/taperecorder.dm | 2 +- .../objects/items/devices/traitordevices.dm | 19 +- code/game/objects/items/granters.dm | 2 +- .../game/objects/items/grenades/ghettobomb.dm | 2 +- code/game/objects/items/grenades/grenade.dm | 2 +- code/game/objects/items/grenades/smokebomb.dm | 34 ++ code/game/objects/items/handcuffs.dm | 2 +- code/game/objects/items/holy_weapons.dm | 32 +- code/game/objects/items/melee/misc.dm | 12 +- code/game/objects/items/pinpointer.dm | 2 +- code/game/objects/items/shields.dm | 4 +- code/game/objects/items/singularityhammer.dm | 4 +- code/game/objects/items/storage/backpack.dm | 2 +- code/game/objects/items/storage/bags.dm | 4 +- code/game/objects/items/storage/belt.dm | 2 +- code/game/objects/items/storage/book.dm | 2 +- code/game/objects/items/storage/boxes.dm | 2 +- code/game/objects/items/storage/fancy.dm | 6 +- code/game/objects/items/storage/toolbox.dm | 2 +- code/game/objects/items/storage/wallets.dm | 94 +++++ code/game/objects/items/stunbaton.dm | 7 +- code/game/objects/items/tanks/tank_types.dm | 4 +- code/game/objects/items/tanks/tanks.dm | 2 +- code/game/objects/items/tanks/watertank.dm | 10 +- code/game/objects/items/tools/crowbar.dm | 2 +- code/game/objects/items/tools/screwdriver.dm | 2 +- code/game/objects/items/tools/weldingtool.dm | 375 ++++++++++++++++++ code/game/objects/items/tools/wirecutters.dm | 2 +- code/game/objects/items/tools/wrench.dm | 2 +- code/game/objects/items/toys.dm | 6 +- code/game/objects/items/twohanded.dm | 12 +- code/game/objects/items/weaponry.dm | 8 +- code/game/objects/structures/bedsheet_bin.dm | 2 +- code/game/turfs/simulated/lava.dm | 4 +- code/modules/admin/secrets.dm | 2 +- code/modules/admin/topic.dm | 4 +- code/modules/admin/verbs/debug.dm | 2 +- .../abductor/equipment/abduction_gear.dm | 10 +- .../antagonists/abductor/machinery/console.dm | 2 +- .../changeling/powers/biodegrade.dm | 4 +- .../changeling/powers/mutations.dm | 4 +- .../clockcult/clock_items/clockwork_armor.dm | 8 +- .../clockcult/clock_items/clockwork_slab.dm | 2 +- .../clock_items/construct_chassis.dm | 2 +- .../clockcult/clock_items/judicial_visor.dm | 12 +- .../clock_items/wraith_spectacles.dm | 2 +- .../clock_scriptures/scripture_scripts.dm | 16 +- code/modules/antagonists/cult/blood_magic.dm | 10 +- code/modules/antagonists/cult/cult.dm | 6 +- code/modules/antagonists/cult/runes.dm | 2 +- code/modules/antagonists/devil/devil.dm | 8 +- .../antagonists/highlander/highlander.dm | 10 +- .../antagonists/revolution/revolution.dm | 6 +- .../antagonists/traitor/datum_traitor.dm | 6 +- .../antagonists/wizard/equipment/artefact.dm | 8 +- .../antagonists/wizard/equipment/soulstone.dm | 2 +- code/modules/antagonists/wizard/wizard.dm | 12 +- code/modules/assembly/flash.dm | 2 +- code/modules/awaymissions/capture_the_flag.dm | 8 +- code/modules/clothing/chameleon.dm | 4 +- code/modules/clothing/ears/_ears.dm | 49 +++ code/modules/clothing/glasses/_glasses.dm | 6 +- .../clothing/glasses/engine_goggles.dm | 2 +- code/modules/clothing/glasses/hud.dm | 2 +- code/modules/clothing/gloves/_gloves.dm | 2 +- code/modules/clothing/gloves/color.dm | 2 +- code/modules/clothing/head/_head.dm | 2 +- code/modules/clothing/head/misc_special.dm | 6 +- code/modules/clothing/masks/_masks.dm | 2 +- code/modules/clothing/masks/miscellaneous.dm | 4 +- code/modules/clothing/neck/_neck.dm | 2 +- code/modules/clothing/shoes/_shoes.dm | 2 +- code/modules/clothing/shoes/miscellaneous.dm | 2 +- .../modules/clothing/spacesuits/chronosuit.dm | 2 +- .../modules/clothing/spacesuits/flightsuit.dm | 22 +- code/modules/clothing/spacesuits/hardsuit.dm | 16 +- code/modules/clothing/suits/_suits.dm | 2 +- code/modules/clothing/suits/miscellaneous.dm | 2 +- code/modules/clothing/suits/toggles.dm | 12 +- code/modules/clothing/under/_under.dm | 4 +- code/modules/clothing/under/color.dm | 2 +- code/modules/detectivework/scanner.dm | 2 +- code/modules/events/wizard/curseditems.dm | 20 +- .../food_and_drinks/food/snacks_bread.dm | 2 +- code/modules/hydroponics/grown/ambrosia.dm | 2 +- code/modules/hydroponics/grown/flowers.dm | 10 +- code/modules/hydroponics/hydroitemdefines.dm | 4 +- code/modules/jobs/job_types/cargo_service.dm | 4 +- .../jobs/job_types/civilian_chaplain.dm | 4 +- code/modules/jobs/job_types/engineering.dm | 18 +- code/modules/jobs/job_types/job.dm | 2 +- code/modules/jobs/job_types/science.dm | 4 +- code/modules/jobs/job_types/security.dm | 2 +- code/modules/keybindings/bindings_human.dm | 8 +- .../mining/equipment/kinetic_crusher.dm | 2 +- .../mining/equipment/mineral_scanner.dm | 4 +- code/modules/mining/equipment/mining_tools.dm | 8 +- .../mining/equipment/wormhole_jaunter.dm | 9 +- .../mining/lavaland/necropolis_chests.dm | 8 +- code/modules/mob/inventory.dm | 8 +- .../living/carbon/alien/humanoid/humanoid.dm | 6 +- .../living/carbon/alien/special/facehugger.dm | 4 +- code/modules/mob/living/carbon/carbon.dm | 14 +- .../mob/living/carbon/human/examine.dm | 14 +- code/modules/mob/living/carbon/human/human.dm | 74 ++-- .../mob/living/carbon/human/inventory.dm | 56 +-- .../mob/living/carbon/human/species.dm | 70 ++-- .../carbon/human/species_types/angel.dm | 2 +- .../carbon/human/species_types/golems.dm | 2 +- .../carbon/human/species_types/mushpeople.dm | 2 +- .../human/species_types/shadowpeople.dm | 2 +- .../mob/living/carbon/human/update_icons.dm | 24 +- code/modules/mob/living/carbon/inventory.dm | 28 +- .../mob/living/carbon/monkey/inventory.dm | 37 ++ .../mob/living/carbon/monkey/monkey.dm | 2 +- .../mob/living/carbon/monkey/punpun.dm | 4 +- .../modules/mob/living/carbon/update_icons.dm | 16 +- .../mob/living/silicon/robot/inventory.dm | 2 +- .../simple_animal/friendly/drone/_drone.dm | 4 +- .../friendly/drone/drones_as_items.dm | 2 +- .../simple_animal/friendly/drone/inventory.dm | 18 +- .../simple_animal/guardian/types/dextrous.dm | 8 +- .../simple_animal/hostile/megafauna/legion.dm | 2 +- code/modules/mob/mob.dm | 16 +- .../computers/item/tablet.dm | 2 +- code/modules/ninja/energy_katana.dm | 4 +- code/modules/ninja/outfit.dm | 2 +- code/modules/paperwork/clipboard.dm | 2 +- code/modules/paperwork/paper.dm | 2 +- code/modules/paperwork/pen.dm | 2 +- code/modules/paperwork/photocopier.dm | 4 +- code/modules/paperwork/photography.dm | 2 +- code/modules/power/cable.dm | 2 +- .../projectiles/ammunition/_ammunition.dm | 2 +- .../boxes_magazines/_box_magazine.dm | 2 +- code/modules/projectiles/gun.dm | 2 +- code/modules/projectiles/guns/ballistic.dm | 4 +- .../projectiles/guns/ballistic/automatic.dm | 4 +- .../guns/ballistic/laser_gatling.dm | 4 +- .../projectiles/guns/ballistic/revolver.dm | 6 +- .../projectiles/guns/ballistic/shotgun.dm | 4 +- .../modules/projectiles/guns/ballistic/toy.dm | 2 +- code/modules/projectiles/guns/energy/laser.dm | 2 +- code/modules/projectiles/guns/energy/pulse.dm | 6 +- .../projectiles/guns/energy/special.dm | 4 +- code/modules/projectiles/guns/magic/staff.dm | 2 +- .../projectiles/guns/misc/beam_rifle.dm | 2 +- .../reagents/reagent_containers/glass.dm | 26 +- .../reagents/reagent_containers/hypospray.dm | 2 +- .../reagents/reagent_containers/medspray.dm | 2 +- .../reagents/reagent_containers/spray.dm | 2 +- code/modules/recycling/sortingmachinery.dm | 2 +- .../xenobiology/crossbreeding/burning.dm | 2 +- .../xenobiology/crossbreeding/regenerative.dm | 16 +- code/modules/spells/spell_types/barnyard.dm | 2 +- code/modules/spells/spell_types/lichdom.dm | 14 +- code/modules/vehicles/scooter.dm | 4 +- 207 files changed, 1507 insertions(+), 692 deletions(-) diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index 138bfbe44a..c819d5f3e8 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -11,7 +11,7 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 #define DF_VAR_EDITED (1<<1) //FLAGS BITMASK -#define STOPSPRESSUREDMAGE_1 (1<<0) //This flag is used on the flags_1 variable for SUIT and HEAD items which stop pressure damage. Note that the flag 1 was previous used as ONBACK, so it is possible for some code to use (flags & 1) when checking if something can be put on your back. Replace this code with (inv_flags & SLOT_BACK) if you see it anywhere +#define STOPSPRESSUREDMAGE_1 (1<<0) //This flag is used on the flags_1 variable for SUIT and HEAD items which stop pressure damage. Note that the flag 1 was previous used as ONBACK, so it is possible for some code to use (flags & 1) when checking if something can be put on your back. Replace this code with (inv_flags & ITEM_SLOT_BACK) if you see it anywhere //To successfully stop you taking all pressure damage you must have both a suit and head item with this flag. #define NODROP_1 (1<<1) // This flag makes it so that an item literally cannot be removed at all, or at least that's how it should be. Only deleted. diff --git a/code/__DEFINES/inventory.dm b/code/__DEFINES/inventory.dm index 4e2b591ea9..e515c56eed 100644 --- a/code/__DEFINES/inventory.dm +++ b/code/__DEFINES/inventory.dm @@ -14,76 +14,76 @@ #define STORAGE_VIEW_DEPTH 2 //ITEM INVENTORY SLOT BITMASKS -#define SLOT_OCLOTHING (1<<0) -#define SLOT_ICLOTHING (1<<1) -#define SLOT_GLOVES (1<<2) -#define SLOT_EYES (1<<3) -#define SLOT_EARS (1<<4) -#define SLOT_MASK (1<<5) -#define SLOT_HEAD (1<<6) -#define SLOT_FEET (1<<7) -#define SLOT_ID (1<<8) -#define SLOT_BELT (1<<9) -#define SLOT_BACK (1<<10) -#define SLOT_POCKET (1<<11) // this is to allow items with a w_class of WEIGHT_CLASS_NORMAL or WEIGHT_CLASS_BULKY to fit in pockets. -#define SLOT_DENYPOCKET (1<<12) // this is to deny items with a w_class of WEIGHT_CLASS_SMALL or WEIGHT_CLASS_TINY to fit in pockets. -#define SLOT_NECK (1<<13) +#define ITEM_SLOT_OCLOTHING (1<<0) +#define ITEM_SLOT_ICLOTHING (1<<1) +#define ITEM_SLOT_GLOVES (1<<2) +#define ITEM_SLOT_EYES (1<<3) +#define ITEM_SLOT_EARS (1<<4) +#define ITEM_SLOT_MASK (1<<5) +#define ITEM_SLOT_HEAD (1<<6) +#define ITEM_SLOT_FEET (1<<7) +#define ITEM_SLOT_ID (1<<8) +#define ITEM_SLOT_BELT (1<<9) +#define ITEM_SLOT_BACK (1<<10) +#define ITEM_SLOT_POCKET (1<<11) // this is to allow items with a w_class of WEIGHT_CLASS_NORMAL or WEIGHT_CLASS_BULKY to fit in pockets. +#define ITEM_SLOT_DENYPOCKET (1<<12) // this is to deny items with a w_class of WEIGHT_CLASS_SMALL or WEIGHT_CLASS_TINY to fit in pockets. +#define ITEM_SLOT_NECK (1<<13) //SLOTS -#define slot_back 1 -#define slot_wear_mask 2 -#define slot_handcuffed 3 -#define slot_hands 4 //wherever you provide a slot for hands you provide slot_hands - //slot_hands as a slot will pick ANY available hand -#define slot_belt 5 -#define slot_wear_id 6 -#define slot_ears 7 -#define slot_glasses 8 -#define slot_gloves 9 -#define slot_neck 10 -#define slot_head 11 -#define slot_shoes 12 -#define slot_wear_suit 13 -#define slot_w_uniform 14 -#define slot_l_store 15 -#define slot_r_store 16 -#define slot_s_store 17 -#define slot_in_backpack 18 -#define slot_legcuffed 19 -#define slot_generic_dextrous_storage 20 +#define SLOT_BACK 1 +#define SLOT_WEAR_MASK 2 +#define SLOT_HANDCUFFED 3 +#define SLOT_HANDS 4 //wherever you provide a slot for hands you provide SLOT_HANDS + //SLOT_HANDS as a slot will pick ANY available hand +#define SLOT_BELT 5 +#define SLOT_WEAR_ID 6 +#define SLOT_EARS 7 +#define SLOT_GLASSES 8 +#define SLOT_GLOVES 9 +#define SLOT_NECK 10 +#define SLOT_HEAD 11 +#define SLOT_SHOES 12 +#define SLOT_WEAR_SUIT 13 +#define SLOT_W_UNIFORM 14 +#define SLOT_L_STORE 15 +#define SLOT_R_STORE 16 +#define SLOT_S_STORE 17 +#define SLOT_IN_BACKPACK 18 +#define SLOT_LEGCUFFED 19 +#define SLOT_GENERC_DEXTROUS_STORAGE 20 -#define slots_amt 20 // Keep this up to date! +#define SLOTS_AMT 20 // Keep this up to date! //I hate that this has to exist /proc/slotdefine2slotbit(slotdefine) //Keep this up to date with the value of SLOT BITMASKS and SLOTS (the two define sections above) . = 0 switch(slotdefine) - if(slot_back) - . = SLOT_BACK - if(slot_wear_mask) - . = SLOT_MASK - if(slot_neck) - . = SLOT_NECK - if(slot_belt) - . = SLOT_BELT - if(slot_wear_id) - . = SLOT_ID - if(slot_ears) - . = SLOT_EARS - if(slot_glasses) - . = SLOT_EYES - if(slot_gloves) - . = SLOT_GLOVES - if(slot_head) - . = SLOT_HEAD - if(slot_shoes) - . = SLOT_FEET - if(slot_wear_suit) - . = SLOT_OCLOTHING - if(slot_w_uniform) - . = SLOT_ICLOTHING - if(slot_l_store, slot_r_store) - . = SLOT_POCKET + if(SLOT_BACK) + . = ITEM_SLOT_BACK + if(SLOT_WEAR_MASK) + . = ITEM_SLOT_MASK + if(SLOT_NECK) + . = ITEM_SLOT_NECK + if(SLOT_BELT) + . = ITEM_SLOT_BELT + if(SLOT_WEAR_ID) + . = ITEM_SLOT_ID + if(SLOT_EARS) + . = ITEM_SLOT_EARS + if(SLOT_GLASSES) + . = ITEM_SLOT_EYES + if(SLOT_GLOVES) + . = ITEM_SLOT_GLOVES + if(SLOT_HEAD) + . = ITEM_SLOT_HEAD + if(SLOT_SHOES) + . = ITEM_SLOT_FEET + if(SLOT_WEAR_SUIT) + . = ITEM_SLOT_OCLOTHING + if(SLOT_W_UNIFORM) + . = ITEM_SLOT_ICLOTHING + if(SLOT_L_STORE, SLOT_R_STORE) + . = ITEM_SLOT_POCKET //Bit flags for the flags_inv variable, which determine when a piece of clothing hides another. IE a helmet hiding glasses. diff --git a/code/__HELPERS/pronouns.dm b/code/__HELPERS/pronouns.dm index 3446a750ee..26af8b4489 100644 --- a/code/__HELPERS/pronouns.dm +++ b/code/__HELPERS/pronouns.dm @@ -188,55 +188,55 @@ /mob/living/carbon/human/p_they(capitalized, temp_gender) var/list/obscured = check_obscured_slots() var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE)) - if((slot_w_uniform in obscured) && skipface) + if((SLOT_W_UNIFORM in obscured) && skipface) temp_gender = PLURAL return ..() /mob/living/carbon/human/p_their(capitalized, temp_gender) var/list/obscured = check_obscured_slots() var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE)) - if((slot_w_uniform in obscured) && skipface) + if((SLOT_W_UNIFORM in obscured) && skipface) temp_gender = PLURAL return ..() /mob/living/carbon/human/p_them(capitalized, temp_gender) var/list/obscured = check_obscured_slots() var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE)) - if((slot_w_uniform in obscured) && skipface) + if((SLOT_W_UNIFORM in obscured) && skipface) temp_gender = PLURAL return ..() /mob/living/carbon/human/p_have(temp_gender) var/list/obscured = check_obscured_slots() var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE)) - if((slot_w_uniform in obscured) && skipface) + if((SLOT_W_UNIFORM in obscured) && skipface) temp_gender = PLURAL return ..() /mob/living/carbon/human/p_are(temp_gender) var/list/obscured = check_obscured_slots() var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE)) - if((slot_w_uniform in obscured) && skipface) + if((SLOT_W_UNIFORM in obscured) && skipface) temp_gender = PLURAL return ..() /mob/living/carbon/human/p_were(temp_gender) var/list/obscured = check_obscured_slots() var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE)) - if((slot_w_uniform in obscured) && skipface) + if((SLOT_W_UNIFORM in obscured) && skipface) temp_gender = PLURAL return ..() /mob/living/carbon/human/p_do(temp_gender) var/list/obscured = check_obscured_slots() var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE)) - if((slot_w_uniform in obscured) && skipface) + if((SLOT_W_UNIFORM in obscured) && skipface) temp_gender = PLURAL return ..() /mob/living/carbon/human/p_s(temp_gender) var/list/obscured = check_obscured_slots() var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE)) - if((slot_w_uniform in obscured) && skipface) + if((SLOT_W_UNIFORM in obscured) && skipface) temp_gender = PLURAL return ..() diff --git a/code/__HELPERS/type2type.dm b/code/__HELPERS/type2type.dm index 79f6a2c007..1f788cf445 100644 --- a/code/__HELPERS/type2type.dm +++ b/code/__HELPERS/type2type.dm @@ -400,25 +400,25 @@ /proc/slot2body_zone(slot) switch(slot) - if(slot_back, slot_wear_suit, slot_w_uniform, slot_belt, slot_wear_id) + if(SLOT_BACK, SLOT_WEAR_SUIT, SLOT_W_UNIFORM, SLOT_BELT, SLOT_WEAR_ID) return BODY_ZONE_CHEST - if(slot_gloves, slot_hands, slot_handcuffed) + if(SLOT_GLOVES, SLOT_HANDS, SLOT_HANDCUFFED) return pick(BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_HAND) - if(slot_head, slot_neck, slot_neck, slot_ears) + if(SLOT_HEAD, SLOT_NECK, SLOT_NECK, SLOT_EARS) return BODY_ZONE_HEAD - if(slot_wear_mask) + if(SLOT_WEAR_MASK) return BODY_ZONE_PRECISE_MOUTH - if(slot_glasses) + if(SLOT_GLASSES) return BODY_ZONE_PRECISE_EYES - if(slot_shoes) + if(SLOT_SHOES) return pick(BODY_ZONE_PRECISE_R_FOOT, BODY_ZONE_PRECISE_L_FOOT) - if(slot_legcuffed) + if(SLOT_LEGCUFFED) return pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG) //adapted from http://www.tannerhelland.com/4435/convert-temperature-rgb-algorithm-code/ diff --git a/code/_onclick/hud/drones.dm b/code/_onclick/hud/drones.dm index b6708b266d..8e39d96bf6 100644 --- a/code/_onclick/hud/drones.dm +++ b/code/_onclick/hud/drones.dm @@ -8,7 +8,7 @@ inv_box.icon_state = "suit_storage" // inv_box.icon_full = "template" inv_box.screen_loc = ui_drone_storage - inv_box.slot_id = slot_generic_dextrous_storage + inv_box.slot_id = SLOT_GENERC_DEXTROUS_STORAGE static_inventory += inv_box inv_box = new /obj/screen/inventory() @@ -17,7 +17,7 @@ inv_box.icon_state = "mask" // inv_box.icon_full = "template" inv_box.screen_loc = ui_drone_head - inv_box.slot_id = slot_head + inv_box.slot_id = SLOT_HEAD static_inventory += inv_box for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory)) diff --git a/code/_onclick/hud/guardian.dm b/code/_onclick/hud/guardian.dm index dc57c2b25c..628efbffe5 100644 --- a/code/_onclick/hud/guardian.dm +++ b/code/_onclick/hud/guardian.dm @@ -45,7 +45,7 @@ inv_box.icon = ui_style inv_box.icon_state = "suit_storage" inv_box.screen_loc = ui_id - inv_box.slot_id = slot_generic_dextrous_storage + inv_box.slot_id = SLOT_GENERC_DEXTROUS_STORAGE static_inventory += inv_box using = new /obj/screen/guardian/Communicate() diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index e5de695789..a17c07357e 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -33,7 +33,7 @@ var/list/obj/screen/hotkeybuttons = list() //the buttons that can be used via hotkeys var/list/infodisplay = list() //the screen objects that display mob info (health, alien plasma, etc...) var/list/screenoverlays = list() //the screen objects used as whole screen overlays (flash, damageoverlay, etc...) - var/list/inv_slots[slots_amt] // /obj/screen/inventory objects, ordered by their slot ID. + var/list/inv_slots[SLOTS_AMT] // /obj/screen/inventory objects, ordered by their slot ID. var/list/hand_slots // /obj/screen/inventory/hand objects, assoc list of "[held_index]" = object var/list/obj/screen/plane_master/plane_masters = list() // see "appearance_flags" in the ref, assoc list of "[plane]" = object diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm index 501c5fb601..2ac0f14f95 100644 --- a/code/_onclick/hud/human.dm +++ b/code/_onclick/hud/human.dm @@ -139,7 +139,7 @@ inv_box = new /obj/screen/inventory() inv_box.name = "i_clothing" inv_box.icon = ui_style - inv_box.slot_id = slot_w_uniform + inv_box.slot_id = SLOT_W_UNIFORM inv_box.icon_state = "uniform" inv_box.screen_loc = ui_iclothing toggleable_inventory += inv_box @@ -147,7 +147,7 @@ inv_box = new /obj/screen/inventory() inv_box.name = "o_clothing" inv_box.icon = ui_style - inv_box.slot_id = slot_wear_suit + inv_box.slot_id = SLOT_WEAR_SUIT inv_box.icon_state = "suit" inv_box.screen_loc = ui_oclothing toggleable_inventory += inv_box @@ -171,7 +171,7 @@ inv_box.icon = ui_style inv_box.icon_state = "id" inv_box.screen_loc = ui_id - inv_box.slot_id = slot_wear_id + inv_box.slot_id = SLOT_WEAR_ID static_inventory += inv_box inv_box = new /obj/screen/inventory() @@ -179,7 +179,7 @@ inv_box.icon = ui_style inv_box.icon_state = "mask" inv_box.screen_loc = ui_mask - inv_box.slot_id = slot_wear_mask + inv_box.slot_id = SLOT_WEAR_MASK toggleable_inventory += inv_box inv_box = new /obj/screen/inventory() @@ -187,7 +187,7 @@ inv_box.icon = ui_style inv_box.icon_state = "neck" inv_box.screen_loc = ui_neck - inv_box.slot_id = slot_neck + inv_box.slot_id = SLOT_NECK toggleable_inventory += inv_box inv_box = new /obj/screen/inventory() @@ -195,7 +195,7 @@ inv_box.icon = ui_style inv_box.icon_state = "back" inv_box.screen_loc = ui_back - inv_box.slot_id = slot_back + inv_box.slot_id = SLOT_BACK static_inventory += inv_box inv_box = new /obj/screen/inventory() @@ -203,7 +203,7 @@ inv_box.icon = ui_style inv_box.icon_state = "pocket" inv_box.screen_loc = ui_storage1 - inv_box.slot_id = slot_l_store + inv_box.slot_id = SLOT_L_STORE static_inventory += inv_box inv_box = new /obj/screen/inventory() @@ -211,7 +211,7 @@ inv_box.icon = ui_style inv_box.icon_state = "pocket" inv_box.screen_loc = ui_storage2 - inv_box.slot_id = slot_r_store + inv_box.slot_id = SLOT_R_STORE static_inventory += inv_box inv_box = new /obj/screen/inventory() @@ -219,7 +219,7 @@ inv_box.icon = ui_style inv_box.icon_state = "suit_storage" inv_box.screen_loc = ui_sstore1 - inv_box.slot_id = slot_s_store + inv_box.slot_id = SLOT_S_STORE static_inventory += inv_box using = new /obj/screen/resist() @@ -254,7 +254,7 @@ inv_box.icon = ui_style inv_box.icon_state = "gloves" inv_box.screen_loc = ui_gloves - inv_box.slot_id = slot_gloves + inv_box.slot_id = SLOT_GLOVES toggleable_inventory += inv_box inv_box = new /obj/screen/inventory() @@ -262,7 +262,7 @@ inv_box.icon = ui_style inv_box.icon_state = "glasses" inv_box.screen_loc = ui_glasses - inv_box.slot_id = slot_glasses + inv_box.slot_id = SLOT_GLASSES toggleable_inventory += inv_box inv_box = new /obj/screen/inventory() @@ -270,7 +270,7 @@ inv_box.icon = ui_style inv_box.icon_state = "ears" inv_box.screen_loc = ui_ears - inv_box.slot_id = slot_ears + inv_box.slot_id = SLOT_EARS toggleable_inventory += inv_box inv_box = new /obj/screen/inventory() @@ -278,7 +278,7 @@ inv_box.icon = ui_style inv_box.icon_state = "head" inv_box.screen_loc = ui_head - inv_box.slot_id = slot_head + inv_box.slot_id = SLOT_HEAD toggleable_inventory += inv_box inv_box = new /obj/screen/inventory() @@ -286,7 +286,7 @@ inv_box.icon = ui_style inv_box.icon_state = "shoes" inv_box.screen_loc = ui_shoes - inv_box.slot_id = slot_shoes + inv_box.slot_id = SLOT_SHOES toggleable_inventory += inv_box inv_box = new /obj/screen/inventory() @@ -295,7 +295,7 @@ inv_box.icon_state = "belt" // inv_box.icon_full = "template_small" inv_box.screen_loc = ui_belt - inv_box.slot_id = slot_belt + inv_box.slot_id = SLOT_BELT static_inventory += inv_box throw_icon = new /obj/screen/throw_catch() diff --git a/code/_onclick/hud/monkey.dm b/code/_onclick/hud/monkey.dm index 06dbf15cd7..1adb196b85 100644 --- a/code/_onclick/hud/monkey.dm +++ b/code/_onclick/hud/monkey.dm @@ -1,3 +1,4 @@ +<<<<<<< HEAD /datum/hud/monkey/New(mob/living/carbon/monkey/owner, ui_style = 'icons/mob/screen_midnight.dmi') ..() var/obj/screen/using @@ -153,3 +154,160 @@ /mob/living/carbon/monkey/create_mob_hud() if(client && !hud_used) hud_used = new /datum/hud/monkey(src, ui_style2icon(client.prefs.UI_style)) +======= +/datum/hud/monkey/New(mob/living/carbon/monkey/owner, ui_style = 'icons/mob/screen_midnight.dmi') + ..() + var/obj/screen/using + var/obj/screen/inventory/inv_box + + action_intent = new /obj/screen/act_intent() + action_intent.icon = ui_style + action_intent.icon_state = mymob.a_intent + action_intent.screen_loc = ui_acti + static_inventory += action_intent + + using = new /obj/screen/mov_intent() + using.icon = ui_style + using.icon_state = (mymob.m_intent == MOVE_INTENT_RUN ? "running" : "walking") + using.screen_loc = ui_movi + static_inventory += using + + using = new/obj/screen/language_menu + using.icon = ui_style + static_inventory += using + + using = new /obj/screen/drop() + using.icon = ui_style + using.screen_loc = ui_drop_throw + static_inventory += using + + build_hand_slots(ui_style) + + using = new /obj/screen/swap_hand() + using.icon = ui_style + using.icon_state = "swap_1_m" //extra wide! + using.screen_loc = ui_swaphand_position(owner,1) + static_inventory += using + + using = new /obj/screen/swap_hand() + using.icon = ui_style + using.icon_state = "swap_2" + using.screen_loc = ui_swaphand_position(owner,2) + static_inventory += using + + inv_box = new /obj/screen/inventory() + inv_box.name = "mask" + inv_box.icon = ui_style + inv_box.icon_state = "mask" +// inv_box.icon_full = "template" + inv_box.screen_loc = ui_monkey_mask + inv_box.slot_id = SLOT_WEAR_MASK + static_inventory += inv_box + + inv_box = new /obj/screen/inventory() + inv_box.name = "neck" + inv_box.icon = ui_style + inv_box.icon_state = "neck" +// inv_box.icon_full = "template" + inv_box.screen_loc = ui_monkey_neck + inv_box.slot_id = SLOT_NECK + static_inventory += inv_box + + inv_box = new /obj/screen/inventory() + inv_box.name = "head" + inv_box.icon = ui_style + inv_box.icon_state = "head" +// inv_box.icon_full = "template" + inv_box.screen_loc = ui_monkey_head + inv_box.slot_id = SLOT_HEAD + static_inventory += inv_box + + inv_box = new /obj/screen/inventory() + inv_box.name = "back" + inv_box.icon = ui_style + inv_box.icon_state = "back" + inv_box.screen_loc = ui_monkey_back + inv_box.slot_id = SLOT_BACK + static_inventory += inv_box + + throw_icon = new /obj/screen/throw_catch() + throw_icon.icon = ui_style + throw_icon.screen_loc = ui_drop_throw + hotkeybuttons += throw_icon + + internals = new /obj/screen/internals() + infodisplay += internals + + healths = new /obj/screen/healths() + infodisplay += healths + + pull_icon = new /obj/screen/pull() + pull_icon.icon = ui_style + pull_icon.update_icon(mymob) + pull_icon.screen_loc = ui_pull_resist + static_inventory += pull_icon + + lingchemdisplay = new /obj/screen/ling/chems() + infodisplay += lingchemdisplay + + lingstingdisplay = new /obj/screen/ling/sting() + infodisplay += lingstingdisplay + + + zone_select = new /obj/screen/zone_sel() + zone_select.icon = ui_style + zone_select.update_icon(mymob) + static_inventory += zone_select + + mymob.client.screen = list() + + using = new /obj/screen/resist() + using.icon = ui_style + using.screen_loc = ui_pull_resist + hotkeybuttons += using + + for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory)) + if(inv.slot_id) + inv.hud = src + inv_slots[inv.slot_id] = inv + inv.update_icon() + +/datum/hud/monkey/persistent_inventory_update() + if(!mymob) + return + var/mob/living/carbon/monkey/M = mymob + + if(hud_shown) + if(M.back) + M.back.screen_loc = ui_monkey_back + M.client.screen += M.back + if(M.wear_mask) + M.wear_mask.screen_loc = ui_monkey_mask + M.client.screen += M.wear_mask + if(M.wear_neck) + M.wear_neck.screen_loc = ui_monkey_neck + M.client.screen += M.wear_neck + if(M.head) + M.head.screen_loc = ui_monkey_head + M.client.screen += M.head + else + if(M.back) + M.back.screen_loc = null + if(M.wear_mask) + M.wear_mask.screen_loc = null + if(M.head) + M.head.screen_loc = null + + if(hud_version != HUD_STYLE_NOHUD) + for(var/obj/item/I in M.held_items) + I.screen_loc = ui_hand_position(M.get_held_index_of_item(I)) + M.client.screen += I + else + for(var/obj/item/I in M.held_items) + I.screen_loc = null + M.client.screen -= I + +/mob/living/carbon/monkey/create_mob_hud() + if(client && !hud_used) + hud_used = new /datum/hud/monkey(src, ui_style2icon(client.prefs.UI_style)) +>>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm index eb5f623035..a060cbb834 100644 --- a/code/_onclick/telekinesis.dm +++ b/code/_onclick/telekinesis.dm @@ -99,7 +99,7 @@ //stops TK grabs being equipped anywhere but into hands /obj/item/tk_grab/equipped(mob/user, slot) - if(slot == slot_hands) + if(slot == SLOT_HANDS) return qdel(src) return diff --git a/code/datums/action.dm b/code/datums/action.dm index c5563e9a34..0fd7f2f4bb 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -480,7 +480,7 @@ H.attack_self(owner) return var/obj/item/I = target - if(owner.can_equip(I, slot_hands)) + if(owner.can_equip(I, SLOT_HANDS)) owner.temporarilyRemoveItemFromInventory(I) owner.put_in_hands(I) I.attack_self(owner) diff --git a/code/datums/diseases/_MobProcs.dm b/code/datums/diseases/_MobProcs.dm index 74d4b90493..ba570eca06 100644 --- a/code/datums/diseases/_MobProcs.dm +++ b/code/datums/diseases/_MobProcs.dm @@ -79,8 +79,8 @@ if(isobj(H.wear_suit)) Cl = H.wear_suit passed = prob((Cl.permeability_coefficient*100) - 1) - if(passed && isobj(slot_w_uniform)) - Cl = slot_w_uniform + if(passed && isobj(SLOT_W_UNIFORM)) + Cl = SLOT_W_UNIFORM passed = prob((Cl.permeability_coefficient*100) - 1) if(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM) if(isobj(H.wear_suit) && H.wear_suit.body_parts_covered&HANDS) diff --git a/code/datums/diseases/wizarditis.dm b/code/datums/diseases/wizarditis.dm index cfc848000b..919eaa6e12 100644 --- a/code/datums/diseases/wizarditis.dm +++ b/code/datums/diseases/wizarditis.dm @@ -61,19 +61,19 @@ STI KALY - blind if(!istype(H.head, /obj/item/clothing/head/wizard)) if(!H.dropItemToGround(H.head)) qdel(H.head) - H.equip_to_slot_or_del(new /obj/item/clothing/head/wizard(H), slot_head) + H.equip_to_slot_or_del(new /obj/item/clothing/head/wizard(H), SLOT_HEAD) return if(prob(chance)) if(!istype(H.wear_suit, /obj/item/clothing/suit/wizrobe)) if(!H.dropItemToGround(H.wear_suit)) qdel(H.wear_suit) - H.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe(H), slot_wear_suit) + H.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe(H), SLOT_WEAR_SUIT) return if(prob(chance)) if(!istype(H.shoes, /obj/item/clothing/shoes/sandal/magic)) if(!H.dropItemToGround(H.shoes)) qdel(H.shoes) - H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal/magic(H), slot_shoes) + H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal/magic(H), SLOT_SHOES) return else var/mob/living/carbon/H = affected_mob diff --git a/code/datums/martial/boxing.dm b/code/datums/martial/boxing.dm index 5f97db0827..68b021bc7d 100644 --- a/code/datums/martial/boxing.dm +++ b/code/datums/martial/boxing.dm @@ -53,7 +53,7 @@ /obj/item/clothing/gloves/boxing/equipped(mob/user, slot) if(!ishuman(user)) return - if(slot == slot_gloves) + if(slot == SLOT_GLOVES) var/mob/living/carbon/human/H = user style.teach(H,1) return @@ -62,6 +62,6 @@ if(!ishuman(user)) return var/mob/living/carbon/human/H = user - if(H.get_item_by_slot(slot_gloves) == src) + if(H.get_item_by_slot(SLOT_GLOVES) == src) style.remove(H) return diff --git a/code/datums/martial/krav_maga.dm b/code/datums/martial/krav_maga.dm index 82497adf45..21a82c7b7e 100644 --- a/code/datums/martial/krav_maga.dm +++ b/code/datums/martial/krav_maga.dm @@ -170,7 +170,7 @@ /obj/item/clothing/gloves/krav_maga/equipped(mob/user, slot) if(!ishuman(user)) return - if(slot == slot_gloves) + if(slot == SLOT_GLOVES) var/mob/living/carbon/human/H = user style.teach(H,1) @@ -178,7 +178,7 @@ if(!ishuman(user)) return var/mob/living/carbon/human/H = user - if(H.get_item_by_slot(slot_gloves) == src) + if(H.get_item_by_slot(SLOT_GLOVES) == src) style.remove(H) /obj/item/clothing/gloves/krav_maga/sec//more obviously named, given to sec diff --git a/code/datums/martial/sleeping_carp.dm b/code/datums/martial/sleeping_carp.dm index 845a7507bd..4c25db4e85 100644 --- a/code/datums/martial/sleeping_carp.dm +++ b/code/datums/martial/sleeping_carp.dm @@ -161,7 +161,7 @@ desc = "A long, tall staff made of polished wood. Traditionally used in ancient old-Earth martial arts. Can be wielded to both kill and incapacitate." force = 10 w_class = WEIGHT_CLASS_BULKY - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK force_unwielded = 10 force_wielded = 24 throwforce = 20 diff --git a/code/datums/martial/wrestling.dm b/code/datums/martial/wrestling.dm index 8ac7e76cdb..62a03af933 100644 --- a/code/datums/martial/wrestling.dm +++ b/code/datums/martial/wrestling.dm @@ -448,7 +448,7 @@ /obj/item/storage/belt/champion/wrestling/equipped(mob/user, slot) if(!ishuman(user)) return - if(slot == slot_belt) + if(slot == SLOT_BELT) var/mob/living/carbon/human/H = user style.teach(H,1) return @@ -457,6 +457,6 @@ if(!ishuman(user)) return var/mob/living/carbon/human/H = user - if(H.get_item_by_slot(slot_belt) == src) + if(H.get_item_by_slot(SLOT_BELT) == src) style.remove(H) return diff --git a/code/datums/outfit.dm b/code/datums/outfit.dm index e5e13f597f..90feeacb79 100755 --- a/code/datums/outfit.dm +++ b/code/datums/outfit.dm @@ -39,31 +39,31 @@ //Start with uniform,suit,backpack for additional slots if(uniform) - H.equip_to_slot_or_del(new uniform(H),slot_w_uniform) + H.equip_to_slot_or_del(new uniform(H),SLOT_W_UNIFORM) if(suit) - H.equip_to_slot_or_del(new suit(H),slot_wear_suit) + H.equip_to_slot_or_del(new suit(H),SLOT_WEAR_SUIT) if(back) - H.equip_to_slot_or_del(new back(H),slot_back) + H.equip_to_slot_or_del(new back(H),SLOT_BACK) if(belt) - H.equip_to_slot_or_del(new belt(H),slot_belt) + H.equip_to_slot_or_del(new belt(H),SLOT_BELT) if(gloves) - H.equip_to_slot_or_del(new gloves(H),slot_gloves) + H.equip_to_slot_or_del(new gloves(H),SLOT_GLOVES) if(shoes) - H.equip_to_slot_or_del(new shoes(H),slot_shoes) + H.equip_to_slot_or_del(new shoes(H),SLOT_SHOES) if(head) - H.equip_to_slot_or_del(new head(H),slot_head) + H.equip_to_slot_or_del(new head(H),SLOT_HEAD) if(mask) - H.equip_to_slot_or_del(new mask(H),slot_wear_mask) + H.equip_to_slot_or_del(new mask(H),SLOT_WEAR_MASK) if(neck) - H.equip_to_slot_or_del(new neck(H),slot_neck) + H.equip_to_slot_or_del(new neck(H),SLOT_NECK) if(ears) - H.equip_to_slot_or_del(new ears(H),slot_ears) + H.equip_to_slot_or_del(new ears(H),SLOT_EARS) if(glasses) - H.equip_to_slot_or_del(new glasses(H),slot_glasses) + H.equip_to_slot_or_del(new glasses(H),SLOT_GLASSES) if(id) - H.equip_to_slot_or_del(new id(H),slot_wear_id) + H.equip_to_slot_or_del(new id(H),SLOT_WEAR_ID) if(suit_store) - H.equip_to_slot_or_del(new suit_store(H),slot_s_store) + H.equip_to_slot_or_del(new suit_store(H),SLOT_S_STORE) if(accessory) var/obj/item/clothing/under/U = H.w_uniform @@ -79,16 +79,16 @@ if(!visualsOnly) // Items in pockets or backpack don't show up on mob's icon. if(l_pocket) - H.equip_to_slot_or_del(new l_pocket(H),slot_l_store) + H.equip_to_slot_or_del(new l_pocket(H),SLOT_L_STORE) if(r_pocket) - H.equip_to_slot_or_del(new r_pocket(H),slot_r_store) + H.equip_to_slot_or_del(new r_pocket(H),SLOT_R_STORE) if(backpack_contents) for(var/path in backpack_contents) var/number = backpack_contents[path] if(!isnum(number))//Default to 1 number = 1 for(var/i in 1 to number) - H.equip_to_slot_or_del(new path(H),slot_in_backpack) + H.equip_to_slot_or_del(new path(H),SLOT_IN_BACKPACK) if(!H.head && toggle_helmet && istype(H.wear_suit, /obj/item/clothing/suit/space/hardsuit)) var/obj/item/clothing/suit/space/hardsuit/HS = H.wear_suit diff --git a/code/datums/traits/_trait.dm b/code/datums/traits/_trait.dm index 96f6857970..0420cd4317 100644 --- a/code/datums/traits/_trait.dm +++ b/code/datums/traits/_trait.dm @@ -120,7 +120,7 @@ Use this as a guideline var/mob/living/carbon/human/H = trait_holder var/obj/item/clothing/glasses/regular/glasses = new(get_turf(H)) H.put_in_hands(glasses) - H.equip_to_slot(glasses, slot_glasses) + H.equip_to_slot(glasses, SLOT_GLASSES) H.regenerate_icons() //This whole proc is called automatically diff --git a/code/datums/traits/negative.dm b/code/datums/traits/negative.dm index 57284a2558..94a8a7e33d 100644 --- a/code/datums/traits/negative.dm +++ b/code/datums/traits/negative.dm @@ -58,9 +58,9 @@ /obj/item/dice/d20) heirloom = new heirloom_type(get_turf(trait_holder)) var/list/slots = list( - "in your backpack" = slot_in_backpack, - "in your left pocket" = slot_l_store, - "in your right pocket" = slot_r_store + "in your backpack" = SLOT_IN_BACKPACK, + "in your left pocket" = SLOT_L_STORE, + "in your right pocket" = SLOT_R_STORE ) var/where = H.equip_in_one_of_slots(heirloom, slots) if(!where) @@ -121,7 +121,7 @@ var/mob/living/carbon/human/H = trait_holder var/obj/item/clothing/glasses/regular/glasses = new(get_turf(H)) H.put_in_hands(glasses) - H.equip_to_slot(glasses, slot_glasses) + H.equip_to_slot(glasses, SLOT_GLASSES) H.regenerate_icons() //this is to remove the inhand icon, which persists even if it's not in their hands diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm index a77bf196c2..93d77209e0 100644 --- a/code/game/gamemodes/changeling/changeling.dm +++ b/code/game/gamemodes/changeling/changeling.dm @@ -1,6 +1,6 @@ GLOBAL_LIST_INIT(possible_changeling_IDs, list("Alpha","Beta","Gamma","Delta","Epsilon","Zeta","Eta","Theta","Iota","Kappa","Lambda","Mu","Nu","Xi","Omicron","Pi","Rho","Sigma","Tau","Upsilon","Phi","Chi","Psi","Omega")) GLOBAL_LIST_INIT(slots, list("head", "wear_mask", "back", "wear_suit", "w_uniform", "shoes", "belt", "gloves", "glasses", "ears", "wear_id", "s_store")) -GLOBAL_LIST_INIT(slot2slot, list("head" = slot_head, "wear_mask" = slot_wear_mask, "neck" = slot_neck, "back" = slot_back, "wear_suit" = slot_wear_suit, "w_uniform" = slot_w_uniform, "shoes" = slot_shoes, "belt" = slot_belt, "gloves" = slot_gloves, "glasses" = slot_glasses, "ears" = slot_ears, "wear_id" = slot_wear_id, "s_store" = slot_s_store)) +GLOBAL_LIST_INIT(slot2slot, list("head" = SLOT_HEAD, "wear_mask" = SLOT_WEAR_MASK, "neck" = SLOT_NECK, "back" = SLOT_BACK, "wear_suit" = SLOT_WEAR_SUIT, "w_uniform" = SLOT_W_UNIFORM, "shoes" = SLOT_SHOES, "belt" = SLOT_BELT, "gloves" = SLOT_GLOVES, "glasses" = SLOT_GLASSES, "ears" = SLOT_EARS, "wear_id" = SLOT_WEAR_ID, "s_store" = SLOT_S_STORE)) GLOBAL_LIST_INIT(slot2type, list("head" = /obj/item/clothing/head/changeling, "wear_mask" = /obj/item/clothing/mask/changeling, "back" = /obj/item/changeling, "wear_suit" = /obj/item/clothing/suit/changeling, "w_uniform" = /obj/item/clothing/under/changeling, "shoes" = /obj/item/clothing/shoes/changeling, "belt" = /obj/item/changeling, "gloves" = /obj/item/clothing/gloves/changeling, "glasses" = /obj/item/clothing/glasses/changeling, "ears" = /obj/item/changeling, "wear_id" = /obj/item/changeling, "s_store" = /obj/item/changeling)) GLOBAL_VAR(changeling_team_objective_type) //If this is not null, we hand our this objective to all lings diff --git a/code/game/gamemodes/clock_cult/clock_cult.dm b/code/game/gamemodes/clock_cult/clock_cult.dm index f403908f67..397016e377 100644 --- a/code/game/gamemodes/clock_cult/clock_cult.dm +++ b/code/game/gamemodes/clock_cult/clock_cult.dm @@ -198,7 +198,7 @@ Credit where due: L.equipOutfit(/datum/outfit/servant_of_ratvar) var/obj/item/clockwork/slab/S = new var/slot = "At your feet" - var/list/slots = list("In your left pocket" = slot_l_store, "In your right pocket" = slot_r_store, "In your backpack" = slot_in_backpack, "On your belt" = slot_belt) + var/list/slots = list("In your left pocket" = SLOT_L_STORE, "In your right pocket" = SLOT_R_STORE, "In your backpack" = SLOT_IN_BACKPACK, "On your belt" = SLOT_BELT) if(ishuman(L)) var/mob/living/carbon/human/H = L slot = H.equip_in_one_of_slots(S, slots) diff --git a/code/game/gamemodes/clown_ops/bananium_bomb.dm b/code/game/gamemodes/clown_ops/bananium_bomb.dm index 86db2e94f9..c7212a671c 100644 --- a/code/game/gamemodes/clown_ops/bananium_bomb.dm +++ b/code/game/gamemodes/clown_ops/bananium_bomb.dm @@ -43,17 +43,17 @@ if(!H.w_uniform || H.dropItemToGround(H.w_uniform)) C = new /obj/item/clothing/under/rank/clown(H) C.flags_1 |= NODROP_1 //mwahaha - H.equip_to_slot_or_del(C, slot_w_uniform) + H.equip_to_slot_or_del(C, SLOT_W_UNIFORM) if(!H.shoes || H.dropItemToGround(H.shoes)) C = new /obj/item/clothing/shoes/clown_shoes(H) C.flags_1 |= NODROP_1 - H.equip_to_slot_or_del(C, slot_shoes) + H.equip_to_slot_or_del(C, SLOT_SHOES) if(!H.wear_mask || H.dropItemToGround(H.wear_mask)) C = new /obj/item/clothing/mask/gas/clown_hat(H) C.flags_1 |= NODROP_1 - H.equip_to_slot_or_del(C, slot_wear_mask) + H.equip_to_slot_or_del(C, SLOT_WEAR_MASK) H.dna.add_mutation(CLOWNMUT) H.gain_trauma(/datum/brain_trauma/mild/phobia, TRAUMA_RESILIENCE_LOBOTOMY, "clowns") //MWA HA HA diff --git a/code/game/gamemodes/clown_ops/clown_weapons.dm b/code/game/gamemodes/clown_ops/clown_weapons.dm index 6488a98d7d..594fa5a38f 100644 --- a/code/game/gamemodes/clown_ops/clown_weapons.dm +++ b/code/game/gamemodes/clown_ops/clown_weapons.dm @@ -209,7 +209,7 @@ if(!istype(M.wear_mask, /obj/item/clothing/mask/gas/clown_hat) && !istype(M.wear_mask, /obj/item/clothing/mask/gas/mime) ) if(!M.wear_mask || M.dropItemToGround(M.wear_mask)) var/obj/item/clothing/mask/fakemoustache/sticky/the_stash = new /obj/item/clothing/mask/fakemoustache/sticky() - M.equip_to_slot_or_del(the_stash, slot_wear_mask, TRUE, TRUE, TRUE, TRUE) + M.equip_to_slot_or_del(the_stash, SLOT_WEAR_MASK, TRUE, TRUE, TRUE, TRUE) /obj/item/clothing/mask/fakemoustache/sticky var/unstick_time = 600 diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index 11e4815722..68c9fd2b01 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -154,8 +154,13 @@ R.command = TRUE if(tc) +<<<<<<< HEAD var/obj/item/device/radio/uplink/U = new uplink_type(H, H.key, tc) H.equip_to_slot_or_del(U, slot_in_backpack) +======= + var/obj/item/radio/uplink/U = new uplink_type(H, H.key, tc) + H.equip_to_slot_or_del(U, SLOT_IN_BACKPACK) +>>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme var/obj/item/implant/weapons_auth/W = new/obj/item/implant/weapons_auth(H) W.implant(H) @@ -171,7 +176,7 @@ mask = /obj/item/clothing/mask/gas/syndicate suit = /obj/item/clothing/suit/space/hardsuit/syndi r_pocket = /obj/item/tank/internals/emergency_oxygen/engi - internals_slot = slot_r_store + internals_slot = SLOT_R_STORE belt = /obj/item/storage/belt/military r_hand = /obj/item/gun/ballistic/automatic/shotgun/bulldog backpack_contents = list(/obj/item/storage/box/syndie=1,\ diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 8c162c600e..14dca48b27 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -114,7 +114,7 @@ GLOBAL_LIST_EMPTY(objectives) if(receiver && receiver.current) if(ishuman(receiver.current)) var/mob/living/carbon/human/H = receiver.current - var/list/slots = list("backpack" = slot_in_backpack) + var/list/slots = list("backpack" = SLOT_IN_BACKPACK) for(var/eq_path in special_equipment) var/obj/O = new eq_path H.equip_in_one_of_slots(O, slots) diff --git a/code/game/machinery/launch_pad.dm b/code/game/machinery/launch_pad.dm index f50f409463..12163c7fd7 100644 --- a/code/game/machinery/launch_pad.dm +++ b/code/game/machinery/launch_pad.dm @@ -245,7 +245,7 @@ icon = 'icons/obj/telescience.dmi' icon_state = "blpad-remote" w_class = WEIGHT_CLASS_SMALL - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT var/sending = TRUE var/obj/machinery/launchpad/briefcase/pad diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 46a6d961d4..072c5da877 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -385,7 +385,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) //sometimes we only want to grant the item's action if it's equipped in a specific slot. /obj/item/proc/item_action_slot_check(slot, mob/user) - if(slot == slot_in_backpack || slot == slot_legcuffed) //these aren't true slots, so avoid granting actions there + if(slot == SLOT_IN_BACKPACK || slot == SLOT_LEGCUFFED) //these aren't true slots, so avoid granting actions there return FALSE return TRUE @@ -549,29 +549,29 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) return var/mob/owner = loc var/flags = slot_flags - if(flags & SLOT_OCLOTHING) + if(flags & ITEM_SLOT_OCLOTHING) owner.update_inv_wear_suit() - if(flags & SLOT_ICLOTHING) + if(flags & ITEM_SLOT_ICLOTHING) owner.update_inv_w_uniform() - if(flags & SLOT_GLOVES) + if(flags & ITEM_SLOT_GLOVES) owner.update_inv_gloves() - if(flags & SLOT_EYES) + if(flags & ITEM_SLOT_EYES) owner.update_inv_glasses() - if(flags & SLOT_EARS) + if(flags & ITEM_SLOT_EARS) owner.update_inv_ears() - if(flags & SLOT_MASK) + if(flags & ITEM_SLOT_MASK) owner.update_inv_wear_mask() - if(flags & SLOT_HEAD) + if(flags & ITEM_SLOT_HEAD) owner.update_inv_head() - if(flags & SLOT_FEET) + if(flags & ITEM_SLOT_FEET) owner.update_inv_shoes() - if(flags & SLOT_ID) + if(flags & ITEM_SLOT_ID) owner.update_inv_wear_id() - if(flags & SLOT_BELT) + if(flags & ITEM_SLOT_BELT) owner.update_inv_belt() - if(flags & SLOT_BACK) + if(flags & ITEM_SLOT_BACK) owner.update_inv_back() - if(flags & SLOT_NECK) + if(flags & ITEM_SLOT_NECK) owner.update_inv_neck() /obj/item/proc/is_hot() @@ -596,7 +596,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) if(ismob(location)) var/mob/M = location var/success = FALSE - if(src == M.get_item_by_slot(slot_wear_mask)) + if(src == M.get_item_by_slot(SLOT_WEAR_MASK)) success = TRUE if(success) location = get_turf(M) diff --git a/code/game/objects/items/airlock_painter.dm b/code/game/objects/items/airlock_painter.dm index 36d2c068c6..2626b9f0ba 100644 --- a/code/game/objects/items/airlock_painter.dm +++ b/code/game/objects/items/airlock_painter.dm @@ -10,7 +10,7 @@ materials = list(MAT_METAL=50, MAT_GLASS=50) flags_1 = CONDUCT_1 | NOBLUDGEON_1 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT usesound = 'sound/effects/spray2.ogg' var/obj/item/device/toner/ink = null diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index 08e6204c63..ea332c77de 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -97,7 +97,7 @@ item_state = "card-id" lefthand_file = 'icons/mob/inhands/equipment/idcards_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/idcards_righthand.dmi' - slot_flags = SLOT_ID + slot_flags = ITEM_SLOT_ID armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100) resistance_flags = FIRE_PROOF | ACID_PROOF var/mining_points = 0 //For redeeming at mining equipment vendors diff --git a/code/game/objects/items/chrono_eraser.dm b/code/game/objects/items/chrono_eraser.dm index 107e4eb5db..d861b515f8 100644 --- a/code/game/objects/items/chrono_eraser.dm +++ b/code/game/objects/items/chrono_eraser.dm @@ -9,7 +9,7 @@ lefthand_file = 'icons/mob/inhands/equipment/backpack_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/backpack_righthand.dmi' w_class = WEIGHT_CLASS_BULKY - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK slowdown = 1 actions_types = list(/datum/action/item_action/equip_unequip_TED_Gun) var/obj/item/gun/energy/chrono_gun/PA = null @@ -38,7 +38,7 @@ user.put_in_hands(PA) /obj/item/chrono_eraser/item_action_slot_check(slot, mob/user) - if(slot == slot_back) + if(slot == SLOT_BACK) return 1 /obj/item/gun/energy/chrono_gun diff --git a/code/game/objects/items/cigs_lighters.dm b/code/game/objects/items/cigs_lighters.dm index 9ecafd7a8a..14a6440371 100644 --- a/code/game/objects/items/cigs_lighters.dm +++ b/code/game/objects/items/cigs_lighters.dm @@ -86,7 +86,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM ..() /obj/item/proc/help_light_cig(mob/living/M) - var/mask_item = M.get_item_by_slot(slot_wear_mask) + var/mask_item = M.get_item_by_slot(SLOT_WEAR_MASK) if(istype(mask_item, /obj/item/clothing/mask/cigarette)) return mask_item @@ -129,7 +129,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM reagents.add_reagent_list(list_reagents) if(starts_lit) light() - AddComponent(/datum/component/knockoff,90,list(BODY_ZONE_PRECISE_MOUTH),list(slot_wear_mask))//90% to knock off when wearing a mask + AddComponent(/datum/component/knockoff,90,list(BODY_ZONE_PRECISE_MOUTH),list(SLOT_WEAR_MASK))//90% to knock off when wearing a mask /obj/item/clothing/mask/cigarette/Destroy() STOP_PROCESSING(SSobj, src) @@ -486,7 +486,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM item_state = "zippo" w_class = WEIGHT_CLASS_TINY flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT var/lit = 0 var/fancy = TRUE heat = 1500 @@ -746,7 +746,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM return /obj/item/clothing/mask/vape/equipped(mob/user, slot) - if(slot == slot_wear_mask) + if(slot == SLOT_WEAR_MASK) if(!screw) to_chat(user, "You start puffing on the vape.") reagents.set_reacting(TRUE) @@ -756,7 +756,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM /obj/item/clothing/mask/vape/dropped(mob/user) var/mob/living/carbon/C = user - if(C.get_item_by_slot(slot_wear_mask) == src) + if(C.get_item_by_slot(SLOT_WEAR_MASK) == src) reagents.set_reacting(FALSE) STOP_PROCESSING(SSobj, src) diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index 47d7b1e525..c5f991192d 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -9,7 +9,7 @@ item_state = "defibunit" lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK force = 5 throwforce = 6 w_class = WEIGHT_CLASS_BULKY @@ -83,14 +83,14 @@ //ATTACK HAND IGNORING PARENT RETURN VALUE /obj/item/defibrillator/attack_hand(mob/user) if(loc == user) - if(slot_flags == SLOT_BACK) - if(user.get_item_by_slot(slot_back) == src) + if(slot_flags == ITEM_SLOT_BACK) + if(user.get_item_by_slot(SLOT_BACK) == src) ui_action_click() else to_chat(user, "Put the defibrillator on your back first!") - else if(slot_flags == SLOT_BELT) - if(user.get_item_by_slot(slot_belt) == src) + else if(slot_flags == ITEM_SLOT_BELT) + if(user.get_item_by_slot(SLOT_BELT) == src) ui_action_click() else to_chat(user, "Strap the defibrillator's belt on first!") @@ -186,7 +186,7 @@ /obj/item/defibrillator/equipped(mob/user, slot) ..() - if((slot_flags == SLOT_BACK && slot != slot_back) || (slot_flags == SLOT_BELT && slot != slot_belt)) + if((slot_flags == ITEM_SLOT_BACK && slot != SLOT_BACK) || (slot_flags == ITEM_SLOT_BELT && slot != SLOT_BELT)) remove_paddles(user) update_icon() @@ -239,7 +239,7 @@ icon_state = "defibcompact" item_state = "defibcompact" w_class = WEIGHT_CLASS_NORMAL - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT /obj/item/defibrillator/compact/item_action_slot_check(slot, mob/user) if(slot == user.getBeltSlot()) diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index c6065cdd8c..8b786cc6a3 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -20,7 +20,7 @@ GLOBAL_LIST_EMPTY(PDAs) righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' flags_1 = NOBLUDGEON_1 w_class = WEIGHT_CLASS_TINY - slot_flags = SLOT_ID | SLOT_BELT + slot_flags = ITEM_SLOT_ID | ITEM_SLOT_BELT armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100) resistance_flags = FIRE_PROOF | ACID_PROOF diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index f9e510bbea..1f4fe7d471 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -7,7 +7,7 @@ lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' w_class = WEIGHT_CLASS_SMALL - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT flags_1 = NOBLUDGEON_1 var/flush = FALSE var/mob/living/silicon/ai/AI diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm index c759eecc82..f9e6239726 100644 --- a/code/game/objects/items/devices/chameleonproj.dm +++ b/code/game/objects/items/devices/chameleonproj.dm @@ -2,7 +2,7 @@ name = "chameleon-projector" icon_state = "shield0" flags_1 = CONDUCT_1 | NOBLUDGEON_1 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT item_state = "electronic" lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 13ceeaedeb..a21c614ea1 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -8,7 +8,7 @@ righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' w_class = WEIGHT_CLASS_SMALL flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT materials = list(MAT_METAL=50, MAT_GLASS=20) actions_types = list(/datum/action/item_action/toggle_light) var/on = FALSE @@ -348,7 +348,7 @@ icon_state = "slime" item_state = "slime" w_class = WEIGHT_CLASS_SMALL - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT materials = list() brightness_on = 6 //luminosity when on diff --git a/code/game/objects/items/devices/forcefieldprojector.dm b/code/game/objects/items/devices/forcefieldprojector.dm index c0b32883e8..24d3b9103f 100644 --- a/code/game/objects/items/devices/forcefieldprojector.dm +++ b/code/game/objects/items/devices/forcefieldprojector.dm @@ -2,7 +2,7 @@ name = "forcefield projector" desc = "An experimental device that can create several forcefields at a distance." icon_state = "signmaker_engi" - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT w_class = WEIGHT_CLASS_SMALL flags_1 = NOBLUDGEON_1 item_state = "electronic" diff --git a/code/game/objects/items/devices/geiger_counter.dm b/code/game/objects/items/devices/geiger_counter.dm index 83cec3c258..3fe1d73e9c 100644 --- a/code/game/objects/items/devices/geiger_counter.dm +++ b/code/game/objects/items/devices/geiger_counter.dm @@ -16,7 +16,7 @@ lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' w_class = WEIGHT_CLASS_SMALL - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT materials = list(MAT_METAL = 150, MAT_GLASS = 150) var/grace = RAD_GRACE_PERIOD diff --git a/code/game/objects/items/devices/gps.dm b/code/game/objects/items/devices/gps.dm index b3e33ec8ba..11de96e0bb 100644 --- a/code/game/objects/items/devices/gps.dm +++ b/code/game/objects/items/devices/gps.dm @@ -5,7 +5,7 @@ GLOBAL_LIST_EMPTY(GPS_list) icon = 'icons/obj/telescience.dmi' icon_state = "gps-c" w_class = WEIGHT_CLASS_SMALL - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT obj_flags = UNIQUE_RENAME var/gpstag = "COM0" var/emped = FALSE diff --git a/code/game/objects/items/devices/instruments.dm b/code/game/objects/items/devices/instruments.dm index 4124f77aeb..06047acad5 100644 --- a/code/game/objects/items/devices/instruments.dm +++ b/code/game/objects/items/devices/instruments.dm @@ -198,7 +198,7 @@ icon_state = "harmonica" item_state = "harmonica" instrumentId = "harmonica" - slot_flags = SLOT_MASK + slot_flags = ITEM_SLOT_MASK force = 5 w_class = WEIGHT_CLASS_SMALL actions_types = list(/datum/action/item_action/instrument) diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm index 098643e87f..d7545c8b53 100644 --- a/code/game/objects/items/devices/laserpointer.dm +++ b/code/game/objects/items/devices/laserpointer.dm @@ -6,7 +6,7 @@ item_state = "pen" var/pointer_icon_state flags_1 = CONDUCT_1 | NOBLUDGEON_1 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT materials = list(MAT_METAL=500, MAT_GLASS=500) w_class = WEIGHT_CLASS_SMALL var/turf/pointer_loc diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm index a1cdfe4a9b..792d7e2e16 100644 --- a/code/game/objects/items/devices/lightreplacer.dm +++ b/code/game/objects/items/devices/lightreplacer.dm @@ -50,7 +50,7 @@ righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT force = 8 var/max_uses = 20 diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm index b96c32f53f..bc6819a7db 100644 --- a/code/game/objects/items/devices/paicard.dm +++ b/code/game/objects/items/devices/paicard.dm @@ -6,7 +6,7 @@ lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' w_class = WEIGHT_CLASS_SMALL - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT var/mob/living/silicon/pai/pai resistance_flags = FIRE_PROOF | ACID_PROOF | INDESTRUCTIBLE diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm index 3e3a760fb3..2e2ace233e 100644 --- a/code/game/objects/items/devices/radio/electropack.dm +++ b/code/game/objects/items/devices/radio/electropack.dm @@ -7,7 +7,7 @@ lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' flags_1 = CONDUCT_1 - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK w_class = WEIGHT_CLASS_HUGE materials = list(MAT_METAL=10000, MAT_GLASS=2500) var/on = TRUE diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index 1362721e1d..2f0b6dc021 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -7,8 +7,13 @@ subspace_transmission = TRUE canhear_range = 0 // can't hear headsets from very far away +<<<<<<< HEAD slot_flags = SLOT_EARS var/obj/item/device/encryptionkey/keyslot2 = null +======= + slot_flags = ITEM_SLOT_EARS + var/obj/item/encryptionkey/keyslot2 = null +>>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme dog_fashion = null /obj/item/device/radio/headset/suicide_act(mob/living/carbon/user) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 1f6f97284b..6d6a749f7d 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -8,7 +8,7 @@ flags_1 = CONDUCT_1 | HEAR_1 flags_2 = NO_EMP_WIRES_2 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT throw_speed = 3 throw_range = 7 w_class = WEIGHT_CLASS_SMALL diff --git a/code/game/objects/items/devices/reverse_bear_trap.dm b/code/game/objects/items/devices/reverse_bear_trap.dm index 0d41b12ccd..088be968c5 100644 --- a/code/game/objects/items/devices/reverse_bear_trap.dm +++ b/code/game/objects/items/devices/reverse_bear_trap.dm @@ -2,7 +2,7 @@ name = "reverse bear trap" desc = "A horrifying set of shut metal jaws, rigged to a kitchen timer and secured by padlock to a head-mounted clamp. To apply, hit someone with it." icon_state = "reverse_bear_trap" - slot_flags = SLOT_HEAD + slot_flags = ITEM_SLOT_HEAD flags_1 = CONDUCT_1 resistance_flags = FIRE_PROOF | UNACIDABLE w_class = WEIGHT_CLASS_NORMAL @@ -47,7 +47,7 @@ /obj/item/device/reverse_bear_trap/attack_hand(mob/user) if(iscarbon(user)) var/mob/living/carbon/C = user - if(C.get_item_by_slot(slot_head) == src) + if(C.get_item_by_slot(SLOT_HEAD) == src) if(flags_1 & NODROP_1 && !struggling) struggling = TRUE var/fear_string @@ -80,27 +80,32 @@ return ..() +<<<<<<< HEAD /obj/item/device/reverse_bear_trap/attack(mob/living/target, mob/living/user) if(target.get_item_by_slot(slot_head)) +======= +/obj/item/reverse_bear_trap/attack(mob/living/target, mob/living/user) + if(target.get_item_by_slot(SLOT_HEAD)) +>>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme to_chat(user, "Remove their headgear first!") return target.visible_message("[user] starts forcing [src] onto [target]'s head!", \ "[target] starts forcing [src] onto your head!", "You hear clanking.") to_chat(user, "You start forcing [src] onto [target]'s head...") - if(!do_after(user, 30, target = target) || target.get_item_by_slot(slot_head)) + if(!do_after(user, 30, target = target) || target.get_item_by_slot(SLOT_HEAD)) return target.visible_message("[user] forces and locks [src] onto [target]'s head!", \ "[target] locks [src] onto your head!", "You hear a click, and then a timer ticking down.") to_chat(user, "You force [src] onto [target]'s head and click the padlock shut.") user.dropItemToGround(src) - target.equip_to_slot_if_possible(src, slot_head) + target.equip_to_slot_if_possible(src, SLOT_HEAD) arm() notify_ghosts("[user] put a reverse bear trap on [target]!", source = src, action = NOTIFY_ORBIT, ghost_sound = 'sound/machines/beep.ogg') /obj/item/device/reverse_bear_trap/proc/snap() reset() var/mob/living/carbon/human/H = loc - if(!istype(H) || H.get_item_by_slot(slot_head) != src) + if(!istype(H) || H.get_item_by_slot(SLOT_HEAD) != src) visible_message("[src]'s jaws snap open with an ear-piercing crack!") playsound(src, 'sound/effects/snap.ogg', 75, TRUE) else diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 2a954302a0..764ab8311c 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -11,7 +11,7 @@ GAS ANALYZER desc = "A terahertz-ray emitter and scanner used to detect underfloor objects such as cables and pipes." icon_state = "t-ray0" var/on = FALSE - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT w_class = WEIGHT_CLASS_SMALL item_state = "electronic" lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' @@ -65,7 +65,7 @@ GAS ANALYZER righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' desc = "A hand-held body scanner able to distinguish vital signs of the subject." flags_1 = CONDUCT_1 | NOBLUDGEON_1 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT throwforce = 3 w_class = WEIGHT_CLASS_TINY throw_speed = 3 @@ -344,7 +344,7 @@ GAS ANALYZER righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' w_class = WEIGHT_CLASS_SMALL flags_1 = CONDUCT_1 | NOBLUDGEON_1 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT throwforce = 0 throw_speed = 3 throw_range = 7 diff --git a/code/game/objects/items/devices/sensor_device.dm b/code/game/objects/items/devices/sensor_device.dm index edfd4368ff..8aed0ea547 100644 --- a/code/game/objects/items/devices/sensor_device.dm +++ b/code/game/objects/items/devices/sensor_device.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/device.dmi' icon_state = "scanner" w_class = WEIGHT_CLASS_SMALL - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT /obj/item/device/sensor_device/attack_self(mob/user) GLOB.crewmonitor.show(user,src) //Proc already exists, just had to call it diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm index bf7a0b8ee8..62fdf62490 100644 --- a/code/game/objects/items/devices/taperecorder.dm +++ b/code/game/objects/items/devices/taperecorder.dm @@ -7,7 +7,7 @@ righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' w_class = WEIGHT_CLASS_SMALL flags_1 = HEAR_1 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT materials = list(MAT_METAL=60, MAT_GLASS=30) force = 2 throwforce = 0 diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm index 2c0e7bd7c4..78bdbfe7dd 100644 --- a/code/game/objects/items/devices/traitordevices.dm +++ b/code/game/objects/items/devices/traitordevices.dm @@ -176,7 +176,7 @@ effective or pretty fucking useless. icon = 'icons/obj/clothing/belts.dmi' icon_state = "utilitybelt" item_state = "utility" - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT attack_verb = list("whipped", "lashed", "disciplined") var/mob/living/carbon/human/user = null @@ -186,16 +186,26 @@ effective or pretty fucking useless. var/old_alpha = 0 actions_types = list(/datum/action/item_action/toggle) +<<<<<<< HEAD /obj/item/device/shadowcloak/ui_action_click(mob/user) if(user.get_item_by_slot(slot_belt) == src) +======= +/obj/item/shadowcloak/ui_action_click(mob/user) + if(user.get_item_by_slot(SLOT_BELT) == src) +>>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme if(!on) Activate(usr) else Deactivate() return +<<<<<<< HEAD /obj/item/device/shadowcloak/item_action_slot_check(slot, mob/user) if(slot == slot_belt) +======= +/obj/item/shadowcloak/item_action_slot_check(slot, mob/user) + if(slot == SLOT_BELT) +>>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme return 1 /obj/item/device/shadowcloak/proc/Activate(mob/living/carbon/human/user) @@ -217,11 +227,16 @@ effective or pretty fucking useless. /obj/item/device/shadowcloak/dropped(mob/user) ..() - if(user && user.get_item_by_slot(slot_belt) != src) + if(user && user.get_item_by_slot(SLOT_BELT) != src) Deactivate() +<<<<<<< HEAD /obj/item/device/shadowcloak/process() if(user.get_item_by_slot(slot_belt) != src) +======= +/obj/item/shadowcloak/process() + if(user.get_item_by_slot(SLOT_BELT) != src) +>>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme Deactivate() return var/turf/T = get_turf(src) diff --git a/code/game/objects/items/granters.dm b/code/game/objects/items/granters.dm index cf11ac7640..13fef58927 100644 --- a/code/game/objects/items/granters.dm +++ b/code/game/objects/items/granters.dm @@ -257,7 +257,7 @@ magichead.voicechange = TRUE //NEEEEIIGHH if(!user.dropItemToGround(user.wear_mask)) qdel(user.wear_mask) - user.equip_to_slot_if_possible(magichead, slot_wear_mask, TRUE, TRUE) + user.equip_to_slot_if_possible(magichead, SLOT_WEAR_MASK, TRUE, TRUE) qdel(src) else to_chat(user,"I say thee neigh") //It still lives here diff --git a/code/game/objects/items/grenades/ghettobomb.dm b/code/game/objects/items/grenades/ghettobomb.dm index 5b96b74f41..d450764702 100644 --- a/code/game/objects/items/grenades/ghettobomb.dm +++ b/code/game/objects/items/grenades/ghettobomb.dm @@ -12,7 +12,7 @@ throw_speed = 3 throw_range = 7 flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT active = 0 det_time = 50 display_timer = 0 diff --git a/code/game/objects/items/grenades/grenade.dm b/code/game/objects/items/grenades/grenade.dm index 929c649e4d..6a08777e61 100644 --- a/code/game/objects/items/grenades/grenade.dm +++ b/code/game/objects/items/grenades/grenade.dm @@ -10,7 +10,7 @@ throw_speed = 3 throw_range = 7 flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT resistance_flags = FLAMMABLE max_integrity = 40 var/active = 0 diff --git a/code/game/objects/items/grenades/smokebomb.dm b/code/game/objects/items/grenades/smokebomb.dm index f5a27cf5c8..5b2ab3aede 100644 --- a/code/game/objects/items/grenades/smokebomb.dm +++ b/code/game/objects/items/grenades/smokebomb.dm @@ -1,3 +1,4 @@ +<<<<<<< HEAD /obj/item/grenade/smokebomb name = "smoke grenade" desc = "The word 'Dank' is scribbled on it in crayon." @@ -29,3 +30,36 @@ B.take_damage(damage, BURN, "melee", 0) sleep(80) qdel(src) +======= +/obj/item/grenade/smokebomb + name = "smoke grenade" + desc = "The word 'Dank' is scribbled on it in crayon." + icon = 'icons/obj/grenade.dmi' + icon_state = "smokewhite" + det_time = 20 + item_state = "flashbang" + slot_flags = ITEM_SLOT_BELT + var/datum/effect_system/smoke_spread/bad/smoke + +/obj/item/grenade/smokebomb/New() + ..() + src.smoke = new /datum/effect_system/smoke_spread/bad + src.smoke.attach(src) + +/obj/item/grenade/smokebomb/Destroy() + qdel(smoke) + return ..() + +/obj/item/grenade/smokebomb/prime() + update_mob() + playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3) + smoke.set_up(4, src) + smoke.start() + + + for(var/obj/structure/blob/B in view(8,src)) + var/damage = round(30/(get_dist(B,src)+1)) + B.take_damage(damage, BURN, "melee", 0) + sleep(80) + qdel(src) +>>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme diff --git a/code/game/objects/items/handcuffs.dm b/code/game/objects/items/handcuffs.dm index 09abc25cc1..735bcaeb27 100644 --- a/code/game/objects/items/handcuffs.dm +++ b/code/game/objects/items/handcuffs.dm @@ -29,7 +29,7 @@ lefthand_file = 'icons/mob/inhands/equipment/security_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi' flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT throwforce = 0 w_class = WEIGHT_CLASS_SMALL throw_speed = 3 diff --git a/code/game/objects/items/holy_weapons.dm b/code/game/objects/items/holy_weapons.dm index 13ca2b35d6..560a972ee8 100644 --- a/code/game/objects/items/holy_weapons.dm +++ b/code/game/objects/items/holy_weapons.dm @@ -75,7 +75,7 @@ desc = "It has a mysterious, protective aura." w_class = WEIGHT_CLASS_HUGE force = 5 - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK block_chance = 50 var/shield_icon = "shield-red" @@ -98,7 +98,7 @@ name = "holy claymore" desc = "A weapon fit for a crusade!" w_class = WEIGHT_CLASS_HUGE - slot_flags = SLOT_BACK|SLOT_BELT + slot_flags = ITEM_SLOT_BACK|ITEM_SLOT_BELT block_chance = 30 sharpness = IS_SHARP hitsound = 'sound/weapons/bladeslice.ogg' @@ -118,7 +118,7 @@ inhand_y_dimension = 64 name = "dark blade" desc = "Spread the glory of the dark gods!" - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT hitsound = 'sound/hallucinations/growl1.ogg' /obj/item/nullrod/claymore/chainsaw_sword @@ -126,7 +126,7 @@ item_state = "chainswordon" name = "sacred chainsaw sword" desc = "Suffer not a heretic to live." - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT attack_verb = list("sawed", "torn", "cut", "chopped", "diced") hitsound = 'sound/weapons/chainsawhit.ogg' @@ -135,21 +135,21 @@ item_state = "swordon" name = "force weapon" desc = "The blade glows with the power of faith. Or possibly a battery." - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT /obj/item/nullrod/claymore/katana name = "hanzo steel" desc = "Capable of cutting clean through a holy claymore." icon_state = "katana" item_state = "katana" - slot_flags = SLOT_BELT | SLOT_BACK + slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_BACK /obj/item/nullrod/claymore/multiverse name = "extradimensional blade" desc = "Once the harbinger of an interdimensional war, its sharpness fluctuates wildly." icon_state = "multiverse" item_state = "multiverse" - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT /obj/item/nullrod/claymore/multiverse/attack(mob/living/carbon/M, mob/living/carbon/user) force = rand(1, 30) @@ -161,7 +161,7 @@ icon_state = "swordblue" item_state = "swordblue" desc = "If you strike me down, I shall become more robust than you can possibly imagine." - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT /obj/item/nullrod/claymore/saber/red name = "dark energy sword" @@ -182,7 +182,7 @@ item_state = "sord" lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi' - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT force = 4.13 throwforce = 1 hitsound = 'sound/weapons/bladeslice.ogg' @@ -197,7 +197,7 @@ desc = "Ask not for whom the bell tolls..." w_class = WEIGHT_CLASS_BULKY armour_penetration = 35 - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK sharpness = IS_SHARP attack_verb = list("chopped", "sliced", "cut", "reaped") @@ -279,7 +279,7 @@ item_state = "chainswordon" name = "possessed chainsaw sword" desc = "Suffer not a heretic to live." - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT force = 30 attack_verb = list("sawed", "torn", "cut", "chopped", "diced") hitsound = 'sound/weapons/chainsawhit.ogg' @@ -292,7 +292,7 @@ righthand_file = 'icons/mob/inhands/weapons/hammers_righthand.dmi' name = "relic war hammer" desc = "This war hammer cost the chaplain forty thousand space dollars." - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT w_class = WEIGHT_CLASS_HUGE attack_verb = list("smashed", "bashed", "hammered", "crunched") @@ -330,7 +330,7 @@ force = 16 throwforce = 15 w_class = 4 - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK attack_verb = list("attacked", "smashed", "crushed", "splattered", "cracked") hitsound = 'sound/weapons/blade1.ogg' @@ -350,7 +350,7 @@ item_state = "chain" lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi' - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT attack_verb = list("whipped", "lashed") hitsound = 'sound/weapons/chainhit.ogg' @@ -359,7 +359,7 @@ desc = "The brim of the hat is as sharp as your wit. The edge would hurt almost as much as disproving the existence of God." icon_state = "fedora" item_state = "fedora" - slot_flags = SLOT_HEAD + slot_flags = ITEM_SLOT_HEAD icon = 'icons/obj/clothing/hats.dmi' force = 0 throw_speed = 4 @@ -414,7 +414,7 @@ w_class = WEIGHT_CLASS_BULKY force = 15 block_chance = 40 - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK sharpness = IS_BLUNT hitsound = "swing_hit" attack_verb = list("smashed", "slammed", "whacked", "thwacked") diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm index 0016bf981f..2df0efd12d 100644 --- a/code/game/objects/items/melee/misc.dm +++ b/code/game/objects/items/melee/misc.dm @@ -17,7 +17,7 @@ lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi' flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT force = 10 throwforce = 7 w_class = WEIGHT_CLASS_NORMAL @@ -96,7 +96,7 @@ item_state = "classic_baton" lefthand_file = 'icons/mob/inhands/equipment/security_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi' - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT force = 12 //9 hit crit w_class = WEIGHT_CLASS_NORMAL var/cooldown = 0 @@ -159,7 +159,7 @@ lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi' item_state = null - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT w_class = WEIGHT_CLASS_SMALL item_flags = NONE force = 0 @@ -196,7 +196,7 @@ to_chat(user, "You collapse the baton.") icon_state = "telebaton_0" item_state = null //no sprite for concealment even when in hand - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT w_class = WEIGHT_CLASS_SMALL force = 0 //not so robust now attack_verb = list("hit", "poked") @@ -308,7 +308,7 @@ item_state = "chain" lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi' - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT force = 15 w_class = WEIGHT_CLASS_NORMAL attack_verb = list("flogged", "whipped", "lashed", "disciplined") @@ -326,7 +326,7 @@ desc = "A telescopic roasting stick with a miniature shield generator designed to ensure entry into various high-tech shielded cooking ovens and firepits." icon_state = "roastingstick_0" item_state = "null" - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT w_class = WEIGHT_CLASS_SMALL item_flags = NONE force = 0 diff --git a/code/game/objects/items/pinpointer.dm b/code/game/objects/items/pinpointer.dm index a6d0d285bf..3ca17b01af 100644 --- a/code/game/objects/items/pinpointer.dm +++ b/code/game/objects/items/pinpointer.dm @@ -5,7 +5,7 @@ icon = 'icons/obj/device.dmi' icon_state = "pinpointer" flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT w_class = WEIGHT_CLASS_SMALL item_state = "electronic" lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' diff --git a/code/game/objects/items/shields.dm b/code/game/objects/items/shields.dm index dd8d8f8a10..fb55d92301 100644 --- a/code/game/objects/items/shields.dm +++ b/code/game/objects/items/shields.dm @@ -10,7 +10,7 @@ icon_state = "riot" lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi' - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK force = 10 throwforce = 5 throw_speed = 2 @@ -138,7 +138,7 @@ throwforce = 5 throw_speed = 2 w_class = WEIGHT_CLASS_BULKY - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK to_chat(user, "You extend \the [src].") else force = 3 diff --git a/code/game/objects/items/singularityhammer.dm b/code/game/objects/items/singularityhammer.dm index 5d96213934..11248aad50 100644 --- a/code/game/objects/items/singularityhammer.dm +++ b/code/game/objects/items/singularityhammer.dm @@ -5,7 +5,7 @@ lefthand_file = 'icons/mob/inhands/weapons/hammers_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/hammers_righthand.dmi' flags_1 = CONDUCT_1 - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK force = 5 force_unwielded = 5 force_wielded = 20 @@ -76,7 +76,7 @@ lefthand_file = 'icons/mob/inhands/weapons/hammers_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/hammers_righthand.dmi' flags_1 = CONDUCT_1 - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK force = 5 force_unwielded = 5 force_wielded = 25 diff --git a/code/game/objects/items/storage/backpack.dm b/code/game/objects/items/storage/backpack.dm index a236ebeff6..25606d16d5 100644 --- a/code/game/objects/items/storage/backpack.dm +++ b/code/game/objects/items/storage/backpack.dm @@ -17,7 +17,7 @@ lefthand_file = 'icons/mob/inhands/equipment/backpack_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/backpack_righthand.dmi' w_class = WEIGHT_CLASS_BULKY - slot_flags = SLOT_BACK //ERROOOOO + slot_flags = ITEM_SLOT_BACK //ERROOOOO resistance_flags = NONE max_integrity = 300 diff --git a/code/game/objects/items/storage/bags.dm b/code/game/objects/items/storage/bags.dm index 5c6a354356..a75d0aa0d9 100644 --- a/code/game/objects/items/storage/bags.dm +++ b/code/game/objects/items/storage/bags.dm @@ -17,7 +17,7 @@ // Generic non-item /obj/item/storage/bag - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT /obj/item/storage/bag/ComponentInitialize() . = ..() @@ -94,7 +94,7 @@ desc = "This little bugger can be used to store and transport ores." icon = 'icons/obj/mining.dmi' icon_state = "satchel" - slot_flags = SLOT_BELT | SLOT_POCKET + slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_POCKET w_class = WEIGHT_CLASS_NORMAL component_type = /datum/component/storage/concrete/stack var/spam_protection = FALSE //If this is TRUE, the holder won't receive any messages when they fail to pick up ore through crossing it diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index a4cd9cc739..7b5a30441e 100755 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -6,7 +6,7 @@ item_state = "utility" lefthand_file = 'icons/mob/inhands/equipment/belt_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/belt_righthand.dmi' - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT attack_verb = list("whipped", "lashed", "disciplined") max_integrity = 300 var/content_overlays = FALSE //If this is true, the belt will gain overlays based on what it's holding diff --git a/code/game/objects/items/storage/book.dm b/code/game/objects/items/storage/book.dm index 41f2a4bf47..7a44282d77 100644 --- a/code/game/objects/items/storage/book.dm +++ b/code/game/objects/items/storage/book.dm @@ -74,7 +74,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible", if(B.icon_state == "honk1" || B.icon_state == "honk2") var/mob/living/carbon/human/H = usr H.dna.add_mutation(CLOWNMUT) - H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(H), slot_wear_mask) + H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(H), SLOT_WEAR_MASK) SSreligion.bible_icon_state = B.icon_state SSreligion.bible_item_state = B.item_state diff --git a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm index d244e512c3..12e851a4a4 100644 --- a/code/game/objects/items/storage/boxes.dm +++ b/code/game/objects/items/storage/boxes.dm @@ -544,7 +544,7 @@ icon_state = "matchbox" item_state = "zippo" w_class = WEIGHT_CLASS_TINY - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT /obj/item/storage/box/matches/ComponentInitialize() . = ..() diff --git a/code/game/objects/items/storage/fancy.dm b/code/game/objects/items/storage/fancy.dm index d669431be5..6337709eaa 100644 --- a/code/game/objects/items/storage/fancy.dm +++ b/code/game/objects/items/storage/fancy.dm @@ -109,7 +109,7 @@ icon_type = "candle" item_state = "candlebox5" throwforce = 2 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT spawn_type = /obj/item/candle fancy_open = TRUE @@ -132,7 +132,7 @@ item_state = "cigpacket" w_class = WEIGHT_CLASS_TINY throwforce = 0 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT icon_type = "cigarette" spawn_type = /obj/item/clothing/mask/cigarette/space_cigarette @@ -189,7 +189,7 @@ if(M == user && contents.len > 0 && !user.wear_mask) var/obj/item/clothing/mask/cigarette/W = cig SendSignal(COMSIG_TRY_STORAGE_TAKE, W, M) - M.equip_to_slot_if_possible(W, slot_wear_mask) + M.equip_to_slot_if_possible(W, SLOT_WEAR_MASK) contents -= W to_chat(user, "You take a [icon_type] out of the pack.") else diff --git a/code/game/objects/items/storage/toolbox.dm b/code/game/objects/items/storage/toolbox.dm index bea6b6de47..541c441500 100644 --- a/code/game/objects/items/storage/toolbox.dm +++ b/code/game/objects/items/storage/toolbox.dm @@ -168,7 +168,7 @@ new /obj/item/weldingtool/experimental/brass(src) /obj/item/storage/toolbox/brass/prefilled/servant - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT fabricator_type = null /obj/item/storage/toolbox/brass/prefilled/ratvar diff --git a/code/game/objects/items/storage/wallets.dm b/code/game/objects/items/storage/wallets.dm index fa649fddc6..8569697a50 100644 --- a/code/game/objects/items/storage/wallets.dm +++ b/code/game/objects/items/storage/wallets.dm @@ -1,3 +1,4 @@ +<<<<<<< HEAD /obj/item/storage/wallet name = "wallet" desc = "It can hold a few small and personal things." @@ -89,3 +90,96 @@ if(item3_type) new item3_type(src) update_icon() +======= +/obj/item/storage/wallet + name = "wallet" + desc = "It can hold a few small and personal things." + icon_state = "wallet" + w_class = WEIGHT_CLASS_SMALL + resistance_flags = FLAMMABLE + slot_flags = ITEM_SLOT_ID + + var/obj/item/card/id/front_id = null + var/list/combined_access + +/obj/item/storage/wallet/ComponentInitialize() + . = ..() + GET_COMPONENT(STR, /datum/component/storage) + STR.max_items = 4 + STR.can_hold = typecacheof(list( + /obj/item/stack/spacecash, + /obj/item/card, + /obj/item/clothing/mask/cigarette, + /obj/item/flashlight/pen, + /obj/item/seeds, + /obj/item/stack/medical, + /obj/item/toy/crayon, + /obj/item/coin, + /obj/item/dice, + /obj/item/disk, + /obj/item/implanter, + /obj/item/lighter, + /obj/item/lipstick, + /obj/item/match, + /obj/item/paper, + /obj/item/pen, + /obj/item/photo, + /obj/item/reagent_containers/dropper, + /obj/item/reagent_containers/syringe, + /obj/item/screwdriver, + /obj/item/stamp)) + +/obj/item/storage/wallet/Exited(atom/movable/AM) + . = ..() + refreshID() + +/obj/item/storage/wallet/proc/refreshID() + if(!(front_id in src)) + front_id = null + for(var/obj/item/card/id/I in contents) + LAZYINITLIST(combined_access) + LAZYCLEARLIST(combined_access) + if(!front_id) + front_id = I + combined_access |= I.access + update_icon() + +/obj/item/storage/wallet/Entered(atom/movable/AM) + . = ..() + refreshID() + +/obj/item/storage/wallet/update_icon() + var/new_state = "wallet" + if(front_id) + new_state = "wallet_[front_id.icon_state]" + if(new_state != icon_state) //avoid so many icon state changes. + icon_state = new_state + +/obj/item/storage/wallet/GetID() + return front_id + +/obj/item/storage/wallet/GetAccess() + if(LAZYLEN(combined_access)) + return combined_access + else + return ..() + +/obj/item/storage/wallet/random + icon_state = "random_wallet" + +/obj/item/storage/wallet/random/PopulateContents() + var/item1_type = pick( /obj/item/stack/spacecash/c10, /obj/item/stack/spacecash/c100, /obj/item/stack/spacecash/c1000, /obj/item/stack/spacecash/c20, /obj/item/stack/spacecash/c200, /obj/item/stack/spacecash/c50, /obj/item/stack/spacecash/c500) + var/item2_type + if(prob(50)) + item2_type = pick( /obj/item/stack/spacecash/c10, /obj/item/stack/spacecash/c100, /obj/item/stack/spacecash/c1000, /obj/item/stack/spacecash/c20, /obj/item/stack/spacecash/c200, /obj/item/stack/spacecash/c50, /obj/item/stack/spacecash/c500) + var/item3_type = pick( /obj/item/coin/silver, /obj/item/coin/silver, /obj/item/coin/gold, /obj/item/coin/iron, /obj/item/coin/iron, /obj/item/coin/iron ) + + spawn(2) + if(item1_type) + new item1_type(src) + if(item2_type) + new item2_type(src) + if(item3_type) + new item3_type(src) + update_icon() +>>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme diff --git a/code/game/objects/items/stunbaton.dm b/code/game/objects/items/stunbaton.dm index 95c68109bb..ee46147a10 100644 --- a/code/game/objects/items/stunbaton.dm +++ b/code/game/objects/items/stunbaton.dm @@ -5,7 +5,7 @@ item_state = "baton" lefthand_file = 'icons/mob/inhands/equipment/security_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi' - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT force = 10 throwforce = 7 w_class = WEIGHT_CLASS_NORMAL @@ -195,8 +195,13 @@ stunforce = 100 hitcost = 2000 throw_hit_chance = 10 +<<<<<<< HEAD slot_flags = SLOT_BACK var/obj/item/device/assembly/igniter/sparkler = 0 +======= + slot_flags = ITEM_SLOT_BACK + var/obj/item/assembly/igniter/sparkler = 0 +>>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme /obj/item/melee/baton/cattleprod/Initialize() . = ..() diff --git a/code/game/objects/items/tanks/tank_types.dm b/code/game/objects/items/tanks/tank_types.dm index 4a687b458d..f4eb763847 100644 --- a/code/game/objects/items/tanks/tank_types.dm +++ b/code/game/objects/items/tanks/tank_types.dm @@ -137,7 +137,7 @@ /obj/item/tank/internals/plasmaman/belt icon_state = "plasmaman_tank_belt" item_state = "plasmaman_tank_belt" - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT force = 5 volume = 6 w_class = WEIGHT_CLASS_SMALL //thanks i forgot this @@ -157,7 +157,7 @@ desc = "Used for emergencies. Contains very little oxygen, so try to conserve it until you actually need it." icon_state = "emergency" flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT w_class = WEIGHT_CLASS_SMALL force = 4 distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE diff --git a/code/game/objects/items/tanks/tanks.dm b/code/game/objects/items/tanks/tanks.dm index 2e512c3ec4..f3f0ad4825 100644 --- a/code/game/objects/items/tanks/tanks.dm +++ b/code/game/objects/items/tanks/tanks.dm @@ -4,7 +4,7 @@ lefthand_file = 'icons/mob/inhands/equipment/tanks_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/tanks_righthand.dmi' flags_1 = CONDUCT_1 - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK hitsound = 'sound/weapons/smash.ogg' pressure_resistance = ONE_ATMOSPHERE * 5 force = 5 diff --git a/code/game/objects/items/tanks/watertank.dm b/code/game/objects/items/tanks/watertank.dm index 5c7df452f0..0b1c2fba5c 100644 --- a/code/game/objects/items/tanks/watertank.dm +++ b/code/game/objects/items/tanks/watertank.dm @@ -6,7 +6,7 @@ icon_state = "waterbackpack" item_state = "waterbackpack" w_class = WEIGHT_CLASS_BULKY - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK slowdown = 1 actions_types = list(/datum/action/item_action/toggle_mister) max_integrity = 200 @@ -60,7 +60,7 @@ /obj/item/watertank/equipped(mob/user, slot) ..() - if(slot != slot_back) + if(slot != SLOT_BACK) remove_noz() /obj/item/watertank/proc/remove_noz() @@ -344,7 +344,7 @@ icon_state = "waterbackpackatmos" item_state = "waterbackpackatmos" w_class = WEIGHT_CLASS_BULKY - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK slowdown = 1 actions_types = list(/datum/action/item_action/activate_injector) @@ -361,14 +361,14 @@ toggle_injection() /obj/item/reagent_containers/chemtank/item_action_slot_check(slot, mob/user) - if(slot == slot_back) + if(slot == SLOT_BACK) return 1 /obj/item/reagent_containers/chemtank/proc/toggle_injection() var/mob/living/carbon/human/user = usr if(!istype(user)) return - if (user.get_item_by_slot(slot_back) != src) + if (user.get_item_by_slot(SLOT_BACK) != src) to_chat(user, "The chemtank needs to be on your back before you can activate it!") return if(on) diff --git a/code/game/objects/items/tools/crowbar.dm b/code/game/objects/items/tools/crowbar.dm index ed6233a0b6..0684da08b2 100644 --- a/code/game/objects/items/tools/crowbar.dm +++ b/code/game/objects/items/tools/crowbar.dm @@ -7,7 +7,7 @@ righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' usesound = 'sound/items/crowbar.ogg' flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT force = 5 throwforce = 7 w_class = WEIGHT_CLASS_SMALL diff --git a/code/game/objects/items/tools/screwdriver.dm b/code/game/objects/items/tools/screwdriver.dm index 56537e703a..a29c103fda 100644 --- a/code/game/objects/items/tools/screwdriver.dm +++ b/code/game/objects/items/tools/screwdriver.dm @@ -7,7 +7,7 @@ lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT force = 5 w_class = WEIGHT_CLASS_TINY throwforce = 5 diff --git a/code/game/objects/items/tools/weldingtool.dm b/code/game/objects/items/tools/weldingtool.dm index dc496187bc..133cbfaccb 100644 --- a/code/game/objects/items/tools/weldingtool.dm +++ b/code/game/objects/items/tools/weldingtool.dm @@ -1,3 +1,4 @@ +<<<<<<< HEAD #define WELDER_FUEL_BURN_INTERVAL 13 /obj/item/weldingtool name = "welding tool" @@ -370,3 +371,377 @@ reagents.add_reagent("welding_fuel", 1) #undef WELDER_FUEL_BURN_INTERVAL +======= +#define WELDER_FUEL_BURN_INTERVAL 13 +/obj/item/weldingtool + name = "welding tool" + desc = "A standard edition welder provided by Nanotrasen." + icon = 'icons/obj/tools.dmi' + icon_state = "welder" + item_state = "welder" + lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' + flags_1 = CONDUCT_1 + slot_flags = ITEM_SLOT_BELT + force = 3 + throwforce = 5 + hitsound = "swing_hit" + usesound = list('sound/items/welder.ogg', 'sound/items/welder2.ogg') + var/acti_sound = 'sound/items/welderactivate.ogg' + var/deac_sound = 'sound/items/welderdeactivate.ogg' + throw_speed = 3 + throw_range = 5 + w_class = WEIGHT_CLASS_SMALL + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30) + resistance_flags = FIRE_PROOF + + materials = list(MAT_METAL=70, MAT_GLASS=30) + var/welding = 0 //Whether or not the welding tool is off(0), on(1) or currently welding(2) + var/status = TRUE //Whether the welder is secured or unsecured (able to attach rods to it to make a flamethrower) + var/max_fuel = 20 //The max amount of fuel the welder can hold + var/change_icons = 1 + var/can_off_process = 0 + var/light_intensity = 2 //how powerful the emitted light is when used. + var/progress_flash_divisor = 10 + var/burned_fuel_for = 0 //when fuel was last removed + heat = 3800 + tool_behaviour = TOOL_WELDER + toolspeed = 1 + +/obj/item/weldingtool/Initialize() + . = ..() + create_reagents(max_fuel) + reagents.add_reagent("welding_fuel", max_fuel) + update_icon() + + +/obj/item/weldingtool/proc/update_torch() + if(welding) + add_overlay("[initial(icon_state)]-on") + item_state = "[initial(item_state)]1" + else + item_state = "[initial(item_state)]" + + +/obj/item/weldingtool/update_icon() + cut_overlays() + if(change_icons) + var/ratio = get_fuel() / max_fuel + ratio = CEILING(ratio*4, 1) * 25 + add_overlay("[initial(icon_state)][ratio]") + update_torch() + return + + +/obj/item/weldingtool/process() + switch(welding) + if(0) + force = 3 + damtype = "brute" + update_icon() + if(!can_off_process) + STOP_PROCESSING(SSobj, src) + return + //Welders left on now use up fuel, but lets not have them run out quite that fast + if(1) + force = 15 + damtype = "fire" + ++burned_fuel_for + if(burned_fuel_for >= WELDER_FUEL_BURN_INTERVAL) + use(1) + update_icon() + + //This is to start fires. process() is only called if the welder is on. + open_flame() + + +/obj/item/weldingtool/suicide_act(mob/user) + user.visible_message("[user] welds [user.p_their()] every orifice closed! It looks like [user.p_theyre()] trying to commit suicide!") + return (FIRELOSS) + + +/obj/item/weldingtool/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/screwdriver)) + flamethrower_screwdriver(I, user) + else if(istype(I, /obj/item/stack/rods)) + flamethrower_rods(I, user) + else + . = ..() + update_icon() + +/obj/item/weldingtool/proc/explode() + var/turf/T = get_turf(loc) + var/plasmaAmount = reagents.get_reagent_amount("plasma") + dyn_explosion(T, plasmaAmount/5)//20 plasma in a standard welder has a 4 power explosion. no breaches, but enough to kill/dismember holder + qdel(src) + +/obj/item/weldingtool/attack(mob/living/carbon/human/H, mob/user) + if(!istype(H)) + return ..() + + var/obj/item/bodypart/affecting = H.get_bodypart(check_zone(user.zone_selected)) + + if(affecting && affecting.status == BODYPART_ROBOTIC && user.a_intent != INTENT_HARM) + if(src.use_tool(H, user, 0, volume=50, amount=1)) + if(user == H) + user.visible_message("[user] starts to fix some of the dents on [H]'s [affecting.name].", + "You start fixing some of the dents on [H]'s [affecting.name].") + if(!do_mob(user, H, 50)) + return + item_heal_robotic(H, user, 15, 0) + else + return ..() + + +/obj/item/weldingtool/afterattack(atom/O, mob/user, proximity) + if(!proximity) + return + if(!status && O.is_refillable()) + reagents.trans_to(O, reagents.total_volume) + to_chat(user, "You empty [src]'s fuel tank into [O].") + update_icon() + if(isOn()) + use(1) + var/turf/location = get_turf(user) + location.hotspot_expose(700, 50, 1) + if(get_fuel() <= 0) + set_light(0) + + if(isliving(O)) + var/mob/living/L = O + if(L.IgniteMob()) + message_admins("[key_name_admin(user)] set [key_name_admin(L)] on fire") + log_game("[key_name(user)] set [key_name(L)] on fire") + + +/obj/item/weldingtool/attack_self(mob/user) + if(src.reagents.has_reagent("plasma")) + message_admins("[key_name_admin(user)] activated a rigged welder.") + explode() + switched_on(user) + if(welding) + set_light(light_intensity) + + update_icon() + + +// Returns the amount of fuel in the welder +/obj/item/weldingtool/proc/get_fuel() + return reagents.get_reagent_amount("welding_fuel") + + +// Uses fuel from the welding tool. +/obj/item/weldingtool/use(used = 0) + if(!isOn() || !check_fuel()) + return FALSE + + if(used) + burned_fuel_for = 0 + if(get_fuel() >= used) + reagents.remove_reagent("welding_fuel", used) + check_fuel() + return TRUE + else + return FALSE + + +//Turns off the welder if there is no more fuel (does this really need to be its own proc?) +/obj/item/weldingtool/proc/check_fuel(mob/user) + if(get_fuel() <= 0 && welding) + switched_on(user) + update_icon() + //mob icon update + if(ismob(loc)) + var/mob/M = loc + M.update_inv_hands(0) + + return 0 + return 1 + +//Switches the welder on +/obj/item/weldingtool/proc/switched_on(mob/user) + if(!status) + to_chat(user, "[src] can't be turned on while unsecured!") + return + welding = !welding + if(welding) + if(get_fuel() >= 1) + to_chat(user, "You switch [src] on.") + playsound(loc, acti_sound, 50, 1) + force = 15 + damtype = "fire" + hitsound = 'sound/items/welder.ogg' + update_icon() + START_PROCESSING(SSobj, src) + else + to_chat(user, "You need more fuel!") + switched_off(user) + else + to_chat(user, "You switch [src] off.") + playsound(loc, deac_sound, 50, 1) + switched_off(user) + +//Switches the welder off +/obj/item/weldingtool/proc/switched_off(mob/user) + welding = 0 + set_light(0) + + force = 3 + damtype = "brute" + hitsound = "swing_hit" + update_icon() + + +/obj/item/weldingtool/examine(mob/user) + ..() + to_chat(user, "It contains [get_fuel()] unit\s of fuel out of [max_fuel].") + +/obj/item/weldingtool/is_hot() + return welding * heat + +//Returns whether or not the welding tool is currently on. +/obj/item/weldingtool/proc/isOn() + return welding + +// When welding is about to start, run a normal tool_use_check, then flash a mob if it succeeds. +/obj/item/weldingtool/tool_start_check(mob/living/user, amount=0) + . = tool_use_check(user, amount) + if(. && user) + user.flash_act(light_intensity) + +// Flash the user during welding progress +/obj/item/weldingtool/tool_check_callback(mob/living/user, amount, datum/callback/extra_checks) + . = ..() + if(. && user) + if (progress_flash_divisor == 0) + user.flash_act(min(light_intensity,1)) + progress_flash_divisor = initial(progress_flash_divisor) + else + progress_flash_divisor-- + +// If welding tool ran out of fuel during a construction task, construction fails. +/obj/item/weldingtool/tool_use_check(mob/living/user, amount) + if(!isOn() || !check_fuel()) + to_chat(user, "[src] has to be on to complete this task!") + return FALSE + + if(get_fuel() >= amount) + return TRUE + else + to_chat(user, "You need more welding fuel to complete this task!") + return FALSE + + +/obj/item/weldingtool/proc/flamethrower_screwdriver(obj/item/I, mob/user) + if(welding) + to_chat(user, "Turn it off first!") + return + status = !status + if(status) + to_chat(user, "You resecure [src] and close the fuel tank.") + container_type = NONE + else + to_chat(user, "[src] can now be attached, modified, and refuelled.") + container_type = OPENCONTAINER + add_fingerprint(user) + +/obj/item/weldingtool/proc/flamethrower_rods(obj/item/I, mob/user) + if(!status) + var/obj/item/stack/rods/R = I + if (R.use(1)) + var/obj/item/flamethrower/F = new /obj/item/flamethrower(user.loc) + if(!remove_item_from_storage(F)) + user.transferItemToLoc(src, F, TRUE) + F.weldtool = src + add_fingerprint(user) + to_chat(user, "You add a rod to a welder, starting to build a flamethrower.") + user.put_in_hands(F) + else + to_chat(user, "You need one rod to start building a flamethrower!") + +/obj/item/weldingtool/ignition_effect(atom/A, mob/user) + if(use_tool(A, user, 0, amount=1)) + return "[user] casually lights [A] with [src], what a badass." + else + return "" + +/obj/item/weldingtool/largetank + name = "industrial welding tool" + desc = "A slightly larger welder with a larger tank." + icon_state = "indwelder" + max_fuel = 40 + materials = list(MAT_GLASS=60) + +/obj/item/weldingtool/largetank/cyborg + name = "integrated welding tool" + desc = "An advanced welder designed to be used in robotic systems." + toolspeed = 0.5 + +/obj/item/weldingtool/largetank/flamethrower_screwdriver() + return + + +/obj/item/weldingtool/mini + name = "emergency welding tool" + desc = "A miniature welder used during emergencies." + icon_state = "miniwelder" + max_fuel = 10 + w_class = WEIGHT_CLASS_TINY + materials = list(MAT_METAL=30, MAT_GLASS=10) + change_icons = 0 + +/obj/item/weldingtool/mini/flamethrower_screwdriver() + return + +/obj/item/weldingtool/abductor + name = "alien welding tool" + desc = "An alien welding tool. Whatever fuel it uses, it never runs out." + icon = 'icons/obj/abductor.dmi' + icon_state = "welder" + toolspeed = 0.1 + light_intensity = 0 + change_icons = 0 + +/obj/item/weldingtool/abductor/process() + if(get_fuel() <= max_fuel) + reagents.add_reagent("welding_fuel", 1) + ..() + +/obj/item/weldingtool/hugetank + name = "upgraded industrial welding tool" + desc = "An upgraded welder based of the industrial welder." + icon_state = "upindwelder" + item_state = "upindwelder" + max_fuel = 80 + materials = list(MAT_METAL=70, MAT_GLASS=120) + +/obj/item/weldingtool/experimental + name = "experimental welding tool" + desc = "An experimental welder capable of self-fuel generation and less harmful to the eyes." + icon_state = "exwelder" + item_state = "exwelder" + max_fuel = 40 + materials = list(MAT_METAL=70, MAT_GLASS=120) + var/last_gen = 0 + change_icons = 0 + can_off_process = 1 + light_intensity = 1 + toolspeed = 0.5 + var/nextrefueltick = 0 + +/obj/item/weldingtool/experimental/brass + name = "brass welding tool" + desc = "A brass welder that seems to constantly refuel itself. It is faintly warm to the touch." + resistance_flags = FIRE_PROOF | ACID_PROOF + icon_state = "brasswelder" + item_state = "brasswelder" + + +/obj/item/weldingtool/experimental/process() + ..() + if(get_fuel() < max_fuel && nextrefueltick < world.time) + nextrefueltick = world.time + 10 + reagents.add_reagent("welding_fuel", 1) + +#undef WELDER_FUEL_BURN_INTERVAL +>>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme diff --git a/code/game/objects/items/tools/wirecutters.dm b/code/game/objects/items/tools/wirecutters.dm index f189c26bb2..33c7be5dfd 100644 --- a/code/game/objects/items/tools/wirecutters.dm +++ b/code/game/objects/items/tools/wirecutters.dm @@ -7,7 +7,7 @@ lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT force = 6 throw_speed = 3 throw_range = 7 diff --git a/code/game/objects/items/tools/wrench.dm b/code/game/objects/items/tools/wrench.dm index 6e399c0909..9a9a3684c3 100644 --- a/code/game/objects/items/tools/wrench.dm +++ b/code/game/objects/items/tools/wrench.dm @@ -6,7 +6,7 @@ lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT force = 5 throwforce = 7 w_class = WEIGHT_CLASS_SMALL diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 4554441cf0..754cc40982 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -143,7 +143,7 @@ lefthand_file = 'icons/mob/inhands/weapons/guns_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/guns_righthand.dmi' flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT w_class = WEIGHT_CLASS_NORMAL materials = list(MAT_METAL=10, MAT_GLASS=10) attack_verb = list("struck", "pistol whipped", "hit", "bashed") @@ -341,7 +341,7 @@ lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi' flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT | SLOT_BACK + slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_BACK force = 5 throwforce = 5 w_class = WEIGHT_CLASS_NORMAL @@ -1064,7 +1064,7 @@ desc = "A stylish steampunk watch made out of thousands of tiny cogwheels." icon = 'icons/obj/clockwork_objects.dmi' icon_state = "dread_ipad" - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT w_class = WEIGHT_CLASS_SMALL var/cooldown = 0 diff --git a/code/game/objects/items/twohanded.dm b/code/game/objects/items/twohanded.dm index 34a40b32a8..936ca22243 100644 --- a/code/game/objects/items/twohanded.dm +++ b/code/game/objects/items/twohanded.dm @@ -41,7 +41,7 @@ else //something wrong name = "[initial(name)]" update_icon() - if(user.get_item_by_slot(slot_back) == src) + if(user.get_item_by_slot(SLOT_BACK) == src) user.update_inv_back() else user.update_inv_hands() @@ -191,7 +191,7 @@ return qdel(O) return - if(slot == slot_hands) + if(slot == SLOT_HANDS) wield(user) else unwield(user) @@ -224,7 +224,7 @@ force = 5 throwforce = 15 w_class = WEIGHT_CLASS_BULKY - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK force_unwielded = 5 force_wielded = 24 attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut") @@ -458,7 +458,7 @@ desc = "A haphazardly-constructed yet still deadly weapon of ancient design." force = 10 w_class = WEIGHT_CLASS_BULKY - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK force_unwielded = 10 force_wielded = 18 throwforce = 20 @@ -744,7 +744,7 @@ sharpness = IS_SHARP attack_verb = list("cut", "sliced", "diced") w_class = WEIGHT_CLASS_BULKY - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK hitsound = 'sound/weapons/bladeslice.ogg' /obj/item/twohanded/vibro_weapon/Initialize() @@ -791,7 +791,7 @@ desc = "A haphazardly-constructed yet still deadly weapon. The pinnacle of modern technology." force = 11 w_class = WEIGHT_CLASS_BULKY - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK force_unwielded = 11 force_wielded = 20 //I have no idea how to balance throwforce = 22 diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index bf67efa6c7..8f9b9bee4c 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -3,7 +3,7 @@ name = "banhammer" icon = 'icons/obj/items_and_weapons.dmi' icon_state = "toyhammer" - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT throwforce = 0 force = 1 w_class = WEIGHT_CLASS_TINY @@ -34,7 +34,7 @@ item_state = "sord" lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi' - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT force = 2 throwforce = 1 w_class = WEIGHT_CLASS_NORMAL @@ -55,7 +55,7 @@ righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi' hitsound = 'sound/weapons/bladeslice.ogg' flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT | SLOT_BACK + slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_BACK force = 40 throwforce = 10 w_class = WEIGHT_CLASS_NORMAL @@ -206,7 +206,7 @@ lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi' flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT | SLOT_BACK + slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_BACK force = 40 throwforce = 10 w_class = WEIGHT_CLASS_HUGE diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index cc447a19ad..85e498e9e4 100644 --- a/code/game/objects/structures/bedsheet_bin.dm +++ b/code/game/objects/structures/bedsheet_bin.dm @@ -10,7 +10,7 @@ LINEN BINS icon = 'icons/obj/bedsheets.dmi' icon_state = "sheetwhite" item_state = "bedsheet" - slot_flags = SLOT_NECK + slot_flags = ITEM_SLOT_NECK layer = MOB_LAYER throwforce = 0 throw_speed = 1 diff --git a/code/game/turfs/simulated/lava.dm b/code/game/turfs/simulated/lava.dm index f8ab060853..60b3202ffe 100644 --- a/code/game/turfs/simulated/lava.dm +++ b/code/game/turfs/simulated/lava.dm @@ -127,8 +127,8 @@ continue if(iscarbon(L)) var/mob/living/carbon/C = L - var/obj/item/clothing/S = C.get_item_by_slot(slot_wear_suit) - var/obj/item/clothing/H = C.get_item_by_slot(slot_head) + var/obj/item/clothing/S = C.get_item_by_slot(SLOT_WEAR_SUIT) + var/obj/item/clothing/H = C.get_item_by_slot(SLOT_HEAD) if(S && H && S.flags_2 & LAVA_PROTECT_2 && H.flags_2 & LAVA_PROTECT_2) return diff --git a/code/modules/admin/secrets.dm b/code/modules/admin/secrets.dm index a8e92db53a..5138089a6c 100644 --- a/code/modules/admin/secrets.dm +++ b/code/modules/admin/secrets.dm @@ -430,7 +430,7 @@ var/obj/item/clothing/under/schoolgirl/I = new seifuku var/olduniform = H.w_uniform H.temporarilyRemoveItemFromInventory(H.w_uniform, TRUE, FALSE) - H.equip_to_slot_or_del(I, slot_w_uniform) + H.equip_to_slot_or_del(I, SLOT_W_UNIFORM) qdel(olduniform) if(droptype == "Yes") I.flags_1 |= NODROP_1 diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index a9b1b10606..d5e24c22e1 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1493,8 +1493,8 @@ if(ishuman(L)) var/mob/living/carbon/human/observer = L - observer.equip_to_slot_or_del(new /obj/item/clothing/under/suit_jacket(observer), slot_w_uniform) - observer.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(observer), slot_shoes) + observer.equip_to_slot_or_del(new /obj/item/clothing/under/suit_jacket(observer), SLOT_W_UNIFORM) + observer.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(observer), SLOT_SHOES) L.Unconscious(100) sleep(5) L.forceMove(pick(GLOB.tdomeobserve)) diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 9460e71ea0..c9864cab1b 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -476,7 +476,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) id.forceMove(W) W.update_icon() else - H.equip_to_slot(id,slot_wear_id) + H.equip_to_slot(id,SLOT_WEAR_ID) else alert("Invalid mob") diff --git a/code/modules/antagonists/abductor/equipment/abduction_gear.dm b/code/modules/antagonists/abductor/equipment/abduction_gear.dm index 72049ad7d1..78538ba00c 100644 --- a/code/modules/antagonists/abductor/equipment/abduction_gear.dm +++ b/code/modules/antagonists/abductor/equipment/abduction_gear.dm @@ -53,7 +53,7 @@ A.UpdateButtonIcon() /obj/item/clothing/suit/armor/abductor/vest/item_action_slot_check(slot, mob/user) - if(slot == slot_wear_suit) //we only give the mob the ability to activate the vest if he's actually wearing it. + if(slot == SLOT_WEAR_SUIT) //we only give the mob the ability to activate the vest if he's actually wearing it. return 1 /obj/item/clothing/suit/armor/abductor/vest/proc/SetDisguise(datum/icon_snapshot/entry) @@ -338,7 +338,7 @@ if(QDELETED(G)) return - if(istype(C.get_item_by_slot(slot_head), /obj/item/clothing/head/foilhat)) + if(istype(C.get_item_by_slot(SLOT_HEAD), /obj/item/clothing/head/foilhat)) to_chat(user, "Your target seems to have some sort of protective headgear on, blocking the message from being sent!") return @@ -425,7 +425,7 @@ Congratulations! You are now trained for invasive xenobiology research!"} item_state = "wonderprod" lefthand_file = 'icons/mob/inhands/antag/abductor_lefthand.dmi' righthand_file = 'icons/mob/inhands/antag/abductor_righthand.dmi' - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT force = 7 w_class = WEIGHT_CLASS_NORMAL actions_types = list(/datum/action/item_action/toggle_mode) @@ -515,7 +515,7 @@ Congratulations! You are now trained for invasive xenobiology research!"} /obj/item/abductor_baton/proc/SleepAttack(mob/living/L,mob/living/user) if(L.incapacitated(TRUE, TRUE)) - if(istype(L.get_item_by_slot(slot_head), /obj/item/clothing/head/foilhat)) + if(istype(L.get_item_by_slot(SLOT_HEAD), /obj/item/clothing/head/foilhat)) to_chat(user, "The specimen's protective headgear is interfering with the sleep inducement!") L.visible_message("[user] tried to induced sleep in [L] with [src], but their headgear protected them!", \ "You feel a strange wave of heavy drowsiness wash over you, but your headgear deflects most of it!") @@ -527,7 +527,7 @@ Congratulations! You are now trained for invasive xenobiology research!"} L.Sleeping(1200) add_logs(user, L, "put to sleep") else - if(istype(L.get_item_by_slot(slot_head), /obj/item/clothing/head/foilhat)) + if(istype(L.get_item_by_slot(SLOT_HEAD), /obj/item/clothing/head/foilhat)) to_chat(user, "The specimen's protective headgear is completely blocking our sleep inducement methods!") L.visible_message("[user] tried to induce sleep in [L] with [src], but their headgear completely protected them!", \ "Any sense of drowsiness is quickly diminished as your headgear deflects the effects!") diff --git a/code/modules/antagonists/abductor/machinery/console.dm b/code/modules/antagonists/abductor/machinery/console.dm index 1b11094d43..d35582f730 100644 --- a/code/modules/antagonists/abductor/machinery/console.dm +++ b/code/modules/antagonists/abductor/machinery/console.dm @@ -167,7 +167,7 @@ c.console = src /obj/machinery/abductor/console/proc/AddSnapshot(mob/living/carbon/human/target) - if(istype(target.get_item_by_slot(slot_head), /obj/item/clothing/head/foilhat)) + if(istype(target.get_item_by_slot(SLOT_HEAD), /obj/item/clothing/head/foilhat)) say("Subject wearing specialized protective headgear, unable to get a proper scan!") return var/datum/icon_snapshot/entry = new diff --git a/code/modules/antagonists/changeling/powers/biodegrade.dm b/code/modules/antagonists/changeling/powers/biodegrade.dm index dbb0e3a88a..1e8eaed383 100644 --- a/code/modules/antagonists/changeling/powers/biodegrade.dm +++ b/code/modules/antagonists/changeling/powers/biodegrade.dm @@ -13,7 +13,7 @@ return 0 if(user.handcuffed) - var/obj/O = user.get_item_by_slot(slot_handcuffed) + var/obj/O = user.get_item_by_slot(SLOT_HANDCUFFED) if(!istype(O)) return 0 user.visible_message("[user] vomits a glob of acid on [user.p_their()] [O]!", \ @@ -23,7 +23,7 @@ used = TRUE if(user.wear_suit && user.wear_suit.breakouttime && !used) - var/obj/item/clothing/suit/S = user.get_item_by_slot(slot_wear_suit) + var/obj/item/clothing/suit/S = user.get_item_by_slot(SLOT_WEAR_SUIT) if(!istype(S)) return 0 user.visible_message("[user] vomits a glob of acid across the front of [user.p_their()] [S]!", \ diff --git a/code/modules/antagonists/changeling/powers/mutations.dm b/code/modules/antagonists/changeling/powers/mutations.dm index e3fb55fa42..89d3c54161 100644 --- a/code/modules/antagonists/changeling/powers/mutations.dm +++ b/code/modules/antagonists/changeling/powers/mutations.dm @@ -119,8 +119,8 @@ user.dropItemToGround(user.head) user.dropItemToGround(user.wear_suit) - user.equip_to_slot_if_possible(new suit_type(user), slot_wear_suit, 1, 1, 1) - user.equip_to_slot_if_possible(new helmet_type(user), slot_head, 1, 1, 1) + user.equip_to_slot_if_possible(new suit_type(user), SLOT_WEAR_SUIT, 1, 1, 1) + user.equip_to_slot_if_possible(new helmet_type(user), SLOT_HEAD, 1, 1, 1) var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling) changeling.chem_recharge_slowdown += recharge_slowdown diff --git a/code/modules/antagonists/clockcult/clock_items/clockwork_armor.dm b/code/modules/antagonists/clockcult/clock_items/clockwork_armor.dm index 8b018fa6d3..6e7d081589 100644 --- a/code/modules/antagonists/clockcult/clock_items/clockwork_armor.dm +++ b/code/modules/antagonists/clockcult/clock_items/clockwork_armor.dm @@ -37,7 +37,7 @@ /obj/item/clothing/head/helmet/clockwork/equipped(mob/living/user, slot) ..() - if(slot == slot_head && !is_servant_of_ratvar(user)) + if(slot == SLOT_HEAD && !is_servant_of_ratvar(user)) if(!iscultist(user)) to_chat(user, "\"Now now, this is for my servants, not you.\"") user.visible_message("As [user] puts [src] on, it flickers off their head!", "The helmet flickers off your head, leaving only nausea!") @@ -103,7 +103,7 @@ /obj/item/clothing/suit/armor/clockwork/equipped(mob/living/user, slot) ..() - if(slot == slot_wear_suit && !is_servant_of_ratvar(user)) + if(slot == SLOT_WEAR_SUIT && !is_servant_of_ratvar(user)) if(!iscultist(user)) to_chat(user, "\"Now now, this is for my servants, not you.\"") user.visible_message("As [user] puts [src] on, it flickers off their body!", "The curiass flickers off your body, leaving only nausea!") @@ -164,7 +164,7 @@ /obj/item/clothing/gloves/clockwork/equipped(mob/living/user, slot) ..() - if(slot == slot_gloves && !is_servant_of_ratvar(user)) + if(slot == SLOT_GLOVES && !is_servant_of_ratvar(user)) if(!iscultist(user)) to_chat(user, "\"Now now, this is for my servants, not you.\"") user.visible_message("As [user] puts [src] on, it flickers off their arms!", "The gauntlets flicker off your arms, leaving only nausea!") @@ -214,7 +214,7 @@ /obj/item/clothing/shoes/clockwork/equipped(mob/living/user, slot) ..() - if(slot == slot_shoes && !is_servant_of_ratvar(user)) + if(slot == SLOT_SHOES && !is_servant_of_ratvar(user)) if(!iscultist(user)) to_chat(user, "\"Now now, this is for my servants, not you.\"") user.visible_message("As [user] puts [src] on, it flickers off their feet!", "The treads flicker off your feet, leaving only nausea!") diff --git a/code/modules/antagonists/clockcult/clock_items/clockwork_slab.dm b/code/modules/antagonists/clockcult/clock_items/clockwork_slab.dm index 5f5bc1b58a..c464656150 100644 --- a/code/modules/antagonists/clockcult/clock_items/clockwork_slab.dm +++ b/code/modules/antagonists/clockcult/clock_items/clockwork_slab.dm @@ -9,7 +9,7 @@ righthand_file = 'icons/mob/inhands/antag/clockwork_righthand.dmi' var/inhand_overlay //If applicable, this overlay will be applied to the slab's inhand - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT w_class = WEIGHT_CLASS_SMALL var/busy //If the slab is currently being used by something diff --git a/code/modules/antagonists/clockcult/clock_items/construct_chassis.dm b/code/modules/antagonists/clockcult/clock_items/construct_chassis.dm index ca5fe74f2e..3f3bb58598 100644 --- a/code/modules/antagonists/clockcult/clock_items/construct_chassis.dm +++ b/code/modules/antagonists/clockcult/clock_items/construct_chassis.dm @@ -115,4 +115,4 @@ S.no_cost = TRUE if(seasonal_hat && seasonal_hat != "none") var/obj/item/hat = new seasonal_hat(construct) - construct.equip_to_slot_or_del(hat, slot_head) + construct.equip_to_slot_or_del(hat, SLOT_HEAD) diff --git a/code/modules/antagonists/clockcult/clock_items/judicial_visor.dm b/code/modules/antagonists/clockcult/clock_items/judicial_visor.dm index a16a52d7aa..cb69d395b4 100644 --- a/code/modules/antagonists/clockcult/clock_items/judicial_visor.dm +++ b/code/modules/antagonists/clockcult/clock_items/judicial_visor.dm @@ -28,13 +28,13 @@ return ..() /obj/item/clothing/glasses/judicial_visor/item_action_slot_check(slot, mob/user) - if(slot != slot_glasses) + if(slot != SLOT_GLASSES) return 0 return ..() /obj/item/clothing/glasses/judicial_visor/equipped(mob/living/user, slot) ..() - if(slot != slot_glasses) + if(slot != SLOT_GLASSES) update_status(FALSE) if(blaster.ranged_ability_user) blaster.remove_ranged_ability() @@ -55,13 +55,13 @@ addtimer(CALLBACK(src, .proc/check_on_mob, user), 1) //dropped is called before the item is out of the slot, so we need to check slightly later /obj/item/clothing/glasses/judicial_visor/proc/check_on_mob(mob/user) - if(user && src != user.get_item_by_slot(slot_glasses)) //if we happen to check and we AREN'T in the slot, we need to remove our shit from whoever we got dropped from + if(user && src != user.get_item_by_slot(SLOT_GLASSES)) //if we happen to check and we AREN'T in the slot, we need to remove our shit from whoever we got dropped from update_status(FALSE) if(blaster.ranged_ability_user) blaster.remove_ranged_ability() /obj/item/clothing/glasses/judicial_visor/attack_self(mob/user) - if(is_servant_of_ratvar(user) && src == user.get_item_by_slot(slot_glasses)) + if(is_servant_of_ratvar(user) && src == user.get_item_by_slot(SLOT_GLASSES)) blaster.toggle(user) /obj/item/clothing/glasses/judicial_visor/proc/update_status(change_to) @@ -89,7 +89,7 @@ if(!src) return 0 recharging = FALSE - if(user && src == user.get_item_by_slot(slot_glasses)) + if(user && src == user.get_item_by_slot(SLOT_GLASSES)) to_chat(user, "Your [name] hums. It is ready.") else active = FALSE @@ -115,7 +115,7 @@ /obj/effect/proc_holder/judicial_visor/InterceptClickOn(mob/living/caller, params, atom/target) if(..()) return - if(ranged_ability_user.incapacitated() || !visor || visor != ranged_ability_user.get_item_by_slot(slot_glasses)) + if(ranged_ability_user.incapacitated() || !visor || visor != ranged_ability_user.get_item_by_slot(SLOT_GLASSES)) remove_ranged_ability() return diff --git a/code/modules/antagonists/clockcult/clock_items/wraith_spectacles.dm b/code/modules/antagonists/clockcult/clock_items/wraith_spectacles.dm index c1bf94842d..dab12dc304 100644 --- a/code/modules/antagonists/clockcult/clock_items/wraith_spectacles.dm +++ b/code/modules/antagonists/clockcult/clock_items/wraith_spectacles.dm @@ -74,7 +74,7 @@ /obj/item/clothing/glasses/wraith_spectacles/equipped(mob/living/user, slot) ..() - if(slot != slot_glasses || up) + if(slot != SLOT_GLASSES || up) return if(user.has_trait(TRAIT_BLIND)) to_chat(user, "\"You're blind, idiot. Stop embarrassing yourself.\"" ) diff --git a/code/modules/antagonists/clockcult/clock_scriptures/scripture_scripts.dm b/code/modules/antagonists/clockcult/clock_scriptures/scripture_scripts.dm index 9a78c64942..4e1a5b42cb 100644 --- a/code/modules/antagonists/clockcult/clock_scriptures/scripture_scripts.dm +++ b/code/modules/antagonists/clockcult/clock_scriptures/scripture_scripts.dm @@ -160,18 +160,18 @@ /datum/action/innate/clockwork_armaments/Activate() var/do_message = 0 - var/obj/item/I = owner.get_item_by_slot(slot_wear_suit) + var/obj/item/I = owner.get_item_by_slot(SLOT_WEAR_SUIT) if(remove_item_if_better(I, owner)) - do_message += owner.equip_to_slot_or_del(new/obj/item/clothing/suit/armor/clockwork(null), slot_wear_suit) - I = owner.get_item_by_slot(slot_head) + do_message += owner.equip_to_slot_or_del(new/obj/item/clothing/suit/armor/clockwork(null), SLOT_WEAR_SUIT) + I = owner.get_item_by_slot(SLOT_HEAD) if(remove_item_if_better(I, owner)) - do_message += owner.equip_to_slot_or_del(new/obj/item/clothing/head/helmet/clockwork(null), slot_head) - I = owner.get_item_by_slot(slot_gloves) + do_message += owner.equip_to_slot_or_del(new/obj/item/clothing/head/helmet/clockwork(null), SLOT_HEAD) + I = owner.get_item_by_slot(SLOT_GLOVES) if(remove_item_if_better(I, owner)) - do_message += owner.equip_to_slot_or_del(new/obj/item/clothing/gloves/clockwork(null), slot_gloves) - I = owner.get_item_by_slot(slot_shoes) + do_message += owner.equip_to_slot_or_del(new/obj/item/clothing/gloves/clockwork(null), SLOT_GLOVES) + I = owner.get_item_by_slot(SLOT_SHOES) if(remove_item_if_better(I, owner)) - do_message += owner.equip_to_slot_or_del(new/obj/item/clothing/shoes/clockwork(null), slot_shoes) + do_message += owner.equip_to_slot_or_del(new/obj/item/clothing/shoes/clockwork(null), SLOT_SHOES) if(do_message) owner.visible_message("Strange armor appears on [owner]!", "A bright shimmer runs down your body, equipping you with Ratvarian armor.") playsound(owner, 'sound/magic/clockwork/fellowship_armory.ogg', 15 * do_message, TRUE) //get sound loudness based on how much we equipped diff --git a/code/modules/antagonists/cult/blood_magic.dm b/code/modules/antagonists/cult/blood_magic.dm index bb2ce1db2a..8a71af3b7d 100644 --- a/code/modules/antagonists/cult/blood_magic.dm +++ b/code/modules/antagonists/cult/blood_magic.dm @@ -605,11 +605,11 @@ uses-- var/mob/living/carbon/C = target C.visible_message("Otherworldly armor suddenly appears on [C]!") - C.equip_to_slot_or_del(new /obj/item/clothing/under/color/black,slot_w_uniform) - C.equip_to_slot_or_del(new /obj/item/clothing/head/culthood/alt(user), slot_head) - C.equip_to_slot_or_del(new /obj/item/clothing/suit/cultrobes/alt(user), slot_wear_suit) - C.equip_to_slot_or_del(new /obj/item/clothing/shoes/cult/alt(user), slot_shoes) - C.equip_to_slot_or_del(new /obj/item/storage/backpack/cultpack(user), slot_back) + C.equip_to_slot_or_del(new /obj/item/clothing/under/color/black,SLOT_W_UNIFORM) + C.equip_to_slot_or_del(new /obj/item/clothing/head/culthood/alt(user), SLOT_HEAD) + C.equip_to_slot_or_del(new /obj/item/clothing/suit/cultrobes/alt(user), SLOT_WEAR_SUIT) + C.equip_to_slot_or_del(new /obj/item/clothing/shoes/cult/alt(user), SLOT_SHOES) + C.equip_to_slot_or_del(new /obj/item/storage/backpack/cultpack(user), SLOT_BACK) if(C == user) qdel(src) //Clears the hands C.put_in_hands(new /obj/item/melee/cultblade(user)) diff --git a/code/modules/antagonists/cult/cult.dm b/code/modules/antagonists/cult/cult.dm index b7f0b002ec..2574c8af63 100644 --- a/code/modules/antagonists/cult/cult.dm +++ b/code/modules/antagonists/cult/cult.dm @@ -81,9 +81,9 @@ /datum/antagonist/cult/proc/cult_give_item(obj/item/item_path, mob/living/carbon/human/mob) var/list/slots = list( - "backpack" = slot_in_backpack, - "left pocket" = slot_l_store, - "right pocket" = slot_r_store + "backpack" = SLOT_IN_BACKPACK, + "left pocket" = SLOT_L_STORE, + "right pocket" = SLOT_R_STORE ) var/T = new item_path(mob) diff --git a/code/modules/antagonists/cult/runes.dm b/code/modules/antagonists/cult/runes.dm index 763d9adaa8..b2f62d55c8 100644 --- a/code/modules/antagonists/cult/runes.dm +++ b/code/modules/antagonists/cult/runes.dm @@ -1056,7 +1056,7 @@ structure_check() searches for nearby cultist structures required for the invoca /proc/hudFix(mob/living/carbon/human/target) if(!target || !target.client) return - var/obj/O = target.get_item_by_slot(slot_glasses) + var/obj/O = target.get_item_by_slot(SLOT_GLASSES) if(istype(O, /obj/item/clothing/glasses/hud/security)) var/datum/atom_hud/AH = GLOB.huds[DATA_HUD_SECURITY_ADVANCED] AH.add_hud_to(target) diff --git a/code/modules/antagonists/devil/devil.dm b/code/modules/antagonists/devil/devil.dm index 55a33820f0..3852eb6de1 100644 --- a/code/modules/antagonists/devil/devil.dm +++ b/code/modules/antagonists/devil/devil.dm @@ -456,10 +456,10 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master", return -1 currentMob.change_mob_type( /mob/living/carbon/human, targetturf, null, 1) var/mob/living/carbon/human/H = owner.current - H.equip_to_slot_or_del(new /obj/item/clothing/under/lawyer/black(H), slot_w_uniform) - H.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(H), slot_shoes) - H.equip_to_slot_or_del(new /obj/item/storage/briefcase(H), slot_hands) - H.equip_to_slot_or_del(new /obj/item/pen(H), slot_l_store) + H.equip_to_slot_or_del(new /obj/item/clothing/under/lawyer/black(H), SLOT_W_UNIFORM) + H.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(H), SLOT_SHOES) + H.equip_to_slot_or_del(new /obj/item/storage/briefcase(H), SLOT_HANDS) + H.equip_to_slot_or_del(new /obj/item/pen(H), SLOT_L_STORE) if(SOULVALUE >= BLOOD_THRESHOLD) H.set_species(/datum/species/lizard, 1) H.underwear = "Nude" diff --git a/code/modules/antagonists/highlander/highlander.dm b/code/modules/antagonists/highlander/highlander.dm index 012527ff7b..a2b87c576e 100644 --- a/code/modules/antagonists/highlander/highlander.dm +++ b/code/modules/antagonists/highlander/highlander.dm @@ -46,11 +46,19 @@ qdel(I) for(var/obj/item/I in H.held_items) qdel(I) +<<<<<<< HEAD H.equip_to_slot_or_del(new /obj/item/clothing/under/kilt/highlander(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(H), slot_ears) H.equip_to_slot_or_del(new /obj/item/clothing/head/beret/highlander(H), slot_head) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(H), slot_shoes) H.equip_to_slot_or_del(new /obj/item/pinpointer/nuke(H), slot_l_store) +======= + H.equip_to_slot_or_del(new /obj/item/clothing/under/kilt/highlander(H), SLOT_W_UNIFORM) + H.equip_to_slot_or_del(new /obj/item/radio/headset/heads/captain(H), SLOT_EARS) + H.equip_to_slot_or_del(new /obj/item/clothing/head/beret/highlander(H), SLOT_HEAD) + H.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(H), SLOT_SHOES) + H.equip_to_slot_or_del(new /obj/item/pinpointer/nuke(H), SLOT_L_STORE) +>>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme for(var/obj/item/pinpointer/nuke/P in H) P.attack_self(H) var/obj/item/card/id/W = new(H) @@ -61,7 +69,7 @@ W.registered_name = H.real_name W.flags_1 |= NODROP_1 W.update_label(H.real_name) - H.equip_to_slot_or_del(W, slot_wear_id) + H.equip_to_slot_or_del(W, SLOT_WEAR_ID) sword = new(H) if(!GLOB.highlander) diff --git a/code/modules/antagonists/revolution/revolution.dm b/code/modules/antagonists/revolution/revolution.dm index dae760933e..a26639d8ab 100644 --- a/code/modules/antagonists/revolution/revolution.dm +++ b/code/modules/antagonists/revolution/revolution.dm @@ -234,9 +234,9 @@ if(give_flash) var/obj/item/device/assembly/flash/T = new(H) var/list/slots = list ( - "backpack" = slot_in_backpack, - "left pocket" = slot_l_store, - "right pocket" = slot_r_store + "backpack" = SLOT_IN_BACKPACK, + "left pocket" = SLOT_L_STORE, + "right pocket" = SLOT_R_STORE ) var/where = H.equip_in_one_of_slots(T, slots) if (!where) diff --git a/code/modules/antagonists/traitor/datum_traitor.dm b/code/modules/antagonists/traitor/datum_traitor.dm index e09b92a083..f3ea4ef2ea 100644 --- a/code/modules/antagonists/traitor/datum_traitor.dm +++ b/code/modules/antagonists/traitor/datum_traitor.dm @@ -296,9 +296,9 @@ folder = new/obj/item/folder/syndicate/blue(mob.loc) var/list/slots = list ( - "backpack" = slot_in_backpack, - "left pocket" = slot_l_store, - "right pocket" = slot_r_store + "backpack" = SLOT_IN_BACKPACK, + "left pocket" = SLOT_L_STORE, + "right pocket" = SLOT_R_STORE ) var/where = "At your feet" diff --git a/code/modules/antagonists/wizard/equipment/artefact.dm b/code/modules/antagonists/wizard/equipment/artefact.dm index a2b885f777..c194719e8e 100644 --- a/code/modules/antagonists/wizard/equipment/artefact.dm +++ b/code/modules/antagonists/wizard/equipment/artefact.dm @@ -204,12 +204,12 @@ H.dropItemToGround(I) var/hat = pick(/obj/item/clothing/head/helmet/roman, /obj/item/clothing/head/helmet/roman/legionaire) - H.equip_to_slot_or_del(new hat(H), slot_head) - H.equip_to_slot_or_del(new /obj/item/clothing/under/roman(H), slot_w_uniform) - H.equip_to_slot_or_del(new /obj/item/clothing/shoes/roman(H), slot_shoes) + H.equip_to_slot_or_del(new hat(H), SLOT_HEAD) + H.equip_to_slot_or_del(new /obj/item/clothing/under/roman(H), SLOT_W_UNIFORM) + H.equip_to_slot_or_del(new /obj/item/clothing/shoes/roman(H), SLOT_SHOES) H.put_in_hands(new /obj/item/shield/riot/roman(H), TRUE) H.put_in_hands(new /obj/item/claymore(H), TRUE) - H.equip_to_slot_or_del(new /obj/item/twohanded/spear(H), slot_back) + H.equip_to_slot_or_del(new /obj/item/twohanded/spear(H), SLOT_BACK) /obj/item/voodoo diff --git a/code/modules/antagonists/wizard/equipment/soulstone.dm b/code/modules/antagonists/wizard/equipment/soulstone.dm index bea6d41685..6a8de000da 100644 --- a/code/modules/antagonists/wizard/equipment/soulstone.dm +++ b/code/modules/antagonists/wizard/equipment/soulstone.dm @@ -8,7 +8,7 @@ layer = HIGH_OBJ_LAYER desc = "A fragment of the legendary treasure known simply as the 'Soul Stone'. The shard still flickers with a fraction of the full artefact's power." w_class = WEIGHT_CLASS_TINY - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT var/usability = 0 var/old_shard = FALSE diff --git a/code/modules/antagonists/wizard/wizard.dm b/code/modules/antagonists/wizard/wizard.dm index 146d79d413..819e51a77a 100644 --- a/code/modules/antagonists/wizard/wizard.dm +++ b/code/modules/antagonists/wizard/wizard.dm @@ -238,17 +238,17 @@ if(!istype(master_mob) || !istype(H)) return if(master_mob.ears) - H.equip_to_slot_or_del(new master_mob.ears.type, slot_ears) + H.equip_to_slot_or_del(new master_mob.ears.type, SLOT_EARS) if(master_mob.w_uniform) - H.equip_to_slot_or_del(new master_mob.w_uniform.type, slot_w_uniform) + H.equip_to_slot_or_del(new master_mob.w_uniform.type, SLOT_W_UNIFORM) if(master_mob.shoes) - H.equip_to_slot_or_del(new master_mob.shoes.type, slot_shoes) + H.equip_to_slot_or_del(new master_mob.shoes.type, SLOT_SHOES) if(master_mob.wear_suit) - H.equip_to_slot_or_del(new master_mob.wear_suit.type, slot_wear_suit) + H.equip_to_slot_or_del(new master_mob.wear_suit.type, SLOT_WEAR_SUIT) if(master_mob.head) - H.equip_to_slot_or_del(new master_mob.head.type, slot_head) + H.equip_to_slot_or_del(new master_mob.head.type, SLOT_HEAD) if(master_mob.back) - H.equip_to_slot_or_del(new master_mob.back.type, slot_back) + H.equip_to_slot_or_del(new master_mob.back.type, SLOT_BACK) //Operation: Fuck off and scare people owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/area_teleport/teleport(null)) diff --git a/code/modules/assembly/flash.dm b/code/modules/assembly/flash.dm index 2b0e3af514..fb225d3999 100644 --- a/code/modules/assembly/flash.dm +++ b/code/modules/assembly/flash.dm @@ -241,7 +241,7 @@ item_state = "flashshield" lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi' - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK force = 10 throwforce = 5 throw_speed = 2 diff --git a/code/modules/awaymissions/capture_the_flag.dm b/code/modules/awaymissions/capture_the_flag.dm index c864469783..6653941d29 100644 --- a/code/modules/awaymissions/capture_the_flag.dm +++ b/code/modules/awaymissions/capture_the_flag.dm @@ -496,10 +496,10 @@ W.update_label(W.registered_name, W.assignment) // The shielded hardsuit is already NODROP_1 - no_drops += H.get_item_by_slot(slot_gloves) - no_drops += H.get_item_by_slot(slot_shoes) - no_drops += H.get_item_by_slot(slot_w_uniform) - no_drops += H.get_item_by_slot(slot_ears) + no_drops += H.get_item_by_slot(SLOT_GLOVES) + no_drops += H.get_item_by_slot(SLOT_SHOES) + no_drops += H.get_item_by_slot(SLOT_W_UNIFORM) + no_drops += H.get_item_by_slot(SLOT_EARS) for(var/i in no_drops) var/obj/item/I = i I.flags_1 |= NODROP_1 diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index 03bb1eeb13..61285bfeca 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -63,8 +63,8 @@ // it's NODROP_1 D.dropItemToGround(target, TRUE) qdel(old_headgear) - // where is `slot_head` defined? WHO KNOWS - D.equip_to_slot(new_headgear, slot_head) + // where is `SLOT_HEAD` defined? WHO KNOWS + D.equip_to_slot(new_headgear, SLOT_HEAD) return 1 diff --git a/code/modules/clothing/ears/_ears.dm b/code/modules/clothing/ears/_ears.dm index 0ff1bdefe3..cdd25cf436 100644 --- a/code/modules/clothing/ears/_ears.dm +++ b/code/modules/clothing/ears/_ears.dm @@ -1,3 +1,4 @@ +<<<<<<< HEAD //Ears: currently only used for headsets and earmuffs /obj/item/clothing/ears @@ -44,3 +45,51 @@ H.update_inv_neck() H.update_inv_head() to_chat(owner, "You turn the music [headphones_on? "on. Untz Untz Untz!" : "off."]") +======= + +//Ears: currently only used for headsets and earmuffs +/obj/item/clothing/ears + name = "ears" + w_class = WEIGHT_CLASS_TINY + throwforce = 0 + slot_flags = ITEM_SLOT_EARS + resistance_flags = NONE + +/obj/item/clothing/ears/earmuffs + name = "earmuffs" + desc = "Protects your hearing from loud noises, and quiet ones as well." + icon_state = "earmuffs" + item_state = "earmuffs" + strip_delay = 15 + equip_delay_other = 25 + resistance_flags = FLAMMABLE + flags_2 = BANG_PROTECT_2|HEALS_EARS_2 + +/obj/item/clothing/ears/headphones + name = "headphones" + desc = "Unce unce unce unce. Boop!" + icon = 'icons/obj/clothing/accessories.dmi' + icon_state = "headphones" + item_state = "headphones" + slot_flags = ITEM_SLOT_EARS | ITEM_SLOT_HEAD | ITEM_SLOT_NECK //Fluff item, put it whereever you want! + actions_types = list(/datum/action/item_action/toggle_headphones) + var/headphones_on = FALSE + +/obj/item/clothing/ears/headphones/Initialize() + . = ..() + update_icon() + +/obj/item/clothing/ears/headphones/update_icon() + icon_state = "[initial(icon_state)]_[headphones_on? "on" : "off"]" + item_state = "[initial(item_state)]_[headphones_on? "on" : "off"]" + +/obj/item/clothing/ears/headphones/proc/toggle(owner) + headphones_on = !headphones_on + update_icon() + var/mob/living/carbon/human/H = owner + if(istype(H)) + H.update_inv_ears() + H.update_inv_neck() + H.update_inv_head() + to_chat(owner, "You turn the music [headphones_on? "on. Untz Untz Untz!" : "off."]") +>>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme diff --git a/code/modules/clothing/glasses/_glasses.dm b/code/modules/clothing/glasses/_glasses.dm index eaeedee36c..f9be63420f 100644 --- a/code/modules/clothing/glasses/_glasses.dm +++ b/code/modules/clothing/glasses/_glasses.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/clothing/glasses.dmi' w_class = WEIGHT_CLASS_SMALL flags_cover = GLASSESCOVERSEYES - slot_flags = SLOT_EYES + slot_flags = ITEM_SLOT_EYES strip_delay = 20 equip_delay_other = 25 resistance_flags = NONE @@ -100,7 +100,7 @@ armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100) /obj/item/clothing/glasses/science/item_action_slot_check(slot) - if(slot == slot_glasses) + if(slot == SLOT_GLASSES) return 1 /obj/item/clothing/glasses/night @@ -263,7 +263,7 @@ /obj/item/clothing/glasses/sunglasses/blindfold/equipped(mob/living/carbon/human/user, slot) . = ..() - if(slot == slot_glasses) + if(slot == SLOT_GLASSES) user.become_blind("blindfold_[REF(src)]") /obj/item/clothing/glasses/sunglasses/blindfold/dropped(mob/living/carbon/human/user) diff --git a/code/modules/clothing/glasses/engine_goggles.dm b/code/modules/clothing/glasses/engine_goggles.dm index 439197f285..5e5e7a9c55 100644 --- a/code/modules/clothing/glasses/engine_goggles.dm +++ b/code/modules/clothing/glasses/engine_goggles.dm @@ -123,7 +123,7 @@ item_state = icon_state if(isliving(loc)) var/mob/living/user = loc - if(user.get_item_by_slot(slot_glasses) == src) + if(user.get_item_by_slot(SLOT_GLASSES) == src) user.update_inv_glasses() else user.update_inv_hands() diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm index 626bf4f542..6364826942 100644 --- a/code/modules/clothing/glasses/hud.dm +++ b/code/modules/clothing/glasses/hud.dm @@ -6,7 +6,7 @@ /obj/item/clothing/glasses/hud/equipped(mob/living/carbon/human/user, slot) ..() - if(hud_type && slot == slot_glasses) + if(hud_type && slot == SLOT_GLASSES) var/datum/atom_hud/H = GLOB.huds[hud_type] H.add_hud_to(user) diff --git a/code/modules/clothing/gloves/_gloves.dm b/code/modules/clothing/gloves/_gloves.dm index ca534f5a58..0e9be23aed 100644 --- a/code/modules/clothing/gloves/_gloves.dm +++ b/code/modules/clothing/gloves/_gloves.dm @@ -5,7 +5,7 @@ icon = 'icons/obj/clothing/gloves.dmi' siemens_coefficient = 0.5 body_parts_covered = HANDS - slot_flags = SLOT_GLOVES + slot_flags = ITEM_SLOT_GLOVES attack_verb = list("challenged") var/transfer_prints = FALSE strip_delay = 20 diff --git a/code/modules/clothing/gloves/color.dm b/code/modules/clothing/gloves/color.dm index 09f5993cb4..1b20501f21 100644 --- a/code/modules/clothing/gloves/color.dm +++ b/code/modules/clothing/gloves/color.dm @@ -209,7 +209,7 @@ var/obj/item/clothing/gloves/color/selected = pick(gloves) if(ishuman(loc)) var/mob/living/carbon/human/H = loc - H.equip_to_slot_or_del(new selected(H), slot_gloves) + H.equip_to_slot_or_del(new selected(H), SLOT_GLOVES) else new selected(loc) return INITIALIZE_HINT_QDEL diff --git a/code/modules/clothing/head/_head.dm b/code/modules/clothing/head/_head.dm index d3dfa189d8..6a3082b558 100644 --- a/code/modules/clothing/head/_head.dm +++ b/code/modules/clothing/head/_head.dm @@ -4,7 +4,7 @@ icon_state = "top_hat" item_state = "that" body_parts_covered = HEAD - slot_flags = SLOT_HEAD + slot_flags = ITEM_SLOT_HEAD var/blockTracking = 0 //For AI tracking var/can_toggle = null dynamic_hair_suffix = "+generic" diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index b58c9fc414..86763e060b 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -131,7 +131,7 @@ dog_fashion = /datum/dog_fashion/head/kitty /obj/item/clothing/head/kitty/equipped(mob/living/carbon/human/user, slot) - if(ishuman(user) && slot == slot_head) + if(ishuman(user) && slot == SLOT_HEAD) update_icon(user) user.update_inv_head() //Color might have been changed by update_icon. ..() @@ -169,7 +169,7 @@ /obj/item/clothing/head/cardborg/equipped(mob/living/user, slot) ..() - if(ishuman(user) && slot == slot_head) + if(ishuman(user) && slot == SLOT_HEAD) var/mob/living/carbon/human/H = user if(istype(H.wear_suit, /obj/item/clothing/suit/cardborg)) var/obj/item/clothing/suit/cardborg/CB = H.wear_suit @@ -240,7 +240,7 @@ /obj/item/clothing/head/foilhat/equipped(mob/living/carbon/human/user, slot) ..() - if(slot == slot_head) + if(slot == SLOT_HEAD) if(paranoia) QDEL_NULL(paranoia) paranoia = new() diff --git a/code/modules/clothing/masks/_masks.dm b/code/modules/clothing/masks/_masks.dm index 562375e897..b738b82589 100644 --- a/code/modules/clothing/masks/_masks.dm +++ b/code/modules/clothing/masks/_masks.dm @@ -2,7 +2,7 @@ name = "mask" icon = 'icons/obj/clothing/masks.dmi' body_parts_covered = HEAD - slot_flags = SLOT_MASK + slot_flags = ITEM_SLOT_MASK strip_delay = 40 equip_delay_other = 40 var/mask_adjusted = 0 diff --git a/code/modules/clothing/masks/miscellaneous.dm b/code/modules/clothing/masks/miscellaneous.dm index 53bd5f32a4..285639d64a 100644 --- a/code/modules/clothing/masks/miscellaneous.dm +++ b/code/modules/clothing/masks/miscellaneous.dm @@ -222,8 +222,8 @@ obj/item/clothing/mask/frog/cursed flags_inv = HIDEFACE|HIDEFACIALHAIR visor_flags_inv = HIDEFACE|HIDEFACIALHAIR visor_flags_cover = MASKCOVERSMOUTH - slot_flags = SLOT_MASK - adjusted_flags = SLOT_HEAD + slot_flags = ITEM_SLOT_MASK + adjusted_flags = ITEM_SLOT_HEAD icon_state = "bandbotany" /obj/item/clothing/mask/bandana/attack_self(mob/user) diff --git a/code/modules/clothing/neck/_neck.dm b/code/modules/clothing/neck/_neck.dm index 1d92ab6e62..cb797c34d4 100644 --- a/code/modules/clothing/neck/_neck.dm +++ b/code/modules/clothing/neck/_neck.dm @@ -2,7 +2,7 @@ name = "necklace" icon = 'icons/obj/clothing/neck.dmi' body_parts_covered = NECK - slot_flags = SLOT_NECK + slot_flags = ITEM_SLOT_NECK strip_delay = 40 equip_delay_other = 40 diff --git a/code/modules/clothing/shoes/_shoes.dm b/code/modules/clothing/shoes/_shoes.dm index 0758013698..e3c32cd26c 100644 --- a/code/modules/clothing/shoes/_shoes.dm +++ b/code/modules/clothing/shoes/_shoes.dm @@ -6,7 +6,7 @@ var/chained = 0 body_parts_covered = FEET - slot_flags = SLOT_FEET + slot_flags = ITEM_SLOT_FEET permeability_coefficient = 0.5 slowdown = SHOES_SLOWDOWN diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm index 3dad0d464e..539ee7b23d 100644 --- a/code/modules/clothing/shoes/miscellaneous.dm +++ b/code/modules/clothing/shoes/miscellaneous.dm @@ -264,7 +264,7 @@ /obj/item/clothing/shoes/wheelys/ui_action_click(mob/user, action) if(!isliving(user)) return - if(!istype(user.get_item_by_slot(slot_shoes), /obj/item/clothing/shoes/wheelys)) + if(!istype(user.get_item_by_slot(SLOT_SHOES), /obj/item/clothing/shoes/wheelys)) to_chat(user, "You must be wearing the wheely-heels to use them!") return if(!(W.is_occupant(user))) diff --git a/code/modules/clothing/spacesuits/chronosuit.dm b/code/modules/clothing/spacesuits/chronosuit.dm index 94553b3964..3040af756e 100644 --- a/code/modules/clothing/spacesuits/chronosuit.dm +++ b/code/modules/clothing/spacesuits/chronosuit.dm @@ -115,7 +115,7 @@ teleport_now.UpdateButtonIcon() - var/list/nonsafe_slots = list(slot_belt, slot_back) + var/list/nonsafe_slots = list(SLOT_BELT, SLOT_BACK) var/list/exposed = list() for(var/slot in nonsafe_slots) var/obj/item/slot_item = user.get_item_by_slot(slot) diff --git a/code/modules/clothing/spacesuits/flightsuit.dm b/code/modules/clothing/spacesuits/flightsuit.dm index 3a5198080f..2d836fbb12 100644 --- a/code/modules/clothing/spacesuits/flightsuit.dm +++ b/code/modules/clothing/spacesuits/flightsuit.dm @@ -21,7 +21,7 @@ actions_types = list(/datum/action/item_action/flightpack/toggle_flight, /datum/action/item_action/flightpack/engage_boosters, /datum/action/item_action/flightpack/toggle_stabilizers, /datum/action/item_action/flightpack/change_power, /datum/action/item_action/flightpack/toggle_airbrake) armor = list("melee" = 20, "bullet" = 20, "laser" = 20, "energy" = 10, "bomb" = 30, "bio" = 100, "rad" = 75, "fire" = 100, "acid" = 75) w_class = WEIGHT_CLASS_BULKY - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK resistance_flags = FIRE_PROOF var/processing_mode = FLIGHTSUIT_PROCESSING_FULL @@ -544,8 +544,13 @@ changeWearer() ..() +<<<<<<< HEAD /obj/item/device/flightpack/item_action_slot_check(slot) if(slot == SLOT_BACK) +======= +/obj/item/flightpack/item_action_slot_check(slot) + if(slot == ITEM_SLOT_BACK) +>>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme return TRUE /obj/item/device/flightpack/equipped(mob/user, slot) @@ -571,8 +576,13 @@ momentum_speed_y = 0 momentum_speed = max(momentum_speed_x, momentum_speed_y) +<<<<<<< HEAD /obj/item/device/flightpack/item_action_slot_check(slot) return slot == slot_back +======= +/obj/item/flightpack/item_action_slot_check(slot) + return slot == SLOT_BACK +>>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme /obj/item/device/flightpack/proc/enable_stabilizers() if(requires_suit && suit && !suit.deployedshoes) @@ -728,7 +738,7 @@ src.flags_1 &= ~NOSLIP_1 /obj/item/clothing/shoes/flightshoes/item_action_slot_check(slot) - return slot == slot_shoes + return slot == SLOT_SHOES /obj/item/clothing/shoes/flightshoes/proc/delink_suit() if(suit) @@ -893,7 +903,7 @@ if(user.back) usermessage("You're already wearing something on your back!", "boldwarning") return FALSE - user.equip_to_slot_if_possible(pack,slot_back,0,0,1) + user.equip_to_slot_if_possible(pack,SLOT_BACK,0,0,1) pack.flags_1 |= NODROP_1 resync() user.visible_message("A [pack.name] extends from [user]'s [name] and clamps to their back!") @@ -931,7 +941,7 @@ if(user.shoes) usermessage("You're already wearing something on your feet!", "boldwarning") return FALSE - user.equip_to_slot_if_possible(shoes,slot_shoes,0,0,1) + user.equip_to_slot_if_possible(shoes,SLOT_SHOES,0,0,1) shoes.flags_1 |= NODROP_1 user.visible_message("[user]'s [name] extends a pair of [shoes.name] over their feet!") user.update_inv_wear_suit() @@ -962,7 +972,7 @@ /obj/item/clothing/suit/space/hardsuit/flightsuit/equipped(mob/M, slot) if(ishuman(M)) user = M - if(slot != slot_wear_suit) + if(slot != SLOT_WEAR_SUIT) if(deployedpack) retract_flightpack(TRUE) if(deployedshoes) @@ -997,7 +1007,7 @@ /obj/item/clothing/suit/space/hardsuit/flightsuit/attackby(obj/item/I, mob/wearer, params) user = wearer - if(src == user.get_item_by_slot(slot_wear_suit)) + if(src == user.get_item_by_slot(SLOT_WEAR_SUIT)) usermessage("You can not perform any service without taking the suit off!", "boldwarning") return FALSE else if(locked) diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index 41b2334f94..9ce1a77868 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -48,12 +48,12 @@ soundloop.stop(user) /obj/item/clothing/head/helmet/space/hardsuit/item_action_slot_check(slot) - if(slot == slot_head) + if(slot == SLOT_HEAD) return 1 /obj/item/clothing/head/helmet/space/hardsuit/equipped(mob/user, slot) ..() - if(slot != slot_head) + if(slot != SLOT_HEAD) if(suit) suit.RemoveHelmet() soundloop.stop(user) @@ -119,7 +119,7 @@ if(jetpack) to_chat(user, "[src] already has a jetpack installed.") return - if(src == user.get_item_by_slot(slot_wear_suit)) //Make sure the player is not wearing the suit before applying the upgrade. + if(src == user.get_item_by_slot(SLOT_WEAR_SUIT)) //Make sure the player is not wearing the suit before applying the upgrade. to_chat(user, "You cannot install the upgrade to [src] while wearing it.") return @@ -131,7 +131,7 @@ if(!jetpack) to_chat(user, "[src] has no jetpack installed.") return - if(src == user.get_item_by_slot(slot_wear_suit)) + if(src == user.get_item_by_slot(SLOT_WEAR_SUIT)) to_chat(user, "You cannot remove the jetpack from [src] while wearing it.") return @@ -144,7 +144,7 @@ /obj/item/clothing/suit/space/hardsuit/equipped(mob/user, slot) ..() if(jetpack) - if(slot == slot_wear_suit) + if(slot == SLOT_WEAR_SUIT) for(var/X in jetpack.actions) var/datum/action/A = X A.Grant(user) @@ -157,7 +157,7 @@ A.Remove(user) /obj/item/clothing/suit/space/hardsuit/item_action_slot_check(slot) - if(slot == slot_wear_suit) //we only give the mob the ability to toggle the helmet if he's wearing the hardsuit. + if(slot == SLOT_WEAR_SUIT) //we only give the mob the ability to toggle the helmet if he's wearing the hardsuit. return 1 //Engineering @@ -460,7 +460,7 @@ /obj/item/clothing/head/helmet/space/hardsuit/rd/equipped(mob/living/carbon/human/user, slot) ..() - if (slot == slot_head) + if (slot == SLOT_HEAD) var/datum/atom_hud/DHUD = GLOB.huds[DATA_HUD_DIAGNOSTIC_BASIC] DHUD.add_hud_to(user) @@ -615,7 +615,7 @@ /obj/item/clothing/suit/space/hardsuit/ancient/equipped(mob/user, slot) . = ..() - if (slot == slot_wear_suit) + if (slot == SLOT_WEAR_SUIT) if (mobhook && mobhook.parent != user) QDEL_NULL(mobhook) if (!mobhook) diff --git a/code/modules/clothing/suits/_suits.dm b/code/modules/clothing/suits/_suits.dm index 1cf1d4640d..6aabee0c81 100644 --- a/code/modules/clothing/suits/_suits.dm +++ b/code/modules/clothing/suits/_suits.dm @@ -4,7 +4,7 @@ var/fire_resist = T0C+100 allowed = list(/obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman) armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) - slot_flags = SLOT_OCLOTHING + slot_flags = ITEM_SLOT_OCLOTHING var/blood_overlay_type = "suit" var/togglename = null var/suittoggled = FALSE diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index 90ae827957..9415c093fc 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -173,7 +173,7 @@ /obj/item/clothing/suit/cardborg/equipped(mob/living/user, slot) ..() - if(slot == slot_wear_suit) + if(slot == SLOT_WEAR_SUIT) disguise(user) /obj/item/clothing/suit/cardborg/dropped(mob/living/user) diff --git a/code/modules/clothing/suits/toggles.dm b/code/modules/clothing/suits/toggles.dm index d09db447a8..c7d91604cf 100644 --- a/code/modules/clothing/suits/toggles.dm +++ b/code/modules/clothing/suits/toggles.dm @@ -24,11 +24,11 @@ ToggleHood() /obj/item/clothing/suit/hooded/item_action_slot_check(slot, mob/user) - if(slot == slot_wear_suit) + if(slot == SLOT_WEAR_SUIT) return 1 /obj/item/clothing/suit/hooded/equipped(mob/user, slot) - if(slot != slot_wear_suit) + if(slot != SLOT_WEAR_SUIT) RemoveHood() ..() @@ -59,7 +59,7 @@ if(H.head) to_chat(H, "You're already wearing something on your head!") return - else if(H.equip_to_slot_if_possible(hood,slot_head,0,0,1)) + else if(H.equip_to_slot_if_possible(hood,SLOT_HEAD,0,0,1)) suittoggled = TRUE src.icon_state = "[initial(icon_state)]_t" H.update_inv_wear_suit() @@ -83,7 +83,7 @@ /obj/item/clothing/head/hooded/equipped(mob/user, slot) ..() - if(slot != slot_head) + if(slot != SLOT_HEAD) if(suit) suit.RemoveHood() else @@ -155,7 +155,7 @@ /obj/item/clothing/suit/space/hardsuit/equipped(mob/user, slot) if(!helmettype) return - if(slot != slot_wear_suit) + if(slot != SLOT_WEAR_SUIT) RemoveHelmet() ..() @@ -192,7 +192,7 @@ if(H.head) to_chat(H, "You're already wearing something on your head!") return - else if(H.equip_to_slot_if_possible(helmet,slot_head,0,0,1)) + else if(H.equip_to_slot_if_possible(helmet,SLOT_HEAD,0,0,1)) to_chat(H, "You engage the helmet on the hardsuit.") suittoggled = TRUE H.update_inv_wear_suit() diff --git a/code/modules/clothing/under/_under.dm b/code/modules/clothing/under/_under.dm index dd290fdaa2..4d037d652b 100644 --- a/code/modules/clothing/under/_under.dm +++ b/code/modules/clothing/under/_under.dm @@ -3,7 +3,7 @@ name = "under" body_parts_covered = CHEST|GROIN|LEGS|ARMS permeability_coefficient = 0.9 - slot_flags = SLOT_ICLOTHING + slot_flags = ITEM_SLOT_ICLOTHING armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) var/fitted = FEMALE_UNIFORM_FULL // For use in alternate clothing styles for women var/has_sensor = HAS_SENSORS // For the crew computer @@ -65,7 +65,7 @@ adjusted = DIGITIGRADE_STYLE H.update_inv_w_uniform() - if(attached_accessory && slot != slot_hands && ishuman(user)) + if(attached_accessory && slot != SLOT_HANDS && ishuman(user)) var/mob/living/carbon/human/H = user attached_accessory.on_uniform_equip(src, user) if(attached_accessory.above_suit) diff --git a/code/modules/clothing/under/color.dm b/code/modules/clothing/under/color.dm index 3a12f00a05..afb9bff1c1 100644 --- a/code/modules/clothing/under/color.dm +++ b/code/modules/clothing/under/color.dm @@ -9,7 +9,7 @@ var/obj/item/clothing/under/color/C = pick(subtypesof(/obj/item/clothing/under/color) - /obj/item/clothing/under/color/random - /obj/item/clothing/under/color/grey/glorf - /obj/item/clothing/under/color/black/ghost) if(ishuman(loc)) var/mob/living/carbon/human/H = loc - H.equip_to_slot_or_del(new C(H), slot_w_uniform) //or else you end up with naked assistants running around everywhere... + H.equip_to_slot_or_del(new C(H), SLOT_W_UNIFORM) //or else you end up with naked assistants running around everywhere... else new C(loc) return INITIALIZE_HINT_QDEL diff --git a/code/modules/detectivework/scanner.dm b/code/modules/detectivework/scanner.dm index e7589aa15f..87f7d6d8f3 100644 --- a/code/modules/detectivework/scanner.dm +++ b/code/modules/detectivework/scanner.dm @@ -11,7 +11,7 @@ lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' flags_1 = CONDUCT_1 | NOBLUDGEON_1 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT var/scanning = 0 var/list/log = list() var/range = 8 diff --git a/code/modules/events/wizard/curseditems.dm b/code/modules/events/wizard/curseditems.dm index 9de5a93292..180589b4f1 100644 --- a/code/modules/events/wizard/curseditems.dm +++ b/code/modules/events/wizard/curseditems.dm @@ -11,29 +11,29 @@ /datum/round_event/wizard/cursed_items/start() var/item_set = pick("wizardmimic", "swords", "bigfatdoobie", "boxing", "voicemodulators", "catgirls2015") - var/list/loadout[slots_amt] + var/list/loadout[SLOTS_AMT] var/ruins_spaceworthiness var/ruins_wizard_loadout switch(item_set) if("wizardmimic") - loadout[slot_wear_suit] = /obj/item/clothing/suit/wizrobe - loadout[slot_shoes] = /obj/item/clothing/shoes/sandal/magic - loadout[slot_head] = /obj/item/clothing/head/wizard + loadout[SLOT_WEAR_SUIT] = /obj/item/clothing/suit/wizrobe + loadout[SLOT_SHOES] = /obj/item/clothing/shoes/sandal/magic + loadout[SLOT_HEAD] = /obj/item/clothing/head/wizard ruins_spaceworthiness = 1 if("swords") - loadout[slot_hands] = /obj/item/katana/cursed + loadout[SLOT_HANDS] = /obj/item/katana/cursed if("bigfatdoobie") - loadout[slot_wear_mask] = /obj/item/clothing/mask/cigarette/rollie/trippy + loadout[SLOT_WEAR_MASK] = /obj/item/clothing/mask/cigarette/rollie/trippy ruins_spaceworthiness = 1 if("boxing") - loadout[slot_wear_mask] = /obj/item/clothing/mask/luchador - loadout[slot_gloves] = /obj/item/clothing/gloves/boxing + loadout[SLOT_WEAR_MASK] = /obj/item/clothing/mask/luchador + loadout[SLOT_GLOVES] = /obj/item/clothing/gloves/boxing ruins_spaceworthiness = 1 if("voicemodulators") - loadout[slot_wear_mask] = /obj/item/clothing/mask/chameleon + loadout[SLOT_WEAR_MASK] = /obj/item/clothing/mask/chameleon if("catgirls2015") - loadout[slot_head] = /obj/item/clothing/head/kitty + loadout[SLOT_HEAD] = /obj/item/clothing/head/kitty ruins_spaceworthiness = 1 ruins_wizard_loadout = 1 diff --git a/code/modules/food_and_drinks/food/snacks_bread.dm b/code/modules/food_and_drinks/food/snacks_bread.dm index c29ed30b22..d59025dca6 100644 --- a/code/modules/food_and_drinks/food/snacks_bread.dm +++ b/code/modules/food_and_drinks/food/snacks_bread.dm @@ -13,7 +13,7 @@ custom_food_type = /obj/item/reagent_containers/food/snacks/customizable/sandwich filling_color = "#FFA500" list_reagents = list("nutriment" = 2) - slot_flags = SLOT_HEAD + slot_flags = ITEM_SLOT_HEAD customfoodfilling = 0 //to avoid infinite bread-ception foodtype = GRAIN diff --git a/code/modules/hydroponics/grown/ambrosia.dm b/code/modules/hydroponics/grown/ambrosia.dm index 05cd54a9f0..5883b4dd64 100644 --- a/code/modules/hydroponics/grown/ambrosia.dm +++ b/code/modules/hydroponics/grown/ambrosia.dm @@ -4,7 +4,7 @@ name = "ambrosia branch" desc = "This is a plant." icon_state = "ambrosiavulgaris" - slot_flags = SLOT_HEAD + slot_flags = ITEM_SLOT_HEAD filling_color = "#008000" bitesize_mod = 2 foodtype = VEGETABLES diff --git a/code/modules/hydroponics/grown/flowers.dm b/code/modules/hydroponics/grown/flowers.dm index 18eae2f4fd..8455df887e 100644 --- a/code/modules/hydroponics/grown/flowers.dm +++ b/code/modules/hydroponics/grown/flowers.dm @@ -22,7 +22,7 @@ name = "poppy" desc = "Long-used as a symbol of rest, peace, and death." icon_state = "poppy" - slot_flags = SLOT_HEAD + slot_flags = ITEM_SLOT_HEAD filling_color = "#FF6347" bitesize_mod = 3 foodtype = VEGETABLES | GROSS @@ -86,7 +86,7 @@ name = "harebell" desc = "\"I'll sweeten thy sad grave: thou shalt not lack the flower that's like thy face, pale primrose, nor the azured hare-bell, like thy veins; no, nor the leaf of eglantine, whom not to slander, out-sweeten'd not thy breath.\"" icon_state = "harebell" - slot_flags = SLOT_HEAD + slot_flags = ITEM_SLOT_HEAD filling_color = "#E6E6FA" bitesize_mod = 3 @@ -118,7 +118,7 @@ righthand_file = 'icons/mob/inhands/weapons/plants_righthand.dmi' damtype = "fire" force = 0 - slot_flags = SLOT_HEAD + slot_flags = ITEM_SLOT_HEAD throwforce = 0 w_class = WEIGHT_CLASS_TINY throw_speed = 1 @@ -149,7 +149,7 @@ name = "moonflower" desc = "Store in a location at least 50 yards away from werewolves." icon_state = "moonflower" - slot_flags = SLOT_HEAD + slot_flags = ITEM_SLOT_HEAD filling_color = "#E6E6FA" bitesize_mod = 2 @@ -176,7 +176,7 @@ righthand_file = 'icons/mob/inhands/weapons/plants_righthand.dmi' damtype = "fire" force = 0 - slot_flags = SLOT_HEAD + slot_flags = ITEM_SLOT_HEAD throwforce = 0 w_class = WEIGHT_CLASS_TINY throw_speed = 1 diff --git a/code/modules/hydroponics/hydroitemdefines.dm b/code/modules/hydroponics/hydroitemdefines.dm index 1c3509fa4e..6c45d21dad 100644 --- a/code/modules/hydroponics/hydroitemdefines.dm +++ b/code/modules/hydroponics/hydroitemdefines.dm @@ -8,7 +8,7 @@ lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' w_class = WEIGHT_CLASS_TINY - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT materials = list(MAT_METAL=30, MAT_GLASS=20) // ************************************* @@ -112,7 +112,7 @@ w_class = WEIGHT_CLASS_BULKY flags_1 = CONDUCT_1 armour_penetration = 20 - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK attack_verb = list("chopped", "sliced", "cut", "reaped") hitsound = 'sound/weapons/bladeslice.ogg' var/swiping = FALSE diff --git a/code/modules/jobs/job_types/cargo_service.dm b/code/modules/jobs/job_types/cargo_service.dm index 5c761cec25..10e1ca4bb3 100644 --- a/code/modules/jobs/job_types/cargo_service.dm +++ b/code/modules/jobs/job_types/cargo_service.dm @@ -111,7 +111,7 @@ Shaft Miner mask = /obj/item/clothing/mask/gas/explorer glasses = /obj/item/clothing/glasses/meson suit_store = /obj/item/tank/internals/oxygen - internals_slot = slot_s_store + internals_slot = SLOT_S_STORE backpack_contents = list( /obj/item/storage/bag/ore=1, /obj/item/kitchen/knife/combat/survival=1, @@ -220,7 +220,7 @@ Cook var/list/possible_boxes = subtypesof(/obj/item/storage/box/ingredients) var/chosen_box = pick(possible_boxes) var/obj/item/storage/box/I = new chosen_box(src) - H.equip_to_slot_or_del(I,slot_in_backpack) + H.equip_to_slot_or_del(I,SLOT_IN_BACKPACK) var/datum/martial_art/cqc/under_siege/justacook = new justacook.teach(H) diff --git a/code/modules/jobs/job_types/civilian_chaplain.dm b/code/modules/jobs/job_types/civilian_chaplain.dm index 5e56fe5b4f..2f94d4d3b8 100644 --- a/code/modules/jobs/job_types/civilian_chaplain.dm +++ b/code/modules/jobs/job_types/civilian_chaplain.dm @@ -31,7 +31,7 @@ Chaplain B.icon_state = SSreligion.bible_icon_state B.item_state = SSreligion.bible_item_state to_chat(H, "There is already an established religion onboard the station. You are an acolyte of [SSreligion.deity]. Defer to the Chaplain.") - H.equip_to_slot_or_del(B, slot_in_backpack) + H.equip_to_slot_or_del(B, SLOT_IN_BACKPACK) var/nrt = SSreligion.holy_weapon_type || /obj/item/nullrod var/obj/item/nullrod/N = new nrt(H) H.put_in_hands(N) @@ -79,7 +79,7 @@ Chaplain SSreligion.bible_name = B.name SSreligion.deity = B.deity_name - H.equip_to_slot_or_del(B, slot_in_backpack) + H.equip_to_slot_or_del(B, SLOT_IN_BACKPACK) SSblackbox.record_feedback("text", "religion_name", 1, "[new_religion]", 1) SSblackbox.record_feedback("text", "religion_deity", 1, "[new_deity]", 1) diff --git a/code/modules/jobs/job_types/engineering.dm b/code/modules/jobs/job_types/engineering.dm index 82a6fe1382..3d92b8a772 100644 --- a/code/modules/jobs/job_types/engineering.dm +++ b/code/modules/jobs/job_types/engineering.dm @@ -48,7 +48,7 @@ Chief Engineer satchel = /obj/item/storage/backpack/satchel/eng duffelbag = /obj/item/storage/backpack/duffelbag/engineering box = /obj/item/storage/box/engineer - pda_slot = slot_l_store + pda_slot = SLOT_L_STORE /datum/outfit/job/ce/rig name = "Chief Engineer (Hardsuit)" @@ -59,7 +59,7 @@ Chief Engineer suit_store = /obj/item/tank/internals/oxygen gloves = /obj/item/clothing/gloves/color/yellow head = null - internals_slot = slot_s_store + internals_slot = SLOT_S_STORE /* @@ -102,8 +102,13 @@ Station Engineer satchel = /obj/item/storage/backpack/satchel/eng duffelbag = /obj/item/storage/backpack/duffelbag/engineering box = /obj/item/storage/box/engineer +<<<<<<< HEAD pda_slot = slot_l_store backpack_contents = list(/obj/item/device/modular_computer/tablet/preset/advanced=1) +======= + pda_slot = SLOT_L_STORE + backpack_contents = list(/obj/item/modular_computer/tablet/preset/advanced=1) +>>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme /datum/outfit/job/engineer/gloved name = "Station Engineer (Gloves)" @@ -116,7 +121,7 @@ Station Engineer suit = /obj/item/clothing/suit/space/hardsuit/engine suit_store = /obj/item/tank/internals/oxygen head = null - internals_slot = slot_s_store + internals_slot = SLOT_S_STORE /* @@ -156,8 +161,13 @@ Atmospheric Technician satchel = /obj/item/storage/backpack/satchel/eng duffelbag = /obj/item/storage/backpack/duffelbag/engineering box = /obj/item/storage/box/engineer +<<<<<<< HEAD pda_slot = slot_l_store backpack_contents = list(/obj/item/device/modular_computer/tablet/preset/advanced=1) +======= + pda_slot = SLOT_L_STORE + backpack_contents = list(/obj/item/modular_computer/tablet/preset/advanced=1) +>>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme /datum/outfit/job/atmos/rig name = "Atmospheric Technician (Hardsuit)" @@ -165,4 +175,4 @@ Atmospheric Technician mask = /obj/item/clothing/mask/gas suit = /obj/item/clothing/suit/space/hardsuit/engine/atmos suit_store = /obj/item/tank/internals/oxygen - internals_slot = slot_s_store + internals_slot = SLOT_S_STORE diff --git a/code/modules/jobs/job_types/job.dm b/code/modules/jobs/job_types/job.dm index c384d21e97..d381c85b8d 100644 --- a/code/modules/jobs/job_types/job.dm +++ b/code/modules/jobs/job_types/job.dm @@ -151,7 +151,7 @@ var/duffelbag = /obj/item/storage/backpack/duffelbag var/box = /obj/item/storage/box/survival - var/pda_slot = slot_belt + var/pda_slot = SLOT_BELT /datum/outfit/job/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE) switch(H.backbag) diff --git a/code/modules/jobs/job_types/science.dm b/code/modules/jobs/job_types/science.dm index 2648bd2516..5ce6b1e967 100644 --- a/code/modules/jobs/job_types/science.dm +++ b/code/modules/jobs/job_types/science.dm @@ -56,7 +56,7 @@ Research Director mask = /obj/item/clothing/mask/breath suit = /obj/item/clothing/suit/space/hardsuit/rd suit_store = /obj/item/tank/internals/oxygen - internals_slot = slot_s_store + internals_slot = SLOT_S_STORE /* Scientist @@ -128,4 +128,4 @@ Roboticist backpack = /obj/item/storage/backpack/science satchel = /obj/item/storage/backpack/satchel/tox - pda_slot = slot_l_store + pda_slot = SLOT_L_STORE diff --git a/code/modules/jobs/job_types/security.dm b/code/modules/jobs/job_types/security.dm index 3cfd5ef73d..22a229e6b2 100644 --- a/code/modules/jobs/job_types/security.dm +++ b/code/modules/jobs/job_types/security.dm @@ -244,7 +244,7 @@ GLOBAL_LIST_INIT(available_depts, list(SEC_DEPT_ENGINEERING, SEC_DEPT_MEDICAL, S if(ears) if(H.ears) qdel(H.ears) - H.equip_to_slot_or_del(new ears(H),slot_ears) + H.equip_to_slot_or_del(new ears(H),SLOT_EARS) var/obj/item/card/id/W = H.wear_id W.access |= dep_access diff --git a/code/modules/keybindings/bindings_human.dm b/code/modules/keybindings/bindings_human.dm index 7c52917386..14890cc7e2 100644 --- a/code/modules/keybindings/bindings_human.dm +++ b/code/modules/keybindings/bindings_human.dm @@ -3,12 +3,12 @@ switch(_key) if("E") // Put held thing in belt or take out most recent thing from belt var/obj/item/thing = get_active_held_item() - var/obj/item/storage/equipped_belt = get_item_by_slot(slot_belt) + var/obj/item/storage/equipped_belt = get_item_by_slot(SLOT_BELT) if(!equipped_belt) // We also let you equip a belt like this if(!thing) to_chat(user, "You have no belt to take something out of.") return - equip_to_slot_if_possible(thing, slot_belt) + equip_to_slot_if_possible(thing, SLOT_BELT) return if(!istype(equipped_belt)) // not a storage item if(!thing) @@ -31,12 +31,12 @@ if("B") // Put held thing in backpack or take out most recent thing from backpack var/obj/item/thing = get_active_held_item() - var/obj/item/storage/equipped_backpack = get_item_by_slot(slot_back) + var/obj/item/storage/equipped_backpack = get_item_by_slot(SLOT_BACK) if(!equipped_backpack) // We also let you equip a backpack like this if(!thing) to_chat(user, "You have no backpack to take something out of.") return - equip_to_slot_if_possible(thing, slot_back) + equip_to_slot_if_possible(thing, SLOT_BACK) return if(!istype(equipped_backpack)) // not a storage item if(!thing) diff --git a/code/modules/mining/equipment/kinetic_crusher.dm b/code/modules/mining/equipment/kinetic_crusher.dm index 5b86a2d340..558147af23 100644 --- a/code/modules/mining/equipment/kinetic_crusher.dm +++ b/code/modules/mining/equipment/kinetic_crusher.dm @@ -10,7 +10,7 @@ While it is an effective mining tool, it did little to aid any but the most skilled and/or suicidal miners against local fauna." force = 20 //As much as a bone spear, but this is significantly more annoying to carry around due to requiring the use of both hands at all times w_class = WEIGHT_CLASS_BULKY - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK force_unwielded = 20 //It's never not wielded so these are the same force_wielded = 20 throwforce = 5 diff --git a/code/modules/mining/equipment/mineral_scanner.dm b/code/modules/mining/equipment/mineral_scanner.dm index ec3dda28a0..cf14184a0c 100644 --- a/code/modules/mining/equipment/mineral_scanner.dm +++ b/code/modules/mining/equipment/mineral_scanner.dm @@ -8,7 +8,7 @@ righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' w_class = WEIGHT_CLASS_SMALL flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT var/cooldown = 35 var/current_cooldown = 0 @@ -37,7 +37,7 @@ righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' w_class = WEIGHT_CLASS_SMALL flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT var/cooldown = 35 var/current_cooldown = 0 var/range = 7 diff --git a/code/modules/mining/equipment/mining_tools.dm b/code/modules/mining/equipment/mining_tools.dm index e73349198b..cbd8717869 100644 --- a/code/modules/mining/equipment/mining_tools.dm +++ b/code/modules/mining/equipment/mining_tools.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/mining.dmi' icon_state = "pickaxe" flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT | SLOT_BACK + slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_BACK force = 15 throwforce = 10 item_state = "pickaxe" @@ -30,7 +30,7 @@ icon_state = "minipick" force = 10 throwforce = 7 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT w_class = WEIGHT_CLASS_NORMAL materials = list(MAT_METAL=1000) @@ -54,7 +54,7 @@ name = "mining drill" icon_state = "handdrill" item_state = "jackhammer" - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT toolspeed = 0.6 //available from roundstart, faster than a pickaxe. usesound = 'sound/weapons/drill.ogg' hitsound = 'sound/weapons/drill.ogg' @@ -93,7 +93,7 @@ lefthand_file = 'icons/mob/inhands/equipment/mining_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/mining_righthand.dmi' flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT force = 8 tool_behaviour = TOOL_SHOVEL toolspeed = 1 diff --git a/code/modules/mining/equipment/wormhole_jaunter.dm b/code/modules/mining/equipment/wormhole_jaunter.dm index 42e69f8fb2..03c46086c4 100644 --- a/code/modules/mining/equipment/wormhole_jaunter.dm +++ b/code/modules/mining/equipment/wormhole_jaunter.dm @@ -11,7 +11,7 @@ w_class = WEIGHT_CLASS_SMALL throw_speed = 3 throw_range = 5 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT /obj/item/device/wormhole_jaunter/attack_self(mob/user) user.visible_message("[user.name] activates the [src.name]!") @@ -53,7 +53,7 @@ /obj/item/device/wormhole_jaunter/emp_act(power) var/triggered = FALSE - if(usr.get_item_by_slot(slot_belt) == src) + if(usr.get_item_by_slot(SLOT_BELT) == src) if(power == 1) triggered = TRUE else if(power == 2 && prob(50)) @@ -64,8 +64,13 @@ SSblackbox.record_feedback("tally", "jaunter", 1, "EMP") // EMP accidental activation activate(usr) +<<<<<<< HEAD /obj/item/device/wormhole_jaunter/proc/chasm_react(mob/user) if(user.get_item_by_slot(slot_belt) == src) +======= +/obj/item/wormhole_jaunter/proc/chasm_react(mob/user) + if(user.get_item_by_slot(SLOT_BELT) == src) +>>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme to_chat(user, "Your [src] activates, saving you from the chasm!") SSblackbox.record_feedback("tally", "jaunter", 1, "Chasm") // chasm automatic activation activate(user, FALSE) diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index 45ede2d337..8dc95d54e2 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -438,7 +438,7 @@ desc = "Somehow, it's in two places at once." icon = 'icons/obj/storage.dmi' icon_state = "cultpack" - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK resistance_flags = INDESTRUCTIBLE /obj/item/device/shared_storage/red @@ -558,7 +558,7 @@ inhand_y_dimension = 64 icon_state = "cleaving_saw" icon_state_on = "cleaving_saw_open" - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT attack_verb_off = list("attacked", "sawed", "sliced", "torn", "ripped", "diced", "cut") attack_verb_on = list("cleaved", "swiped", "slashed", "chopped") hitsound = 'sound/weapons/bladeslice.ogg' @@ -816,7 +816,7 @@ lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi' icon = 'icons/obj/guns/magic.dmi' - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK w_class = WEIGHT_CLASS_BULKY force = 25 damtype = BURN @@ -993,7 +993,7 @@ righthand_file = 'icons/mob/inhands/64x64_righthand.dmi' inhand_x_dimension = 64 inhand_y_dimension = 64 - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK w_class = WEIGHT_CLASS_BULKY force = 15 attack_verb = list("clubbed", "beat", "pummeled") diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index a7b28dd658..226b5e3492 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -180,7 +180,7 @@ held_items[hand_index] = I I.layer = ABOVE_HUD_LAYER I.plane = ABOVE_HUD_PLANE - I.equipped(src, slot_hands) + I.equipped(src, SLOT_HANDS) if(I.pulledby) I.pulledby.stop_pulling() update_inv_hands() @@ -396,7 +396,7 @@ if(M.active_storage && M.active_storage.parent && M.active_storage.parent.SendSignal(COMSIG_TRY_STORAGE_INSERT, src,M)) return TRUE - var/list/obj/item/possible = list(M.get_inactive_held_item(), M.get_item_by_slot(slot_belt), M.get_item_by_slot(slot_generic_dextrous_storage), M.get_item_by_slot(slot_back)) + var/list/obj/item/possible = list(M.get_inactive_held_item(), M.get_item_by_slot(SLOT_BELT), M.get_item_by_slot(SLOT_GENERC_DEXTROUS_STORAGE), M.get_item_by_slot(SLOT_BACK)) for(var/i in possible) if(!i) continue @@ -418,10 +418,10 @@ //used in code for items usable by both carbon and drones, this gives the proper back slot for each mob.(defibrillator, backpack watertank, ...) /mob/proc/getBackSlot() - return slot_back + return SLOT_BACK /mob/proc/getBeltSlot() - return slot_belt + return SLOT_BELT diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm index 24dd3a7965..2216d955c0 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm @@ -45,13 +45,13 @@
"} for(var/i in 1 to held_items.len) var/obj/item/I = get_item_for_held_index(i) - dat += "
[get_held_index_name(i)]:[(I && !(I.flags_1 & ABSTRACT_1)) ? I : "Empty"]" + dat += "
[get_held_index_name(i)]:[(I && !(I.flags_1 & ABSTRACT_1)) ? I : "Empty"]" dat += "
Empty Pouches" if(handcuffed) - dat += "
Handcuffed" + dat += "
Handcuffed" if(legcuffed) - dat += "
Legcuffed" + dat += "
Legcuffed" dat += {"
diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm index a5368fc7c0..50dceac0c5 100644 --- a/code/modules/mob/living/carbon/alien/special/facehugger.dm +++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm @@ -169,7 +169,7 @@ if(target.dropItemToGround(W)) target.visible_message("[src] tears [W] off of [target]'s face!", \ "[src] tears [W] off of [target]'s face!") - target.equip_to_slot_if_possible(src, slot_wear_mask, 0, 1, 1) + target.equip_to_slot_if_possible(src, SLOT_WEAR_MASK, 0, 1, 1) return TRUE // time for a smoke /obj/item/clothing/mask/facehugger/proc/Attach(mob/living/M) @@ -254,7 +254,7 @@ return 1 var/mob/living/carbon/C = M - if(ishuman(C) && !(slot_wear_mask in C.dna.species.no_equip)) + if(ishuman(C) && !(SLOT_WEAR_MASK in C.dna.species.no_equip)) var/mob/living/carbon/human/H = C if(H.is_mouth_covered(head_only = 1)) return 0 diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index ebf66a675e..df1a90a868 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -202,23 +202,23 @@
[name]
-
Head: [(head && !(head.flags_1&ABSTRACT_1)) ? head : "Nothing"] -
Mask: [(wear_mask && !(wear_mask.flags_1&ABSTRACT_1)) ? wear_mask : "Nothing"] -
Neck: [(wear_neck && !(wear_neck.flags_1&ABSTRACT_1)) ? wear_neck : "Nothing"]"} +
Head: [(head && !(head.flags_1&ABSTRACT_1)) ? head : "Nothing"] +
Mask: [(wear_mask && !(wear_mask.flags_1&ABSTRACT_1)) ? wear_mask : "Nothing"] +
Neck: [(wear_neck && !(wear_neck.flags_1&ABSTRACT_1)) ? wear_neck : "Nothing"]"} for(var/i in 1 to held_items.len) var/obj/item/I = get_item_for_held_index(i) - dat += "
[get_held_index_name(i)]:[(I && !(I.flags_1 & ABSTRACT_1)) ? I : "Nothing"]" + dat += "
[get_held_index_name(i)]:[(I && !(I.flags_1 & ABSTRACT_1)) ? I : "Nothing"]" - dat += "
Back: [back ? back : "Nothing"]" + dat += "
Back: [back ? back : "Nothing"]" if(istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/tank)) dat += "
[internal ? "Disable Internals" : "Set Internals"]" if(handcuffed) - dat += "
Handcuffed" + dat += "
Handcuffed" if(legcuffed) - dat += "
Legcuffed" + dat += "
Legcuffed" dat += {"
diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 7672b7f8dc..e569766542 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -19,7 +19,7 @@ var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE)) //uniform - if(w_uniform && !(slot_w_uniform in obscured)) + if(w_uniform && !(SLOT_W_UNIFORM in obscured)) //accessory var/accessory_msg if(istype(w_uniform, /obj/item/clothing/under)) @@ -48,7 +48,7 @@ GET_COMPONENT(FR, /datum/component/forensics) //gloves - if(gloves && !(slot_gloves in obscured)) + if(gloves && !(SLOT_GLOVES in obscured)) msg += "[t_He] [t_has] [gloves.get_examine_string(user)] on [t_his] hands.\n" else if(FR && length(FR.blood_DNA)) var/hand_number = get_num_arms() @@ -69,22 +69,22 @@ msg += "[t_He] [t_has] [belt.get_examine_string(user)] about [t_his] waist.\n" //shoes - if(shoes && !(slot_shoes in obscured)) + if(shoes && !(SLOT_SHOES in obscured)) msg += "[t_He] [t_is] wearing [shoes.get_examine_string(user)] on [t_his] feet.\n" //mask - if(wear_mask && !(slot_wear_mask in obscured)) + if(wear_mask && !(SLOT_WEAR_MASK in obscured)) msg += "[t_He] [t_has] [wear_mask.get_examine_string(user)] on [t_his] face.\n" - if (wear_neck && !(slot_neck in obscured)) + if (wear_neck && !(SLOT_NECK in obscured)) msg += "[t_He] [t_is] wearing [wear_neck.get_examine_string(user)] around [t_his] neck.\n" //eyes - if(glasses && !(slot_glasses in obscured)) + if(glasses && !(SLOT_GLASSES in obscured)) msg += "[t_He] [t_has] [glasses.get_examine_string(user)] covering [t_his] eyes.\n" //ears - if(ears && !(slot_ears in obscured)) + if(ears && !(SLOT_EARS in obscured)) msg += "[t_He] [t_has] [ears.get_examine_string(user)] on [t_his] ears.\n" //ID diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 6c63c32904..cba1b4728f 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -115,80 +115,80 @@ dat += "" for(var/i in 1 to held_items.len) var/obj/item/I = get_item_for_held_index(i) - dat += "" + dat += "" dat += "" - dat += "" - dat += "" + dat += "" - if(slot_wear_mask in obscured) + if(SLOT_WEAR_MASK in obscured) dat += "" else - dat += "" + dat += "" - if(slot_neck in obscured) + if(SLOT_NECK in obscured) dat += "" else - dat += "" + dat += "" - if(slot_glasses in obscured) + if(SLOT_GLASSES in obscured) dat += "" else - dat += "" + dat += "" - if(slot_ears in obscured) + if(SLOT_EARS in obscured) dat += "" else - dat += "" + dat += "" dat += "" - dat += "" + dat += "" if(wear_suit) - dat += "" else dat += "" - if(slot_shoes in obscured) + if(SLOT_SHOES in obscured) dat += "" else - dat += "" + dat += "" - if(slot_gloves in obscured) + if(SLOT_GLOVES in obscured) dat += "" else - dat += "" + dat += "" - if(slot_w_uniform in obscured) + if(SLOT_W_UNIFORM in obscured) dat += "" else - dat += "" + dat += "" - if((w_uniform == null && !(dna && dna.species.nojumpsuit)) || (slot_w_uniform in obscured)) + if((w_uniform == null && !(dna && dna.species.nojumpsuit)) || (SLOT_W_UNIFORM in obscured)) dat += "" dat += "" dat += "" else - dat += "" dat += "" - dat += "" + dat += "" if(handcuffed) - dat += "" + dat += "" if(legcuffed) - dat += "" + dat += "" dat += {"
[get_held_index_name(i)]:[(I && !(I.flags_1 & ABSTRACT_1)) ? I : "Empty"]
[get_held_index_name(i)]:[(I && !(I.flags_1 & ABSTRACT_1)) ? I : "Empty"]
 
Back:[(back && !(back.flags_1&ABSTRACT_1)) ? back : "Empty"]" + dat += "
Back:[(back && !(back.flags_1&ABSTRACT_1)) ? back : "Empty"]" if(has_breathable_mask && istype(back, /obj/item/tank)) - dat += " [internal ? "Disable Internals" : "Set Internals"]" + dat += " [internal ? "Disable Internals" : "Set Internals"]" dat += "
 
Head:[(head && !(head.flags_1&ABSTRACT_1)) ? head : "Empty"]
Head:[(head && !(head.flags_1&ABSTRACT_1)) ? head : "Empty"]
Mask:Obscured
Mask:[(wear_mask && !(wear_mask.flags_1&ABSTRACT_1)) ? wear_mask : "Empty"]
Mask:[(wear_mask && !(wear_mask.flags_1&ABSTRACT_1)) ? wear_mask : "Empty"]
Neck:Obscured
Neck:[(wear_neck && !(wear_neck.flags_1&ABSTRACT_1)) ? wear_neck : "Empty"]
Neck:[(wear_neck && !(wear_neck.flags_1&ABSTRACT_1)) ? wear_neck : "Empty"]
Eyes:Obscured
Eyes:[(glasses && !(glasses.flags_1&ABSTRACT_1)) ? glasses : "Empty"]
Eyes:[(glasses && !(glasses.flags_1&ABSTRACT_1)) ? glasses : "Empty"]
Ears:Obscured
Ears:[(ears && !(ears.flags_1&ABSTRACT_1)) ? ears : "Empty"]
Ears:[(ears && !(ears.flags_1&ABSTRACT_1)) ? ears : "Empty"]
 
Exosuit:[(wear_suit && !(wear_suit.flags_1&ABSTRACT_1)) ? wear_suit : "Empty"]
Exosuit:[(wear_suit && !(wear_suit.flags_1&ABSTRACT_1)) ? wear_suit : "Empty"]
 ↳Suit Storage:[(s_store && !(s_store.flags_1&ABSTRACT_1)) ? s_store : "Empty"]" + dat += "
 ↳Suit Storage:[(s_store && !(s_store.flags_1&ABSTRACT_1)) ? s_store : "Empty"]" if(has_breathable_mask && istype(s_store, /obj/item/tank)) - dat += " [internal ? "Disable Internals" : "Set Internals"]" + dat += " [internal ? "Disable Internals" : "Set Internals"]" dat += "
 ↳Suit Storage:
Shoes:Obscured
Shoes:[(shoes && !(shoes.flags_1&ABSTRACT_1)) ? shoes : "Empty"]
Shoes:[(shoes && !(shoes.flags_1&ABSTRACT_1)) ? shoes : "Empty"]
Gloves:Obscured
Gloves:[(gloves && !(gloves.flags_1&ABSTRACT_1)) ? gloves : "Empty"]
Gloves:[(gloves && !(gloves.flags_1&ABSTRACT_1)) ? gloves : "Empty"]
Uniform:Obscured
Uniform:[(w_uniform && !(w_uniform.flags_1&ABSTRACT_1)) ? w_uniform : "Empty"]
Uniform:[(w_uniform && !(w_uniform.flags_1&ABSTRACT_1)) ? w_uniform : "Empty"]
 ↳Pockets:
 ↳ID:
 ↳Belt:
 ↳Belt:[(belt && !(belt.flags_1&ABSTRACT_1)) ? belt : "Empty"]" + dat += "
 ↳Belt:[(belt && !(belt.flags_1&ABSTRACT_1)) ? belt : "Empty"]" if(has_breathable_mask && istype(belt, /obj/item/tank)) - dat += " [internal ? "Disable Internals" : "Set Internals"]" + dat += " [internal ? "Disable Internals" : "Set Internals"]" dat += "
 ↳Pockets:[(l_store && !(l_store.flags_1&ABSTRACT_1)) ? "Left (Full)" : "Left (Empty)"]" dat += " [(r_store && !(r_store.flags_1&ABSTRACT_1)) ? "Right (Full)" : "Right (Empty)"]
 ↳ID:[(wear_id && !(wear_id.flags_1&ABSTRACT_1)) ? wear_id : "Empty"]
 ↳ID:[(wear_id && !(wear_id.flags_1&ABSTRACT_1)) ? wear_id : "Empty"]
Handcuffed: Remove
Handcuffed: Remove
Legcuffed
Legcuffed
Close @@ -241,8 +241,8 @@ if(href_list["pockets"]) var/pocket_side = href_list["pockets"] - var/pocket_id = (pocket_side == "right" ? slot_r_store : slot_l_store) - var/obj/item/pocket_item = (pocket_id == slot_r_store ? r_store : l_store) + var/pocket_id = (pocket_side == "right" ? SLOT_R_STORE : SLOT_L_STORE) + var/obj/item/pocket_item = (pocket_id == SLOT_R_STORE ? r_store : l_store) var/obj/item/place_item = usr.get_active_held_item() // Item to place in the pocket, if it's empty var/delay_denominator = 1 @@ -258,7 +258,7 @@ if(do_mob(usr, src, POCKET_STRIP_DELAY/delay_denominator)) //placing an item into the pocket is 4 times faster if(pocket_item) - if(pocket_item == (pocket_id == slot_r_store ? r_store : l_store)) //item still in the pocket we search + if(pocket_item == (pocket_id == SLOT_R_STORE ? r_store : l_store)) //item still in the pocket we search dropItemToGround(pocket_item) else if(place_item) @@ -510,23 +510,23 @@ if(wear_suit) if(wear_suit.flags_inv & HIDEGLOVES) - obscured |= slot_gloves + obscured |= SLOT_GLOVES if(wear_suit.flags_inv & HIDEJUMPSUIT) - obscured |= slot_w_uniform + obscured |= SLOT_W_UNIFORM if(wear_suit.flags_inv & HIDESHOES) - obscured |= slot_shoes + obscured |= SLOT_SHOES if(head) if(head.flags_inv & HIDEMASK) - obscured |= slot_wear_mask + obscured |= SLOT_WEAR_MASK if(head.flags_inv & HIDEEYES) - obscured |= slot_glasses + obscured |= SLOT_GLASSES if(head.flags_inv & HIDEEARS) - obscured |= slot_ears + obscured |= SLOT_EARS if(wear_mask) if(wear_mask.flags_inv & HIDEEYES) - obscured |= slot_glasses + obscured |= SLOT_GLASSES if(obscured.len) return obscured diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index abd86e7bfc..7e2545f93e 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -4,39 +4,39 @@ // Return the item currently in the slot ID /mob/living/carbon/human/get_item_by_slot(slot_id) switch(slot_id) - if(slot_back) + if(SLOT_BACK) return back - if(slot_wear_mask) + if(SLOT_WEAR_MASK) return wear_mask - if(slot_neck) + if(SLOT_NECK) return wear_neck - if(slot_handcuffed) + if(SLOT_HANDCUFFED) return handcuffed - if(slot_legcuffed) + if(SLOT_LEGCUFFED) return legcuffed - if(slot_belt) + if(SLOT_BELT) return belt - if(slot_wear_id) + if(SLOT_WEAR_ID) return wear_id - if(slot_ears) + if(SLOT_EARS) return ears - if(slot_glasses) + if(SLOT_GLASSES) return glasses - if(slot_gloves) + if(SLOT_GLOVES) return gloves - if(slot_head) + if(SLOT_HEAD) return head - if(slot_shoes) + if(SLOT_SHOES) return shoes - if(slot_wear_suit) + if(SLOT_WEAR_SUIT) return wear_suit - if(slot_w_uniform) + if(SLOT_W_UNIFORM) return w_uniform - if(slot_l_store) + if(SLOT_L_STORE) return l_store - if(slot_r_store) + if(SLOT_R_STORE) return r_store - if(slot_s_store) + if(SLOT_S_STORE) return s_store return null @@ -84,17 +84,17 @@ var/not_handled = FALSE //Added in case we make this type path deeper one day switch(slot) - if(slot_belt) + if(SLOT_BELT) belt = I update_inv_belt() - if(slot_wear_id) + if(SLOT_WEAR_ID) wear_id = I sec_hud_set_ID() update_inv_wear_id() - if(slot_ears) + if(SLOT_EARS) ears = I update_inv_ears() - if(slot_glasses) + if(SLOT_GLASSES) glasses = I var/obj/item/clothing/glasses/G = I if(G.glass_colour_type) @@ -107,13 +107,13 @@ if(G.vision_flags || G.darkness_view || G.invis_override || G.invis_view || !isnull(G.lighting_alpha)) update_sight() update_inv_glasses() - if(slot_gloves) + if(SLOT_GLOVES) gloves = I update_inv_gloves() - if(slot_shoes) + if(SLOT_SHOES) shoes = I update_inv_shoes() - if(slot_wear_suit) + if(SLOT_WEAR_SUIT) wear_suit = I if(I.flags_inv & HIDEJUMPSUIT) update_inv_w_uniform() @@ -121,17 +121,17 @@ stop_pulling() //can't pull if restrained update_action_buttons_icon() //certain action buttons will no longer be usable. update_inv_wear_suit() - if(slot_w_uniform) + if(SLOT_W_UNIFORM) w_uniform = I update_suit_sensors() update_inv_w_uniform() - if(slot_l_store) + if(SLOT_L_STORE) l_store = I update_inv_pockets() - if(slot_r_store) + if(SLOT_R_STORE) r_store = I update_inv_pockets() - if(slot_s_store) + if(SLOT_S_STORE) s_store = I update_inv_s_store() else diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 83b22c7e15..02b2c33044 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -864,48 +864,48 @@ GLOBAL_LIST_EMPTY(roundstart_races) var/num_legs = H.get_num_legs() switch(slot) - if(slot_hands) + if(SLOT_HANDS) if(H.get_empty_held_indexes()) return TRUE return FALSE - if(slot_wear_mask) + if(SLOT_WEAR_MASK) if(H.wear_mask) return FALSE - if(!(I.slot_flags & SLOT_MASK)) + if(!(I.slot_flags & ITEM_SLOT_MASK)) return FALSE if(!H.get_bodypart(BODY_ZONE_HEAD)) return FALSE return equip_delay_self_check(I, H, bypass_equip_delay_self) - if(slot_neck) + if(SLOT_NECK) if(H.wear_neck) return FALSE - if( !(I.slot_flags & SLOT_NECK) ) + if( !(I.slot_flags & ITEM_SLOT_NECK) ) return FALSE return TRUE - if(slot_back) + if(SLOT_BACK) if(H.back) return FALSE - if( !(I.slot_flags & SLOT_BACK) ) + if( !(I.slot_flags & ITEM_SLOT_BACK) ) return FALSE return equip_delay_self_check(I, H, bypass_equip_delay_self) - if(slot_wear_suit) + if(SLOT_WEAR_SUIT) if(H.wear_suit) return FALSE - if( !(I.slot_flags & SLOT_OCLOTHING) ) + if( !(I.slot_flags & ITEM_SLOT_OCLOTHING) ) return FALSE return equip_delay_self_check(I, H, bypass_equip_delay_self) - if(slot_gloves) + if(SLOT_GLOVES) if(H.gloves) return FALSE - if( !(I.slot_flags & SLOT_GLOVES) ) + if( !(I.slot_flags & ITEM_SLOT_GLOVES) ) return FALSE if(num_arms < 2) return FALSE return equip_delay_self_check(I, H, bypass_equip_delay_self) - if(slot_shoes) + if(SLOT_SHOES) if(H.shoes) return FALSE - if( !(I.slot_flags & SLOT_FEET) ) + if( !(I.slot_flags & ITEM_SLOT_FEET) ) return FALSE if(num_legs < 2) return FALSE @@ -914,7 +914,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) to_chat(H, "The footwear around here isn't compatible with your feet!") return FALSE return equip_delay_self_check(I, H, bypass_equip_delay_self) - if(slot_belt) + if(SLOT_BELT) if(H.belt) return FALSE @@ -924,40 +924,40 @@ GLOBAL_LIST_EMPTY(roundstart_races) if(!disable_warning) to_chat(H, "You need a jumpsuit before you can attach this [I.name]!") return FALSE - if(!(I.slot_flags & SLOT_BELT)) + if(!(I.slot_flags & ITEM_SLOT_BELT)) return return equip_delay_self_check(I, H, bypass_equip_delay_self) - if(slot_glasses) + if(SLOT_GLASSES) if(H.glasses) return FALSE - if(!(I.slot_flags & SLOT_EYES)) + if(!(I.slot_flags & ITEM_SLOT_EYES)) return FALSE if(!H.get_bodypart(BODY_ZONE_HEAD)) return FALSE return equip_delay_self_check(I, H, bypass_equip_delay_self) - if(slot_head) + if(SLOT_HEAD) if(H.head) return FALSE - if(!(I.slot_flags & SLOT_HEAD)) + if(!(I.slot_flags & ITEM_SLOT_HEAD)) return FALSE if(!H.get_bodypart(BODY_ZONE_HEAD)) return FALSE return equip_delay_self_check(I, H, bypass_equip_delay_self) - if(slot_ears) + if(SLOT_EARS) if(H.ears) return FALSE - if(!(I.slot_flags & SLOT_EARS)) + if(!(I.slot_flags & ITEM_SLOT_EARS)) return FALSE if(!H.get_bodypart(BODY_ZONE_HEAD)) return FALSE return equip_delay_self_check(I, H, bypass_equip_delay_self) - if(slot_w_uniform) + if(SLOT_W_UNIFORM) if(H.w_uniform) return FALSE - if( !(I.slot_flags & SLOT_ICLOTHING) ) + if( !(I.slot_flags & ITEM_SLOT_ICLOTHING) ) return FALSE return equip_delay_self_check(I, H, bypass_equip_delay_self) - if(slot_wear_id) + if(SLOT_WEAR_ID) if(H.wear_id) return FALSE @@ -966,10 +966,10 @@ GLOBAL_LIST_EMPTY(roundstart_races) if(!disable_warning) to_chat(H, "You need a jumpsuit before you can attach this [I.name]!") return FALSE - if( !(I.slot_flags & SLOT_ID) ) + if( !(I.slot_flags & ITEM_SLOT_ID) ) return FALSE return equip_delay_self_check(I, H, bypass_equip_delay_self) - if(slot_l_store) + if(SLOT_L_STORE) if(I.flags_1 & NODROP_1) //Pockets aren't visible, so you can't move NODROP_1 items into them. return FALSE if(H.l_store) @@ -981,11 +981,11 @@ GLOBAL_LIST_EMPTY(roundstart_races) if(!disable_warning) to_chat(H, "You need a jumpsuit before you can attach this [I.name]!") return FALSE - if(I.slot_flags & SLOT_DENYPOCKET) + if(I.slot_flags & ITEM_SLOT_DENYPOCKET) return FALSE - if( I.w_class <= WEIGHT_CLASS_SMALL || (I.slot_flags & SLOT_POCKET) ) + if( I.w_class <= WEIGHT_CLASS_SMALL || (I.slot_flags & ITEM_SLOT_POCKET) ) return TRUE - if(slot_r_store) + if(SLOT_R_STORE) if(I.flags_1 & NODROP_1) return FALSE if(H.r_store) @@ -997,12 +997,12 @@ GLOBAL_LIST_EMPTY(roundstart_races) if(!disable_warning) to_chat(H, "You need a jumpsuit before you can attach this [I.name]!") return FALSE - if(I.slot_flags & SLOT_DENYPOCKET) + if(I.slot_flags & ITEM_SLOT_DENYPOCKET) return FALSE - if( I.w_class <= WEIGHT_CLASS_SMALL || (I.slot_flags & SLOT_POCKET) ) + if( I.w_class <= WEIGHT_CLASS_SMALL || (I.slot_flags & ITEM_SLOT_POCKET) ) return TRUE return FALSE - if(slot_s_store) + if(SLOT_S_STORE) if(I.flags_1 & NODROP_1) return FALSE if(H.s_store) @@ -1022,7 +1022,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) if( istype(I, /obj/item/device/pda) || istype(I, /obj/item/pen) || is_type_in_list(I, H.wear_suit.allowed) ) return TRUE return FALSE - if(slot_handcuffed) + if(SLOT_HANDCUFFED) if(H.handcuffed) return FALSE if(!istype(I, /obj/item/restraints/handcuffs)) @@ -1030,7 +1030,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) if(num_arms < 2) return FALSE return TRUE - if(slot_legcuffed) + if(SLOT_LEGCUFFED) if(H.legcuffed) return FALSE if(!istype(I, /obj/item/restraints/legcuffs)) @@ -1038,7 +1038,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) if(num_legs < 2) return FALSE return TRUE - if(slot_in_backpack) + if(SLOT_IN_BACKPACK) if(H.back) if(H.back.SendSignal(COMSIG_TRY_STORAGE_CAN_INSERT, I, H, TRUE)) return TRUE diff --git a/code/modules/mob/living/carbon/human/species_types/angel.dm b/code/modules/mob/living/carbon/human/species_types/angel.dm index 0cb18a29c6..5122294956 100644 --- a/code/modules/mob/living/carbon/human/species_types/angel.dm +++ b/code/modules/mob/living/carbon/human/species_types/angel.dm @@ -6,7 +6,7 @@ mutant_bodyparts = list("wings") default_features = list("mcolor" = "FFF", "tail_human" = "None", "ears" = "None", "wings" = "Angel") use_skintones = 1 - no_equip = list(slot_back) + no_equip = list(SLOT_BACK) blacklisted = 1 limbs_id = "human" skinned_type = /obj/item/stack/sheet/animalhide/human diff --git a/code/modules/mob/living/carbon/human/species_types/golems.dm b/code/modules/mob/living/carbon/human/species_types/golems.dm index 72a92f907b..538d0860ab 100644 --- a/code/modules/mob/living/carbon/human/species_types/golems.dm +++ b/code/modules/mob/living/carbon/human/species_types/golems.dm @@ -12,7 +12,7 @@ punchdamagelow = 5 punchdamagehigh = 14 punchstunthreshold = 11 //about 40% chance to stun - no_equip = list(slot_wear_mask, slot_wear_suit, slot_gloves, slot_shoes, slot_w_uniform, slot_s_store) + no_equip = list(SLOT_WEAR_MASK, SLOT_WEAR_SUIT, SLOT_GLOVES, SLOT_SHOES, SLOT_W_UNIFORM, SLOT_S_STORE) nojumpsuit = 1 sexes = 1 damage_overlay_type = "" diff --git a/code/modules/mob/living/carbon/human/species_types/mushpeople.dm b/code/modules/mob/living/carbon/human/species_types/mushpeople.dm index b6c20b9401..67005fad31 100644 --- a/code/modules/mob/living/carbon/human/species_types/mushpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/mushpeople.dm @@ -17,7 +17,7 @@ punchdamagehigh = 14 punchstunthreshold = 14 //about 44% chance to stun - no_equip = list(slot_wear_mask, slot_wear_suit, slot_gloves, slot_shoes, slot_w_uniform) + no_equip = list(SLOT_WEAR_MASK, SLOT_WEAR_SUIT, SLOT_GLOVES, SLOT_SHOES, SLOT_W_UNIFORM) burnmod = 1.25 heatmod = 1.5 diff --git a/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm b/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm index 3bed07a919..ce22004f43 100644 --- a/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm @@ -37,7 +37,7 @@ limbs_id = "shadow" burnmod = 1.5 blacklisted = TRUE - no_equip = list(slot_wear_mask, slot_wear_suit, slot_gloves, slot_shoes, slot_w_uniform, slot_s_store) + no_equip = list(SLOT_WEAR_MASK, SLOT_WEAR_SUIT, SLOT_GLOVES, SLOT_SHOES, SLOT_W_UNIFORM, SLOT_S_STORE) species_traits = list(NOBLOOD,NO_UNDERWEAR,NO_DNA_COPY,NOTRANSSTING,NOEYES) inherent_traits = list(TRAIT_RESISTCOLD,TRAIT_NOBREATH,TRAIT_RESISTHIGHPRESSURE,TRAIT_RESISTLOWPRESSURE,TRAIT_NOGUNS,TRAIT_RADIMMUNE,TRAIT_VIRUSIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NODISMEMBER,TRAIT_NOHUNGER) mutanteyes = /obj/item/organ/eyes/night_vision/nightmare diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 75a2e5625d..6572cf4e27 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -101,7 +101,7 @@ There are several things that need to be remembered: remove_overlay(UNIFORM_LAYER) if(client && hud_used) - var/obj/screen/inventory/inv = hud_used.inv_slots[slot_w_uniform] + var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_W_UNIFORM] inv.update_icon() if(istype(w_uniform, /obj/item/clothing/under)) @@ -148,7 +148,7 @@ There are several things that need to be remembered: remove_overlay(ID_LAYER) if(client && hud_used) - var/obj/screen/inventory/inv = hud_used.inv_slots[slot_wear_id] + var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_WEAR_ID] inv.update_icon() var/mutable_appearance/id_overlay = overlays_standing[ID_LAYER] @@ -171,8 +171,8 @@ There are several things that need to be remembered: /mob/living/carbon/human/update_inv_gloves() remove_overlay(GLOVES_LAYER) - if(client && hud_used && hud_used.inv_slots[slot_gloves]) - var/obj/screen/inventory/inv = hud_used.inv_slots[slot_gloves] + if(client && hud_used && hud_used.inv_slots[SLOT_GLOVES]) + var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_GLOVES] inv.update_icon() if(!gloves && bloody_hands) @@ -211,7 +211,7 @@ There are several things that need to be remembered: return if(client && hud_used) - var/obj/screen/inventory/inv = hud_used.inv_slots[slot_glasses] + var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_GLASSES] inv.update_icon() if(glasses) @@ -238,7 +238,7 @@ There are several things that need to be remembered: return if(client && hud_used) - var/obj/screen/inventory/inv = hud_used.inv_slots[slot_ears] + var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_EARS] inv.update_icon() if(ears) @@ -264,7 +264,7 @@ There are several things that need to be remembered: return if(client && hud_used) - var/obj/screen/inventory/inv = hud_used.inv_slots[slot_shoes] + var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_SHOES] inv.update_icon() if(shoes) @@ -286,7 +286,7 @@ There are several things that need to be remembered: remove_overlay(SUIT_STORE_LAYER) if(client && hud_used) - var/obj/screen/inventory/inv = hud_used.inv_slots[slot_s_store] + var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_S_STORE] inv.update_icon() if(s_store) @@ -322,7 +322,7 @@ There are several things that need to be remembered: remove_overlay(BELT_LAYER) if(client && hud_used) - var/obj/screen/inventory/inv = hud_used.inv_slots[slot_belt] + var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_BELT] inv.update_icon() if(belt) @@ -349,7 +349,7 @@ There are several things that need to be remembered: remove_overlay(SUIT_LAYER) if(client && hud_used) - var/obj/screen/inventory/inv = hud_used.inv_slots[slot_wear_suit] + var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_WEAR_SUIT] inv.update_icon() if(istype(wear_suit, /obj/item/clothing/suit)) @@ -375,10 +375,10 @@ There are several things that need to be remembered: if(client && hud_used) var/obj/screen/inventory/inv - inv = hud_used.inv_slots[slot_l_store] + inv = hud_used.inv_slots[SLOT_L_STORE] inv.update_icon() - inv = hud_used.inv_slots[slot_r_store] + inv = hud_used.inv_slots[SLOT_R_STORE] inv.update_icon() if(l_store) diff --git a/code/modules/mob/living/carbon/inventory.dm b/code/modules/mob/living/carbon/inventory.dm index 7f0e12e0a3..bca70c053c 100644 --- a/code/modules/mob/living/carbon/inventory.dm +++ b/code/modules/mob/living/carbon/inventory.dm @@ -1,16 +1,16 @@ /mob/living/carbon/get_item_by_slot(slot_id) switch(slot_id) - if(slot_back) + if(SLOT_BACK) return back - if(slot_wear_mask) + if(SLOT_WEAR_MASK) return wear_mask - if(slot_neck) + if(SLOT_NECK) return wear_neck - if(slot_head) + if(SLOT_HEAD) return head - if(slot_handcuffed) + if(SLOT_HANDCUFFED) return handcuffed - if(slot_legcuffed) + if(SLOT_LEGCUFFED) return legcuffed return null @@ -50,28 +50,28 @@ I.appearance_flags |= NO_CLIENT_COLOR var/not_handled = FALSE switch(slot) - if(slot_back) + if(SLOT_BACK) back = I update_inv_back() - if(slot_wear_mask) + if(SLOT_WEAR_MASK) wear_mask = I wear_mask_update(I, toggle_off = 0) - if(slot_head) + if(SLOT_HEAD) head = I head_update(I) - if(slot_neck) + if(SLOT_NECK) wear_neck = I update_inv_neck(I) - if(slot_handcuffed) + if(SLOT_HANDCUFFED) handcuffed = I update_handcuffed() - if(slot_legcuffed) + if(SLOT_LEGCUFFED) legcuffed = I update_inv_legcuffed() - if(slot_hands) + if(SLOT_HANDS) put_in_hands(I) update_inv_hands() - if(slot_in_backpack) + if(SLOT_IN_BACKPACK) if(!back.SendSignal(COMSIG_TRY_STORAGE_INSERT, I, src, TRUE)) not_handled = TRUE else diff --git a/code/modules/mob/living/carbon/monkey/inventory.dm b/code/modules/mob/living/carbon/monkey/inventory.dm index 46de68dddf..b2ed3e8c74 100644 --- a/code/modules/mob/living/carbon/monkey/inventory.dm +++ b/code/modules/mob/living/carbon/monkey/inventory.dm @@ -1,3 +1,4 @@ +<<<<<<< HEAD /mob/living/carbon/monkey/can_equip(obj/item/I, slot, disable_warning = 0) switch(slot) if(slot_hands) @@ -32,3 +33,39 @@ +======= +/mob/living/carbon/monkey/can_equip(obj/item/I, slot, disable_warning = 0) + switch(slot) + if(SLOT_HANDS) + if(get_empty_held_indexes()) + return TRUE + return FALSE + if(SLOT_WEAR_MASK) + if(wear_mask) + return FALSE + if( !(I.slot_flags & ITEM_SLOT_MASK) ) + return FALSE + return TRUE + if(SLOT_NECK) + if(wear_neck) + return FALSE + if( !(I.slot_flags & ITEM_SLOT_NECK) ) + return FALSE + return TRUE + if(SLOT_HEAD) + if(head) + return FALSE + if( !(I.slot_flags & ITEM_SLOT_HEAD) ) + return FALSE + return TRUE + if(SLOT_BACK) + if(back) + return FALSE + if( !(I.slot_flags & ITEM_SLOT_BACK) ) + return FALSE + return TRUE + return FALSE //Unsupported slot + + + +>>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index 52504235fe..b57211d194 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -168,5 +168,5 @@ . = ..() if(prob(10)) var/obj/item/clothing/head/helmet/justice/escape/helmet = new(src) - equip_to_slot_or_del(helmet,slot_head) + equip_to_slot_or_del(helmet,SLOT_HEAD) helmet.attack_self(src) // todo encapsulate toggle diff --git a/code/modules/mob/living/carbon/monkey/punpun.dm b/code/modules/mob/living/carbon/monkey/punpun.dm index fc0d97e3cb..fbe4bc9900 100644 --- a/code/modules/mob/living/carbon/monkey/punpun.dm +++ b/code/modules/mob/living/carbon/monkey/punpun.dm @@ -27,9 +27,9 @@ //bodyparts are actually created before we try to equip things to //those slots if(relic_hat) - equip_to_slot_or_del(new relic_hat, slot_head) + equip_to_slot_or_del(new relic_hat, SLOT_HEAD) if(relic_mask) - equip_to_slot_or_del(new relic_mask, slot_wear_mask) + equip_to_slot_or_del(new relic_mask, SLOT_WEAR_MASK) /mob/living/carbon/monkey/punpun/Life() if(!stat && SSticker.current_state == GAME_STATE_FINISHED && !memory_saved) diff --git a/code/modules/mob/living/carbon/update_icons.dm b/code/modules/mob/living/carbon/update_icons.dm index abd02de061..af685e91cb 100644 --- a/code/modules/mob/living/carbon/update_icons.dm +++ b/code/modules/mob/living/carbon/update_icons.dm @@ -118,8 +118,8 @@ if(!get_bodypart(BODY_ZONE_HEAD)) //Decapitated return - if(client && hud_used && hud_used.inv_slots[slot_wear_mask]) - var/obj/screen/inventory/inv = hud_used.inv_slots[slot_wear_mask] + if(client && hud_used && hud_used.inv_slots[SLOT_WEAR_MASK]) + var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_WEAR_MASK] inv.update_icon() if(wear_mask) @@ -132,8 +132,8 @@ /mob/living/carbon/update_inv_neck() remove_overlay(NECK_LAYER) - if(client && hud_used && hud_used.inv_slots[slot_neck]) - var/obj/screen/inventory/inv = hud_used.inv_slots[slot_neck] + if(client && hud_used && hud_used.inv_slots[SLOT_NECK]) + var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_NECK] inv.update_icon() if(wear_neck) @@ -146,8 +146,8 @@ /mob/living/carbon/update_inv_back() remove_overlay(BACK_LAYER) - if(client && hud_used && hud_used.inv_slots[slot_back]) - var/obj/screen/inventory/inv = hud_used.inv_slots[slot_back] + if(client && hud_used && hud_used.inv_slots[SLOT_BACK]) + var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_BACK] inv.update_icon() if(back) @@ -162,8 +162,8 @@ if(!get_bodypart(BODY_ZONE_HEAD)) //Decapitated return - if(client && hud_used && hud_used.inv_slots[slot_back]) - var/obj/screen/inventory/inv = hud_used.inv_slots[slot_head] + if(client && hud_used && hud_used.inv_slots[SLOT_BACK]) + var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_HEAD] inv.update_icon() if(head) diff --git a/code/modules/mob/living/silicon/robot/inventory.dm b/code/modules/mob/living/silicon/robot/inventory.dm index 5bb9d4d111..2db2baed13 100644 --- a/code/modules/mob/living/silicon/robot/inventory.dm +++ b/code/modules/mob/living/silicon/robot/inventory.dm @@ -85,7 +85,7 @@ else to_chat(src, "You need to disable a module first!") if(.) - O.equipped(src, slot_hands) + O.equipped(src, SLOT_HANDS) O.mouse_opacity = initial(O.mouse_opacity) O.layer = ABOVE_HUD_LAYER O.plane = ABOVE_HUD_PLANE diff --git a/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm b/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm index 3ebf5b97d8..40aaf83cc4 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm +++ b/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm @@ -89,10 +89,10 @@ if(default_storage) var/obj/item/I = new default_storage(src) - equip_to_slot_or_del(I, slot_generic_dextrous_storage) + equip_to_slot_or_del(I, SLOT_GENERC_DEXTROUS_STORAGE) if(default_hatmask) var/obj/item/I = new default_hatmask(src) - equip_to_slot_or_del(I, slot_head) + equip_to_slot_or_del(I, SLOT_HEAD) access_card.flags_1 |= NODROP_1 diff --git a/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm b/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm index c5dd5375d0..49fd54d9f8 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm +++ b/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm @@ -59,7 +59,7 @@ if(!D.default_hatmask && seasonal_hats && possible_seasonal_hats.len) var/hat_type = pick(possible_seasonal_hats) var/obj/item/new_hat = new hat_type(D) - D.equip_to_slot_or_del(new_hat, slot_head) + D.equip_to_slot_or_del(new_hat, SLOT_HEAD) D.admin_spawned = admin_spawned D.key = user.key qdel(src) diff --git a/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm b/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm index aac87829bc..3f344c2936 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm +++ b/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm @@ -21,13 +21,13 @@ /mob/living/simple_animal/drone/can_equip(obj/item/I, slot) switch(slot) - if(slot_head) + if(SLOT_HEAD) if(head) return 0 - if(!((I.slot_flags & SLOT_HEAD) || (I.slot_flags & SLOT_MASK))) + if(!((I.slot_flags & ITEM_SLOT_HEAD) || (I.slot_flags & ITEM_SLOT_MASK))) return 0 return 1 - if(slot_generic_dextrous_storage) + if(SLOT_GENERC_DEXTROUS_STORAGE) if(internal_storage) return 0 return 1 @@ -36,9 +36,9 @@ /mob/living/simple_animal/drone/get_item_by_slot(slot_id) switch(slot_id) - if(slot_head) + if(SLOT_HEAD) return head - if(slot_generic_dextrous_storage) + if(SLOT_GENERC_DEXTROUS_STORAGE) return internal_storage return ..() @@ -63,10 +63,10 @@ I.plane = ABOVE_HUD_PLANE switch(slot) - if(slot_head) + if(SLOT_HEAD) head = I update_inv_head() - if(slot_generic_dextrous_storage) + if(SLOT_GENERC_DEXTROUS_STORAGE) internal_storage = I update_inv_internal_storage() else @@ -77,7 +77,7 @@ I.equipped(src, slot) /mob/living/simple_animal/drone/getBackSlot() - return slot_generic_dextrous_storage + return SLOT_GENERC_DEXTROUS_STORAGE /mob/living/simple_animal/drone/getBeltSlot() - return slot_generic_dextrous_storage + return SLOT_GENERC_DEXTROUS_STORAGE diff --git a/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm b/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm index 94edad2728..caa1b0112e 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm @@ -54,7 +54,7 @@ /mob/living/simple_animal/hostile/guardian/dextrous/can_equip(obj/item/I, slot) switch(slot) - if(slot_generic_dextrous_storage) + if(SLOT_GENERC_DEXTROUS_STORAGE) if(internal_storage) return 0 return 1 @@ -65,17 +65,17 @@ return switch(slot) - if(slot_generic_dextrous_storage) + if(SLOT_GENERC_DEXTROUS_STORAGE) internal_storage = I update_inv_internal_storage() else to_chat(src, "You are trying to equip this item to an unsupported inventory slot. Report this to a coder!") /mob/living/simple_animal/hostile/guardian/dextrous/getBackSlot() - return slot_generic_dextrous_storage + return SLOT_GENERC_DEXTROUS_STORAGE /mob/living/simple_animal/hostile/guardian/dextrous/getBeltSlot() - return slot_generic_dextrous_storage + return SLOT_GENERC_DEXTROUS_STORAGE /mob/living/simple_animal/hostile/guardian/dextrous/proc/update_inv_internal_storage() if(internal_storage && client && hud_used && hud_used.hud_shown) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/legion.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/legion.dm index 351a5ab289..0880b62708 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/legion.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/legion.dm @@ -153,7 +153,7 @@ Difficulty: Medium icon_state = "staffofstorms" item_state = "staffofstorms" icon = 'icons/obj/guns/magic.dmi' - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK w_class = WEIGHT_CLASS_BULKY force = 25 damtype = BURN diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 205eeb4b28..8c8bcc0e3b 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -237,14 +237,14 @@ if(!slot_priority) slot_priority = list( \ - slot_back, slot_wear_id,\ - slot_w_uniform, slot_wear_suit,\ - slot_wear_mask, slot_head, slot_neck,\ - slot_shoes, slot_gloves,\ - slot_ears, slot_glasses,\ - slot_belt, slot_s_store,\ - slot_l_store, slot_r_store,\ - slot_generic_dextrous_storage\ + SLOT_BACK, SLOT_WEAR_ID,\ + SLOT_W_UNIFORM, SLOT_WEAR_SUIT,\ + SLOT_WEAR_MASK, SLOT_HEAD, SLOT_NECK,\ + SLOT_SHOES, SLOT_GLOVES,\ + SLOT_EARS, SLOT_GLASSES,\ + SLOT_BELT, SLOT_S_STORE,\ + SLOT_L_STORE, SLOT_R_STORE,\ + SLOT_GENERC_DEXTROUS_STORAGE\ ) for(var/slot in slot_priority) diff --git a/code/modules/modular_computers/computers/item/tablet.dm b/code/modules/modular_computers/computers/item/tablet.dm index e4cecbcb64..9f4fc7234c 100644 --- a/code/modules/modular_computers/computers/item/tablet.dm +++ b/code/modules/modular_computers/computers/item/tablet.dm @@ -9,7 +9,7 @@ max_hardware_size = 1 w_class = WEIGHT_CLASS_SMALL steel_sheet_cost = 1 - slot_flags = SLOT_ID | SLOT_BELT + slot_flags = ITEM_SLOT_ID | ITEM_SLOT_BELT has_light = TRUE //LED flashlight! comp_light_luminosity = 2.3 //Same as the PDA var/finish_color = null diff --git a/code/modules/ninja/energy_katana.dm b/code/modules/ninja/energy_katana.dm index 29552c8a47..2943dde559 100644 --- a/code/modules/ninja/energy_katana.dm +++ b/code/modules/ninja/energy_katana.dm @@ -13,7 +13,7 @@ hitsound = 'sound/weapons/bladeslice.ogg' attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") block_chance = 50 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT sharpness = IS_SHARP max_integrity = 200 resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF @@ -79,7 +79,7 @@ if(user.put_in_hands(src)) msg = "Your Energy Katana teleports into your hand!" - else if(user.equip_to_slot_if_possible(src, slot_belt, 0, 1, 1)) + else if(user.equip_to_slot_if_possible(src, SLOT_BELT, 0, 1, 1)) msg = "Your Energy Katana teleports back to you, sheathing itself as it does so!" else msg = "Your Energy Katana teleports to your location!" diff --git a/code/modules/ninja/outfit.dm b/code/modules/ninja/outfit.dm index 2fd732f0ce..b166c1b262 100644 --- a/code/modules/ninja/outfit.dm +++ b/code/modules/ninja/outfit.dm @@ -11,7 +11,7 @@ back = /obj/item/tank/jetpack/carbondioxide l_pocket = /obj/item/grenade/plastic/x4 r_pocket = /obj/item/tank/internals/emergency_oxygen - internals_slot = slot_r_store + internals_slot = SLOT_R_STORE belt = /obj/item/energy_katana implants = list(/obj/item/implant/explosive) diff --git a/code/modules/paperwork/clipboard.dm b/code/modules/paperwork/clipboard.dm index 80f04c39d2..137a87d1e7 100644 --- a/code/modules/paperwork/clipboard.dm +++ b/code/modules/paperwork/clipboard.dm @@ -9,7 +9,7 @@ throw_range = 7 var/obj/item/pen/haspen //The stored pen. var/obj/item/paper/toppaper //The topmost piece of paper. - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT resistance_flags = FLAMMABLE /obj/item/clipboard/suicide_act(mob/living/carbon/user) diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index b9c21e1090..c425ab8c61 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -16,7 +16,7 @@ throw_range = 1 throw_speed = 1 pressure_resistance = 0 - slot_flags = SLOT_HEAD + slot_flags = ITEM_SLOT_HEAD body_parts_covered = HEAD resistance_flags = FLAMMABLE max_integrity = 50 diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index f54b1742fe..7f5307f17f 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -16,7 +16,7 @@ icon = 'icons/obj/bureaucracy.dmi' icon_state = "pen" item_state = "pen" - slot_flags = SLOT_BELT | SLOT_EARS + slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_EARS throwforce = 0 w_class = WEIGHT_CLASS_TINY throw_speed = 3 diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index 5c63c559e3..bc9a181cf3 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -138,7 +138,7 @@ else if(ass) //ASS COPY. By Miauw for(var/i = 0, i < copies, i++) var/icon/temp_img - if(ishuman(ass) && (ass.get_item_by_slot(slot_w_uniform) || ass.get_item_by_slot(slot_wear_suit))) + if(ishuman(ass) && (ass.get_item_by_slot(SLOT_W_UNIFORM) || ass.get_item_by_slot(SLOT_WEAR_SUIT))) to_chat(usr, "You feel kind of silly, copying [ass == usr ? "your" : ass][ass == usr ? "" : "\'s"] ass with [ass == usr ? "your" : "their"] clothes on." ) break else if(toner >= 5 && !busy && check_ass()) //You have to be sitting on the copier and either be a xeno or a human without clothes on. @@ -345,7 +345,7 @@ updateUsrDialog() return 0 else if(ishuman(ass)) - if(!ass.get_item_by_slot(slot_w_uniform) && !ass.get_item_by_slot(slot_wear_suit)) + if(!ass.get_item_by_slot(SLOT_W_UNIFORM) && !ass.get_item_by_slot(SLOT_WEAR_SUIT)) return 1 else return 0 diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index dac5ba3b52..873e41ffc8 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -130,7 +130,7 @@ righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' w_class = WEIGHT_CLASS_SMALL flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT materials = list(MAT_METAL = 50, MAT_GLASS = 150) var/pictures_max = 10 var/pictures_left = 10 diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 94e5f4a28e..9a8a434593 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -466,7 +466,7 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai throw_range = 5 materials = list(MAT_METAL=10, MAT_GLASS=5) flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT attack_verb = list("whipped", "lashed", "disciplined", "flogged") singular_name = "cable piece" full_w_class = WEIGHT_CLASS_SMALL diff --git a/code/modules/projectiles/ammunition/_ammunition.dm b/code/modules/projectiles/ammunition/_ammunition.dm index c2c477f49b..3644b616a3 100644 --- a/code/modules/projectiles/ammunition/_ammunition.dm +++ b/code/modules/projectiles/ammunition/_ammunition.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/ammo.dmi' icon_state = "s-casing" flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT throwforce = 0 w_class = WEIGHT_CLASS_TINY var/fire_sound = null //What sound should play when this ammo is fired diff --git a/code/modules/projectiles/boxes_magazines/_box_magazine.dm b/code/modules/projectiles/boxes_magazines/_box_magazine.dm index 1c5a2b1199..f7bcc0129f 100644 --- a/code/modules/projectiles/boxes_magazines/_box_magazine.dm +++ b/code/modules/projectiles/boxes_magazines/_box_magazine.dm @@ -5,7 +5,7 @@ icon_state = "357" icon = 'icons/obj/ammo.dmi' flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT item_state = "syringe_kit" lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 8c621dab82..c10c6cc376 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -8,7 +8,7 @@ icon_state = "detective" item_state = "gun" flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT materials = list(MAT_METAL=2000) w_class = WEIGHT_CLASS_NORMAL throwforce = 5 diff --git a/code/modules/projectiles/guns/ballistic.dm b/code/modules/projectiles/guns/ballistic.dm index 2c36f14245..61d2c81ea7 100644 --- a/code/modules/projectiles/guns/ballistic.dm +++ b/code/modules/projectiles/guns/ballistic.dm @@ -204,8 +204,8 @@ desc = sawn_desc w_class = WEIGHT_CLASS_NORMAL item_state = "gun" - slot_flags &= ~SLOT_BACK //you can't sling it on your back - slot_flags |= SLOT_BELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally) + slot_flags &= ~ITEM_SLOT_BACK //you can't sling it on your back + slot_flags |= ITEM_SLOT_BELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally) sawn_off = TRUE update_icon() return 1 diff --git a/code/modules/projectiles/guns/ballistic/automatic.dm b/code/modules/projectiles/guns/ballistic/automatic.dm index a174874686..2951848c36 100644 --- a/code/modules/projectiles/guns/ballistic/automatic.dm +++ b/code/modules/projectiles/guns/ballistic/automatic.dm @@ -363,7 +363,7 @@ zoomable = TRUE zoom_amt = 10 //Long range, enough to see in front of you, but no tiles behind you. zoom_out_amt = 13 - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK actions_types = list() @@ -393,7 +393,7 @@ can_unsuppress = TRUE can_suppress = TRUE w_class = WEIGHT_CLASS_HUGE - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK actions_types = list() /obj/item/gun/ballistic/automatic/surplus/update_icon() diff --git a/code/modules/projectiles/guns/ballistic/laser_gatling.dm b/code/modules/projectiles/guns/ballistic/laser_gatling.dm index cc719f98ee..995fe2d2b1 100644 --- a/code/modules/projectiles/guns/ballistic/laser_gatling.dm +++ b/code/modules/projectiles/guns/ballistic/laser_gatling.dm @@ -9,7 +9,7 @@ item_state = "backpack" lefthand_file = 'icons/mob/inhands/equipment/backpack_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/backpack_righthand.dmi' - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK w_class = WEIGHT_CLASS_HUGE var/obj/item/gun/ballistic/minigun/gun var/armed = 0 //whether the gun is attached, 0 is attached, 1 is the gun is wielded. @@ -33,7 +33,7 @@ /obj/item/minigunpack/attack_hand(var/mob/living/carbon/user) if(src.loc == user) if(!armed) - if(user.get_item_by_slot(slot_back) == src) + if(user.get_item_by_slot(SLOT_BACK) == src) armed = 1 if(!user.put_in_hands(gun)) armed = 0 diff --git a/code/modules/projectiles/guns/ballistic/revolver.dm b/code/modules/projectiles/guns/ballistic/revolver.dm index 3cbff78aee..06b5551f2b 100644 --- a/code/modules/projectiles/guns/ballistic/revolver.dm +++ b/code/modules/projectiles/guns/ballistic/revolver.dm @@ -257,7 +257,7 @@ weapon_weight = WEAPON_MEDIUM force = 10 flags_1 = CONDUCT_1 - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK mag_type = /obj/item/ammo_box/magazine/internal/shot/dual sawn_desc = "Omar's coming!" obj_flags = UNIQUE_RENAME @@ -314,7 +314,7 @@ if(istype(A, /obj/item/stack/cable_coil) && !sawn_off) var/obj/item/stack/cable_coil/C = A if(C.use(10)) - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK to_chat(user, "You tie the lengths of cable to the shotgun, making a sling.") slung = TRUE update_icon() @@ -340,7 +340,7 @@ item_state = "gun" w_class = WEIGHT_CLASS_NORMAL sawn_off = TRUE - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT /obj/item/gun/ballistic/revolver/reverse //Fires directly at its user... unless the user is a clown, of course. diff --git a/code/modules/projectiles/guns/ballistic/shotgun.dm b/code/modules/projectiles/guns/ballistic/shotgun.dm index 03f16e4b01..6634d64483 100644 --- a/code/modules/projectiles/guns/ballistic/shotgun.dm +++ b/code/modules/projectiles/guns/ballistic/shotgun.dm @@ -6,7 +6,7 @@ w_class = WEIGHT_CLASS_BULKY force = 10 flags_1 = CONDUCT_1 - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK mag_type = /obj/item/ammo_box/magazine/internal/shot casing_ejector = FALSE var/recentpump = 0 // to prevent spammage @@ -107,7 +107,7 @@ desc = "This piece of junk looks like something that could have been used 700 years ago. It feels slightly moist." icon_state = "moistnugget" item_state = "moistnugget" - slot_flags = 0 //no SLOT_BACK sprite, alas + slot_flags = 0 //no ITEM_SLOT_BACK sprite, alas mag_type = /obj/item/ammo_box/magazine/internal/boltaction var/bolt_open = FALSE can_bayonet = TRUE diff --git a/code/modules/projectiles/guns/ballistic/toy.dm b/code/modules/projectiles/guns/ballistic/toy.dm index 2089354e4f..23916da46a 100644 --- a/code/modules/projectiles/guns/ballistic/toy.dm +++ b/code/modules/projectiles/guns/ballistic/toy.dm @@ -73,7 +73,7 @@ item_state = "crossbow" mag_type = /obj/item/ammo_box/magazine/internal/shot/toy/crossbow fire_sound = 'sound/items/syringeproj.ogg' - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT w_class = WEIGHT_CLASS_SMALL /obj/item/gun/ballistic/automatic/c20r/toy //This is the syndicate variant with syndicate firing pin and riot darts. diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm index 29d0ee0958..a28ddf7943 100644 --- a/code/modules/projectiles/guns/energy/laser.dm +++ b/code/modules/projectiles/guns/energy/laser.dm @@ -79,7 +79,7 @@ w_class = WEIGHT_CLASS_BULKY force = 10 flags_1 = CONDUCT_1 - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK ammo_type = list(/obj/item/ammo_casing/energy/laser/accelerator) pin = null ammo_x_offset = 3 diff --git a/code/modules/projectiles/guns/energy/pulse.dm b/code/modules/projectiles/guns/energy/pulse.dm index 4dbb9e31f7..efdf22313a 100644 --- a/code/modules/projectiles/guns/energy/pulse.dm +++ b/code/modules/projectiles/guns/energy/pulse.dm @@ -7,7 +7,7 @@ force = 10 modifystate = TRUE flags_1 = CONDUCT_1 - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK ammo_type = list(/obj/item/ammo_casing/energy/laser/pulse, /obj/item/ammo_casing/energy/electrode, /obj/item/ammo_casing/energy/laser) cell_type = "/obj/item/stock_parts/cell/pulse" @@ -39,7 +39,7 @@ name = "pulse carbine" desc = "A compact variant of the pulse rifle with less firepower but easier storage." w_class = WEIGHT_CLASS_NORMAL - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT icon_state = "pulse_carbine" item_state = null cell_type = "/obj/item/stock_parts/cell/pulse/carbine" @@ -54,7 +54,7 @@ name = "pulse pistol" desc = "A pulse rifle in an easily concealed handgun package with low capacity." w_class = WEIGHT_CLASS_SMALL - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT icon_state = "pulse_pistol" item_state = "gun" cell_type = "/obj/item/stock_parts/cell/pulse/pistol" diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 547e49cbdf..5e7ab49386 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -6,7 +6,7 @@ can_flashlight = 1 w_class = WEIGHT_CLASS_HUGE flags_1 = CONDUCT_1 - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK ammo_type = list(/obj/item/ammo_casing/energy/ion) ammo_x_offset = 3 flight_x_offset = 17 @@ -20,7 +20,7 @@ desc = "The MK.II Prototype Ion Projector is a lightweight carbine version of the larger ion rifle, built to be ergonomic and efficient." icon_state = "ioncarbine" w_class = WEIGHT_CLASS_NORMAL - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT pin = null ammo_x_offset = 2 flight_x_offset = 18 diff --git a/code/modules/projectiles/guns/magic/staff.dm b/code/modules/projectiles/guns/magic/staff.dm index c268c15272..c58d452043 100644 --- a/code/modules/projectiles/guns/magic/staff.dm +++ b/code/modules/projectiles/guns/magic/staff.dm @@ -1,5 +1,5 @@ /obj/item/gun/magic/staff - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi' flags_2 = NO_MAT_REDEMPTION_2 diff --git a/code/modules/projectiles/guns/misc/beam_rifle.dm b/code/modules/projectiles/guns/misc/beam_rifle.dm index 2ec645df2e..89d8e18cd3 100644 --- a/code/modules/projectiles/guns/misc/beam_rifle.dm +++ b/code/modules/projectiles/guns/misc/beam_rifle.dm @@ -17,7 +17,7 @@ icon_state = "esniper" item_state = "esniper" fire_sound = 'sound/weapons/beam_sniper.ogg' - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK force = 15 materials = list() recoil = 4 diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index 1be1afccdd..7dfe095a6d 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -254,18 +254,18 @@ possible_transfer_amounts = list(10,15,20,25,30,50,70) volume = 70 flags_inv = HIDEHAIR - slot_flags = SLOT_HEAD + slot_flags = ITEM_SLOT_HEAD resistance_flags = NONE armor = list("melee" = 10, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 75, "acid" = 50) //Weak melee protection, because you can wear it on your head slot_equipment_priority = list( \ - slot_back, slot_wear_id,\ - slot_w_uniform, slot_wear_suit,\ - slot_wear_mask, slot_head, slot_neck,\ - slot_shoes, slot_gloves,\ - slot_ears, slot_glasses,\ - slot_belt, slot_s_store,\ - slot_l_store, slot_r_store,\ - slot_generic_dextrous_storage + SLOT_BACK, SLOT_WEAR_ID,\ + SLOT_W_UNIFORM, SLOT_WEAR_SUIT,\ + SLOT_WEAR_MASK, SLOT_HEAD, SLOT_NECK,\ + SLOT_SHOES, SLOT_GLOVES,\ + SLOT_EARS, SLOT_GLASSES,\ + SLOT_BELT, SLOT_S_STORE,\ + SLOT_L_STORE, SLOT_R_STORE,\ + SLOT_GENERC_DEXTROUS_STORAGE ) /obj/item/reagent_containers/glass/bucket/attackby(obj/O, mob/user, params) @@ -286,17 +286,17 @@ /obj/item/reagent_containers/glass/bucket/equipped(mob/user, slot) ..() - if(slot == slot_head && reagents.total_volume) + if(slot == SLOT_HEAD && reagents.total_volume) to_chat(user, "[src]'s contents spill all over you!") reagents.reaction(user, TOUCH) reagents.clear_reagents() /obj/item/reagent_containers/glass/bucket/equip_to_best_slot(var/mob/M) if(reagents.total_volume) //If there is water in a bucket, don't quick equip it to the head - var/index = slot_equipment_priority.Find(slot_head) - slot_equipment_priority.Remove(slot_head) + var/index = slot_equipment_priority.Find(SLOT_HEAD) + slot_equipment_priority.Remove(SLOT_HEAD) . = ..() - slot_equipment_priority.Insert(index, slot_head) + slot_equipment_priority.Insert(index, SLOT_HEAD) return return ..() diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index 5ae253022f..8d4e2d88f9 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -11,7 +11,7 @@ possible_transfer_amounts = list() resistance_flags = ACID_PROOF container_type = OPENCONTAINER - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT var/ignore_flags = 0 var/infinite = FALSE diff --git a/code/modules/reagents/reagent_containers/medspray.dm b/code/modules/reagents/reagent_containers/medspray.dm index 2f715084ad..83d8936640 100644 --- a/code/modules/reagents/reagent_containers/medspray.dm +++ b/code/modules/reagents/reagent_containers/medspray.dm @@ -9,7 +9,7 @@ flags_1 = NOBLUDGEON_1 obj_flags = UNIQUE_RENAME container_type = OPENCONTAINER - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT throwforce = 0 w_class = WEIGHT_CLASS_SMALL throw_speed = 3 diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index 4b2e3f128c..9a492d9a33 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -8,7 +8,7 @@ righthand_file = 'icons/mob/inhands/equipment/custodial_righthand.dmi' flags_1 = NOBLUDGEON_1 container_type = OPENCONTAINER - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT throwforce = 0 w_class = WEIGHT_CLASS_SMALL throw_speed = 3 diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index a669f23dde..9e0c8fce69 100644 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -157,7 +157,7 @@ lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT + slot_flags = ITEM_SLOT_BELT /obj/item/device/destTagger/suicide_act(mob/living/user) user.visible_message("[user] begins tagging [user.p_their()] final destination! It looks like [user.p_theyre()] trying to commit suicide!") diff --git a/code/modules/research/xenobiology/crossbreeding/burning.dm b/code/modules/research/xenobiology/crossbreeding/burning.dm index ab0000626c..a63118a6fa 100644 --- a/code/modules/research/xenobiology/crossbreeding/burning.dm +++ b/code/modules/research/xenobiology/crossbreeding/burning.dm @@ -386,7 +386,7 @@ Burning extracts: item_state = "adamshield" w_class = WEIGHT_CLASS_HUGE armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 70) - slot_flags = SLOT_BACK + slot_flags = ITEM_SLOT_BACK block_chance = 75 throw_range = 1 //How far do you think you're gonna throw a solid crystalline shield...? throw_speed = 2 diff --git a/code/modules/research/xenobiology/crossbreeding/regenerative.dm b/code/modules/research/xenobiology/crossbreeding/regenerative.dm index 3d3c35b4de..7c8d8fa78f 100644 --- a/code/modules/research/xenobiology/crossbreeding/regenerative.dm +++ b/code/modules/research/xenobiology/crossbreeding/regenerative.dm @@ -89,10 +89,10 @@ Regenerative extracts: /obj/item/slimecross/regenerative/darkpurple/core_effect(mob/living/target, mob/user) var/equipped = 0 - equipped += target.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/purple(null), slot_shoes) - equipped += target.equip_to_slot_or_del(new /obj/item/clothing/under/color/lightpurple(null), slot_w_uniform) - equipped += target.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/purple(null), slot_gloves) - equipped += target.equip_to_slot_or_del(new /obj/item/clothing/head/soft/purple(null), slot_head) + equipped += target.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/purple(null), SLOT_SHOES) + equipped += target.equip_to_slot_or_del(new /obj/item/clothing/under/color/lightpurple(null), SLOT_W_UNIFORM) + equipped += target.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/purple(null), SLOT_GLOVES) + equipped += target.equip_to_slot_or_del(new /obj/item/clothing/head/soft/purple(null), SLOT_HEAD) if(equipped > 0) target.visible_message("The milky goo congeals into clothing!") @@ -104,13 +104,13 @@ Regenerative extracts: return var/mob/living/carbon/human/H = target var/fireproofed = FALSE - if(H.get_item_by_slot(slot_wear_suit)) + if(H.get_item_by_slot(SLOT_WEAR_SUIT)) fireproofed = TRUE - var/obj/item/clothing/C = H.get_item_by_slot(slot_wear_suit) + var/obj/item/clothing/C = H.get_item_by_slot(SLOT_WEAR_SUIT) fireproof(C) - if(H.get_item_by_slot(slot_head)) + if(H.get_item_by_slot(SLOT_HEAD)) fireproofed = TRUE - var/obj/item/clothing/C = H.get_item_by_slot(slot_head) + var/obj/item/clothing/C = H.get_item_by_slot(SLOT_HEAD) fireproof(C) if(fireproofed) target.visible_message("Some of [target]'s clothing gets coated in the goo, and turns blue!") diff --git a/code/modules/spells/spell_types/barnyard.dm b/code/modules/spells/spell_types/barnyard.dm index f183f0420e..8411b5f86f 100644 --- a/code/modules/spells/spell_types/barnyard.dm +++ b/code/modules/spells/spell_types/barnyard.dm @@ -50,7 +50,7 @@ "Your face burns up, and shortly after the fire you realise you have the face of a barnyard animal!") if(!target.dropItemToGround(target.wear_mask)) qdel(target.wear_mask) - target.equip_to_slot_if_possible(magichead, slot_wear_mask, 1, 1) + target.equip_to_slot_if_possible(magichead, SLOT_WEAR_MASK, 1, 1) playsound(get_turf(target), mSounds[randM], 50, 1) target.flash_act() diff --git a/code/modules/spells/spell_types/lichdom.dm b/code/modules/spells/spell_types/lichdom.dm index d991a3df9c..8d6a4c18e6 100644 --- a/code/modules/spells/spell_types/lichdom.dm +++ b/code/modules/spells/spell_types/lichdom.dm @@ -63,9 +63,9 @@ H.dropItemToGround(H.w_uniform) H.dropItemToGround(H.wear_suit) H.dropItemToGround(H.head) - H.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/black(H), slot_wear_suit) - H.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/black(H), slot_head) - H.equip_to_slot_or_del(new /obj/item/clothing/under/color/black(H), slot_w_uniform) + H.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/black(H), SLOT_WEAR_SUIT) + H.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/black(H), SLOT_HEAD) + H.equip_to_slot_or_del(new /obj/item/clothing/under/color/black(H), SLOT_W_UNIFORM) // you only get one phylactery. M.mind.RemoveSpell(src) @@ -124,10 +124,10 @@ var/mob/old_body = mind.current var/mob/living/carbon/human/lich = new(item_turf) - lich.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal/magic(lich), slot_shoes) - lich.equip_to_slot_or_del(new /obj/item/clothing/under/color/black(lich), slot_w_uniform) - lich.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/black(lich), slot_wear_suit) - lich.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/black(lich), slot_head) + lich.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal/magic(lich), SLOT_SHOES) + lich.equip_to_slot_or_del(new /obj/item/clothing/under/color/black(lich), SLOT_W_UNIFORM) + lich.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/black(lich), SLOT_WEAR_SUIT) + lich.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/black(lich), SLOT_HEAD) lich.real_name = mind.name mind.transfer_to(lich) diff --git a/code/modules/vehicles/scooter.dm b/code/modules/vehicles/scooter.dm index a5c1082780..2daf3897c5 100644 --- a/code/modules/vehicles/scooter.dm +++ b/code/modules/vehicles/scooter.dm @@ -72,7 +72,7 @@ H.throw_at(throw_target, 4, 3) H.Knockdown(100) H.adjustStaminaLoss(40) - var/head_slot = H.get_item_by_slot(slot_head) + var/head_slot = H.get_item_by_slot(SLOT_HEAD) if(!head_slot || !(istype(head_slot,/obj/item/clothing/head/helmet) || istype(head_slot,/obj/item/clothing/head/hardhat))) H.adjustBrainLoss(3) H.updatehealth() @@ -185,7 +185,7 @@ H.throw_at(throw_target, 4, 3) H.Knockdown(30) H.adjustStaminaLoss(10) - var/head_slot = H.get_item_by_slot(slot_head) + var/head_slot = H.get_item_by_slot(SLOT_HEAD) if(!head_slot || !(istype(head_slot,/obj/item/clothing/head/helmet) || istype(head_slot,/obj/item/clothing/head/hardhat))) H.adjustBrainLoss(1) H.updatehealth() From 48ef6d23499be27a3d1961e102aaf3845dc7e938 Mon Sep 17 00:00:00 2001 From: oranges Date: Sat, 28 Apr 2018 13:25:56 +1200 Subject: [PATCH 02/63] Adds log and management tabs to permissions panel --- SQL/database_changelog.txt | 13 +- SQL/tgstation_schema.sql | 2 + SQL/tgstation_schema_prefixed.sql | 2 + code/__DEFINES/subsystems.dm | 2 +- code/modules/admin/admin_ranks.dm | 1 - code/modules/admin/permissionedit.dm | 196 +++++++++++++++++++-------- code/modules/admin/topic.dm | 15 ++ html/panels.css | 13 ++ 8 files changed, 185 insertions(+), 59 deletions(-) diff --git a/SQL/database_changelog.txt b/SQL/database_changelog.txt index 6e6bd7f7ca..83bc78050d 100644 --- a/SQL/database_changelog.txt +++ b/SQL/database_changelog.txt @@ -2,14 +2,22 @@ Any time you make a change to the schema files, remember to increment the databa The latest database version is 4.1; The query to update the schema revision table is: -INSERT INTO `schema_revision` (`major`, `minor`) VALUES (4, 1); +INSERT INTO `schema_revision` (`major`, `minor`) VALUES (4, 2); or -INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (4, 1); +INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (4, 2); In any query remember to add a prefix to the table names if you use one. ---------------------------------------------------- +Version 4.2, 17 April 2018, by Jordie0608 +Modified table 'admin', adding the columns 'round_id' and 'target' +ALTER TABLE `admin_log` + ADD COLUMN `round_id` INT UNSIGNED NOT NULL AFTER `datetime`, + ADD COLUMN `target` VARCHAR(32) NOT NULL AFTER `operation`; + +---------------------------------------------------- + Version 4.1, 3 February 2018, by Jordie0608 Modified tables 'admin', 'admin_log' and 'admin_rank', removing unnecessary columns and adding support for excluding rights flags from admin ranks. This change was made to enable use of sql-based admin loading. @@ -41,7 +49,6 @@ ALTER TABLE `admin_ranks` DROP PRIMARY KEY, ADD PRIMARY KEY (`rank`); - ---------------------------------------------------- Version 4.0, 12 November 2017, by Jordie0608 diff --git a/SQL/tgstation_schema.sql b/SQL/tgstation_schema.sql index ddd31a7e80..92411ea895 100644 --- a/SQL/tgstation_schema.sql +++ b/SQL/tgstation_schema.sql @@ -33,9 +33,11 @@ DROP TABLE IF EXISTS `admin_log`; CREATE TABLE `admin_log` ( `id` int(11) NOT NULL AUTO_INCREMENT, `datetime` datetime NOT NULL, + `round_id` int(11) unsigned NOT NULL, `adminckey` varchar(32) NOT NULL, `adminip` int(10) unsigned NOT NULL, `operation` enum('add admin','remove admin','change admin rank','add rank','remove rank','change rank flags') NOT NULL, + `target` varchar(32) NOT NULL, `log` varchar(1000) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; diff --git a/SQL/tgstation_schema_prefixed.sql b/SQL/tgstation_schema_prefixed.sql index 01e0ed150b..de9d67e335 100644 --- a/SQL/tgstation_schema_prefixed.sql +++ b/SQL/tgstation_schema_prefixed.sql @@ -33,9 +33,11 @@ DROP TABLE IF EXISTS `SS13_admin_log`; CREATE TABLE `SS13_admin_log` ( `id` int(11) NOT NULL AUTO_INCREMENT, `datetime` datetime NOT NULL, + `round_id` int(11) unsigned NOT NULL, `adminckey` varchar(32) NOT NULL, `adminip` int(10) unsigned NOT NULL, `operation` enum('add admin','remove admin','change admin rank','add rank','remove rank','change rank flags') NOT NULL, + `target` varchar(32) NOT NULL, `log` varchar(1000) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm index 3cec4248d2..3740a542e9 100644 --- a/code/__DEFINES/subsystems.dm +++ b/code/__DEFINES/subsystems.dm @@ -1,7 +1,7 @@ //Update this whenever the db schema changes //make sure you add an update to the schema_version stable in the db changelog #define DB_MAJOR_VERSION 4 -#define DB_MINOR_VERSION 1 +#define DB_MINOR_VERSION 2 //Timing subsystem //Don't run if there is an identical unique timer active diff --git a/code/modules/admin/admin_ranks.dm b/code/modules/admin/admin_ranks.dm index dee4787753..7873a97f7c 100644 --- a/code/modules/admin/admin_ranks.dm +++ b/code/modules/admin/admin_ranks.dm @@ -242,7 +242,6 @@ GLOBAL_PROTECT(protected_ranks) var/skip if(rank_names[admin_rank] == null) message_admins("[admin_ckey] loaded with invalid admin rank [admin_rank].") - log_sql("[admin_ckey] loaded with invalid admin rank [admin_rank].") skip = 1 if(GLOB.admin_datums[admin_ckey] || GLOB.deadmins[admin_ckey]) skip = 1 diff --git a/code/modules/admin/permissionedit.dm b/code/modules/admin/permissionedit.dm index f7bb770079..1d0bdddf03 100644 --- a/code/modules/admin/permissionedit.dm +++ b/code/modules/admin/permissionedit.dm @@ -6,56 +6,106 @@ return usr.client.holder.edit_admin_permissions() -/datum/admins/proc/edit_admin_permissions() +/datum/admins/proc/edit_admin_permissions(action, target, operation, page) if(!check_rights(R_PERMISSIONS)) return - - var/list/output = list({" - - -Permissions Panel - - - - -
- - - - - - - -"}) - - for(var/adm_ckey in GLOB.admin_datums+GLOB.deadmins) - var/datum/admins/D = GLOB.admin_datums[adm_ckey] - if(!D) - D = GLOB.deadmins[adm_ckey] - if (!D) - continue - - var/deadminlink = "" - if (D.deadmined) - deadminlink = " \[RA\]" - else - deadminlink = " \[DA\]" - - output += "" - output += "" - output += "" - output += "" - output += "" - output += "" - output += "" - - output += {" -
CKEY \[+\]RANKPERMISSIONSDENIEDALLOWED TO EDIT
[adm_ckey]
[deadminlink]\[-\]\[SYNC TGDB\]
[D.rank.name][rights2text(D.rank.include_rights," ")][rights2text(D.rank.exclude_rights," ", "-")][rights2text(D.rank.can_edit_rights," ", "*")]
-
Search:
- -"} - - usr << browse(jointext(output, ""),"window=editrights;size=1000x650") + var/list/output = list("\[Permissions\]") + if(action) + output += " | \[Log\] | \[Management\]
" + else + output += "
\[Log\]
\[Management\]" + if(action == 1) + var/list/searchlist = list(" WHERE ") + if(target) + searchlist += "ckey = '[sanitizeSQL(target)]'" + if(operation) + if(target) + searchlist += " AND " + searchlist += "operation = '[sanitizeSQL(operation)]'" + var/search + if(searchlist.len > 1) + search = searchlist.Join("") + var/logcount = 0 + var/logssperpage = 20 + var/pagecount = 0 + page = text2num(page) + var/datum/DBQuery/query_count_admin_logs = SSdbcore.NewQuery("SELECT COUNT(id) FROM [format_table_name("admin_log")][search]") + if(!query_count_admin_logs.warn_execute()) + return + if(query_count_admin_logs.NextRow()) + logcount = text2num(query_count_admin_logs.item[1]) + if(logcount > logssperpage) + output += "
Page: " + while(logcount > 0) + output += "|[pagecount == page ? "\[[pagecount]\]" : "\[[pagecount]\]"]" + logcount -= logssperpage + pagecount++ + output += "|" + var/limit = " LIMIT [logssperpage * page], [logssperpage]" + var/datum/DBQuery/query_search_admin_logs = SSdbcore.NewQuery("SELECT datetime, round_id, adminckey, operation, target, log FROM [format_table_name("admin_log")][search] ORDER BY datetime DESC[limit]") + if(!query_search_admin_logs.warn_execute()) + return + while(query_search_admin_logs.NextRow()) + var/datetime = query_search_admin_logs.item[1] + var/round_id = query_search_admin_logs.item[2] + var/admin_ckey = query_search_admin_logs.item[3] + operation = query_search_admin_logs.item[4] + target = query_search_admin_logs.item[5] + var/log = query_search_admin_logs.item[6] + output += "

[datetime] | Round ID [round_id] | Admin [admin_ckey] | Operation [operation] on [target]
[log]


" + if(action == 2) + output += "

Admin ckeys with invalid ranks

" + var/datum/DBQuery/query_check_admin_errors = SSdbcore.NewQuery("SELECT ckey, [format_table_name("admin")].rank FROM [format_table_name("admin")] LEFT JOIN [format_table_name("admin_ranks")] ON [format_table_name("admin_ranks")].rank = [format_table_name("admin")].rank WHERE [format_table_name("admin_ranks")].rank IS NULL") + if(!query_check_admin_errors.warn_execute()) + return + while(query_check_admin_errors.NextRow()) + var/admin_ckey = query_check_admin_errors.item[1] + var/admin_rank = query_check_admin_errors.item[2] + output += "[admin_ckey] has non-existant rank [admin_rank] | \[Change Rank\] | \[Remove\]" + output += "
" + output += "

Unused ranks

" + var/datum/DBQuery/query_check_unused_rank = SSdbcore.NewQuery("SELECT [format_table_name("admin_ranks")].rank FROM [format_table_name("admin_ranks")] LEFT JOIN [format_table_name("admin")] ON [format_table_name("admin")].rank = [format_table_name("admin_ranks")].rank WHERE [format_table_name("admin")].rank IS NULL") + if(!query_check_unused_rank.warn_execute()) + return + while(query_check_unused_rank.NextRow()) + var/admin_rank = query_check_unused_rank.item[1] + output += "Rank [admin_rank] is not held by any admin | \[Remove\]" + output += "
" + else if(!action) + output += {" + Permissions Panel + + + +
+ + + + + + + + "} + for(var/adm_ckey in GLOB.admin_datums+GLOB.deadmins) + var/datum/admins/D = GLOB.admin_datums[adm_ckey] + if(!D) + D = GLOB.deadmins[adm_ckey] + if (!D) + continue + var/deadminlink = "" + if (D.deadmined) + deadminlink = " \[RA\]" + else + deadminlink = " \[DA\]" + output += "" + output += "" + output += "" + output += "" + output += "" + output += "" + output += "" + output += "
CKEY \[+\]RANKPERMISSIONSDENIEDALLOWED TO EDIT
[adm_ckey]
[deadminlink]\[-\]\[SYNC TGDB\]
[D.rank.name][rights2text(D.rank.include_rights," ")][rights2text(D.rank.exclude_rights," ", "-")][rights2text(D.rank.can_edit_rights," ", "*")]
Search:
" + usr << browse("[jointext(output, "")]","window=editrights;size=1000x650") /datum/admins/proc/edit_rights_topic(list/href_list) if(!check_rights(R_PERMISSIONS)) @@ -142,10 +192,17 @@ return FALSE if(use_db) . = sanitizeSQL(.) + //if an admin exists without a datum they won't be caught by the above + var/datum/DBQuery/query_admin_in_db = SSdbcore.NewQuery("SELECT 1 FROM [format_table_name("admin_ranks")] WHERE ckey = '[.]'") + if(!query_admin_in_db.warn_execute()) + return FALSE + if(query_admin_in_db.NextRow()) + to_chat(usr, "[.] already listed in admin database. Check the Management tab if they don't appear in the list of admins.") + return FALSE var/datum/DBQuery/query_add_admin = SSdbcore.NewQuery("INSERT INTO [format_table_name("admin")] (ckey, rank) VALUES ('[.]', 'NEW ADMIN')") if(!query_add_admin.warn_execute()) return FALSE - var/datum/DBQuery/query_add_admin_log = SSdbcore.NewQuery("INSERT INTO [format_table_name("admin_log")] (datetime, adminckey, adminip, operation, log) VALUES ('[SQLtime()]', '[sanitizeSQL(usr.ckey)]', INET_ATON('[sanitizeSQL(usr.client.address)]'), 'add admin', 'New admin added: [.]')") + var/datum/DBQuery/query_add_admin_log = SSdbcore.NewQuery("INSERT INTO [format_table_name("admin_log")] (datetime, round_id, adminckey, adminip, operation, target, log) VALUES ('[SQLtime()]', '[GLOB.round_id]', '[sanitizeSQL(usr.ckey)]', INET_ATON('[sanitizeSQL(usr.client.address)]'), 'add admin', '[.]', 'New admin added: [.]')") if(!query_add_admin_log.warn_execute()) return FALSE @@ -153,12 +210,13 @@ if(alert("Are you sure you want to remove [admin_ckey]?","Confirm Removal","Do it","Cancel") == "Do it") GLOB.admin_datums -= admin_ckey GLOB.deadmins -= admin_ckey - D.disassociate() + if(D) + D.disassociate() if(use_db) var/datum/DBQuery/query_add_rank = SSdbcore.NewQuery("DELETE FROM [format_table_name("admin")] WHERE ckey = '[admin_ckey]'") if(!query_add_rank.warn_execute()) return - var/datum/DBQuery/query_add_rank_log = SSdbcore.NewQuery("INSERT INTO [format_table_name("admin_log")] (datetime, adminckey, adminip, operation, log) VALUES ('[SQLtime()]', '[sanitizeSQL(usr.ckey)]', INET_ATON('[sanitizeSQL(usr.client.address)]'), 'remove admin', 'Admin removed: [admin_ckey]')") + var/datum/DBQuery/query_add_rank_log = SSdbcore.NewQuery("INSERT INTO [format_table_name("admin_log")] (datetime, round_id, adminckey, adminip, operation, target, log) VALUES ('[SQLtime()]', '[GLOB.round_id]', '[sanitizeSQL(usr.ckey)]', INET_ATON('[sanitizeSQL(usr.client.address)]'), 'remove admin', '[admin_ckey]', 'Admin removed: [admin_ckey]')") if(!query_add_rank_log.warn_execute()) return message_admins("[key_name_admin(usr)] removed [admin_ckey] from the admins list [use_db ? "permanently" : "temporarily"]") @@ -216,13 +274,13 @@ var/datum/DBQuery/query_add_rank = SSdbcore.NewQuery("INSERT INTO [format_table_name("admin_ranks")] (rank, flags, exclude_flags, can_edit_flags) VALUES ('[new_rank]', '0', '0', '0')") if(!query_add_rank.warn_execute()) return - var/datum/DBQuery/query_add_rank_log = SSdbcore.NewQuery("INSERT INTO [format_table_name("admin_log")] (datetime, adminckey, adminip, operation, log) VALUES ('[SQLtime()]', '[sanitizeSQL(usr.ckey)]', INET_ATON('[sanitizeSQL(usr.client.address)]'), 'add rank', 'New rank added: [admin_ckey]')") + var/datum/DBQuery/query_add_rank_log = SSdbcore.NewQuery("INSERT INTO [format_table_name("admin_log")] (datetime, round_id, adminckey, adminip, operation, target, log) VALUES ('[SQLtime()]', '[GLOB.round_id]', '[sanitizeSQL(usr.ckey)]', INET_ATON('[sanitizeSQL(usr.client.address)]'), 'add rank', '[new_rank]', 'New rank added: [new_rank]')") if(!query_add_rank_log.warn_execute()) return var/datum/DBQuery/query_change_rank = SSdbcore.NewQuery("UPDATE [format_table_name("admin")] SET rank = '[new_rank]' WHERE ckey = '[admin_ckey]'") if(!query_change_rank.warn_execute()) return - var/datum/DBQuery/query_change_rank_log = SSdbcore.NewQuery("INSERT INTO [format_table_name("admin_log")] (datetime, adminckey, adminip, operation, log) VALUES ('[SQLtime()]', '[sanitizeSQL(usr.ckey)]', INET_ATON('[sanitizeSQL(usr.client.address)]'), 'change admin rank', 'Rank of [admin_ckey] changed from [old_rank] to [new_rank]')") + var/datum/DBQuery/query_change_rank_log = SSdbcore.NewQuery("INSERT INTO [format_table_name("admin_log")] (datetime, round_id, adminckey, adminip, operation, target, log) VALUES ('[SQLtime()]', '[GLOB.round_id]', '[sanitizeSQL(usr.ckey)]', INET_ATON('[sanitizeSQL(usr.client.address)]'), 'change admin rank', '[admin_ckey]', 'Rank of [admin_ckey] changed from [old_rank] to [new_rank]')") if(!query_change_rank_log.warn_execute()) return if(D) //they were previously an admin @@ -259,7 +317,7 @@ var/datum/DBQuery/query_change_rank_flags = SSdbcore.NewQuery("UPDATE [format_table_name("admin_ranks")] SET flags = '[new_flags]', exclude_flags = '[new_exclude_flags]', can_edit_flags = '[new_can_edit_flags]' WHERE rank = '[D.rank.name]'") if(!query_change_rank_flags.warn_execute()) return - var/datum/DBQuery/query_change_rank_flags_log = SSdbcore.NewQuery("INSERT INTO [format_table_name("admin_log")] (datetime, adminckey, adminip, operation, log) VALUES ('[SQLtime()]', '[sanitizeSQL(usr.ckey)]', INET_ATON('[sanitizeSQL(usr.client.address)]'), 'change rank flags', 'Permissions of [admin_ckey] changed from[rights2text(old_flags," ")][rights2text(old_exclude_flags," ", "-")][rights2text(old_can_edit_flags," ", "*")] to[rights2text(new_flags," ")][rights2text(new_exclude_flags," ", "-")][rights2text(new_can_edit_flags," ", "*")]')") + var/datum/DBQuery/query_change_rank_flags_log = SSdbcore.NewQuery("INSERT INTO [format_table_name("admin_log")] (datetime, round_id, adminckey, adminip, operation, target, log) VALUES ('[SQLtime()]', '[GLOB.round_id]', '[sanitizeSQL(usr.ckey)]', INET_ATON('[sanitizeSQL(usr.client.address)]'), 'change rank flags', '[D.rank.name]', 'Permissions of [D.rank.name] changed from[rights2text(old_flags," ")][rights2text(old_exclude_flags," ", "-")][rights2text(old_can_edit_flags," ", "*")] to[rights2text(new_flags," ")][rights2text(new_exclude_flags," ", "-")][rights2text(new_can_edit_flags," ", "*")]')") if(!query_change_rank_flags_log.warn_execute()) return for(var/datum/admin_rank/R in GLOB.admin_ranks) @@ -294,6 +352,36 @@ message_admins("[key_name_admin(usr)] edited the permissions of [use_db ? " rank [D.rank.name] permanently" : "[admin_ckey] temporarily"]") log_admin("[key_name(usr)] edited the permissions of [use_db ? " rank [D.rank.name] permanently" : "[admin_ckey] temporarily"]") +/datum/admins/proc/remove_rank(admin_rank) + if(!admin_rank) + return + for(var/datum/admin_rank/R in GLOB.admin_ranks) + if(R.name == admin_rank && (!(R.rights & usr.client.holder.rank.can_edit_rights) == R.rights)) + to_chat(usr, "You don't have edit rights to all the rights this rank has, rank deletion not permitted.") + return + if(!CONFIG_GET(flag/admin_legacy_system) && CONFIG_GET(flag/protect_legacy_ranks) && (admin_rank in GLOB.protected_ranks)) + to_chat(usr, "Deletion of protected ranks is not permitted, it must be removed from admin_ranks.txt.") + return + if(CONFIG_GET(flag/load_legacy_ranks_only)) + to_chat(usr, "Rank deletion not permitted while database rank loading is disabled.") + return + admin_rank = sanitizeSQL(admin_rank) + var/datum/DBQuery/query_admins_with_rank = SSdbcore.NewQuery("SELECT 1 FROM [format_table_name("admin")] WHERE rank = '[admin_rank]'") + if(!query_admins_with_rank.warn_execute()) + return + if(query_admins_with_rank.NextRow()) + to_chat(usr, "Error: Rank deletion attempted while rank still used; Tell a coder, this shouldn't happen.") + return + if(alert("Are you sure you want to remove [admin_rank]?","Confirm Removal","Do it","Cancel") == "Do it") + var/datum/DBQuery/query_add_rank = SSdbcore.NewQuery("DELETE FROM [format_table_name("admin_ranks")] WHERE rank = '[admin_rank]'") + if(!query_add_rank.warn_execute()) + return + var/datum/DBQuery/query_add_rank_log = SSdbcore.NewQuery("INSERT INTO [format_table_name("admin_log")] (datetime, round_id, adminckey, adminip, operation, target, log) VALUES ('[SQLtime()]', '[GLOB.round_id]', '[sanitizeSQL(usr.ckey)]', INET_ATON('[sanitizeSQL(usr.client.address)]'), 'remove rank', '[admin_rank]', 'Rank removed: [admin_rank]')") + if(!query_add_rank_log.warn_execute()) + return + message_admins("[key_name_admin(usr)] removed rank [admin_rank] permanently") + log_admin("[key_name(usr)] removed rank [admin_rank] permanently") + /datum/admins/proc/sync_lastadminrank(admin_ckey, datum/admins/D) var/sqlrank = sanitizeSQL(D.rank.name) admin_ckey = sanitizeSQL(admin_ckey) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index a9b1b10606..2d4388cce2 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -273,6 +273,21 @@ return create_message("note", banckey, null, banreason, null, null, 0, 0) + else if(href_list["editrightsbrowser"]) + edit_admin_permissions(0) + + else if(href_list["editrightsbrowserlog"]) + edit_admin_permissions(1, href_list["editrightstarget"], href_list["editrightsoperation"], href_list["editrightspage"]) + + if(href_list["editrightsbrowsermanage"]) + if(href_list["editrightschange"]) + change_admin_rank(href_list["editrightschange"], TRUE) + else if(href_list["editrightsremove"]) + remove_admin(href_list["editrightsremove"], TRUE) + else if(href_list["editrightsremoverank"]) + remove_rank(href_list["editrightsremoverank"]) + edit_admin_permissions(2) + else if(href_list["editrights"]) edit_rights_topic(href_list) diff --git a/html/panels.css b/html/panels.css index ac44cf5487..5e2edab67a 100644 --- a/html/panels.css +++ b/html/panels.css @@ -1,3 +1,4 @@ +<<<<<<< HEAD body {padding:0px;margin:0px;} #top {position:fixed;top:5px;left:10%;width:80%;text-align:center;background-color:#fff;border:2px solid #ccc;} #main {position:relative;top:50px;left:3%;width:96%;text-align:center;z-index:0;} @@ -8,3 +9,15 @@ tr.alt {background-color:#e7e7e7;} .small {font-size:80%;} a {text-decoration:none;color:#a0a;} a:hover {color:#d3d;} +======= +body {padding:0px;margin:0px;} +#top {position:fixed;top:5px;left:10%;width:80%;text-align:center;background-color:#fff;border:2px solid #ccc;} +#main {position:relative;top:10px;left:3%;width:96%;text-align:center;z-index:0;} +#searchable {table-layout:fixed;width:100%;text-align:center;"#f4f4f4";} +tr.norm {background-color:#f4f4f4;} +tr.title {background-color:#ccc;} +tr.alt {background-color:#e7e7e7;} +.small {font-size:80%;} +a {text-decoration:none;} +a:hover {color:#d3d;} +>>>>>>> 4b455e8... Merge pull request #37267 from Jordie0608/iwasgoingtolaughatcitrusfordoingthisbutthenimadethesamemistake From 2b2ff05b737fe574a33c25f7b450b26e9c902c3b Mon Sep 17 00:00:00 2001 From: pigeons Date: Fri, 27 Apr 2018 21:28:13 -0400 Subject: [PATCH 03/63] Modified bomb and syndicate bomb spawner so Cuban Pete bombs maxcap and work again --- code/__DEFINES/atmospherics.dm | 2 + .../objects/effects/spawners/bombspawner.dm | 49 +++++++++++++++---- .../atmospherics/gasmixtures/reactions.dm | 4 -- 3 files changed, 42 insertions(+), 13 deletions(-) diff --git a/code/__DEFINES/atmospherics.dm b/code/__DEFINES/atmospherics.dm index 3c25547ce6..aafc89f356 100644 --- a/code/__DEFINES/atmospherics.dm +++ b/code/__DEFINES/atmospherics.dm @@ -56,6 +56,8 @@ #define FIRE_SPREAD_RADIOSITY_SCALE 0.85 #define FIRE_GROWTH_RATE 40000 //For small fires #define PLASMA_MINIMUM_BURN_TEMPERATURE (100+T0C) +#define PLASMA_UPPER_TEMPERATURE (1370+T0C) +#define PLASMA_OXYGEN_FULLBURN 10 //GASES #define MIN_TOXIC_GAS_DAMAGE 1 diff --git a/code/game/objects/effects/spawners/bombspawner.dm b/code/game/objects/effects/spawners/bombspawner.dm index e376795704..a69bfc7f1d 100644 --- a/code/game/objects/effects/spawners/bombspawner.dm +++ b/code/game/objects/effects/spawners/bombspawner.dm @@ -1,46 +1,77 @@ +#define CELSIUS_TO_KELVIN(T_K) ((T_K) + T0C) + +#define OPTIMAL_TEMP_K_PLA_BURN_SCALE(PRESSURE_P,PRESSURE_O,TEMP_O) (((PRESSURE_P) * GLOB.meta_gas_info[/datum/gas/plasma][META_GAS_SPECIFIC_HEAT]) / (((PRESSURE_P) * GLOB.meta_gas_info[/datum/gas/plasma][META_GAS_SPECIFIC_HEAT] + (PRESSURE_O) * GLOB.meta_gas_info[/datum/gas/oxygen][META_GAS_SPECIFIC_HEAT]) / PLASMA_UPPER_TEMPERATURE - (PRESSURE_O) * GLOB.meta_gas_info[/datum/gas/oxygen][META_GAS_SPECIFIC_HEAT] / CELSIUS_TO_KELVIN(TEMP_O))) +#define OPTIMAL_TEMP_K_PLA_BURN_RATIO(PRESSURE_P,PRESSURE_O,TEMP_O) (CELSIUS_TO_KELVIN(TEMP_O) * PLASMA_OXYGEN_FULLBURN * (PRESSURE_P) / (PRESSURE_O)) + /obj/effect/spawner/newbomb name = "bomb" icon = 'icons/mob/screen_gen.dmi' icon_state = "x" - var/btemp1 = 1500 - var/btemp2 = 1000 // tank temperatures + var/temp_p = 1500 + var/temp_o = 1000 // tank temperatures + var/pressure_p = 10 * ONE_ATMOSPHERE + var/pressure_o = 10 * ONE_ATMOSPHERE //tank pressures var/assembly_type /obj/effect/spawner/newbomb/Initialize() . = ..() +<<<<<<< HEAD var/obj/item/device/transfer_valve/V = new(src.loc) var/obj/item/tank/internals/plasma/full/PT = new(V) +======= + var/obj/item/transfer_valve/V = new(src.loc) + var/obj/item/tank/internals/plasma/PT = new(V) +>>>>>>> c0b7f77... Modified bomb and syndicate bomb spawner so Cuban Pete bombs maxcap and work again (#37293) var/obj/item/tank/internals/oxygen/OT = new(V) - PT.air_contents.temperature = btemp1 + T0C - OT.air_contents.temperature = btemp2 + T0C + PT.air_contents.assert_gas(/datum/gas/plasma) + PT.air_contents.gases[/datum/gas/plasma][MOLES] = pressure_p*PT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_p)) + PT.air_contents.temperature = CELSIUS_TO_KELVIN(temp_p) + + OT.air_contents.assert_gas(/datum/gas/oxygen) + OT.air_contents.gases[/datum/gas/oxygen][MOLES] = pressure_o*OT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_o)) + OT.air_contents.temperature = CELSIUS_TO_KELVIN(temp_o) V.tank_one = PT V.tank_two = OT PT.master = V OT.master = V - + if(assembly_type) var/obj/item/device/assembly/A = new assembly_type(V) V.attached_device = A A.holder = V - A.toggle_secure() V.update_icon() - + return INITIALIZE_HINT_QDEL +/obj/effect/spawner/newbomb/timer/syndicate/Initialize() + temp_p = (OPTIMAL_TEMP_K_PLA_BURN_SCALE(pressure_p, pressure_o, temp_o)/2 + OPTIMAL_TEMP_K_PLA_BURN_RATIO(pressure_p, pressure_o, temp_o)/2) - T0C + . = ..() + /obj/effect/spawner/newbomb/timer assembly_type = /obj/item/device/assembly/timer /obj/effect/spawner/newbomb/timer/syndicate - btemp1 = 150 - btemp2 = 20 + pressure_o = TANK_LEAK_PRESSURE - 1 + temp_o = 20 + + pressure_p = TANK_LEAK_PRESSURE - 1 /obj/effect/spawner/newbomb/proximity assembly_type = /obj/item/device/assembly/prox_sensor /obj/effect/spawner/newbomb/radio +<<<<<<< HEAD assembly_type = /obj/item/device/assembly/signaler +======= + assembly_type = /obj/item/assembly/signaler +>>>>>>> c0b7f77... Modified bomb and syndicate bomb spawner so Cuban Pete bombs maxcap and work again (#37293) + +#undef CELSIUS_TO_KELVIN + +#undef OPTIMAL_TEMP_K_PLA_BURN_SCALE +#undef OPTIMAL_TEMP_K_PLA_BURN_RATIO diff --git a/code/modules/atmospherics/gasmixtures/reactions.dm b/code/modules/atmospherics/gasmixtures/reactions.dm index d2a12f0f9e..4cd2a30976 100644 --- a/code/modules/atmospherics/gasmixtures/reactions.dm +++ b/code/modules/atmospherics/gasmixtures/reactions.dm @@ -1,10 +1,8 @@ //Plasma fire properties #define OXYGEN_BURN_RATE_BASE 1.4 #define PLASMA_BURN_RATE_DELTA 9 -#define PLASMA_UPPER_TEMPERATURE (1370+T0C) #define PLASMA_MINIMUM_OXYGEN_NEEDED 2 #define PLASMA_MINIMUM_OXYGEN_PLASMA_RATIO 30 -#define PLASMA_OXYGEN_FULLBURN 10 #define FIRE_CARBON_ENERGY_RELEASED 100000 //Amount of heat released per mole of burnt carbon into the tile #define FIRE_HYDROGEN_ENERGY_RELEASED 280000 // Amount of heat released per mole of burnt hydrogen and/or tritium(hydrogen isotope) #define FIRE_PLASMA_ENERGY_RELEASED 3000000 //Amount of heat released per mole of burnt plasma into the tile @@ -362,10 +360,8 @@ #undef OXYGEN_BURN_RATE_BASE #undef PLASMA_BURN_RATE_DELTA -#undef PLASMA_UPPER_TEMPERATURE #undef PLASMA_MINIMUM_OXYGEN_NEEDED #undef PLASMA_MINIMUM_OXYGEN_PLASMA_RATIO -#undef PLASMA_OXYGEN_FULLBURN #undef FIRE_CARBON_ENERGY_RELEASED #undef FIRE_PLASMA_ENERGY_RELEASED #undef WATER_VAPOR_FREEZE From 3f6167d08e7235896bb4196cabd88f80b8302aa1 Mon Sep 17 00:00:00 2001 From: vuonojenmustaturska Date: Sat, 28 Apr 2018 21:22:28 +0300 Subject: [PATCH 04/63] Moves several clothing-specific flags from /atom to their proper type --- code/__DEFINES/flags.dm | 13 ++++------- code/__DEFINES/obj_flags.dm | 9 ++++++++ code/_globalvars/bitfields.dm | 17 +++++++++----- code/_globalvars/lists/typecache.dm | 2 ++ code/_onclick/hud/screen_objects.dm | 2 +- .../game/gamemodes/clown_ops/clown_weapons.dm | 2 +- code/game/objects/items/religion.dm | 2 +- code/game/objects/items/tanks/tanks.dm | 2 +- code/game/turfs/simulated/lava.dm | 2 +- .../changeling/powers/mutations.dm | 9 +++++++- .../clockcult/clock_items/clockwork_armor.dm | 20 ++++++++-------- code/modules/clothing/chameleon.dm | 6 ++--- code/modules/clothing/clothing.dm | 23 +++++++++++-------- code/modules/clothing/head/hardhat.dm | 6 ++--- code/modules/clothing/head/helmet.dm | 2 +- code/modules/clothing/masks/_masks.dm | 6 ++--- code/modules/clothing/masks/breath.dm | 4 ++-- code/modules/clothing/masks/gasmask.dm | 14 +++++------ code/modules/clothing/masks/hailer.dm | 4 ++-- code/modules/clothing/shoes/bananashoes.dm | 8 +++---- code/modules/clothing/shoes/magboots.dm | 12 +++++----- code/modules/clothing/shoes/miscellaneous.dm | 6 ++--- .../clothing/spacesuits/_spacesuits.dm | 6 ++--- .../modules/clothing/spacesuits/flightsuit.dm | 4 ++-- code/modules/clothing/spacesuits/hardsuit.dm | 12 +++++----- .../clothing/spacesuits/miscellaneous.dm | 18 +++++---------- code/modules/clothing/suits/armor.dm | 6 ++--- code/modules/clothing/suits/bio.dm | 4 ++-- code/modules/clothing/suits/miscellaneous.dm | 4 ++-- code/modules/clothing/suits/utility.dm | 12 +++++----- code/modules/hydroponics/beekeeping/beebox.dm | 7 ++++-- .../hydroponics/beekeeping/beekeeper_suit.dm | 5 ++-- .../modules/mining/equipment/explorer_gear.dm | 7 +++--- .../living/carbon/alien/special/facehugger.dm | 2 +- code/modules/mob/living/carbon/carbon.dm | 4 ++-- code/modules/mob/living/carbon/human/human.dm | 17 +++++++++----- .../mob/living/carbon/human/human_movement.dm | 15 ++++++++---- code/modules/mob/living/carbon/human/life.dm | 18 +++++++++++---- .../carbon/human/species_types/plasmamen.dm | 7 +++++- code/modules/mob/living/carbon/life.dm | 2 +- code/modules/mob/living/carbon/monkey/life.dm | 7 +++++- .../mob/living/simple_animal/bot/medbot.dm | 7 ++++-- code/modules/ninja/suit/shoes.dm | 4 ++-- .../xenobiology/crossbreeding/charged.dm | 10 ++++++-- 44 files changed, 202 insertions(+), 147 deletions(-) diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index f871ac6a44..2d2b2704c0 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -11,12 +11,15 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 #define DF_VAR_EDITED (1<<1) //FLAGS BITMASK +<<<<<<< HEAD #define STOPSPRESSUREDMAGE_1 (1<<0) //This flag is used on the flags_1 variable for SUIT and HEAD items which stop pressure damage. Note that the flag 1 was previous used as ONBACK, so it is possible for some code to use (flags & 1) when checking if something can be put on your back. Replace this code with (inv_flags & SLOT_BACK) if you see it anywhere //To successfully stop you taking all pressure damage you must have both a suit and head item with this flag. +======= +>>>>>>> 98f8ca7... Moves several clothing-specific flags from /atom to their proper type (#37486) #define NODROP_1 (1<<1) // This flag makes it so that an item literally cannot be removed at all, or at least that's how it should be. Only deleted. #define NOBLUDGEON_1 (1<<2) // when an item has this it produces no "X has been hit by Y with Z" message in the default attackby() -#define MASKINTERNALS_1 (1<<3) // mask allows internals + #define HEAR_1 (1<<4) // This flag is what recursive_hear_check() uses to determine wether to add an item to the hearer list or not. #define CHECK_RICOCHET_1 (1<<5) // Projectiels will check ricochet on things impacted that have this. #define CONDUCT_1 (1<<6) // conducts electricity (metal etc.) @@ -25,11 +28,6 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 #define OVERLAY_QUEUED_1 (1<<8) // atom queued to SSoverlay #define ON_BORDER_1 (1<<9) // item has priority to check when entering or leaving -#define NOSLIP_1 (1<<10) //prevents from slipping on wet floors, in space etc - -// BLOCK_GAS_SMOKE_EFFECT_1 only used in masks at the moment. -#define BLOCK_GAS_SMOKE_EFFECT_1 (1<<12) // blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY! -#define THICKMATERIAL_1 (1<<13) //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 DROPDEL_1 (1<<14) // When dropped, it calls qdel on itself #define PREVENT_CLICK_UNDER_1 (1<<15) //Prevent clicking things below it on the same turf eg. doors/ fulltile windows @@ -57,9 +55,6 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 // Stops you from putting things like an RCD or other items into an ORM or protolathe for materials. #define NO_MAT_REDEMPTION_2 (1<<10) -// LAVA_PROTECT used on the flags_2 variable for both SUIT and HEAD items, and stops lava damage. Must be present in both to stop lava damage. -#define LAVA_PROTECT_2 (1<<11) - //turf-only flags #define NOJAUNT_1 (1<<0) #define UNUSED_TRANSIT_TURF_1 (1<<1) diff --git a/code/__DEFINES/obj_flags.dm b/code/__DEFINES/obj_flags.dm index bfbf6f866a..1f4739491a 100644 --- a/code/__DEFINES/obj_flags.dm +++ b/code/__DEFINES/obj_flags.dm @@ -18,3 +18,12 @@ #define IN_INVENTORY (1<<1) //is this item equipped into an inventory slot or hand of a mob? used for tooltips #define FORCE_STRING_OVERRIDE (1<<2) // used for tooltips #define NEEDS_PERMIT (1<<3) //Used by security bots to determine if this item is safe for public use. + +// 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 MASKINTERNALS (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. diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index 168863708c..aad1622a52 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -106,17 +106,15 @@ GLOBAL_LIST_INIT(bitfields, list( "REAGENT_NOREACT" = REAGENT_NOREACT ), "flags_1" = list( - "STOPSPRESSUREDMAGE_1 / NOJAUNT_1 (turfs)" = STOPSPRESSUREDMAGE_1, + "NOJAUNT_1" = NOJAUNT_1, "NODROP_1 / UNUSED_TRANSIT_TURF_1 (turfs)" = NODROP_1, "NOBLUDGEON_1 / CAN_BE_DIRTY_1 (turfs)" = NOBLUDGEON_1, - "MASKINTERNALS_1" = MASKINTERNALS_1, "HEAR_1 / NO_DEATHRATTLE_1 (turfs)" = HEAR_1, "CHECK_RICOCHET_1 / NO_RUINS_1 (turfs)" = CHECK_RICOCHET_1, "CONDUCT_1 / NO_LAVA_GEN_1" = CONDUCT_1, "ABSTRACT_1" = ABSTRACT_1, "NODECONSTRUCT_1" = NODECONSTRUCT_1, "OVERLAY_QUEUED_1" = OVERLAY_QUEUED_1, - "NOSLIP_1" = NOSLIP_1 ), "flags_2" = list( "SLOWS_WHILE_IN_HAND_2" = SLOWS_WHILE_IN_HAND_2, @@ -127,7 +125,14 @@ GLOBAL_LIST_INIT(bitfields, list( "HEALS_EARS_2" = HEALS_EARS_2, "OMNITONGUE_2" = OMNITONGUE_2, "TESLA_IGNORE_2" = TESLA_IGNORE_2, - "NO_MAT_REDEMPTION_2" = NO_MAT_REDEMPTION_2, - "LAVA_PROTECT_2" = LAVA_PROTECT_2 - ) + "NO_MAT_REDEMPTION_2" = NO_MAT_REDEMPTION_2 + ), + "clothing_flags" = list( + "LAVAPROTECT" = LAVAPROTECT, + "STOPSPRESSUREDAMAGE" = STOPSPRESSUREDAMAGE, + "BLOCK_GAS_SMOKE_EFFECT" = BLOCK_GAS_SMOKE_EFFECT, + "MASKINTERNALS" = MASKINTERNALS, + "NOSLIP" = NOSLIP, + "THICKMATERIAL" = THICKMATERIAL, + ) )) diff --git a/code/_globalvars/lists/typecache.dm b/code/_globalvars/lists/typecache.dm index f1e2b03790..f4e73f2994 100644 --- a/code/_globalvars/lists/typecache.dm +++ b/code/_globalvars/lists/typecache.dm @@ -10,3 +10,5 @@ GLOBAL_LIST_INIT(typecache_living, typecacheof(/mob/living)) GLOBAL_LIST_INIT(typecache_machine_or_structure, typecacheof(list(/obj/machinery, /obj/structure))) GLOBAL_LIST_INIT(typecache_shuttle_area, typecacheof(/area/shuttle)) + +GLOBAL_LIST_INIT(typecache_clothing, typecacheof(/obj/item/clothing)) diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 865061eb3a..f90b7045b0 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -264,7 +264,7 @@ var/obj/item/clothing/mask/M = C.wear_mask if(M.mask_adjusted) // if mask on face but pushed down M.adjustmask(C) // adjust it back - if( !(M.flags_1 & MASKINTERNALS_1) ) + if( !(M.clothing_flags & MASKINTERNALS) ) to_chat(C, "You are not wearing an internals mask!") return diff --git a/code/game/gamemodes/clown_ops/clown_weapons.dm b/code/game/gamemodes/clown_ops/clown_weapons.dm index 6488a98d7d..6488701055 100644 --- a/code/game/gamemodes/clown_ops/clown_weapons.dm +++ b/code/game/gamemodes/clown_ops/clown_weapons.dm @@ -15,7 +15,7 @@ /obj/item/clothing/shoes/clown_shoes/combat name = "combat clown shoes" desc = "advanced clown shoes that protect the wearer and render them nearly immune to slipping on their own peels. They also squeek at 100% capacity." - flags_1 = NOSLIP_1 + clothing_flags = NOSLIP slowdown = SHOES_SLOWDOWN armor = list("melee" = 25, "bullet" = 25, "laser" = 25, "energy" = 25, "bomb" = 50, "bio" = 10, "rad" = 0, "fire" = 70, "acid" = 50) strip_delay = 70 diff --git a/code/game/objects/items/religion.dm b/code/game/objects/items/religion.dm index 0f926b4ee3..060448946a 100644 --- a/code/game/objects/items/religion.dm +++ b/code/game/objects/items/religion.dm @@ -325,7 +325,7 @@ icon_state = "crusader" w_class = WEIGHT_CLASS_NORMAL armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 40, "bomb" = 60, "bio" = 0, "rad" = 0, "fire" = 60, "acid" = 60) //does this even do anything on boots? - flags_1 = NOSLIP_1 + clothing_flags = NOSLIP cold_protection = FEET min_cold_protection_temperature = SHOES_MIN_TEMP_PROTECT heat_protection = FEET diff --git a/code/game/objects/items/tanks/tanks.dm b/code/game/objects/items/tanks/tanks.dm index 2e512c3ec4..8d8d2870e2 100644 --- a/code/game/objects/items/tanks/tanks.dm +++ b/code/game/objects/items/tanks/tanks.dm @@ -38,7 +38,7 @@ return if(H.wear_mask.mask_adjusted) H.wear_mask.adjustmask(H) - if(!(H.wear_mask.flags_1 & MASKINTERNALS_1)) + if(!(H.wear_mask.clothing_flags & MASKINTERNALS)) to_chat(H, "[H.wear_mask] can't use [src]!") return diff --git a/code/game/turfs/simulated/lava.dm b/code/game/turfs/simulated/lava.dm index f8ab060853..fd83dd0113 100644 --- a/code/game/turfs/simulated/lava.dm +++ b/code/game/turfs/simulated/lava.dm @@ -130,7 +130,7 @@ var/obj/item/clothing/S = C.get_item_by_slot(slot_wear_suit) var/obj/item/clothing/H = C.get_item_by_slot(slot_head) - if(S && H && S.flags_2 & LAVA_PROTECT_2 && H.flags_2 & LAVA_PROTECT_2) + if(S && H && S.clothing_flags & LAVAPROTECT && H.clothing_flags & LAVAPROTECT) return L.adjustFireLoss(20) diff --git a/code/modules/antagonists/changeling/powers/mutations.dm b/code/modules/antagonists/changeling/powers/mutations.dm index e3fb55fa42..1d08860b93 100644 --- a/code/modules/antagonists/changeling/powers/mutations.dm +++ b/code/modules/antagonists/changeling/powers/mutations.dm @@ -445,8 +445,14 @@ name = "flesh mass" icon_state = "lingspacesuit" desc = "A huge, bulky mass of pressure and temperature-resistant organic tissue, evolved to facilitate space travel." +<<<<<<< HEAD flags_1 = STOPSPRESSUREDMAGE_1 | NODROP_1 | DROPDEL_1 //Not THICKMATERIAL_1 because it's organic tissue, so if somebody tries to inject something into it, it still ends up in your blood. (also balance but muh fluff) allowed = list(/obj/item/device/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/oxygen) +======= + flags_1 = NODROP_1 | DROPDEL_1 + clothing_flags = STOPSPRESSUREDAMAGE //Not THICKMATERIAL because it's organic tissue, so if somebody tries to inject something into it, it still ends up in your blood. (also balance but muh fluff) + allowed = list(/obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/oxygen) +>>>>>>> 98f8ca7... Moves several clothing-specific flags from /atom to their proper type (#37486) armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 90) //No armor at all. /obj/item/clothing/suit/space/changeling/Initialize() @@ -464,7 +470,8 @@ name = "flesh mass" icon_state = "lingspacehelmet" desc = "A covering of pressure and temperature-resistant organic tissue with a glass-like chitin front." - flags_1 = STOPSPRESSUREDMAGE_1 | NODROP_1 | DROPDEL_1 //Again, no THICKMATERIAL_1. + flags_1 = NODROP_1 | DROPDEL_1 + clothing_flags = STOPSPRESSUREDAMAGE armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 90) flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH diff --git a/code/modules/antagonists/clockcult/clock_items/clockwork_armor.dm b/code/modules/antagonists/clockcult/clock_items/clockwork_armor.dm index 8b018fa6d3..963a90ffb1 100644 --- a/code/modules/antagonists/clockcult/clock_items/clockwork_armor.dm +++ b/code/modules/antagonists/clockcult/clock_items/clockwork_armor.dm @@ -21,17 +21,17 @@ /obj/item/clothing/head/helmet/clockwork/ratvar_act() if(GLOB.ratvar_awakens) armor = list("melee" = 100, "bullet" = 100, "laser" = 100, "energy" = 100, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100) - flags_1 |= STOPSPRESSUREDMAGE_1 + clothing_flags |= STOPSPRESSUREDAMAGE max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT else if(GLOB.ratvar_approaches) armor = list("melee" = 70, "bullet" = 80, "laser" = -15, "energy" = 25, "bomb" = 70, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100) - flags_1 |= STOPSPRESSUREDMAGE_1 + clothing_flags |= STOPSPRESSUREDAMAGE max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT else armor = list("melee" = 60, "bullet" = 70, "laser" = -25, "energy" = 0, "bomb" = 60, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100) - flags_1 &= ~STOPSPRESSUREDMAGE_1 + clothing_flags &= ~STOPSPRESSUREDAMAGE max_heat_protection_temperature = initial(max_heat_protection_temperature) min_cold_protection_temperature = initial(min_cold_protection_temperature) @@ -82,17 +82,17 @@ /obj/item/clothing/suit/armor/clockwork/ratvar_act() if(GLOB.ratvar_awakens) armor = list("melee" = 100, "bullet" = 100, "laser" = 100, "energy" = 100, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100) - flags_1 |= STOPSPRESSUREDMAGE_1 + clothing_flags |= STOPSPRESSUREDAMAGE max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT else if(GLOB.ratvar_approaches) armor = list("melee" = 70, "bullet" = 80, "laser" = -15, "energy" = 25, "bomb" = 70, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100) - flags_1 |= STOPSPRESSUREDMAGE_1 + clothing_flags |= STOPSPRESSUREDAMAGE max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT else armor = list("melee" = 60, "bullet" = 70, "laser" = -25, "energy" = 0, "bomb" = 60, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100) - flags_1 &= ~STOPSPRESSUREDMAGE_1 + clothing_flags &= ~STOPSPRESSUREDAMAGE max_heat_protection_temperature = initial(max_heat_protection_temperature) min_cold_protection_temperature = initial(min_cold_protection_temperature) @@ -148,12 +148,12 @@ /obj/item/clothing/gloves/clockwork/ratvar_act() if(GLOB.ratvar_awakens) armor = list("melee" = 100, "bullet" = 100, "laser" = 100, "energy" = 100, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100) - flags_1 |= STOPSPRESSUREDMAGE_1 + clothing_flags |= STOPSPRESSUREDAMAGE max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT else armor = list("melee" = 80, "bullet" = 70, "laser" = -25, "energy" = 0, "bomb" = 60, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100) - flags_1 &= ~STOPSPRESSUREDMAGE_1 + clothing_flags &= ~STOPSPRESSUREDAMAGE max_heat_protection_temperature = initial(max_heat_protection_temperature) min_cold_protection_temperature = initial(min_cold_protection_temperature) @@ -203,9 +203,9 @@ /obj/item/clothing/shoes/clockwork/ratvar_act() if(GLOB.ratvar_awakens) - flags_1 |= NOSLIP_1 + clothing_flags |= NOSLIP else - flags_1 &= ~NOSLIP_1 + clothing_flags &= ~NOSLIP /obj/item/clothing/shoes/clockwork/mob_can_equip(mob/M, mob/equipper, slot, disable_warning = 0) if(equipper && !is_servant_of_ratvar(equipper)) diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index 03bb1eeb13..abc5d86bb1 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -331,8 +331,7 @@ item_state = "gas_alt" resistance_flags = NONE armor = list("melee" = 5, "bullet" = 5, "laser" = 5, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50) - - flags_1 = BLOCK_GAS_SMOKE_EFFECT_1 | MASKINTERNALS_1 + clothing_flags = BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS flags_inv = HIDEEARS|HIDEEYES|HIDEFACE|HIDEFACIALHAIR gas_transfer_coefficient = 0.01 permeability_coefficient = 0.01 @@ -408,7 +407,7 @@ icon_state = "black" item_color = "black" desc = "A pair of black shoes." - flags_1 = NOSLIP_1 + clothing_flags = NOSLIP /obj/item/clothing/shoes/chameleon/noslip/broken/Initialize() . = ..() @@ -637,4 +636,3 @@ /obj/item/device/pda/chameleon/broken/Initialize() . = ..() chameleon_action.emp_randomise(INFINITY) - diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 9c7a86cfc2..45babaa762 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -24,9 +24,11 @@ var/can_flashlight = 0 var/scan_reagents = 0 //Can the wearer see reagents while it's equipped? + var/clothing_flags = NONE + //Var modification - PLEASE be careful with this I know who you are and where you live - var/list/user_vars_to_edit = list() //VARNAME = VARVALUE eg: "name" = "butts" - var/list/user_vars_remembered = list() //Auto built by the above + dropped() + equipped() + var/list/user_vars_to_edit //VARNAME = VARVALUE eg: "name" = "butts" + var/list/user_vars_remembered //Auto built by the above + dropped() + equipped() var/pocket_storage_component_path @@ -72,21 +74,22 @@ ..() if(!istype(user)) return - if(user_vars_remembered && user_vars_remembered.len) + if(LAZYLEN(user_vars_remembered)) for(var/variable in user_vars_remembered) if(variable in user.vars) if(user.vars[variable] == user_vars_to_edit[variable]) //Is it still what we set it to? (if not we best not change it) user.vars[variable] = user_vars_remembered[variable] - user_vars_remembered = list() + user_vars_remembered = initial(user_vars_remembered) // Effectively this sets it to null. /obj/item/clothing/equipped(mob/user, slot) ..() if(slot_flags & slotdefine2slotbit(slot)) //Was equipped to a valid slot for this item? - for(var/variable in user_vars_to_edit) - if(variable in user.vars) - user_vars_remembered[variable] = user.vars[variable] - user.vars[variable] = user_vars_to_edit[variable] + if (LAZYLEN(user_vars_to_edit)) + for(var/variable in user_vars_to_edit) + if(variable in user.vars) + LAZYSET(user_vars_remembered, variable, user.vars[variable]) + user.vars[variable] = user_vars_to_edit[variable] /obj/item/clothing/examine(mob/user) ..() @@ -260,7 +263,7 @@ BLIND // can't see anything /obj/item/clothing/proc/visor_toggling() //handles all the actual toggling of flags up = !up - flags_1 ^= visor_flags + clothing_flags ^= visor_flags flags_inv ^= visor_flags_inv flags_cover ^= initial(flags_cover) icon_state = "[initial(icon_state)][up ? "up" : ""]" @@ -285,4 +288,4 @@ BLIND // can't see anything Shreds.desc = "The sad remains of what used to be [name]." deconstruct(FALSE) else - ..() \ No newline at end of file + ..() diff --git a/code/modules/clothing/head/hardhat.dm b/code/modules/clothing/head/hardhat.dm index db3dda1dd2..ae4d80a0e4 100644 --- a/code/modules/clothing/head/hardhat.dm +++ b/code/modules/clothing/head/hardhat.dm @@ -46,7 +46,7 @@ item_color = "red" dog_fashion = null name = "firefighter helmet" - flags_1 = STOPSPRESSUREDMAGE_1 + clothing_flags = STOPSPRESSUREDAMAGE heat_protection = HEAD max_heat_protection_temperature = FIRE_HELM_MAX_TEMP_PROTECT cold_protection = HEAD @@ -56,7 +56,7 @@ icon_state = "hardhat0_white" item_state = "hardhat0_white" item_color = "white" - flags_1 = STOPSPRESSUREDMAGE_1 + clothing_flags = STOPSPRESSUREDAMAGE heat_protection = HEAD max_heat_protection_temperature = FIRE_HELM_MAX_TEMP_PROTECT cold_protection = HEAD @@ -76,7 +76,7 @@ dog_fashion = null name = "atmospheric technician's firefighting helmet" desc = "A firefighter's helmet, able to keep the user cool in any situation." - flags_1 = STOPSPRESSUREDMAGE_1 | THICKMATERIAL_1 + clothing_flags = STOPSPRESSUREDAMAGE | THICKMATERIAL | BLOCK_GAS_SMOKE_EFFECT flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR heat_protection = HEAD max_heat_protection_temperature = FIRE_IMMUNITY_HELM_MAX_TEMP_PROTECT diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index b231ac9df6..12a741e0d0 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -122,7 +122,7 @@ min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT heat_protection = HEAD max_heat_protection_temperature = SPACE_HELM_MAX_TEMP_PROTECT - flags_1 = STOPSPRESSUREDMAGE_1 + clothing_flags = STOPSPRESSUREDAMAGE strip_delay = 80 dog_fashion = null diff --git a/code/modules/clothing/masks/_masks.dm b/code/modules/clothing/masks/_masks.dm index 562375e897..b99d5e66ed 100644 --- a/code/modules/clothing/masks/_masks.dm +++ b/code/modules/clothing/masks/_masks.dm @@ -33,7 +33,7 @@ src.icon_state = initial(icon_state) gas_transfer_coefficient = initial(gas_transfer_coefficient) permeability_coefficient = initial(permeability_coefficient) - flags_1 |= visor_flags + clothing_flags |= visor_flags flags_inv |= visor_flags_inv flags_cover |= visor_flags_cover to_chat(user, "You push \the [src] back into place.") @@ -43,11 +43,11 @@ to_chat(user, "You push \the [src] out of the way.") gas_transfer_coefficient = null permeability_coefficient = null - flags_1 &= ~visor_flags + clothing_flags &= ~visor_flags flags_inv &= ~visor_flags_inv flags_cover &= ~visor_flags_cover if(adjusted_flags) slot_flags = adjusted_flags if(user) user.wear_mask_update(src, toggle_off = mask_adjusted) - user.update_action_buttons_icon() //when mask is adjusted out, we update all buttons icon so the user's potential internal tank correctly shows as off. \ No newline at end of file + user.update_action_buttons_icon() //when mask is adjusted out, we update all buttons icon so the user's potential internal tank correctly shows as off. diff --git a/code/modules/clothing/masks/breath.dm b/code/modules/clothing/masks/breath.dm index f7c99a24d3..29aab0c1a2 100644 --- a/code/modules/clothing/masks/breath.dm +++ b/code/modules/clothing/masks/breath.dm @@ -4,8 +4,8 @@ icon_state = "breath" item_state = "m_mask" body_parts_covered = 0 - flags_1 = MASKINTERNALS_1 - visor_flags = MASKINTERNALS_1 + clothing_flags = MASKINTERNALS + visor_flags = MASKINTERNALS w_class = WEIGHT_CLASS_SMALL gas_transfer_coefficient = 0.1 permeability_coefficient = 0.5 diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index 694c290f4b..726670762e 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -2,7 +2,7 @@ name = "gas mask" desc = "A face-covering mask that can be connected to an air supply. While good for concealing your identity, it isn't good for blocking gas flow." //More accurate icon_state = "gas_alt" - flags_1 = BLOCK_GAS_SMOKE_EFFECT_1 | MASKINTERNALS_1 + clothing_flags = BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS flags_inv = HIDEEARS|HIDEEYES|HIDEFACE|HIDEFACIALHAIR w_class = WEIGHT_CLASS_NORMAL item_state = "gas_alt" @@ -51,7 +51,7 @@ /obj/item/clothing/mask/gas/clown_hat name = "clown wig and mask" desc = "A true prankster's facial attire. A clown is incomplete without his wig and mask." - flags_1 = MASKINTERNALS_1 + clothing_flags = MASKINTERNALS icon_state = "clown" item_state = "clown_hat" flags_cover = MASKCOVERSEYES @@ -83,7 +83,7 @@ /obj/item/clothing/mask/gas/sexyclown name = "sexy-clown wig and mask" desc = "A feminine clown mask for the dabbling crossdressers or female entertainers." - flags_1 = MASKINTERNALS_1 + clothing_flags = MASKINTERNALS icon_state = "sexyclown" item_state = "sexyclown" flags_cover = MASKCOVERSEYES @@ -92,7 +92,7 @@ /obj/item/clothing/mask/gas/mime name = "mime mask" desc = "The traditional mime's mask. It has an eerie facial posture." - flags_1 = MASKINTERNALS_1 + clothing_flags = MASKINTERNALS icon_state = "mime" item_state = "mime" flags_cover = MASKCOVERSEYES @@ -124,7 +124,7 @@ /obj/item/clothing/mask/gas/monkeymask name = "monkey mask" desc = "A mask used when acting as a monkey." - flags_1 = MASKINTERNALS_1 + clothing_flags = MASKINTERNALS icon_state = "monkeymask" item_state = "monkeymask" flags_cover = MASKCOVERSEYES @@ -133,7 +133,7 @@ /obj/item/clothing/mask/gas/sexymime name = "sexy mime mask" desc = "A traditional female mime's mask." - flags_1 = MASKINTERNALS_1 + clothing_flags = MASKINTERNALS icon_state = "sexymime" item_state = "sexymime" flags_cover = MASKCOVERSEYES @@ -154,7 +154,7 @@ name = "owl mask" desc = "Twoooo!" icon_state = "owl" - flags_1 = MASKINTERNALS_1 + clothing_flags = MASKINTERNALS flags_cover = MASKCOVERSEYES resistance_flags = FLAMMABLE diff --git a/code/modules/clothing/masks/hailer.dm b/code/modules/clothing/masks/hailer.dm index 51caf8335e..0d78e11874 100644 --- a/code/modules/clothing/masks/hailer.dm +++ b/code/modules/clothing/masks/hailer.dm @@ -7,10 +7,10 @@ actions_types = list(/datum/action/item_action/halt, /datum/action/item_action/adjust) icon_state = "sechailer" item_state = "sechailer" - flags_1 = BLOCK_GAS_SMOKE_EFFECT_1 | MASKINTERNALS_1 + clothing_flags = BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS flags_inv = HIDEFACIALHAIR|HIDEFACE w_class = WEIGHT_CLASS_SMALL - visor_flags = BLOCK_GAS_SMOKE_EFFECT_1 | MASKINTERNALS_1 + visor_flags = BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS visor_flags_inv = HIDEFACE flags_cover = MASKCOVERSMOUTH visor_flags_cover = MASKCOVERSMOUTH diff --git a/code/modules/clothing/shoes/bananashoes.dm b/code/modules/clothing/shoes/bananashoes.dm index 7ffd9c1f40..46f84c2a91 100644 --- a/code/modules/clothing/shoes/bananashoes.dm +++ b/code/modules/clothing/shoes/bananashoes.dm @@ -13,7 +13,7 @@ AddComponent(/datum/component/material_container, list(MAT_BANANIUM), 200000, TRUE) AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'=1), 75) if(always_noslip) - flags_1 |= NOSLIP_1 + clothing_flags |= NOSLIP /obj/item/clothing/shoes/clown_shoes/banana_shoes/step_action() . = ..() @@ -22,7 +22,7 @@ if(bananium.amount(MAT_BANANIUM) < 100) on = !on if(!always_noslip) - flags_1 &= ~NOSLIP_1 + clothing_flags &= ~NOSLIP update_icon() to_chat(loc, "You ran out of bananium!") else @@ -49,9 +49,9 @@ to_chat(user, "You [on ? "activate" : "deactivate"] the prototype shoes.") if(!always_noslip) if(on) - flags_1 |= NOSLIP_1 + clothing_flags |= NOSLIP else - flags_1 &= ~NOSLIP_1 + clothing_flags &= ~NOSLIP else to_chat(user, "You need bananium to turn the prototype shoes on!") diff --git a/code/modules/clothing/shoes/magboots.dm b/code/modules/clothing/shoes/magboots.dm index e669ce3826..0f5b381326 100644 --- a/code/modules/clothing/shoes/magboots.dm +++ b/code/modules/clothing/shoes/magboots.dm @@ -21,12 +21,12 @@ /obj/item/clothing/shoes/magboots/attack_self(mob/user) - if(src.magpulse) - src.flags_1 &= ~NOSLIP_1 - src.slowdown = SHOES_SLOWDOWN + if(magpulse) + clothing_flags &= ~NOSLIP + slowdown = SHOES_SLOWDOWN else - src.flags_1 |= NOSLIP_1 - src.slowdown = slowdown_active + clothing_flags |= NOSLIP + slowdown = slowdown_active magpulse = !magpulse icon_state = "[magboot_state][magpulse]" to_chat(user, "You [magpulse ? "enable" : "disable"] the mag-pulse traction system.") @@ -37,7 +37,7 @@ A.UpdateButtonIcon() /obj/item/clothing/shoes/magboots/negates_gravity() - return flags_1 & NOSLIP_1 + return clothing_flags & NOSLIP /obj/item/clothing/shoes/magboots/examine(mob/user) ..() diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm index 3dad0d464e..8d549512dd 100644 --- a/code/modules/clothing/shoes/miscellaneous.dm +++ b/code/modules/clothing/shoes/miscellaneous.dm @@ -23,7 +23,7 @@ name = "\improper SWAT boots" desc = "High speed, no drag combat boots." permeability_coefficient = 0.01 - flags_1 = NOSLIP_1 + clothing_flags = NOSLIP armor = list("melee" = 40, "bullet" = 30, "laser" = 25, "energy" = 25, "bomb" = 50, "bio" = 30, "rad" = 30, "fire" = 90, "acid" = 50) /obj/item/clothing/shoes/sandal @@ -50,7 +50,7 @@ name = "galoshes" icon_state = "galoshes" permeability_coefficient = 0.01 - flags_1 = NOSLIP_1 + clothing_flags = NOSLIP slowdown = SHOES_SLOWDOWN+1 strip_delay = 50 equip_delay_other = 50 @@ -311,4 +311,4 @@ else set_light(0) lightCycle = 0 - active = FALSE \ No newline at end of file + active = FALSE diff --git a/code/modules/clothing/spacesuits/_spacesuits.dm b/code/modules/clothing/spacesuits/_spacesuits.dm index a2cd5bce75..69109de2f7 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." - flags_1 = STOPSPRESSUREDMAGE_1 | THICKMATERIAL_1 + clothing_flags = STOPSPRESSUREDAMAGE | THICKMATERIAL 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) @@ -30,7 +30,7 @@ w_class = WEIGHT_CLASS_BULKY gas_transfer_coefficient = 0.01 permeability_coefficient = 0.02 - flags_1 = STOPSPRESSUREDMAGE_1 | THICKMATERIAL_1 + clothing_flags = STOPSPRESSUREDAMAGE | THICKMATERIAL body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS allowed = list(/obj/item/device/flashlight, /obj/item/tank/internals) slowdown = 1 @@ -42,4 +42,4 @@ max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT strip_delay = 80 equip_delay_other = 80 - resistance_flags = NONE \ No newline at end of file + resistance_flags = NONE diff --git a/code/modules/clothing/spacesuits/flightsuit.dm b/code/modules/clothing/spacesuits/flightsuit.dm index 3a5198080f..6f12d99752 100644 --- a/code/modules/clothing/spacesuits/flightsuit.dm +++ b/code/modules/clothing/spacesuits/flightsuit.dm @@ -723,9 +723,9 @@ if(suit) active = toggle if(active) - src.flags_1 |= NOSLIP_1 + clothing_flags |= NOSLIP if(!active) - src.flags_1 &= ~NOSLIP_1 + clothing_flags &= ~NOSLIP /obj/item/clothing/shoes/flightshoes/item_action_slot_check(slot) return slot == slot_shoes diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index 41b2334f94..b39c736aa1 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -263,7 +263,7 @@ var/obj/item/clothing/suit/space/hardsuit/syndi/linkedsuit = null actions_types = list(/datum/action/item_action/toggle_helmet_mode) visor_flags_inv = HIDEMASK|HIDEEYES|HIDEFACE|HIDEFACIALHAIR - visor_flags = STOPSPRESSUREDMAGE_1 + visor_flags = STOPSPRESSUREDAMAGE /obj/item/clothing/head/helmet/space/hardsuit/syndi/update_icon() icon_state = "hardsuit[on]-[item_color]" @@ -283,7 +283,7 @@ name = initial(name) desc = initial(desc) set_light(brightness_on) - flags_1 |= visor_flags + clothing_flags |= visor_flags flags_cover |= HEADCOVERSEYES | HEADCOVERSMOUTH flags_inv |= visor_flags_inv cold_protection |= HEAD @@ -292,7 +292,7 @@ name += " (combat)" desc = alt_desc set_light(0) - flags_1 &= ~visor_flags + clothing_flags &= ~visor_flags flags_cover &= ~(HEADCOVERSEYES | HEADCOVERSMOUTH) flags_inv &= ~visor_flags_inv cold_protection &= ~HEAD @@ -313,13 +313,13 @@ linkedsuit.name = initial(linkedsuit.name) linkedsuit.desc = initial(linkedsuit.desc) linkedsuit.slowdown = 1 - linkedsuit.flags_1 |= STOPSPRESSUREDMAGE_1 + linkedsuit.clothing_flags |= STOPSPRESSUREDAMAGE linkedsuit.cold_protection |= CHEST | GROIN | LEGS | FEET | ARMS | HANDS else linkedsuit.name += " (combat)" linkedsuit.desc = linkedsuit.alt_desc linkedsuit.slowdown = 0 - linkedsuit.flags_1 &= ~(STOPSPRESSUREDMAGE_1) + linkedsuit.clothing_flags &= ~STOPSPRESSUREDAMAGE linkedsuit.cold_protection &= ~(CHEST | GROIN | LEGS | FEET | ARMS | HANDS) linkedsuit.icon_state = "hardsuit[on]-[item_color]" @@ -704,7 +704,7 @@ icon_state = "ert_medical" item_state = "ert_medical" item_color = "ert_medical" - flags_1 = STOPSPRESSUREDMAGE_1 | THICKMATERIAL_1 | NODROP_1 //Dont want people changing into the other teams gear + flags_1 = NODROP_1 //Dont want people changing into the other teams gear helmettype = /obj/item/clothing/head/helmet/space/hardsuit/shielded/ctf armor = list("melee" = 0, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 95, "acid" = 95) slowdown = 0 diff --git a/code/modules/clothing/spacesuits/miscellaneous.dm b/code/modules/clothing/spacesuits/miscellaneous.dm index 738d298f72..b80015ecf0 100644 --- a/code/modules/clothing/spacesuits/miscellaneous.dm +++ b/code/modules/clothing/spacesuits/miscellaneous.dm @@ -59,7 +59,6 @@ Contains: icon_state = "beret_badge" dynamic_hair_suffix = "+generic" dynamic_fhair_suffix = "+generic" - flags_1 = STOPSPRESSUREDMAGE_1 flags_inv = 0 armor = list("melee" = 80, "bullet" = 80, "laser" = 50, "energy" = 50, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100) strip_delay = 130 @@ -114,7 +113,6 @@ Contains: name = "Santa's hat" desc = "Ho ho ho. Merrry X-mas!" icon_state = "santahat" - flags_1 = STOPSPRESSUREDMAGE_1 flags_cover = HEADCOVERSEYES dog_fashion = /datum/dog_fashion/head/santa @@ -125,7 +123,6 @@ Contains: icon_state = "santa" item_state = "santa" slowdown = 0 - flags_1 = STOPSPRESSUREDMAGE_1 allowed = list(/obj/item) //for stuffing exta special presents @@ -136,7 +133,6 @@ Contains: icon_state = "pirate" item_state = "pirate" armor = list("melee" = 30, "bullet" = 50, "laser" = 30,"energy" = 15, "bomb" = 30, "bio" = 30, "rad" = 30, "fire" = 60, "acid" = 75) - flags_1 = STOPSPRESSUREDMAGE_1 flags_inv = HIDEHAIR strip_delay = 40 equip_delay_other = 20 @@ -169,7 +165,7 @@ Contains: item_color = "ert_commander" armor = list("melee" = 65, "bullet" = 50, "laser" = 50, "energy" = 50, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 80) strip_delay = 130 - flags_1 = STOPSPRESSUREDMAGE_1 | THICKMATERIAL_1 | NODROP_1 + flags_1 = NODROP_1 brightness_on = 7 /obj/item/clothing/suit/space/hardsuit/ert @@ -269,7 +265,7 @@ Contains: armor = list("melee" = -20, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 75, "fire" = 60, "acid" = 75) //As whimpy as a space carp brightness_on = 0 //luminosity when on actions_types = list() - flags_1 = STOPSPRESSUREDMAGE_1 | THICKMATERIAL_1 | NODROP_1 + flags_1 = NODROP_1 /obj/item/clothing/suit/space/hardsuit/carp @@ -351,11 +347,9 @@ Contains: /obj/item/clothing/suit/space/fragile/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK) if(!torn && prob(50)) to_chat(owner, "[src] tears from the damage, breaking the air-tight seal!") - src.flags_1 &= ~STOPSPRESSUREDMAGE_1 - src.name = "torn [src]." - src.desc = "A bulky suit meant to protect the user during emergency situations, at least until someone tore a hole in the suit." - src.torn = TRUE + clothing_flags &= ~STOPSPRESSUREDAMAGE + name = "torn [src]." + desc = "A bulky suit meant to protect the user during emergency situations, at least until someone tore a hole in the suit." + torn = TRUE playsound(loc, 'sound/weapons/slashmiss.ogg', 50, 1) playsound(loc, 'sound/effects/refill.ogg', 50, 1) - - diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index 37d48b484e..0f261ccdd9 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -355,7 +355,7 @@ w_class = WEIGHT_CLASS_BULKY body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS allowed = list(/obj/item/gun/energy, /obj/item/melee/baton, /obj/item/restraints/handcuffs, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman) - flags_1 = THICKMATERIAL_1 + clothing_flags = THICKMATERIAL flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT cold_protection = CHEST | GROIN | LEGS | FEET | ARMS | HANDS min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT @@ -370,7 +370,7 @@ item_state = "swat_suit" w_class = WEIGHT_CLASS_BULKY gas_transfer_coefficient = 0.9 - flags_1 = THICKMATERIAL_1 + clothing_flags = THICKMATERIAL body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS slowdown = 3 flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT @@ -379,7 +379,7 @@ /obj/item/clothing/suit/armor/tdome body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT - flags_1 = THICKMATERIAL_1 + clothing_flags = THICKMATERIAL cold_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS armor = list("melee" = 80, "bullet" = 80, "laser" = 50, "energy" = 50, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 90) diff --git a/code/modules/clothing/suits/bio.dm b/code/modules/clothing/suits/bio.dm index bb6a6ca070..f21efbdef7 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 comtaminants." permeability_coefficient = 0.01 - flags_1 = THICKMATERIAL_1 + clothing_flags = THICKMATERIAL | BLOCK_GAS_SMOKE_EFFECT armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 80, "fire" = 30, "acid" = 100) flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEHAIR|HIDEFACIALHAIR|HIDEFACE resistance_flags = ACID_PROOF @@ -18,7 +18,7 @@ w_class = WEIGHT_CLASS_BULKY gas_transfer_coefficient = 0.01 permeability_coefficient = 0.01 - flags_1 = THICKMATERIAL_1 + clothing_flags = THICKMATERIAL body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS slowdown = 1 allowed = list(/obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/pen, /obj/item/device/flashlight/pen, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/hypospray) diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index 90ae827957..deb48e5667 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -279,7 +279,7 @@ icon_state = "bee" item_state = "labcoat" body_parts_covered = CHEST|GROIN|ARMS - flags_1 = THICKMATERIAL_1 + clothing_flags = THICKMATERIAL hoodtype = /obj/item/clothing/head/hooded/bee_hood /obj/item/clothing/head/hooded/bee_hood @@ -287,7 +287,7 @@ desc = "A hood attached to a bee costume." icon_state = "bee" body_parts_covered = HEAD - flags_1 = THICKMATERIAL_1 + clothing_flags = THICKMATERIAL flags_inv = HIDEHAIR|HIDEEARS dynamic_hair_suffix = "" diff --git a/code/modules/clothing/suits/utility.dm b/code/modules/clothing/suits/utility.dm index 9fce4145b7..29c811246b 100644 --- a/code/modules/clothing/suits/utility.dm +++ b/code/modules/clothing/suits/utility.dm @@ -21,7 +21,7 @@ allowed = list(/obj/item/device/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/extinguisher, /obj/item/crowbar) slowdown = 1 flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT - flags_1 = STOPSPRESSUREDMAGE_1 | THICKMATERIAL_1 + clothing_flags = STOPSPRESSUREDAMAGE | THICKMATERIAL heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT cold_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS @@ -56,7 +56,7 @@ name = "bomb hood" desc = "Use in case of bomb." icon_state = "bombsuit" - flags_1 = THICKMATERIAL_1 + 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 dynamic_hair_suffix = "" @@ -79,7 +79,7 @@ w_class = WEIGHT_CLASS_BULKY gas_transfer_coefficient = 0.01 permeability_coefficient = 0.01 - flags_1 = THICKMATERIAL_1 + clothing_flags = THICKMATERIAL body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS slowdown = 2 armor = list("melee" = 20, "bullet" = 0, "laser" = 20,"energy" = 10, "bomb" = 100, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 50) @@ -119,7 +119,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.'" - flags_1 = THICKMATERIAL_1 + clothing_flags = THICKMATERIAL flags_inv = HIDEMASK|HIDEEARS|HIDEFACE|HIDEEYES|HIDEHAIR|HIDEFACIALHAIR armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 60, "rad" = 100, "fire" = 30, "acid" = 30) strip_delay = 60 @@ -139,7 +139,7 @@ w_class = WEIGHT_CLASS_BULKY gas_transfer_coefficient = 0.9 permeability_coefficient = 0.5 - flags_1 = THICKMATERIAL_1 + clothing_flags = THICKMATERIAL body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS allowed = list(/obj/item/device/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/device/geiger_counter) slowdown = 1.5 @@ -153,4 +153,4 @@ . = ..() AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION, TRUE, FALSE) // Just don't want things to be irradiated inside this - // Except things on the mob aren't even inside the suit so ehhhhhh \ No newline at end of file + // Except things on the mob aren't even inside the suit so ehhhhhh diff --git a/code/modules/hydroponics/beekeeping/beebox.dm b/code/modules/hydroponics/beekeeping/beebox.dm index 7075b8502e..5a35597a34 100644 --- a/code/modules/hydroponics/beekeeping/beebox.dm +++ b/code/modules/hydroponics/beekeeping/beebox.dm @@ -18,8 +18,11 @@ /mob/living/carbon/human/bee_friendly() if(dna && dna.species && dna.species.id == "pod") //bees pollinate plants, duh. return 1 - if((wear_suit && (wear_suit.flags_1 & THICKMATERIAL_1)) && (head && (head.flags_1 & THICKMATERIAL_1))) - return 1 + if (wear_suit && head && is_type_in_typecache(wear_suit, GLOB.typecache_clothing) && is_type_in_typecache(wear_suit, GLOB.typecache_clothing)) + var/obj/item/clothing/CS = wear_suit + var/obj/item/clothing/CH = head + if (CS.clothing_flags & CH.clothing_flags & THICKMATERIAL) + return 1 return 0 diff --git a/code/modules/hydroponics/beekeeping/beekeeper_suit.dm b/code/modules/hydroponics/beekeeping/beekeeper_suit.dm index b871951b0f..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" - flags_1 = THICKMATERIAL_1 + clothing_flags = THICKMATERIAL /obj/item/clothing/suit/beekeeper_suit @@ -12,5 +12,4 @@ desc = "Keeps the lil buzzing buggers away from your squishy bits." icon_state = "beekeeper" item_state = "beekeeper" - flags_1 = THICKMATERIAL_1 - + clothing_flags = THICKMATERIAL diff --git a/code/modules/mining/equipment/explorer_gear.dm b/code/modules/mining/equipment/explorer_gear.dm index fc26fac0bc..84d2d964bf 100644 --- a/code/modules/mining/equipment/explorer_gear.dm +++ b/code/modules/mining/equipment/explorer_gear.dm @@ -29,7 +29,7 @@ name = "explorer gas mask" desc = "A military-grade gas mask that can be connected to an air supply." icon_state = "gas_mining" - visor_flags = BLOCK_GAS_SMOKE_EFFECT_1 | MASKINTERNALS_1 + visor_flags = BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS visor_flags_inv = HIDEFACIALHAIR visor_flags_cover = MASKCOVERSMOUTH actions_types = list(/datum/action/item_action/adjust) @@ -52,7 +52,7 @@ desc = "Hostile Environment Cross-Kinetic Suit: A suit designed to withstand the wide variety of hazards from Lavaland. It wasn't enough for its last owner." icon_state = "hostile_env" item_state = "hostile_env" - flags_1 = THICKMATERIAL_1 //not spaceproof + clothing_flags = THICKMATERIAL //not spaceproof max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT resistance_flags = FIRE_PROOF | LAVA_PROOF slowdown = 0 @@ -84,7 +84,7 @@ item_state = "hostile_env" w_class = WEIGHT_CLASS_NORMAL max_heat_protection_temperature = FIRE_IMMUNITY_HELM_MAX_TEMP_PROTECT - flags_1 = THICKMATERIAL_1 // no space protection + clothing_flags = THICKMATERIAL // no space protection armor = list("melee" = 70, "bullet" = 40, "laser" = 10, "energy" = 10, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100) resistance_flags = FIRE_PROOF | LAVA_PROOF @@ -106,4 +106,3 @@ var/mutable_appearance/M = mutable_appearance('icons/mob/head.dmi', "hostile_env_glass") M.appearance_flags = RESET_COLOR . += M - diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm index a5368fc7c0..c54b20156f 100644 --- a/code/modules/mob/living/carbon/alien/special/facehugger.dm +++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm @@ -15,7 +15,7 @@ icon_state = "facehugger" item_state = "facehugger" w_class = WEIGHT_CLASS_TINY //note: can be picked up by aliens unlike most other items of w_class below 4 - flags_1 = MASKINTERNALS_1 + clothing_flags = MASKINTERNALS throw_range = 5 tint = 3 flags_cover = MASKCOVERSEYES | MASKCOVERSMOUTH diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index ebf66a675e..b904ff9437 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -234,7 +234,7 @@ if(href_list["internal"]) var/slot = text2num(href_list["internal"]) var/obj/item/ITEM = get_item_by_slot(slot) - if(ITEM && istype(ITEM, /obj/item/tank) && wear_mask && (wear_mask.flags_1 & MASKINTERNALS_1)) + if(ITEM && istype(ITEM, /obj/item/tank) && wear_mask && (wear_mask.clothing_flags & MASKINTERNALS)) visible_message("[usr] tries to [internal ? "close" : "open"] the valve on [src]'s [ITEM.name].", \ "[usr] tries to [internal ? "close" : "open"] the valve on [src]'s [ITEM.name].") if(do_mob(usr, src, POCKET_STRIP_DELAY)) @@ -242,7 +242,7 @@ internal = null update_internals_hud_icon(0) else if(ITEM && istype(ITEM, /obj/item/tank)) - if((wear_mask && (wear_mask.flags_1 & MASKINTERNALS_1)) || getorganslot(ORGAN_SLOT_BREATHING_TUBE)) + if((wear_mask && (wear_mask.clothing_flags & MASKINTERNALS)) || getorganslot(ORGAN_SLOT_BREATHING_TUBE)) internal = ITEM update_internals_hud_icon(1) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 6c63c32904..fbd4aeac08 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -495,12 +495,17 @@ . = 0 // If targeting the head, see if the head item is thin enough. // If targeting anything else, see if the wear suit is thin enough. - if(above_neck(target_zone)) - if(head && head.flags_1 & THICKMATERIAL_1 && !penetrate_thick) - . = 0 - else - if(wear_suit && wear_suit.flags_1 & THICKMATERIAL_1 && !penetrate_thick) - . = 0 + if (!penetrate_thick) + if(above_neck(target_zone)) + if(head && is_type_in_typecache(head, GLOB.typecache_clothing)) + var/obj/item/clothing/CH = head + if (CH.clothing_flags & THICKMATERIAL) + . = 0 + else + if(wear_suit && is_type_in_typecache(wear_suit, GLOB.typecache_clothing)) + var/obj/item/clothing/CS = wear_suit + if (CS.clothing_flags & THICKMATERIAL) + . = 0 if(!. && error_msg && user) // Might need re-wording. to_chat(user, "There is no exposed flesh or thin material [above_neck(target_zone) ? "on [p_their()] head" : "on [p_their()] body"].") diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index e40327c07e..f62f6d22c7 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -8,14 +8,21 @@ /mob/living/carbon/human/slip(knockdown_amount, obj/O, lube) if(has_trait(TRAIT_NOSLIPALL)) return 0 - if((isobj(shoes) && (shoes.flags_1&NOSLIP_1)) || has_trait(TRAIT_NOSLIPWATER) && !(lube&GALOSHES_DONT_HELP)) - return 0 + if (!(lube&GALOSHES_DONT_HELP)) + if(has_trait(TRAIT_NOSLIPWATER)) + return 0 + if(shoes && is_type_in_typecache(shoes, GLOB.typecache_clothing)) + var/obj/item/clothing/CS = shoes + if (CS.clothing_flags & NOSLIP) + return 0 return ..() /mob/living/carbon/human/experience_pressure_difference() playsound(src, 'sound/effects/space_wind.ogg', 50, 1) - if(shoes && shoes.flags_1&NOSLIP_1) - return 0 + if(shoes && is_type_in_typecache(shoes, GLOB.typecache_clothing)) + var/obj/item/clothing/S = shoes + if (S.clothing_flags & NOSLIP) + return 0 return ..() /mob/living/carbon/human/mob_has_gravity() diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index b4f93a12d0..8843e2346e 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -44,6 +44,7 @@ /mob/living/carbon/human/calculate_affecting_pressure(pressure) +<<<<<<< HEAD if((wear_suit && (wear_suit.flags_1 & STOPSPRESSUREDMAGE_1)) && (head && (head.flags_1 & STOPSPRESSUREDMAGE_1))) return ONE_ATMOSPHERE if(istype(loc, /obj/belly)) @@ -52,6 +53,14 @@ return ONE_ATMOSPHERE else return pressure +======= + if (wear_suit && head && is_type_in_typecache(wear_suit, GLOB.typecache_clothing) && is_type_in_typecache(wear_suit, GLOB.typecache_clothing)) + var/obj/item/clothing/CS = wear_suit + var/obj/item/clothing/CH = head + if (CS.clothing_flags & CH.clothing_flags & STOPSPRESSUREDAMAGE) + return ONE_ATMOSPHERE + return pressure +>>>>>>> 98f8ca7... Moves several clothing-specific flags from /atom to their proper type (#37486) /mob/living/carbon/human/handle_traits() @@ -290,13 +299,14 @@ /mob/living/carbon/human/has_smoke_protection() if(wear_mask) - if(wear_mask.flags_1 & BLOCK_GAS_SMOKE_EFFECT_1) + if(wear_mask.clothing_flags & BLOCK_GAS_SMOKE_EFFECT) return TRUE if(glasses) - if(glasses.flags_1 & BLOCK_GAS_SMOKE_EFFECT_1) + if(glasses.clothing_flags & BLOCK_GAS_SMOKE_EFFECT) return TRUE - if(head) - if(head.flags_1 & BLOCK_GAS_SMOKE_EFFECT_1) + if(head && is_type_in_typecache(head, GLOB.typecache_clothing)) + var/obj/item/clothing/CH = head + if(CH.clothing_flags & BLOCK_GAS_SMOKE_EFFECT) return TRUE return ..() diff --git a/code/modules/mob/living/carbon/human/species_types/plasmamen.dm b/code/modules/mob/living/carbon/human/species_types/plasmamen.dm index d1f41a4aca..67d2b0e5ba 100644 --- a/code/modules/mob/living/carbon/human/species_types/plasmamen.dm +++ b/code/modules/mob/living/carbon/human/species_types/plasmamen.dm @@ -24,7 +24,12 @@ /datum/species/plasmaman/spec_life(mob/living/carbon/human/H) var/datum/gas_mixture/environment = H.loc.return_air() - var/atmos_sealed = (H.wear_suit && (H.wear_suit.flags_1 & STOPSPRESSUREDMAGE_1)) && (H.head && (H.head.flags_1 & STOPSPRESSUREDMAGE_1)) + var/atmos_sealed = FALSE + if (H.wear_suit && H.head && is_type_in_typecache(H.wear_suit, GLOB.typecache_clothing) && is_type_in_typecache(H.head, GLOB.typecache_clothing)) + var/obj/item/clothing/CS = H.wear_suit + var/obj/item/clothing/CH = H.head + if (CS.clothing_flags & CH.clothing_flags & STOPSPRESSUREDAMAGE) + atmos_sealed = TRUE if((!istype(H.w_uniform, /obj/item/clothing/under/plasmaman) || !istype(H.head, /obj/item/clothing/head/helmet/space/plasmaman)) && !atmos_sealed) if(environment) if(environment.total_moles()) diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 7ba1565bd7..54d5c4ab57 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -237,7 +237,7 @@ if(internal.loc != src) internal = null update_internals_hud_icon(0) - else if ((!wear_mask || !(wear_mask.flags_1 & MASKINTERNALS_1)) && !getorganslot(ORGAN_SLOT_BREATHING_TUBE)) + else if ((!wear_mask || !(wear_mask.clothing_flags & MASKINTERNALS)) && !getorganslot(ORGAN_SLOT_BREATHING_TUBE)) internal = null update_internals_hud_icon(0) else diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm index 6513985704..be2c6364b7 100644 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ b/code/modules/mob/living/carbon/monkey/life.dm @@ -18,8 +18,13 @@ if(..()) if(!client) +<<<<<<< HEAD if(stat == CONSCIOUS) if(on_fire || buckled || restrained() || (resting && canmove)) +======= + if(stat == CONSCIOUS) + if(on_fire || buckled || restrained()) +>>>>>>> 98f8ca7... Moves several clothing-specific flags from /atom to their proper type (#37486) if(!resisting && prob(MONKEY_RESIST_PROB)) resisting = TRUE walk_to(src,0) @@ -146,7 +151,7 @@ /mob/living/carbon/monkey/has_smoke_protection() if(wear_mask) - if(wear_mask.flags_1 & BLOCK_GAS_SMOKE_EFFECT_1) + if(wear_mask.clothing_flags & BLOCK_GAS_SMOKE_EFFECT) return 1 /mob/living/carbon/monkey/handle_fire() diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm index 4cf1f6b13f..f7fa5071e2 100644 --- a/code/modules/mob/living/simple_animal/bot/medbot.dm +++ b/code/modules/mob/living/simple_animal/bot/medbot.dm @@ -357,8 +357,11 @@ if(ishuman(C)) var/mob/living/carbon/human/H = C - if((H.head && (H.head.flags_1 & THICKMATERIAL_1)) && (H.wear_suit && (H.wear_suit.flags_1 & THICKMATERIAL_1))) - return FALSE // Skip over them if they have no exposed flesh. + if (H.wear_suit && H.head && is_type_in_typecache(H.wear_suit, GLOB.typecache_clothing) && is_type_in_typecache(H.wear_suit, GLOB.typecache_clothing)) + var/obj/item/clothing/CS = H.wear_suit + var/obj/item/clothing/CH = H.head + if (CS.clothing_flags & CH.clothing_flags & THICKMATERIAL) + return FALSE // Skip over them if they have no exposed flesh. if(declare_crit && C.health <= 0) //Critical condition! Call for help! declare(C) diff --git a/code/modules/ninja/suit/shoes.dm b/code/modules/ninja/suit/shoes.dm index df8caf0291..1b935a00de 100644 --- a/code/modules/ninja/suit/shoes.dm +++ b/code/modules/ninja/suit/shoes.dm @@ -5,11 +5,11 @@ icon_state = "s-ninja" item_state = "secshoes" permeability_coefficient = 0.01 - flags_1 = NOSLIP_1 + clothing_flags = NOSLIP resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF armor = list("melee" = 60, "bullet" = 50, "laser" = 30,"energy" = 15, "bomb" = 30, "bio" = 30, "rad" = 30, "fire" = 100, "acid" = 100) strip_delay = 120 cold_protection = FEET min_cold_protection_temperature = SHOES_MIN_TEMP_PROTECT heat_protection = FEET - max_heat_protection_temperature = SHOES_MAX_TEMP_PROTECT \ No newline at end of file + max_heat_protection_temperature = SHOES_MAX_TEMP_PROTECT diff --git a/code/modules/research/xenobiology/crossbreeding/charged.dm b/code/modules/research/xenobiology/crossbreeding/charged.dm index bc2bbe4c57..daa90d641f 100644 --- a/code/modules/research/xenobiology/crossbreeding/charged.dm +++ b/code/modules/research/xenobiology/crossbreeding/charged.dm @@ -329,7 +329,11 @@ Charged extracts: if(!istype(C)) to_chat(user, "The potion can only be used on clothing!") return +<<<<<<< HEAD if(C.min_cold_protection_temperature == SPACE_SUIT_MIN_TEMP_PROTECT && STOPSPRESSUREDMAGE_1 in C.flags_1) +======= + if(C.min_cold_protection_temperature == SPACE_SUIT_MIN_TEMP_PROTECT && C.clothing_flags & STOPSPRESSUREDAMAGE) +>>>>>>> 98f8ca7... Moves several clothing-specific flags from /atom to their proper type (#37486) to_chat(user, "The [C] is already pressure-resistant!") return ..() to_chat(user, "You slather the blue gunk over the [C], making it airtight.") @@ -338,7 +342,7 @@ Charged extracts: C.add_atom_colour("#000080", FIXED_COLOUR_PRIORITY) C.min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT C.cold_protection = C.body_parts_covered - C.flags_1 |= STOPSPRESSUREDMAGE_1 + C.clothing_flags |= STOPSPRESSUREDAMAGE uses-- if(!uses) qdel(src) @@ -371,7 +375,9 @@ Charged extracts: C.remove_atom_colour(WASHABLE_COLOUR_PRIORITY) C.add_atom_colour("#800000", FIXED_COLOUR_PRIORITY) C.resistance_flags |= LAVA_PROOF - C.flags_2 |= LAVA_PROTECT_2 + if (istype(C, /obj/item/clothing)) + var/obj/item/clothing/CL = C + CL.clothing_flags |= LAVAPROTECT uses-- if(!uses) qdel(src) From b3b84b3dda04a533d3a002913e2dfed7007c03e2 Mon Sep 17 00:00:00 2001 From: deathride58 Date: Sun, 29 Apr 2018 18:36:49 -0400 Subject: [PATCH 05/63] Update flags.dm --- code/__DEFINES/flags.dm | 5 ----- 1 file changed, 5 deletions(-) diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index 2d2b2704c0..08c6a5690a 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -11,11 +11,6 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 #define DF_VAR_EDITED (1<<1) //FLAGS BITMASK -<<<<<<< HEAD -#define STOPSPRESSUREDMAGE_1 (1<<0) //This flag is used on the flags_1 variable for SUIT and HEAD items which stop pressure damage. Note that the flag 1 was previous used as ONBACK, so it is possible for some code to use (flags & 1) when checking if something can be put on your back. Replace this code with (inv_flags & SLOT_BACK) if you see it anywhere -//To successfully stop you taking all pressure damage you must have both a suit and head item with this flag. -======= ->>>>>>> 98f8ca7... Moves several clothing-specific flags from /atom to their proper type (#37486) #define NODROP_1 (1<<1) // This flag makes it so that an item literally cannot be removed at all, or at least that's how it should be. Only deleted. #define NOBLUDGEON_1 (1<<2) // when an item has this it produces no "X has been hit by Y with Z" message in the default attackby() From 2890cfb978b43582ab85d20efca19da26cb0af4d Mon Sep 17 00:00:00 2001 From: deathride58 Date: Sun, 29 Apr 2018 18:37:51 -0400 Subject: [PATCH 06/63] Update mutations.dm --- code/modules/antagonists/changeling/powers/mutations.dm | 5 ----- 1 file changed, 5 deletions(-) diff --git a/code/modules/antagonists/changeling/powers/mutations.dm b/code/modules/antagonists/changeling/powers/mutations.dm index 1d08860b93..6b1e4ef2fb 100644 --- a/code/modules/antagonists/changeling/powers/mutations.dm +++ b/code/modules/antagonists/changeling/powers/mutations.dm @@ -445,14 +445,9 @@ name = "flesh mass" icon_state = "lingspacesuit" desc = "A huge, bulky mass of pressure and temperature-resistant organic tissue, evolved to facilitate space travel." -<<<<<<< HEAD - flags_1 = STOPSPRESSUREDMAGE_1 | NODROP_1 | DROPDEL_1 //Not THICKMATERIAL_1 because it's organic tissue, so if somebody tries to inject something into it, it still ends up in your blood. (also balance but muh fluff) - allowed = list(/obj/item/device/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/oxygen) -======= flags_1 = NODROP_1 | DROPDEL_1 clothing_flags = STOPSPRESSUREDAMAGE //Not THICKMATERIAL because it's organic tissue, so if somebody tries to inject something into it, it still ends up in your blood. (also balance but muh fluff) allowed = list(/obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/oxygen) ->>>>>>> 98f8ca7... Moves several clothing-specific flags from /atom to their proper type (#37486) armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 90) //No armor at all. /obj/item/clothing/suit/space/changeling/Initialize() From e03e419b9ec156f2e2b2aae1eff9068758c83e1c Mon Sep 17 00:00:00 2001 From: deathride58 Date: Sun, 29 Apr 2018 18:41:01 -0400 Subject: [PATCH 07/63] Update life.dm --- code/modules/mob/living/carbon/human/life.dm | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 8843e2346e..35d0e115e9 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -44,23 +44,16 @@ /mob/living/carbon/human/calculate_affecting_pressure(pressure) -<<<<<<< HEAD - if((wear_suit && (wear_suit.flags_1 & STOPSPRESSUREDMAGE_1)) && (head && (head.flags_1 & STOPSPRESSUREDMAGE_1))) - return ONE_ATMOSPHERE - if(istype(loc, /obj/belly)) + if(istype(loc, /obj/belly)) //START OF CIT CHANGES - Makes it so you don't suffocate while inside vore organs. Remind me to modularize this some time - Bhijn return ONE_ATMOSPHERE if(istype(loc, /obj/item/device/dogborg/sleeper)) - return ONE_ATMOSPHERE - else - return pressure -======= - if (wear_suit && head && is_type_in_typecache(wear_suit, GLOB.typecache_clothing) && is_type_in_typecache(wear_suit, GLOB.typecache_clothing)) + return ONE_ATMOSPHERE //END OF CIT CHANGES + if (wear_suit && head && is_type_in_typecache(wear_suit, GLOB.typecache_clothing) && is_type_in_typecache(head, GLOB.typecache_clothing)) var/obj/item/clothing/CS = wear_suit var/obj/item/clothing/CH = head if (CS.clothing_flags & CH.clothing_flags & STOPSPRESSUREDAMAGE) return ONE_ATMOSPHERE return pressure ->>>>>>> 98f8ca7... Moves several clothing-specific flags from /atom to their proper type (#37486) /mob/living/carbon/human/handle_traits() From 3921590a4b4325866d49960dc3a7bb0af102bfd8 Mon Sep 17 00:00:00 2001 From: deathride58 Date: Sun, 29 Apr 2018 18:42:17 -0400 Subject: [PATCH 08/63] Update life.dm --- code/modules/mob/living/carbon/monkey/life.dm | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm index be2c6364b7..879aa82750 100644 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ b/code/modules/mob/living/carbon/monkey/life.dm @@ -18,13 +18,8 @@ if(..()) if(!client) -<<<<<<< HEAD if(stat == CONSCIOUS) - if(on_fire || buckled || restrained() || (resting && canmove)) -======= - if(stat == CONSCIOUS) - if(on_fire || buckled || restrained()) ->>>>>>> 98f8ca7... Moves several clothing-specific flags from /atom to their proper type (#37486) + if(on_fire || buckled || restrained() || (resting && canmove)) //CIT CHANGE - makes it so monkeys attempt to resist if they're resting if(!resisting && prob(MONKEY_RESIST_PROB)) resisting = TRUE walk_to(src,0) @@ -188,4 +183,4 @@ #undef COLD_DAMAGE_LEVEL_1 #undef COLD_DAMAGE_LEVEL_2 -#undef COLD_DAMAGE_LEVEL_3 \ No newline at end of file +#undef COLD_DAMAGE_LEVEL_3 From f46a77ba5c786c33640ab5e851fe9c0a80bd8bf9 Mon Sep 17 00:00:00 2001 From: deathride58 Date: Sun, 29 Apr 2018 18:43:11 -0400 Subject: [PATCH 09/63] Update charged.dm --- code/modules/research/xenobiology/crossbreeding/charged.dm | 4 ---- 1 file changed, 4 deletions(-) diff --git a/code/modules/research/xenobiology/crossbreeding/charged.dm b/code/modules/research/xenobiology/crossbreeding/charged.dm index daa90d641f..3e71ee1d21 100644 --- a/code/modules/research/xenobiology/crossbreeding/charged.dm +++ b/code/modules/research/xenobiology/crossbreeding/charged.dm @@ -329,11 +329,7 @@ Charged extracts: if(!istype(C)) to_chat(user, "The potion can only be used on clothing!") return -<<<<<<< HEAD - if(C.min_cold_protection_temperature == SPACE_SUIT_MIN_TEMP_PROTECT && STOPSPRESSUREDMAGE_1 in C.flags_1) -======= if(C.min_cold_protection_temperature == SPACE_SUIT_MIN_TEMP_PROTECT && C.clothing_flags & STOPSPRESSUREDAMAGE) ->>>>>>> 98f8ca7... Moves several clothing-specific flags from /atom to their proper type (#37486) to_chat(user, "The [C] is already pressure-resistant!") return ..() to_chat(user, "You slather the blue gunk over the [C], making it airtight.") From c6b888d6b25d7425b5a60f8ede85dfec2cdc9c81 Mon Sep 17 00:00:00 2001 From: deathride58 Date: Sun, 29 Apr 2018 18:46:08 -0400 Subject: [PATCH 10/63] Update panels.css --- html/panels.css | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/html/panels.css b/html/panels.css index 5e2edab67a..1f969c690e 100644 --- a/html/panels.css +++ b/html/panels.css @@ -1,15 +1,3 @@ -<<<<<<< HEAD -body {padding:0px;margin:0px;} -#top {position:fixed;top:5px;left:10%;width:80%;text-align:center;background-color:#fff;border:2px solid #ccc;} -#main {position:relative;top:50px;left:3%;width:96%;text-align:center;z-index:0;} -#searchable {table-layout:fixed;width:100%;text-align:center;"#f4f4f4";} -tr.norm {background-color:#f4f4f4;} -tr.title {background-color:#ccc;} -tr.alt {background-color:#e7e7e7;} -.small {font-size:80%;} -a {text-decoration:none;color:#a0a;} -a:hover {color:#d3d;} -======= body {padding:0px;margin:0px;} #top {position:fixed;top:5px;left:10%;width:80%;text-align:center;background-color:#fff;border:2px solid #ccc;} #main {position:relative;top:10px;left:3%;width:96%;text-align:center;z-index:0;} @@ -20,4 +8,3 @@ tr.alt {background-color:#e7e7e7;} .small {font-size:80%;} a {text-decoration:none;} a:hover {color:#d3d;} ->>>>>>> 4b455e8... Merge pull request #37267 from Jordie0608/iwasgoingtolaughatcitrusfordoingthisbutthenimadethesamemistake From e966c95de66c0f309c1af16c97a34b9d743a4d68 Mon Sep 17 00:00:00 2001 From: deathride58 Date: Wed, 2 May 2018 10:32:34 -0400 Subject: [PATCH 11/63] Update monkey.dm --- code/_onclick/hud/monkey.dm | 158 ------------------------------------ 1 file changed, 158 deletions(-) diff --git a/code/_onclick/hud/monkey.dm b/code/_onclick/hud/monkey.dm index 1adb196b85..c469c1ef20 100644 --- a/code/_onclick/hud/monkey.dm +++ b/code/_onclick/hud/monkey.dm @@ -1,160 +1,3 @@ -<<<<<<< HEAD -/datum/hud/monkey/New(mob/living/carbon/monkey/owner, ui_style = 'icons/mob/screen_midnight.dmi') - ..() - var/obj/screen/using - var/obj/screen/inventory/inv_box - - action_intent = new /obj/screen/act_intent() - action_intent.icon = ui_style - action_intent.icon_state = mymob.a_intent - action_intent.screen_loc = ui_acti - static_inventory += action_intent - - using = new /obj/screen/mov_intent() - using.icon = ui_style - using.icon_state = (mymob.m_intent == MOVE_INTENT_RUN ? "running" : "walking") - using.screen_loc = ui_movi - static_inventory += using - - using = new/obj/screen/language_menu - using.icon = ui_style - static_inventory += using - - using = new /obj/screen/drop() - using.icon = ui_style - using.screen_loc = ui_drop_throw - static_inventory += using - - build_hand_slots(ui_style) - - using = new /obj/screen/swap_hand() - using.icon = ui_style - using.icon_state = "swap_1_m" //extra wide! - using.screen_loc = ui_swaphand_position(owner,1) - static_inventory += using - - using = new /obj/screen/swap_hand() - using.icon = ui_style - using.icon_state = "swap_2" - using.screen_loc = ui_swaphand_position(owner,2) - static_inventory += using - - inv_box = new /obj/screen/inventory() - inv_box.name = "mask" - inv_box.icon = ui_style - inv_box.icon_state = "mask" -// inv_box.icon_full = "template" - inv_box.screen_loc = ui_monkey_mask - inv_box.slot_id = slot_wear_mask - static_inventory += inv_box - - inv_box = new /obj/screen/inventory() - inv_box.name = "neck" - inv_box.icon = ui_style - inv_box.icon_state = "neck" -// inv_box.icon_full = "template" - inv_box.screen_loc = ui_monkey_neck - inv_box.slot_id = slot_neck - static_inventory += inv_box - - inv_box = new /obj/screen/inventory() - inv_box.name = "head" - inv_box.icon = ui_style - inv_box.icon_state = "head" -// inv_box.icon_full = "template" - inv_box.screen_loc = ui_monkey_head - inv_box.slot_id = slot_head - static_inventory += inv_box - - inv_box = new /obj/screen/inventory() - inv_box.name = "back" - inv_box.icon = ui_style - inv_box.icon_state = "back" - inv_box.screen_loc = ui_monkey_back - inv_box.slot_id = slot_back - static_inventory += inv_box - - throw_icon = new /obj/screen/throw_catch() - throw_icon.icon = ui_style - throw_icon.screen_loc = ui_drop_throw - hotkeybuttons += throw_icon - - internals = new /obj/screen/internals() - infodisplay += internals - - healths = new /obj/screen/healths() - infodisplay += healths - - pull_icon = new /obj/screen/pull() - pull_icon.icon = ui_style - pull_icon.update_icon(mymob) - pull_icon.screen_loc = ui_pull_resist - static_inventory += pull_icon - - lingchemdisplay = new /obj/screen/ling/chems() - infodisplay += lingchemdisplay - - lingstingdisplay = new /obj/screen/ling/sting() - infodisplay += lingstingdisplay - - - zone_select = new /obj/screen/zone_sel() - zone_select.icon = ui_style - zone_select.update_icon(mymob) - static_inventory += zone_select - - mymob.client.screen = list() - - using = new /obj/screen/resist() - using.icon = ui_style - using.screen_loc = ui_pull_resist - hotkeybuttons += using - - for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory)) - if(inv.slot_id) - inv.hud = src - inv_slots[inv.slot_id] = inv - inv.update_icon() - -/datum/hud/monkey/persistent_inventory_update() - if(!mymob) - return - var/mob/living/carbon/monkey/M = mymob - - if(hud_shown) - if(M.back) - M.back.screen_loc = ui_monkey_back - M.client.screen += M.back - if(M.wear_mask) - M.wear_mask.screen_loc = ui_monkey_mask - M.client.screen += M.wear_mask - if(M.wear_neck) - M.wear_neck.screen_loc = ui_monkey_neck - M.client.screen += M.wear_neck - if(M.head) - M.head.screen_loc = ui_monkey_head - M.client.screen += M.head - else - if(M.back) - M.back.screen_loc = null - if(M.wear_mask) - M.wear_mask.screen_loc = null - if(M.head) - M.head.screen_loc = null - - if(hud_version != HUD_STYLE_NOHUD) - for(var/obj/item/I in M.held_items) - I.screen_loc = ui_hand_position(M.get_held_index_of_item(I)) - M.client.screen += I - else - for(var/obj/item/I in M.held_items) - I.screen_loc = null - M.client.screen -= I - -/mob/living/carbon/monkey/create_mob_hud() - if(client && !hud_used) - hud_used = new /datum/hud/monkey(src, ui_style2icon(client.prefs.UI_style)) -======= /datum/hud/monkey/New(mob/living/carbon/monkey/owner, ui_style = 'icons/mob/screen_midnight.dmi') ..() var/obj/screen/using @@ -310,4 +153,3 @@ /mob/living/carbon/monkey/create_mob_hud() if(client && !hud_used) hud_used = new /datum/hud/monkey(src, ui_style2icon(client.prefs.UI_style)) ->>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme From c7ea6896793fad9e01b81556efd49ece4b1ed6f2 Mon Sep 17 00:00:00 2001 From: deathride58 Date: Wed, 2 May 2018 10:33:50 -0400 Subject: [PATCH 12/63] Update nuclear.dm --- code/game/gamemodes/nuclear/nuclear.dm | 5 ----- 1 file changed, 5 deletions(-) diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index 68c9fd2b01..d3cb396fbb 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -154,13 +154,8 @@ R.command = TRUE if(tc) -<<<<<<< HEAD - var/obj/item/device/radio/uplink/U = new uplink_type(H, H.key, tc) - H.equip_to_slot_or_del(U, slot_in_backpack) -======= var/obj/item/radio/uplink/U = new uplink_type(H, H.key, tc) H.equip_to_slot_or_del(U, SLOT_IN_BACKPACK) ->>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme var/obj/item/implant/weapons_auth/W = new/obj/item/implant/weapons_auth(H) W.implant(H) From 3f50934c929326ca4fa87a3e1b300f132b701b4a Mon Sep 17 00:00:00 2001 From: deathride58 Date: Wed, 2 May 2018 10:34:45 -0400 Subject: [PATCH 13/63] Update headset.dm --- code/game/objects/items/devices/radio/headset.dm | 5 ----- 1 file changed, 5 deletions(-) diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index 2f0b6dc021..759327c544 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -7,13 +7,8 @@ subspace_transmission = TRUE canhear_range = 0 // can't hear headsets from very far away -<<<<<<< HEAD - slot_flags = SLOT_EARS - var/obj/item/device/encryptionkey/keyslot2 = null -======= slot_flags = ITEM_SLOT_EARS var/obj/item/encryptionkey/keyslot2 = null ->>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme dog_fashion = null /obj/item/device/radio/headset/suicide_act(mob/living/carbon/user) From 892cb0a1be96c7916f7fb4d1f1257ef0a103b041 Mon Sep 17 00:00:00 2001 From: deathride58 Date: Wed, 2 May 2018 10:35:31 -0400 Subject: [PATCH 14/63] Update reverse_bear_trap.dm --- code/game/objects/items/devices/reverse_bear_trap.dm | 5 ----- 1 file changed, 5 deletions(-) diff --git a/code/game/objects/items/devices/reverse_bear_trap.dm b/code/game/objects/items/devices/reverse_bear_trap.dm index 088be968c5..04679f92e7 100644 --- a/code/game/objects/items/devices/reverse_bear_trap.dm +++ b/code/game/objects/items/devices/reverse_bear_trap.dm @@ -80,13 +80,8 @@ return ..() -<<<<<<< HEAD -/obj/item/device/reverse_bear_trap/attack(mob/living/target, mob/living/user) - if(target.get_item_by_slot(slot_head)) -======= /obj/item/reverse_bear_trap/attack(mob/living/target, mob/living/user) if(target.get_item_by_slot(SLOT_HEAD)) ->>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme to_chat(user, "Remove their headgear first!") return target.visible_message("[user] starts forcing [src] onto [target]'s head!", \ From 51b6ade3efa55ebd2978fb04362d13a1107fac00 Mon Sep 17 00:00:00 2001 From: LetterJay Date: Sun, 13 May 2018 10:18:12 -0500 Subject: [PATCH 15/63] Update bombspawner.dm --- code/game/objects/effects/spawners/bombspawner.dm | 5 ----- 1 file changed, 5 deletions(-) diff --git a/code/game/objects/effects/spawners/bombspawner.dm b/code/game/objects/effects/spawners/bombspawner.dm index a69bfc7f1d..c8c77a0b4d 100644 --- a/code/game/objects/effects/spawners/bombspawner.dm +++ b/code/game/objects/effects/spawners/bombspawner.dm @@ -15,13 +15,8 @@ /obj/effect/spawner/newbomb/Initialize() . = ..() -<<<<<<< HEAD - var/obj/item/device/transfer_valve/V = new(src.loc) - var/obj/item/tank/internals/plasma/full/PT = new(V) -======= var/obj/item/transfer_valve/V = new(src.loc) var/obj/item/tank/internals/plasma/PT = new(V) ->>>>>>> c0b7f77... Modified bomb and syndicate bomb spawner so Cuban Pete bombs maxcap and work again (#37293) var/obj/item/tank/internals/oxygen/OT = new(V) PT.air_contents.assert_gas(/datum/gas/plasma) From 884b8b8c4d8c900199ce7e0ae7bfb2ee3b828e5c Mon Sep 17 00:00:00 2001 From: LetterJay Date: Sun, 13 May 2018 11:54:34 -0500 Subject: [PATCH 16/63] Update smokebomb.dm --- code/game/objects/items/grenades/smokebomb.dm | 34 ------------------- 1 file changed, 34 deletions(-) diff --git a/code/game/objects/items/grenades/smokebomb.dm b/code/game/objects/items/grenades/smokebomb.dm index 5b2ab3aede..d822ede78c 100644 --- a/code/game/objects/items/grenades/smokebomb.dm +++ b/code/game/objects/items/grenades/smokebomb.dm @@ -1,36 +1,3 @@ -<<<<<<< HEAD -/obj/item/grenade/smokebomb - name = "smoke grenade" - desc = "The word 'Dank' is scribbled on it in crayon." - icon = 'icons/obj/grenade.dmi' - icon_state = "smokewhite" - det_time = 20 - item_state = "flashbang" - slot_flags = SLOT_BELT - var/datum/effect_system/smoke_spread/bad/smoke - -/obj/item/grenade/smokebomb/New() - ..() - src.smoke = new /datum/effect_system/smoke_spread/bad - src.smoke.attach(src) - -/obj/item/grenade/smokebomb/Destroy() - qdel(smoke) - return ..() - -/obj/item/grenade/smokebomb/prime() - update_mob() - playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3) - smoke.set_up(4, src) - smoke.start() - - - for(var/obj/structure/blob/B in view(8,src)) - var/damage = round(30/(get_dist(B,src)+1)) - B.take_damage(damage, BURN, "melee", 0) - sleep(80) - qdel(src) -======= /obj/item/grenade/smokebomb name = "smoke grenade" desc = "The word 'Dank' is scribbled on it in crayon." @@ -62,4 +29,3 @@ B.take_damage(damage, BURN, "melee", 0) sleep(80) qdel(src) ->>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme From 77f897e91c3451f138cebf209e22cfdc78e79214 Mon Sep 17 00:00:00 2001 From: ShizCalev Date: Thu, 17 May 2018 11:57:33 -0400 Subject: [PATCH 17/63] Fixes soulstone runtime --- code/modules/antagonists/wizard/equipment/soulstone.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/modules/antagonists/wizard/equipment/soulstone.dm b/code/modules/antagonists/wizard/equipment/soulstone.dm index 11882f65d1..11b0c3f29c 100644 --- a/code/modules/antagonists/wizard/equipment/soulstone.dm +++ b/code/modules/antagonists/wizard/equipment/soulstone.dm @@ -222,7 +222,11 @@ if(newstruct.mind && ((stoner && iscultist(stoner)) || cultoverride) && SSticker && SSticker.mode) SSticker.mode.add_cultist(newstruct.mind, 0) if(iscultist(stoner) || cultoverride) +<<<<<<< HEAD to_chat(newstruct, "You are still bound to serve the cult[stoner ? " and [stoner]":""], follow their orders and help them complete their goals at all costs.") +======= + to_chat(newstruct, "You are still bound to serve the cult[stoner ? " and [stoner]":""], follow [stoner ? stoner.p_their() : "their"] orders and help [stoner ? stoner.p_them() : "them"] complete [stoner ? stoner.p_their() : "their"] goals at all costs.") +>>>>>>> 8faa41a... Fixes soulstone runtime (#37883) else if(stoner) to_chat(newstruct, "You are still bound to serve your creator, [stoner], follow their orders and help them complete their goals at all costs.") newstruct.clear_alert("bloodsense") From 19b8053159c0dc76129707be9e58e49bb1668a94 Mon Sep 17 00:00:00 2001 From: LetterJay Date: Sun, 20 May 2018 02:33:33 -0500 Subject: [PATCH 18/63] Update soulstone.dm --- code/modules/antagonists/wizard/equipment/soulstone.dm | 4 ---- 1 file changed, 4 deletions(-) diff --git a/code/modules/antagonists/wizard/equipment/soulstone.dm b/code/modules/antagonists/wizard/equipment/soulstone.dm index 11b0c3f29c..fa722870a0 100644 --- a/code/modules/antagonists/wizard/equipment/soulstone.dm +++ b/code/modules/antagonists/wizard/equipment/soulstone.dm @@ -222,11 +222,7 @@ if(newstruct.mind && ((stoner && iscultist(stoner)) || cultoverride) && SSticker && SSticker.mode) SSticker.mode.add_cultist(newstruct.mind, 0) if(iscultist(stoner) || cultoverride) -<<<<<<< HEAD - to_chat(newstruct, "You are still bound to serve the cult[stoner ? " and [stoner]":""], follow their orders and help them complete their goals at all costs.") -======= to_chat(newstruct, "You are still bound to serve the cult[stoner ? " and [stoner]":""], follow [stoner ? stoner.p_their() : "their"] orders and help [stoner ? stoner.p_them() : "them"] complete [stoner ? stoner.p_their() : "their"] goals at all costs.") ->>>>>>> 8faa41a... Fixes soulstone runtime (#37883) else if(stoner) to_chat(newstruct, "You are still bound to serve your creator, [stoner], follow their orders and help them complete their goals at all costs.") newstruct.clear_alert("bloodsense") From a0b6b4e7d86a54f48e3f58b0765fb03a21b371a9 Mon Sep 17 00:00:00 2001 From: LetterJay Date: Sun, 20 May 2018 04:30:25 -0500 Subject: [PATCH 19/63] Update _trait.dm --- code/datums/traits/_trait.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/datums/traits/_trait.dm b/code/datums/traits/_trait.dm index 0420cd4317..58fe8e34d0 100644 --- a/code/datums/traits/_trait.dm +++ b/code/datums/traits/_trait.dm @@ -130,3 +130,5 @@ Use this as a guideline //If you don't need any special effects like spawning glasses, then you don't need an add() */ + + From 1e207a743072310dbfa79de85d4c280443004ee6 Mon Sep 17 00:00:00 2001 From: LetterJay Date: Sun, 20 May 2018 23:04:13 -0500 Subject: [PATCH 20/63] modular_citadel --- code/game/objects/items/storage/wallets.dm | 96 +---- code/game/objects/items/tools/weldingtool.dm | 375 ------------------ .../antagonists/highlander/highlander.dm | 8 - code/modules/clothing/ears/_ears.dm | 139 +++---- .../mob/living/carbon/monkey/inventory.dm | 58 +-- modular_citadel/code/__HELPERS/mobs.dm | 26 +- .../code/controllers/subsystem/job.dm | 6 +- .../items/devices/radio/shockcollar.dm | 2 +- .../code/modules/client/loadout/__donator.dm | 94 ++--- .../code/modules/client/loadout/_medical.dm | 2 +- .../code/modules/client/loadout/_security.dm | 24 +- .../code/modules/client/loadout/_service.dm | 4 +- .../code/modules/client/loadout/backpack.dm | 24 +- .../code/modules/client/loadout/glasses.dm | 18 +- .../code/modules/client/loadout/gloves.dm | 2 +- .../code/modules/client/loadout/hands.dm | 26 +- .../code/modules/client/loadout/head.dm | 28 +- .../code/modules/client/loadout/mask.dm | 6 +- .../code/modules/client/loadout/neck.dm | 34 +- .../code/modules/client/loadout/shoes.dm | 16 +- .../code/modules/client/loadout/suit.dm | 40 +- .../code/modules/client/loadout/uniform.dm | 86 ++-- .../code/modules/client/preferences.dm | 8 +- .../modules/custom_loadout/custom_items.dm | 2 +- .../modules/custom_loadout/load_to_mob.dm | 2 +- modular_citadel/cydonian_armor.dm | 4 +- 26 files changed, 282 insertions(+), 848 deletions(-) diff --git a/code/game/objects/items/storage/wallets.dm b/code/game/objects/items/storage/wallets.dm index 5bf8c4b640..a9f9d4ce06 100644 --- a/code/game/objects/items/storage/wallets.dm +++ b/code/game/objects/items/storage/wallets.dm @@ -1,11 +1,10 @@ -<<<<<<< HEAD /obj/item/storage/wallet name = "wallet" desc = "It can hold a few small and personal things." icon_state = "wallet" w_class = WEIGHT_CLASS_SMALL resistance_flags = FLAMMABLE - slot_flags = SLOT_ID + slot_flags = ITEM_SLOT_ID var/obj/item/card/id/front_id = null var/list/combined_access @@ -90,96 +89,3 @@ if(item3_type) new item3_type(src) update_icon() -======= -/obj/item/storage/wallet - name = "wallet" - desc = "It can hold a few small and personal things." - icon_state = "wallet" - w_class = WEIGHT_CLASS_SMALL - resistance_flags = FLAMMABLE - slot_flags = ITEM_SLOT_ID - - var/obj/item/card/id/front_id = null - var/list/combined_access - -/obj/item/storage/wallet/ComponentInitialize() - . = ..() - GET_COMPONENT(STR, /datum/component/storage) - STR.max_items = 4 - STR.can_hold = typecacheof(list( - /obj/item/stack/spacecash, - /obj/item/card, - /obj/item/clothing/mask/cigarette, - /obj/item/flashlight/pen, - /obj/item/seeds, - /obj/item/stack/medical, - /obj/item/toy/crayon, - /obj/item/coin, - /obj/item/dice, - /obj/item/disk, - /obj/item/implanter, - /obj/item/lighter, - /obj/item/lipstick, - /obj/item/match, - /obj/item/paper, - /obj/item/pen, - /obj/item/photo, - /obj/item/reagent_containers/dropper, - /obj/item/reagent_containers/syringe, - /obj/item/screwdriver, - /obj/item/stamp)) - -/obj/item/storage/wallet/Exited(atom/movable/AM) - . = ..() - refreshID() - -/obj/item/storage/wallet/proc/refreshID() - if(!(front_id in src)) - front_id = null - for(var/obj/item/card/id/I in contents) - LAZYINITLIST(combined_access) - LAZYCLEARLIST(combined_access) - if(!front_id) - front_id = I - combined_access |= I.access - update_icon() - -/obj/item/storage/wallet/Entered(atom/movable/AM) - . = ..() - refreshID() - -/obj/item/storage/wallet/update_icon() - var/new_state = "wallet" - if(front_id) - new_state = "wallet_[front_id.icon_state]" - if(new_state != icon_state) //avoid so many icon state changes. - icon_state = new_state - -/obj/item/storage/wallet/GetID() - return front_id - -/obj/item/storage/wallet/GetAccess() - if(LAZYLEN(combined_access)) - return combined_access - else - return ..() - -/obj/item/storage/wallet/random - icon_state = "random_wallet" - -/obj/item/storage/wallet/random/PopulateContents() - var/item1_type = pick( /obj/item/stack/spacecash/c10, /obj/item/stack/spacecash/c100, /obj/item/stack/spacecash/c1000, /obj/item/stack/spacecash/c20, /obj/item/stack/spacecash/c200, /obj/item/stack/spacecash/c50, /obj/item/stack/spacecash/c500) - var/item2_type - if(prob(50)) - item2_type = pick( /obj/item/stack/spacecash/c10, /obj/item/stack/spacecash/c100, /obj/item/stack/spacecash/c1000, /obj/item/stack/spacecash/c20, /obj/item/stack/spacecash/c200, /obj/item/stack/spacecash/c50, /obj/item/stack/spacecash/c500) - var/item3_type = pick( /obj/item/coin/silver, /obj/item/coin/silver, /obj/item/coin/gold, /obj/item/coin/iron, /obj/item/coin/iron, /obj/item/coin/iron ) - - spawn(2) - if(item1_type) - new item1_type(src) - if(item2_type) - new item2_type(src) - if(item3_type) - new item3_type(src) - update_icon() ->>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme diff --git a/code/game/objects/items/tools/weldingtool.dm b/code/game/objects/items/tools/weldingtool.dm index 133cbfaccb..229aa70ee0 100644 --- a/code/game/objects/items/tools/weldingtool.dm +++ b/code/game/objects/items/tools/weldingtool.dm @@ -1,377 +1,3 @@ -<<<<<<< HEAD -#define WELDER_FUEL_BURN_INTERVAL 13 -/obj/item/weldingtool - name = "welding tool" - desc = "A standard edition welder provided by Nanotrasen." - icon = 'icons/obj/tools.dmi' - icon_state = "welder" - item_state = "welder" - lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' - righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' - flags_1 = CONDUCT_1 - slot_flags = SLOT_BELT - force = 3 - throwforce = 5 - hitsound = "swing_hit" - usesound = list('sound/items/welder.ogg', 'sound/items/welder2.ogg') - var/acti_sound = 'sound/items/welderactivate.ogg' - var/deac_sound = 'sound/items/welderdeactivate.ogg' - throw_speed = 3 - throw_range = 5 - w_class = WEIGHT_CLASS_SMALL - armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30) - resistance_flags = FIRE_PROOF - - materials = list(MAT_METAL=70, MAT_GLASS=30) - var/welding = 0 //Whether or not the welding tool is off(0), on(1) or currently welding(2) - var/status = TRUE //Whether the welder is secured or unsecured (able to attach rods to it to make a flamethrower) - var/max_fuel = 20 //The max amount of fuel the welder can hold - var/change_icons = 1 - var/can_off_process = 0 - var/light_intensity = 2 //how powerful the emitted light is when used. - var/progress_flash_divisor = 10 - var/burned_fuel_for = 0 //when fuel was last removed - heat = 3800 - tool_behaviour = TOOL_WELDER - toolspeed = 1 - -/obj/item/weldingtool/Initialize() - . = ..() - create_reagents(max_fuel) - reagents.add_reagent("welding_fuel", max_fuel) - update_icon() - - -/obj/item/weldingtool/proc/update_torch() - if(welding) - add_overlay("[initial(icon_state)]-on") - item_state = "[initial(item_state)]1" - else - item_state = "[initial(item_state)]" - - -/obj/item/weldingtool/update_icon() - cut_overlays() - if(change_icons) - var/ratio = get_fuel() / max_fuel - ratio = CEILING(ratio*4, 1) * 25 - add_overlay("[initial(icon_state)][ratio]") - update_torch() - return - - -/obj/item/weldingtool/process() - switch(welding) - if(0) - force = 3 - damtype = "brute" - update_icon() - if(!can_off_process) - STOP_PROCESSING(SSobj, src) - return - //Welders left on now use up fuel, but lets not have them run out quite that fast - if(1) - force = 15 - damtype = "fire" - ++burned_fuel_for - if(burned_fuel_for >= WELDER_FUEL_BURN_INTERVAL) - use(1) - update_icon() - - //This is to start fires. process() is only called if the welder is on. - open_flame() - - -/obj/item/weldingtool/suicide_act(mob/user) - user.visible_message("[user] welds [user.p_their()] every orifice closed! It looks like [user.p_theyre()] trying to commit suicide!") - return (FIRELOSS) - - -/obj/item/weldingtool/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/screwdriver)) - flamethrower_screwdriver(I, user) - else if(istype(I, /obj/item/stack/rods)) - flamethrower_rods(I, user) - else - . = ..() - update_icon() - -/obj/item/weldingtool/proc/explode() - var/turf/T = get_turf(loc) - var/plasmaAmount = reagents.get_reagent_amount("plasma") - dyn_explosion(T, plasmaAmount/5)//20 plasma in a standard welder has a 4 power explosion. no breaches, but enough to kill/dismember holder - qdel(src) - -/obj/item/weldingtool/attack(mob/living/carbon/human/H, mob/user) - if(!istype(H)) - return ..() - - var/obj/item/bodypart/affecting = H.get_bodypart(check_zone(user.zone_selected)) - - if(affecting && affecting.status == BODYPART_ROBOTIC && user.a_intent != INTENT_HARM) - if(src.use_tool(H, user, 0, volume=50, amount=1)) - if(user == H) - user.visible_message("[user] starts to fix some of the dents on [H]'s [affecting.name].", - "You start fixing some of the dents on [H]'s [affecting.name].") - if(!do_mob(user, H, 50)) - return - item_heal_robotic(H, user, 15, 0) - else - return ..() - - -/obj/item/weldingtool/afterattack(atom/O, mob/user, proximity) - if(!proximity) - return - if(!status && O.is_refillable()) - reagents.trans_to(O, reagents.total_volume) - to_chat(user, "You empty [src]'s fuel tank into [O].") - update_icon() - if(isOn()) - use(1) - var/turf/location = get_turf(user) - location.hotspot_expose(700, 50, 1) - if(get_fuel() <= 0) - set_light(0) - - if(isliving(O)) - var/mob/living/L = O - if(L.IgniteMob()) - message_admins("[key_name_admin(user)] set [key_name_admin(L)] on fire") - log_game("[key_name(user)] set [key_name(L)] on fire") - - -/obj/item/weldingtool/attack_self(mob/user) - if(src.reagents.has_reagent("plasma")) - message_admins("[key_name_admin(user)] activated a rigged welder.") - explode() - switched_on(user) - if(welding) - set_light(light_intensity) - - update_icon() - - -// Returns the amount of fuel in the welder -/obj/item/weldingtool/proc/get_fuel() - return reagents.get_reagent_amount("welding_fuel") - - -// Uses fuel from the welding tool. -/obj/item/weldingtool/use(used = 0) - if(!isOn() || !check_fuel()) - return FALSE - - if(used) - burned_fuel_for = 0 - if(get_fuel() >= used) - reagents.remove_reagent("welding_fuel", used) - check_fuel() - return TRUE - else - return FALSE - - -//Turns off the welder if there is no more fuel (does this really need to be its own proc?) -/obj/item/weldingtool/proc/check_fuel(mob/user) - if(get_fuel() <= 0 && welding) - switched_on(user) - update_icon() - //mob icon update - if(ismob(loc)) - var/mob/M = loc - M.update_inv_hands(0) - - return 0 - return 1 - -//Switches the welder on -/obj/item/weldingtool/proc/switched_on(mob/user) - if(!status) - to_chat(user, "[src] can't be turned on while unsecured!") - return - welding = !welding - if(welding) - if(get_fuel() >= 1) - to_chat(user, "You switch [src] on.") - playsound(loc, acti_sound, 50, 1) - force = 15 - damtype = "fire" - hitsound = 'sound/items/welder.ogg' - update_icon() - START_PROCESSING(SSobj, src) - else - to_chat(user, "You need more fuel!") - switched_off(user) - else - to_chat(user, "You switch [src] off.") - playsound(loc, deac_sound, 50, 1) - switched_off(user) - -//Switches the welder off -/obj/item/weldingtool/proc/switched_off(mob/user) - welding = 0 - set_light(0) - - force = 3 - damtype = "brute" - hitsound = "swing_hit" - update_icon() - - -/obj/item/weldingtool/examine(mob/user) - ..() - to_chat(user, "It contains [get_fuel()] unit\s of fuel out of [max_fuel].") - -/obj/item/weldingtool/is_hot() - return welding * heat - -//Returns whether or not the welding tool is currently on. -/obj/item/weldingtool/proc/isOn() - return welding - -// When welding is about to start, run a normal tool_use_check, then flash a mob if it succeeds. -/obj/item/weldingtool/tool_start_check(mob/living/user, amount=0) - . = tool_use_check(user, amount) - if(. && user) - user.flash_act(light_intensity) - -// Flash the user during welding progress -/obj/item/weldingtool/tool_check_callback(mob/living/user, amount, datum/callback/extra_checks) - . = ..() - if(. && user) - if (progress_flash_divisor == 0) - user.flash_act(min(light_intensity,1)) - progress_flash_divisor = initial(progress_flash_divisor) - else - progress_flash_divisor-- - -// If welding tool ran out of fuel during a construction task, construction fails. -/obj/item/weldingtool/tool_use_check(mob/living/user, amount) - if(!isOn() || !check_fuel()) - to_chat(user, "[src] has to be on to complete this task!") - return FALSE - - if(get_fuel() >= amount) - return TRUE - else - to_chat(user, "You need more welding fuel to complete this task!") - return FALSE - - -/obj/item/weldingtool/proc/flamethrower_screwdriver(obj/item/I, mob/user) - if(welding) - to_chat(user, "Turn it off first!") - return - status = !status - if(status) - to_chat(user, "You resecure [src] and close the fuel tank.") - container_type = NONE - else - to_chat(user, "[src] can now be attached, modified, and refuelled.") - container_type = OPENCONTAINER - add_fingerprint(user) - -/obj/item/weldingtool/proc/flamethrower_rods(obj/item/I, mob/user) - if(!status) - var/obj/item/stack/rods/R = I - if (R.use(1)) - var/obj/item/flamethrower/F = new /obj/item/flamethrower(user.loc) - if(!remove_item_from_storage(F)) - user.transferItemToLoc(src, F, TRUE) - F.weldtool = src - add_fingerprint(user) - to_chat(user, "You add a rod to a welder, starting to build a flamethrower.") - user.put_in_hands(F) - else - to_chat(user, "You need one rod to start building a flamethrower!") - -/obj/item/weldingtool/ignition_effect(atom/A, mob/user) - if(use_tool(A, user, 0, amount=1)) - return "[user] casually lights [A] with [src], what a badass." - else - return "" - -/obj/item/weldingtool/largetank - name = "industrial welding tool" - desc = "A slightly larger welder with a larger tank." - icon_state = "indwelder" - max_fuel = 40 - materials = list(MAT_GLASS=60) - -/obj/item/weldingtool/largetank/cyborg - name = "integrated welding tool" - desc = "An advanced welder designed to be used in robotic systems." - toolspeed = 0.5 - -/obj/item/weldingtool/largetank/flamethrower_screwdriver() - return - - -/obj/item/weldingtool/mini - name = "emergency welding tool" - desc = "A miniature welder used during emergencies." - icon_state = "miniwelder" - max_fuel = 10 - w_class = WEIGHT_CLASS_TINY - materials = list(MAT_METAL=30, MAT_GLASS=10) - change_icons = 0 - -/obj/item/weldingtool/mini/flamethrower_screwdriver() - return - -/obj/item/weldingtool/abductor - name = "alien welding tool" - desc = "An alien welding tool. Whatever fuel it uses, it never runs out." - icon = 'icons/obj/abductor.dmi' - icon_state = "welder" - toolspeed = 0.1 - light_intensity = 0 - change_icons = 0 - -/obj/item/weldingtool/abductor/process() - if(get_fuel() <= max_fuel) - reagents.add_reagent("welding_fuel", 1) - ..() - -/obj/item/weldingtool/hugetank - name = "upgraded industrial welding tool" - desc = "An upgraded welder based of the industrial welder." - icon_state = "upindwelder" - item_state = "upindwelder" - max_fuel = 80 - materials = list(MAT_METAL=70, MAT_GLASS=120) - -/obj/item/weldingtool/experimental - name = "experimental welding tool" - desc = "An experimental welder capable of self-fuel generation and less harmful to the eyes." - icon_state = "exwelder" - item_state = "exwelder" - max_fuel = 40 - materials = list(MAT_METAL=70, MAT_GLASS=120) - var/last_gen = 0 - change_icons = 0 - can_off_process = 1 - light_intensity = 1 - toolspeed = 0.5 - var/nextrefueltick = 0 - -/obj/item/weldingtool/experimental/brass - name = "brass welding tool" - desc = "A brass welder that seems to constantly refuel itself. It is faintly warm to the touch." - resistance_flags = FIRE_PROOF | ACID_PROOF - icon_state = "brasswelder" - item_state = "brasswelder" - - -/obj/item/weldingtool/experimental/process() - ..() - if(get_fuel() < max_fuel && nextrefueltick < world.time) - nextrefueltick = world.time + 10 - reagents.add_reagent("welding_fuel", 1) - -#undef WELDER_FUEL_BURN_INTERVAL -======= #define WELDER_FUEL_BURN_INTERVAL 13 /obj/item/weldingtool name = "welding tool" @@ -744,4 +370,3 @@ reagents.add_reagent("welding_fuel", 1) #undef WELDER_FUEL_BURN_INTERVAL ->>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme diff --git a/code/modules/antagonists/highlander/highlander.dm b/code/modules/antagonists/highlander/highlander.dm index 6f44240578..c55f177b7a 100644 --- a/code/modules/antagonists/highlander/highlander.dm +++ b/code/modules/antagonists/highlander/highlander.dm @@ -46,19 +46,11 @@ qdel(I) for(var/obj/item/I in H.held_items) qdel(I) -<<<<<<< HEAD - H.equip_to_slot_or_del(new /obj/item/clothing/under/kilt/highlander(H), slot_w_uniform) - H.equip_to_slot_or_del(new /obj/item/radio/headset/heads/captain(H), slot_ears) - H.equip_to_slot_or_del(new /obj/item/clothing/head/beret/highlander(H), slot_head) - H.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(H), slot_shoes) - H.equip_to_slot_or_del(new /obj/item/pinpointer/nuke(H), slot_l_store) -======= H.equip_to_slot_or_del(new /obj/item/clothing/under/kilt/highlander(H), SLOT_W_UNIFORM) H.equip_to_slot_or_del(new /obj/item/radio/headset/heads/captain(H), SLOT_EARS) H.equip_to_slot_or_del(new /obj/item/clothing/head/beret/highlander(H), SLOT_HEAD) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(H), SLOT_SHOES) H.equip_to_slot_or_del(new /obj/item/pinpointer/nuke(H), SLOT_L_STORE) ->>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme for(var/obj/item/pinpointer/nuke/P in H) P.attack_self(H) var/obj/item/card/id/W = new(H) diff --git a/code/modules/clothing/ears/_ears.dm b/code/modules/clothing/ears/_ears.dm index cdd25cf436..3a1e246d04 100644 --- a/code/modules/clothing/ears/_ears.dm +++ b/code/modules/clothing/ears/_ears.dm @@ -1,95 +1,46 @@ -<<<<<<< HEAD - -//Ears: currently only used for headsets and earmuffs -/obj/item/clothing/ears - name = "ears" - w_class = WEIGHT_CLASS_TINY - throwforce = 0 - slot_flags = SLOT_EARS - resistance_flags = NONE - -/obj/item/clothing/ears/earmuffs - name = "earmuffs" - desc = "Protects your hearing from loud noises, and quiet ones as well." - icon_state = "earmuffs" - item_state = "earmuffs" - strip_delay = 15 - equip_delay_other = 25 - resistance_flags = FLAMMABLE - flags_2 = BANG_PROTECT_2|HEALS_EARS_2 - -/obj/item/clothing/ears/headphones - name = "headphones" - desc = "Unce unce unce unce. Boop!" - icon = 'icons/obj/clothing/accessories.dmi' - icon_state = "headphones" - item_state = "headphones" - slot_flags = SLOT_EARS | SLOT_HEAD | SLOT_NECK //Fluff item, put it whereever you want! - actions_types = list(/datum/action/item_action/toggle_headphones) - var/headphones_on = FALSE - -/obj/item/clothing/ears/headphones/Initialize() - . = ..() - update_icon() - -/obj/item/clothing/ears/headphones/update_icon() - icon_state = "[initial(icon_state)]_[headphones_on? "on" : "off"]" - item_state = "[initial(item_state)]_[headphones_on? "on" : "off"]" - -/obj/item/clothing/ears/headphones/proc/toggle(owner) - headphones_on = !headphones_on - update_icon() - var/mob/living/carbon/human/H = owner - if(istype(H)) - H.update_inv_ears() - H.update_inv_neck() - H.update_inv_head() - to_chat(owner, "You turn the music [headphones_on? "on. Untz Untz Untz!" : "off."]") -======= - //Ears: currently only used for headsets and earmuffs -/obj/item/clothing/ears - name = "ears" - w_class = WEIGHT_CLASS_TINY - throwforce = 0 - slot_flags = ITEM_SLOT_EARS - resistance_flags = NONE - -/obj/item/clothing/ears/earmuffs - name = "earmuffs" - desc = "Protects your hearing from loud noises, and quiet ones as well." - icon_state = "earmuffs" - item_state = "earmuffs" - strip_delay = 15 - equip_delay_other = 25 - resistance_flags = FLAMMABLE - flags_2 = BANG_PROTECT_2|HEALS_EARS_2 - -/obj/item/clothing/ears/headphones - name = "headphones" - desc = "Unce unce unce unce. Boop!" - icon = 'icons/obj/clothing/accessories.dmi' - icon_state = "headphones" - item_state = "headphones" - slot_flags = ITEM_SLOT_EARS | ITEM_SLOT_HEAD | ITEM_SLOT_NECK //Fluff item, put it whereever you want! - actions_types = list(/datum/action/item_action/toggle_headphones) - var/headphones_on = FALSE - -/obj/item/clothing/ears/headphones/Initialize() - . = ..() - update_icon() - -/obj/item/clothing/ears/headphones/update_icon() - icon_state = "[initial(icon_state)]_[headphones_on? "on" : "off"]" - item_state = "[initial(item_state)]_[headphones_on? "on" : "off"]" - -/obj/item/clothing/ears/headphones/proc/toggle(owner) - headphones_on = !headphones_on - update_icon() - var/mob/living/carbon/human/H = owner - if(istype(H)) - H.update_inv_ears() - H.update_inv_neck() - H.update_inv_head() - to_chat(owner, "You turn the music [headphones_on? "on. Untz Untz Untz!" : "off."]") ->>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme + /obj/item/clothing/ears + name = "ears" + w_class = WEIGHT_CLASS_TINY + throwforce = 0 + slot_flags = ITEM_SLOT_EARS + resistance_flags = NONE + + /obj/item/clothing/ears/earmuffs + name = "earmuffs" + desc = "Protects your hearing from loud noises, and quiet ones as well." + icon_state = "earmuffs" + item_state = "earmuffs" + strip_delay = 15 + equip_delay_other = 25 + resistance_flags = FLAMMABLE + flags_2 = BANG_PROTECT_2|HEALS_EARS_2 + + /obj/item/clothing/ears/headphones + name = "headphones" + desc = "Unce unce unce unce. Boop!" + icon = 'icons/obj/clothing/accessories.dmi' + icon_state = "headphones" + item_state = "headphones" + slot_flags = ITEM_SLOT_EARS | ITEM_SLOT_HEAD | ITEM_SLOT_NECK //Fluff item, put it whereever you want! + actions_types = list(/datum/action/item_action/toggle_headphones) + var/headphones_on = FALSE + + /obj/item/clothing/ears/headphones/Initialize() + . = ..() + update_icon() + + /obj/item/clothing/ears/headphones/update_icon() + icon_state = "[initial(icon_state)]_[headphones_on? "on" : "off"]" + item_state = "[initial(item_state)]_[headphones_on? "on" : "off"]" + + /obj/item/clothing/ears/headphones/proc/toggle(owner) + headphones_on = !headphones_on + update_icon() + var/mob/living/carbon/human/H = owner + if(istype(H)) + H.update_inv_ears() + H.update_inv_neck() + H.update_inv_head() + to_chat(owner, "You turn the music [headphones_on? "on. Untz Untz Untz!" : "off."]") + \ No newline at end of file diff --git a/code/modules/mob/living/carbon/monkey/inventory.dm b/code/modules/mob/living/carbon/monkey/inventory.dm index b2ed3e8c74..113d2a6e2f 100644 --- a/code/modules/mob/living/carbon/monkey/inventory.dm +++ b/code/modules/mob/living/carbon/monkey/inventory.dm @@ -1,71 +1,31 @@ -<<<<<<< HEAD /mob/living/carbon/monkey/can_equip(obj/item/I, slot, disable_warning = 0) switch(slot) - if(slot_hands) + if(SLOT_HANDS) if(get_empty_held_indexes()) return TRUE return FALSE - if(slot_wear_mask) + if(SLOT_WEAR_MASK) if(wear_mask) return FALSE - if( !(I.slot_flags & SLOT_MASK) ) + if( !(I.slot_flags & ITEM_SLOT_MASK) ) return FALSE return TRUE - if(slot_neck) + if(SLOT_NECK) if(wear_neck) return FALSE - if( !(I.slot_flags & SLOT_NECK) ) + if( !(I.slot_flags & ITEM_SLOT_NECK) ) return FALSE return TRUE - if(slot_head) + if(SLOT_HEAD) if(head) return FALSE - if( !(I.slot_flags & SLOT_HEAD) ) + if( !(I.slot_flags & ITEM_SLOT_HEAD) ) return FALSE return TRUE - if(slot_back) + if(SLOT_BACK) if(back) return FALSE - if( !(I.slot_flags & SLOT_BACK) ) + if( !(I.slot_flags & ITEM_SLOT_BACK) ) return FALSE return TRUE return FALSE //Unsupported slot - - - -======= -/mob/living/carbon/monkey/can_equip(obj/item/I, slot, disable_warning = 0) - switch(slot) - if(SLOT_HANDS) - if(get_empty_held_indexes()) - return TRUE - return FALSE - if(SLOT_WEAR_MASK) - if(wear_mask) - return FALSE - if( !(I.slot_flags & ITEM_SLOT_MASK) ) - return FALSE - return TRUE - if(SLOT_NECK) - if(wear_neck) - return FALSE - if( !(I.slot_flags & ITEM_SLOT_NECK) ) - return FALSE - return TRUE - if(SLOT_HEAD) - if(head) - return FALSE - if( !(I.slot_flags & ITEM_SLOT_HEAD) ) - return FALSE - return TRUE - if(SLOT_BACK) - if(back) - return FALSE - if( !(I.slot_flags & ITEM_SLOT_BACK) ) - return FALSE - return TRUE - return FALSE //Unsupported slot - - - ->>>>>>> ecd0d8b... Merge pull request #37476 from AnturK/thisalwaysbuggedme diff --git a/modular_citadel/code/__HELPERS/mobs.dm b/modular_citadel/code/__HELPERS/mobs.dm index a6fe446b5d..2666696564 100644 --- a/modular_citadel/code/__HELPERS/mobs.dm +++ b/modular_citadel/code/__HELPERS/mobs.dm @@ -1,28 +1,28 @@ /proc/slot_to_string(slot) switch(slot) - if(slot_back) + if(SLOT_BACK) return "Backpack" - if(slot_wear_mask) + if(SLOT_WEAR_MASK) return "Mask" - if(slot_hands) + if(SLOT_HANDS) return "Hands" - if(slot_belt) + if(SLOT_BELT) return "Belt" - if(slot_ears) + if(SLOT_EARS) return "Ears" - if(slot_glasses) + if(SLOT_GLASSES) return "Glasses" - if(slot_gloves) + if(SLOT_GLOVES) return "Gloves" - if(slot_neck) + if(SLOT_NECK) return "Neck" - if(slot_head) + if(SLOT_HEAD) return "Head" - if(slot_shoes) + if(SLOT_SHOES) return "Shoes" - if(slot_wear_suit) + if(SLOT_WEAR_SUIT) return "Suit" - if(slot_w_uniform) + if(SLOT_W_UNIFORM) return "Uniform" - if(slot_in_backpack) + if(SLOT_IN_BACKPACK) return "In backpack" diff --git a/modular_citadel/code/controllers/subsystem/job.dm b/modular_citadel/code/controllers/subsystem/job.dm index 846c17344c..749d7e1e72 100644 --- a/modular_citadel/code/controllers/subsystem/job.dm +++ b/modular_citadel/code/controllers/subsystem/job.dm @@ -15,15 +15,15 @@ permitted = FALSE if(G.ckeywhitelist && G.ckeywhitelist.len && !(the_mob.client.ckey in G.ckeywhitelist)) permitted = FALSE - if(!equipbackpackstuff && G.category == slot_in_backpack)//snowflake check since plopping stuff in the backpack doesnt work for pre-job equip loadout stuffs + if(!equipbackpackstuff && G.category == SLOT_IN_BACKPACK)//snowflake check since plopping stuff in the backpack doesnt work for pre-job equip loadout stuffs permitted = FALSE - if(equipbackpackstuff && G.category != slot_in_backpack)//ditto + if(equipbackpackstuff && G.category != SLOT_IN_BACKPACK)//ditto permitted = FALSE if(!permitted) continue var/obj/item/I = new G.path if(!M.equip_to_slot_if_possible(I, G.category, disable_warning = TRUE, bypass_equip_delay_self = TRUE)) // If the job's dresscode compliant, try to put it in its slot, first - if(!M.equip_to_slot_if_possible(I, slot_in_backpack, disable_warning = TRUE, bypass_equip_delay_self = TRUE)) // Otherwise, try to put it in the backpack + if(!M.equip_to_slot_if_possible(I, SLOT_IN_BACKPACK, disable_warning = TRUE, bypass_equip_delay_self = TRUE)) // Otherwise, try to put it in the backpack I.forceMove(get_turf(M)) // If everything fails, just put it on the floor under the mob. /datum/controller/subsystem/job/proc/FreeRole(rank) diff --git a/modular_citadel/code/game/objects/items/devices/radio/shockcollar.dm b/modular_citadel/code/game/objects/items/devices/radio/shockcollar.dm index 9917eb6e7b..a9a46ff08d 100644 --- a/modular_citadel/code/game/objects/items/devices/radio/shockcollar.dm +++ b/modular_citadel/code/game/objects/items/devices/radio/shockcollar.dm @@ -24,7 +24,7 @@ /obj/item/electropack/shockcollar/attack_hand(mob/user) if(loc == user) if(slot_flags == SLOT_NECK) - if(user.get_item_by_slot(slot_neck)) + if(user.get_item_by_slot(SLOT_NECK)) to_chat(user, "The collar is fastened tight! You'll need help taking this off!") return ..() diff --git a/modular_citadel/code/modules/client/loadout/__donator.dm b/modular_citadel/code/modules/client/loadout/__donator.dm index 62924c7305..d3910d5554 100644 --- a/modular_citadel/code/modules/client/loadout/__donator.dm +++ b/modular_citadel/code/modules/client/loadout/__donator.dm @@ -2,279 +2,279 @@ /datum/gear/pingcoderfailsafe name = "IF YOU SEE THIS, PING A CODER RIGHT NOW!" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/bikehorn/golden ckeywhitelist = list("This entry should never appear with this variable set.") //If it does, then that means somebody fucked up the whitelist system pretty hard /datum/gear/donortestingbikehorn name = "Donor item testing bikehorn" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/bikehorn geargroupID = "DONORTEST" /datum/gear/kevhorn name = "Airhorn" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/bikehorn/airhorn ckeywhitelist = list("kevinz000") /datum/gear/cebusoap name = "Cebutris' soap" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/custom/ceb_soap ckeywhitelist = list("cebutris") /datum/gear/kiaracloak name = "Kiara's cloak" - category = slot_neck + category = SLOT_NECK path = /obj/item/clothing/neck/cloak/inferno ckeywhitelist = list("inferno707") /datum/gear/kiaracollar name = "Kiara's collar" - category = slot_neck + category = SLOT_NECK path = /obj/item/clothing/neck/petcollar/inferno ckeywhitelist = list("inferno707") /datum/gear/kiaramedal name = "Insignia of Steele" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/clothing/accessory/medal/steele ckeywhitelist = list("inferno707") /datum/gear/sexymimemask name = "The hollow heart" - category = slot_wear_mask + category = SLOT_WEAR_MASK path = /obj/item/clothing/mask/sexymime ckeywhitelist = list("inferno707") /datum/gear/engravedzippo name = "Engraved zippo" - category = slot_hands + category = SLOT_HANDS path = /obj/item/lighter/gold ckeywhitelist = list("dirtyoldharry") /datum/gear/geisha name = "Geisha suit" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/geisha ckeywhitelist = list("atiefling") /datum/gear/specialscarf name = "Special scarf" - category = slot_neck + category = SLOT_NECK path = /obj/item/clothing/neck/scarf/zomb ckeywhitelist = list("zombierobin") /datum/gear/redmadcoat name = "The Mad's labcoat" - category = slot_wear_suit + category = SLOT_WEAR_SUIT path = /obj/item/clothing/suit/toggle/labcoat/mad/red ckeywhitelist = list("zombierobin") /datum/gear/santahat name = "Santa hat" - category = slot_head + category = SLOT_HEAD path = /obj/item/clothing/head/santa/fluff ckeywhitelist = list("illotafv") /datum/gear/reindeerhat name = "Reindeer hat" - category = slot_head + category = SLOT_HEAD path = /obj/item/clothing/head/hardhat/reindeer/fluff ckeywhitelist = list("illotafv") /datum/gear/treeplushie name = "Christmas tree plushie" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/toy/plush/tree ckeywhitelist = list("illotafv") /datum/gear/santaoutfit name = "Santa costume" - category = slot_wear_suit + category = SLOT_WEAR_SUIT path = /obj/item/clothing/suit/space/santa/fluff ckeywhitelist = list("illotafv") /datum/gear/treecloak name = "Christmas tree cloak" - category = slot_neck + category = SLOT_NECK path = /obj/item/clothing/neck/cloak/festive ckeywhitelist = list("illotafv") /datum/gear/carrotplush name = "Carrot plushie" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/toy/plush/carrot ckeywhitelist = list("improvedname") /datum/gear/carrotcloak name = "Carrot cloak" - category = slot_neck + category = SLOT_NECK path = /obj/item/clothing/neck/cloak/carrot ckeywhitelist = list("improvedname") /datum/gear/albortorosamask name = "Alborto Rosa mask" - category = slot_wear_mask + category = SLOT_WEAR_MASK path = /obj/item/clothing/mask/luchador/zigfie ckeywhitelist = list("zigfie") /datum/gear/mankini name = "Mankini" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/mankini ckeywhitelist = list("zigfie") /datum/gear/pinkshoes name = "Pink shoes" - category = slot_shoes + category = SLOT_SHOES path = /obj/item/clothing/shoes/sneakers/pink ckeywhitelist = list("zigfie") /datum/gear/reecesgreatcoat name = "Reece's Great Coat" - category = slot_wear_suit + category = SLOT_WEAR_SUIT path = /obj/item/clothing/suit/trenchcoat/green ckeywhitelist = list("geemiesif") /datum/gear/russianflask name = "Russian flask" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/reagent_containers/food/drinks/flask/russian cost = 2 ckeywhitelist = list("slomka") /datum/gear/stalkermask name = "S.T.A.L.K.E.R. mask" - category = slot_wear_mask + category = SLOT_WEAR_MASK path = /obj/item/clothing/mask/gas/stalker ckeywhitelist = list("slomka") /datum/gear/stripedcollar name = "Striped collar" - category = slot_neck + category = SLOT_NECK path = /obj/item/clothing/neck/petcollar/stripe ckeywhitelist = list("jademanique") /datum/gear/performersoutfit name = "Bluish performer's outfit" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/singery/custom ckeywhitelist = list("killer402402") /datum/gear/vermillion name = "Vermillion clothing" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/suit/vermillion ckeywhitelist = list("fractious") /datum/gear/AM4B name = "Foam Force AM4-B" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/gun/ballistic/automatic/AM4B ckeywhitelist = list("zeronetalpha") /datum/gear/carrotsatchel name = "Carrot Satchel" - category = slot_hands + category = SLOT_HANDS path = /obj/item/storage/backpack/satchel/carrot ckeywhitelist = list("improvedname") /datum/gear/naomisweater name = "worn black sweater" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/bb_sweater/black/naomi ckeywhitelist = list("technicalmagi") /datum/gear/naomicollar name = "worn pet collar" - category = slot_neck + category = SLOT_NECK path = /obj/item/clothing/neck/petcollar/naomi ckeywhitelist = list("technicalmagi") /datum/gear/gladiator name = "Gladiator Armor" - category = slot_wear_suit + category = SLOT_WEAR_SUIT path = /obj/item/clothing/under/gladiator ckeywhitelist = list("aroche") /datum/gear/bloodredtie name = "Blood Red Tie" - category = slot_neck + category = SLOT_NECK path = /obj/item/clothing/neck/tie/bloodred ckeywhitelist = list("kyutness") /datum/gear/puffydress name = "Puffy Dress" - category = slot_wear_suit + category = SLOT_WEAR_SUIT path = /obj/item/clothing/suit/puffydress ckeywhitelist = list("stallingratt") /datum/gear/labredblack name = "Black and Red Coat" - category = slot_wear_suit + category = SLOT_WEAR_SUIT path = /obj/item/clothing/suit/toggle/labcoat/labredblack ckeywhitelist = list("blakeryan", "durandalphor") /datum/gear/torisword name = "Rainbow Zweihander" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/twohanded/hypereutactic/toy/rainbow ckeywhitelist = list("annoymous35") /datum/gear/darksabre name = "Dark Sabre" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/toy/sword/darksabre ckeywhitelist = list("inferno707") datum/gear/darksabresheath name = "Dark Sabre Sheath" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/storage/belt/sabre/darksabre ckeywhitelist = list("inferno707") /datum/gear/toriball name = "Rainbow Tennis Ball" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/toy/tennis/rainbow ckeywhitelist = list("annoymous35") /datum/gear/izzyball name = "Katlin's Ball" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/toy/tennis/rainbow/izzy ckeywhitelist = list("izzyinbox") /datum/gear/cloak name = "Green Cloak" - category = slot_neck + category = SLOT_NECK path = /obj/item/clothing/neck/cloak/green ckeywhitelist = list("killer402402") /datum/gear/steelflask name = "Steel Flask" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/reagent_containers/food/drinks/flask/steel cost = 2 ckeywhitelist = list("johnnyvitrano") /datum/gear/paperhat name = "Paper Hat" - category = slot_head + category = SLOT_HEAD path = /obj/item/clothing/head/paperhat ckeywhitelist = list("kered2") /datum/gear/cloakce name = "Polychromic CE Cloak" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/clothing/neck/cloak/polychromic/polyce ckeywhitelist = list("worksbythesea", "blakeryan") - + /datum/gear/ssk name = "Stun Sword Kit" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/ssword_kit ckeywhitelist = list("phillip458") diff --git a/modular_citadel/code/modules/client/loadout/_medical.dm b/modular_citadel/code/modules/client/loadout/_medical.dm index e8c8ea453d..a0d0e3f2b2 100644 --- a/modular_citadel/code/modules/client/loadout/_medical.dm +++ b/modular_citadel/code/modules/client/loadout/_medical.dm @@ -1,5 +1,5 @@ /datum/gear/stethoscope name = "Stethoscope" - category = slot_neck + category = SLOT_NECK path = /obj/item/clothing/neck/stethoscope restricted_roles = list("Medical Doctor", "Chief Medical Officer") diff --git a/modular_citadel/code/modules/client/loadout/_security.dm b/modular_citadel/code/modules/client/loadout/_security.dm index 304e99f311..28145d07b9 100644 --- a/modular_citadel/code/modules/client/loadout/_security.dm +++ b/modular_citadel/code/modules/client/loadout/_security.dm @@ -1,71 +1,71 @@ /datum/gear/navyblueuniformhos name = "Head of Security navyblue uniform" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/rank/head_of_security/navyblue restricted_roles = list("Head of Security") /datum/gear/navybluehosberet name = "Head of security's Naviblue beret" - category = slot_head + category = SLOT_HEAD path = /obj/item/clothing/head/beret/sec/navyhos restricted_roles = list("Head of Security") /datum/gear/navybluejackethos name = "head of security's navyblue jacket" - category = slot_wear_suit + category = SLOT_WEAR_SUIT path = /obj/item/clothing/suit/security/hos restricted_roles = list("Head of Security") /datum/gear/navybluejacketofficer name = "security officer's navyblue jacket" - category = slot_wear_suit + category = SLOT_WEAR_SUIT path = /obj/item/clothing/suit/security/officer restricted_roles = list("Security Officer") /datum/gear/navyblueofficerberet name = "Security officer's Navyblue beret" - category = slot_head + category = SLOT_HEAD path = /obj/item/clothing/head/beret/sec/navyofficer restricted_roles = list("Security Officer") /datum/gear/navyblueuniformofficer name = "security officer navyblue uniform" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/rank/security/navyblue restricted_roles = list("Security officer") /datum/gear/navybluejacketwarden name = "warden navyblue jacket" - category = slot_wear_suit + category = SLOT_WEAR_SUIT path = /obj/item/clothing/suit/security/warden restricted_roles = list("Warden") /datum/gear/navybluewardenberet name = "Warden's navyblue beret" - category = slot_head + category = SLOT_HEAD path = /obj/item/clothing/head/beret/sec/navywarden restricted_roles = list("Warden") /datum/gear/navyblueuniformwarden name = "Warden navyblue uniform" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/rank/warden/navyblue restricted_roles = list("Warden") /datum/gear/secskirt name = "Security skirt" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/rank/security/skirt restricted_roles = list("Security Officer", "Warden", "Head of Security") /datum/gear/hosskirt name = "Head of security's skirt" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/rank/head_of_security/skirt restricted_roles = list("Head of Security") /datum/gear/sechud name = "Security Hud" - category = slot_glasses + category = SLOT_GLASSES path = /obj/item/clothing/glasses/hud/security restricted_roles = list("Security Officer", "Warden", "Head of Security") \ No newline at end of file diff --git a/modular_citadel/code/modules/client/loadout/_service.dm b/modular_citadel/code/modules/client/loadout/_service.dm index 56345e9185..9b508bb93f 100644 --- a/modular_citadel/code/modules/client/loadout/_service.dm +++ b/modular_citadel/code/modules/client/loadout/_service.dm @@ -1,13 +1,13 @@ /datum/gear/plushvar name = "Ratvar Plushie" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/toy/plush/plushvar cost = 5 restricted_roles = list("Chaplain") /datum/gear/narplush name = "Narsie Plushie" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/toy/plush/narplush cost = 5 restricted_roles = list("Chaplain") \ No newline at end of file diff --git a/modular_citadel/code/modules/client/loadout/backpack.dm b/modular_citadel/code/modules/client/loadout/backpack.dm index 3c8d74cdac..b3a59425a9 100644 --- a/modular_citadel/code/modules/client/loadout/backpack.dm +++ b/modular_citadel/code/modules/client/loadout/backpack.dm @@ -1,59 +1,59 @@ /datum/gear/plushcarp name = "Space carp plushie" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/toy/plush/carpplushie /datum/gear/plushliz name = "Lizard plushie" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/toy/plush/lizardplushie /datum/gear/plushsnek name = "Snake plushie" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/toy/plush/snakeplushie /datum/gear/plushslime name = "Slime plushie" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/toy/plush/slimeplushie /datum/gear/tennis name = "Classic Tennis Ball" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/toy/tennis /datum/gear/tennisred name = "Red Tennis Ball" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/toy/tennis/red /datum/gear/tennisyellow name = "Yellow Tennis Ball" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/toy/tennis/yellow /datum/gear/tennisgreen name = "Green Tennis Ball" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/toy/tennis/green /datum/gear/tenniscyan name = "Cyan Tennis Ball" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/toy/tennis/cyan /datum/gear/tennisblue name = "Blue Tennis Ball" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/toy/tennis/blue /datum/gear/tennispurple name = "Purple Tennis Ball" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/toy/tennis/purple /datum/gear/dildo name = "Customizable dildo" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/dildo/custom \ No newline at end of file diff --git a/modular_citadel/code/modules/client/loadout/glasses.dm b/modular_citadel/code/modules/client/loadout/glasses.dm index b1e6068a9e..9e7b68bf0d 100644 --- a/modular_citadel/code/modules/client/loadout/glasses.dm +++ b/modular_citadel/code/modules/client/loadout/glasses.dm @@ -1,44 +1,44 @@ /datum/gear/cold name = "Cold goggles" - category = slot_glasses + category = SLOT_GLASSES path = /obj/item/clothing/glasses/cold /datum/gear/eyepatch name = "Eyepatch" - category = slot_glasses + category = SLOT_GLASSES path = /obj/item/clothing/glasses/eyepatch /datum/gear/heat name = "Heat goggles" - category = slot_glasses + category = SLOT_GLASSES path = /obj/item/clothing/glasses/heat /datum/gear/hipster name = "Hipster glasses" - category = slot_glasses + category = SLOT_GLASSES path = /obj/item/clothing/glasses/regular/hipster /datum/gear/jamjar name = "Jamjar glasses" - category = slot_glasses + category = SLOT_GLASSES path = /obj/item/clothing/glasses/regular/jamjar /datum/gear/monocle name = "Monocle" - category = slot_glasses + category = SLOT_GLASSES path = /obj/item/clothing/glasses/monocle /datum/gear/orange name = "Orange glasses" - category = slot_glasses + category = SLOT_GLASSES path = /obj/item/clothing/glasses/orange /datum/gear/red name = "Red Glasses" - category = slot_glasses + category = SLOT_GLASSES path = /obj/item/clothing/glasses/red /datum/gear/prescription name = "Prescription glasses" - category = slot_glasses + category = SLOT_GLASSES path = /obj/item/clothing/glasses/regular diff --git a/modular_citadel/code/modules/client/loadout/gloves.dm b/modular_citadel/code/modules/client/loadout/gloves.dm index d504444506..826e809652 100644 --- a/modular_citadel/code/modules/client/loadout/gloves.dm +++ b/modular_citadel/code/modules/client/loadout/gloves.dm @@ -1,4 +1,4 @@ /datum/gear/fingerless name = "Fingerless Gloves" - category = slot_gloves + category = SLOT_GLOVES path = /obj/item/clothing/gloves/fingerless diff --git a/modular_citadel/code/modules/client/loadout/hands.dm b/modular_citadel/code/modules/client/loadout/hands.dm index 3bb58a8719..3b07ecaec5 100644 --- a/modular_citadel/code/modules/client/loadout/hands.dm +++ b/modular_citadel/code/modules/client/loadout/hands.dm @@ -1,67 +1,67 @@ /datum/gear/cane name = "Cane" - category = slot_hands + category = SLOT_HANDS path = /obj/item/cane /datum/gear/cigarettes name = "Cigarette pack" - category = slot_hands + category = SLOT_HANDS path = /obj/item/storage/fancy/cigarettes /datum/gear/dice name = "Dice bag" - category = slot_hands + category = SLOT_HANDS path = /obj/item/storage/pill_bottle/dice /datum/gear/eightball name = "Magic eightball" - category = slot_hands + category = SLOT_HANDS path = /obj/item/toy/eightball /datum/gear/matches name = "Matchbox" - category = slot_hands + category = SLOT_HANDS path = /obj/item/storage/box/matches /datum/gear/cheaplighter name = "Cheap lighter" - category = slot_hands + category = SLOT_HANDS path = /obj/item/lighter/greyscale /datum/gear/cards name = "Playing cards" - category = slot_hands + category = SLOT_HANDS path = /obj/item/toy/cards/deck /datum/gear/skub name = "Skub" - category = slot_hands + category = SLOT_HANDS path = /obj/item/skub /datum/gear/carpplushie name = "Space carp plushie" - category = slot_hands + category = SLOT_HANDS path = /obj/item/toy/plush/carpplushie /datum/gear/wallet name = "Wallet" - category = slot_hands + category = SLOT_HANDS path = /obj/item/storage/wallet /datum/gear/flask name = "Flask" - category = slot_hands + category = SLOT_HANDS path = /obj/item/reagent_containers/food/drinks/flask cost = 2 /datum/gear/zippolighter name = "Zippo Lighter" - category = slot_hands + category = SLOT_HANDS path = /obj/item/lighter cost = 2 /datum/gear/cigar name = "Cigar" - category = slot_hands + category = SLOT_HANDS path = /obj/item/clothing/mask/cigarette/cigar cost = 4 //smoking is bad mkay diff --git a/modular_citadel/code/modules/client/loadout/head.dm b/modular_citadel/code/modules/client/loadout/head.dm index 168debf2cc..45bf7a3058 100644 --- a/modular_citadel/code/modules/client/loadout/head.dm +++ b/modular_citadel/code/modules/client/loadout/head.dm @@ -1,74 +1,74 @@ /datum/gear/baseball name = "Ballcap" - category = slot_head + category = SLOT_HEAD path = /obj/item/clothing/head/soft/mime /datum/gear/beanie name = "Beanie" - category = slot_head + category = SLOT_HEAD path = /obj/item/clothing/head/beanie /datum/gear/beret name = "Black beret" - category = slot_head + category = SLOT_HEAD path = /obj/item/clothing/head/beret/black /datum/gear/flatcap name = "Flat cap" - category = slot_head + category = SLOT_HEAD path = /obj/item/clothing/head/flatcap /datum/gear/pirate name = "Pirate hat" - category = slot_head + category = SLOT_HEAD path = /obj/item/clothing/head/pirate /datum/gear/rice_hat name = "Rice hat" - category = slot_head + category = SLOT_HEAD path = /obj/item/clothing/head/rice_hat /datum/gear/ushanka name = "Ushanka" - category = slot_head + category = SLOT_HEAD path = /obj/item/clothing/head/ushanka /datum/gear/slime name = "Slime hat" - category = slot_head + category = SLOT_HEAD path = /obj/item/clothing/head/collectable/slime /datum/gear/fedora name = "Fedora" - category = slot_head + category = SLOT_HEAD path = /obj/item/clothing/head/fedora /datum/gear/that name = "Top Hat" - category = slot_head + category = SLOT_HEAD path = /obj/item/clothing/head/that //trek fancy Hats! /datum/gear/trekcap name = "Federation Officer's Cap" - category = slot_head + category = SLOT_HEAD path = /obj/item/clothing/head/caphat/formal/fedcover restricted_roles = list("Captain","Head of Personnel") /datum/gear/trekcapmedisci name = "Federation Officer's Cap" - category = slot_head + category = SLOT_HEAD path = /obj/item/clothing/head/caphat/formal/fedcover/medsci restricted_roles = list("Chief Medical Officer","Medical Doctor","Chemist","Virologist","Geneticist","Research Director","Scientist", "Roboticist") /datum/gear/trekcapeng name = "Federation Officer's Cap" - category = slot_head + category = SLOT_HEAD path = /obj/item/clothing/head/caphat/formal/fedcover/eng restricted_roles = list("Chief Engineer","Atmospheric Technician","Station Engineer","Warden","Detective","Security Officer","Head of Security","Cargo Technician", "Shaft Miner", "Quartermaster") /datum/gear/trekcapsec name = "Federation Officer's Cap" - category = slot_head + category = SLOT_HEAD path = /obj/item/clothing/head/caphat/formal/fedcover/sec restricted_roles = list("Chief Engineer","Atmospheric Technician","Station Engineer","Warden","Detective","Security Officer","Head of Security","Cargo Technician", "Shaft Miner", "Quartermaster") \ No newline at end of file diff --git a/modular_citadel/code/modules/client/loadout/mask.dm b/modular_citadel/code/modules/client/loadout/mask.dm index 5de520a20a..036e3d3795 100644 --- a/modular_citadel/code/modules/client/loadout/mask.dm +++ b/modular_citadel/code/modules/client/loadout/mask.dm @@ -1,9 +1,9 @@ /datum/gear/balaclava name = "Balaclava" - category = slot_wear_mask + category = SLOT_WEAR_MASK path = /obj/item/clothing/mask/balaclava - + /datum/gear/moustache name = "Fake moustache" - category = slot_wear_mask + category = SLOT_WEAR_MASK path = /obj/item/clothing/mask/fakemoustache diff --git a/modular_citadel/code/modules/client/loadout/neck.dm b/modular_citadel/code/modules/client/loadout/neck.dm index 5e1e0017fe..f7346ec135 100644 --- a/modular_citadel/code/modules/client/loadout/neck.dm +++ b/modular_citadel/code/modules/client/loadout/neck.dm @@ -1,84 +1,84 @@ /datum/gear/bluetie name = "Blue tie" - category = slot_neck + category = SLOT_NECK path = /obj/item/clothing/neck/tie/blue /datum/gear/redtie name = "Red tie" - category = slot_neck + category = SLOT_NECK path = /obj/item/clothing/neck/tie/red /datum/gear/blacktie name = "Black tie" - category = slot_neck + category = SLOT_NECK path = /obj/item/clothing/neck/tie/black /datum/gear/collar name = "Collar" - category = slot_neck + category = SLOT_NECK path = /obj/item/clothing/neck/petcollar /datum/gear/scarf name = "White scarf" - category = slot_neck + category = SLOT_NECK path = /obj/item/clothing/neck/scarf /datum/gear/blackscarf name = "Black scarf" - category = slot_neck + category = SLOT_NECK path = /obj/item/clothing/neck/scarf/black /datum/gear/redscarf name = "Red scarf" - category = slot_neck + category = SLOT_NECK path = /obj/item/clothing/neck/scarf/red /datum/gear/greenscarf name = "Green scarf" - category = slot_neck + category = SLOT_NECK path = /obj/item/clothing/neck/scarf/green /datum/gear/darkbluescarf name = "Dark blue scarf" - category = slot_neck + category = SLOT_NECK path = /obj/item/clothing/neck/scarf/darkblue /datum/gear/purplescarf name = "Purple scarf" - category = slot_neck + category = SLOT_NECK path = /obj/item/clothing/neck/scarf/purple /datum/gear/yellowscarf name = "Yellow scarf" - category = slot_neck + category = SLOT_NECK path = /obj/item/clothing/neck/scarf/yellow /datum/gear/orangescarf name = "Orange scarf" - category = slot_neck + category = SLOT_NECK path = /obj/item/clothing/neck/scarf/orange /datum/gear/cyanscarf name = "Cyan scarf" - category = slot_neck + category = SLOT_NECK path = /obj/item/clothing/neck/scarf/cyan /datum/gear/stripedredscarf name = "Striped red scarf" - category = slot_neck + category = SLOT_NECK path = /obj/item/clothing/neck/stripedredscarf /datum/gear/stripedbluescarf name = "Striped blue scarf" - category = slot_neck + category = SLOT_NECK path = /obj/item/clothing/neck/stripedbluescarf /datum/gear/stripedgreenscarf name = "Striped green scarf" - category = slot_neck + category = SLOT_NECK path = /obj/item/clothing/neck/stripedgreenscarf /datum/gear/headphones name = "Headphones" - category = slot_neck + category = SLOT_NECK path = /obj/item/clothing/ears/headphones diff --git a/modular_citadel/code/modules/client/loadout/shoes.dm b/modular_citadel/code/modules/client/loadout/shoes.dm index 0d233c3a5e..95675ccaeb 100644 --- a/modular_citadel/code/modules/client/loadout/shoes.dm +++ b/modular_citadel/code/modules/client/loadout/shoes.dm @@ -1,39 +1,39 @@ /datum/gear/laceup name = "Laceup shoes" - category = slot_shoes + category = SLOT_SHOES path = /obj/item/clothing/shoes/laceup /datum/gear/workboots name = "Work boots" - category = slot_shoes + category = SLOT_SHOES path = /obj/item/clothing/shoes/workboots /datum/gear/jackboots name = "Jackboots" - category = slot_shoes + category = SLOT_SHOES path = /obj/item/clothing/shoes/jackboots /datum/gear/winterboots name = "Winter boots" - category = slot_shoes + category = SLOT_SHOES path = /obj/item/clothing/shoes/winterboots /datum/gear/sandals name = "Sandals" - category = slot_shoes + category = SLOT_SHOES path = /obj/item/clothing/shoes/sandal /datum/gear/blackshoes name = "Black shoes" - category = slot_shoes + category = SLOT_SHOES path = /obj/item/clothing/shoes/sneakers/black /datum/gear/brownshoes name = "Brown shoes" - category = slot_shoes + category = SLOT_SHOES path = /obj/item/clothing/shoes/sneakers/brown /datum/gear/whiteshoes name = "White shoes" - category = slot_shoes + category = SLOT_SHOES path = /obj/item/clothing/shoes/sneakers/white diff --git a/modular_citadel/code/modules/client/loadout/suit.dm b/modular_citadel/code/modules/client/loadout/suit.dm index 85d5b5cbd0..1e1610ae75 100644 --- a/modular_citadel/code/modules/client/loadout/suit.dm +++ b/modular_citadel/code/modules/client/loadout/suit.dm @@ -1,82 +1,82 @@ /datum/gear/poncho name = "Poncho" - category = slot_wear_suit + category = SLOT_WEAR_SUIT path = /obj/item/clothing/suit/poncho /datum/gear/ponchogreen name = "Green poncho" - category = slot_wear_suit + category = SLOT_WEAR_SUIT path = /obj/item/clothing/suit/poncho/green /datum/gear/ponchored name = "Red poncho" - category = slot_wear_suit + category = SLOT_WEAR_SUIT path = /obj/item/clothing/suit/poncho/red /datum/gear/redhood name = "Red cloak" - category = slot_wear_suit + category = SLOT_WEAR_SUIT path = /obj/item/clothing/suit/hooded/cloak/david cost = 3 /datum/gear/jacketbomber name = "Bomber jacket" - category = slot_wear_suit + category = SLOT_WEAR_SUIT path = /obj/item/clothing/suit/jacket /datum/gear/jacketleather name = "Leather jacket" - category = slot_wear_suit + category = SLOT_WEAR_SUIT path = /obj/item/clothing/suit/jacket/leather /datum/gear/overcoatleather name = "Leather overcoat" - category = slot_wear_suit + category = SLOT_WEAR_SUIT path = /obj/item/clothing/suit/jacket/leather/overcoat /datum/gear/jacketpuffer name = "Puffer jacket" - category = slot_wear_suit + category = SLOT_WEAR_SUIT path = /obj/item/clothing/suit/jacket/puffer /datum/gear/vestpuffer name = "Puffer vest" - category = slot_wear_suit + category = SLOT_WEAR_SUIT path = /obj/item/clothing/suit/jacket/puffer/vest /datum/gear/jacketlettermanbrown name = "Brown letterman jacket" - category = slot_wear_suit + category = SLOT_WEAR_SUIT path = /obj/item/clothing/suit/jacket/letterman /datum/gear/jacketlettermanred name = "Red letterman jacket" - category = slot_wear_suit + category = SLOT_WEAR_SUIT path = /obj/item/clothing/suit/jacket/letterman_red /datum/gear/jacketlettermanNT name = "Nanotrasen letterman jacket" - category = slot_wear_suit + category = SLOT_WEAR_SUIT path = /obj/item/clothing/suit/jacket/letterman_nanotrasen /datum/gear/coat name = "Winter coat" - category = slot_wear_suit + category = SLOT_WEAR_SUIT path = /obj/item/clothing/suit/hooded/wintercoat /datum/gear/militaryjacket name = "Military Jacket" - category = slot_wear_suit + category = SLOT_WEAR_SUIT path = /obj/item/clothing/suit/jacket/miljacket /datum/gear/ianshirt name = "Ian Shirt" - category = slot_wear_suit + category = SLOT_WEAR_SUIT path = /obj/item/clothing/suit/ianshirt /datum/gear/trekds9_coat name = "DS9 Overcoat (use uniform)" - category = slot_wear_suit + category = SLOT_WEAR_SUIT path = /obj/item/clothing/suit/storage/trek/ds9 restricted_roles = list("Head of Security","Captain","Head of Personnel","Chief Engineer","Research Director","Chief Medical Officer","Quartermaster", "Medical Doctor","Chemist","Virologist","Geneticist","Scientist", "Roboticist", @@ -85,24 +85,24 @@ //Federation jackets from movies /datum/gear/trekcmdcap name = "fed (movie) uniform, Captain" - category = slot_wear_suit + category = SLOT_WEAR_SUIT path = /obj/item/clothing/suit/storage/fluff/fedcoat/capt restricted_roles = list("Captain","Head of Personnel") /datum/gear/trekcmdmov name = "fed (movie) uniform, sec" - category = slot_wear_suit + category = SLOT_WEAR_SUIT path = /obj/item/clothing/suit/storage/fluff/fedcoat restricted_roles = list("Head of Security","Captain","Head of Personnel","Chief Engineer","Research Director","Chief Medical Officer","Quartermaster","Warden","Detective","Security Officer") /datum/gear/trekmedscimov name = "fed (movie) uniform, med/sci" - category = slot_wear_suit + category = SLOT_WEAR_SUIT path = /obj/item/clothing/suit/storage/fluff/fedcoat/medsci restricted_roles = list("Chief Medical Officer","Medical Doctor","Chemist","Virologist","Geneticist","Research Director","Scientist", "Roboticist") /datum/gear/trekengmov name = "fed (movie) uniform, ops/eng" - category = slot_wear_suit + category = SLOT_WEAR_SUIT path = /obj/item/clothing/suit/storage/fluff/fedcoat/eng restricted_roles = list("Chief Engineer","Atmospheric Technician","Station Engineer","Cargo Technician", "Shaft Miner", "Quartermaster") diff --git a/modular_citadel/code/modules/client/loadout/uniform.dm b/modular_citadel/code/modules/client/loadout/uniform.dm index c07290cdaf..7c592c60e1 100644 --- a/modular_citadel/code/modules/client/loadout/uniform.dm +++ b/modular_citadel/code/modules/client/loadout/uniform.dm @@ -1,143 +1,143 @@ /datum/gear/suitblack name = "Black suit" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/suit_jacket /datum/gear/suitgreen name = "Green suit" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/suit_jacket/green /datum/gear/suitred name = "Red suit" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/suit_jacket/red /datum/gear/suitcharcoal name = "Charcoal suit" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/suit_jacket/charcoal /datum/gear/suitnavy name = "Navy suit" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/suit_jacket/navy /datum/gear/suitburgundy name = "Burgundy suit" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/suit_jacket/burgundy /datum/gear/suittan name = "Tan suit" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/suit_jacket/tan /datum/gear/suitwhite name = "White suit" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/suit_jacket/white /datum/gear/assistantformal name = "Assistant's formal uniform" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/assistantformal /datum/gear/maidcostume name = "Maid costume" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/maid /datum/gear/mailmanuniform name = "Mailman's jumpsuit" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/rank/mailman /datum/gear/skirtblack name = "Black skirt" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/skirt/black /datum/gear/skirtblue name = "Blue skirt" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/skirt/blue /datum/gear/skirtred name = "Red skirt" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/skirt/red /datum/gear/skirtpurple name = "Purple skirt" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/skirt/purple /datum/gear/kilt name = "Kilt" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/kilt /datum/gear/camoshorts name = "Camo Pants" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/pants/camo /datum/gear/bjeans name = "Black Jeans" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/pants/blackjeans /datum/gear/cjeans name = "Classic Jeans" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/pants/classicjeans /datum/gear/khaki name = "Khaki Pants" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/pants/khaki /datum/gear/wpants name = "White Pants" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/pants/white /datum/gear/rpants name = "Red Pants" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/pants/red /datum/gear/tpants name = "Tan Pants" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/pants/tan /datum/gear/trpants name = "Track Pants" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/pants/track /datum/gear/turtleneck name = "Tactitool Turtleneck" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/syndicate/cosmetic /datum/gear/polykilt name = "Polychromic Kilt" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/polychromic/kilt cost = 3 /datum/gear/polyshorts name = "Polychromic Shorts" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/polychromic/shorts cost = 3 /datum/gear/polyshortpants name = "Polychromic Athletic Shorts" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/polychromic/shortpants cost = 2 @@ -145,94 +145,94 @@ //TOS /datum/gear/trekcmdtos name = "TOS uniform, cmd" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/rank/trek/command restricted_roles = list("Head of Security","Captain","Head of Personnel","Chief Engineer","Research Director","Chief Medical Officer","Quartermaster") /datum/gear/trekmedscitos name = "TOS uniform, med/sci" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/rank/trek/medsci restricted_roles = list("Chief Medical Officer","Medical Doctor","Chemist","Virologist","Geneticist","Research Director","Scientist", "Roboticist") /datum/gear/trekengtos name = "TOS uniform, ops/sec" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/rank/trek/engsec restricted_roles = list("Chief Engineer","Atmospheric Technician","Station Engineer","Warden","Detective","Security Officer","Head of Security","Cargo Technician", "Shaft Miner", "Quartermaster") //TNG /datum/gear/trekcmdtng name = "TNG uniform, cmd" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/rank/trek/command/next restricted_roles = list("Head of Security","Captain","Head of Personnel","Chief Engineer","Research Director","Chief Medical Officer","Quartermaster") /datum/gear/trekmedscitng name = "TNG uniform, med/sci" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/rank/trek/medsci/next restricted_roles = list("Chief Medical Officer","Medical Doctor","Chemist","Virologist","Geneticist","Research Director","Scientist", "Roboticist") /datum/gear/trekengtng name = "TNG uniform, ops/sec" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/rank/trek/engsec/next restricted_roles = list("Chief Engineer","Atmospheric Technician","Station Engineer","Warden","Detective","Security Officer","Head of Security","Cargo Technician", "Shaft Miner", "Quartermaster") //VOY /datum/gear/trekcmdvoy name = "VOY uniform, cmd" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/rank/trek/command/voy restricted_roles = list("Head of Security","Captain","Head of Personnel","Chief Engineer","Research Director","Chief Medical Officer","Quartermaster") /datum/gear/trekmedscivoy name = "VOY uniform, med/sci" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/rank/trek/medsci/voy restricted_roles = list("Chief Medical Officer","Medical Doctor","Chemist","Virologist","Geneticist","Research Director","Scientist", "Roboticist") /datum/gear/trekengvoy name = "VOY uniform, ops/sec" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/rank/trek/engsec/voy restricted_roles = list("Chief Engineer","Atmospheric Technician","Station Engineer","Warden","Detective","Security Officer","Head of Security","Cargo Technician", "Shaft Miner", "Quartermaster") //DS9 /datum/gear/trekcmdds9 name = "DS9 uniform, cmd" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/rank/trek/command/ds9 restricted_roles = list("Head of Security","Captain","Head of Personnel","Chief Engineer","Research Director","Chief Medical Officer","Quartermaster") /datum/gear/trekmedscids9 name = "DS9 uniform, med/sci" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/rank/trek/medsci/ds9 restricted_roles = list("Chief Medical Officer","Medical Doctor","Chemist","Virologist","Geneticist","Research Director","Scientist", "Roboticist") /datum/gear/trekengds9 name = "DS9 uniform, ops/sec" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/rank/trek/engsec/ds9 restricted_roles = list("Chief Engineer","Atmospheric Technician","Station Engineer","Warden","Detective","Security Officer","Head of Security","Cargo Technician", "Shaft Miner", "Quartermaster") //ENT /datum/gear/trekcmdent name = "ENT uniform, cmd" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/rank/trek/command/ent restricted_roles = list("Head of Security","Captain","Head of Personnel","Chief Engineer","Research Director","Chief Medical Officer","Quartermaster") /datum/gear/trekmedscient name = "ENT uniform, med/sci" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/rank/trek/medsci/ent restricted_roles = list("Chief Medical Officer","Medical Doctor","Chemist","Virologist","Geneticist","Research Director","Scientist", "Roboticist") /datum/gear/trekengent name = "ENT uniform, ops/sec" - category = slot_w_uniform + category = SLOT_W_UNIFORM path = /obj/item/clothing/under/rank/trek/engsec/ent restricted_roles = list("Chief Engineer","Atmospheric Technician","Station Engineer","Warden","Detective","Security Officer","Head of Security","Cargo Technician", "Shaft Miner", "Quartermaster") diff --git a/modular_citadel/code/modules/client/preferences.dm b/modular_citadel/code/modules/client/preferences.dm index 741e6f0935..7d73fa618b 100644 --- a/modular_citadel/code/modules/client/preferences.dm +++ b/modular_citadel/code/modules/client/preferences.dm @@ -664,11 +664,11 @@ var/occupied_slots = L[slot_to_string(initial(G.category))] ? L[slot_to_string(initial(G.category))] + 1 : 1 LAZYSET(L, slot_to_string(initial(G.category)), occupied_slots) switch(slot) - if(slot_in_backpack) - if(L[slot_to_string(slot_in_backpack)] < BACKPACK_SLOT_AMT) + if(SLOT_IN_BACKPACK) + if(L[slot_to_string(SLOT_IN_BACKPACK)] < BACKPACK_SLOT_AMT) return TRUE - if(slot_hands) - if(L[slot_to_string(slot_hands)] < HANDS_SLOT_AMT) + if(SLOT_HANDS) + if(L[slot_to_string(SLOT_HANDS)] < HANDS_SLOT_AMT) return TRUE else if(L[slot_to_string(slot)] < DEFAULT_SLOT_AMT) diff --git a/modular_citadel/code/modules/custom_loadout/custom_items.dm b/modular_citadel/code/modules/custom_loadout/custom_items.dm index 481a105749..0abbba1845 100644 --- a/modular_citadel/code/modules/custom_loadout/custom_items.dm +++ b/modular_citadel/code/modules/custom_loadout/custom_items.dm @@ -290,7 +290,7 @@ H = loc if(!H) return - else if(H.get_item_by_slot(slot_neck) == src) + else if(H.get_item_by_slot(SLOT_NECK) == src) if(H.arousalloss < H.max_arousal / 3) H.arousalloss = H.max_arousal / 3 if(prob(5) && H.hallucination < 15) diff --git a/modular_citadel/code/modules/custom_loadout/load_to_mob.dm b/modular_citadel/code/modules/custom_loadout/load_to_mob.dm index c9aab1d906..0a1d8256ae 100644 --- a/modular_citadel/code/modules/custom_loadout/load_to_mob.dm +++ b/modular_citadel/code/modules/custom_loadout/load_to_mob.dm @@ -52,7 +52,7 @@ loaded_atom.forceMove(T) continue var/obj/item/loaded = loaded_atom - var/obj/item/storage/S = H.get_item_by_slot(slot_back) + var/obj/item/storage/S = H.get_item_by_slot(SLOT_BACK) if(istype(S)) S.SendSignal(COMSIG_TRY_STORAGE_INSERT,loaded, TRUE, H) //Force it into their backpack continue diff --git a/modular_citadel/cydonian_armor.dm b/modular_citadel/cydonian_armor.dm index 689165d8bb..209c2d0448 100644 --- a/modular_citadel/cydonian_armor.dm +++ b/modular_citadel/cydonian_armor.dm @@ -51,7 +51,7 @@ /obj/item/clothing/head/helmet/space/hardsuit/lavaknight/equipped(mob/user, slot) ..() - if(slot == slot_head) + if(slot == SLOT_HEAD) emissivelights() /obj/item/clothing/head/helmet/space/hardsuit/lavaknight/dropped(mob/user) @@ -113,7 +113,7 @@ /obj/item/clothing/suit/space/hardsuit/lavaknight/equipped(mob/user, slot) ..() - if(slot == slot_wear_suit) + if(slot == SLOT_WEAR_SUIT) emissivelights() /obj/item/clothing/suit/space/hardsuit/lavaknight/dropped(mob/user) From e415aac87a384e107c03f6eafed97f8d7104d319 Mon Sep 17 00:00:00 2001 From: LetterJay Date: Mon, 21 May 2018 08:38:09 -0500 Subject: [PATCH 21/63] missed one --- modular_citadel/code/modules/client/loadout/__donator.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modular_citadel/code/modules/client/loadout/__donator.dm b/modular_citadel/code/modules/client/loadout/__donator.dm index 6c2bd35020..4dc40adea0 100644 --- a/modular_citadel/code/modules/client/loadout/__donator.dm +++ b/modular_citadel/code/modules/client/loadout/__donator.dm @@ -280,7 +280,7 @@ datum/gear/darksabresheath /datum/gear/techcoat name = "Techomancers Labcoat" - category = slot_in_backpack + category = SLOT_IN_BACKPACK path = /obj/item/clothing/suit/toggle/labcoat/mad/techcoat ckeywhitelist = list("wilchen") From 6167423c8510a4121bc2f3185e8cd58ba305ed61 Mon Sep 17 00:00:00 2001 From: Tad Hardesty Date: Sat, 19 May 2018 14:06:28 -0700 Subject: [PATCH 22/63] Fix formatting when emagging an R&D console --- code/modules/research/rdconsole.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 329bbbebee..17bacc01d7 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -193,7 +193,7 @@ doesn't have toxins access. /obj/machinery/computer/rdconsole/emag_act(mob/user) if(!(obj_flags & EMAGGED)) - to_chat(user, "You disable the security protocols[locked? " and unlock the console.":""].") + to_chat(user, "You disable the security protocols[locked? " and unlock the console":""].") playsound(src, "sparks", 75, 1) obj_flags |= EMAGGED locked = FALSE From f0c99c5f9c6ab26297b194ec16d6b3c2153f7c71 Mon Sep 17 00:00:00 2001 From: LetterJay Date: Mon, 21 May 2018 12:32:44 -0500 Subject: [PATCH 24/63] Update life.dm --- code/modules/mob/living/carbon/human/life.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 3c1a03f3d6..ca6d71c00c 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -46,7 +46,7 @@ /mob/living/carbon/human/calculate_affecting_pressure(pressure) if(istype(loc, /obj/belly)) //START OF CIT CHANGES - Makes it so you don't suffocate while inside vore organs. Remind me to modularize this some time - Bhijn return ONE_ATMOSPHERE - if(istype(loc, /obj/item/device/dogborg/sleeper)) + if(istype(loc, /obj/item/dogborg/sleeper)) return ONE_ATMOSPHERE //END OF CIT CHANGES if (wear_suit && head && is_type_in_typecache(wear_suit, GLOB.typecache_clothing) && is_type_in_typecache(head, GLOB.typecache_clothing)) var/obj/item/clothing/CS = wear_suit From be6fd4f0caff15ae87b2dcb642e9b6cf58b3bd07 Mon Sep 17 00:00:00 2001 From: LetterJay Date: Mon, 21 May 2018 12:33:14 -0500 Subject: [PATCH 25/63] Update vg_hats.dm --- code/modules/clothing/head/vg_hats.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/clothing/head/vg_hats.dm b/code/modules/clothing/head/vg_hats.dm index 56844193c6..be57619a7a 100644 --- a/code/modules/clothing/head/vg_hats.dm +++ b/code/modules/clothing/head/vg_hats.dm @@ -10,7 +10,6 @@ min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT heat_protection = HEAD max_heat_protection_temperature = SPACE_HELM_MAX_TEMP_PROTECT - flags_1 = STOPSPRESSUREDMAGE_1 strip_delay = 80 dog_fashion = null icon_override = 'modular_citadel/icons/mob/citadel/head.dmi' From 5964fa07122cb166c8dfb49955d0c8c18a9e64e1 Mon Sep 17 00:00:00 2001 From: ShizCalev Date: Sun, 20 May 2018 18:28:11 -0400 Subject: [PATCH 26/63] Fixes defibillator runtime --- code/game/objects/items/defib.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index 67465320a1..875b25a9a5 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -46,11 +46,11 @@ update_charge() /obj/item/defibrillator/proc/update_power() - if(cell) - if(cell.charge < paddles.revivecost) + if(!QDELETED(cell)) + if(QDELETED(paddles) || cell.charge < paddles.revivecost) powered = FALSE else - powered = 1 + powered = TRUE else powered = FALSE @@ -67,7 +67,7 @@ /obj/item/defibrillator/proc/update_charge() if(powered) //so it doesn't show charge if it's unpowered - if(cell) + if(!QDELETED(cell)) var/ratio = cell.charge / cell.maxcharge ratio = CEILING(ratio*4, 1) * 25 add_overlay("[initial(icon_state)]-charge[ratio]") From 60b3384695d62f5bbaba19f984a7173fbd6b1cce Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Mon, 21 May 2018 17:27:15 -0400 Subject: [PATCH 28/63] Merge pull request #37965 from AnturK/whatthecommentsays Fixes fire_act working on deleted things. --- code/modules/atmospherics/environmental/LINDA_fire.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/atmospherics/environmental/LINDA_fire.dm b/code/modules/atmospherics/environmental/LINDA_fire.dm index c58d14f4d4..a3c9c68d55 100644 --- a/code/modules/atmospherics/environmental/LINDA_fire.dm +++ b/code/modules/atmospherics/environmental/LINDA_fire.dm @@ -94,7 +94,7 @@ for(var/A in location) var/atom/AT = A - if(AT && AT != src) // It's possible that the item is deleted in temperature_expose + if(!QDELETED(AT) && AT != src) // It's possible that the item is deleted in temperature_expose AT.fire_act(temperature, volume) return From 9095d482154b726c2629f560997e5dc76f8706c2 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Mon, 21 May 2018 17:28:15 -0400 Subject: [PATCH 30/63] Merge pull request #37955 from AutomaticFrenzy/patch/airlock-autoclose Keep only the most recent airlock autoclose timer --- code/game/machinery/doors/airlock.dm | 8 +++----- code/game/machinery/doors/door.dm | 5 ++++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 76a0c39021..db0a9a5866 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -1070,10 +1070,8 @@ else playsound(src.loc, 'sound/machines/airlockforced.ogg', 30, 1) - if(autoclose && normalspeed) - addtimer(CALLBACK(src, .proc/autoclose), 150) - else if(autoclose && !normalspeed) - addtimer(CALLBACK(src, .proc/autoclose), 15) + if(autoclose) + autoclose_in(normalspeed ? 150 : 15) if(!density) return TRUE @@ -1106,7 +1104,7 @@ if(safe) for(var/atom/movable/M in get_turf(src)) if(M.density && M != src) //something is blocking the door - addtimer(CALLBACK(src, .proc/autoclose), 60) + autoclose_in(60) return if(forced < 2) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 4685097de1..c7369a6d29 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -274,7 +274,7 @@ for(var/atom/movable/M in get_turf(src)) if(M.density && M != src) //something is blocking the door if(autoclose) - addtimer(CALLBACK(src, .proc/autoclose), 60) + autoclose_in(60) return operating = TRUE @@ -326,6 +326,9 @@ if(!QDELETED(src) && !density && !operating && !locked && !welded && autoclose) close() +/obj/machinery/door/proc/autoclose_in(wait) + addtimer(CALLBACK(src, .proc/autoclose), wait, TIMER_UNIQUE | TIMER_NO_HASH_WAIT | TIMER_OVERRIDE) + /obj/machinery/door/proc/requiresID() return 1 From 1766134062a9ce59084fd29298823a75b38e33e3 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Mon, 21 May 2018 17:31:02 -0400 Subject: [PATCH 32/63] Merge pull request #37943 from AutomaticFrenzy/patch/mind-over-matter Fix mindswap forcibly enabling ambient occlusion --- code/_onclick/hud/hud.dm | 4 +++- code/_onclick/hud/plane_master.dm | 1 + code/modules/client/preferences.dm | 4 +--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index a17c07357e..e4318059d6 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -196,7 +196,9 @@ screenmob.client.screen -= infodisplay for(var/thing in plane_masters) - screenmob.client.screen += plane_masters[thing] + var/obj/screen/plane_master/PM = plane_masters[thing] + PM.backdrop(screenmob) + screenmob.client.screen += PM hud_version = display_hud_version persistent_inventory_update(screenmob) diff --git a/code/_onclick/hud/plane_master.dm b/code/_onclick/hud/plane_master.dm index 84add465c6..d4559ed66d 100644 --- a/code/_onclick/hud/plane_master.dm +++ b/code/_onclick/hud/plane_master.dm @@ -29,6 +29,7 @@ blend_mode = BLEND_OVERLAY /obj/screen/plane_master/game_world/backdrop(mob/mymob) + filters = list() if(istype(mymob) && mymob.client && mymob.client.prefs && mymob.client.prefs.ambientocclusion) filters += AMBIENT_OCCLUSION diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 231d375bb3..7eb1c25455 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -1537,9 +1537,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) ambientocclusion = !ambientocclusion if(parent && parent.screen && parent.screen.len) var/obj/screen/plane_master/game_world/PM = locate(/obj/screen/plane_master/game_world) in parent.screen - PM.filters -= AMBIENT_OCCLUSION - if(ambientocclusion) - PM.filters += AMBIENT_OCCLUSION + PM.backdrop(parent.mob) if("save") save_preferences() From a3c3052f258635b057c0e3320124d2f177323bfe Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Mon, 21 May 2018 17:31:49 -0400 Subject: [PATCH 34/63] Merge pull request #37961 from AutomaticFrenzy/patch/ai-firelock Enable admin AI interaction for firelocks --- code/game/machinery/doors/firedoor.dm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 3f26e7d80d..4a2df11151 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -144,9 +144,7 @@ else close() -/obj/machinery/door/firedoor/interact(mob/user) - if(!issilicon(user)) - return TRUE +/obj/machinery/door/firedoor/attack_ai(mob/user) add_fingerprint(user) if(welded || operating || stat & NOPOWER) return TRUE @@ -156,6 +154,9 @@ close() return TRUE +/obj/machinery/door/firedoor/attack_robot(mob/user) + return attack_ai(user) + /obj/machinery/door/firedoor/attack_alien(mob/user) add_fingerprint(user) if(welded) From ec14a7c7ef2cc01b0c36ddaf896acb07dc67dcff Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Mon, 21 May 2018 17:33:32 -0400 Subject: [PATCH 36/63] Merge pull request #37944 from AutomaticFrenzy/patch/irv-jquery Remove second copy of jQuery used only by IRV polls --- code/modules/admin/create_poll.dm | 2 +- code/modules/client/asset_cache.dm | 7 ++++++- code/modules/mob/dead/new_player/new_player.dm | 1 + code/modules/mob/dead/new_player/poll.dm | 4 ++-- html/IRV/jquery-1.10.2.min.js | 6 ------ 5 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 html/IRV/jquery-1.10.2.min.js diff --git a/code/modules/admin/create_poll.dm b/code/modules/admin/create_poll.dm index b1cda46ece..90fd6c66c9 100644 --- a/code/modules/admin/create_poll.dm +++ b/code/modules/admin/create_poll.dm @@ -73,7 +73,7 @@ if(!option) return option = sanitizeSQL(option) - var/default_percentage_calc + var/default_percentage_calc = 0 if(polltype != POLLTYPE_IRV) switch(alert("Should this option be included by default when poll result percentages are generated?",,"Yes","No","Cancel")) if("Yes") diff --git a/code/modules/client/asset_cache.dm b/code/modules/client/asset_cache.dm index d3c09b2348..28a3ec23b9 100644 --- a/code/modules/client/asset_cache.dm +++ b/code/modules/client/asset_cache.dm @@ -467,7 +467,12 @@ GLOBAL_LIST_EMPTY(asset_datums) /datum/asset/simple/IRV assets = list( "jquery-ui.custom-core-widgit-mouse-sortable-min.js" = 'html/IRV/jquery-ui.custom-core-widgit-mouse-sortable-min.js', - "jquery-1.10.2.min.js" = 'html/IRV/jquery-1.10.2.min.js' + ) + +/datum/asset/group/IRV + children = list( + /datum/asset/simple/jquery, + /datum/asset/simple/IRV ) /datum/asset/simple/changelog diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index c6cc8a70ac..9de78d307d 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -234,6 +234,7 @@ if(POLLTYPE_IRV) if (!href_list["IRVdata"]) to_chat(src, "No ordering data found. Please try again or contact an administrator.") + return var/list/votelist = splittext(href_list["IRVdata"], ",") if (!vote_on_irv_poll(pollid, votelist)) to_chat(src, "Vote failed, please try again or contact an administrator.") diff --git a/code/modules/mob/dead/new_player/poll.dm b/code/modules/mob/dead/new_player/poll.dm index d10e32a887..ce710e5186 100644 --- a/code/modules/mob/dead/new_player/poll.dm +++ b/code/modules/mob/dead/new_player/poll.dm @@ -211,7 +211,7 @@ src << browse(null ,"window=playerpolllist") src << browse(output,"window=playerpoll;size=500x250") if(POLLTYPE_IRV) - var/datum/asset/irv_assets = get_asset_datum(/datum/asset/simple/IRV) + var/datum/asset/irv_assets = get_asset_datum(/datum/asset/group/IRV) irv_assets.send(src) var/datum/DBQuery/query_irv_get_votes = SSdbcore.NewQuery("SELECT optionid FROM [format_table_name("poll_vote")] WHERE pollid = [pollid] AND ckey = '[ckey]'") @@ -267,7 +267,7 @@ - +