module things, jfc

This commit is contained in:
Poojawa
2018-09-11 07:51:01 -05:00
parent 8b9ef1e400
commit 284e9d0325
695 changed files with 11343 additions and 5661 deletions
+53 -15
View File
@@ -101,10 +101,11 @@
var/update_state = -1
var/update_overlay = -1
var/icon_update_needed = FALSE
var/obj/machinery/computer/apc_control/remote_control = null
/obj/machinery/power/apc/unlocked
locked = FALSE
/obj/machinery/power/apc/syndicate //general syndicate access
req_access = list(ACCESS_SYNDICATE)
@@ -117,6 +118,25 @@
/obj/machinery/power/apc/highcap/fifteen_k
cell_type = /obj/item/stock_parts/cell/high/plus
/obj/machinery/power/apc/auto_name
auto_name = TRUE
/obj/machinery/power/apc/auto_name/north //Pixel offsets get overwritten on New()
dir = NORTH
pixel_y = 23
/obj/machinery/power/apc/auto_name/south
dir = SOUTH
pixel_y = -23
/obj/machinery/power/apc/auto_name/east
dir = EAST
pixel_x = 24
/obj/machinery/power/apc/auto_name/west
dir = WEST
pixel_x = -25
/obj/machinery/power/apc/get_cell()
return cell
@@ -245,6 +265,11 @@
if(integration_cog && is_servant_of_ratvar(user))
to_chat(user, "<span class='brass'>There is an integration cog installed!</span>")
to_chat(user, "<span class='notice'>Alt-Click the APC to [ locked ? "unlock" : "lock"] the interface.</span>")
if(issilicon(user))
to_chat(user, "<span class='notice'>Ctrl-Click the APC to switch the breaker [ operating ? "off" : "on"].</span>")
// update the APC icon to show the three base states
// also add overlays for indicator lights
/obj/machinery/power/apc/update_icon()
@@ -280,19 +305,17 @@
icon_state = "apc0"
if(!(update_state & UPSTATE_ALLGOOD))
cut_overlays()
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
if(update & 2)
cut_overlays()
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
if(!(stat & (BROKEN|MAINT)) && update_state & UPSTATE_ALLGOOD)
var/list/O = list(
"apcox-[locked]",
"apco3-[charging]")
SSvis_overlays.add_vis_overlay(src, icon, "apcox-[locked]", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir)
SSvis_overlays.add_vis_overlay(src, icon, "apco3-[charging]", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir)
if(operating)
O += "apco0-[equipment]"
O += "apco1-[lighting]"
O += "apco2-[environ]"
add_overlay(O)
SSvis_overlays.add_vis_overlay(src, icon, "apco0-[equipment]", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir)
SSvis_overlays.add_vis_overlay(src, icon, "apco1-[lighting]", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir)
SSvis_overlays.add_vis_overlay(src, icon, "apco2-[environ]", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir)
// And now, separately for cleanness, the lighting changing
if(update_state & UPSTATE_ALLGOOD)
@@ -452,6 +475,8 @@
return
/obj/machinery/power/apc/screwdriver_act(mob/living/user, obj/item/W)
if(..())
return TRUE
. = TRUE
if(opened)
if(cell)
@@ -699,6 +724,13 @@
else
to_chat(user, "<span class='warning'>Access denied.</span>")
/obj/machinery/power/apc/proc/toggle_nightshift_lights(mob/living/user)
if(last_nightshift_switch > world.time - 100) //~10 seconds between each toggle to prevent spamming
to_chat(usr, "<span class='warning'>[src]'s night lighting circuit breaker is still cycling!</span>")
return
last_nightshift_switch = world.time
set_nightshift(!nightshift_lights)
/obj/machinery/power/apc/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
if(damage_flag == "melee" && damage_amount < 10 && (!(stat & BROKEN) || malfai))
return 0
@@ -863,6 +895,16 @@
return FALSE
return TRUE
/obj/machinery/power/apc/can_interact(mob/user)
. = ..()
if (!. && !QDELETED(remote_control))
. = remote_control.can_interact(user)
/obj/machinery/power/apc/ui_status(mob/user)
. = ..()
if (!QDELETED(remote_control) && user == remote_control.operator)
. = UI_INTERACTIVE
/obj/machinery/power/apc/ui_act(action, params)
if(..() || !can_use(usr, 1) || (locked && !usr.has_unlimited_silicon_privilege && !failure_timer && !(integration_cog && (is_servant_of_ratvar(usr)))))
return
@@ -882,11 +924,7 @@
toggle_breaker()
. = TRUE
if("toggle_nightshift")
if(last_nightshift_switch > world.time + 100) //don't spam..
to_chat(usr, "<span class='warning'>[src]'s night lighting circuit breaker is still cycling!</span>")
return
last_nightshift_switch = world.time
set_nightshift(!nightshift_lights)
toggle_nightshift_lights()
. = TRUE
if("charge")
chargemode = !chargemode
+2
View File
@@ -211,6 +211,8 @@
return TRUE
/obj/machinery/power/generator/screwdriver_act(mob/user, obj/item/I)
if(..())
return TRUE
panel_open = !panel_open
I.play_tool_sound(src)
to_chat(user, "<span class='notice'>You [panel_open?"open":"close"] the panel on [src].</span>")
+6 -1
View File
@@ -345,6 +345,7 @@
else if(has_emergency_power(LIGHT_EMERGENCY_POWER_USE) && !turned_off())
use_power = IDLE_POWER_USE
emergency_mode = TRUE
START_PROCESSING(SSmachines, src)
else
use_power = IDLE_POWER_USE
set_light(0)
@@ -361,7 +362,11 @@
/obj/machinery/light/process()
if(has_power() && cell)
if (!cell)
return PROCESS_KILL
if(has_power())
if (cell.charge == cell.maxcharge)
return PROCESS_KILL
cell.charge = min(cell.maxcharge, cell.charge + LIGHT_EMERGENCY_POWER_USE) //Recharge emergency power automatically while not using it
if(emergency_mode && !use_emergency_power(LIGHT_EMERGENCY_POWER_USE))
update(FALSE) //Disables emergency mode and sets the color to normal
+12 -9
View File
@@ -28,6 +28,9 @@
/obj/machinery/power/proc/add_avail(amount)
if(powernet)
powernet.newavail += amount
return TRUE
else
return FALSE
/obj/machinery/power/proc/add_load(amount)
if(powernet)
@@ -52,13 +55,13 @@
// defaults to power_channel
/obj/machinery/proc/powered(var/chan = -1) // defaults to power_channel
if(!loc)
return 0
return FALSE
if(!use_power)
return 1
return TRUE
var/area/A = get_area(src) // make sure it's in an area
if(!A)
return 0 // if not, then not powered
return FALSE // if not, then not powered
if(chan == -1)
chan = power_channel
return A.powered(chan) // return power status of the area
@@ -95,21 +98,21 @@
/obj/machinery/power/proc/connect_to_network()
var/turf/T = src.loc
if(!T || !istype(T))
return 0
return FALSE
var/obj/structure/cable/C = T.get_cable_node() //check if we have a node cable on the machine turf, the first found is picked
if(!C || !C.powernet)
return 0
return FALSE
C.powernet.add_machine(src)
return 1
return TRUE
// remove and disconnect the machine from its current powernet
/obj/machinery/power/proc/disconnect_from_network()
if(!powernet)
return 0
return FALSE
powernet.remove_machine(src)
return 1
return TRUE
// attach a wire to a power machine - leads from the turf you are standing on
//almost never called, overwritten by all power machines but terminal and generator
@@ -330,7 +333,7 @@
power_source = cell
shock_damage = cell_damage
var/drained_hp = M.electrocute_act(shock_damage, source, siemens_coeff) //zzzzzzap!
add_logs(source, M, "electrocuted")
log_combat(source, M, "electrocuted")
var/drained_energy = drained_hp*20
-6
View File
@@ -43,12 +43,6 @@
return
return ..()
//ATTACK HAND IGNORING PARENT RETURN VALUE
/obj/machinery/power/rtg/attack_hand(mob/user)
if(user.a_intent == INTENT_GRAB && user_buckle_mob(user.pulling, user, check_loc = 0))
return
. = ..()
/obj/machinery/power/rtg/advanced
desc = "An advanced RTG capable of moderating isotope decay, increasing power output but reducing lifetime. It uses plasma-fueled radiation collectors to increase output even further."
power_gen = 1250 // 2500 on T1, 10000 on T4.
@@ -134,6 +134,8 @@
return TRUE
/obj/machinery/power/rad_collector/screwdriver_act(mob/living/user, obj/item/I)
if(..())
return TRUE
if(loaded_tank)
to_chat(user, "<span class='warning'>Remove the plasma tank first!</span>")
else
@@ -87,7 +87,7 @@
/obj/machinery/field
var/hasShocked = FALSE //Used to add a delay between shocks. In some cases this used to crash servers by spawning hundreds of sparks every second.
/obj/machinery/field/CollidedWith(atom/movable/mover)
/obj/machinery/field/Bumped(atom/movable/mover)
if(hasShocked)
return
if(isliving(mover))
+44 -4
View File
@@ -31,16 +31,19 @@
var/allow_switch_interact = TRUE
var/projectile_type = /obj/item/projectile/beam/emitter
var/projectile_sound = 'sound/weapons/emitter.ogg'
var/datum/effect_system/spark_spread/sparks
var/obj/item/gun/energy/gun
var/list/gun_properties
var/mode = 0
// The following 3 vars are mostly for the prototype
var/manual = FALSE
var/charge = 0
var/last_projectile_params
/obj/machinery/power/emitter/anchored
anchored = TRUE
@@ -269,10 +272,14 @@
return TRUE
/obj/machinery/power/emitter/crowbar_act(mob/living/user, obj/item/I)
if(panel_open && gun)
return remove_gun(user)
default_deconstruction_crowbar(I)
return TRUE
/obj/machinery/power/emitter/screwdriver_act(mob/living/user, obj/item/I)
if(..())
return TRUE
default_deconstruction_screwdriver(user, "emitter_open", "emitter", I)
return TRUE
@@ -295,9 +302,42 @@
else if(is_wire_tool(I) && panel_open)
wires.interact(user)
return
else if(panel_open && !gun && istype(I,/obj/item/gun/energy))
if(integrate(I,user))
return
return ..()
/obj/machinery/power/emitter/proc/integrate(obj/item/gun/energy/E,mob/user)
if(istype(E, /obj/item/gun/energy))
if(!user.transferItemToLoc(E, src))
return
gun = E
gun_properties = gun.get_turret_properties()
set_projectile()
return TRUE
/obj/machinery/power/emitter/proc/remove_gun(mob/user)
if(!gun)
return
user.put_in_hands(gun)
gun = null
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
gun_properties = list()
set_projectile()
return TRUE
/obj/machinery/power/emitter/proc/set_projectile()
if(LAZYLEN(gun_properties))
if(mode || !gun_properties["lethal_projectile"])
projectile_type = gun_properties["stun_projectile"]
projectile_sound = gun_properties["stun_projectile_sound"]
else
projectile_type = gun_properties["lethal_projectile"]
projectile_sound = gun_properties["lethal_projectile_sound"]
return
projectile_type = initial(projectile_type)
projectile_sound = initial(projectile_sound)
/obj/machinery/power/emitter/emag_act(mob/user)
if(obj_flags & EMAGGED)
return
@@ -405,7 +445,7 @@
var/delay = 0
/obj/item/turret_control/afterattack(atom/targeted_atom, mob/user, proxflag, clickparams)
..()
. = ..()
var/obj/machinery/power/emitter/E = user.buckled
E.setDir(get_dir(E,targeted_atom))
user.setDir(E.dir)
@@ -17,12 +17,6 @@
var/energy = 0
var/creation_type = /obj/singularity
//ATTACK HAND IGNORING PARENT RETURN VALUE
/obj/machinery/the_singularitygen/attack_hand(mob/user)
if(user.a_intent == INTENT_GRAB && user_buckle_mob(user.pulling, user, check_loc = 0))
return
. = ..()
/obj/machinery/the_singularitygen/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/wrench))
default_unfasten_wrench(user, W, 0)
+10 -10
View File
@@ -1,5 +1,5 @@
/obj/singularity/narsie //Moving narsie to a child object of the singularity so it can be made to function differently. --NEO
name = "Nar-sie's Avatar"
name = "Nar'Sie's Avatar"
desc = "Your mind begins to bubble and ooze as it tries to comprehend what it sees."
icon = 'icons/obj/magic_terror.dmi'
pixel_x = -89
@@ -15,10 +15,10 @@
light_range = 15
light_color = rgb(255, 0, 0)
gender = FEMALE
var/clashing = FALSE //If Nar-Sie is fighting Ratvar
var/clashing = FALSE //If Nar'Sie is fighting Ratvar
/obj/singularity/narsie/large
name = "Nar-Sie"
name = "Nar'Sie"
icon = 'icons/obj/narsie.dmi'
// Pixel stuff centers Narsie.
pixel_x = -236
@@ -29,13 +29,13 @@
/obj/singularity/narsie/large/Initialize()
. = ..()
send_to_playing_players("<span class='narsie'>NAR-SIE HAS RISEN</span>")
send_to_playing_players("<span class='narsie'>NAR'SIE HAS RISEN</span>")
sound_to_playing_players('sound/creatures/narsie_rises.ogg')
var/area/A = get_area(src)
if(A)
var/mutable_appearance/alert_overlay = mutable_appearance('icons/effects/cult_effects.dmi', "ghostalertsie")
notify_ghosts("Nar-Sie has risen in \the [A.name]. Reach out to the Geometer to be given a new shell for your soul.", source = src, alert_overlay = alert_overlay, action=NOTIFY_ATTACK)
notify_ghosts("Nar'Sie has risen in \the [A.name]. Reach out to the Geometer to be given a new shell for your soul.", source = src, alert_overlay = alert_overlay, action=NOTIFY_ATTACK)
INVOKE_ASYNC(src, .proc/narsie_spawn_animation)
/obj/singularity/narsie/large/cult // For the new cult ending, guaranteed to end the round within 3 minutes
@@ -118,10 +118,10 @@
return clashing
/obj/singularity/narsie/Collide(atom/A)
/obj/singularity/narsie/Bump(atom/A)
var/turf/T = get_turf(A)
if(T == loc)
T = get_step(A, A.dir) //please don't slam into a window like a bird, nar-sie
T = get_step(A, A.dir) //please don't slam into a window like a bird, Nar'Sie
forceMove(T)
@@ -185,12 +185,12 @@
/obj/singularity/narsie/proc/acquire(atom/food)
if(food == target)
return
to_chat(target, "<span class='cultsmall'>NAR-SIE HAS LOST INTEREST IN YOU.</span>")
to_chat(target, "<span class='cultsmall'>NAR'SIE HAS LOST INTEREST IN YOU.</span>")
target = food
if(ishuman(target))
to_chat(target, "<span class ='cult'>NAR-SIE HUNGERS FOR YOUR SOUL.</span>")
to_chat(target, "<span class ='cult'>NAR'SIE HUNGERS FOR YOUR SOUL.</span>")
else
to_chat(target, "<span class ='cult'>NAR-SIE HAS CHOSEN YOU TO LEAD HER TO HER NEXT MEAL.</span>")
to_chat(target, "<span class ='cult'>NAR'SIE HAS CHOSEN YOU TO LEAD HER TO HER NEXT MEAL.</span>")
//Wizard narsie
/obj/singularity/narsie/wizard
@@ -28,7 +28,7 @@
addtimer(CALLBACK(src, .proc/move), 1)
/obj/effect/accelerated_particle/Collide(atom/A)
/obj/effect/accelerated_particle/Bump(atom/A)
if(A)
if(isliving(A))
toxmob(A)
+16 -2
View File
@@ -81,6 +81,20 @@
/obj/singularity/blob_act(obj/structure/blob/B)
return
/obj/singularity/attack_tk(mob/user)
if(iscarbon(user))
var/mob/living/carbon/C = user
C.visible_message("<span class='danger'>[C]'s head begins to collapse in on itself!</span>", "<span class='userdanger'>Your head feels like it's collapsing in on itself! This was really not a good idea!</span>", "<span class='italics'>You hear something crack and explode in gore.</span>")
var/turf/T = get_turf(C)
for(var/i in 1 to 3)
C.apply_damage(30, BRUTE, BODY_ZONE_HEAD)
new /obj/effect/gibspawner/generic(T)
sleep(1)
C.ghostize()
var/obj/item/bodypart/head/rip_u = C.get_bodypart(BODY_ZONE_HEAD)
rip_u.dismember(BURN) //nice try jedi
qdel(rip_u)
/obj/singularity/ex_act(severity, target)
switch(severity)
if(1)
@@ -101,12 +115,12 @@
return 0 //Will there be an impact? Who knows. Will we see it? No.
/obj/singularity/Collide(atom/A)
/obj/singularity/Bump(atom/A)
consume(A)
return
/obj/singularity/CollidedWith(atom/movable/AM)
/obj/singularity/Bumped(atom/movable/AM)
consume(AM)
+28 -28
View File
@@ -24,14 +24,14 @@
var/capacity = 5e6 // maximum charge
var/charge = 0 // actual charge
var/input_attempt = 1 // 1 = attempting to charge, 0 = not attempting to charge
var/inputting = 1 // 1 = actually inputting, 0 = not inputting
var/input_attempt = TRUE // TRUE = attempting to charge, FALSE = not attempting to charge
var/inputting = TRUE // TRUE = actually inputting, FALSE = not inputting
var/input_level = 50000 // amount of power the SMES attempts to charge by
var/input_level_max = 200000 // cap on input_level
var/input_available = 0 // amount of charge available from input last tick
var/output_attempt = 1 // 1 = attempting to output, 0 = not attempting to output
var/outputting = 1 // 1 = actually outputting, 0 = not outputting
var/output_attempt = TRUE // TRUE = attempting to output, FALSE = not attempting to output
var/outputting = TRUE // TRUE = actually outputting, FALSE = not outputting
var/output_level = 50000 // amount of power the SMES attempts to output
var/output_level_max = 200000 // cap on output_level
var/output_used = 0 // amount of power actually outputted. may be less than output_level if the powernet returns excess power
@@ -53,11 +53,11 @@
terminal = term
break dir_loop
if(!terminal)
stat |= BROKEN
return
terminal.master = src
update_icon()
if(!terminal)
stat |= BROKEN
return
terminal.master = src
update_icon()
/obj/machinery/power/smes/RefreshParts()
var/IO = 0
@@ -141,11 +141,7 @@
//build the terminal and link it to the network
make_terminal(T)
terminal.connect_to_network()
return
//disassembling the terminal
if(istype(I, /obj/item/wirecutters) && terminal && panel_open)
terminal.dismantle(user, I)
connect_to_network()
return
//crowbarring it !
@@ -160,6 +156,13 @@
return ..()
/obj/machinery/power/smes/wirecutter_act(mob/living/user, obj/item/I)
//disassembling the terminal
if(terminal && panel_open)
terminal.dismantle(user, I)
return TRUE
/obj/machinery/power/smes/default_deconstruction_crowbar(obj/item/crowbar/C)
if(istype(C) && terminal)
to_chat(usr, "<span class='warning'>You must first remove the power terminal!</span>")
@@ -243,35 +246,36 @@
charge += load * SMESRATE // increase the charge
add_load(load) // add the load to the terminal side network
terminal.add_load(load) // add the load to the terminal side network
else // if not enough capcity
inputting = 0 // stop inputting
inputting = FALSE // stop inputting
else
if(input_attempt && input_available > 0)
inputting = 1
inputting = TRUE
else
inputting = 0
inputting = FALSE
//outputting
if(output_attempt)
if(outputting)
output_used = min( charge/SMESRATE, output_level) //limit output to that stored
charge -= output_used*SMESRATE // reduce the storage (may be recovered in /restore() if excessive)
add_avail(output_used) // add output to powernet (smes side)
if (add_avail(output_used)) // add output to powernet if it exists (smes side)
charge -= output_used*SMESRATE // reduce the storage (may be recovered in /restore() if excessive)
else
outputting = FALSE
if(output_used < 0.0001) // either from no charge or set to 0
outputting = 0
outputting = FALSE
investigate_log("lost power and turned <font color='red'>off</font>", INVESTIGATE_SINGULO)
else if(output_attempt && charge > output_level && output_level > 0)
outputting = 1
outputting = TRUE
else
output_used = 0
else
outputting = 0
outputting = FALSE
// only update icon if state changed
if(last_disp != chargedisplay() || last_chrg != inputting || last_onln != outputting)
@@ -309,10 +313,6 @@
return
/obj/machinery/power/smes/add_load(amount)
if(terminal && terminal.powernet)
terminal.powernet.load += amount
/obj/machinery/power/smes/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
+12 -6
View File
@@ -519,9 +519,11 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
/obj/machinery/power/supermatter_crystal/attack_tk(mob/user)
if(iscarbon(user))
var/mob/living/carbon/C = user
to_chat(C, "<span class='userdanger'>That was a really dumb idea.</span>")
var/obj/item/bodypart/head/rip_u = C.get_bodypart(BODY_ZONE_HEAD)
rip_u.dismember(BURN) //nice try jedi
to_chat(C, "<span class='userdanger'>That was a really dense idea.</span>")
C.ghostize()
var/obj/item/organ/brain/rip_u = locate(/obj/item/organ/brain) in C.internal_organs
rip_u.Remove(C)
qdel(rip_u)
/obj/machinery/power/supermatter_crystal/attack_paw(mob/user)
dust_mob(user, cause = "monkey attack")
@@ -593,7 +595,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
default_unfasten_wrench(user, tool, time = 20)
return TRUE
/obj/machinery/power/supermatter_crystal/CollidedWith(atom/movable/AM)
/obj/machinery/power/supermatter_crystal/Bumped(atom/movable/AM)
if(isliving(AM))
AM.visible_message("<span class='danger'>\The [AM] slams into \the [src] inducing a resonance... [AM.p_their()] body starts to glow and catch flame before flashing into ash.</span>",\
"<span class='userdanger'>You slam into \the [src] as your ears are filled with unearthly ringing. Your last thought is \"Oh, fuck.\"</span>",\
@@ -615,13 +617,17 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
return
message_admins("[src] has consumed [key_name_admin(user)] [ADMIN_JMP(src)].")
investigate_log("has consumed [key_name(user)].", INVESTIGATE_SUPERMATTER)
user.dust()
user.dust(force = TRUE)
matter_power += 200
else if(istype(AM, /obj/singularity))
return
else if(isobj(AM))
if(!iseffect(AM))
investigate_log("has consumed [AM].", INVESTIGATE_SUPERMATTER)
var/suspicion = ""
if(AM.fingerprintslast)
suspicion = "last touched by [AM.fingerprintslast]"
message_admins("[src] has consumed [AM], [suspicion] [ADMIN_JMP(src)].")
investigate_log("has consumed [AM] - [suspicion].", INVESTIGATE_SUPERMATTER)
qdel(AM)
if(!iseffect(AM))
matter_power += 200
+2 -13
View File
@@ -25,7 +25,7 @@
/obj/machinery/power/tesla_coil/Initialize()
. = ..()
wires = new /datum/wires/tesla_coil(src) //CITADEL EDIT, Kevinz you cheaty fuccboi.
wires = new /datum/wires/tesla_coil(src)
linked_techweb = SSresearch.science_tech
/obj/machinery/power/tesla_coil/RefreshParts()
@@ -68,11 +68,6 @@
return ..()
//ATTACK HAND IGNORING PARENT RETURN VALUE
/obj/machinery/power/tesla_coil/attack_hand(mob/user)
if(user.a_intent == INTENT_GRAB && user_buckle_mob(user.pulling, user, check_loc = 0))
return ..()
/obj/machinery/power/tesla_coil/tesla_act(power, tesla_flags, shocked_targets)
if(anchored && !panel_open)
obj_flags |= BEING_SHOCKED
@@ -174,15 +169,9 @@
return ..()
//ATTACK HAND IGNORING PARENT RETURN VALUE
/obj/machinery/power/grounding_rod/attack_hand(mob/user)
if(user.a_intent == INTENT_GRAB && user_buckle_mob(user.pulling, user, check_loc = 0))
return
. = ..()
/obj/machinery/power/grounding_rod/tesla_act(var/power)
if(anchored && !panel_open)
flick("grounding_rodhit", src)
tesla_buckle_check(power)
else
..()
..()
+14 -4
View File
@@ -24,8 +24,8 @@
var/energy_to_lower = -20
/obj/singularity/energy_ball/Initialize(mapload, starting_energy = 50, is_miniball = FALSE)
. = ..()
miniball = is_miniball
. = ..()
if(!is_miniball)
set_light(10, 7, "#EEEEFF")
@@ -123,12 +123,21 @@
EB.orbit(src, orbitsize, pick(FALSE, TRUE), rand(10, 25), pick(3, 4, 5, 6, 36))
/obj/singularity/energy_ball/Collide(atom/A)
/obj/singularity/energy_ball/Bump(atom/A)
dust_mobs(A)
/obj/singularity/energy_ball/CollidedWith(atom/movable/AM)
/obj/singularity/energy_ball/Bumped(atom/movable/AM)
dust_mobs(AM)
/obj/singularity/energy_ball/attack_tk(mob/user)
if(iscarbon(user))
var/mob/living/carbon/C = user
to_chat(C, "<span class='userdanger'>That was a shockingly dumb idea.</span>")
var/obj/item/organ/brain/rip_u = locate(/obj/item/organ/brain) in C.internal_organs
C.ghostize(0)
qdel(rip_u)
C.death()
/obj/singularity/energy_ball/orbit(obj/singularity/energy_ball/target)
if (istype(target))
target.orbiting_balls += src
@@ -193,7 +202,8 @@
/obj/machinery/gateway,
/obj/structure/lattice,
/obj/structure/grille,
/obj/machinery/the_singularitygen/tesla))
/obj/machinery/the_singularitygen/tesla,
/obj/structure/frame/machine))
for(var/A in typecache_filter_multi_list_exclusion(oview(source, zap_range+2), things_to_shock, blacklisted_tesla_types))
if(!(tesla_flags & TESLA_ALLOW_DUPLICATES) && LAZYACCESS(shocked_targets, A))