12/21 modernizations from TG live (#103)
* sync (#3) * shuttle auto call * Merge /vore into /master (#39) * progress * Compile errors fixed No idea if it's test worthy tho as conflicts with race overhaul and narky removal. * Update admins.txt * efforts continue Fuck grab code, seriously * grab code is cancer * Execute the Narkism Do not hesitate. Show no mercy. * holy shit grab code is awful * have I bitched about grab code My bitching, let me show you it * código de agarre es una mierda No really it is * yeah I don't even know anymore. * Lolnope. Fuck grab code * I'm not even sure what to fix anymore * Self eating is not an acceptable fate * Taste the void, son. * My code doesn't pass it's own sanity check. Maybe it's a sign of things to come. * uncommented and notes * It Works and I Don't Know Why (#38) * shuttle auto call * it works and I don't know why * Subsystem 12/21 Most Recent TG subsystem folder * globalvars 12/21 Tossed out the flavor_misc and parallax files * Onclick 12/21 as well as .dme updates * _defines 12/21 ommited old _MC.dm * _HELPERS 12/21 Preserved snowflake placement of furry sprites * _defeines/genetics reapplied narkism holdover for snowflake races. * Oops forgot mutant colors * modules porting 12/21 + Sounds/icons Admin, Client and most of mob life files ommitted * enviroment file * Admin optimizations ahelp log system kept * Mob ports 12/21 Flavor text preserved * datums ported 12/21 * Game ported 12/21 * batch of duplicate fixes/dogborg work Dogborgs need to be modernized to refractored borg standards. * moar fixes * Maps and futher compile fixes
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
desc = "This device injects antimatter into connected shielding units, the more antimatter injected the more power produced. Wrench the device to set it up."
|
||||
icon = 'icons/obj/machines/antimatter.dmi'
|
||||
icon_state = "control"
|
||||
anchored = 1
|
||||
anchored = 0
|
||||
density = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 100
|
||||
@@ -37,7 +37,10 @@
|
||||
|
||||
/obj/machinery/power/am_control_unit/Destroy()//Perhaps damage and run stability checks rather than just del on the others
|
||||
for(var/obj/machinery/am_shielding/AMS in linked_shielding)
|
||||
AMS.control_unit = null
|
||||
qdel(AMS)
|
||||
qdel(fueljar)
|
||||
fueljar = null
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -56,7 +59,7 @@
|
||||
|
||||
if(!fueljar)//No fuel but we are on, shutdown
|
||||
toggle_power()
|
||||
//Angry buzz or such here
|
||||
playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, 0)
|
||||
return
|
||||
|
||||
add_avail(stored_power)
|
||||
@@ -135,8 +138,15 @@
|
||||
|
||||
/obj/machinery/power/am_control_unit/power_change()
|
||||
..()
|
||||
if(stat & NOPOWER && active)
|
||||
toggle_power()
|
||||
if(stat & NOPOWER)
|
||||
if(active)
|
||||
toggle_power(1)
|
||||
else
|
||||
use_power = 0
|
||||
|
||||
else if(!stat && anchored)
|
||||
use_power = 1
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -150,14 +160,14 @@
|
||||
/obj/machinery/power/am_control_unit/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(!anchored)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
playsound(src.loc, W.usesound, 75, 1)
|
||||
user.visible_message("[user.name] secures the [src.name] to the floor.", \
|
||||
"<span class='notice'>You secure the anchor bolts to the floor.</span>", \
|
||||
"<span class='italics'>You hear a ratchet.</span>")
|
||||
src.anchored = 1
|
||||
connect_to_network()
|
||||
else if(!linked_shielding.len > 0)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
playsound(src.loc, W.usesound, 75, 1)
|
||||
user.visible_message("[user.name] unsecures the [src.name].", \
|
||||
"<span class='notice'>You remove the anchor bolts.</span>", \
|
||||
"<span class='italics'>You hear a ratchet.</span>")
|
||||
@@ -170,18 +180,18 @@
|
||||
if(fueljar)
|
||||
user << "<span class='warning'>There is already a [fueljar] inside!</span>"
|
||||
return
|
||||
|
||||
if(!user.unEquip(W))
|
||||
return
|
||||
fueljar = W
|
||||
W.loc = src
|
||||
if(user.client)
|
||||
user.client.screen -= W
|
||||
user.unEquip(W)
|
||||
user.update_icons()
|
||||
W.forceMove(src)
|
||||
user.visible_message("[user.name] loads an [W.name] into the [src.name].", \
|
||||
"<span class='notice'>You load an [W.name].</span>", \
|
||||
"<span class='italics'>You hear a thunk.</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/machinery/power/am_control_unit/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
@@ -231,13 +241,13 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/power/am_control_unit/proc/toggle_power()
|
||||
/obj/machinery/power/am_control_unit/proc/toggle_power(powerfail = 0)
|
||||
active = !active
|
||||
if(active)
|
||||
use_power = 2
|
||||
visible_message("The [src.name] starts up.")
|
||||
else
|
||||
use_power = 1
|
||||
use_power = !powerfail
|
||||
visible_message("The [src.name] shuts down.")
|
||||
update_icon()
|
||||
return
|
||||
@@ -279,7 +289,7 @@
|
||||
|
||||
/obj/machinery/power/am_control_unit/interact(mob/user)
|
||||
if((get_dist(src, user) > 1) || (stat & (BROKEN|NOPOWER)))
|
||||
if(!istype(user, /mob/living/silicon/ai))
|
||||
if(!isAI(user))
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=AMcontrol")
|
||||
return
|
||||
@@ -350,4 +360,4 @@
|
||||
check_core_stability()
|
||||
|
||||
updateDialog()
|
||||
return
|
||||
return
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
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)
|
||||
@@ -91,20 +93,6 @@
|
||||
/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()
|
||||
@@ -119,25 +107,48 @@
|
||||
|
||||
|
||||
/obj/machinery/am_shielding/update_icon()
|
||||
dirs = 0
|
||||
coredirs = 0
|
||||
cut_overlays()
|
||||
for(var/direction in alldirs)
|
||||
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]")
|
||||
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]"
|
||||
|
||||
if(core_check())
|
||||
add_overlay("core")
|
||||
add_overlay("core[control_unit && control_unit.active]")
|
||||
if(!processing)
|
||||
setup_core()
|
||||
else if(processing)
|
||||
shutdown_core()
|
||||
|
||||
|
||||
/obj/machinery/am_shielding/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
|
||||
/obj/machinery/am_shielding/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(sound_effect)
|
||||
if(damage)
|
||||
if(damage_amount)
|
||||
playsound(loc, 'sound/weapons/smash.ogg', 50, 1)
|
||||
else
|
||||
playsound(loc, 'sound/weapons/tap.ogg', 50, 1)
|
||||
@@ -146,8 +157,8 @@
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
else
|
||||
return
|
||||
if(damage >= 10)
|
||||
stability -= damage/2
|
||||
if(damage_amount >= 10)
|
||||
stability -= damage_amount/2
|
||||
check_stability()
|
||||
|
||||
|
||||
@@ -165,10 +176,15 @@
|
||||
//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/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))
|
||||
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)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -220,7 +236,7 @@
|
||||
icon = 'icons/obj/machines/antimatter.dmi'
|
||||
icon_state = "box"
|
||||
item_state = "electronic"
|
||||
w_class = 4
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
flags = CONDUCT
|
||||
throwforce = 5
|
||||
throw_speed = 1
|
||||
|
||||
Reference in New Issue
Block a user