mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
TG: Fixes some runtimes, involving do_mob, observe, send_status on mulebots,
check_gas_mixture, the explosion cinematic, sleeper get_reagents_amount, and a possible (albeit unlikely) fix for throw_at Revision: r3478 Author: quartz235
This commit is contained in:
@@ -475,6 +475,7 @@ datum
|
||||
return share(sharer)*/
|
||||
|
||||
check_gas_mixture(datum/gas_mixture/sharer)
|
||||
if(!sharer) return 0
|
||||
var/delta_oxygen = (oxygen_archived - sharer.oxygen_archived)/5
|
||||
var/delta_carbon_dioxide = (carbon_dioxide_archived - sharer.carbon_dioxide_archived)/5
|
||||
var/delta_nitrogen = (nitrogen_archived - sharer.nitrogen_archived)/5
|
||||
|
||||
@@ -66,11 +66,12 @@
|
||||
dat += text("[]\t-Toxin Content %: []</FONT><BR>", (occupant.getToxLoss() < 60 ? "<font color='blue'>" : "<font color='red'>"), occupant.getToxLoss())
|
||||
dat += text("[]\t-Burn Severity %: []</FONT><BR>", (occupant.getFireLoss() < 60 ? "<font color='blue'>" : "<font color='red'>"), occupant.getFireLoss())
|
||||
dat += text("<HR>Paralysis Summary %: [] ([] seconds left!)<BR>", occupant.paralysis, round(occupant.paralysis / 4))
|
||||
dat += text("Inaprovaline units: [] units<BR>", occupant.reagents.get_reagent_amount("inaprovaline"))
|
||||
dat += text("Soporific (Sleep Toxin): [] units<BR>", occupant.reagents.get_reagent_amount("stoxin"))
|
||||
dat += text("[]\tDermaline: [] units</FONT><BR>", (occupant.reagents.get_reagent_amount("dermaline") < 30 ? "<font color='black'>" : "<font color='red'>"), occupant.reagents.get_reagent_amount("dermaline"))
|
||||
dat += text("[]\tBicaridine: [] units<BR>", (occupant.reagents.get_reagent_amount("bicaridine") < 30 ? "<font color='black'>" : "<font color='red'>"), occupant.reagents.get_reagent_amount("bicaridine"))
|
||||
dat += text("[]\tDexalin: [] units<BR>", (occupant.reagents.get_reagent_amount("dexalin") < 30 ? "<font color='black'>" : "<font color='red'>"), occupant.reagents.get_reagent_amount("dexalin"))
|
||||
if(occupant.reagents)
|
||||
dat += text("Inaprovaline units: [] units<BR>", occupant.reagents.get_reagent_amount("inaprovaline"))
|
||||
dat += text("Soporific (Sleep Toxin): [] units<BR>", occupant.reagents.get_reagent_amount("stoxin"))
|
||||
dat += text("[]\tDermaline: [] units</FONT><BR>", (occupant.reagents.get_reagent_amount("dermaline") < 30 ? "<font color='black'>" : "<font color='red'>"), occupant.reagents.get_reagent_amount("dermaline"))
|
||||
dat += text("[]\tBicaridine: [] units<BR>", (occupant.reagents.get_reagent_amount("bicaridine") < 30 ? "<font color='black'>" : "<font color='red'>"), occupant.reagents.get_reagent_amount("bicaridine"))
|
||||
dat += text("[]\tDexalin: [] units<BR>", (occupant.reagents.get_reagent_amount("dexalin") < 30 ? "<font color='black'>" : "<font color='red'>"), occupant.reagents.get_reagent_amount("dexalin"))
|
||||
dat += text("<HR><A href='?src=\ref[];refresh=1'>Refresh meter readings each second</A><BR><A href='?src=\ref[];inap=1'>Inject Inaprovaline</A><BR><A href='?src=\ref[];stox=1'>Inject Soporific</A><BR><A href='?src=\ref[];derm=1'>Inject Dermaline</A><BR><A href='?src=\ref[];bic=1'>Inject Bicaridine</A><BR><A href='?src=\ref[];dex=1'>Inject Dexalin</A>", src, src, src, src, src, src)
|
||||
else
|
||||
dat += "The sleeper is empty."
|
||||
|
||||
@@ -924,7 +924,7 @@
|
||||
var/list/kv = list(
|
||||
"type" = "mulebot",
|
||||
"name" = suffix,
|
||||
"loca" = loc.loc, // area
|
||||
"loca" = (loc ? loc.loc : "Unknown"), // somehow loc can be null and cause a runtime - Quarxink
|
||||
"mode" = mode,
|
||||
"powr" = (cell ? cell.percent() : 0),
|
||||
"dest" = destination,
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
..()
|
||||
|
||||
/atom/movable/proc/throw_at(atom/target, range, speed)
|
||||
if(!target) return 0
|
||||
if(!target || !src) return 0
|
||||
//use a modified version of Bresenham's algorithm to get from the atom's current position to that of the target
|
||||
src.throwing = 1
|
||||
|
||||
@@ -181,7 +181,6 @@
|
||||
if(dist_since_sleep >= speed)
|
||||
dist_since_sleep = 0
|
||||
sleep(1)
|
||||
|
||||
a = get_area(src.loc)
|
||||
else
|
||||
var/error = dist_y/2 - dist_x
|
||||
|
||||
+21
-18
@@ -638,10 +638,11 @@
|
||||
for (var/mob/living/silicon/decoy/D in world)
|
||||
if (eye)
|
||||
eye = D
|
||||
if (eye)
|
||||
client.eye = eye
|
||||
else
|
||||
client.eye = client.mob
|
||||
if (client)
|
||||
if (eye)
|
||||
client.eye = eye
|
||||
else
|
||||
client.eye = client.mob
|
||||
|
||||
/mob/verb/cancel_camera()
|
||||
set name = "Cancel Camera View"
|
||||
@@ -1055,22 +1056,24 @@ note dizziness decrements automatically in the mob's Life() proc.
|
||||
boom.icon_state = "start"
|
||||
|
||||
sleep(40)
|
||||
mob << sound('explosionfar.ogg')
|
||||
boom.icon_state = "end"
|
||||
if(!station_missed) flick("explode", boom)
|
||||
else flick("explode2", boom)
|
||||
if(boom && mob)
|
||||
mob << sound('explosionfar.ogg')
|
||||
boom.icon_state = "end"
|
||||
if(!station_missed) flick("explode", boom)
|
||||
else flick("explode2", boom)
|
||||
sleep(40)
|
||||
|
||||
switch(ticker.mode.name)
|
||||
if("nuclear emergency")
|
||||
if(!station_missed) boom.icon_state = "loss_nuke"
|
||||
else boom.icon_state = "loss_nuke2"
|
||||
if("malfunction")
|
||||
boom.icon_state = "loss_malf"
|
||||
if("blob")
|
||||
return//Nothin here yet and the general one does not fit.
|
||||
else
|
||||
boom.icon_state = "loss_general"
|
||||
if(boom)
|
||||
switch(ticker.mode.name)
|
||||
if("nuclear emergency")
|
||||
if(!station_missed) boom.icon_state = "loss_nuke"
|
||||
else boom.icon_state = "loss_nuke2"
|
||||
if("malfunction")
|
||||
boom.icon_state = "loss_malf"
|
||||
if("blob")
|
||||
return//Nothin here yet and the general one does not fit.
|
||||
else
|
||||
boom.icon_state = "loss_general"
|
||||
return
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user