Merge pull request #3642 from Citadel-Station-13/upstream-merge-32051

[MIRROR] More radiation balance changes and fixes
This commit is contained in:
LetterJay
2017-10-29 02:41:44 -04:00
committed by GitHub
14 changed files with 213 additions and 106 deletions
+34 -3
View File
@@ -13,6 +13,20 @@
item_color = "engineering" //Determines used sprites: hardsuit[on]-[color] and hardsuit[on]-[color]2 (lying down sprite)
actions_types = list(/datum/action/item_action/toggle_helmet_light)
var/rad_count = 0
var/rad_record = 0
var/grace_count = 0
var/datum/looping_sound/geiger/soundloop
/obj/item/clothing/head/helmet/space/hardsuit/Initialize()
. = ..()
soundloop = new(list(), FALSE, TRUE)
soundloop.volume = 5
START_PROCESSING(SSobj, src)
/obj/item/clothing/head/helmet/space/hardsuit/Destroy()
. = ..()
STOP_PROCESSING(SSobj, src)
/obj/item/clothing/head/helmet/space/hardsuit/attack_self(mob/user)
on = !on
@@ -31,6 +45,7 @@
..()
if(suit)
suit.RemoveHelmet()
soundloop.stop(user)
/obj/item/clothing/head/helmet/space/hardsuit/item_action_slot_check(slot)
if(slot == slot_head)
@@ -41,8 +56,11 @@
if(slot != slot_head)
if(suit)
suit.RemoveHelmet()
soundloop.stop(user)
else
qdel(src)
else
soundloop.start(user)
/obj/item/clothing/head/helmet/space/hardsuit/proc/display_visor_message(var/msg)
var/mob/wearer = loc
@@ -50,9 +68,22 @@
wearer.show_message("[icon2html(src, wearer)]<b><span class='robot'>[msg]</span></b>", 1)
/obj/item/clothing/head/helmet/space/hardsuit/rad_act(severity)
..()
if(severity > RAD_AMOUNT_EXTREME)
display_visor_message("Radiation pulse detected! Magnitude: <span class='green'>[severity]</span> RADs.")
. = ..()
rad_count += severity
/obj/item/clothing/head/helmet/space/hardsuit/process()
if(!rad_count)
grace_count++
if(grace_count == 2)
soundloop.last_radiation = 0
return
grace_count = 0
rad_record -= rad_record/5
rad_record += rad_count/5
rad_count = 0
soundloop.last_radiation = rad_record
/obj/item/clothing/head/helmet/space/hardsuit/emp_act(severity)
..()
+3 -2
View File
@@ -112,8 +112,9 @@
item_state = "bombsuit_white"
/*
* Radiation protection
*/
* Radiation protection
*/
/obj/item/clothing/head/radiation
name = "radiation hood"
icon_state = "rad"
+9 -6
View File
@@ -898,14 +898,17 @@
to_chat(G, "<span class='holoparasite'>Your summoner has changed form!</span>")
/mob/living/rad_act(amount)
amount = max(amount-RAD_BACKGROUND_RADIATION, 0)
if(!amount || amount < RAD_MOB_SKIN_PROTECTION)
return
if(amount)
var/blocked = getarmor(null, "rad")
amount -= RAD_BACKGROUND_RADIATION // This will always be at least 1 because of how skin protection is calculated
apply_effect(amount * RAD_MOB_COEFFICIENT, IRRADIATE, blocked)
if(amount > RAD_AMOUNT_EXTREME)
apply_damage((amount-RAD_AMOUNT_EXTREME)/RAD_AMOUNT_EXTREME, BURN, null, blocked)
var/blocked = getarmor(null, "rad")
if(amount > RAD_BURN_THRESHOLD)
apply_damage((amount-RAD_BURN_THRESHOLD)/RAD_BURN_THRESHOLD, BURN, null, blocked)
apply_effect((amount*RAD_MOB_COEFFICIENT)/max(1, (radiation**2)*RAD_OVERDOSE_REDUCTION), IRRADIATE, blocked)
/mob/living/proc/fakefireextinguish()
return
@@ -454,7 +454,7 @@
/datum/reagent/medicine/potass_iodide/on_mob_life(mob/living/M)
if(M.radiation > 0)
M.radiation -= min(M.radiation, 4)
M.radiation -= min(M.radiation, 8)
..()
/datum/reagent/medicine/pen_acid
@@ -466,7 +466,7 @@
metabolization_rate = 0.5 * REAGENTS_METABOLISM
/datum/reagent/medicine/pen_acid/on_mob_life(mob/living/M)
M.radiation -= max(M.radiation-RAD_MOB_SAFE, 0)/100
M.radiation -= max(M.radiation-RAD_MOB_SAFE, 0)/50
M.adjustToxLoss(-2*REM, 0)
for(var/datum/reagent/R in M.reagents.reagent_list)
if(R != src)