diff --git a/_maps/map_files/Deltastation/DeltaStation2.dmm b/_maps/map_files/Deltastation/DeltaStation2.dmm index eebc5fe6395..71cb98ff774 100644 --- a/_maps/map_files/Deltastation/DeltaStation2.dmm +++ b/_maps/map_files/Deltastation/DeltaStation2.dmm @@ -87123,9 +87123,7 @@ /obj/effect/turf_decal/stripes/line{ dir = 1 }, -/obj/machinery/atmospherics/components/unary/vent_pump/on/layer3{ - dir = 1 - }, +/obj/machinery/atmospherics/pipe/simple/supply/hidden/layer3, /turf/open/floor/plasteel, /area/medical/surgery) "dmf" = ( @@ -108126,9 +108124,7 @@ /turf/open/floor/plasteel, /area/engine/gravity_generator) "eNA" = ( -/obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer1{ - dir = 1 - }, +/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1, /turf/open/floor/plasteel/white, /area/medical/surgery/room_b) "eRh" = ( @@ -111076,6 +111072,12 @@ }, /turf/open/floor/plasteel/white, /area/medical/medbay/central) +"nJq" = ( +/obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer1{ + dir = 1 + }, +/turf/open/floor/plasteel/white, +/area/medical/surgery/room_b) "nLd" = ( /obj/structure/cable, /obj/machinery/atmospherics/pipe/simple/supply/hidden/layer3, @@ -113035,6 +113037,22 @@ }, /turf/open/floor/plasteel, /area/vacant_room/commissary) +"tyl" = ( +/obj/effect/turf_decal/tile/neutral{ + dir = 1 + }, +/obj/effect/turf_decal/tile/neutral, +/obj/effect/turf_decal/tile/neutral{ + dir = 4 + }, +/obj/effect/turf_decal/tile/neutral{ + dir = 8 + }, +/obj/machinery/atmospherics/components/unary/vent_pump/on/layer3{ + dir = 1 + }, +/turf/open/floor/plasteel/dark, +/area/medical/surgery) "tzj" = ( /obj/machinery/door/airlock/external{ name = "Security External Airlock"; @@ -113599,6 +113617,23 @@ /obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden/layer1, /turf/open/floor/plasteel, /area/security/prison) +"uTf" = ( +/obj/structure/chair, +/obj/effect/turf_decal/tile/neutral{ + dir = 1 + }, +/obj/effect/turf_decal/tile/neutral, +/obj/effect/turf_decal/tile/neutral{ + dir = 4 + }, +/obj/effect/turf_decal/tile/neutral{ + dir = 8 + }, +/obj/machinery/airalarm{ + pixel_y = 22 + }, +/turf/open/floor/plasteel/dark, +/area/medical/surgery) "uTQ" = ( /obj/effect/decal/cleanable/dirt, /turf/open/floor/plasteel, @@ -114431,6 +114466,10 @@ dir = 8 }, /obj/effect/turf_decal/tile/blue, +/obj/machinery/airalarm{ + dir = 1; + pixel_y = -22 + }, /turf/open/floor/plasteel/white, /area/medical/surgery/room_b) "xAi" = ( @@ -162402,7 +162441,7 @@ dCO uxC wZq eNA -dEe +nJq xzY vFc dLo @@ -162645,7 +162684,7 @@ dhq diJ dkv dma -dnG +uTf dnG dro dsN @@ -163416,7 +163455,7 @@ cPv diM dkE dme -dnD +tyl dnG dro dsQ diff --git a/code/__DEFINES/actionspeed_modification.dm b/code/__DEFINES/actionspeed_modification.dm new file mode 100644 index 00000000000..40fbd3fe26d --- /dev/null +++ b/code/__DEFINES/actionspeed_modification.dm @@ -0,0 +1,2 @@ +//ids +#define ACTIONSPEED_ID_SANITY "sanity_component" diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index 4cf19b1be17..1f9976bdbae 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -130,7 +130,7 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 #define ZAP_MOB_DAMAGE (1<<3) #define ZAP_MOB_STUN (1<<4) -#define ZAP_DEFAULT_FLAGS ALL +#define ZAP_DEFAULT_FLAGS ZAP_MOB_STUN | ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE #define ZAP_FUSION_FLAGS ZAP_OBJ_DAMAGE | ZAP_MOB_DAMAGE | ZAP_MOB_STUN #define ZAP_SUPERMATTER_FLAGS NONE diff --git a/code/__DEFINES/reagents.dm b/code/__DEFINES/reagents.dm index 7d162833a37..70a5c5908f5 100644 --- a/code/__DEFINES/reagents.dm +++ b/code/__DEFINES/reagents.dm @@ -16,12 +16,17 @@ // Is an open container for all intents and purposes. #define OPENCONTAINER (REFILLABLE | DRAINABLE | TRANSPARENT) - -#define TOUCH 1 // splashing -#define INGEST 2 // ingestion -#define VAPOR 3 // foam, spray, blob attack -#define PATCH 4 // patches -#define INJECT 5 // injection +// Reagent exposure methods. +/// Used for splashing. +#define TOUCH (1<<0) +/// Used for ingesting the reagents. Food, drinks, inhaling smoke. +#define INGEST (1<<1) +/// Used by foams, sprays, and blob attacks. +#define VAPOR (1<<2) +/// Used by medical patches and gels. +#define PATCH (1<<3) +/// Used for direct injection of reagents. +#define INJECT (1<<4) //defines passed through to the on_reagent_change proc diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index 55346f4f153..9762b0e7c92 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -264,7 +264,7 @@ GLOBAL_LIST_EMPTY(species_list) if(holding) holdingnull = FALSE //Users hand started holding something, check to see if it's still holding that - delay *= user.do_after_coefficent() + delay *= user.cached_multiplicative_actions_slowdown var/datum/progressbar/progbar if(progress) @@ -318,9 +318,6 @@ GLOBAL_LIST_EMPTY(species_list) LAZYREMOVE(user.do_afters, target) LAZYREMOVE(target.targeted_by, user) -/mob/proc/do_after_coefficent() // This gets added to the delay on a do_after, default 1 - . = 1 - return ///Timed action involving at least one mob user and a list of targets. /proc/do_after_mob(mob/user, list/targets, time = 3 SECONDS, uninterruptible = FALSE, progress = TRUE, datum/callback/extra_checks, required_mobility_flags = MOBILITY_STAND) @@ -332,6 +329,8 @@ GLOBAL_LIST_EMPTY(species_list) return FALSE var/user_loc = user.loc + time *= user.cached_multiplicative_actions_slowdown + var/drifting = FALSE if(!user.Process_Spacemove(0) && user.inertia_dir) drifting = TRUE diff --git a/code/datums/components/crafting/recipes.dm b/code/datums/components/crafting/recipes.dm index 2079f5c4d95..7d735e92eac 100644 --- a/code/datums/components/crafting/recipes.dm +++ b/code/datums/components/crafting/recipes.dm @@ -363,15 +363,6 @@ category = CAT_WEAPONRY subcategory = CAT_WEAPON -/datum/crafting_recipe/spooky_camera - name = "Camera Obscura" - result = /obj/item/camera/spooky - time = 15 - reqs = list(/obj/item/camera = 1, - /datum/reagent/water/holywater = 10) - parts = list(/obj/item/camera = 1) - category = CAT_MISC - /datum/crafting_recipe/lizardhat name = "Lizard Cloche Hat" result = /obj/item/clothing/head/lizard @@ -394,6 +385,35 @@ /obj/item/organ/ears/cat = 1) category = CAT_CLOTHING +/datum/crafting_recipe/mixedbouquet + name = "Mixed bouquet" + result = /obj/item/bouquet + reqs = list(/obj/item/reagent_containers/food/snacks/grown/poppy/lily =2, + /obj/item/grown/sunflower = 2, + /obj/item/reagent_containers/food/snacks/grown/poppy/geranium = 2) + category = CAT_MISC + +/datum/crafting_recipe/sunbouquet + name = "Sunflower bouquet" + result = /obj/item/bouquet/sunflower + reqs = list(/obj/item/grown/sunflower = 6) + category = CAT_MISC + +/datum/crafting_recipe/poppybouquet + name = "Poppy bouquet" + result = /obj/item/bouquet/poppy + reqs = list (/obj/item/reagent_containers/food/snacks/grown/poppy = 6) + category = CAT_MISC + +/datum/crafting_recipe/spooky_camera + name = "Camera Obscura" + result = /obj/item/camera/spooky + time = 15 + reqs = list(/obj/item/camera = 1, + /datum/reagent/water/holywater = 10) + parts = list(/obj/item/camera = 1) + category = CAT_MISC + /datum/crafting_recipe/skateboard name = "Skateboard" result = /obj/vehicle/ridden/scooter/skateboard diff --git a/code/datums/components/food/edible.dm b/code/datums/components/food/edible.dm index 58580674dde..10b645b001c 100644 --- a/code/datums/components/food/edible.dm +++ b/code/datums/components/food/edible.dm @@ -216,7 +216,7 @@ Behavior that's still missing from this component that original food items had t if(owner.reagents.total_volume) SEND_SIGNAL(parent, COMSIG_FOOD_EATEN, eater, feeder) var/fraction = min(bite_consumption / owner.reagents.total_volume, 1) - owner.reagents.trans_to(eater, bite_consumption, transfered_by = feeder, method = INGEST) + owner.reagents.trans_to(eater, bite_consumption, transfered_by = feeder, methods = INGEST) bitecount++ On_Consume(eater) checkLiked(fraction, eater) diff --git a/code/datums/components/mood.dm b/code/datums/components/mood.dm index b39d4b417a1..65da13931e7 100644 --- a/code/datums/components/mood.dm +++ b/code/datums/components/mood.dm @@ -208,26 +208,32 @@ if(SANITY_INSANE to SANITY_CRAZY) setInsanityEffect(MAJOR_INSANITY_PEN) master.add_movespeed_modifier(/datum/movespeed_modifier/sanity/insane) + master.add_actionspeed_modifier(/datum/actionspeed_modifier/low_sanity) sanity_level = 6 if(SANITY_CRAZY to SANITY_UNSTABLE) setInsanityEffect(MINOR_INSANITY_PEN) master.add_movespeed_modifier(/datum/movespeed_modifier/sanity/crazy) + master.add_actionspeed_modifier(/datum/actionspeed_modifier/low_sanity) sanity_level = 5 if(SANITY_UNSTABLE to SANITY_DISTURBED) setInsanityEffect(0) master.add_movespeed_modifier(/datum/movespeed_modifier/sanity/disturbed) + master.add_actionspeed_modifier(/datum/actionspeed_modifier/low_sanity) sanity_level = 4 if(SANITY_DISTURBED to SANITY_NEUTRAL) setInsanityEffect(0) master.remove_movespeed_modifier(MOVESPEED_ID_SANITY) + master.remove_actionspeed_modifier(ACTIONSPEED_ID_SANITY) sanity_level = 3 if(SANITY_NEUTRAL+1 to SANITY_GREAT+1) //shitty hack but +1 to prevent it from responding to super small differences setInsanityEffect(0) master.remove_movespeed_modifier(MOVESPEED_ID_SANITY) + master.add_actionspeed_modifier(/datum/actionspeed_modifier/high_sanity) sanity_level = 2 if(SANITY_GREAT+1 to INFINITY) setInsanityEffect(0) master.remove_movespeed_modifier(MOVESPEED_ID_SANITY) + master.add_actionspeed_modifier(/datum/actionspeed_modifier/high_sanity) sanity_level = 1 update_mood_icon() diff --git a/code/datums/status_effects/status_effect.dm b/code/datums/status_effects/status_effect.dm index c0ffc35e788..3130dd9a749 100644 --- a/code/datums/status_effects/status_effect.dm +++ b/code/datums/status_effects/status_effect.dm @@ -73,10 +73,6 @@ return duration = world.time + original_duration -//do_after modifier! -/datum/status_effect/proc/interact_speed_modifier() - return 1 - //clickdelay/nextmove modifiers! /datum/status_effect/proc/nextmove_modifier() return 1 diff --git a/code/datums/status_effects/wound_effects.dm b/code/datums/status_effects/wound_effects.dm index 90da3e61833..51db0a3038b 100644 --- a/code/datums/status_effects/wound_effects.dm +++ b/code/datums/status_effects/wound_effects.dm @@ -145,14 +145,25 @@ // bones /datum/status_effect/wound/blunt -/datum/status_effect/wound/blunt/interact_speed_modifier() - var/mob/living/carbon/C = owner +/datum/status_effect/wound/blunt/on_apply() + . = ..() + RegisterSignal(owner, COMSIG_MOB_SWAP_HANDS, .proc/on_swap_hands) + on_swap_hands() - if(C.get_active_hand() == linked_limb) - to_chat(C, "The [lowertext(linked_wound)] in your [linked_limb.name] slows your progress!") - return linked_wound.interaction_efficiency_penalty +/datum/status_effect/wound/blunt/on_remove() + . = ..() + UnregisterSignal(owner, COMSIG_MOB_SWAP_HANDS) + var/mob/living/carbon/wound_owner = owner + wound_owner.remove_actionspeed_modifier(/datum/actionspeed_modifier/blunt_wound) - return 1 +/datum/status_effect/wound/blunt/proc/on_swap_hands() + SIGNAL_HANDLER + + var/mob/living/carbon/wound_owner = owner + if(wound_owner.get_active_hand() == linked_limb) + wound_owner.add_actionspeed_modifier(/datum/actionspeed_modifier/blunt_wound, (linked_wound.interaction_efficiency_penalty - 1)) + else + wound_owner.remove_actionspeed_modifier(/datum/actionspeed_modifier/blunt_wound) /datum/status_effect/wound/blunt/nextmove_modifier() var/mob/living/carbon/C = owner diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 5f097d46646..7e295e075ec 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -484,12 +484,12 @@ * Arguments: * - [reagents][/list]: The list of reagents the atom is being exposed to. * - [source][/datum/reagents]: The reagent holder the reagents are being sourced from. - * - method: How the atom is being exposed to the reagents. + * - methods: How the atom is being exposed to the reagents. Bitflags. * - volume_modifier: Volume multiplier. * - show_message: Whether to display anything to mobs when they are exposed. */ -/atom/proc/expose_reagents(list/reagents, datum/reagents/source, method=TOUCH, volume_modifier=1, show_message=TRUE) - if((. = SEND_SIGNAL(src, COMSIG_ATOM_EXPOSE_REAGENTS, reagents, source, method, volume_modifier, show_message)) & COMPONENT_NO_EXPOSE_REAGENTS) +/atom/proc/expose_reagents(list/reagents, datum/reagents/source, methods=TOUCH, volume_modifier=1, show_message=TRUE) + if((. = SEND_SIGNAL(src, COMSIG_ATOM_EXPOSE_REAGENTS, reagents, source, methods, volume_modifier, show_message)) & COMPONENT_NO_EXPOSE_REAGENTS) return for(var/reagent in reagents) diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 5ef0eb2bf6e..87d83bc2f60 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -306,7 +306,7 @@ if(chem in spray_chems) var/datum/reagents/holder = new() holder.add_reagent(chem_buttons[chem], 10) //I hope this is the correct way to do this. - holder.trans_to(occupant, 10, method = VAPOR) + holder.trans_to(occupant, 10, methods = VAPOR) playsound(src.loc, 'sound/effects/spray2.ogg', 50, TRUE, -6) if(user) log_combat(user, occupant, "sprayed [chem] into", addition = "via [src]") diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index 8444cac305a..8e57ad9f498 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -138,7 +138,7 @@ if(istype(beaker, /obj/item/reagent_containers/blood)) // speed up transfer on blood packs transfer_amount *= 2 - beaker.reagents.trans_to(attached, transfer_amount, method = INJECT, show_message = FALSE) //make reagents reacts, but don't spam messages + beaker.reagents.trans_to(attached, transfer_amount, methods = INJECT, show_message = FALSE) //make reagents reacts, but don't spam messages update_icon() // Take blood diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm index eec39abcda1..0f6fe31d445 100644 --- a/code/game/mecha/equipment/tools/medical_tools.dm +++ b/code/game/mecha/equipment/tools/medical_tools.dm @@ -334,7 +334,7 @@ R += "[A.name] ([num2text(A.volume)]" mechsyringe.icon_state = initial(mechsyringe.icon_state) mechsyringe.icon = initial(mechsyringe.icon) - mechsyringe.reagents.trans_to(M, mechsyringe.reagents.total_volume, transfered_by = originaloccupant, method = INJECT) + mechsyringe.reagents.trans_to(M, mechsyringe.reagents.total_volume, transfered_by = originaloccupant, methods = INJECT) M.take_bodypart_damage(2) log_combat(originaloccupant, M, "shot", "syringegun") break diff --git a/code/game/objects/items/charter.dm b/code/game/objects/items/charter.dm index 1ac7d514dfb..d62c2ac9ce6 100644 --- a/code/game/objects/items/charter.dm +++ b/code/game/objects/items/charter.dm @@ -60,6 +60,10 @@ // Autoapproves after a certain time response_timer_id = addtimer(CALLBACK(src, .proc/rename_station, new_name, user.name, user.real_name, key_name(user)), approval_time, TIMER_STOPPABLE) to_chat(GLOB.admins, "CUSTOM STATION RENAME:[ADMIN_LOOKUPFLW(user)] proposes to rename the [name_type] to [new_name] (will autoapprove in [DisplayTimeText(approval_time)]). [ADMIN_SMITE(user)] (REJECT) [ADMIN_CENTCOM_REPLY(user)]") + for(var/client/admin_client in GLOB.admins) + if(admin_client.prefs.toggles & SOUND_ADMINHELP) + window_flash(admin_client, ignorepref = TRUE) + SEND_SOUND(admin_client, sound('sound/effects/gong.ogg')) /obj/item/station_charter/proc/reject_proposed(user) if(!user) diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index 37e179fc2ea..31702bffe7a 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -428,7 +428,7 @@ if(affected_turfs.len) fraction /= affected_turfs.len for(var/t in affected_turfs) - reagents.trans_to(t, ., volume_multiplier, transfered_by = user, method = TOUCH) + reagents.trans_to(t, ., volume_multiplier, transfered_by = user, methods = TOUCH) check_empty(user) /obj/item/toy/crayon/attack(mob/M, mob/user) @@ -447,7 +447,7 @@ var/eaten = use_charges(user, 5, FALSE) if(check_empty(user)) //Prevents divsion by zero return - reagents.trans_to(M, eaten, volume_multiplier, transfered_by = user, method = INGEST) + reagents.trans_to(M, eaten, volume_multiplier, transfered_by = user, methods = INGEST) // check_empty() is called during afterattack else ..() @@ -671,7 +671,7 @@ H.lip_color = paint_color H.update_body() var/used = use_charges(user, 10, FALSE) - reagents.trans_to(user, used, volume_multiplier, transfered_by = user, method = VAPOR) + reagents.trans_to(user, used, volume_multiplier, transfered_by = user, methods = VAPOR) return (OXYLOSS) @@ -738,7 +738,7 @@ else target.set_opacity(initial(target.opacity)) . = use_charges(user, 2) - reagents.trans_to(target, ., volume_multiplier, transfered_by = user, method = VAPOR) + reagents.trans_to(target, ., volume_multiplier, transfered_by = user, methods = VAPOR) if(pre_noise || post_noise) playsound(user.loc, 'sound/effects/spray.ogg', 5, TRUE, 5) diff --git a/code/game/objects/items/debug_items.dm b/code/game/objects/items/debug_items.dm index c1133fabfe9..865eae08afc 100644 --- a/code/game/objects/items/debug_items.dm +++ b/code/game/objects/items/debug_items.dm @@ -26,7 +26,7 @@ /obj/item/debug/omnitool name = "omnitool" - desc = "The original hypertool, born before them all. Use it in hand to unleash it's true power." + desc = "The original hypertool, born before them all. Use it in hand to unleash its true power." icon = 'icons/obj/device.dmi' icon_state = "hypertool" inhand_icon_state = "hypertool" diff --git a/code/game/objects/items/devices/portable_chem_mixer.dm b/code/game/objects/items/devices/portable_chem_mixer.dm index 5f600721216..3fdf73ee3b5 100644 --- a/code/game/objects/items/devices/portable_chem_mixer.dm +++ b/code/game/objects/items/devices/portable_chem_mixer.dm @@ -1,6 +1,6 @@ /obj/item/storage/portable_chem_mixer name = "Portable Chemical Mixer" - desc = "A portable device that dispenses and mixes chemicals. Requires a vortex anomaly core. All necessary reagents need to be supplied with beakers. A label indicates that a screwdriver is required to open it for refills. This device can be worn on a belt. The letters 'S&T' are imprinted on the side." + desc = "A portable device that dispenses and mixes chemicals. All necessary reagents need to be supplied with beakers. A label indicates that a screwdriver is required to open it for refills. This device can be worn on a belt. The letters 'S&T' are imprinted on the side." icon = 'icons/obj/chemical.dmi' icon_state = "portablechemicalmixer_open" worn_icon_state = "portable_chem_mixer" @@ -13,8 +13,6 @@ var/obj/item/reagent_containers/beaker = null ///Creating an empty slot for a beaker that can be added to dispense into var/amount = 30 ///The amount of reagent that is to be dispensed currently - var/anomaly_core_present = FALSE ///TRUE if an anomaly core has been added - var/list/dispensable_reagents = list() ///List in which all currently dispensable reagents go /obj/item/storage/portable_chem_mixer/ComponentInitialize() @@ -36,14 +34,6 @@ ..() /obj/item/storage/portable_chem_mixer/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/assembly/signaler/anomaly/vortex) && !anomaly_core_present) - anomaly_core_present = TRUE - QDEL_NULL(I) - to_chat(user, "You insert the vortex anomaly core. The device is now functional. A screwdriver is needed to open and close the device for refills.") - return - if(!anomaly_core_present) - to_chat(user, "A vortex anomaly core has to be inserted to activate this device.") - return var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED) if (I.tool_behaviour == TOOL_SCREWDRIVER) SEND_SIGNAL(src, COMSIG_TRY_STORAGE_SET_LOCKSTATE, !locked) @@ -122,19 +112,13 @@ return TRUE /obj/item/storage/portable_chem_mixer/attack_hand(mob/user) - if(!anomaly_core_present) - to_chat(user, "A vortex anomaly core has to be inserted to activate this device.") - else if(loc == user) - var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED) - if (locked) - ui_interact(user) - return - return ..() + if (loc != user) + return ..() + if(SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED)) + ui_interact(user) + return /obj/item/storage/portable_chem_mixer/attack_self(mob/user) - if(!anomaly_core_present) - to_chat(user, "A vortex anomaly core has to be inserted to activate this device.") - return if(loc == user) var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED) if (locked) diff --git a/code/game/objects/items/miscellaneous.dm b/code/game/objects/items/miscellaneous.dm index eb107d939c5..fcf2793596c 100644 --- a/code/game/objects/items/miscellaneous.dm +++ b/code/game/objects/items/miscellaneous.dm @@ -218,3 +218,20 @@ /obj/item/virgin_mary/proc/manual_suicide(mob/living/user) user.adjustOxyLoss(200) user.death(0) + +// Bouquets +/obj/item/bouquet + name = "mixed bouquet" + desc = "A bouquet of sunflowers, lilies, and geraniums. How delightful." + icon = 'icons/obj/items_and_weapons.dmi' + icon_state = "mixedbouquet" + +/obj/item/bouquet/sunflower + name = "sunflower bouquet" + desc = "A bright bouquet of sunflowers." + icon_state = "sunbouquet" + +/obj/item/bouquet/poppy + name = "poppy bouquet" + desc = "A bouquet of poppies. You feel loved just looking at it." + icon_state = "poppybouquet" diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index f315f7f9d84..605a7473654 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -223,9 +223,9 @@ for(var/obj/item/mop/cyborg/M in R.module.modules) R.module.remove_module(M, TRUE) - var/obj/item/mop/advanced/cyborg/A = new /obj/item/mop/advanced/cyborg(R.module) - R.module.basic_modules += A - R.module.add_module(A, FALSE, TRUE) + var/obj/item/mop/advanced/cyborg/mop = new /obj/item/mop/advanced/cyborg(R.module) + R.module.basic_modules += mop + R.module.add_module(mop, FALSE, TRUE) /obj/item/borg/upgrade/amop/deactivate(mob/living/silicon/robot/R, user = usr) . = ..() diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index fe5a542b76b..4f0ad8646d0 100644 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -370,6 +370,13 @@ /obj/item/clothing/mask/luchador )) +/obj/item/storage/belt/cummerbund + name = "cummerbund" + desc = "A pleated sash that pairs well with a suit jacket." + icon_state = "cummerbund" + inhand_icon_state = "cummerbund" + worn_icon_state = "cummerbund" + /obj/item/storage/belt/military name = "chest rig" desc = "A set of tactical webbing worn by Syndicate boarding parties." diff --git a/code/game/objects/items/tanks/watertank.dm b/code/game/objects/items/tanks/watertank.dm index 4cfc6cc5bd7..ce2b709512a 100644 --- a/code/game/objects/items/tanks/watertank.dm +++ b/code/game/objects/items/tanks/watertank.dm @@ -419,7 +419,7 @@ return var/used_amount = injection_amount/usage_ratio - reagents.trans_to(user,used_amount,multiplier=usage_ratio, method = INJECT) + reagents.trans_to(user,used_amount,multiplier=usage_ratio, methods = INJECT) update_icon() user.update_inv_back() //for overlays update diff --git a/code/game/objects/items/tools/crowbar.dm b/code/game/objects/items/tools/crowbar.dm index 4c8e9b19d59..2bddddf6d85 100644 --- a/code/game/objects/items/tools/crowbar.dm +++ b/code/game/objects/items/tools/crowbar.dm @@ -68,7 +68,7 @@ /obj/item/crowbar/power/syndicate name = "Syndicate jaws of life" - desc = "A rengineered copy of Nanotrasen's standard jaws of life. Can be used to force open airlocks in it's crowbar configuration." + desc = "A re-engineered copy of Nanotrasen's standard jaws of life. Can be used to force open airlocks in its crowbar configuration." icon_state = "jaws_pry_syndie" toolspeed = 0.5 force_opens = TRUE diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 920f463d247..4d1126983e8 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -361,7 +361,7 @@ . += custom_fire_overlay ? custom_fire_overlay : GLOB.fire_overlay /// Handles exposing an object to reagents. -/obj/expose_reagents(list/reagents, datum/reagents/source, method=TOUCH, volume_modifier=1, show_message=TRUE) +/obj/expose_reagents(list/reagents, datum/reagents/source, methods=TOUCH, volume_modifier=1, show_message=TRUE) if((. = ..()) & COMPONENT_NO_EXPOSE_REAGENTS) return diff --git a/code/game/objects/structures/votingbox.dm b/code/game/objects/structures/votingbox.dm index 4416a09e36a..b62bb572a92 100644 --- a/code/game/objects/structures/votingbox.dm +++ b/code/game/objects/structures/votingbox.dm @@ -17,6 +17,7 @@ var/vote_description = "" var/list/voted //List of ID's that already voted. + COOLDOWN_DECLARE(vote_print_cooldown) /obj/structure/votebox/attackby(obj/item/I, mob/living/user, params) if(istype(I,/obj/item/card/id)) @@ -60,6 +61,8 @@ return var/mob/user = usr + if(!can_interact(user)) + return if(!is_operator(user)) to_chat(user,"Voting box operator authorization required!") return @@ -171,7 +174,9 @@ else results[text] += 1 sortTim(results, cmp=/proc/cmp_numeric_dsc, associative = TRUE) - + if(!COOLDOWN_FINISHED(src, vote_print_cooldown)) + return + COOLDOWN_START(src, vote_print_cooldown, 60 SECONDS) var/obj/item/paper/P = new(drop_location()) var/list/tally = list() tally += {" diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 48c9cb562c9..fba202d2544 100755 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -584,7 +584,7 @@ GLOBAL_LIST_EMPTY(station_turfs) . = BULLET_ACT_TURF /// Handles exposing a turf to reagents. -/turf/expose_reagents(list/reagents, datum/reagents/source, method=TOUCH, volume_modifier=1, show_message=TRUE) +/turf/expose_reagents(list/reagents, datum/reagents/source, methods=TOUCH, volume_modifier=1, show_message=TRUE) if((. = ..()) & COMPONENT_NO_EXPOSE_REAGENTS) return diff --git a/code/modules/actionspeed/_actionspeed_modifier.dm b/code/modules/actionspeed/_actionspeed_modifier.dm new file mode 100644 index 00000000000..fe244e66532 --- /dev/null +++ b/code/modules/actionspeed/_actionspeed_modifier.dm @@ -0,0 +1,175 @@ +/*! Actionspeed modification datums. + + How action speed for mobs works + +Action speed is now calculated by using modifier datums which are added to mobs. Some of them (nonvariable ones) are globally cached, the variable ones are instanced and changed based on need. + +This gives us the ability to have multiple sources of actionspeed, reliabily keep them applied and remove them when they should be + +THey can have unique sources and a bunch of extra fancy flags that control behaviour + +Previously trying to update action speed was a shot in the dark that usually meant mobs got stuck going faster or slower + +Actionspeed modification list is a simple key = datum system. Key will be the datum's ID if it is overridden to not be null, or type if it is not. + +DO NOT override datum IDs unless you are going to have multiple types that must overwrite each other. It's more efficient to use types, ID functionality is only kept for cases where dynamic creation of modifiers need to be done. + +When update actionspeed is called, the list of items is iterated, according to flags priority and a bunch of conditions +this spits out a final calculated value which is used as a modifer to last_move + modifier for calculating when a mob +can next move + +*/ + +/datum/actionspeed_modifier + /// Whether or not this is a variable modifier. Variable modifiers can NOT be ever auto-cached. ONLY CHECKED VIA INITIAL(), EFFECTIVELY READ ONLY (and for very good reason) + var/variable = FALSE + + /// Unique ID. You can never have different modifications with the same ID. By default, this SHOULD NOT be set. Only set it for cases where you're dynamically making modifiers/need to have two types overwrite each other. If unset, uses path (converted to text) as ID. + var/id + + /// Higher ones override lower priorities. This is NOT used for ID, ID must be unique, if it isn't unique the newer one overwrites automatically if overriding. + var/priority = 0 + var/flags = NONE + + /// Multiplicative slowdown + var/multiplicative_slowdown = 0 + + /// Other modification datums this conflicts with. + var/conflicts_with + +/datum/actionspeed_modifier/New() + . = ..() + if(!id) + id = "[type]" //We turn the path into a string. + +GLOBAL_LIST_EMPTY(actionspeed_modification_cache) + +/// Grabs a STATIC MODIFIER datum from cache. YOU MUST NEVER EDIT THESE DATUMS, OR IT WILL AFFECT ANYTHING ELSE USING IT TOO! +/proc/get_cached_actionspeed_modifier(modtype) + if(!ispath(modtype, /datum/actionspeed_modifier)) + CRASH("[modtype] is not a actionspeed modification typepath.") + var/datum/actionspeed_modifier/actionspeed_mod = modtype + if(initial(actionspeed_mod.variable)) + CRASH("[modtype] is a variable modifier, and can never be cached.") + actionspeed_mod = GLOB.actionspeed_modification_cache[modtype] + if(!actionspeed_mod) + actionspeed_mod = GLOB.actionspeed_modification_cache[modtype] = new modtype + return actionspeed_mod + +///Add a action speed modifier to a mob. If a variable subtype is passed in as the first argument, it will make a new datum. If ID conflicts, it will overwrite the old ID. +/mob/proc/add_actionspeed_modifier(datum/actionspeed_modifier/type_or_datum, update = TRUE) + if(ispath(type_or_datum)) + if(!initial(type_or_datum.variable)) + type_or_datum = get_cached_actionspeed_modifier(type_or_datum) + else + type_or_datum = new type_or_datum + var/datum/actionspeed_modifier/existing = LAZYACCESS(actionspeed_modification, type_or_datum.id) + if(existing) + if(existing == type_or_datum) //same thing don't need to touch + return TRUE + remove_actionspeed_modifier(existing, FALSE) + if(length(actionspeed_modification)) + BINARY_INSERT(type_or_datum.id, actionspeed_modification, datum/actionspeed_modifier, type_or_datum, priority, COMPARE_VALUE) + LAZYSET(actionspeed_modification, type_or_datum.id, type_or_datum) + if(update) + update_actionspeed() + return TRUE + +/// Remove a action speed modifier from a mob, whether static or variable. +/mob/proc/remove_actionspeed_modifier(datum/actionspeed_modifier/type_id_datum, update = TRUE) + var/key + if(ispath(type_id_datum)) + key = initial(type_id_datum.id) || "[type_id_datum]" //id if set, path set to string if not. + else if(!istext(type_id_datum)) //if it isn't text it has to be a datum, as it isn't a type. + key = type_id_datum.id + else //assume it's an id + key = type_id_datum + if(!LAZYACCESS(actionspeed_modification, key)) + return FALSE + LAZYREMOVE(actionspeed_modification, key) + if(update) + update_actionspeed(FALSE) + return TRUE + +/*! Used for variable slowdowns like hunger/health loss/etc, works somewhat like the old list-based modification adds. Returns the modifier datum if successful + How this SHOULD work is: + 1. Ensures type_id_datum one way or another refers to a /variable datum. This makes sure it can't be cached. This includes if it's already in the modification list. + 2. Instantiate a new datum if type_id_datum isn't already instantiated + in the list, using the type. Obviously, wouldn't work for ID only. + 3. Add the datum if necessary using the regular add proc + 4. If any of the rest of the args are not null (see: multiplicative slowdown), modify the datum + 5. Update if necessary +*/ +/mob/proc/add_or_update_variable_actionspeed_modifier(datum/actionspeed_modifier/type_id_datum, update = TRUE, multiplicative_slowdown) + var/modified = FALSE + var/inject = FALSE + var/datum/actionspeed_modifier/final + if(istext(type_id_datum)) + final = LAZYACCESS(actionspeed_modification, type_id_datum) + if(!final) + CRASH("Couldn't find existing modification when provided a text ID.") + else if(ispath(type_id_datum)) + if(!initial(type_id_datum.variable)) + CRASH("Not a variable modifier") + final = LAZYACCESS(actionspeed_modification, initial(type_id_datum.id) || "[type_id_datum]") + if(!final) + final = new type_id_datum + inject = TRUE + modified = TRUE + else + if(!initial(type_id_datum.variable)) + CRASH("Not a variable modifier") + final = type_id_datum + if(!LAZYACCESS(actionspeed_modification, final.id)) + inject = TRUE + modified = TRUE + if(!isnull(multiplicative_slowdown)) + final.multiplicative_slowdown = multiplicative_slowdown + modified = TRUE + if(inject) + add_actionspeed_modifier(final, FALSE) + if(update && modified) + update_actionspeed(TRUE) + return final + +///Is there a actionspeed modifier for this mob +/mob/proc/has_actionspeed_modifier(datum/actionspeed_modifier/datum_type_id) + var/key + if(ispath(datum_type_id)) + key = initial(datum_type_id.id) || "[datum_type_id]" + else if(istext(datum_type_id)) + key = datum_type_id + else + key = datum_type_id.id + return LAZYACCESS(actionspeed_modification, key) + +/// Go through the list of actionspeed modifiers and calculate a final actionspeed. ANY ADD/REMOVE DONE IN UPDATE_actionspeed MUST HAVE THE UPDATE ARGUMENT SET AS FALSE! +/mob/proc/update_actionspeed() + . = 0 + var/list/conflict_tracker = list() + for(var/key in get_actionspeed_modifiers()) + var/datum/actionspeed_modifier/M = actionspeed_modification[key] + var/conflict = M.conflicts_with + var/amt = M.multiplicative_slowdown + if(conflict) + // Conflicting modifiers prioritize the larger slowdown or the larger speedup + // We purposefuly don't handle mixing speedups and slowdowns on the same id + if(abs(conflict_tracker[conflict]) < abs(amt)) + conflict_tracker[conflict] = amt + else + continue + . += amt + cached_multiplicative_actions_slowdown = . + +///Adds a default action speed +/mob/proc/initialize_actionspeed() + add_or_update_variable_actionspeed_modifier(/datum/actionspeed_modifier/base, multiplicative_slowdown = 1) + +/// Get the action speed modifiers list of the mob +/mob/proc/get_actionspeed_modifiers() + . = LAZYCOPY(actionspeed_modification) + for(var/id in actionspeed_mod_immunities) + . -= id + +/// Checks if a action speed modifier is valid and not missing any data +/proc/actionspeed_data_null_check(datum/actionspeed_modifier/M) //Determines if a data list is not meaningful and should be discarded. + . = !(M.multiplicative_slowdown) diff --git a/code/modules/actionspeed/modifiers/base.dm b/code/modules/actionspeed/modifiers/base.dm new file mode 100644 index 00000000000..97c5124c3bc --- /dev/null +++ b/code/modules/actionspeed/modifiers/base.dm @@ -0,0 +1,2 @@ +/datum/actionspeed_modifier/base + variable = TRUE diff --git a/code/modules/actionspeed/modifiers/mood.dm b/code/modules/actionspeed/modifiers/mood.dm new file mode 100644 index 00000000000..d8ed005d42b --- /dev/null +++ b/code/modules/actionspeed/modifiers/mood.dm @@ -0,0 +1,7 @@ +/datum/actionspeed_modifier/low_sanity + multiplicative_slowdown = 0.25 + id = ACTIONSPEED_ID_SANITY + +/datum/actionspeed_modifier/high_sanity + multiplicative_slowdown = -0.1 + id = ACTIONSPEED_ID_SANITY diff --git a/code/modules/actionspeed/modifiers/status_effects.dm b/code/modules/actionspeed/modifiers/status_effects.dm new file mode 100644 index 00000000000..615346b7902 --- /dev/null +++ b/code/modules/actionspeed/modifiers/status_effects.dm @@ -0,0 +1,5 @@ +/datum/actionspeed_modifier/timecookie + multiplicative_slowdown = -0.05 + +/datum/actionspeed_modifier/blunt_wound + variable = TRUE diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 0135d1f9bd5..a3a995bb28a 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -238,7 +238,7 @@ return SSshuttle.emergency.setTimer(timer*10) log_admin("[key_name(usr)] edited the Emergency Shuttle's timeleft to [timer] seconds.") - minor_announce("The emergency shuttle will reach its destination in [DisplayTimeText(timer/10)].") + minor_announce("The emergency shuttle will reach its destination in [DisplayTimeText(timer)].") message_admins("[key_name_admin(usr)] edited the Emergency Shuttle's timeleft to [timer] seconds.") else if(href_list["trigger_centcom_recall"]) if(!check_rights(R_ADMIN)) diff --git a/code/modules/antagonists/blob/blobstrains/_reagent.dm b/code/modules/antagonists/blob/blobstrains/_reagent.dm index 3d210188d9b..0113013c957 100644 --- a/code/modules/antagonists/blob/blobstrains/_reagent.dm +++ b/code/modules/antagonists/blob/blobstrains/_reagent.dm @@ -27,7 +27,7 @@ can_synth = FALSE -/datum/reagent/blob/expose_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O) +/datum/reagent/blob/expose_mob(mob/living/M, methods=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O) if(M.stat == DEAD || istype(M, /mob/living/simple_animal/hostile/blob)) return 0 //the dead, and blob mobs, don't cause reactions return round(reac_volume * min(1.5 - touch_protection, 1), 0.1) //full touch protection means 50% volume, any prot below 0.5 means 100% volume. diff --git a/code/modules/antagonists/blob/blobstrains/blazing_oil.dm b/code/modules/antagonists/blob/blobstrains/blazing_oil.dm index 88d8f5f71ff..1a717787dec 100644 --- a/code/modules/antagonists/blob/blobstrains/blazing_oil.dm +++ b/code/modules/antagonists/blob/blobstrains/blazing_oil.dm @@ -31,7 +31,7 @@ taste_description = "burning oil" color = "#B68D00" -/datum/reagent/blob/blazing_oil/expose_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O) +/datum/reagent/blob/blazing_oil/expose_mob(mob/living/M, methods=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O) reac_volume = ..() M.adjust_fire_stacks(round(reac_volume/10)) M.IgniteMob() diff --git a/code/modules/antagonists/blob/blobstrains/cryogenic_poison.dm b/code/modules/antagonists/blob/blobstrains/cryogenic_poison.dm index aa11c7ca90b..ebfc84f008d 100644 --- a/code/modules/antagonists/blob/blobstrains/cryogenic_poison.dm +++ b/code/modules/antagonists/blob/blobstrains/cryogenic_poison.dm @@ -16,7 +16,7 @@ color = "#8BA6E9" taste_description = "brain freeze" -/datum/reagent/blob/cryogenic_poison/expose_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O) +/datum/reagent/blob/cryogenic_poison/expose_mob(mob/living/M, methods=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O) reac_volume = ..() if(M.reagents) M.reagents.add_reagent(/datum/reagent/consumable/frostoil, 0.3*reac_volume) diff --git a/code/modules/antagonists/blob/blobstrains/distributed_neurons.dm b/code/modules/antagonists/blob/blobstrains/distributed_neurons.dm index 96d4ccfde0c..4f2f802f78b 100644 --- a/code/modules/antagonists/blob/blobstrains/distributed_neurons.dm +++ b/code/modules/antagonists/blob/blobstrains/distributed_neurons.dm @@ -24,7 +24,7 @@ name = "Distributed Neurons" color = "#E88D5D" -/datum/reagent/blob/distributed_neurons/expose_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O) +/datum/reagent/blob/distributed_neurons/expose_mob(mob/living/M, methods=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O) reac_volume = ..() M.apply_damage(0.6*reac_volume, TOX) if(O && ishuman(M)) diff --git a/code/modules/antagonists/blob/blobstrains/electromagnetic_web.dm b/code/modules/antagonists/blob/blobstrains/electromagnetic_web.dm index 6d61732b147..02a8c914d12 100644 --- a/code/modules/antagonists/blob/blobstrains/electromagnetic_web.dm +++ b/code/modules/antagonists/blob/blobstrains/electromagnetic_web.dm @@ -29,7 +29,7 @@ taste_description = "pop rocks" color = "#83ECEC" -/datum/reagent/blob/electromagnetic_web/expose_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O) +/datum/reagent/blob/electromagnetic_web/expose_mob(mob/living/M, methods=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O) reac_volume = ..() if(prob(reac_volume*2)) M.emp_act(EMP_LIGHT) diff --git a/code/modules/antagonists/blob/blobstrains/energized_jelly.dm b/code/modules/antagonists/blob/blobstrains/energized_jelly.dm index 6e85d2110d6..f0ab16706a5 100644 --- a/code/modules/antagonists/blob/blobstrains/energized_jelly.dm +++ b/code/modules/antagonists/blob/blobstrains/energized_jelly.dm @@ -26,7 +26,7 @@ taste_description = "gelatin" color = "#EFD65A" -/datum/reagent/blob/energized_jelly/expose_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O) +/datum/reagent/blob/energized_jelly/expose_mob(mob/living/M, methods=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O) reac_volume = ..() M.losebreath += round(0.2*reac_volume) M.adjustStaminaLoss(reac_volume * 1.2) diff --git a/code/modules/antagonists/blob/blobstrains/explosive_lattice.dm b/code/modules/antagonists/blob/blobstrains/explosive_lattice.dm index e19c1331969..3324df30f9b 100644 --- a/code/modules/antagonists/blob/blobstrains/explosive_lattice.dm +++ b/code/modules/antagonists/blob/blobstrains/explosive_lattice.dm @@ -31,7 +31,7 @@ taste_description = "the bomb" color = "#8B2500" -/datum/reagent/blob/explosive_lattice/expose_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O) +/datum/reagent/blob/explosive_lattice/expose_mob(mob/living/M, methods=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O) var/initial_volume = reac_volume reac_volume = ..() if(reac_volume >= 10) //if it's not a spore cloud, bad time incoming diff --git a/code/modules/antagonists/blob/blobstrains/networked_fibers.dm b/code/modules/antagonists/blob/blobstrains/networked_fibers.dm index 6c07ca6c34b..cc08a4a197d 100644 --- a/code/modules/antagonists/blob/blobstrains/networked_fibers.dm +++ b/code/modules/antagonists/blob/blobstrains/networked_fibers.dm @@ -36,7 +36,7 @@ taste_description = "efficiency" color = "#4F4441" -/datum/reagent/blob/networked_fibers/expose_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O) +/datum/reagent/blob/networked_fibers/expose_mob(mob/living/M, methods=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O) reac_volume = ..() M.apply_damage(0.6*reac_volume, BRUTE, wound_bonus=CANT_WOUND) if(!QDELETED(M)) diff --git a/code/modules/antagonists/blob/blobstrains/pressurized_slime.dm b/code/modules/antagonists/blob/blobstrains/pressurized_slime.dm index 297e56ae2f8..7647d5ad958 100644 --- a/code/modules/antagonists/blob/blobstrains/pressurized_slime.dm +++ b/code/modules/antagonists/blob/blobstrains/pressurized_slime.dm @@ -39,7 +39,7 @@ taste_description = "a sponge" color = "#AAAABB" -/datum/reagent/blob/pressurized_slime/expose_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O) +/datum/reagent/blob/pressurized_slime/expose_mob(mob/living/M, methods=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O) reac_volume = ..() var/turf/open/T = get_turf(M) if(istype(T) && prob(reac_volume)) diff --git a/code/modules/antagonists/blob/blobstrains/reactive_spines.dm b/code/modules/antagonists/blob/blobstrains/reactive_spines.dm index fd39fe55df4..8286bb63fe9 100644 --- a/code/modules/antagonists/blob/blobstrains/reactive_spines.dm +++ b/code/modules/antagonists/blob/blobstrains/reactive_spines.dm @@ -24,7 +24,7 @@ taste_description = "rock" color = "#9ACD32" -/datum/reagent/blob/reactive_spines/expose_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O) +/datum/reagent/blob/reactive_spines/expose_mob(mob/living/M, methods=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O) if(M.stat == DEAD || istype(M, /mob/living/simple_animal/hostile/blob)) return 0 //the dead, and blob mobs, don't cause reactions M.adjustBruteLoss(reac_volume) diff --git a/code/modules/antagonists/blob/blobstrains/regenerative_materia.dm b/code/modules/antagonists/blob/blobstrains/regenerative_materia.dm index 1df852bb1c8..499f29da3c1 100644 --- a/code/modules/antagonists/blob/blobstrains/regenerative_materia.dm +++ b/code/modules/antagonists/blob/blobstrains/regenerative_materia.dm @@ -15,7 +15,7 @@ taste_description = "heaven" color = "#A88FB7" -/datum/reagent/blob/regenerative_materia/expose_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O) +/datum/reagent/blob/regenerative_materia/expose_mob(mob/living/M, methods=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O) reac_volume = ..() M.adjust_drugginess(reac_volume) if(M.reagents) diff --git a/code/modules/antagonists/blob/blobstrains/replicating_foam.dm b/code/modules/antagonists/blob/blobstrains/replicating_foam.dm index 5d590d45084..a31426ca060 100644 --- a/code/modules/antagonists/blob/blobstrains/replicating_foam.dm +++ b/code/modules/antagonists/blob/blobstrains/replicating_foam.dm @@ -30,6 +30,6 @@ taste_description = "duplication" color = "#7B5A57" -/datum/reagent/blob/replicating_foam/expose_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O) +/datum/reagent/blob/replicating_foam/expose_mob(mob/living/M, methods=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O) reac_volume = ..() M.apply_damage(0.7*reac_volume, BRUTE, wound_bonus=CANT_WOUND) diff --git a/code/modules/antagonists/blob/blobstrains/shifting_fragments.dm b/code/modules/antagonists/blob/blobstrains/shifting_fragments.dm index d24a1a2008d..85ae2fd5df1 100644 --- a/code/modules/antagonists/blob/blobstrains/shifting_fragments.dm +++ b/code/modules/antagonists/blob/blobstrains/shifting_fragments.dm @@ -31,6 +31,6 @@ name = "Shifting Fragments" color = "#C8963C" -/datum/reagent/blob/shifting_fragments/expose_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O) +/datum/reagent/blob/shifting_fragments/expose_mob(mob/living/M, methods=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O) reac_volume = ..() M.apply_damage(0.7*reac_volume, BRUTE, wound_bonus=CANT_WOUND) diff --git a/code/modules/antagonists/blob/blobstrains/synchronous_mesh.dm b/code/modules/antagonists/blob/blobstrains/synchronous_mesh.dm index f9d558e3a8c..f0645badf29 100644 --- a/code/modules/antagonists/blob/blobstrains/synchronous_mesh.dm +++ b/code/modules/antagonists/blob/blobstrains/synchronous_mesh.dm @@ -29,7 +29,7 @@ taste_description = "toxic mold" color = "#65ADA2" -/datum/reagent/blob/synchronous_mesh/expose_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O) +/datum/reagent/blob/synchronous_mesh/expose_mob(mob/living/M, methods=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O) reac_volume = ..() M.apply_damage(0.2*reac_volume, BRUTE, wound_bonus=CANT_WOUND) if(M && reac_volume) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index 1be2063863e..4597c0cc401 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -243,7 +243,7 @@ mob_occupant.Unconscious((mob_occupant.bodytemperature * unconscious_factor) * 2000) if(beaker) if(reagent_transfer == 0) // Magically transfer reagents. Because cryo magic. - beaker.reagents.trans_to(occupant, 1, efficiency * 0.25, method = VAPOR) // Transfer reagents. + beaker.reagents.trans_to(occupant, 1, efficiency * 0.25, methods = VAPOR) // Transfer reagents. air1.gases[/datum/gas/oxygen][MOLES] -= max(0,air1.gases[/datum/gas/oxygen][MOLES] - 2 / efficiency) //Let's use gas for this air1.garbage_collect() if(++reagent_transfer >= 10 * efficiency) // Throttle reagent transfer (higher efficiency will transfer the same amount but consume less from the beaker). diff --git a/code/modules/cargo/packs.dm b/code/modules/cargo/packs.dm index 43954daa1fd..7aaf79e28f0 100644 --- a/code/modules/cargo/packs.dm +++ b/code/modules/cargo/packs.dm @@ -1639,6 +1639,20 @@ contains = list(/obj/item/vending_refill/assist) crate_name = "vendomat supply crate" +/datum/supply_pack/service/wedding + name = "Wedding Crate" + desc = "Everything you need to host a wedding! Now you just need an officiant." + cost = 1500 + contains = list(/obj/item/clothing/under/dress/wedding_dress, + /obj/item/clothing/under/suit/tuxedo, + /obj/item/storage/belt/cummerbund, + /obj/item/clothing/head/weddingveil, + /obj/item/bouquet, + /obj/item/bouquet/sunflower, + /obj/item/bouquet/poppy, + /obj/item/reagent_containers/food/drinks/bottle/champagne) + crate_name = "wedding crate" + /datum/supply_pack/service/emptycrate name = "Empty Crate" desc = "It's an empty crate, for all your storage needs." diff --git a/code/modules/clothing/head/misc.dm b/code/modules/clothing/head/misc.dm index 80d1f96910b..567f07691a9 100644 --- a/code/modules/clothing/head/misc.dm +++ b/code/modules/clothing/head/misc.dm @@ -474,3 +474,9 @@ desc = "Hee-ho!" icon_state = "JackFrostHat" inhand_icon_state = "JackFrostHat" + +/obj/item/clothing/head/weddingveil + name = "wedding veil" + desc = "A gauzy white veil." + icon_state = "weddingveil" + inhand_icon_state = "weddingveil" diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index 06767a52591..3e5be8a6262 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -123,7 +123,7 @@ /obj/item/clothing/suit/space/hardsuit/examine(mob/user) . = ..() if(!helmet && helmettype) - . += " The helmet on [src] seems to be malfunctioning. It's light bulb needs to be replaced." + . += "The helmet on [src] seems to be malfunctioning. Its light bulb needs to be replaced." /obj/item/clothing/suit/space/hardsuit/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/tank/jetpack/suit)) diff --git a/code/modules/clothing/spacesuits/plasmamen.dm b/code/modules/clothing/spacesuits/plasmamen.dm index 8b2e79320d3..a011611af42 100644 --- a/code/modules/clothing/spacesuits/plasmamen.dm +++ b/code/modules/clothing/spacesuits/plasmamen.dm @@ -180,7 +180,7 @@ /obj/item/clothing/head/helmet/space/plasmaman/chemist name = "chemistry plasma envirosuit helmet" - desc = "A plasmaman envirosuit designed for chemists, two orange stripes going down it's face." + desc = "A plasmaman envirosuit designed for chemists, two orange stripes going down its face." icon_state = "chemist_envirohelm" inhand_icon_state = "chemist_envirohelm" @@ -223,7 +223,7 @@ /obj/item/clothing/head/helmet/space/plasmaman/atmospherics name = "atmospherics plasma envirosuit helmet" - desc = "A space-worthy helmet specially designed for atmos technician plasmamen, the usual purple stripes being replaced by engineering's blue." + desc = "A space-worthy helmet specially designed for atmos technician plasmamen, the usual purple stripes being replaced by atmos' blue." icon_state = "atmos_envirohelm" inhand_icon_state = "atmos_envirohelm" armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 100, RAD = 10, FIRE = 100, ACID = 75) @@ -262,7 +262,7 @@ /obj/item/clothing/head/helmet/space/plasmaman/curator name = "curator's plasma envirosuit helmet" - desc = "A slight modification on a tradiational voidsuit helmet, this helmet was Nano-Trasen's first solution to the *logistical problems* that come with employing plasmamen. Despite their limitations, these helmets still see use by historian and old-styled plasmamen alike." + desc = "A slight modification on a traditional voidsuit helmet, this helmet was Nanotrasen's first solution to the *logistical problems* that come with employing plasmamen. Despite their limitations, these helmets still see use by historians and old-school plasmamen alike." icon_state = "prototype_envirohelm" inhand_icon_state = "prototype_envirohelm" actions_types = list(/datum/action/item_action/toggle_welding_screen/plasmaman) @@ -271,7 +271,7 @@ /obj/item/clothing/head/helmet/space/plasmaman/botany name = "botany plasma envirosuit helmet" - desc = "A green and blue envirohelmet designating it's wearer as a botanist. While not specially designed for it, it would protect against minor planet-related injuries." + desc = "A green and blue envirohelmet designating its wearer as a botanist. While not specifically designed for it, it would protect against minor plant-related injuries." icon_state = "botany_envirohelm" inhand_icon_state = "botany_envirohelm" diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index b7b6f240300..59191395af2 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -714,13 +714,6 @@ if (prob(hit_reflect_chance)) return TRUE -/obj/item/clothing/suit/spookyghost - name = "spooky ghost" - desc = "This is obviously just a bedsheet, but maybe try it on?" - icon_state = "bedsheet" - user_vars_to_edit = list("name" = "Spooky Ghost", "real_name" = "Spooky Ghost" , "incorporeal_move" = INCORPOREAL_MOVE_BASIC, "appearance_flags" = KEEP_TOGETHER|TILE_BOUND, "alpha" = 150) - alternate_worn_layer = ABOVE_BODY_FRONT_LAYER //so the bedsheet goes over everything but fire - /obj/item/clothing/suit/bronze name = "bronze suit" desc = "A big and clanky suit made of bronze that offers no protection and looks very unfashionable. Nice." @@ -740,6 +733,12 @@ flags_inv = HIDEGLOVES|HIDEEARS|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR alternate_worn_layer = UNDER_HEAD_LAYER +/obj/item/clothing/suit/ghost_sheet/spooky + name = "spooky ghost" + desc = "This is obviously just a bedsheet, but maybe try it on?" + user_vars_to_edit = list("name" = "Spooky Ghost", "real_name" = "Spooky Ghost" , "incorporeal_move" = INCORPOREAL_MOVE_BASIC, "appearance_flags" = KEEP_TOGETHER|TILE_BOUND, "alpha" = 150) + alternate_worn_layer = ABOVE_BODY_FRONT_LAYER //so the bedsheet goes over everything but fire + /obj/item/clothing/suit/toggle/suspenders/blue name = "blue suspenders" desc = "The symbol of hard labor and dirty jobs." diff --git a/code/modules/clothing/under/jobs/Plasmaman/civilian_service.dm b/code/modules/clothing/under/jobs/Plasmaman/civilian_service.dm index fcbbfc4119f..c79e4e1d0fe 100644 --- a/code/modules/clothing/under/jobs/Plasmaman/civilian_service.dm +++ b/code/modules/clothing/under/jobs/Plasmaman/civilian_service.dm @@ -19,7 +19,7 @@ /obj/item/clothing/under/plasmaman/enviroslacks name = "enviroslacks" - desc = "The pet project of a particularly posh plasmaman, this custom suit was quickly appropriated by Nano-Trasen for it's detectives, lawyers, and bar-tenders alike." + desc = "The pet project of a particularly posh plasmaman, this custom suit was quickly appropriated by Nanotrasen for its detectives, lawyers, and bartenders alike." icon_state = "enviroslacks" inhand_icon_state = "enviroslacks" @@ -31,7 +31,7 @@ /obj/item/clothing/under/plasmaman/curator name = "curator's plasma envirosuit" - desc = "Made out of a modified voidsuit, this suit was Nano-Trasen's first solution to the *logistical problems* that come with employing plasmamen. Due to the modifications, the suit is no longer space-worthy. Despite their limitations, these suits are still in used by historian and old-styled plasmamen alike." + desc = "Made out of a modified voidsuit, this suit was Nanotrasen's first solution to the *logistical problems* that come with employing plasmamen. Due to the modifications, the suit is no longer space-worthy. Despite their limitations, these suits are still in used by historian and old-styled plasmamen alike." icon_state = "prototype_envirosuit" inhand_icon_state = "prototype_envirosuit" @@ -76,7 +76,7 @@ return next_extinguish = world.time + extinguish_cooldown extinguishes_left-- - H.visible_message("[H]'s suit spews out a tonne of space lube!","Your suit spews out a tonne of space lube!") + H.visible_message("[H]'s suit spews space lube everywhere!","Your suit spews space lube everywhere!") H.ExtinguishMob() new /obj/effect/particle_effect/foam(loc) //Truely terrifying. return 0 diff --git a/code/modules/clothing/under/jobs/Plasmaman/engineering.dm b/code/modules/clothing/under/jobs/Plasmaman/engineering.dm index bfed3883525..e06317a0322 100644 --- a/code/modules/clothing/under/jobs/Plasmaman/engineering.dm +++ b/code/modules/clothing/under/jobs/Plasmaman/engineering.dm @@ -1,13 +1,13 @@ /obj/item/clothing/under/plasmaman/engineering name = "engineering plasma envirosuit" - desc = "An air-tight suit designed to be used by plasmamen employed as engineers, the usual purple stripes being replaced by engineer's orange. It protects the user from fire and acid damage." + desc = "An air-tight suit designed to be used by plasmamen employed as engineers, the usual purple stripes being replaced by engineering's orange. It protects the user from fire and acid damage." icon_state = "engineer_envirosuit" inhand_icon_state = "engineer_envirosuit" armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 100, RAD = 10, FIRE = 95, ACID = 95) /obj/item/clothing/under/plasmaman/atmospherics name = "atmospherics plasma envirosuit" - desc = "An air-tight suit designed to be used by plasmamen employed as atmos technicians, the usual purple stripes being replaced by atmos's blue." + desc = "An air-tight suit designed to be used by plasmamen employed as atmos technicians, the usual purple stripes being replaced by atmos' blue." icon_state = "atmos_envirosuit" armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 100, RAD = 10, FIRE = 95, ACID = 95) inhand_icon_state = "atmos_envirosuit" diff --git a/code/modules/clothing/under/skirt_dress.dm b/code/modules/clothing/under/skirt_dress.dm index 0977cd1d01d..8205948a931 100644 --- a/code/modules/clothing/under/skirt_dress.dm +++ b/code/modules/clothing/under/skirt_dress.dm @@ -30,6 +30,14 @@ icon_state = "sailor_dress" inhand_icon_state = "sailor_dress" +/obj/item/clothing/under/dress/wedding_dress + name = "wedding dress" + desc = "A luxurious gown for once-in-a-lifetime occasions." + icon_state = "wedding_dress" + inhand_icon_state = "wedding_dress" + body_parts_covered = CHEST|GROIN|LEGS + flags_cover = HIDESHOES + /obj/item/clothing/under/dress/redeveninggown name = "red evening gown" desc = "Fancy dress for space bar singers." diff --git a/code/modules/clothing/under/suits.dm b/code/modules/clothing/under/suits.dm index 45f7bb30c6c..2278c382360 100644 --- a/code/modules/clothing/under/suits.dm +++ b/code/modules/clothing/under/suits.dm @@ -124,6 +124,7 @@ desc = "An excellent light colored suit, experts in the field stress that it should not to be confused with the inferior tan suit." icon_state = "beige_suit" inhand_icon_state = "beige_suit" + /obj/item/clothing/under/suit/henchmen name = "henchmen jumpsuit" desc = "A very gaudy jumpsuit for a proper Henchman. Guild regulations, you understand." @@ -133,3 +134,9 @@ inhand_icon_state = "henchmen" body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS|HEAD flags_inv = HIDEGLOVES|HIDESHOES|HIDEEARS|HIDEEYES|HIDEHAIR + +/obj/item/clothing/under/suit/tuxedo + name = "tuxedo" + desc = "A formal black tuxedo. It exudes classiness." + icon_state = "tuxedo" + inhand_icon_state = "tuxedo" diff --git a/code/modules/detectivework/footprints_and_rag.dm b/code/modules/detectivework/footprints_and_rag.dm index aaaa1ad1bff..6bb864262df 100644 --- a/code/modules/detectivework/footprints_and_rag.dm +++ b/code/modules/detectivework/footprints_and_rag.dm @@ -29,7 +29,7 @@ var/reagentlist = pretty_string_from_reagent_list(reagents) var/log_object = "containing [reagentlist]" if(user.a_intent == INTENT_HARM && !C.is_mouth_covered()) - reagents.trans_to(C, reagents.total_volume, transfered_by = user, method = INGEST) + reagents.trans_to(C, reagents.total_volume, transfered_by = user, methods = INGEST) C.visible_message("[user] smothers \the [C] with \the [src]!", "[user] smothers you with \the [src]!", "You hear some struggling and muffled cries of surprise.") log_combat(user, C, "smothered", src, log_object) else diff --git a/code/modules/food_and_drinks/drinks/drinks.dm b/code/modules/food_and_drinks/drinks/drinks.dm index 98902eec08a..f41282af2bc 100644 --- a/code/modules/food_and_drinks/drinks/drinks.dm +++ b/code/modules/food_and_drinks/drinks/drinks.dm @@ -47,7 +47,7 @@ SEND_SIGNAL(src, COMSIG_DRINK_DRANK, M, user) var/fraction = min(gulp_size/reagents.total_volume, 1) checkLiked(fraction, M) - reagents.trans_to(M, gulp_size, transfered_by = user, method = INGEST) + reagents.trans_to(M, gulp_size, transfered_by = user, methods = INGEST) playsound(M.loc,'sound/items/drink.ogg', rand(10,50), TRUE) if(iscarbon(M)) var/mob/living/carbon/carbon_drinker = M diff --git a/code/modules/food_and_drinks/food/condiment.dm b/code/modules/food_and_drinks/food/condiment.dm index c70ebc2d300..4dc24de4659 100644 --- a/code/modules/food_and_drinks/food/condiment.dm +++ b/code/modules/food_and_drinks/food/condiment.dm @@ -90,7 +90,7 @@ M.visible_message("[user] fed [M] from [src].", \ "[user] fed you from [src].") log_combat(user, M, "fed", reagents.log_list()) - reagents.trans_to(M, 10, transfered_by = user, method = INGEST) + reagents.trans_to(M, 10, transfered_by = user, methods = INGEST) playsound(M.loc,'sound/items/drink.ogg', rand(10,50), TRUE) return 1 diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index 1165f7c04d6..a189ea0f321 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -157,7 +157,7 @@ All foods are distributed among various categories. Use common sense. if(reagents.total_volume) SEND_SIGNAL(src, COMSIG_FOOD_EATEN, M, user) var/fraction = min(bitesize / reagents.total_volume, 1) - reagents.trans_to(M, bitesize, transfered_by = user, method = INGEST) + reagents.trans_to(M, bitesize, transfered_by = user, methods = INGEST) bitecount++ On_Consume(M) checkLiked(fraction, M) diff --git a/code/modules/food_and_drinks/food/snacks_other.dm b/code/modules/food_and_drinks/food/snacks_other.dm index f95999032bb..08e92760dc2 100644 --- a/code/modules/food_and_drinks/food/snacks_other.dm +++ b/code/modules/food_and_drinks/food/snacks_other.dm @@ -487,7 +487,7 @@ if(iscarbon(loc)) var/mob/living/carbon/C = loc if (src == C.wear_mask) // if it's in the human/monkey mouth, transfer reagents to the mob - if(!reagents.trans_to(C, REAGENTS_METABOLISM, method = INGEST)) + if(!reagents.trans_to(C, REAGENTS_METABOLISM, methods = INGEST)) reagents.remove_any(REAGENTS_METABOLISM) return reagents.remove_any(REAGENTS_METABOLISM) diff --git a/code/modules/hydroponics/plant_genes.dm b/code/modules/hydroponics/plant_genes.dm index 6585d77932c..8d6b671849c 100644 --- a/code/modules/hydroponics/plant_genes.dm +++ b/code/modules/hydroponics/plant_genes.dm @@ -457,7 +457,7 @@ var/mob/living/L = target if(L.reagents && L.can_inject(null, 0)) var/injecting_amount = max(1, G.seed.potency*0.2) // Minimum of 1, max of 20 - G.reagents.trans_to(L, injecting_amount, method = INJECT) + G.reagents.trans_to(L, injecting_amount, methods = INJECT) to_chat(target, "You are pricked by [G]!") log_combat(G, L, "pricked and attempted to inject reagents from [G] to [L]. Last touched by: [G.fingerprintslast].") diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index c6c93bfb488..7464b9f46e1 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -602,12 +602,12 @@ reagent_state = LIQUID color = "#FFEBEB" -/datum/reagent/flightpotion/expose_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1) +/datum/reagent/flightpotion/expose_mob(mob/living/M, methods=TOUCH, reac_volume, show_message = 1) if(iscarbon(M) && M.stat != DEAD) var/mob/living/carbon/C = M var/holycheck = ishumanbasic(C) if(reac_volume < 5 || !(holycheck || islizard(C) || (ismoth(C) && C.dna.features["moth_wings"] != "Burnt Off"))) // implying xenohumans are holy //as with all things, - if(method == INGEST && show_message) + if((methods & INGEST) && show_message) to_chat(C, "You feel nothing but a terrible aftertaste.") return ..() if(C.dna.species.has_innate_wings) diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index a9e8b3242e7..1d7d00efff0 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -71,7 +71,7 @@ circuit = /obj/item/circuitboard/computer/mining_shuttle shuttleId = "mining" possible_destinations = "mining_home;mining_away;landing_zone_dock;mining_public" - no_destination_swap = 1 + no_destination_swap = TRUE var/static/list/dumb_rev_heads = list() //ATTACK HAND IGNORING PARENT RETURN VALUE diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index b0f0e6363ac..7543af69243 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -984,20 +984,6 @@ set_usable_hands(usable_hands - 1) -/mob/living/carbon/do_after_coefficent() - . = ..() - var/datum/component/mood/mood = src.GetComponent(/datum/component/mood) //Currently, only carbons or higher use mood, move this once that changes. - if(mood) - switch(mood.sanity) //Alters do_after delay based on how sane you are - if(-INFINITY to SANITY_DISTURBED) - . *= 1.25 - if(SANITY_NEUTRAL to INFINITY) - . *= 0.90 - - for(var/i in status_effects) - var/datum/status_effect/S = i - . *= S.interact_speed_modifier() - /mob/living/carbon/proc/create_internal_organs() for(var/X in internal_organs) var/obj/item/organ/I = X diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 3373c2a10df..8cb38602ab3 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1158,10 +1158,6 @@ riding_datum.handle_vehicle_layer() . = ..(target, force, check_loc) -/mob/living/carbon/human/do_after_coefficent() - . = ..() - . *= physiology.do_after_speed - /mob/living/carbon/human/updatehealth() . = ..() dna?.species.spec_updatehealth(src) diff --git a/code/modules/mob/living/carbon/human/physiology.dm b/code/modules/mob/living/carbon/human/physiology.dm index 4d411deb53d..2a197b64ee2 100644 --- a/code/modules/mob/living/carbon/human/physiology.dm +++ b/code/modules/mob/living/carbon/human/physiology.dm @@ -23,7 +23,5 @@ var/hunger_mod = 1 //% of hunger rate taken per tick. - var/do_after_speed = 1 //Speed mod for do_after. Lower is better. If temporarily adjusting, please only modify using *= and /=, so you don't interrupt other calculations. - /datum/physiology/New() armor = new diff --git a/code/modules/mob/living/inhand_holder.dm b/code/modules/mob/living/inhand_holder.dm index f3054ca9af6..9162e929784 100644 --- a/code/modules/mob/living/inhand_holder.dm +++ b/code/modules/mob/living/inhand_holder.dm @@ -48,19 +48,21 @@ if(held_mob && isturf(loc)) release() -/obj/item/clothing/head/mob_holder/proc/release(del_on_release = TRUE) +/obj/item/clothing/head/mob_holder/proc/release(del_on_release = TRUE, display_messages = TRUE) if(!held_mob) if(del_on_release && !destroying) qdel(src) return FALSE if(isliving(loc)) var/mob/living/L = loc - to_chat(L, "[held_mob] wriggles free!") + if(display_messages) + to_chat(L, "[held_mob] wriggles free!") L.dropItemToGround(src) held_mob.forceMove(get_turf(held_mob)) held_mob.reset_perspective() held_mob.setDir(SOUTH) - held_mob.visible_message("[held_mob] uncurls!") + if(display_messages) + held_mob.visible_message("[held_mob] uncurls!") held_mob = null if(del_on_release && !destroying) qdel(src) @@ -72,6 +74,13 @@ /obj/item/clothing/head/mob_holder/container_resist_act() release() +/obj/item/clothing/head/mob_holder/on_found(mob/finder) + if(held_mob?.will_escape_storage()) + to_chat(finder, "\A [held_mob.name] pops out! ") + finder.visible_message("\A [held_mob.name] pops out of the container [finder] is opening!", ignored_mobs = finder) + release(TRUE, FALSE) + return + /obj/item/clothing/head/mob_holder/drone/deposit(mob/living/L) . = ..() if(!isdrone(L)) @@ -90,10 +99,10 @@ /obj/item/clothing/head/mob_holder/destructible/Destroy() if(held_mob) - release(FALSE, TRUE) + release(FALSE, TRUE, TRUE) return ..() -/obj/item/clothing/head/mob_holder/release(del_on_release = TRUE, delete_mob = FALSE) +/obj/item/clothing/head/mob_holder/destructible/release(del_on_release = TRUE, display_messages = TRUE, delete_mob = FALSE) if(delete_mob && held_mob) QDEL_NULL(held_mob) return ..() diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 13d65eac617..2b67b8691e8 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -1733,3 +1733,7 @@ return . = usable_hands usable_hands = new_value + +/// Whether or not this mob will escape from storages while being picked up/held. +/mob/living/proc/will_escape_storage() + return FALSE diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index b8b79587f09..68981a88f57 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -440,17 +440,17 @@ /** Handles exposing a mob to reagents. * - * If the method is INGEST the mob tastes the reagents. - * If the method is VAPOR it incorporates permiability protection. + * If the methods include INGEST the mob tastes the reagents. + * If the methods include VAPOR it incorporates permiability protection. */ -/mob/living/expose_reagents(list/reagents, datum/reagents/source, method=TOUCH, volume_modifier=1, show_message=TRUE) +/mob/living/expose_reagents(list/reagents, datum/reagents/source, methods=TOUCH, volume_modifier=1, show_message=TRUE) if((. = ..()) & COMPONENT_NO_EXPOSE_REAGENTS) return - if(method == INGEST) + if(methods & INGEST) taste(source) - var/touch_protection = (method == VAPOR) ? get_permeability_protection() : 0 + var/touch_protection = (methods & VAPOR) ? get_permeability_protection() : 0 for(var/reagent in reagents) var/datum/reagent/R = reagent - . |= R.expose_mob(src, method, reagents[R], show_message, touch_protection) + . |= R.expose_mob(src, methods, reagents[R], show_message, touch_protection) diff --git a/code/modules/mob/living/simple_animal/hostile/bees.dm b/code/modules/mob/living/simple_animal/hostile/bees.dm index 86b9690b560..fbdd89034fa 100644 --- a/code/modules/mob/living/simple_animal/hostile/bees.dm +++ b/code/modules/mob/living/simple_animal/hostile/bees.dm @@ -240,6 +240,9 @@ beehome = BB break // End loop after the first compatible find. +/mob/living/simple_animal/hostile/poison/bees/will_escape_storage() + return TRUE + /mob/living/simple_animal/hostile/poison/bees/toxin/Initialize() . = ..() var/datum/reagent/R = pick(typesof(/datum/reagent/toxin)) @@ -270,6 +273,8 @@ /mob/living/simple_animal/hostile/poison/bees/queen/pollinate() return +/mob/living/simple_animal/hostile/poison/bees/queen/will_escape_storage() + return FALSE /mob/living/simple_animal/hostile/poison/bees/proc/reagent_incompatible(mob/living/simple_animal/hostile/poison/bees/B) if(!B) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index b252d180ff5..f47477104b7 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -75,6 +75,7 @@ set_nutrition(rand(NUTRITION_LEVEL_START_MIN, NUTRITION_LEVEL_START_MAX)) . = ..() update_config_movespeed() + initialize_actionspeed() update_movespeed(TRUE) /** diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index f1afd6339c1..63dca4857dc 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -28,6 +28,12 @@ var/list/movespeed_mod_immunities //Lazy list, see mob_movespeed.dm /// The calculated mob speed slowdown based on the modifiers list var/cached_multiplicative_slowdown + /// List of action speed modifiers applying to this mob + var/list/actionspeed_modification //Lazy list, see mob_movespeed.dm + /// List of action speed modifiers ignored by this mob. List -> List (id) -> List (sources) + var/list/actionspeed_mod_immunities //Lazy list, see mob_movespeed.dm + /// The calculated mob action speed slowdown based on the modifiers list + var/cached_multiplicative_actions_slowdown /// List of action hud items the user has var/list/datum/action/actions /// A special action? No idea why this lives here diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 6ff23ece78f..27c9c4e31bc 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -182,7 +182,7 @@ if(reagents.total_volume) if(M.reagents) - reagents.trans_to(M, reagents.total_volume, transfered_by = user, method = INJECT) + reagents.trans_to(M, reagents.total_volume, transfered_by = user, methods = INJECT) /obj/item/pen/sleepy/Initialize() diff --git a/code/modules/plumbing/plumbers/bottler.dm b/code/modules/plumbing/plumbers/bottler.dm index 650e6fbdfff..801b035349b 100644 --- a/code/modules/plumbing/plumbers/bottler.dm +++ b/code/modules/plumbing/plumbers/bottler.dm @@ -72,8 +72,8 @@ AM.forceMove(badspot) if(istype(AM, /obj/item/slime_extract)) ///slime extracts need inject AM.forceMove(goodspot) - reagents.trans_to(AM, wanted_amount, transfered_by = src, method = INJECT) + reagents.trans_to(AM, wanted_amount, transfered_by = src, methods = INJECT) return if(istype(AM, /obj/item/slimecross/industrial)) ///no need to move slimecross industrial things - reagents.trans_to(AM, wanted_amount, transfered_by = src, method = INJECT) + reagents.trans_to(AM, wanted_amount, transfered_by = src, methods = INJECT) return diff --git a/code/modules/projectiles/projectile/bullets/dart_syringe.dm b/code/modules/projectiles/projectile/bullets/dart_syringe.dm index 51870d9a20d..b86f3a38a44 100644 --- a/code/modules/projectiles/projectile/bullets/dart_syringe.dm +++ b/code/modules/projectiles/projectile/bullets/dart_syringe.dm @@ -15,7 +15,7 @@ if(blocked != 100) // not completely blocked if(M.can_inject(null, FALSE, def_zone, piercing)) // Pass the hit zone to see if it can inject by whether it hit the head or the body. ..() - reagents.trans_to(M, reagents.total_volume, method = INJECT) + reagents.trans_to(M, reagents.total_volume, methods = INJECT) return BULLET_ACT_HIT else blocked = 100 diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index 4bf005df06d..07793fe5c48 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -206,11 +206,11 @@ * * no_react - passed through to [/datum/reagents/proc/add_reagent] * * mob/transfered_by - used for logging * * remove_blacklisted - skips transferring of reagents with can_synth = FALSE - * * method - passed through to [/datum/reagents/proc/react_single] and [/datum/reagent/proc/on_transfer] + * * methods - passed through to [/datum/reagents/proc/react_single] and [/datum/reagent/proc/on_transfer] * * show_message - passed through to [/datum/reagents/proc/react_single] * * round_robin - if round_robin=TRUE, so transfer 5 from 15 water, 15 sugar and 15 plasma becomes 10, 15, 15 instead of 13.3333, 13.3333 13.3333. Good if you hate floating point errors */ -/datum/reagents/proc/trans_to(obj/target, amount = 1, multiplier = 1, preserve_data = TRUE, no_react = FALSE, mob/transfered_by, remove_blacklisted = FALSE, method = null, show_message = TRUE, round_robin = FALSE) +/datum/reagents/proc/trans_to(obj/target, amount = 1, multiplier = 1, preserve_data = TRUE, no_react = FALSE, mob/transfered_by, remove_blacklisted = FALSE, methods = NONE, show_message = TRUE, round_robin = FALSE) var/list/cached_reagents = reagent_list if(!target || !total_volume) return @@ -241,9 +241,9 @@ if(preserve_data) trans_data = copy_data(T) R.add_reagent(T.type, transfer_amount * multiplier, trans_data, chem_temp, no_react = 1) //we only handle reaction after every reagent has been transfered. - if(method) - R.expose_single(T, target_atom, method, part, show_message) - T.on_transfer(target_atom, method, transfer_amount * multiplier) + if(methods) + R.expose_single(T, target_atom, methods, part, show_message) + T.on_transfer(target_atom, methods, transfer_amount * multiplier) remove_reagent(T.type, transfer_amount) transfer_log[T.type] = transfer_amount else @@ -261,9 +261,9 @@ transfer_amount = T.volume R.add_reagent(T.type, transfer_amount * multiplier, trans_data, chem_temp, no_react = 1) to_transfer = max(to_transfer - transfer_amount , 0) - if(method) - R.expose_single(T, target_atom, method, transfer_amount, show_message) - T.on_transfer(target_atom, method, transfer_amount * multiplier) + if(methods) + R.expose_single(T, target_atom, methods, transfer_amount, show_message) + T.on_transfer(target_atom, methods, transfer_amount * multiplier) remove_reagent(T.type, transfer_amount) transfer_log[T.type] = transfer_amount @@ -643,7 +643,7 @@ * * [/datum/reagent/proc/expose_turf] * * [/datum/reagent/proc/expose_obj] */ -/datum/reagents/proc/expose(atom/A, method = TOUCH, volume_modifier = 1, show_message = 1) +/datum/reagents/proc/expose(atom/A, methods = TOUCH, volume_modifier = 1, show_message = 1) if(isnull(A)) return null @@ -656,11 +656,11 @@ var/datum/reagent/R = reagent reagents[R] = R.volume * volume_modifier - return A.expose_reagents(reagents, src, method, volume_modifier, show_message) + return A.expose_reagents(reagents, src, methods, volume_modifier, show_message) /// Same as [/datum/reagents/proc/expose] but only for one reagent -/datum/reagents/proc/expose_single(datum/reagent/R, atom/A, method = TOUCH, volume_modifier = 1, show_message = TRUE) +/datum/reagents/proc/expose_single(datum/reagent/R, atom/A, methods = TOUCH, volume_modifier = 1, show_message = TRUE) if(isnull(A)) return null @@ -670,7 +670,7 @@ return null // Yes, we need the parentheses. - return A.expose_reagents(list((R) = R.volume * volume_modifier), src, method, volume_modifier, show_message) + return A.expose_reagents(list((R) = R.volume * volume_modifier), src, methods, volume_modifier, show_message) /// Is this holder full or not /datum/reagents/proc/holder_full() diff --git a/code/modules/reagents/chemistry/readme.md b/code/modules/reagents/chemistry/readme.md index 0b498dd3bee..3ead7a5d185 100644 --- a/code/modules/reagents/chemistry/readme.md +++ b/code/modules/reagents/chemistry/readme.md @@ -64,12 +64,12 @@ The holder (reagents datum) is the datum that holds a list of all reagents curre clear_reagents() This proc removes ALL reagents from the holder. - reaction(var/atom/A, var/method=TOUCH, var/volume_modifier=0) + expose(var/atom/A, var/methods=TOUCH, var/volume_modifier=0) This proc calls the appropriate reaction procs of the reagents. I.e. if A is an object, it will call the reagents expose_obj - proc. The method var is used for reaction on mobs. It simply tells + proc. The methods var is used for reaction on mobs. It simply tells us if the mob TOUCHed the reagent, if it INGESTed the reagent, if the reagent - was VAPORIZEd on them, if the reagent was INJECTed, or transfered via a PATCH to them. + was VAPORIZEd on them, if the reagent was INJECTed, and/or transfered via a PATCH to them. Since the volume can be checked in a reagents proc, you might want to use the volume_modifier var to modifiy the passed value without actually changing the volume of the reagents. @@ -116,11 +116,12 @@ The holder (reagents datum) is the datum that holds a list of all reagents curre # About Reagents: Reagents are all the things you can mix and fille in bottles etc. This can be anything from rejuvs over water to ... iron. Each reagent also has a few procs - i'll explain those below. ``` - expose_mob(var/mob/living/L, var/method=TOUCH) + expose_mob(var/mob/living/L, var/methods=TOUCH) This is called by the holder's reation proc. This version is only called when the reagent - reacts with a mob. The method var can be either - TOUCH or INGEST. You'll want to put stuff like + reacts with a mob. The methods var can be any + combination of TOUCH, INGEST, VAPOR, PATCH, + and INJECT. You'll want to put stuff like acid-facemelting in here. expose_obj(var/obj/O) diff --git a/code/modules/reagents/chemistry/reagents.dm b/code/modules/reagents/chemistry/reagents.dm index 12ec7b4de92..3f25609be11 100644 --- a/code/modules/reagents/chemistry/reagents.dm +++ b/code/modules/reagents/chemistry/reagents.dm @@ -94,10 +94,10 @@ GLOBAL_LIST_INIT(name2reagent, build_name2reagent()) return /// Applies this reagent to a [/mob/living] -/datum/reagent/proc/expose_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1, touch_protection = 0) +/datum/reagent/proc/expose_mob(mob/living/M, methods=TOUCH, reac_volume, show_message = 1, touch_protection = 0) if(!istype(M)) return 0 - if(method == VAPOR) //smoke, foam, spray + if(methods & VAPOR) //smoke, foam, spray if(M.reagents) var/modifier = clamp((1 - touch_protection), 0, 1) var/amount = round(reac_volume*modifier, 0.1) @@ -121,7 +121,7 @@ GLOBAL_LIST_INIT(name2reagent, build_name2reagent()) holder.remove_reagent(type, metabolization_rate * M.metabolism_efficiency) //By default it slowly disappears. ///Called after a reagent is transfered -/datum/reagent/proc/on_transfer(atom/A, method=TOUCH, trans_volume) +/datum/reagent/proc/on_transfer(atom/A, methods=TOUCH, trans_volume) return diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm index f11c6506f79..e64b8145f77 100644 --- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm @@ -62,11 +62,11 @@ All effects don't start immediately, but rather get worse over time; the rate is O.visible_message("[O]'s ink is smeared by [name], but doesn't wash away!") return -/datum/reagent/consumable/ethanol/expose_mob(mob/living/M, method=TOUCH, reac_volume)//Splashing people with ethanol isn't quite as good as fuel. +/datum/reagent/consumable/ethanol/expose_mob(mob/living/M, methods=TOUCH, reac_volume)//Splashing people with ethanol isn't quite as good as fuel. if(!isliving(M)) return - if(method in list(TOUCH, VAPOR, PATCH)) + if(methods & (TOUCH|VAPOR|PATCH)) M.adjust_fire_stacks(reac_volume / 15) if(iscarbon(M)) diff --git a/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm index f6cd5e84129..f5b2989f3df 100644 --- a/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm @@ -123,8 +123,8 @@ ..() . = TRUE -/datum/reagent/medicine/c2/probital/on_transfer(atom/A, method=INGEST, trans_volume) - if(method != INGEST || !iscarbon(A)) +/datum/reagent/medicine/c2/probital/on_transfer(atom/A, methods=INGEST, trans_volume) + if(!(methods & INGEST) || !iscarbon(A)) return A.reagents.remove_reagent(/datum/reagent/medicine/c2/probital, trans_volume * 0.05) @@ -189,8 +189,8 @@ ..() . = TRUE -/datum/reagent/medicine/c2/hercuri/expose_mob(mob/living/carbon/M, method=VAPOR, reac_volume) - if(method != VAPOR) +/datum/reagent/medicine/c2/hercuri/expose_mob(mob/living/carbon/M, methods=VAPOR, reac_volume) + if(!(methods & VAPOR)) return M.adjust_bodytemperature(-reac_volume * TEMPERATURE_DAMAGE_COEFFICIENT, 50) @@ -336,8 +336,8 @@ overdose_threshold = 6 var/conversion_amount -/datum/reagent/medicine/c2/syriniver/on_transfer(atom/A, method=INJECT, trans_volume) - if(method != INJECT || !iscarbon(A)) +/datum/reagent/medicine/c2/syriniver/on_transfer(atom/A, methods=INJECT, trans_volume) + if(!(methods & INJECT) || !iscarbon(A)) return var/mob/living/carbon/C = A if(trans_volume >= 0.6) //prevents cheesing with ultralow doses. @@ -412,12 +412,12 @@ reagent_state = LIQUID color = "#FFEBEB" -/datum/reagent/medicine/c2/synthflesh/expose_mob(mob/living/M, method=TOUCH, reac_volume,show_message = 1) +/datum/reagent/medicine/c2/synthflesh/expose_mob(mob/living/M, methods=TOUCH, reac_volume,show_message = 1) if(iscarbon(M)) var/mob/living/carbon/carbies = M if (carbies.stat == DEAD) show_message = 0 - if(method in list(PATCH, TOUCH, VAPOR)) + if(methods & (PATCH|TOUCH|VAPOR)) var/harmies = min(carbies.getBruteLoss(),carbies.adjustBruteLoss(-1.25 * reac_volume)*-1) var/burnies = min(carbies.getFireLoss(),carbies.adjustFireLoss(-1.25 * reac_volume)*-1) for(var/i in carbies.all_wounds) diff --git a/code/modules/reagents/chemistry/reagents/drink_reagents.dm b/code/modules/reagents/chemistry/reagents/drink_reagents.dm index 16776e5f1e6..201e4c8cf8c 100644 --- a/code/modules/reagents/chemistry/reagents/drink_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/drink_reagents.dm @@ -534,9 +534,9 @@ glass_name = "glass of Pwr Game" glass_desc = "Goes well with a Vlad's salad." -/datum/reagent/consumable/pwr_game/expose_mob(mob/living/C, method=TOUCH, reac_volume) +/datum/reagent/consumable/pwr_game/expose_mob(mob/living/C, methods=TOUCH, reac_volume) ..() - if(C?.mind?.get_skill_level(/datum/skill/gaming) >= SKILL_LEVEL_LEGENDARY && method==INGEST && !HAS_TRAIT(C, TRAIT_GAMERGOD)) + if(C?.mind?.get_skill_level(/datum/skill/gaming) >= SKILL_LEVEL_LEGENDARY && (methods & INGEST) && !HAS_TRAIT(C, TRAIT_GAMERGOD)) ADD_TRAIT(C, TRAIT_GAMERGOD, "pwr_game") to_chat(C, "As you imbibe the Pwr Game, your gamer third eye opens... \ You feel as though a great secret of the universe has been made known to you...") diff --git a/code/modules/reagents/chemistry/reagents/food_reagents.dm b/code/modules/reagents/chemistry/reagents/food_reagents.dm index 52fe5bcbfc6..12f045771a0 100755 --- a/code/modules/reagents/chemistry/reagents/food_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/food_reagents.dm @@ -24,20 +24,19 @@ return holder.remove_reagent(type, metabolization_rate) -/datum/reagent/consumable/expose_mob(mob/living/M, method=TOUCH, reac_volume) - if(method == INGEST) - if (quality && !HAS_TRAIT(M, TRAIT_AGEUSIA)) - switch(quality) - if (DRINK_NICE) - SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "quality_drink", /datum/mood_event/quality_nice) - if (DRINK_GOOD) - SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "quality_drink", /datum/mood_event/quality_good) - if (DRINK_VERYGOOD) - SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "quality_drink", /datum/mood_event/quality_verygood) - if (DRINK_FANTASTIC) - SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "quality_drink", /datum/mood_event/quality_fantastic) - if (FOOD_AMAZING) - SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "quality_food", /datum/mood_event/amazingtaste) +/datum/reagent/consumable/expose_mob(mob/living/M, methods=TOUCH, reac_volume) + if((methods & INGEST) && quality && !HAS_TRAIT(M, TRAIT_AGEUSIA)) + switch(quality) + if (DRINK_NICE) + SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "quality_drink", /datum/mood_event/quality_nice) + if (DRINK_GOOD) + SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "quality_drink", /datum/mood_event/quality_good) + if (DRINK_VERYGOOD) + SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "quality_drink", /datum/mood_event/quality_verygood) + if (DRINK_FANTASTIC) + SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "quality_drink", /datum/mood_event/quality_fantastic) + if (FOOD_AMAZING) + SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "quality_food", /datum/mood_event/amazingtaste) return ..() /datum/reagent/consumable/nutriment @@ -135,18 +134,18 @@ F.fry(volume) F.reagents.add_reagent(/datum/reagent/consumable/cooking_oil, reac_volume) -/datum/reagent/consumable/cooking_oil/expose_mob(mob/living/M, method = TOUCH, reac_volume, show_message = 1, touch_protection = 0) +/datum/reagent/consumable/cooking_oil/expose_mob(mob/living/M, methods = TOUCH, reac_volume, show_message = 1, touch_protection = 0) if(!istype(M)) return var/boiling = FALSE if(holder && holder.chem_temp >= fry_temperature) boiling = TRUE - if(method != VAPOR && method != TOUCH) //Directly coats the mob, and doesn't go into their bloodstream + if(!(methods & (VAPOR|TOUCH))) //Directly coats the mob, and doesn't go into their bloodstream return ..() if(!boiling) return TRUE var/oil_damage = ((holder.chem_temp / fry_temperature) * 0.33) //Damage taken per unit - if(method == TOUCH) + if(methods & TOUCH) oil_damage *= 1 - M.get_permeability_protection() var/FryLoss = round(min(38, oil_damage * reac_volume)) if(!HAS_TRAIT(M, TRAIT_OIL_FRIED)) @@ -306,12 +305,12 @@ color = "#B31008" // rgb: 179, 16, 8 taste_description = "scorching agony" -/datum/reagent/consumable/condensedcapsaicin/expose_mob(mob/living/M, method=TOUCH, reac_volume) +/datum/reagent/consumable/condensedcapsaicin/expose_mob(mob/living/M, methods=TOUCH, reac_volume) if(!ishuman(M) && !ismonkey(M)) return var/mob/living/carbon/victim = M - if(method == TOUCH || method == VAPOR) + if(methods & (TOUCH|VAPOR)) var/pepper_proof = victim.is_pepper_proof() //check for protection @@ -326,7 +325,7 @@ victim.add_movespeed_modifier(/datum/movespeed_modifier/reagent/pepperspray) addtimer(CALLBACK(victim, /mob.proc/remove_movespeed_modifier, /datum/movespeed_modifier/reagent/pepperspray), 10 SECONDS) victim.update_damage_hud() - if(method == INGEST) + if(methods & INGEST) if(!holder.has_reagent(/datum/reagent/consumable/milk)) if(prob(15)) to_chat(M, "[pick("Your head pounds.", "Your mouth feels like it's on fire.", "You feel dizzy.")]") @@ -350,7 +349,7 @@ color = "#FFFFFF" // rgb: 255,255,255 taste_description = "salt" -/datum/reagent/consumable/sodiumchloride/expose_mob(mob/living/M, method=TOUCH, reac_volume) +/datum/reagent/consumable/sodiumchloride/expose_mob(mob/living/M, methods=TOUCH, reac_volume) if(!istype(M)) return if(M.has_bane(BANE_SALT)) @@ -595,8 +594,8 @@ M.adjustToxLoss(-1*REM, 0) ..() -/datum/reagent/consumable/honey/expose_mob(mob/living/M, method=TOUCH, reac_volume) - if(iscarbon(M) && (method in list(TOUCH, VAPOR, PATCH))) +/datum/reagent/consumable/honey/expose_mob(mob/living/M, methods=TOUCH, reac_volume) + if(iscarbon(M) && (methods & (TOUCH|VAPOR|PATCH))) var/mob/living/carbon/C = M for(var/s in C.surgeries) var/datum/surgery/S = s @@ -621,18 +620,12 @@ color = "#c0c9a0" taste_description = "bitterness" -/datum/reagent/consumable/tearjuice/expose_mob(mob/living/M, method=TOUCH, reac_volume) +/datum/reagent/consumable/tearjuice/expose_mob(mob/living/M, methods=TOUCH, reac_volume) if(!istype(M)) return var/unprotected = FALSE - switch(method) - if(INGEST) - unprotected = TRUE - if(INJECT) - unprotected = FALSE - else //Touch or vapor - if(!M.is_mouth_covered() && !M.is_eyes_covered()) - unprotected = TRUE + if((methods & INGEST) || ((methods & (TOUCH|PATCH|VAPOR)) && !M.is_mouth_covered() && !M.is_eyes_covered())) + unprotected = TRUE if(unprotected) if(!M.getorganslot(ORGAN_SLOT_EYES)) //can't blind somebody with no eyes to_chat(M, "Your eye sockets feel wet.") @@ -747,8 +740,8 @@ color = "#97ee63" taste_description = "pure electricity" -/datum/reagent/consumable/liquidelectricity/expose_mob(mob/living/M, method=TOUCH, reac_volume) //can't be on life because of the way blood works. - if((method == INGEST || method == INJECT || method == PATCH) && iscarbon(M)) +/datum/reagent/consumable/liquidelectricity/expose_mob(mob/living/M, methods=TOUCH, reac_volume) //can't be on life because of the way blood works. + if((methods & (INGEST|INJECT|PATCH)) && iscarbon(M)) var/mob/living/carbon/C = M var/obj/item/organ/stomach/ethereal/stomach = C.getorganslot(ORGAN_SLOT_STOMACH) if(istype(stomach)) diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index ec6a4763ded..f47b6976db2 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -232,7 +232,7 @@ ..() . = 1 -/datum/reagent/medicine/rezadone/expose_mob(mob/living/M, method=TOUCH, reac_volume) +/datum/reagent/medicine/rezadone/expose_mob(mob/living/M, methods=TOUCH, reac_volume) . = ..() if(iscarbon(M)) var/mob/living/carbon/patient = M @@ -326,9 +326,9 @@ ..() return TRUE -/datum/reagent/medicine/mine_salve/expose_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1) +/datum/reagent/medicine/mine_salve/expose_mob(mob/living/M, methods=TOUCH, reac_volume, show_message = 1) if(iscarbon(M) && M.stat != DEAD) - if(method in list(INGEST, VAPOR, INJECT)) + if(methods & (INGEST|VAPOR|INJECT)) M.adjust_nutrition(-5) if(show_message) to_chat(M, "Your stomach feels empty and cramps!") @@ -766,13 +766,13 @@ if(chems.has_reagent(type, 1)) mytray.spawnplant() -/datum/reagent/medicine/strange_reagent/expose_mob(mob/living/M, method=TOUCH, reac_volume) +/datum/reagent/medicine/strange_reagent/expose_mob(mob/living/M, methods=TOUCH, reac_volume) if(M.stat != DEAD) return ..() if(M.suiciding || M.hellbound) //they are never coming back M.visible_message("[M]'s body does not react...") return - if(iscarbon(M) && method != INGEST) //simplemobs can still be splashed + if(iscarbon(M) && !(methods & INGEST)) //simplemobs can still be splashed return ..() var/amount_to_revive = round((M.getBruteLoss()+M.getFireLoss())/20) if(M.getBruteLoss()+M.getFireLoss() >= 200 || HAS_TRAIT(M, TRAIT_HUSK) || reac_volume < amount_to_revive) //body will die from brute+burn on revive or you haven't provided enough to revive. @@ -1272,8 +1272,8 @@ ..() . = 1 -/datum/reagent/medicine/polypyr/expose_mob(mob/living/M, method=TOUCH, reac_volume) - if(method == TOUCH || method == VAPOR) +/datum/reagent/medicine/polypyr/expose_mob(mob/living/M, methods=TOUCH, reac_volume) + if(methods & (TOUCH|VAPOR)) if(M && ishuman(M) && reac_volume >= 0.5) var/mob/living/carbon/human/H = M H.hair_color = "92f" diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index ceadbc260c2..0d50477ac59 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -16,7 +16,7 @@ if(chems.has_reagent(src.type, 1)) mytray.adjustPests(rand(2,3)) -/datum/reagent/blood/expose_mob(mob/living/L, method=TOUCH, reac_volume) +/datum/reagent/blood/expose_mob(mob/living/L, methods=TOUCH, reac_volume) if(data && data["viruses"]) for(var/thing in data["viruses"]) var/datum/disease/D = thing @@ -24,14 +24,14 @@ if((D.spread_flags & DISEASE_SPREAD_SPECIAL) || (D.spread_flags & DISEASE_SPREAD_NON_CONTAGIOUS)) continue - if((method == TOUCH || method == VAPOR) && (D.spread_flags & DISEASE_SPREAD_CONTACT_FLUIDS)) + if((methods & (TOUCH|VAPOR)) && (D.spread_flags & DISEASE_SPREAD_CONTACT_FLUIDS)) L.ContactContractDisease(D) else //ingest, patch or inject L.ForceContractDisease(D) if(iscarbon(L)) var/mob/living/carbon/C = L - if(C.get_blood_id() == /datum/reagent/blood && (method == INJECT || (method == INGEST && C.dna && C.dna.species && (DRINKSBLOOD in C.dna.species.species_traits)))) + if(C.get_blood_id() == /datum/reagent/blood && ((methods & INJECT) || ((methods & INGEST) && C.dna && C.dna.species && (DRINKSBLOOD in C.dna.species.species_traits)))) if(!data || !(data["blood_type"] in get_safe_blood(C.dna.blood_type))) C.reagents.add_reagent(/datum/reagent/toxin, reac_volume * 0.5) else @@ -105,8 +105,8 @@ color = "#C81040" // rgb: 200, 16, 64 taste_description = "slime" -/datum/reagent/vaccine/expose_mob(mob/living/L, method=TOUCH, reac_volume) - if(islist(data) && (method == INGEST || method == INJECT)) +/datum/reagent/vaccine/expose_mob(mob/living/L, methods=TOUCH, reac_volume) + if(islist(data) && (methods & (INGEST|INJECT))) for(var/thing in L.diseases) var/datum/disease/D = thing if(D.GetDiseaseID() in data) @@ -193,10 +193,10 @@ * Water reaction to a mob */ -/datum/reagent/water/expose_mob(mob/living/M, method=TOUCH, reac_volume)//Splashing people with water can help put them out! +/datum/reagent/water/expose_mob(mob/living/M, methods=TOUCH, reac_volume)//Splashing people with water can help put them out! if(!istype(M)) return - if(method == TOUCH) + if(methods & TOUCH) M.adjust_fire_stacks(-(reac_volume / 10)) M.ExtinguishMob() ..() @@ -232,7 +232,7 @@ REMOVE_TRAIT(L, TRAIT_HOLY, type) ..() -/datum/reagent/water/holywater/expose_mob(mob/living/M, method=TOUCH, reac_volume) +/datum/reagent/water/holywater/expose_mob(mob/living/M, methods=TOUCH, reac_volume) if(iscultist(M)) to_chat(M, "A vile holiness begins to spread its shining tendrils through your mind, purging the Geometer of Blood's influence!") ..() @@ -316,10 +316,10 @@ * Water reaction to a mob */ -/datum/reagent/hydrogen_peroxide/expose_mob(mob/living/M, method=TOUCH, reac_volume)//Splashing people with h2o2 can burn them ! +/datum/reagent/hydrogen_peroxide/expose_mob(mob/living/M, methods=TOUCH, reac_volume)//Splashing people with h2o2 can burn them ! if(!istype(M)) return - if(method == TOUCH) + if(methods & TOUCH) M.adjustFireLoss(2, 0) // burns ..() @@ -329,8 +329,8 @@ taste_description = "suffering" metabolization_rate = 2.5 * REAGENTS_METABOLISM //1u/tick -/datum/reagent/fuel/unholywater/expose_mob(mob/living/M, method=TOUCH, reac_volume) - if(method == TOUCH || method == VAPOR) +/datum/reagent/fuel/unholywater/expose_mob(mob/living/M, methods=TOUCH, reac_volume) + if(methods & (TOUCH|VAPOR)) M.reagents.add_reagent(type,reac_volume/4) return return ..() @@ -400,9 +400,9 @@ overdose_threshold = 11 //Slightly more than one un-nozzled spraybottle. taste_description = "sour oranges" -/datum/reagent/spraytan/expose_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1) +/datum/reagent/spraytan/expose_mob(mob/living/M, methods=TOUCH, reac_volume, show_message = 1) if(ishuman(M)) - if(method == PATCH || method == VAPOR) + if(methods & (PATCH|VAPOR)) var/mob/living/carbon/human/N = M if(N.dna.species.id == "human") switch(N.skin_tone) @@ -459,9 +459,8 @@ - if(method == INGEST) - if(show_message) - to_chat(M, "That tasted horrible.") + if((methods & INGEST) && show_message) + to_chat(M, "That tasted horrible.") ..() @@ -685,8 +684,8 @@ color = "#13BC5E" // rgb: 19, 188, 94 taste_description = "slime" -/datum/reagent/aslimetoxin/expose_mob(mob/living/L, method=TOUCH, reac_volume) - if(method != TOUCH) +/datum/reagent/aslimetoxin/expose_mob(mob/living/L, methods=TOUCH, reac_volume) + if(methods & ~TOUCH) L.ForceContractDisease(new /datum/disease/transformation/slime(), FALSE, TRUE) /datum/reagent/gluttonytoxin @@ -696,7 +695,7 @@ can_synth = FALSE taste_description = "decay" -/datum/reagent/gluttonytoxin/expose_mob(mob/living/L, method=TOUCH, reac_volume) +/datum/reagent/gluttonytoxin/expose_mob(mob/living/L, methods=TOUCH, reac_volume) L.ForceContractDisease(new /datum/disease/transformation/morph(), FALSE, TRUE) /datum/reagent/serotrotium @@ -905,8 +904,8 @@ color = "#D0EFEE" // space cleaner but lighter taste_description = "bitterness" -/datum/reagent/space_cleaner/sterilizine/expose_mob(mob/living/carbon/C, method=TOUCH, reac_volume) - if(method in list(TOUCH, VAPOR, PATCH)) +/datum/reagent/space_cleaner/sterilizine/expose_mob(mob/living/carbon/C, methods=TOUCH, reac_volume) + if(methods & (TOUCH|VAPOR|PATCH)) for(var/s in C.surgeries) var/datum/surgery/S = s S.speed_modifier = max(0.2, S.speed_modifier) @@ -926,7 +925,7 @@ C.blood_volume += 0.5 ..() -/datum/reagent/iron/expose_mob(mob/living/M, method=TOUCH, reac_volume) +/datum/reagent/iron/expose_mob(mob/living/M, methods=TOUCH, reac_volume) if(M.has_bane(BANE_IRON)) //If the target is weak to cold iron, then poison them. if(holder && holder.chem_temp < 100) // COLD iron. M.reagents.add_reagent(/datum/reagent/toxin, reac_volume) @@ -948,7 +947,7 @@ taste_description = "expensive yet reasonable metal" material = /datum/material/silver -/datum/reagent/silver/expose_mob(mob/living/M, method=TOUCH, reac_volume) +/datum/reagent/silver/expose_mob(mob/living/M, methods=TOUCH, reac_volume) if(M.has_bane(BANE_SILVER)) M.reagents.add_reagent(/datum/reagent/toxin, reac_volume) ..() @@ -1006,8 +1005,8 @@ taste_description = "fizzling blue" material = /datum/material/bluespace -/datum/reagent/bluespace/expose_mob(mob/living/M, method=TOUCH, reac_volume) - if(method == TOUCH || method == VAPOR) +/datum/reagent/bluespace/expose_mob(mob/living/M, methods=TOUCH, reac_volume) + if(methods & (TOUCH|VAPOR)) do_teleport(M, get_turf(M), (reac_volume / 5), asoundin = 'sound/effects/phasein.ogg', channel = TELEPORT_CHANNEL_BLUESPACE) //4 tiles per crystal ..() @@ -1046,8 +1045,8 @@ glass_name = "glass of welder fuel" glass_desc = "Unless you're an industrial tool, this is probably not safe for consumption." -/datum/reagent/fuel/expose_mob(mob/living/M, method=TOUCH, reac_volume)//Splashing people with welding fuel to make them easy to ignite! - if(method == TOUCH || method == VAPOR) +/datum/reagent/fuel/expose_mob(mob/living/M, methods=TOUCH, reac_volume)//Splashing people with welding fuel to make them easy to ignite! + if(methods & (TOUCH|VAPOR)) M.adjust_fire_stacks(reac_volume / 10) return ..() @@ -1080,8 +1079,8 @@ for(var/mob/living/simple_animal/slime/M in T) M.adjustToxLoss(rand(5,10)) -/datum/reagent/space_cleaner/expose_mob(mob/living/M, method=TOUCH, reac_volume) - if(method == TOUCH || method == VAPOR) +/datum/reagent/space_cleaner/expose_mob(mob/living/M, methods=TOUCH, reac_volume) + if(methods & (TOUCH|VAPOR)) M.wash(clean_types) /datum/reagent/space_cleaner/ez_clean @@ -1096,9 +1095,9 @@ M.adjustToxLoss(3.33) ..() -/datum/reagent/space_cleaner/ez_clean/expose_mob(mob/living/M, method=TOUCH, reac_volume) +/datum/reagent/space_cleaner/ez_clean/expose_mob(mob/living/M, methods=TOUCH, reac_volume) ..() - if((method == TOUCH || method == VAPOR) && !issilicon(M)) + if((methods & (TOUCH|VAPOR)) && !issilicon(M)) M.adjustBruteLoss(1.5) M.adjustFireLoss(1.5) @@ -1137,8 +1136,8 @@ can_synth = FALSE taste_description = "sludge" -/datum/reagent/nanomachines/expose_mob(mob/living/L, method=TOUCH, reac_volume, show_message = 1, touch_protection = 0) - if(method==PATCH || method==INGEST || method==INJECT || (method == VAPOR && prob(min(reac_volume,100)*(1 - touch_protection)))) +/datum/reagent/nanomachines/expose_mob(mob/living/L, methods=TOUCH, reac_volume, show_message = 1, touch_protection = 0) + if((methods & (PATCH|INGEST|INJECT)) || ((methods & VAPOR) && prob(min(reac_volume,100)*(1 - touch_protection)))) L.ForceContractDisease(new /datum/disease/transformation/robot(), FALSE, TRUE) /datum/reagent/xenomicrobes @@ -1148,8 +1147,8 @@ can_synth = FALSE taste_description = "sludge" -/datum/reagent/xenomicrobes/expose_mob(mob/living/L, method=TOUCH, reac_volume, show_message = 1, touch_protection = 0) - if(method==PATCH || method==INGEST || method==INJECT || (method == VAPOR && prob(min(reac_volume,100)*(1 - touch_protection)))) +/datum/reagent/xenomicrobes/expose_mob(mob/living/L, methods=TOUCH, reac_volume, show_message = 1, touch_protection = 0) + if((methods & (PATCH|INGEST|INJECT)) || ((methods & VAPOR) && prob(min(reac_volume,100)*(1 - touch_protection)))) L.ForceContractDisease(new /datum/disease/transformation/xeno(), FALSE, TRUE) /datum/reagent/fungalspores @@ -1159,8 +1158,8 @@ can_synth = FALSE taste_description = "slime" -/datum/reagent/fungalspores/expose_mob(mob/living/L, method=TOUCH, reac_volume, show_message = 1, touch_protection = 0) - if(method==PATCH || method==INGEST || method==INJECT || (method == VAPOR && prob(min(reac_volume,100)*(1 - touch_protection)))) +/datum/reagent/fungalspores/expose_mob(mob/living/L, methods=TOUCH, reac_volume, show_message = 1, touch_protection = 0) + if((methods & (PATCH|INGEST|INJECT)) || ((methods & VAPOR) && prob(min(reac_volume,100)*(1 - touch_protection)))) L.ForceContractDisease(new /datum/disease/tuberculosis(), FALSE, TRUE) /datum/reagent/snail @@ -1170,8 +1169,8 @@ taste_description = "goo" can_synth = FALSE //special orange man request -/datum/reagent/snail/expose_mob(mob/living/L, method=TOUCH, reac_volume, show_message = 1, touch_protection = 0) - if(method==PATCH || method==INGEST || method==INJECT || (method == VAPOR && prob(min(reac_volume,100)*(1 - touch_protection)))) +/datum/reagent/snail/expose_mob(mob/living/L, methods=TOUCH, reac_volume, show_message = 1, touch_protection = 0) + if((methods & (PATCH|INGEST|INJECT)) || ((methods & VAPOR) && prob(min(reac_volume,100)*(1 - touch_protection)))) L.ForceContractDisease(new /datum/disease/gastrolosis(), FALSE, TRUE) /datum/reagent/fluorosurfactant//foam precursor @@ -1264,8 +1263,8 @@ var/temp = holder ? holder.chem_temp : T20C T.atmos_spawn_air("n2o=[reac_volume/5];TEMP=[temp]") -/datum/reagent/nitrous_oxide/expose_mob(mob/living/M, method=TOUCH, reac_volume) - if(method == VAPOR) +/datum/reagent/nitrous_oxide/expose_mob(mob/living/M, methods=TOUCH, reac_volume) + if(methods & VAPOR) M.drowsyness += max(round(reac_volume, 1), 2) /datum/reagent/nitrous_oxide/on_mob_life(mob/living/carbon/M) @@ -1748,10 +1747,10 @@ taste_description = "acid" -/datum/reagent/acetone_oxide/expose_mob(mob/living/M, method=TOUCH, reac_volume)//Splashing people kills people! +/datum/reagent/acetone_oxide/expose_mob(mob/living/M, methods=TOUCH, reac_volume)//Splashing people kills people! if(!istype(M)) return - if(method == TOUCH) + if(methods & TOUCH) M.adjustFireLoss(2, FALSE) // burns, M.adjust_fire_stacks((reac_volume / 10)) ..() @@ -1828,8 +1827,8 @@ /datum/reagent/hair_dye/proc/UpdateColor() color = pick(potential_colors) -/datum/reagent/hair_dye/expose_mob(mob/living/M, method=TOUCH, reac_volume) - if(method == TOUCH || method == VAPOR) +/datum/reagent/hair_dye/expose_mob(mob/living/M, methods=TOUCH, reac_volume) + if(methods & (TOUCH|VAPOR)) if(M && ishuman(M)) var/mob/living/carbon/human/H = M H.hair_color = pick(potential_colors) @@ -1843,16 +1842,15 @@ color = "#A86B45" //hair is brown taste_description = "sourness" -/datum/reagent/barbers_aid/expose_mob(mob/living/M, method=TOUCH, reac_volume) - if(method == TOUCH || method == VAPOR) - if(M && ishuman(M) && !HAS_TRAIT(M, TRAIT_BALD)) - var/mob/living/carbon/human/H = M - var/datum/sprite_accessory/hair/picked_hair = pick(GLOB.hairstyles_list) - var/datum/sprite_accessory/facial_hair/picked_beard = pick(GLOB.facial_hairstyles_list) - to_chat(H, "Hair starts sprouting from your scalp.") - H.hairstyle = picked_hair - H.facial_hairstyle = picked_beard - H.update_hair() +/datum/reagent/barbers_aid/expose_mob(mob/living/M, methods=TOUCH, reac_volume) + if((methods & (TOUCH|VAPOR)) && ishuman(M) && !HAS_TRAIT(M, TRAIT_BALD)) + var/mob/living/carbon/human/exposed_human = M + var/datum/sprite_accessory/hair/picked_hair = pick(GLOB.hairstyles_list) + var/datum/sprite_accessory/facial_hair/picked_beard = pick(GLOB.facial_hairstyles_list) + to_chat(exposed_human, "Hair starts sprouting from your scalp.") + exposed_human.hairstyle = picked_hair + exposed_human.facial_hairstyle = picked_beard + exposed_human.update_hair() /datum/reagent/concentrated_barbers_aid name = "Concentrated Barber's Aid" @@ -1861,8 +1859,8 @@ color = "#7A4E33" //hair is dark browmn taste_description = "sourness" -/datum/reagent/concentrated_barbers_aid/expose_mob(mob/living/M, method=TOUCH, reac_volume) - if(method == TOUCH || method == VAPOR) +/datum/reagent/concentrated_barbers_aid/expose_mob(mob/living/M, methods=TOUCH, reac_volume) + if(methods & (TOUCH|VAPOR)) if(M && ishuman(M) && !HAS_TRAIT(M, TRAIT_BALD)) var/mob/living/carbon/human/H = M to_chat(H, "Your hair starts growing at an incredible speed!") @@ -1877,14 +1875,13 @@ color = "#ecb2cf" taste_description = "bitterness" -/datum/reagent/baldium/expose_mob(mob/living/M, method=TOUCH, reac_volume) - if(method == TOUCH || method == VAPOR) - if(M && ishuman(M)) - var/mob/living/carbon/human/H = M - to_chat(H, "Your hair is falling out in clumps!") - H.hairstyle = "Bald" - H.facial_hairstyle = "Shaved" - H.update_hair() +/datum/reagent/baldium/expose_mob(mob/living/M, methods=TOUCH, reac_volume) + if((methods & (TOUCH|VAPOR)) && ishuman(M)) + var/mob/living/carbon/human/exposed_human = M + to_chat(exposed_human, "Your hair is falling out in clumps!") + exposed_human.hairstyle = "Bald" + exposed_human.facial_hairstyle = "Shaved" + exposed_human.update_hair() /datum/reagent/saltpetre name = "Saltpetre" @@ -1999,7 +1996,7 @@ can_synth = FALSE taste_description = "brains" -/datum/reagent/romerol/expose_mob(mob/living/carbon/human/H, method=TOUCH, reac_volume) +/datum/reagent/romerol/expose_mob(mob/living/carbon/human/H, methods=TOUCH, reac_volume) // Silently add the zombie infection organ to be activated upon death if(!H.getorganslot(ORGAN_SLOT_ZOMBIE)) var/obj/item/organ/zombie_infection/nodamage/ZI = new() @@ -2168,8 +2165,8 @@ taste_description = "inner peace" can_synth = FALSE -/datum/reagent/tranquility/expose_mob(mob/living/L, method=TOUCH, reac_volume, show_message = 1, touch_protection = 0) - if(method==PATCH || method==INGEST || method==INJECT || (method == VAPOR && prob(min(reac_volume,100)*(1 - touch_protection)))) +/datum/reagent/tranquility/expose_mob(mob/living/L, methods=TOUCH, reac_volume, show_message = 1, touch_protection = 0) + if((methods & (PATCH|INGEST|INJECT)) || ((methods & VAPOR) && prob(min(reac_volume,100)*(1 - touch_protection)))) L.ForceContractDisease(new /datum/disease/transformation/gondola(), FALSE, TRUE) @@ -2222,8 +2219,8 @@ yuck_cycle = 0 // reset vomiting return ..() -/datum/reagent/yuck/on_transfer(atom/A, method=TOUCH, trans_volume) - if(method == INGEST || !iscarbon(A)) +/datum/reagent/yuck/on_transfer(atom/A, methods=TOUCH, trans_volume) + if((methods & INGEST) || !iscarbon(A)) return ..() A.reagents.remove_reagent(type, trans_volume) diff --git a/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm b/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm index 505a716126c..3c3b9483cd4 100644 --- a/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm @@ -69,9 +69,9 @@ if(prob(reac_volume)) W.ScrapeAway() -/datum/reagent/clf3/expose_mob(mob/living/M, method=TOUCH, reac_volume) +/datum/reagent/clf3/expose_mob(mob/living/M, methods=TOUCH, reac_volume) if(istype(M)) - if(method != INGEST && method != INJECT) + if(methods & (TOUCH|VAPOR|PATCH)) M.adjust_fire_stacks(min(reac_volume/5, 10)) M.IgniteMob() if(!locate(/obj/effect/hotspot) in M.loc) @@ -158,7 +158,7 @@ taste_description = "burning" self_consuming = TRUE -/datum/reagent/phlogiston/expose_mob(mob/living/M, method=TOUCH, reac_volume) +/datum/reagent/phlogiston/expose_mob(mob/living/M, methods=TOUCH, reac_volume) M.adjust_fire_stacks(1) var/burndmg = max(0.3*M.fire_stacks, 0.3) M.adjustFireLoss(burndmg, 0) @@ -193,9 +193,9 @@ M.adjust_fire_stacks(1) ..() -/datum/reagent/napalm/expose_mob(mob/living/M, method=TOUCH, reac_volume) +/datum/reagent/napalm/expose_mob(mob/living/M, methods=TOUCH, reac_volume) if(istype(M)) - if(method != INGEST && method != INJECT) + if(methods & (TOUCH|VAPOR|PATCH)) M.adjust_fire_stacks(min(reac_volume/4, 20)) /datum/reagent/cryostylane @@ -310,8 +310,8 @@ /datum/reagent/firefighting_foam/expose_obj(obj/O, reac_volume) O.extinguish() -/datum/reagent/firefighting_foam/expose_mob(mob/living/M, method=TOUCH, reac_volume) - if(method in list(VAPOR, TOUCH)) +/datum/reagent/firefighting_foam/expose_mob(mob/living/M, methods=TOUCH, reac_volume) + if(methods & (TOUCH|VAPOR)) M.adjust_fire_stacks(-reac_volume) M.ExtinguishMob() ..() diff --git a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm index 02be6e33be3..4da66edc3c0 100644 --- a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm @@ -38,12 +38,12 @@ taste_description = "slime" taste_mult = 0.9 -/datum/reagent/toxin/mutagen/expose_mob(mob/living/carbon/M, method=TOUCH, reac_volume) +/datum/reagent/toxin/mutagen/expose_mob(mob/living/carbon/M, methods=TOUCH, reac_volume) if(!..()) return if(!M.has_dna() || HAS_TRAIT(M, TRAIT_GENELESS) || HAS_TRAIT(M, TRAIT_BADDNA)) return //No robots, AIs, aliens, Ians or other mobs should be affected by this. - if((method==VAPOR && prob(min(33, reac_volume))) || method==INGEST || method==PATCH || method==INJECT) + if(((methods & VAPOR) && prob(min(33, reac_volume))) || (methods & (INGEST|PATCH|INJECT))) M.randmuti() if(prob(98)) M.easy_randmut(NEGATIVE+MINOR_NEGATIVE) @@ -102,8 +102,8 @@ if(temp >= LIQUID_PLASMA_BP) T.atmos_spawn_air("plasma=[reac_volume];TEMP=[temp]") -/datum/reagent/toxin/plasma/expose_mob(mob/living/M, method=TOUCH, reac_volume)//Splashing people with plasma is stronger than fuel! - if(method == TOUCH || method == VAPOR) +/datum/reagent/toxin/plasma/expose_mob(mob/living/M, methods=TOUCH, reac_volume)//Splashing people with plasma is stronger than fuel! + if(methods & (TOUCH|VAPOR)) M.adjust_fire_stacks(reac_volume / 5) return ..() @@ -208,9 +208,9 @@ L.cure_fakedeath(type) ..() -/datum/reagent/toxin/zombiepowder/expose_mob(mob/living/L, method=TOUCH, reac_volume) +/datum/reagent/toxin/zombiepowder/expose_mob(mob/living/L, methods=TOUCH, reac_volume) L.adjustOxyLoss(0.5*REM, 0) - if(method == INGEST) + if(methods & INGEST) var/datum/reagent/toxin/zombiepowder/Z = L.reagents.has_reagent(/datum/reagent/toxin/zombiepowder) if(istype(Z)) Z.fakedeath_active = TRUE @@ -287,13 +287,11 @@ var/obj/structure/spacevine/SV = O SV.on_chem_effect(src) -/datum/reagent/toxin/plantbgone/expose_mob(mob/living/M, method=TOUCH, reac_volume) - if(method == VAPOR) - if(iscarbon(M)) - var/mob/living/carbon/C = M - if(!C.wear_mask) // If not wearing a mask - var/damage = min(round(0.4*reac_volume, 0.1),10) - C.adjustToxLoss(damage) +/datum/reagent/toxin/plantbgone/expose_mob(mob/living/M, methods=TOUCH, reac_volume) + if((methods & VAPOR) && iscarbon(M)) + var/mob/living/carbon/exposed_carbon = M + if(!exposed_carbon.wear_mask) + exposed_carbon.adjustToxLoss(min(round(0.4 * reac_volume, 0.1), 10)) /datum/reagent/toxin/plantbgone/weedkiller name = "Weed Killer" @@ -322,7 +320,7 @@ mytray.adjustToxic(round(chems.get_reagent_amount(type) * 1)) mytray.adjustPests(-rand(1,2)) -/datum/reagent/toxin/pestkiller/expose_mob(mob/living/M, method=TOUCH, reac_volume) +/datum/reagent/toxin/pestkiller/expose_mob(mob/living/M, methods=TOUCH, reac_volume) ..() if(M.mob_biotypes & MOB_BUG) var/damage = min(round(0.4*reac_volume, 0.1),10) @@ -583,8 +581,8 @@ metabolization_rate = 0.4 * REAGENTS_METABOLISM toxpwr = 0 -/datum/reagent/toxin/itching_powder/expose_mob(mob/living/M, method=TOUCH, reac_volume) - if(method == TOUCH || method == VAPOR) +/datum/reagent/toxin/itching_powder/expose_mob(mob/living/M, methods=TOUCH, reac_volume) + if(methods & (TOUCH|VAPOR)) M.reagents?.add_reagent(/datum/reagent/toxin/itching_powder, reac_volume) /datum/reagent/toxin/itching_powder/on_mob_life(mob/living/carbon/M) @@ -841,14 +839,14 @@ mytray.adjustToxic(round(chems.get_reagent_amount(type) * 1.5)) mytray.adjustWeeds(-rand(1,2)) -/datum/reagent/toxin/acid/expose_mob(mob/living/carbon/C, method=TOUCH, reac_volume) +/datum/reagent/toxin/acid/expose_mob(mob/living/carbon/C, methods=TOUCH, reac_volume) if(!istype(C)) return reac_volume = round(reac_volume,0.1) - if(method == INGEST) + if(methods & INGEST) C.adjustBruteLoss(min(6*toxpwr, reac_volume * toxpwr)) return - if(method == INJECT) + if(methods & INJECT) C.adjustBruteLoss(1.5 * min(6*toxpwr, reac_volume * toxpwr)) return C.acid_act(acidpwr, reac_volume) diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index fb2e586244f..3afae78b534 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -68,9 +68,9 @@ */ /obj/item/reagent_containers/on_accidental_consumption(mob/living/carbon/M, mob/living/carbon/user, obj/item/source_item, discover_after = TRUE) M.losebreath += 2 - reagents?.trans_to(M, min(15, reagents.total_volume / rand(5,10)), transfered_by = user, method = INGEST) + reagents?.trans_to(M, min(15, reagents.total_volume / rand(5,10)), transfered_by = user, methods = INGEST) if(source_item?.reagents) - reagents.trans_to(source_item, min(source_item.reagents.total_volume / 2, reagents.total_volume / 5), transfered_by = user, method = TOUCH) + reagents.trans_to(source_item, min(source_item.reagents.total_volume / 2, reagents.total_volume / 5), transfered_by = user, methods = TOUCH) return ..() diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm index 7f1cb8d35e9..e9a8db98b44 100644 --- a/code/modules/reagents/reagent_containers/borghydro.dm +++ b/code/modules/reagents/reagent_containers/borghydro.dm @@ -114,7 +114,7 @@ Borg Hypospray to_chat(M, "You feel a tiny prick!") to_chat(user, "You inject [M] with the injector.") if(M.reagents) - var/trans = R.trans_to(M, amount_per_transfer_from_this, transfered_by = user, method = INJECT) + var/trans = R.trans_to(M, amount_per_transfer_from_this, transfered_by = user, methods = INJECT) to_chat(user, "[trans] unit\s injected. [R.total_volume] unit\s remaining.") var/list/injected = list() diff --git a/code/modules/reagents/reagent_containers/dropper.dm b/code/modules/reagents/reagent_containers/dropper.dm index fedec9c622d..f65a21cf1ef 100644 --- a/code/modules/reagents/reagent_containers/dropper.dm +++ b/code/modules/reagents/reagent_containers/dropper.dm @@ -38,7 +38,7 @@ if(!safe_thing.reagents) safe_thing.create_reagents(100) - trans = reagents.trans_to(safe_thing, amount_per_transfer_from_this, transfered_by = user, method = TOUCH) + trans = reagents.trans_to(safe_thing, amount_per_transfer_from_this, transfered_by = user, methods = TOUCH) target.visible_message("[user] tries to squirt something into [target]'s eyes, but fails!", \ "[user] tries to squirt something into your eyes, but fails!") diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index 3179d4d5857..4a9d8b9765b 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -45,7 +45,7 @@ if(M.reagents) var/trans = 0 if(!infinite) - trans = reagents.trans_to(M, amount_per_transfer_from_this, transfered_by = user, method = INJECT) + trans = reagents.trans_to(M, amount_per_transfer_from_this, transfered_by = user, methods = INJECT) else reagents.expose(M, INJECT, fraction) trans = reagents.copy_to(M, amount_per_transfer_from_this) diff --git a/code/modules/reagents/reagent_containers/medigel.dm b/code/modules/reagents/reagent_containers/medigel.dm index f8a11e186b9..40833177bd7 100644 --- a/code/modules/reagents/reagent_containers/medigel.dm +++ b/code/modules/reagents/reagent_containers/medigel.dm @@ -71,7 +71,7 @@ else log_combat(user, M, "applied", src, reagents.log_list()) playsound(src, 'sound/effects/spray.ogg', 30, TRUE, -6) - reagents.trans_to(M, amount_per_transfer_from_this, transfered_by = user, method = apply_type) + reagents.trans_to(M, amount_per_transfer_from_this, transfered_by = user, methods = apply_type) return /obj/item/reagent_containers/medigel/libital diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm index 1766949e89d..72452a16675 100644 --- a/code/modules/reagents/reagent_containers/pill.dm +++ b/code/modules/reagents/reagent_containers/pill.dm @@ -50,7 +50,7 @@ addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, M, "[pick(strings(REDPILL_FILE, "redpill_questions"))]"), 50) if(reagents.total_volume) - reagents.trans_to(M, reagents.total_volume, transfered_by = user, method = apply_type) + reagents.trans_to(M, reagents.total_volume, transfered_by = user, methods = apply_type) qdel(src) return TRUE @@ -73,13 +73,13 @@ reagents.trans_to(target, reagents.total_volume, transfered_by = user) qdel(src) -/* +/* * On accidental consumption, consume the pill */ /obj/item/reagent_containers/pill/on_accidental_consumption(mob/living/carbon/M, mob/living/carbon/user, obj/item/source_item, discover_after = FALSE) to_chat(M, "You swallow something small. Was that in \the [source_item]?") if(reagents?.total_volume) - reagents.trans_to(M, reagents.total_volume, transfered_by = user, method = INGEST) + reagents.trans_to(M, reagents.total_volume, transfered_by = user, methods = INGEST) source_item?.contents -= src qdel(src) diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 0aa074a33cd..7485ed6ddb2 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -150,20 +150,20 @@ log_combat(user, L, "injected", src, addition="which had [contained]") else L.log_message("injected themselves ([contained]) with [src.name]", LOG_ATTACK, color="orange") - reagents.trans_to(target, amount_per_transfer_from_this, transfered_by = user, method = INJECT) + reagents.trans_to(target, amount_per_transfer_from_this, transfered_by = user, methods = INJECT) to_chat(user, "You inject [amount_per_transfer_from_this] units of the solution. The syringe now contains [reagents.total_volume] units.") if (reagents.total_volume <= 0 && mode==SYRINGE_INJECT) mode = SYRINGE_DRAW update_icon() -/* +/* * On accidental consumption, inject the eater with 2/3rd of the syringe and reveal it */ /obj/item/reagent_containers/syringe/on_accidental_consumption(mob/living/carbon/M, mob/living/carbon/user, obj/item/source_item, discover_after = TRUE) to_chat(M, "There's a syringe in \the [source_item]!!") - M.apply_damage(5, BRUTE, BODY_ZONE_HEAD) + M.apply_damage(5, BRUTE, BODY_ZONE_HEAD) if(reagents?.total_volume) - reagents.trans_to(M, round(reagents.total_volume*(2/3)), transfered_by = user, method = INJECT) + reagents.trans_to(M, round(reagents.total_volume*(2/3)), transfered_by = user, methods = INJECT) return discover_after diff --git a/code/modules/research/designs/autolathe_designs.dm b/code/modules/research/designs/autolathe_designs.dm index 9d091d72409..c8fa1a1dc24 100644 --- a/code/modules/research/designs/autolathe_designs.dm +++ b/code/modules/research/designs/autolathe_designs.dm @@ -558,6 +558,15 @@ category = list("initial", "Medical", "Tool Designs") departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE +/datum/design/stethoscope + name = "Stethoscope" + id = "stethoscope" + build_type = AUTOLATHE | PROTOLATHE + materials = list(/datum/material/iron = 1000) + build_path = /obj/item/clothing/neck/stethoscope + category = list("initial", "Medical", "Tool Designs") + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL + /datum/design/beaker name = "Beaker" id = "beaker" diff --git a/code/modules/research/techweb/all_nodes.dm b/code/modules/research/techweb/all_nodes.dm index 8dd831bf197..ed42841fb58 100644 --- a/code/modules/research/techweb/all_nodes.dm +++ b/code/modules/research/techweb/all_nodes.dm @@ -56,7 +56,7 @@ starting_node = TRUE display_name = "Basic Medical Equipment" description = "Basic medical tools and equipment." - design_ids = list("cybernetic_liver", "cybernetic_heart", "cybernetic_lungs","cybernetic_stomach", "scalpel", "circular_saw", "bonesetter", "surgicaldrill", "retractor", "cautery", "hemostat", + design_ids = list("cybernetic_liver", "cybernetic_heart", "cybernetic_lungs","cybernetic_stomach", "scalpel", "circular_saw", "bonesetter", "surgicaldrill", "retractor", "cautery", "hemostat", "stethoscope", "surgical_drapes", "syringe", "plumbing_rcd", "beaker", "large_beaker", "xlarge_beaker", "dropper", "defibmountdefault", "surgical_tape", "portable_chem_mixer") /////////////////////////Biotech///////////////////////// diff --git a/code/modules/research/xenobiology/crossbreeding/_status_effects.dm b/code/modules/research/xenobiology/crossbreeding/_status_effects.dm index f49b4c7ded1..3f072210a85 100644 --- a/code/modules/research/xenobiology/crossbreeding/_status_effects.dm +++ b/code/modules/research/xenobiology/crossbreeding/_status_effects.dm @@ -317,15 +317,12 @@ duration = 600 /datum/status_effect/timecookie/on_apply() - if(ishuman(owner)) - var/mob/living/carbon/human/H - H.physiology.do_after_speed *= 0.95 + owner.add_actionspeed_modifier(/datum/actionspeed_modifier/timecookie) return ..() /datum/status_effect/timecookie/on_remove() - if(ishuman(owner)) - var/mob/living/carbon/human/H - H.physiology.do_after_speed /= 0.95 + owner.remove_actionspeed_modifier(/datum/actionspeed_modifier/timecookie) + return ..() /datum/status_effect/lovecookie id = "lovecookie" diff --git a/code/modules/security_levels/security_levels.dm b/code/modules/security_levels/security_levels.dm index 0a8e4073d82..882d93e891f 100644 --- a/code/modules/security_levels/security_levels.dm +++ b/code/modules/security_levels/security_levels.dm @@ -60,7 +60,7 @@ GLOBAL_VAR_INIT(security_level, SEC_LEVEL_GREEN) if(is_station_level(FA.z)) FA.update_icon() for(var/obj/machinery/computer/shuttle/pod/pod in GLOB.machines) - pod.admin_controlled = 0 + pod.admin_controlled = FALSE if(SEC_LEVEL_DELTA) minor_announce(CONFIG_GET(string/alert_delta), "Attention! Delta security level reached!",1) if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL) @@ -73,7 +73,7 @@ GLOBAL_VAR_INIT(security_level, SEC_LEVEL_GREEN) if(is_station_level(FA.z)) FA.update_icon() for(var/obj/machinery/computer/shuttle/pod/pod in GLOB.machines) - pod.admin_controlled = 0 + pod.admin_controlled = FALSE if(level >= SEC_LEVEL_RED) for(var/obj/machinery/door/D in GLOB.machines) if(D.red_alert_access) diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index 34e93c30ce6..4aebab7ac15 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -5,69 +5,108 @@ icon_keyboard = "tech_key" light_color = LIGHT_COLOR_CYAN req_access = list( ) + /// ID of the attached shuttle var/shuttleId + /// Possible destinations of the attached shuttle var/possible_destinations = "" - var/admin_controlled - var/no_destination_swap = 0 + /// Variable dictating if the attached shuttle requires authorization from the admin staff to move + var/admin_controlled = FALSE + /// Variable dictating if the attached shuttle can change destinations mid-flight + var/no_destination_swap = FALSE + /// ID of the currently selected destination of the attached shuttle + var/destination + /// Authorization request cooldown to prevent request spam to admin staff + COOLDOWN_DECLARE(request_cooldown) -/obj/machinery/computer/shuttle/ui_interact(mob/user) - . = ..() +/obj/machinery/computer/shuttle/ui_interact(mob/user, datum/tgui/ui) + ui = SStgui.try_update_ui(user, src, ui) + if(!ui) + ui = new(user, src, "ShuttleConsole", name) + ui.open() + +/obj/machinery/computer/shuttle/ui_data(mob/user) + var/list/data = list() var/list/options = params2list(possible_destinations) var/obj/docking_port/mobile/M = SSshuttle.getShuttle(shuttleId) - var/dat = "Donk Co. Transportation Division
Status: [M ? M.getStatusText() : "*Missing*"]

" - if(M) - var/destination_found - for(var/obj/docking_port/stationary/S in SSshuttle.stationary) - if(!options.Find(S.id)) - continue - if(!M.check_dock(S, silent=TRUE)) - continue - destination_found = 1 - dat += "Send to [S.name]
" - if(!destination_found) - dat += "Shuttle Locked
" - if(admin_controlled) - dat += "Authorized personnel only
" - dat += "Request Authorization
" - dat += "Close" + data["docked_location"] = M ? M.get_status_text_tgui() : "Unknown" + data["status"] = M.mode == SHUTTLE_IGNITING ? "Igniting" : M.mode != SHUTTLE_IDLE ? "In Transit" : "Idle" + data["locations"] = list() + data["locked"] = FALSE + data["authorization_required"] = admin_controlled + data["timer_str"] = M ? M.getTimerStr() : "00:00" + data["destination"] = destination + if(admin_controlled) + data["status"] = "Unauthorized Access" + if(!M) + data["status"] = "Missing" + return data + for(var/obj/docking_port/stationary/S in SSshuttle.stationary) + if(!options.Find(S.id)) + continue + if(!M.check_dock(S, silent = TRUE)) + continue + var/list/location_data = list( + id = S.id, + name = S.name + ) + data["locations"] += list(location_data) + if(length(data["locations"]) == 1) + for(var/location in data["locations"]) + destination = location["id"] + data["destination"] = destination + if(!length(data["locations"])) + data["locked"] = TRUE + data["status"] = "Locked" + return data - var/datum/browser/popup = new(user, "computer", M ? M.name : "shuttle", 300, 200) - popup.set_content("
[dat]
") - popup.open() - -/obj/machinery/computer/shuttle/Topic(href, href_list) - if(..()) +/obj/machinery/computer/shuttle/ui_act(action, params) + . = ..() + if(.) return - usr.set_machine(src) - src.add_fingerprint(usr) if(!allowed(usr)) to_chat(usr, "Access denied.") return - if(href_list["move"]) - var/obj/docking_port/mobile/M = SSshuttle.getShuttle(shuttleId) - if(M.launch_status == ENDGAME_LAUNCHED) - to_chat(usr, "You've already escaped. Never going back to that place again!") - return - if(no_destination_swap) - if(M.mode == SHUTTLE_RECHARGING) - to_chat(usr, "Shuttle engines are not ready for use.") + switch(action) + if("move") + var/obj/docking_port/mobile/M = SSshuttle.getShuttle(shuttleId) + if(M.launch_status == ENDGAME_LAUNCHED) + to_chat(usr, "You've already escaped. Never going back to that place again!") return - if(M.mode != SHUTTLE_IDLE) - to_chat(usr, "Shuttle already in transit.") + if(no_destination_swap) + if(M.mode == SHUTTLE_RECHARGING) + to_chat(usr, "Shuttle engines are not ready for use.") + return + if(M.mode != SHUTTLE_IDLE) + to_chat(usr, "Shuttle already in transit.") + return + var/list/options = params2list(possible_destinations) + if(!(params["shuttle_id"] in options)) + log_admin("[usr] attempted to href dock exploit on [src] with target location \"[params["shuttle_id"]]\"") + message_admins("[usr] just attempted to href dock exploit on [src] with target location \"[params["shuttle_id"]]\"") return - if(!(href_list["move"] in params2list(possible_destinations))) - log_admin("[usr] attempted to forge a target location through a href exploit on [src] with target location \"[href_list["move"]]\"") - message_admins("[ADMIN_FULLMONTY(usr)] attempted to forge a target location through a href exploit on [src]") - return - switch(SSshuttle.moveShuttle(shuttleId, href_list["move"], 1)) - if(0) - say("Shuttle departing. Please stand away from the doors.") - log_shuttle("[key_name(usr)] has sent shuttle \"[M]\" towards \"[href_list["move"]]\", using [src].") - if(1) - to_chat(usr, "Invalid shuttle requested.") - else - to_chat(usr, "Unable to comply.") + switch(SSshuttle.moveShuttle(shuttleId, params["shuttle_id"], 1)) + if(0) + say("Shuttle departing. Please stand away from the doors.") + log_shuttle("[key_name(usr)] has sent shuttle \"[M]\" towards \"[params["shuttle_id"]]\", using [src].") + return TRUE + if(1) + to_chat(usr, "Invalid shuttle requested.") + else + to_chat(usr, "Unable to comply.") + if("set_destination") + var/target_destination = params["destination"] + if(target_destination) + destination = target_destination + return TRUE + if("request") + if(!COOLDOWN_FINISHED(src, request_cooldown)) + to_chat(usr, "CentCom is still processing last authorization request!") + return + COOLDOWN_START(src, request_cooldown, 1 MINUTES) + to_chat(usr, "Your request has been received by CentCom.") + to_chat(GLOB.admins, "FERRY: [ADMIN_LOOKUPFLW(usr)] (Move Ferry) is requesting to move the transport ferry to CentCom.") + return TRUE /obj/machinery/computer/shuttle/emag_act(mob/user) if(obj_flags & EMAGGED) diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index a5c203a2f96..0f532aec134 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -465,7 +465,7 @@ /obj/machinery/computer/shuttle/pod name = "pod control computer" - admin_controlled = 1 + admin_controlled = TRUE possible_destinations = "pod_asteroid" icon = 'icons/obj/terminals.dmi' icon_state = "dorm_available" diff --git a/code/modules/shuttle/ferry.dm b/code/modules/shuttle/ferry.dm index f7e3bda44d1..1a26a564d79 100644 --- a/code/modules/shuttle/ferry.dm +++ b/code/modules/shuttle/ferry.dm @@ -5,7 +5,6 @@ shuttleId = "ferry" possible_destinations = "ferry_home;ferry_away" req_access = list(ACCESS_CENT_GENERAL) - var/allow_silicons = FALSE var/allow_emag = FALSE @@ -24,17 +23,6 @@ /obj/machinery/computer/shuttle/ferry/request name = "ferry console" circuit = /obj/item/circuitboard/computer/ferry/request - var/last_request //prevents spamming admins - var/cooldown = 600 possible_destinations = "ferry_home;ferry_away" req_access = list(ACCESS_CENT_GENERAL) resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF - -/obj/machinery/computer/shuttle/ferry/request/Topic(href, href_list) - ..() - if(href_list["request"]) - if(last_request && (last_request + cooldown > world.time)) - return - last_request = world.time - to_chat(usr, "Your request has been received by CentCom.") - to_chat(GLOB.admins, "FERRY: [ADMIN_LOOKUPFLW(usr)] (Move Ferry) is requesting to move the transport ferry to CentCom.") diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm index 15f2875e7ed..2a1523a412d 100644 --- a/code/modules/shuttle/shuttle.dm +++ b/code/modules/shuttle/shuttle.dm @@ -708,6 +708,26 @@ else return "00:00" +/** + * Gets shuttle location status in a form of string for tgui interfaces + */ +/obj/docking_port/mobile/proc/get_status_text_tgui() + var/obj/docking_port/stationary/dockedAt = get_docked() + var/docked_at = dockedAt?.name || "Unknown" + if(istype(dockedAt, /obj/docking_port/stationary/transit)) + if(timeLeft() > 1 HOURS) + return "Hyperspace" + else + var/obj/docking_port/stationary/dst + if(mode == SHUTTLE_RECALL) + dst = previous + else + dst = destination + return "In transit towards [dst?.name || "unknown location"]" + else if(mode == SHUTTLE_RECHARGING) + return "[docked_at], recharging [getTimerStr()]" + else + return docked_at /obj/docking_port/mobile/proc/getStatusText() var/obj/docking_port/stationary/dockedAt = get_docked() @@ -727,7 +747,6 @@ else return docked_at - /obj/docking_port/mobile/proc/getDbgStatusText() var/obj/docking_port/stationary/dockedAt = get_docked() . = (dockedAt && dockedAt.name) ? dockedAt.name : "unknown" diff --git a/code/modules/surgery/dental_implant.dm b/code/modules/surgery/dental_implant.dm index 6bfe57311ab..4f9fc6d13f6 100644 --- a/code/modules/surgery/dental_implant.dm +++ b/code/modules/surgery/dental_implant.dm @@ -38,6 +38,6 @@ to_chat(owner, "You grit your teeth and burst the implanted [target.name]!") log_combat(owner, null, "swallowed an implanted pill", target) if(target.reagents.total_volume) - target.reagents.trans_to(owner, target.reagents.total_volume, transfered_by = owner, method = INGEST) + target.reagents.trans_to(owner, target.reagents.total_volume, transfered_by = owner, methods = INGEST) qdel(target) return TRUE diff --git a/code/modules/uplink/uplink_items.dm b/code/modules/uplink/uplink_items.dm index 4882de8e98d..b9dbc374ce4 100644 --- a/code/modules/uplink/uplink_items.dm +++ b/code/modules/uplink/uplink_items.dm @@ -1401,7 +1401,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) /datum/uplink_item/device_tools/syndie_jaws_of_life name = "Syndicate Jaws of Life" desc = "Based on a Nanotrasen model, this powerful tool can be used as both a crowbar and a pair of wirecutters. \ - In it's crowbar configuration, it can be used to force open airlocks. Very useful for entering the station or it's departments." + In its crowbar configuration, it can be used to force open airlocks. Very useful for entering the station or its departments." item = /obj/item/crowbar/power/syndicate cost = 4 include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) diff --git a/code/modules/vending/autodrobe.dm b/code/modules/vending/autodrobe.dm index 40626c41e87..24856fd74dc 100644 --- a/code/modules/vending/autodrobe.dm +++ b/code/modules/vending/autodrobe.dm @@ -140,7 +140,11 @@ /obj/item/clothing/suit/chaplainsuit/clownpriest = 1, /obj/item/clothing/head/clownmitre = 1, /obj/item/skub = 1, - /obj/item/clothing/suit/hooded/mysticrobe = 1) + /obj/item/clothing/suit/hooded/mysticrobe = 1, + /obj/item/clothing/under/dress/wedding_dress = 1, + /obj/item/clothing/under/suit/tuxedo = 1, + /obj/item/clothing/head/weddingveil = 1, + /obj/item/storage/belt/cummerbund = 1) refill_canister = /obj/item/vending_refill/autodrobe default_price = 180 extra_price = 360 diff --git a/html/changelog.html b/html/changelog.html index 1453f9bece0..1252e54fb5b 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -51,6 +51,40 @@ -->
+

26 August 2020

+

Arkatos updated:

+ +

Donkie updated:

+ +

Jay Smith & Michael Trauf updated:

+ +

Qustinnus updated:

+ +

TemporalOroboros updated:

+ +

floyd updated:

+ +

tralezab updated:

+ +

uomo91 updated:

+ +

25 August 2020

ATHATH updated:

GoonStation 13 Development Team diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml index ae95dd96b56..e0bdc72c3c9 100644 --- a/html/changelogs/.all_changelog.yml +++ b/html/changelogs/.all_changelog.yml @@ -42287,3 +42287,22 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py. its firing pin, and you must be holding it to do so. - bugfix: When the detective's revolver misfires from using 357 ammo, the chambered round will actually be spent now. +2020-08-26: + Arkatos: + - rscadd: Shuttle Console now uses tgui. + Donkie: + - bugfix: Fixed cyborg advanced mop being available for all cyborgs modules + Jay Smith & Michael Trauf: + - balance: The Portable Chemical Mixer no longer requires an anomaly core. + Qustinnus: + - code_imp: adds a helper to see if something is edible + TemporalOroboros: + - code_imp: Reagent exposure methods are now bitflags. There have been some additional + changes to reflect and take advantage of this. + floyd: + - code_imp: action speed modifiers + tralezab: + - imagedel: goodbye bedsheet icon state you will not be missed + uomo91: + - bugfix: Lawyers with jumpskirt preference will now actually spawn with a lawyer + jumpskirt. diff --git a/html/changelogs/AutoChangeLog-pr-52733.yml b/html/changelogs/AutoChangeLog-pr-52733.yml new file mode 100644 index 00000000000..1ba5468b8be --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-52733.yml @@ -0,0 +1,5 @@ +author: "OnlineGirlfriend" +delete-after: True +changes: + - rscadd: "wedding crate" + - rscadd: "tuxedo, wedding dress, veil, cummerbund, craftable bouquets" diff --git a/html/changelogs/AutoChangeLog-pr-52918.yml b/html/changelogs/AutoChangeLog-pr-52918.yml new file mode 100644 index 00000000000..e0f3f31a2e4 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-52918.yml @@ -0,0 +1,4 @@ +author: "Melbert" +delete-after: True +changes: + - rscadd: "Bees, if placed in a container, will pop out at the next person to open it" diff --git a/html/changelogs/AutoChangeLog-pr-52930.yml b/html/changelogs/AutoChangeLog-pr-52930.yml new file mode 100644 index 00000000000..85e01402634 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-52930.yml @@ -0,0 +1,5 @@ +author: "Iamgoofball" +delete-after: True +changes: + - balance: "Electric bolts no longer explode shit." + - bugfix: "Electric bolts no longer lag the server as a result." diff --git a/html/changelogs/AutoChangeLog-pr-53160.yml b/html/changelogs/AutoChangeLog-pr-53160.yml deleted file mode 100644 index 54a1ec45a50..00000000000 --- a/html/changelogs/AutoChangeLog-pr-53160.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Qustinnus" -delete-after: True -changes: - - code_imp: "adds a helper to see if something is edible" diff --git a/html/changelogs/AutoChangeLog-pr-53169.yml b/html/changelogs/AutoChangeLog-pr-53169.yml deleted file mode 100644 index a0e950e842e..00000000000 --- a/html/changelogs/AutoChangeLog-pr-53169.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "uomo91" -delete-after: True -changes: - - bugfix: "Lawyers with jumpskirt preference will now actually spawn with a lawyer jumpskirt." diff --git a/html/changelogs/AutoChangeLog-pr-53177.yml b/html/changelogs/AutoChangeLog-pr-53177.yml new file mode 100644 index 00000000000..d896f3da992 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-53177.yml @@ -0,0 +1,6 @@ +author: "VexingRaven" +delete-after: True +changes: + - tweak: "A few tweaks have been made to DeltaStation's surgery atmos piping" + - rscadd: "Added a missing air alarm in DeltaStation's Surgery Room B" + - rscadd: "Added an air alarm in DeltaStation's surgery observation area" diff --git a/html/changelogs/AutoChangeLog-pr-53179.yml b/html/changelogs/AutoChangeLog-pr-53179.yml new file mode 100644 index 00000000000..cd74c11c36a --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-53179.yml @@ -0,0 +1,5 @@ +author: "VexingRaven" +delete-after: True +changes: + - spellcheck: "fixed grammar of \"its\" in several item descriptions." + - spellcheck: "fixed grammar of plasmaman suits' descriptions." diff --git a/html/changelogs/AutoChangeLog-pr-53189.yml b/html/changelogs/AutoChangeLog-pr-53189.yml new file mode 100644 index 00000000000..65ecef216f1 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-53189.yml @@ -0,0 +1,4 @@ +author: "ATHATH" +delete-after: True +changes: + - rscadd: "You can now print stethoscopes from autolathes and medical protolathes." diff --git a/html/changelogs/AutoChangeLog-pr-53199.yml b/html/changelogs/AutoChangeLog-pr-53199.yml new file mode 100644 index 00000000000..d6d08ce1c50 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-53199.yml @@ -0,0 +1,4 @@ +author: "TheVekter" +delete-after: True +changes: + - bugfix: "Fixed an exploit involving distance checks and the Voting Box." diff --git a/html/changelogs/AutoChangeLog-pr-53204.yml b/html/changelogs/AutoChangeLog-pr-53204.yml new file mode 100644 index 00000000000..956dc4d7458 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-53204.yml @@ -0,0 +1,4 @@ +author: "TheVekter" +delete-after: True +changes: + - admin: "Admins will now hear a sound and get a screen flash when someone tries to rename the station." diff --git a/icons/mob/clothing/belt.dmi b/icons/mob/clothing/belt.dmi index fea1aca2108..e53de1e98c3 100644 Binary files a/icons/mob/clothing/belt.dmi and b/icons/mob/clothing/belt.dmi differ diff --git a/icons/mob/clothing/head.dmi b/icons/mob/clothing/head.dmi index e7c53daaa23..61ebdc353ad 100644 Binary files a/icons/mob/clothing/head.dmi and b/icons/mob/clothing/head.dmi differ diff --git a/icons/mob/clothing/suit.dmi b/icons/mob/clothing/suit.dmi index caad7e786f7..d3a4ade01d6 100644 Binary files a/icons/mob/clothing/suit.dmi and b/icons/mob/clothing/suit.dmi differ diff --git a/icons/mob/clothing/under/dress.dmi b/icons/mob/clothing/under/dress.dmi index 38087ca622e..018b9c4b4a8 100644 Binary files a/icons/mob/clothing/under/dress.dmi and b/icons/mob/clothing/under/dress.dmi differ diff --git a/icons/mob/clothing/under/suits.dmi b/icons/mob/clothing/under/suits.dmi index 65f008271e6..006e0830d7d 100644 Binary files a/icons/mob/clothing/under/suits.dmi and b/icons/mob/clothing/under/suits.dmi differ diff --git a/icons/obj/clothing/belts.dmi b/icons/obj/clothing/belts.dmi index 21945d7f243..cd3ea88916d 100644 Binary files a/icons/obj/clothing/belts.dmi and b/icons/obj/clothing/belts.dmi differ diff --git a/icons/obj/clothing/hats.dmi b/icons/obj/clothing/hats.dmi index 31f874374fc..b91b8b9228e 100644 Binary files a/icons/obj/clothing/hats.dmi and b/icons/obj/clothing/hats.dmi differ diff --git a/icons/obj/clothing/suits.dmi b/icons/obj/clothing/suits.dmi index 2edb0aed965..e4bf399c55b 100644 Binary files a/icons/obj/clothing/suits.dmi and b/icons/obj/clothing/suits.dmi differ diff --git a/icons/obj/clothing/under/dress.dmi b/icons/obj/clothing/under/dress.dmi index c6632dcf14f..1cc57e1917f 100644 Binary files a/icons/obj/clothing/under/dress.dmi and b/icons/obj/clothing/under/dress.dmi differ diff --git a/icons/obj/clothing/under/suits.dmi b/icons/obj/clothing/under/suits.dmi index ed56febf7a3..d85c5c80944 100644 Binary files a/icons/obj/clothing/under/suits.dmi and b/icons/obj/clothing/under/suits.dmi differ diff --git a/icons/obj/items_and_weapons.dmi b/icons/obj/items_and_weapons.dmi index 006491dd331..2dfa83f5dc2 100644 Binary files a/icons/obj/items_and_weapons.dmi and b/icons/obj/items_and_weapons.dmi differ diff --git a/tgstation.dme b/tgstation.dme index 8747427600b..2106a4b41ff 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -23,6 +23,7 @@ #include "code\__DEFINES\_tick.dm" #include "code\__DEFINES\access.dm" #include "code\__DEFINES\achievements.dm" +#include "code\__DEFINES\actionspeed_modification.dm" #include "code\__DEFINES\admin.dm" #include "code\__DEFINES\antagonists.dm" #include "code\__DEFINES\atmospherics.dm" @@ -1099,7 +1100,6 @@ #include "code\game\objects\items\food\_food.dm" #include "code\game\objects\items\food\bread.dm" #include "code\game\objects\items\grenades\antigravity.dm" -#include "code\game\objects\items\grenades\atmos_grenades.dm" #include "code\game\objects\items\grenades\chem_grenade.dm" #include "code\game\objects\items\grenades\clusterbuster.dm" #include "code\game\objects\items\grenades\emgrenade.dm" @@ -1327,6 +1327,10 @@ #include "code\game\turfs\open\floor\plating\misc_plating.dm" #include "code\game\turfs\open\space\space.dm" #include "code\game\turfs\open\space\transit.dm" +#include "code\modules\actionspeed\_actionspeed_modifier.dm" +#include "code\modules\actionspeed\modifiers\base.dm" +#include "code\modules\actionspeed\modifiers\mood.dm" +#include "code\modules\actionspeed\modifiers\status_effects.dm" #include "code\modules\admin\admin.dm" #include "code\modules\admin\admin_investigate.dm" #include "code\modules\admin\admin_ranks.dm" @@ -1615,7 +1619,6 @@ #include "code\modules\atmospherics\machinery\components\binary_devices\circulator.dm" #include "code\modules\atmospherics\machinery\components\binary_devices\dp_vent_pump.dm" #include "code\modules\atmospherics\machinery\components\binary_devices\passive_gate.dm" -#include "code\modules\atmospherics\machinery\components\binary_devices\pressure_valve.dm" #include "code\modules\atmospherics\machinery\components\binary_devices\pump.dm" #include "code\modules\atmospherics\machinery\components\binary_devices\valve.dm" #include "code\modules\atmospherics\machinery\components\binary_devices\volume_pump.dm" diff --git a/tgui/packages/tgui/interfaces/ShuttleConsole.js b/tgui/packages/tgui/interfaces/ShuttleConsole.js new file mode 100644 index 00000000000..64048e44c54 --- /dev/null +++ b/tgui/packages/tgui/interfaces/ShuttleConsole.js @@ -0,0 +1,145 @@ +import { useBackend } from '../backend'; +import { Box, Button, Dropdown, Flex, Icon, LabeledList, Modal, Section } from '../components'; +import { Window } from '../layouts'; + +export const ShuttleConsole = (props, context) => { + const { act, data } = useBackend(context); + const { + authorization_required, + } = data; + return ( + + {!!authorization_required && ( + + + + + + + {'SHUTTLE LOCKED'} + + + +