Adds arrival shuttle to radstorm protected areas

Fixes spider structures having null armor
Fixes division by 0 with hellcan
Fixes runtime in automatons
Fixes runtime with recharger in modular computer destroy
Fixes runtime in power monitor
This commit is contained in:
Shadowlight213
2016-12-23 18:50:10 -08:00
parent d77a94e3fe
commit 5dd264102e
6 changed files with 35 additions and 26 deletions

View File

@@ -132,7 +132,8 @@
end_message = "<span class='notice'>The air seems to be cooling off again.</span>" end_message = "<span class='notice'>The air seems to be cooling off again.</span>"
area_type = /area area_type = /area
protected_areas = list(/area/maintenance, /area/ai_monitored/turret_protected/ai_upload, /area/ai_monitored/turret_protected/ai_upload_foyer, /area/ai_monitored/turret_protected/ai, /area/storage/emergency, /area/storage/emergency2, /area/shuttle/labor) protected_areas = list(/area/maintenance, /area/ai_monitored/turret_protected/ai_upload, /area/ai_monitored/turret_protected/ai_upload_foyer,
/area/ai_monitored/turret_protected/ai, /area/storage/emergency, /area/storage/emergency2, /area/shuttle/labor, /area/shuttle/arrival)
target_z = ZLEVEL_STATION target_z = ZLEVEL_STATION
immunity_type = "rad" immunity_type = "rad"

View File

@@ -33,6 +33,7 @@
/obj/structure/spider/stickyweb/New() /obj/structure/spider/stickyweb/New()
if(prob(50)) if(prob(50))
icon_state = "stickyweb2" icon_state = "stickyweb2"
. = ..()
/obj/structure/spider/stickyweb/CanPass(atom/movable/mover, turf/target, height=0) /obj/structure/spider/stickyweb/CanPass(atom/movable/mover, turf/target, height=0)
if(height==0) return 1 if(height==0) return 1
@@ -60,6 +61,7 @@
pixel_x = rand(3,-3) pixel_x = rand(3,-3)
pixel_y = rand(3,-3) pixel_y = rand(3,-3)
START_PROCESSING(SSobj, src) START_PROCESSING(SSobj, src)
. = ..()
/obj/structure/spider/eggcluster/process() /obj/structure/spider/eggcluster/process()
amount_grown += rand(0,2) amount_grown += rand(0,2)
@@ -94,6 +96,7 @@
pixel_x = rand(6,-6) pixel_x = rand(6,-6)
pixel_y = rand(6,-6) pixel_y = rand(6,-6)
START_PROCESSING(SSobj, src) START_PROCESSING(SSobj, src)
. = ..()
/obj/structure/spider/spiderling/hunter /obj/structure/spider/spiderling/hunter
grow_as = /mob/living/simple_animal/hostile/poison/giant_spider/hunter grow_as = /mob/living/simple_animal/hostile/poison/giant_spider/hunter
@@ -189,6 +192,7 @@
/obj/structure/spider/cocoon/New() /obj/structure/spider/cocoon/New()
icon_state = pick("cocoon1","cocoon2","cocoon3") icon_state = pick("cocoon1","cocoon2","cocoon3")
. = ..()
/obj/structure/spider/cocoon/container_resist(mob/living/user) /obj/structure/spider/cocoon/container_resist(mob/living/user)
var/breakout_time = 1 var/breakout_time = 1

View File

@@ -370,7 +370,8 @@
cost = 5 cost = 5
. = use_charges(cost) . = use_charges(cost)
var/fraction = min(1, . / reagents.maximum_volume) var/fraction = min(1, . / reagents.maximum_volume)
fraction /= affected_turfs.len if(affected_turfs.len)
fraction /= affected_turfs.len
for(var/t in affected_turfs) for(var/t in affected_turfs)
reagents.reaction(t, TOUCH, fraction * volume_multiplier) reagents.reaction(t, TOUCH, fraction * volume_multiplier)
reagents.trans_to(t, ., volume_multiplier) reagents.trans_to(t, ., volume_multiplier)

View File

@@ -1476,10 +1476,10 @@
TARGET = retal_target TARGET = retal_target
else else
var/mob/living/M = locate(/mob/living) in oview(7,src) var/mob/living/M = locate(/mob/living) in oview(7,src)
if(M != src && !compareFaction(M.faction))
TARGET = M
if(!M) if(!M)
doing = doing & ~FIGHTING doing = doing & ~FIGHTING
else if(M != src && !compareFaction(M.faction))
TARGET = M
//no infighting //no infighting
if(retal) if(retal)

View File

@@ -64,6 +64,7 @@
if(CH.holder == src) if(CH.holder == src)
CH.on_remove(src) CH.on_remove(src)
CH.holder = null CH.holder = null
all_components.Remove(CH.device_type)
qdel(CH) qdel(CH)
physical = null physical = null
return ..() return ..()

View File

@@ -38,12 +38,14 @@
next_record = world.time + record_interval next_record = world.time + record_interval
var/list/supply = history["supply"] var/list/supply = history["supply"]
supply += attached.powernet.viewavail if(attached.powernet)
supply += attached.powernet.viewavail
if(supply.len > record_size) if(supply.len > record_size)
supply.Cut(1, 2) supply.Cut(1, 2)
var/list/demand = history["demand"] var/list/demand = history["demand"]
demand += attached.powernet.viewload if(attached.powernet)
demand += attached.powernet.viewload
if(demand.len > record_size) if(demand.len > record_size)
demand.Cut(1, 2) demand.Cut(1, 2)
@@ -59,28 +61,28 @@
data["stored"] = record_size data["stored"] = record_size
data["interval"] = record_interval / 10 data["interval"] = record_interval / 10
data["attached"] = attached ? TRUE : FALSE data["attached"] = attached ? TRUE : FALSE
data["history"] = history
data["areas"] = list()
if(attached) if(attached)
data["supply"] = attached.powernet.viewavail data["supply"] = attached.powernet.viewavail
data["demand"] = attached.powernet.viewload data["demand"] = attached.powernet.viewload
data["history"] = history for(var/obj/machinery/power/terminal/term in attached.powernet.nodes)
var/obj/machinery/power/apc/A = term.master
data["areas"] = list() if(istype(A))
for(var/obj/machinery/power/terminal/term in attached.powernet.nodes) var/cell_charge
var/obj/machinery/power/apc/A = term.master if(!A.cell)
if(istype(A)) cell_charge = 0
var/cell_charge else
if(!A.cell) cell_charge = A.cell.percent()
cell_charge = 0 data["areas"] += list(list(
else "name" = A.area.name,
cell_charge = A.cell.percent() "charge" = cell_charge,
data["areas"] += list(list( "load" = A.lastused_total,
"name" = A.area.name, "charging" = A.charging,
"charge" = cell_charge, "eqp" = A.equipment,
"load" = A.lastused_total, "lgt" = A.lighting,
"charging" = A.charging, "env" = A.environ
"eqp" = A.equipment, ))
"lgt" = A.lighting,
"env" = A.environ
))
return data return data