Merge branch 'master' into cool-ipcs
This commit is contained in:
@@ -30,7 +30,6 @@
|
||||
|
||||
var/stored_power = 0//Power to deploy per tick
|
||||
|
||||
|
||||
/obj/machinery/power/am_control_unit/Initialize()
|
||||
. = ..()
|
||||
linked_shielding = list()
|
||||
@@ -44,7 +43,6 @@
|
||||
QDEL_NULL(fueljar)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/machinery/power/am_control_unit/process()
|
||||
if(exploding)
|
||||
explosion(get_turf(src),8,12,18,12)
|
||||
@@ -72,7 +70,6 @@
|
||||
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/power/am_control_unit/proc/produce_power()
|
||||
playsound(src.loc, 'sound/effects/bang.ogg', 25, 1)
|
||||
var/core_power = reported_core_efficiency//Effectively how much fuel we can safely deal with
|
||||
@@ -103,15 +100,9 @@
|
||||
. = ..()
|
||||
if(. & EMP_PROTECT_SELF)
|
||||
return
|
||||
switch(severity)
|
||||
if(1)
|
||||
if(active)
|
||||
toggle_power()
|
||||
stability -= rand(15,30)
|
||||
if(2)
|
||||
if(active)
|
||||
toggle_power()
|
||||
stability -= rand(10,20)
|
||||
if(active)
|
||||
toggle_power()
|
||||
stability -= rand(round(severity/5),round(severity/3))
|
||||
|
||||
/obj/machinery/power/am_control_unit/blob_act()
|
||||
stability -= 20
|
||||
@@ -123,20 +114,17 @@
|
||||
check_stability()
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/power/am_control_unit/ex_act(severity, target)
|
||||
stability -= (80 - (severity * 20))
|
||||
check_stability()
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/power/am_control_unit/bullet_act(obj/item/projectile/Proj)
|
||||
. = ..()
|
||||
if(Proj.flag != "bullet")
|
||||
stability -= Proj.force
|
||||
check_stability()
|
||||
|
||||
|
||||
/obj/machinery/power/am_control_unit/power_change()
|
||||
..()
|
||||
if(stat & NOPOWER)
|
||||
@@ -150,7 +138,6 @@
|
||||
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/power/am_control_unit/update_icon_state()
|
||||
if(active)
|
||||
icon_state = "control_on"
|
||||
@@ -158,7 +145,6 @@
|
||||
icon_state = "control"
|
||||
//No other icons for it atm
|
||||
|
||||
|
||||
/obj/machinery/power/am_control_unit/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/wrench))
|
||||
if(!anchored)
|
||||
@@ -192,7 +178,6 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/machinery/power/am_control_unit/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
@@ -221,7 +206,6 @@
|
||||
update_shield_icons = 1
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/power/am_control_unit/proc/remove_shielding(obj/machinery/am_shielding/AMS)
|
||||
if(!istype(AMS))
|
||||
return 0
|
||||
@@ -231,13 +215,11 @@
|
||||
toggle_power()
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/power/am_control_unit/proc/check_stability()//TODO: make it break when low also might want to add a way to fix it like a part or such that can be replaced
|
||||
if(stability <= 0)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/power/am_control_unit/proc/toggle_power(powerfail = 0)
|
||||
active = !active
|
||||
if(active)
|
||||
@@ -249,7 +231,6 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/power/am_control_unit/proc/check_shield_icons()//Forces icon_update for all shields
|
||||
if(shield_icon_delay)
|
||||
return
|
||||
|
||||
@@ -1161,7 +1161,7 @@
|
||||
occupier.eyeobj.name = "[occupier.name] (AI Eye)"
|
||||
if(malf.parent)
|
||||
qdel(malf)
|
||||
occupier.verbs += /mob/living/silicon/ai/proc/corereturn
|
||||
add_verb(occupier, /mob/living/silicon/ai/proc/corereturn)
|
||||
occupier.cancel_camera()
|
||||
|
||||
|
||||
@@ -1173,7 +1173,7 @@
|
||||
occupier.parent.shunted = 0
|
||||
occupier.parent.setOxyLoss(occupier.getOxyLoss())
|
||||
occupier.parent.cancel_camera()
|
||||
occupier.parent.verbs -= /mob/living/silicon/ai/proc/corereturn
|
||||
remove_verb(occupier.parent, /mob/living/silicon/ai/proc/corereturn)
|
||||
qdel(occupier)
|
||||
else
|
||||
to_chat(occupier, "<span class='danger'>Primary core damaged, unable to return core processes.</span>")
|
||||
@@ -1449,7 +1449,7 @@
|
||||
environ = 0
|
||||
update_icon()
|
||||
update()
|
||||
addtimer(CALLBACK(src, .proc/reset, APC_RESET_EMP), 600)
|
||||
addtimer(CALLBACK(src, .proc/reset, APC_RESET_EMP), severity*8)
|
||||
|
||||
/obj/machinery/power/apc/blob_act(obj/structure/blob/B)
|
||||
set_broken()
|
||||
|
||||
@@ -136,8 +136,8 @@
|
||||
. = ..()
|
||||
if(. & EMP_PROTECT_SELF)
|
||||
return
|
||||
charge -= 1000 / severity
|
||||
if (charge < 0)
|
||||
charge -= 10 * severity
|
||||
if(charge < 0)
|
||||
charge = 0
|
||||
|
||||
/obj/item/stock_parts/cell/ex_act(severity, target)
|
||||
@@ -376,7 +376,7 @@
|
||||
. = ..()
|
||||
if(. & EMP_PROTECT_SELF)
|
||||
return
|
||||
charge = clamp((charge-(10000/severity)),0,maxcharge)
|
||||
charge = clamp((charge-(100*severity)),0,maxcharge)
|
||||
|
||||
/obj/item/stock_parts/cell/emergency_light
|
||||
name = "miniature power cell"
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
var/energy_transfer = delta_temperature*hot_air_heat_capacity*cold_air_heat_capacity/(hot_air_heat_capacity+cold_air_heat_capacity)
|
||||
|
||||
var/heat = energy_transfer*(1-efficiency)
|
||||
lastgen += LOGISTIC_FUNCTION(1250000,0.0001,delta_temperature,50000)
|
||||
lastgen += LOGISTIC_FUNCTION(500000,0.0009,delta_temperature,10000)
|
||||
|
||||
hot_air.set_temperature(hot_air.return_temperature() - energy_transfer/hot_air_heat_capacity)
|
||||
cold_air.set_temperature(cold_air.return_temperature() + heat/cold_air_heat_capacity)
|
||||
|
||||
@@ -209,7 +209,7 @@
|
||||
if(obj_flags & EMAGGED)
|
||||
return
|
||||
obj_flags |= EMAGGED
|
||||
emp_act(EMP_HEAVY)
|
||||
emp_act(100)
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/attack_ai(mob/user)
|
||||
interact(user)
|
||||
|
||||
@@ -434,7 +434,7 @@
|
||||
|
||||
|
||||
/obj/singularity/proc/emp_area()
|
||||
empulse(src, 8, 10)
|
||||
empulse_using_range(src, 10)
|
||||
return
|
||||
|
||||
/obj/singularity/singularity_act()
|
||||
|
||||
@@ -407,7 +407,7 @@
|
||||
outputting = output_attempt
|
||||
output_level = rand(0, output_level_max)
|
||||
input_level = rand(0, input_level_max)
|
||||
charge -= 1e6/severity
|
||||
charge -= 10000*severity
|
||||
if (charge < 0)
|
||||
charge = 0
|
||||
update_icon()
|
||||
|
||||
@@ -346,7 +346,7 @@
|
||||
if(issilicon(closest_mob))
|
||||
var/mob/living/silicon/S = closest_mob
|
||||
if((zap_flags & ZAP_MOB_STUN) && (zap_flags & ZAP_MOB_DAMAGE))
|
||||
S.emp_act(EMP_LIGHT)
|
||||
S.emp_act(50)
|
||||
next_range = 7 // metallic folks bounce it further
|
||||
else
|
||||
next_range = 5
|
||||
|
||||
Reference in New Issue
Block a user