Revert "12/21 modernizations from TG live"

This commit is contained in:
LetterJay
2016-12-22 22:35:44 -06:00
committed by GitHub
parent cf59ac1c3d
commit ae40d4134e
2215 changed files with 86928 additions and 707332 deletions
+27 -43
View File
@@ -24,8 +24,6 @@
var/processing = 0//To track if we are in the update list or not, we need to be when we are damaged and if we ever
var/stability = 100//If this gets low bad things tend to happen
var/efficiency = 1//How many cores this core counts for when doing power processing, plasma in the air and stability could affect this
var/coredirs = 0
var/dirs = 0
/obj/machinery/am_shielding/New(loc)
@@ -93,6 +91,20 @@
/obj/machinery/am_shielding/emp_act()//Immune due to not really much in the way of electronics.
return 0
/obj/machinery/am_shielding/blob_act()
stability -= 20
if(prob(100-stability))
if(prob(10))//Might create a node
new /obj/effect/blob/node(src.loc,150)
else
new /obj/effect/blob(src.loc,60)
qdel(src)
return
check_stability()
return
/obj/machinery/am_shielding/ex_act(severity, target)
stability -= (80 - (severity * 20))
check_stability()
@@ -107,48 +119,25 @@
/obj/machinery/am_shielding/update_icon()
dirs = 0
coredirs = 0
cut_overlays()
for(var/direction in alldirs)
var/turf/T = get_step(loc, direction)
for(var/obj/machinery/machine in T)
if(istype(machine, /obj/machinery/am_shielding))
var/obj/machinery/am_shielding/shield = machine
if(shield.control_unit == control_unit)
if(shield.processing)
coredirs |= direction
if(direction in cardinal)
dirs |= direction
else
if(istype(machine, /obj/machinery/power/am_control_unit) && (direction in cardinal))
var/obj/machinery/power/am_control_unit/control = machine
if(control == control_unit)
dirs |= direction
var/prefix = ""
var/icondirs=dirs
if(coredirs)
prefix="core"
icon_state = "[prefix]shield_[icondirs]"
var/machine = locate(/obj/machinery, get_step(loc, direction))
if((istype(machine, /obj/machinery/am_shielding) && machine:control_unit == control_unit)||(istype(machine, /obj/machinery/power/am_control_unit) && machine == control_unit))
add_overlay("shield_[direction]")
if(core_check())
add_overlay("core[control_unit && control_unit.active]")
add_overlay("core")
if(!processing)
setup_core()
else if(processing)
shutdown_core()
/obj/machinery/am_shielding/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1)
/obj/machinery/am_shielding/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
switch(damage_type)
if(BRUTE)
if(sound_effect)
if(damage_amount)
if(damage)
playsound(loc, 'sound/weapons/smash.ogg', 50, 1)
else
playsound(loc, 'sound/weapons/tap.ogg', 50, 1)
@@ -157,8 +146,8 @@
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
else
return
if(damage_amount >= 10)
stability -= damage_amount/2
if(damage >= 10)
stability -= damage/2
check_stability()
@@ -176,15 +165,10 @@
//Scans cards for shields or the control unit and if all there it
/obj/machinery/am_shielding/proc/core_check()
for(var/direction in alldirs)
var/found_am_device=0
for(var/obj/machinery/machine in get_step(loc, direction))
//var/machine = locate(/obj/machinery, get_step(loc, direction))
if(!machine)
continue//Need all for a core
if(istype(machine, /obj/machinery/am_shielding) || istype(machine, /obj/machinery/power/am_control_unit))
found_am_device = 1
break
if(!found_am_device)
var/machine = locate(/obj/machinery, get_step(loc, direction))
if(!machine)
return 0//Need all for a core
if(!istype(machine, /obj/machinery/am_shielding) && !istype(machine, /obj/machinery/power/am_control_unit))
return 0
return 1
@@ -236,7 +220,7 @@
icon = 'icons/obj/machines/antimatter.dmi'
icon_state = "box"
item_state = "electronic"
w_class = WEIGHT_CLASS_BULKY
w_class = 4
flags = CONDUCT
throwforce = 5
throw_speed = 1