mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 03:33:21 +00:00
Adjusts how radiation works, especially for FBPs
This commit is contained in:
@@ -103,13 +103,6 @@
|
|||||||
R.adjustFireLoss(-wire_rate)
|
R.adjustFireLoss(-wire_rate)
|
||||||
else if(ishuman(occupant))
|
else if(ishuman(occupant))
|
||||||
var/mob/living/carbon/human/H = occupant
|
var/mob/living/carbon/human/H = occupant
|
||||||
if(!isnull(H.internal_organs_by_name["cell"]) && H.nutrition < 450)
|
|
||||||
H.nutrition = min(H.nutrition+10, 450)
|
|
||||||
cell.use(7000/450*10)
|
|
||||||
|
|
||||||
else if(istype(occupant, /mob/living/carbon/human))
|
|
||||||
|
|
||||||
var/mob/living/carbon/human/H = occupant
|
|
||||||
|
|
||||||
// In case they somehow end up with positive values for otherwise unobtainable damage...
|
// In case they somehow end up with positive values for otherwise unobtainable damage...
|
||||||
if(H.getToxLoss()>0) H.adjustToxLoss(-(rand(1,3)))
|
if(H.getToxLoss()>0) H.adjustToxLoss(-(rand(1,3)))
|
||||||
|
|||||||
@@ -283,19 +283,19 @@
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
/mob/living/carbon/human/getToxLoss()
|
/mob/living/carbon/human/getToxLoss()
|
||||||
if((species.flags & NO_POISON) || isSynthetic())
|
if(species.flags & NO_POISON)
|
||||||
toxloss = 0
|
toxloss = 0
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/mob/living/carbon/human/adjustToxLoss(var/amount)
|
/mob/living/carbon/human/adjustToxLoss(var/amount)
|
||||||
if((species.flags & NO_POISON) || isSynthetic())
|
if(species.flags & NO_POISON)
|
||||||
toxloss = 0
|
toxloss = 0
|
||||||
else
|
else
|
||||||
amount = amount*species.toxins_mod
|
amount = amount*species.toxins_mod
|
||||||
..(amount)
|
..(amount)
|
||||||
|
|
||||||
/mob/living/carbon/human/setToxLoss(var/amount)
|
/mob/living/carbon/human/setToxLoss(var/amount)
|
||||||
if((species.flags & NO_POISON) || isSynthetic())
|
if(species.flags & NO_POISON)
|
||||||
toxloss = 0
|
toxloss = 0
|
||||||
else
|
else
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -226,7 +226,7 @@
|
|||||||
if(gene.is_active(src))
|
if(gene.is_active(src))
|
||||||
gene.OnMobLife(src)
|
gene.OnMobLife(src)
|
||||||
|
|
||||||
radiation = Clamp(radiation,0,100)
|
radiation = Clamp(radiation,0,250)
|
||||||
|
|
||||||
if(!radiation)
|
if(!radiation)
|
||||||
if(species.appearance_flags & RADIATION_GLOWS)
|
if(species.appearance_flags & RADIATION_GLOWS)
|
||||||
@@ -285,8 +285,12 @@
|
|||||||
adjustCloneLoss(5 * RADIATION_SPEED_COEFFICIENT)
|
adjustCloneLoss(5 * RADIATION_SPEED_COEFFICIENT)
|
||||||
emote("gasp")
|
emote("gasp")
|
||||||
|
|
||||||
|
if (radiation > 150)
|
||||||
|
damage = 6
|
||||||
|
radiation -= 4 * RADIATION_SPEED_COEFFICIENT
|
||||||
|
|
||||||
if(damage)
|
if(damage)
|
||||||
damage *= isSynthetic() ? 0.5 : species.radiation_mod
|
damage *= species.radiation_mod
|
||||||
adjustToxLoss(damage * RADIATION_SPEED_COEFFICIENT)
|
adjustToxLoss(damage * RADIATION_SPEED_COEFFICIENT)
|
||||||
updatehealth()
|
updatehealth()
|
||||||
if(!isSynthetic() && organs.len)
|
if(!isSynthetic() && organs.len)
|
||||||
@@ -1375,9 +1379,15 @@
|
|||||||
|
|
||||||
// Puke if toxloss is too high
|
// Puke if toxloss is too high
|
||||||
if(!stat)
|
if(!stat)
|
||||||
|
if (getToxLoss() >= 30 && isSynthetic())
|
||||||
|
if(!confused)
|
||||||
|
if(prob(5))
|
||||||
|
to_chat(src, "<span class='danger'>You lose directional control!</span>")
|
||||||
|
Confuse(10)
|
||||||
if (getToxLoss() >= 45)
|
if (getToxLoss() >= 45)
|
||||||
spawn vomit()
|
spawn vomit()
|
||||||
|
|
||||||
|
|
||||||
//0.1% chance of playing a scary sound to someone who's in complete darkness
|
//0.1% chance of playing a scary sound to someone who's in complete darkness
|
||||||
if(isturf(loc) && rand(1,1000) == 1)
|
if(isturf(loc) && rand(1,1000) == 1)
|
||||||
var/turf/T = loc
|
var/turf/T = loc
|
||||||
|
|||||||
@@ -58,12 +58,12 @@ default behaviour is:
|
|||||||
for(var/mob/living/M in range(tmob, 1))
|
for(var/mob/living/M in range(tmob, 1))
|
||||||
if(tmob.pinned.len || ((M.pulling == tmob && ( tmob.restrained() && !( M.restrained() ) && M.stat == 0)) || locate(/obj/item/weapon/grab, tmob.grabbed_by.len)) )
|
if(tmob.pinned.len || ((M.pulling == tmob && ( tmob.restrained() && !( M.restrained() ) && M.stat == 0)) || locate(/obj/item/weapon/grab, tmob.grabbed_by.len)) )
|
||||||
if ( !(world.time % 5) )
|
if ( !(world.time % 5) )
|
||||||
src << "<span class='warning'>[tmob] is restrained, you cannot push past</span>"
|
to_chat(src, "<span class='warning'>[tmob] is restrained, you cannot push past</span>")
|
||||||
now_pushing = 0
|
now_pushing = 0
|
||||||
return
|
return
|
||||||
if( tmob.pulling == M && ( M.restrained() && !( tmob.restrained() ) && tmob.stat == 0) )
|
if( tmob.pulling == M && ( M.restrained() && !( tmob.restrained() ) && tmob.stat == 0) )
|
||||||
if ( !(world.time % 5) )
|
if ( !(world.time % 5) )
|
||||||
src << "<span class='warning'>[tmob] is restraining [M], you cannot push past</span>"
|
to_chat(src, "<span class='warning'>[tmob] is restraining [M], you cannot push past</span>")
|
||||||
now_pushing = 0
|
now_pushing = 0
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ default behaviour is:
|
|||||||
return
|
return
|
||||||
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
|
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
|
||||||
if(prob(40) && !(FAT in src.mutations))
|
if(prob(40) && !(FAT in src.mutations))
|
||||||
src << "<span class='danger'>You fail to push [tmob]'s fat ass out of the way.</span>"
|
to_chat(src, "<span class='danger'>You fail to push [tmob]'s fat ass out of the way.</span>")
|
||||||
now_pushing = 0
|
now_pushing = 0
|
||||||
return
|
return
|
||||||
if(tmob.r_hand && istype(tmob.r_hand, /obj/item/weapon/shield/riot))
|
if(tmob.r_hand && istype(tmob.r_hand, /obj/item/weapon/shield/riot))
|
||||||
@@ -129,7 +129,7 @@ default behaviour is:
|
|||||||
playsound(loc, "punch", 25, 1, -1)
|
playsound(loc, "punch", 25, 1, -1)
|
||||||
visible_message("<span class='warning'>[src] [pick("ran", "slammed")] into \the [AM]!</span>")
|
visible_message("<span class='warning'>[src] [pick("ran", "slammed")] into \the [AM]!</span>")
|
||||||
src.apply_damage(5, BRUTE)
|
src.apply_damage(5, BRUTE)
|
||||||
src << ("<span class='warning'>You just [pick("ran", "slammed")] into \the [AM]!</span>")
|
to_chat(src, "<span class='warning'>You just [pick("ran", "slammed")] into \the [AM]!</span>")
|
||||||
return
|
return
|
||||||
if (!now_pushing)
|
if (!now_pushing)
|
||||||
now_pushing = 1
|
now_pushing = 1
|
||||||
@@ -153,7 +153,7 @@ default behaviour is:
|
|||||||
if ((src.health < 0 && src.health > (5-src.getMaxHealth()))) // Health below Zero but above 5-away-from-death, as before, but variable
|
if ((src.health < 0 && src.health > (5-src.getMaxHealth()))) // Health below Zero but above 5-away-from-death, as before, but variable
|
||||||
src.adjustOxyLoss(src.health + src.getMaxHealth() * 2) // Deal 2x health in OxyLoss damage, as before but variable.
|
src.adjustOxyLoss(src.health + src.getMaxHealth() * 2) // Deal 2x health in OxyLoss damage, as before but variable.
|
||||||
src.health = src.getMaxHealth() - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss()
|
src.health = src.getMaxHealth() - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss()
|
||||||
src << "<font color='blue'>You have given up life and succumbed to death.</font>"
|
to_chat(src, "<font color='blue'>You have given up life and succumbed to death.</font>")
|
||||||
|
|
||||||
|
|
||||||
/mob/living/proc/updatehealth()
|
/mob/living/proc/updatehealth()
|
||||||
@@ -640,11 +640,11 @@ default behaviour is:
|
|||||||
|
|
||||||
if(config.allow_Metadata)
|
if(config.allow_Metadata)
|
||||||
if(client)
|
if(client)
|
||||||
usr << "[src]'s Metainfo:<br>[client.prefs.metadata]"
|
to_chat(usr, "[src]'s Metainfo:<br>[client.prefs.metadata]")
|
||||||
else
|
else
|
||||||
usr << "[src] does not have any stored infomation!"
|
to_chat(usr, "[src] does not have any stored infomation!")
|
||||||
else
|
else
|
||||||
usr << "OOC Metadata is not supported by this server!"
|
to_chat(usr, "OOC Metadata is not supported by this server!")
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -791,8 +791,8 @@ default behaviour is:
|
|||||||
|
|
||||||
if(istype(M))
|
if(istype(M))
|
||||||
M.drop_from_inventory(H)
|
M.drop_from_inventory(H)
|
||||||
M << "<span class='warning'>\The [H] wriggles out of your grip!</span>"
|
to_chat(M, "<span class='warning'>\The [H] wriggles out of your grip!</span>")
|
||||||
src << "<span class='warning'>You wriggle out of \the [M]'s grip!</span>"
|
to_chat(src, "<span class='warning'>You wriggle out of \the [M]'s grip!</span>")
|
||||||
|
|
||||||
// Update whether or not this mob needs to pass emotes to contents.
|
// Update whether or not this mob needs to pass emotes to contents.
|
||||||
for(var/atom/A in M.contents)
|
for(var/atom/A in M.contents)
|
||||||
@@ -804,10 +804,10 @@ default behaviour is:
|
|||||||
var/obj/item/clothing/accessory/holster/holster = H.loc
|
var/obj/item/clothing/accessory/holster/holster = H.loc
|
||||||
if(holster.holstered == H)
|
if(holster.holstered == H)
|
||||||
holster.clear_holster()
|
holster.clear_holster()
|
||||||
src << "<span class='warning'>You extricate yourself from \the [holster].</span>"
|
to_chat(src, "<span class='warning'>You extricate yourself from \the [holster].</span>")
|
||||||
H.forceMove(get_turf(H))
|
H.forceMove(get_turf(H))
|
||||||
else if(istype(H.loc,/obj/item))
|
else if(istype(H.loc,/obj/item))
|
||||||
src << "<span class='warning'>You struggle free of \the [H.loc].</span>"
|
to_chat(src, "<span class='warning'>You struggle free of \the [H.loc].</span>")
|
||||||
H.forceMove(get_turf(H))
|
H.forceMove(get_turf(H))
|
||||||
|
|
||||||
/mob/living/proc/escape_buckle()
|
/mob/living/proc/escape_buckle()
|
||||||
@@ -827,7 +827,7 @@ default behaviour is:
|
|||||||
set category = "IC"
|
set category = "IC"
|
||||||
|
|
||||||
resting = !resting
|
resting = !resting
|
||||||
src << "<span class='notice'>You are now [resting ? "resting" : "getting up"]</span>"
|
to_chat(src, "<span class='notice'>You are now [resting ? "resting" : "getting up"]</span>")
|
||||||
|
|
||||||
/mob/living/proc/cannot_use_vents()
|
/mob/living/proc/cannot_use_vents()
|
||||||
if(mob_size > MOB_SMALL)
|
if(mob_size > MOB_SMALL)
|
||||||
@@ -863,7 +863,7 @@ default behaviour is:
|
|||||||
inertia_dir = 1
|
inertia_dir = 1
|
||||||
else if(y >= world.maxy -TRANSITIONEDGE)
|
else if(y >= world.maxy -TRANSITIONEDGE)
|
||||||
inertia_dir = 2
|
inertia_dir = 2
|
||||||
src << "<span class='warning'>Something you are carrying is preventing you from leaving.</span>"
|
to_chat(src, "<span class='warning'>Something you are carrying is preventing you from leaving.</span>")
|
||||||
return
|
return
|
||||||
|
|
||||||
..()
|
..()
|
||||||
@@ -881,54 +881,52 @@ default behaviour is:
|
|||||||
ear_deaf = deaf
|
ear_deaf = deaf
|
||||||
|
|
||||||
/mob/living/proc/vomit(var/skip_wait, var/blood_vomit)
|
/mob/living/proc/vomit(var/skip_wait, var/blood_vomit)
|
||||||
|
|
||||||
if(isSynthetic())
|
|
||||||
src << "<span class='danger'>A sudden, dizzying wave of internal feedback rushes over you!</span>"
|
|
||||||
src.Weaken(5)
|
|
||||||
return
|
|
||||||
|
|
||||||
if(!check_has_mouth())
|
if(!check_has_mouth())
|
||||||
return
|
return
|
||||||
|
|
||||||
if(!lastpuke)
|
if(!lastpuke)
|
||||||
lastpuke = 1
|
lastpuke = 1
|
||||||
if (nutrition <= 100)
|
if(isSynthetic())
|
||||||
src << "<span class='danger'>You gag as you want to throw up, but there's nothing in your stomach!</span>"
|
to_chat(src, "<span class='danger'>A sudden, dizzying wave of internal feedback rushes over you!</span>")
|
||||||
src.Weaken(10)
|
src.Weaken(5)
|
||||||
else
|
else
|
||||||
src << "<span class='warning'>You feel nauseous...</span>"
|
if (nutrition <= 100)
|
||||||
|
to_chat(src, "<span class='danger'>You gag as you want to throw up, but there's nothing in your stomach!</span>")
|
||||||
if(!skip_wait)
|
src.Weaken(10)
|
||||||
sleep(150) //15 seconds until second warning
|
|
||||||
src << "<span class='warning'>You feel like you are about to throw up!</span>"
|
|
||||||
sleep(100) //and you have 10 more for mad dash to the bucket
|
|
||||||
|
|
||||||
//Damaged livers cause you to vomit blood.
|
|
||||||
if(!blood_vomit)
|
|
||||||
if(ishuman(src))
|
|
||||||
var/mob/living/carbon/human/H = src
|
|
||||||
if(!H.isSynthetic())
|
|
||||||
var/obj/item/organ/internal/liver/L = H.internal_organs_by_name["liver"]
|
|
||||||
if(L.is_broken())
|
|
||||||
blood_vomit = 1
|
|
||||||
|
|
||||||
Stun(5)
|
|
||||||
src.visible_message("<span class='warning'>[src] throws up!</span>","<span class='warning'>You throw up!</span>")
|
|
||||||
playsound(loc, 'sound/effects/splat.ogg', 50, 1)
|
|
||||||
|
|
||||||
var/turf/simulated/T = get_turf(src) //TODO: Make add_blood_floor remove blood from human mobs
|
|
||||||
if(istype(T))
|
|
||||||
if(blood_vomit)
|
|
||||||
T.add_blood_floor(src)
|
|
||||||
else
|
|
||||||
T.add_vomit_floor(src, 1)
|
|
||||||
|
|
||||||
if(blood_vomit)
|
|
||||||
if(getBruteLoss() < 50)
|
|
||||||
adjustBruteLoss(3)
|
|
||||||
else
|
else
|
||||||
nutrition -= 40
|
to_chat(src, "<span class='warning'>You feel nauseous...</span>")
|
||||||
adjustToxLoss(-3)
|
|
||||||
|
if(!skip_wait)
|
||||||
|
sleep(150) //15 seconds until second warning
|
||||||
|
to_chat(src, "<span class='warning'>You feel like you are about to throw up!</span>")
|
||||||
|
sleep(100) //and you have 10 more for mad dash to the bucket
|
||||||
|
|
||||||
|
//Damaged livers cause you to vomit blood.
|
||||||
|
if(!blood_vomit)
|
||||||
|
if(ishuman(src))
|
||||||
|
var/mob/living/carbon/human/H = src
|
||||||
|
if(!H.isSynthetic())
|
||||||
|
var/obj/item/organ/internal/liver/L = H.internal_organs_by_name["liver"]
|
||||||
|
if(L.is_broken())
|
||||||
|
blood_vomit = 1
|
||||||
|
|
||||||
|
Stun(5)
|
||||||
|
src.visible_message("<span class='warning'>[src] throws up!</span>","<span class='warning'>You throw up!</span>")
|
||||||
|
playsound(loc, 'sound/effects/splat.ogg', 50, 1)
|
||||||
|
|
||||||
|
var/turf/simulated/T = get_turf(src) //TODO: Make add_blood_floor remove blood from human mobs
|
||||||
|
if(istype(T))
|
||||||
|
if(blood_vomit)
|
||||||
|
T.add_blood_floor(src)
|
||||||
|
else
|
||||||
|
T.add_vomit_floor(src, 1)
|
||||||
|
|
||||||
|
if(blood_vomit)
|
||||||
|
if(getBruteLoss() < 50)
|
||||||
|
adjustBruteLoss(3)
|
||||||
|
else
|
||||||
|
nutrition -= 40
|
||||||
|
adjustToxLoss(-3)
|
||||||
|
|
||||||
sleep(350)
|
sleep(350)
|
||||||
lastpuke = 0
|
lastpuke = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user