Merge remote-tracking branch 'citadel/master' into mobility_flags

This commit is contained in:
kevinz000
2020-02-13 00:39:20 -07:00
481 changed files with 10666 additions and 9059 deletions

View File

@@ -319,7 +319,7 @@
if(!is_operational())
return
var/name = stripped_input(usr,"Name","What do you want to name this recipe?", "Recipe", MAX_NAME_LEN)
if(!usr.canUseTopic(src, !issilicon(usr)))
if(!usr.canUseTopic(src, !hasSiliconAccessInArea(usr)))
return
if(saved_recipes[name] && alert("\"[name]\" already exists, do you want to overwrite it?",, "Yes", "No") == "No")
return

View File

@@ -261,7 +261,7 @@
return
vol_each = min(reagents.total_volume / amount, 50)
var/name = html_decode(stripped_input(usr,"Name:","Name your pill!", "[reagents.get_master_reagent_name()] ([vol_each]u)", MAX_NAME_LEN))
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !issilicon(usr)))
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !hasSiliconAccessInArea(usr)))
return
var/obj/item/reagent_containers/pill/P
var/target_loc = drop_location()
@@ -288,7 +288,7 @@
reagents.trans_to(P,vol_each)
else
var/name = html_decode(stripped_input(usr, "Name:", "Name your pack!", reagents.get_master_reagent_name(), MAX_NAME_LEN))
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !issilicon(usr)))
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !hasSiliconAccessInArea(usr)))
return
var/obj/item/reagent_containers/food/condiment/pack/P = new/obj/item/reagent_containers/food/condiment/pack(drop_location())
@@ -314,7 +314,7 @@
return
vol_each = min(reagents.total_volume / amount, 40)
var/name = html_decode(stripped_input(usr,"Name:","Name your patch!", "[reagents.get_master_reagent_name()] ([vol_each]u)", MAX_NAME_LEN))
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !issilicon(usr)))
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !hasSiliconAccessInArea(usr)))
return
var/obj/item/reagent_containers/pill/P
@@ -332,7 +332,7 @@
if(condi)
var/name = html_decode(stripped_input(usr, "Name:","Name your bottle!", (reagents.total_volume ? reagents.get_master_reagent_name() : " "), MAX_NAME_LEN))
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !issilicon(usr)))
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !hasSiliconAccessInArea(usr)))
return
var/obj/item/reagent_containers/food/condiment/P = new(drop_location())
P.originalname = name
@@ -345,7 +345,7 @@
amount_full = round(reagents.total_volume / 30)
vol_part = ((reagents.total_volume*1000) % 30000) / 1000 //% operator doesn't support decimals.
var/name = html_decode(stripped_input(usr, "Name:","Name your bottle!", (reagents.total_volume ? reagents.get_master_reagent_name() : " "), MAX_NAME_LEN))
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !issilicon(usr)))
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !hasSiliconAccessInArea(usr)))
return
var/obj/item/reagent_containers/glass/bottle/P
@@ -373,7 +373,7 @@
amount_full = round(reagents.total_volume / 60)
vol_part = reagents.total_volume % 60
var/name = html_decode(stripped_input(usr, "Name:","Name your hypovial!", (reagents.total_volume ? reagents.get_master_reagent_name() : " "), MAX_NAME_LEN))
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !issilicon(usr)))
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !hasSiliconAccessInArea(usr)))
return
var/obj/item/reagent_containers/glass/bottle/vial/small/P
@@ -408,7 +408,7 @@
vol_each = min(reagents.total_volume / amount, 20)
var/name = html_decode(stripped_input(usr,"Name:","Name your SmartDart!", "[reagents.get_master_reagent_name()] ([vol_each]u)", MAX_NAME_LEN))
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !issilicon(usr)))
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !hasSiliconAccessInArea(usr)))
return
var/obj/item/reagent_containers/syringe/dart/D

View File

@@ -170,7 +170,7 @@
if(!A.mutable)
return
if(A)
var/new_name = stripped_input(usr, "Name the disease", "New name", "", MAX_NAME_LEN)
var/new_name = sanitize_name(html_encode(params["name"]))
if(!new_name || ..())
return
A.AssignName(new_name)

View File

@@ -142,7 +142,7 @@
/obj/machinery/reagentgrinder/ui_interact(mob/user) // The microwave Menu //I am reasonably certain that this is not a microwave
. = ..()
if(operating || !user.canUseTopic(src, !issilicon(user)))
if(operating || !user.canUseTopic(src, !hasSiliconAccessInArea(user)))
return
var/list/options = list()
@@ -170,10 +170,10 @@
for(var/key in options)
choice = key
else
choice = show_radial_menu(user, src, options, require_near = !issilicon(user))
choice = show_radial_menu(user, src, options, require_near = !hasSiliconAccessInArea(user))
// post choice verification
if(operating || (isAI(user) && stat & NOPOWER) || !user.canUseTopic(src, !issilicon(user)))
if(operating || (isAI(user) && stat & NOPOWER) || !user.canUseTopic(src, !hasSiliconAccessInArea(user)))
return
switch(choice)
@@ -190,7 +190,7 @@
/obj/machinery/reagentgrinder/examine(mob/user)
. = ..()
if(!in_range(user, src) && !issilicon(user) && !isobserver(user))
if(!in_range(user, src) && !hasSiliconAccessInArea(user) && !isobserver(user))
. += "<span class='warning'>You're too far away to examine [src]'s contents and display!</span>"
return

View File

@@ -725,11 +725,15 @@ All effects don't start immediately, but rather get worse over time; the rate is
var/dorf_mode
/datum/reagent/consumable/ethanol/manly_dorf/on_mob_metabolize(mob/living/M)
var/real_dorf = isdwarf(M) //_species(H, /datum/species/dwarf)
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.dna.check_mutation(DWARFISM) || HAS_TRAIT(H, TRAIT_ALCOHOL_TOLERANCE))
if(H.dna.check_mutation(DWARFISM) || HAS_TRAIT(H, TRAIT_ALCOHOL_TOLERANCE) || real_dorf)
to_chat(H, "<span class='notice'>Now THAT is MANLY!</span>")
boozepwr = 5 //We've had worse in the mines
if(real_dorf)
boozepwr = 100 // Don't want dwarves to die because of a low booze power
else
boozepwr = 5 //We've had worse in the mines
dorf_mode = TRUE
/datum/reagent/consumable/ethanol/manly_dorf/on_mob_life(mob/living/carbon/M)
@@ -1509,6 +1513,23 @@ All effects don't start immediately, but rather get worse over time; the rate is
M.stuttering = min(M.stuttering + 3, 3)
..()
/datum/reagent/consumable/ethanol/cogchamp
name = "CogChamp"
description = "Now you can fill yourself with the power of Ratvar!"
color = rgb(255, 201, 49)
boozepwr = 10
quality = DRINK_FANTASTIC
taste_description = "a brass taste with a hint of oil"
glass_icon_state = "cogchamp"
glass_name = "CogChamp"
glass_desc = "Not even Ratvar's Four Generals could withstand this! Qevax Jryy!"
value = 8.13
/datum/reagent/consumable/ethanol/cogchamp/on_mob_life(mob/living/carbon/M)
M.clockcultslurring = min(M.clockcultslurring + 3, 3)
M.stuttering = min(M.stuttering + 3, 3)
..()
/datum/reagent/consumable/ethanol/triple_sec
name = "Triple Sec"
description = "A sweet and vibrant orange liqueur."

View File

@@ -214,6 +214,14 @@
..()
. = 1
/datum/reagent/medicine/rezadone/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
. = ..()
if(iscarbon(M))
var/mob/living/carbon/patient = M
if(reac_volume >= 5 && HAS_TRAIT_FROM(patient, TRAIT_HUSK, "burn") && patient.getFireLoss() < THRESHOLD_UNHUSK) //One carp yields 12u rezadone.
patient.cure_husk("burn")
patient.visible_message("<span class='nicegreen'>[patient]'s body rapidly absorbs moisture from the enviroment, taking on a more healthy appearance.")
/datum/reagent/medicine/spaceacillin
name = "Spaceacillin"
description = "Spaceacillin will prevent a patient from conventionally spreading any diseases they are currently infected with."
@@ -434,6 +442,10 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M)
if(show_message)
to_chat(M, "<span class='danger'>You feel your burns and bruises healing! It stings like hell!</span>")
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "painful_medicine", /datum/mood_event/painful_medicine)
//Has to be at less than THRESHOLD_UNHUSK burn damage and have 100 synthflesh before unhusking. Corpses dont metabolize.
if(HAS_TRAIT_FROM(M, TRAIT_HUSK, "burn") && M.getFireLoss() < THRESHOLD_UNHUSK && M.reagents.has_reagent(/datum/reagent/medicine/synthflesh, 100))
M.cure_husk("burn")
M.visible_message("<span class='nicegreen'>Most of [M]'s burnt off or charred flesh has been restored.")
..()
/datum/reagent/medicine/synthflesh/overdose_start(mob/living/M)
@@ -978,7 +990,7 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M)
/datum/reagent/medicine/stimulants/on_mob_metabolize(mob/living/L)
..()
L.add_movespeed_modifier(type, update=TRUE, priority=100, multiplicative_slowdown=-1, blacklisted_movetypes=(FLYING|FLOATING))
L.add_movespeed_modifier(type, update=TRUE, priority=100, multiplicative_slowdown=-0.5, blacklisted_movetypes=(FLYING|FLOATING))
/datum/reagent/medicine/stimulants/on_mob_end_metabolize(mob/living/L)
L.remove_movespeed_modifier(type)

View File

@@ -105,11 +105,11 @@
/obj/item/reagent_containers/proc/bartender_check(atom/target)
. = FALSE
var/turf/T = get_turf(src)
if(!T || target.CanPass(src, T) || !thrownby || !thrownby.actions)
if(!T || !target.CanPass(src, T) || !thrownby || !thrownby.actions)
return
for(var/datum/action/innate/drink_fling/D in thrownby.actions)
if(D.active)
return TRUE
var/datum/action/innate/D = get_action_of_type(thrownby, /datum/action/innate/drink_fling)
if(D?.active)
return TRUE
/obj/item/reagent_containers/proc/ForceResetRotation()
transform = initial(transform)
@@ -131,13 +131,14 @@
if(thrownby)
log_combat(thrownby, M, "splashed", R)
reagents.reaction(target, TOUCH)
else if(bartender_check(target) && thrown)
visible_message("<span class='notice'>[src] lands onto the [target.name] without spilling a single drop.</span>")
transform = initial(transform)
addtimer(CALLBACK(src, .proc/ForceResetRotation), 1)
return
else
if(isturf(target) && reagents.reagent_list.len && thrownby)
log_combat(thrownby, target, "splashed (thrown) [english_list(reagents.reagent_list)]", "in [AREACOORD(target)]")

View File

@@ -85,17 +85,17 @@
/obj/item/reagent_containers/hypospray/medipen
name = "epinephrine medipen"
desc = "A rapid and safe way to stabilize patients in critical condition for personnel without advanced medical knowledge."
desc = "A rapid and safe way to stabilize patients in critical condition for personnel without advanced medical knowledge. Contains a powerful preservative that can delay decomposition when applied to a dead body."
icon_state = "medipen"
item_state = "medipen"
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
amount_per_transfer_from_this = 10
volume = 10
amount_per_transfer_from_this = 13
volume = 13
ignore_flags = 1 //so you can medipen through hardsuits
reagent_flags = DRAWABLE
flags_1 = null
list_reagents = list(/datum/reagent/medicine/epinephrine = 10)
list_reagents = list(/datum/reagent/medicine/epinephrine = 10, /datum/reagent/toxin/formaldehyde = 3)
/obj/item/reagent_containers/hypospray/medipen/suicide_act(mob/living/carbon/user)
user.visible_message("<span class='suicide'>[user] begins to choke on \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
@@ -423,18 +423,21 @@
else
unload_hypo(vial,user)
/obj/item/hypospray/mkii/verb/modes()
set name = "Toggle Application Mode"
set category = "Object"
set src in usr
var/mob/M = usr
switch(mode)
if(HYPO_SPRAY)
mode = HYPO_INJECT
to_chat(M, "[src] is now set to inject contents on application.")
if(HYPO_INJECT)
mode = HYPO_SPRAY
to_chat(M, "[src] is now set to spray contents on application.")
/obj/item/hypospray/mkii/CtrlClick(mob/living/user)
. = ..()
if(user.canUseTopic(src, FALSE) && user.get_active_held_item(src))
switch(mode)
if(HYPO_SPRAY)
mode = HYPO_INJECT
to_chat(user, "[src] is now set to inject contents on application.")
if(HYPO_INJECT)
mode = HYPO_SPRAY
to_chat(user, "[src] is now set to spray contents on application.")
return TRUE
/obj/item/hypospray/mkii/examine(mob/user)
. = ..()
. += "<span class='notice'><b>Ctrl-Click</b> it to toggle its mode from spraying to injecting and vice versa.</span>"
#undef HYPO_SPRAY
#undef HYPO_INJECT