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:
@@ -7,27 +7,35 @@
|
||||
use_power = 1
|
||||
idle_power_usage = 300
|
||||
active_power_usage = 300
|
||||
obj_integrity = 200
|
||||
max_integrity = 200
|
||||
integrity_failure = 100
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 40, acid = 20)
|
||||
var/obj/item/weapon/circuitboard/computer/circuit = null // if circuit==null, computer can't disassembly
|
||||
var/processing = 0
|
||||
var/brightness_on = 2
|
||||
var/icon_keyboard = "generic_key"
|
||||
var/icon_screen = "generic"
|
||||
var/computer_health = 25
|
||||
var/clockwork = FALSE
|
||||
|
||||
use_auto_lights = 1
|
||||
light_power_on = 1
|
||||
light_range_on = 3
|
||||
|
||||
/obj/machinery/computer/New(location, obj/item/weapon/circuitboard/C)
|
||||
..(location)
|
||||
if(C && istype(C))
|
||||
circuit = C
|
||||
else if(circuit)
|
||||
//Some machines, oldcode arcades mostly, new themselves, so circuit
|
||||
//can already be an instance of a type and trying to new that will
|
||||
//cause a runtime
|
||||
else if(ispath(circuit))
|
||||
circuit = new circuit(null)
|
||||
power_change()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/computer/Destroy()
|
||||
if(circuit)
|
||||
qdel(circuit)
|
||||
circuit = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/initialize()
|
||||
power_change()
|
||||
|
||||
@@ -36,30 +44,8 @@
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/machinery/computer/emp_act(severity)
|
||||
if(severity == 1)
|
||||
take_damage(rand(15,30), BRUTE, 0)
|
||||
else
|
||||
take_damage(rand(15,25), BRUTE, 0)
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/ex_act(severity, target)
|
||||
if(target == src)
|
||||
qdel(src)
|
||||
return
|
||||
switch(severity)
|
||||
if(1)
|
||||
qdel(src)
|
||||
if(2)
|
||||
if(prob(25))
|
||||
qdel(src)
|
||||
else
|
||||
take_damage(rand(20,30), BRUTE, 0)
|
||||
if(3)
|
||||
take_damage(rand(10,30), BRUTE, 0)
|
||||
|
||||
/obj/machinery/computer/ratvar_act()
|
||||
if(!clockwork && prob(20))
|
||||
if(!clockwork)
|
||||
clockwork = TRUE
|
||||
icon_screen = "ratvar[rand(1, 4)]"
|
||||
icon_keyboard = "ratvar_key[rand(1, 6)]"
|
||||
@@ -74,10 +60,6 @@
|
||||
icon_state = initial(icon_state)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/computer/bullet_act(obj/item/projectile/P)
|
||||
take_damage(P.damage, P.damage_type, 0)
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/update_icon()
|
||||
cut_overlays()
|
||||
if(stat & NOPOWER)
|
||||
@@ -86,13 +68,15 @@
|
||||
add_overlay(icon_keyboard)
|
||||
if(stat & BROKEN)
|
||||
add_overlay("[icon_state]_broken")
|
||||
set_light(l_color = LIGHT_COLOR_BLUE)
|
||||
else
|
||||
add_overlay(icon_screen)
|
||||
set_light(l_color = initial(light_color))
|
||||
|
||||
/obj/machinery/computer/power_change()
|
||||
..()
|
||||
if(stat & NOPOWER)
|
||||
SetLuminosity(0)
|
||||
else
|
||||
SetLuminosity(brightness_on)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
@@ -100,44 +84,61 @@
|
||||
if(istype(I, /obj/item/weapon/screwdriver) && circuit && !(flags&NODECONSTRUCT))
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
user << "<span class='notice'> You start to disconnect the monitor...</span>"
|
||||
if(do_after(user, 20/I.toolspeed, target = src))
|
||||
deconstruction()
|
||||
if(do_after(user, 20*I.toolspeed, target = src))
|
||||
deconstruct(TRUE, user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(stat & BROKEN)
|
||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||
else
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
if(BURN)
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
|
||||
/obj/machinery/computer/obj_break(damage_flag)
|
||||
if(circuit && !(flags & NODECONSTRUCT)) //no circuit, no breaking
|
||||
if(!(stat & BROKEN))
|
||||
playsound(loc, 'sound/effects/Glassbr3.ogg', 100, 1)
|
||||
stat |= BROKEN
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/computer/emp_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
if(prob(50))
|
||||
obj_break("energy")
|
||||
if(2)
|
||||
if(prob(10))
|
||||
obj_break("energy")
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/deconstruct(disassembled = TRUE, mob/user)
|
||||
on_deconstruction()
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(circuit) //no circuit, no computer frame
|
||||
var/obj/structure/frame/computer/A = new /obj/structure/frame/computer(src.loc)
|
||||
A.circuit = circuit
|
||||
A.anchored = 1
|
||||
circuit = null
|
||||
for (var/obj/C in src)
|
||||
C.loc = src.loc
|
||||
if (stat & BROKEN)
|
||||
user << "<span class='notice'>The broken glass falls out.</span>"
|
||||
if(stat & BROKEN)
|
||||
if(user)
|
||||
user << "<span class='notice'>The broken glass falls out.</span>"
|
||||
else
|
||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||
new /obj/item/weapon/shard(src.loc)
|
||||
new /obj/item/weapon/shard(src.loc)
|
||||
A.state = 3
|
||||
A.icon_state = "3"
|
||||
else
|
||||
user << "<span class='notice'>You disconnect the monitor.</span>"
|
||||
if(user)
|
||||
user << "<span class='notice'>You disconnect the monitor.</span>"
|
||||
A.state = 4
|
||||
A.icon_state = "4"
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
circuit = null
|
||||
for(var/obj/C in src)
|
||||
C.forceMove(loc)
|
||||
|
||||
/obj/machinery/computer/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(sound_effect)
|
||||
if(stat & BROKEN)
|
||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||
else
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
if(BURN)
|
||||
if(sound_effect)
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
else
|
||||
return
|
||||
computer_health = max(computer_health - damage, 0)
|
||||
if(circuit) //no circuit, no breaking
|
||||
if(!computer_health && !(stat & BROKEN))
|
||||
playsound(loc, 'sound/effects/Glassbr3.ogg', 100, 1)
|
||||
stat |= BROKEN
|
||||
update_icon()
|
||||
qdel(src)
|
||||
|
||||
Reference in New Issue
Block a user