Merge remote-tracking branch 'upstream/master' into universal-damage

# Conflicts:
#	code/game/machinery/machinery.dm
#	code/game/objects/items.dm
#	code/game/objects/structures.dm
#	code/game/objects/structures/inflatable.dm
#	code/game/objects/structures/mirror.dm
#	code/modules/clothing/spacesuits/hardsuit.dm
#	code/modules/clothing/suits/wiz_robe.dm
#	code/modules/mob/living/carbon/alien/alien_defense.dm
#	code/modules/mob/living/carbon/slime/slime.dm
#	code/modules/mob/living/simple_animal/friendly/slime.dm
This commit is contained in:
Fox McCloud
2019-09-28 00:16:11 -04:00
375 changed files with 4142 additions and 3725 deletions
+13 -1
View File
@@ -74,6 +74,18 @@ var/const/INGEST = 2
handle_reactions()
return total_transfered
/datum/reagents/proc/remove_all(amount = 1)
var/list/cached_reagents = reagent_list
if(total_volume > 0)
var/part = amount / total_volume
for(var/reagent in cached_reagents)
var/datum/reagent/R = reagent
remove_reagent(R.id, R.volume * part)
update_total()
handle_reactions()
return amount
/datum/reagents/proc/get_master_reagent()
var/the_reagent = null
var/the_volume = 0
@@ -803,7 +815,7 @@ var/const/INGEST = 2
if(!R.taste_mult)
continue
//nutriment carries a list of tastes that originates from the snack food that the nutriment came from
if(istype(R, /datum/reagent/consumable/nutriment))
if(istype(R, /datum/reagent/consumable/nutriment))
var/list/nutriment_taste_data = R.data
for(var/nutriment_taste in nutriment_taste_data)
var/ratio = nutriment_taste_data[nutriment_taste]
@@ -106,11 +106,11 @@
return ..()
/obj/machinery/chem_dispenser/examine(mob/user)
..()
. = ..()
if(panel_open)
to_chat(user, "<span class='notice'>[src]'s maintenance hatch is open!</span>")
. += "<span class='notice'>[src]'s maintenance hatch is open!</span>"
if(in_range(user, src) || isobserver(user))
to_chat(user, "<span class='notice'>The status display reads: <br>Recharging <b>[recharge_amount]</b> power units per interval.<br>Power efficiency increased by <b>[round((powerefficiency * 1000) - 100, 1)]%</b>.<span>")
. += "<span class='notice'>The status display reads: <br>Recharging <b>[recharge_amount]</b> power units per interval.<br>Power efficiency increased by <b>[round((powerefficiency * 1000) - 100, 1)]%</b>.<span>"
/obj/machinery/chem_dispenser/process()
@@ -16,7 +16,7 @@
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.can_eat(diet_flags)) //Make sure the species has it's dietflag set, otherwise it can't digest any nutrients
H.nutrition += nutriment_factor // For hunger and fatness
H.adjust_nutrition(nutriment_factor) // For hunger and fatness
return ..()
/datum/reagent/consumable/nutriment // Pure nutriment, universally digestable and thus slightly less effective
@@ -279,8 +279,8 @@
/datum/reagent/consumable/frostoil/reaction_turf(turf/T, volume)
if(volume >= 5)
for(var/mob/living/carbon/slime/M in T)
M.adjustToxLoss(rand(15,30))
for(var/mob/living/simple_animal/slime/M in T)
M.adjustToxLoss(rand(15, 30))
/datum/reagent/consumable/sodiumchloride
name = "Salt"
@@ -838,13 +838,16 @@
color = "#63DE63"
taste_description = "burned food"
/datum/reagent/questionmark/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == INGEST)
M.Stun(2, FALSE)
M.Weaken(2, FALSE)
M.update_canmove()
to_chat(M, "<span class='danger'>Ugh! Eating that was a terrible idea!</span>")
M.ForceContractDisease(new /datum/disease/food_poisoning(0))
/datum/reagent/questionmark/reaction_mob(mob/living/carbon/human/H, method = TOUCH, volume)
if(istype(H) && method == INGEST)
if(H.dna.species.taste_sensitivity < TASTE_SENSITIVITY_NO_TASTE) // If you can taste it, then you know how awful it is.
H.Stun(2, FALSE)
H.Weaken(2, FALSE)
H.update_canmove()
to_chat(H, "<span class='danger'>Ugh! Eating that was a terrible idea!</span>")
if(NO_HUNGER in H.dna.species.species_traits) //If you don't eat, then you can't get food poisoning
return
H.ForceContractDisease(new /datum/disease/food_poisoning(0))
/datum/reagent/msg
name = "Monosodium glutamate"
@@ -356,7 +356,7 @@
if(volume >= 3)
T.MakeSlippery(TURF_WET_ICE)
if(volume >= 5)
for(var/mob/living/carbon/slime/M in T)
for(var/mob/living/simple_animal/slime/M in T)
M.adjustToxLoss(rand(15,30))
/datum/reagent/pyrosium
@@ -868,8 +868,8 @@
to_chat(M, "<span class='warning'>Your stomach grumbles painfully!</span>")
else
if(prob(60))
var/fat_to_burn = max(round(M.nutrition/100,1), 5)
M.nutrition = max(0, M.nutrition-fat_to_burn)
var/fat_to_burn = max(round(M.nutrition / 100, 1), 5)
M.adjust_nutrition(-fat_to_burn)
M.overeatduration = 0
return ..() | update_flags
@@ -80,8 +80,8 @@
if(floor_only)
T.clean_blood()
for(var/mob/living/carbon/slime/M in T)
M.adjustToxLoss(rand(5,10))
for(var/mob/living/simple_animal/slime/M in T)
M.adjustToxLoss(rand(5, 10))
if(istype(T, /turf/simulated))
var/turf/simulated/S = T
S.dirt = 0
@@ -11,9 +11,8 @@
/datum/chemical_reaction/slimespawn/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/mob/living/carbon/slime/S = new /mob/living/carbon/slime
S.forceMove(get_turf(holder.my_atom))
S.visible_message("<span class='danger'>Infused with plasma, the core begins to quiver and grow, and soon a new baby slime emerges from it!</span>")
var/mob/living/simple_animal/slime/S = new(get_turf(holder.my_atom), "grey")
S.visible_message("<span class='danger'>Infused with plasma, the core begins to quiver and grow, and a new baby slime emerges from it!</span>")
/datum/chemical_reaction/slimeinaprov
name = "Slime epinephrine"
@@ -425,7 +424,12 @@
/datum/chemical_reaction/slimebloodlust/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
for(var/mob/living/carbon/slime/slime in viewers(get_turf(holder.my_atom), null))
for(var/mob/living/simple_animal/slime/slime in viewers(get_turf(holder.my_atom), null))
if(slime.docile) //Undoes docility, but doesn't make rabid.
slime.visible_message("<span class='danger'>[slime] forgets its training, becoming wild once again!</span>")
slime.docile = FALSE
slime.update_name()
continue
slime.rabid = 1
slime.visible_message("<span class='danger'>The [slime] is driven into a frenzy!</span>")
@@ -667,9 +671,8 @@
/datum/chemical_reaction/slimeRNG/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/mob/living/carbon/slime/random/S = new /mob/living/carbon/slime/random
S.forceMove(get_turf(holder.my_atom))
S.visible_message("<span class='danger'>Infused with plasma, the core begins to quiver and grow, and soon a new baby slime emerges from it!</span>")
var/mob/living/simple_animal/slime/random/S = new (get_turf(holder.my_atom))
S.visible_message("<span class='danger'>Infused with plasma, the core begins to quiver and grow, and a new baby slime emerges from it!</span>")
/datum/chemical_reaction/slime_transfer
name = "Transfer Potion"
@@ -102,16 +102,15 @@
return
/obj/item/reagent_containers/borghypo/examine(mob/user)
if(!..(user, 2))
return
. = ..()
if(get_dist(user, src) <= 2)
var/empty = TRUE
var/empty = 1
for(var/datum/reagents/RS in reagent_list)
var/datum/reagent/R = locate() in RS.reagent_list
if(R)
. += "<span class='notice'>It currently has [R.volume] units of [R.name] stored.</span>"
empty = FALSE
for(var/datum/reagents/RS in reagent_list)
var/datum/reagent/R = locate() in RS.reagent_list
if(R)
to_chat(user, "<span class='notice'>It currently has [R.volume] units of [R.name] stored.</span>")
empty = 0
if(empty)
to_chat(user, "<span class='notice'>It is currently empty. Allow some time for the internal syntheszier to produce more.</span>")
if(empty)
. += "<span class='notice'>It is currently empty. Allow some time for the internal syntheszier to produce more.</span>"
@@ -52,10 +52,9 @@
base_name = name
/obj/item/reagent_containers/glass/examine(mob/user)
if(!..(user, 2))
return
if(!is_open_container())
to_chat(user, "<span class='notice'>Airtight lid seals it completely.</span>")
. = ..()
if(get_dist(user, src) <= 2 && !is_open_container())
. += "<span class='notice'>Airtight lid seals it completely.</span>"
/obj/item/reagent_containers/glass/attack(mob/M, mob/user, def_zone)
if(!is_open_container())
@@ -124,11 +124,11 @@
icon_state = "[initial(icon_state)]0"
/obj/item/reagent_containers/hypospray/autoinjector/examine()
..()
. = ..()
if(reagents && reagents.reagent_list.len)
to_chat(usr, "<span class='notice'>It is currently loaded.</span>")
. += "<span class='notice'>It is currently loaded.</span>"
else
to_chat(usr, "<span class='notice'>It is spent.</span>")
. += "<span class='notice'>It is spent.</span>"
/obj/item/reagent_containers/hypospray/autoinjector/teporone //basilisks
name = "teporone autoinjector"
@@ -83,8 +83,9 @@
to_chat(user, "<span class='notice'>You [amount_per_transfer_from_this == 10 ? "remove" : "fix"] the nozzle. You'll now use [amount_per_transfer_from_this] units per spray.</span>")
/obj/item/reagent_containers/spray/examine(mob/user)
if(..(user, 0) && user == loc)
to_chat(user, "[round(reagents.total_volume)] units left.")
. = ..()
if(get_dist(user, src) && user == loc)
. += "[round(reagents.total_volume)] units left."
/obj/item/reagent_containers/spray/verb/empty()
+6 -7
View File
@@ -117,10 +117,9 @@
boom()
/obj/structure/reagent_dispensers/fueltank/examine(mob/user)
if(!..(user, 2))
return
if(rig)
to_chat(usr, "<span class='notice'>There is some kind of device rigged to the tank.</span>")
. = ..()
if(get_dist(user, src) <= 2 && rig)
. += "<span class='notice'>There is some kind of device rigged to the tank.</span>"
/obj/structure/reagent_dispensers/fueltank/attack_hand()
if(rig)
@@ -225,9 +224,9 @@
var/paper_cups = 25 //Paper cups left from the cooler
/obj/structure/reagent_dispensers/water_cooler/examine(mob/user)
if(!..(user, 2))
return
to_chat(user, "There are [paper_cups ? paper_cups : "no"] paper cups left.")
. = ..()
if(get_dist(user, src) <= 2)
. += "There are [paper_cups ? paper_cups : "no"] paper cups left."
/obj/structure/reagent_dispensers/water_cooler/attack_hand(mob/living/user)
if(!paper_cups)