mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-28 22:47:59 +01:00
Merge remote-tracking branch 'upstream/master' into I-guess-I-port-stuff-now-huh
This commit is contained in:
@@ -854,7 +854,7 @@
|
||||
// to_chat(world, "[area.power_equip]")
|
||||
area.power_change()
|
||||
|
||||
/obj/machinery/power/apc/proc/can_use(var/mob/user, var/loud = 0) //used by attack_hand() and Topic()
|
||||
/obj/machinery/power/apc/proc/can_use(mob/user, loud = 0) //used by attack_hand() and Topic()
|
||||
if(user.can_admin_interact())
|
||||
return 1
|
||||
|
||||
@@ -1255,7 +1255,7 @@
|
||||
picked_light.flicker()
|
||||
|
||||
|
||||
/obj/machinery/power/apc/proc/autoset(var/val, var/on)
|
||||
/obj/machinery/power/apc/proc/autoset(val, on)
|
||||
if(on==0)
|
||||
if(val==2) // if on, return off
|
||||
return 0
|
||||
@@ -1357,8 +1357,20 @@
|
||||
aidisabled = FALSE
|
||||
updateDialog()
|
||||
|
||||
#undef APC_UPDATE_ICON_COOLDOWN
|
||||
/obj/machinery/power/apc/proc/repair_apc()
|
||||
if(wires)
|
||||
wires.repair()
|
||||
if(!operating)
|
||||
toggle_breaker()
|
||||
if(shorted)
|
||||
shorted = FALSE
|
||||
|
||||
/obj/machinery/power/apc/proc/recharge_apc()
|
||||
var/obj/item/stock_parts/cell/C = get_cell()
|
||||
if(C)
|
||||
C.charge = C.maxcharge
|
||||
|
||||
#undef APC_UPDATE_ICON_COOLDOWN
|
||||
#undef APC_EXTERNAL_POWER_NOTCONNECTED
|
||||
#undef APC_EXTERNAL_POWER_NOENERGY
|
||||
#undef APC_EXTERNAL_POWER_GOOD
|
||||
|
||||
@@ -24,5 +24,5 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/cable/heavyduty/cable_color(var/colorC)
|
||||
/obj/structure/cable/heavyduty/cable_color(colorC)
|
||||
return
|
||||
|
||||
@@ -532,7 +532,7 @@
|
||||
* Flicker routine for the light.
|
||||
* Called by invoke_async so the parent proc can return immediately.
|
||||
*/
|
||||
/obj/machinery/light/proc/flicker_event(var/amount)
|
||||
/obj/machinery/light/proc/flicker_event(amount)
|
||||
if(on && status == LIGHT_OK)
|
||||
for(var/i = 0; i < amount; i++)
|
||||
if(status != LIGHT_OK)
|
||||
@@ -830,7 +830,7 @@
|
||||
..()
|
||||
shatter()
|
||||
|
||||
/obj/item/light/attack_obj(obj/O, mob/living/user)
|
||||
/obj/item/light/attack_obj(obj/O, mob/living/user, params)
|
||||
..()
|
||||
shatter()
|
||||
|
||||
|
||||
@@ -264,7 +264,7 @@
|
||||
sheet_left = 0
|
||||
..()
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/emag_act(var/remaining_charges, var/mob/user)
|
||||
/obj/machinery/power/port_gen/pacman/emag_act(remaining_charges, mob/user)
|
||||
if(active && prob(25))
|
||||
explode() //if they're foolish enough to emag while it's running
|
||||
|
||||
@@ -272,7 +272,7 @@
|
||||
emagged = 1
|
||||
return 1
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
/obj/machinery/power/port_gen/pacman/attackby(obj/item/O as obj, mob/user as mob)
|
||||
if(istype(O, sheet_path))
|
||||
var/obj/item/stack/addstack = O
|
||||
var/amount = min((max_sheets - sheets), addstack.amount)
|
||||
@@ -316,11 +316,11 @@
|
||||
..()
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/attack_ai(var/mob/user as mob)
|
||||
/obj/machinery/power/port_gen/pacman/attack_ai(mob/user as mob)
|
||||
add_hiddenprint(user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/attack_ghost(var/mob/user)
|
||||
/obj/machinery/power/port_gen/pacman/attack_ghost(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/power/port_gen/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = TRUE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
// returns true if the area has power on given channel (or doesn't require power).
|
||||
// defaults to power_channel
|
||||
/obj/machinery/proc/powered(var/chan = -1) // defaults to power_channel
|
||||
/obj/machinery/proc/powered(chan = -1) // defaults to power_channel
|
||||
if(!loc)
|
||||
return FALSE
|
||||
if(!use_power)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
density = 0
|
||||
move_resist = INFINITY
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
flags_2 = RAD_NO_CONTAMINATE_2
|
||||
use_power = NO_POWER_USE
|
||||
light_range = 4
|
||||
layer = OBJ_LAYER + 0.1
|
||||
|
||||
@@ -1,25 +1,38 @@
|
||||
#define EMITTER_NEEDS_WRENCH 0
|
||||
#define EMITTER_NEEDS_WELDER 1
|
||||
#define EMITTER_WELDED 2
|
||||
|
||||
/obj/machinery/power/emitter
|
||||
name = "Emitter"
|
||||
name = "emitter"
|
||||
desc = "A heavy duty industrial laser"
|
||||
icon = 'icons/obj/singularity.dmi'
|
||||
icon_state = "emitter"
|
||||
anchored = 0
|
||||
density = 1
|
||||
anchored = FALSE
|
||||
density = TRUE
|
||||
req_access = list(ACCESS_ENGINE_EQUIP)
|
||||
|
||||
use_power = NO_POWER_USE
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 300
|
||||
|
||||
var/active = 0
|
||||
var/powered = 0
|
||||
/// Is the emitter turned on
|
||||
var/active = FALSE
|
||||
/// Is the emitter powered
|
||||
var/powered = FALSE
|
||||
/// Delay between each emitter shot (In deciseconds)
|
||||
var/fire_delay = 100
|
||||
/// Maximum delay between each emitter shot
|
||||
var/maximum_fire_delay = 100
|
||||
/// Minimum delay between each emitter shot
|
||||
var/minimum_fire_delay = 20
|
||||
/// When was the last emitter shot
|
||||
var/last_shot = 0
|
||||
/// How many shots have been fired
|
||||
var/shot_number = 0
|
||||
var/state = 0
|
||||
var/locked = 0
|
||||
/// Construction state
|
||||
var/state = EMITTER_NEEDS_WRENCH
|
||||
/// Locked by an ID card
|
||||
var/locked = FALSE
|
||||
|
||||
var/projectile_type = /obj/item/projectile/beam/emitter
|
||||
var/projectile_sound = 'sound/weapons/emitter.ogg'
|
||||
@@ -32,12 +45,17 @@
|
||||
component_parts += new /obj/item/stock_parts/micro_laser(null)
|
||||
component_parts += new /obj/item/stock_parts/manipulator(null)
|
||||
RefreshParts()
|
||||
if(state == 2 && anchored)
|
||||
if(state == EMITTER_WELDED && anchored)
|
||||
connect_to_network()
|
||||
sparks = new
|
||||
sparks.attach(src)
|
||||
sparks.set_up(5, 1, src)
|
||||
|
||||
/obj/machinery/power/emitter/examine(mob/user)
|
||||
. = ..()
|
||||
if(panel_open)
|
||||
. += "<span class='notice'>The maintenance panel is open.</span>"
|
||||
|
||||
/obj/machinery/power/emitter/RefreshParts()
|
||||
var/max_firedelay = 120
|
||||
var/firedelay = 120
|
||||
@@ -59,11 +77,10 @@
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(src.anchored || usr:stat)
|
||||
if(anchored)
|
||||
to_chat(usr, "It is fastened to the floor!")
|
||||
return 0
|
||||
src.dir = turn(src.dir, 90)
|
||||
return 1
|
||||
return
|
||||
dir = turn(dir, 90)
|
||||
|
||||
/obj/machinery/power/emitter/AltClick(mob/user)
|
||||
if(user.incapacitated())
|
||||
@@ -87,46 +104,49 @@
|
||||
icon_state = "emitter"
|
||||
|
||||
|
||||
/obj/machinery/power/emitter/attack_hand(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
if(state == 2)
|
||||
if(!powernet)
|
||||
to_chat(user, "The emitter isn't connected to a wire.")
|
||||
return 1
|
||||
if(!src.locked)
|
||||
if(src.active==1)
|
||||
src.active = 0
|
||||
to_chat(user, "You turn off the [src].")
|
||||
message_admins("Emitter turned off by [key_name_admin(user)] in ([x], [y], [z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Emitter turned off by [key_name(user)] in [x], [y], [z]")
|
||||
investigate_log("turned <font color='red'>off</font> by [key_name(usr)]","singulo")
|
||||
else
|
||||
src.active = 1
|
||||
to_chat(user, "You turn on the [src].")
|
||||
src.shot_number = 0
|
||||
src.fire_delay = maximum_fire_delay
|
||||
message_admins("Emitter turned on by [key_name_admin(user)] in ([x], [y], [z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Emitter turned on by [key_name(user)] in [x], [y], [z]")
|
||||
investigate_log("turned <font color='green'>on</font> by [key_name(usr)]","singulo")
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The controls are locked!</span>")
|
||||
/obj/machinery/power/emitter/emag_act(mob/living/user)
|
||||
if(!emagged)
|
||||
locked = FALSE
|
||||
emagged = TRUE
|
||||
if(user)
|
||||
user.visible_message("<span class='warning'>[user] shorts out the lock on [src].</span>",
|
||||
"<span class='warning'>You short out the lock on [src].</span>")
|
||||
|
||||
/obj/machinery/power/emitter/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
if(state != EMITTER_WELDED)
|
||||
to_chat(user, "<span class='warning'>[src] needs to be firmly secured to the floor first.</span>")
|
||||
return TRUE
|
||||
if(!powernet)
|
||||
to_chat(user, "<span class='warning'>The emitter isn't connected to a wire.</span>")
|
||||
return TRUE
|
||||
if(panel_open)
|
||||
to_chat(user, "<span class='warning'>The maintenance panel needs to be closed!</span>")
|
||||
return
|
||||
if(locked)
|
||||
to_chat(user, "<span class='warning'>The controls are locked!</span>")
|
||||
return
|
||||
|
||||
var/toggle
|
||||
if(active)
|
||||
active = FALSE
|
||||
toggle = "off"
|
||||
shot_number = 0
|
||||
fire_delay = maximum_fire_delay
|
||||
investigate_log("turned <font color='red'>off</font> by [key_name(user)]", "singulo")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The [src] needs to be firmly secured to the floor first.</span>")
|
||||
return 1
|
||||
active = TRUE
|
||||
toggle = "on"
|
||||
investigate_log("turned <font color='green'>on</font> by [key_name(user)]", "singulo")
|
||||
|
||||
|
||||
/obj/machinery/power/emitter/emp_act(var/severity)//Emitters are hardened but still might have issues
|
||||
// add_load(1000)
|
||||
/* if((severity == 1)&&prob(1)&&prob(1))
|
||||
if(src.active)
|
||||
src.active = 0
|
||||
src.use_power = IDLE_POWER_USE */
|
||||
return 1
|
||||
to_chat(user, "You turn [src] [toggle].")
|
||||
message_admins("Emitter turned [toggle] by [key_name_admin(user)] in ([x], [y], [z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)")
|
||||
log_game("Emitter turned [toggle] by [key_name(user)] in [x], [y], [z]")
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/power/emitter/attack_animal(mob/living/simple_animal/M)
|
||||
if(ismegafauna(M) && anchored)
|
||||
state = 0
|
||||
state = EMITTER_NEEDS_WRENCH
|
||||
anchored = FALSE
|
||||
M.visible_message("<span class='warning'>[M] rips [src] free from its moorings!</span>")
|
||||
else
|
||||
@@ -134,30 +154,120 @@
|
||||
if(!anchored)
|
||||
step(src, get_dir(M, src))
|
||||
|
||||
/obj/machinery/power/emitter/process()
|
||||
if(stat & (BROKEN))
|
||||
/obj/machinery/power/emitter/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/card/id) || istype(I, /obj/item/pda))
|
||||
if(emagged)
|
||||
to_chat(user, "<span class='warning'>The lock seems to be broken.</span>")
|
||||
return
|
||||
if(allowed(user))
|
||||
if(active)
|
||||
locked = !locked
|
||||
to_chat(user, "<span class='notice'>The controls are now [locked ? "locked" : "unlocked"].</span>")
|
||||
else
|
||||
locked = FALSE //just in case it somehow gets locked
|
||||
to_chat(user, "<span class='warning'>The controls can only be locked when [src] is online!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
return
|
||||
if(src.state != 2 || (!powernet && active_power_usage))
|
||||
src.active = 0
|
||||
|
||||
if(exchange_parts(user, I))
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/emitter/wrench_act(mob/living/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(active)
|
||||
to_chat(user, "<span class='warning'>Turn off [src] first!</span>")
|
||||
return
|
||||
if(state == EMITTER_WELDED)
|
||||
to_chat(user, "<span class='warning'>[src] needs to be unwelded from the floor!</span>")
|
||||
return
|
||||
|
||||
if(state == EMITTER_NEEDS_WRENCH)
|
||||
for(var/obj/machinery/power/emitter/E in get_turf(src))
|
||||
if(E.anchored)
|
||||
to_chat(user, "<span class='warning'>There is already an emitter here!</span>")
|
||||
return
|
||||
state = EMITTER_NEEDS_WELDER
|
||||
anchored = TRUE
|
||||
user.visible_message("<span class='notice'>[user] secures [src] to the floor.</span>",
|
||||
"<span class='notice'>You secure the external reinforcing bolts to the floor.</span>",
|
||||
"<span class='notice'>You hear a ratchet.</span>")
|
||||
else
|
||||
state = EMITTER_NEEDS_WRENCH
|
||||
anchored = FALSE
|
||||
user.visible_message("<span class='notice'>[user] unsecures [src] reinforcing bolts from the floor.</span>",
|
||||
"<span class='notice'>You undo the external reinforcing bolts.</span>",
|
||||
"<span class='notice'>You hear a ratchet.</span>")
|
||||
playsound(src, I.usesound, I.tool_volume, TRUE)
|
||||
|
||||
/obj/machinery/power/emitter/screwdriver_act(mob/living/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(active)
|
||||
to_chat(user, "<span class='warning'>[src] needs to be disabled first!</span>")
|
||||
return
|
||||
default_deconstruction_screwdriver(user, "emitter_open", "emitter", I)
|
||||
|
||||
/obj/machinery/power/emitter/crowbar_act(mob/living/user, obj/item/I)
|
||||
. = TRUE
|
||||
default_deconstruction_crowbar(user, I)
|
||||
|
||||
/obj/machinery/power/emitter/welder_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(active)
|
||||
to_chat(user, "<span class='notice'>Turn off [src] first.</span>")
|
||||
return
|
||||
if(state == EMITTER_NEEDS_WRENCH)
|
||||
to_chat(user, "<span class='warning'>[src] needs to be wrenched to the floor.</span>")
|
||||
return
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
|
||||
if(state == EMITTER_NEEDS_WELDER)
|
||||
WELDER_ATTEMPT_FLOOR_WELD_MESSAGE
|
||||
else if(state == EMITTER_WELDED)
|
||||
WELDER_ATTEMPT_FLOOR_SLICE_MESSAGE
|
||||
|
||||
if(!I.use_tool(src, user, 20, volume = I.tool_volume))
|
||||
return
|
||||
|
||||
if(state == EMITTER_NEEDS_WELDER)
|
||||
WELDER_FLOOR_WELD_SUCCESS_MESSAGE
|
||||
connect_to_network()
|
||||
state = EMITTER_WELDED
|
||||
else if(state == EMITTER_WELDED)
|
||||
WELDER_FLOOR_SLICE_SUCCESS_MESSAGE
|
||||
disconnect_from_network()
|
||||
state = EMITTER_NEEDS_WELDER
|
||||
|
||||
/obj/machinery/power/emitter/emp_act(severity)//Emitters are hardened but still might have issues
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/power/emitter/process()
|
||||
if((stat & BROKEN) || !active)
|
||||
return
|
||||
if(state != EMITTER_WELDED || (!powernet && active_power_usage))
|
||||
active = FALSE
|
||||
update_icon()
|
||||
return
|
||||
if(active == TRUE)
|
||||
if(!active_power_usage || surplus() >= active_power_usage)
|
||||
add_load(active_power_usage)
|
||||
if(!powered)
|
||||
powered = 1
|
||||
update_icon()
|
||||
investigate_log("regained power and turned <font color='green'>on</font>","singulo")
|
||||
else
|
||||
if(powered)
|
||||
powered = 0
|
||||
update_icon()
|
||||
investigate_log("lost power and turned <font color='red'>off</font>","singulo")
|
||||
return
|
||||
|
||||
if(!check_delay())
|
||||
return FALSE
|
||||
fire_beam()
|
||||
if(!active_power_usage || surplus() >= active_power_usage)
|
||||
add_load(active_power_usage)
|
||||
if(!powered)
|
||||
powered = TRUE
|
||||
update_icon()
|
||||
investigate_log("regained power and turned <font color='green'>on</font>","singulo")
|
||||
else
|
||||
if(powered)
|
||||
powered = FALSE
|
||||
update_icon()
|
||||
investigate_log("lost power and turned <font color='red'>off</font>","singulo")
|
||||
return
|
||||
|
||||
if(!check_delay())
|
||||
return FALSE
|
||||
fire_beam()
|
||||
|
||||
/obj/machinery/power/emitter/proc/check_delay()
|
||||
if((last_shot + fire_delay) <= world.time)
|
||||
@@ -198,7 +308,7 @@
|
||||
last_shot = world.time
|
||||
if(shot_number < 3)
|
||||
fire_delay = 20
|
||||
shot_number ++
|
||||
shot_number++
|
||||
else
|
||||
fire_delay = rand(minimum_fire_delay, maximum_fire_delay)
|
||||
shot_number = 0
|
||||
@@ -208,89 +318,6 @@
|
||||
P.fire()
|
||||
return P
|
||||
|
||||
/obj/machinery/power/emitter/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/multitool))
|
||||
update_multitool_menu(user)
|
||||
return 1
|
||||
|
||||
if(istype(W, /obj/item/wrench))
|
||||
if(active)
|
||||
to_chat(user, "Turn off the [src] first.")
|
||||
return
|
||||
switch(state)
|
||||
if(0)
|
||||
state = 1
|
||||
playsound(src.loc, W.usesound, 75, 1)
|
||||
user.visible_message("[user.name] secures [src.name] to the floor.", \
|
||||
"You secure the external reinforcing bolts to the floor.", \
|
||||
"You hear a ratchet")
|
||||
src.anchored = 1
|
||||
if(1)
|
||||
state = 0
|
||||
playsound(src.loc,W.usesound, 75, 1)
|
||||
user.visible_message("[user.name] unsecures [src.name] reinforcing bolts from the floor.", \
|
||||
"You undo the external reinforcing bolts.", \
|
||||
"You hear a ratchet")
|
||||
src.anchored = 0
|
||||
if(2)
|
||||
to_chat(user, "<span class='warning'>The [src.name] needs to be unwelded from the floor.</span>")
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/card/id) || istype(W, /obj/item/pda))
|
||||
if(emagged)
|
||||
to_chat(user, "<span class='warning'>The lock seems to be broken</span>")
|
||||
return
|
||||
if(src.allowed(user))
|
||||
if(active)
|
||||
src.locked = !src.locked
|
||||
to_chat(user, "The controls are now [src.locked ? "locked." : "unlocked."]")
|
||||
else
|
||||
src.locked = 0 //just in case it somehow gets locked
|
||||
to_chat(user, "<span class='warning'>The controls can only be locked when the [src] is online</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
return
|
||||
|
||||
if(default_deconstruction_screwdriver(user, "emitter_open", "emitter", W))
|
||||
return
|
||||
|
||||
if(exchange_parts(user, W))
|
||||
return
|
||||
|
||||
if(default_deconstruction_crowbar(user, W))
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/emitter/emag_act(var/mob/living/user as mob)
|
||||
if(!emagged)
|
||||
locked = 0
|
||||
emagged = 1
|
||||
if(user)
|
||||
user.visible_message("[user.name] emags the [src.name].","<span class='warning'>You short out the lock.</span>")
|
||||
|
||||
|
||||
/obj/machinery/power/emitter/welder_act(mob/user, obj/item/I)
|
||||
if(active)
|
||||
to_chat(user, "<span class='notice'>Turn off [src] first.</span>")
|
||||
return
|
||||
if(state == 0)
|
||||
to_chat(user, "<span class='warning'>[src] needs to be wrenched to the floor.</span>")
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(state == 1)
|
||||
WELDER_ATTEMPT_FLOOR_WELD_MESSAGE
|
||||
else if(state == 2)
|
||||
WELDER_ATTEMPT_FLOOR_SLICE_MESSAGE
|
||||
if(!I.use_tool(src, user, 20, volume = I.tool_volume))
|
||||
return
|
||||
if(state == 1)
|
||||
WELDER_FLOOR_WELD_SUCCESS_MESSAGE
|
||||
connect_to_network()
|
||||
state = 2
|
||||
else if(state == 2)
|
||||
WELDER_FLOOR_SLICE_SUCCESS_MESSAGE
|
||||
disconnect_from_network()
|
||||
state = 1
|
||||
#undef EMITTER_NEEDS_WRENCH
|
||||
#undef EMITTER_NEEDS_WELDER
|
||||
#undef EMITTER_WELDED
|
||||
|
||||
@@ -174,7 +174,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
|
||||
return 0
|
||||
|
||||
|
||||
/obj/structure/particle_accelerator/proc/report_ready(var/obj/O)
|
||||
/obj/structure/particle_accelerator/proc/report_ready(obj/O)
|
||||
if(O && (O == master))
|
||||
if(construction_state >= 3)
|
||||
return 1
|
||||
@@ -187,7 +187,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
|
||||
return 0
|
||||
|
||||
|
||||
/obj/structure/particle_accelerator/proc/connect_master(var/obj/O)
|
||||
/obj/structure/particle_accelerator/proc/connect_master(obj/O)
|
||||
if(O && istype(O,/obj/machinery/particle_accelerator/control_box))
|
||||
if(O.dir == dir)
|
||||
master = O
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
part.strength = strength
|
||||
part.update_icon()
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/proc/add_strength(var/s)
|
||||
/obj/machinery/particle_accelerator/control_box/proc/add_strength(s)
|
||||
if(assembled)
|
||||
strength++
|
||||
if(strength > strength_upper_limit)
|
||||
@@ -135,7 +135,7 @@
|
||||
investigate_log("increased to <font color='red'>[strength]</font> by [usr.key]","singulo")
|
||||
strength_change()
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/proc/remove_strength(var/s)
|
||||
/obj/machinery/particle_accelerator/control_box/proc/remove_strength(s)
|
||||
if(assembled)
|
||||
strength--
|
||||
if(strength < 0)
|
||||
@@ -215,7 +215,7 @@
|
||||
return 0
|
||||
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/proc/check_part(var/turf/T, var/type)
|
||||
/obj/machinery/particle_accelerator/control_box/proc/check_part(turf/T, type)
|
||||
if(!(T)||!(type))
|
||||
return 0
|
||||
var/obj/structure/particle_accelerator/PA = locate(/obj/structure/particle_accelerator) in T
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/structure/particle_accelerator/particle_emitter/proc/set_delay(var/delay)
|
||||
/obj/structure/particle_accelerator/particle_emitter/proc/set_delay(delay)
|
||||
if(delay && delay >= 0)
|
||||
fire_delay = delay
|
||||
return 1
|
||||
|
||||
@@ -451,12 +451,12 @@
|
||||
smoke.start()
|
||||
|
||||
|
||||
/obj/machinery/power/smes/proc/inputting(var/do_input)
|
||||
/obj/machinery/power/smes/proc/inputting(do_input)
|
||||
input_attempt = do_input
|
||||
if(!input_attempt)
|
||||
inputting = 0
|
||||
|
||||
/obj/machinery/power/smes/proc/outputting(var/do_output)
|
||||
/obj/machinery/power/smes/proc/outputting(do_output)
|
||||
output_attempt = do_output
|
||||
if(!output_attempt)
|
||||
outputting = 0
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
return ..()
|
||||
|
||||
//set the control of the panel to a given computer if closer than SOLAR_MAX_DIST
|
||||
/obj/machinery/power/solar/proc/set_control(var/obj/machinery/power/solar_control/SC)
|
||||
/obj/machinery/power/solar/proc/set_control(obj/machinery/power/solar_control/SC)
|
||||
if(!SC || (get_dist(src, SC) > SOLAR_MAX_DIST))
|
||||
return 0
|
||||
control = SC
|
||||
@@ -42,7 +42,7 @@
|
||||
control.connected_panels.Remove(src)
|
||||
control = null
|
||||
|
||||
/obj/machinery/power/solar/proc/Make(var/obj/item/solar_assembly/S)
|
||||
/obj/machinery/power/solar/proc/Make(obj/item/solar_assembly/S)
|
||||
if(!S)
|
||||
S = new /obj/item/solar_assembly(src)
|
||||
S.glass_type = /obj/item/stack/sheet/glass
|
||||
@@ -142,7 +142,7 @@
|
||||
unset_control()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/power/solar/fake/New(var/turf/loc, var/obj/item/solar_assembly/S)
|
||||
/obj/machinery/power/solar/fake/New(turf/loc, obj/item/solar_assembly/S)
|
||||
..(loc, S, 0)
|
||||
|
||||
/obj/machinery/power/solar/fake/process()
|
||||
@@ -190,7 +190,7 @@
|
||||
var/tracker = 0
|
||||
var/glass_type = null
|
||||
|
||||
/obj/item/solar_assembly/attack_hand(var/mob/user)
|
||||
/obj/item/solar_assembly/attack_hand(mob/user)
|
||||
if(!anchored && isturf(loc)) // You can't pick it up
|
||||
..()
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
glass_type = null
|
||||
|
||||
|
||||
/obj/item/solar_assembly/attackby(var/obj/item/W, var/mob/user, params)
|
||||
/obj/item/solar_assembly/attackby(obj/item/W, mob/user, params)
|
||||
|
||||
if(!anchored && isturf(loc))
|
||||
if(istype(W, /obj/item/wrench))
|
||||
@@ -487,7 +487,7 @@
|
||||
set_panels(cdir)
|
||||
|
||||
//rotates the panel to the passed angle
|
||||
/obj/machinery/power/solar_control/proc/set_panels(var/cdir)
|
||||
/obj/machinery/power/solar_control/proc/set_panels(cdir)
|
||||
|
||||
for(var/obj/machinery/power/solar/S in connected_panels)
|
||||
S.adir = cdir //instantly rotates the panel
|
||||
|
||||
@@ -280,6 +280,10 @@
|
||||
add_overlay(causality_field, TRUE)
|
||||
|
||||
var/speaking = "[emergency_alert] The supermatter has reached critical integrity failure. Emergency causality destabilization field has been activated."
|
||||
for(var/mob/M in GLOB.player_list) // for all players
|
||||
var/turf/T = get_turf(M)
|
||||
if(istype(T) && atoms_share_level(T, src)) // if the player is on the same zlevel as the SM shared
|
||||
SEND_SOUND(M, sound('sound/machines/engine_alert2.ogg')) // then send them the sound file
|
||||
radio.autosay(speaking, name, null, list(z))
|
||||
for(var/i in SUPERMATTER_COUNTDOWN_TIME to 0 step -10)
|
||||
if(damage < explosion_point) // Cutting it a bit close there engineers
|
||||
@@ -373,9 +377,9 @@
|
||||
if(last_accent_sound < world.time && prob(20))
|
||||
var/aggression = min(((damage / 800) * (power / 2500)), 1.0) * 100
|
||||
if(damage >= 300)
|
||||
playsound(src, "smdelam", max(50, aggression), FALSE, 40, 30, falloff_distance = 10)
|
||||
playsound(src, "smdelam", max(50, aggression), FALSE, 40, 30, falloff_distance = 10, channel = CHANNEL_ENGINE)
|
||||
else
|
||||
playsound(src, "smcalm", max(50, aggression), FALSE, 25, 25, falloff_distance = 10)
|
||||
playsound(src, "smcalm", max(50, aggression), FALSE, 25, 25, falloff_distance = 10, channel = CHANNEL_ENGINE)
|
||||
var/next_sound = round((100 - aggression) * 5)
|
||||
last_accent_sound = world.time + max(SUPERMATTER_ACCENT_SOUND_MIN_COOLDOWN, next_sound)
|
||||
|
||||
@@ -564,7 +568,7 @@
|
||||
zap_count += 1
|
||||
|
||||
if(zap_count >= 1)
|
||||
playsound(src.loc, 'sound/weapons/emitter2.ogg', 100, TRUE, extrarange = 10)
|
||||
playsound(src.loc, 'sound/weapons/emitter2.ogg', 100, TRUE, extrarange = 10, channel = CHANNEL_ENGINE)
|
||||
for(var/i in 1 to zap_count)
|
||||
supermatter_zap(src, range, clamp(power*2, 4000, 20000), flags)
|
||||
|
||||
@@ -816,7 +820,7 @@
|
||||
icon_state = "darkmatter"
|
||||
|
||||
/obj/machinery/power/supermatter_crystal/proc/supermatter_pull(turf/center, pull_range = 3)
|
||||
playsound(center, 'sound/weapons/marauder.ogg', 100, TRUE, extrarange = pull_range - world.view)
|
||||
playsound(center, 'sound/weapons/marauder.ogg', 100, TRUE, extrarange = pull_range - world.view, channel = CHANNEL_ENGINE)
|
||||
for(var/atom/movable/P in orange(pull_range,center))
|
||||
if((P.anchored || P.move_resist >= MOVE_FORCE_EXTREMELY_STRONG)) //move resist memes.
|
||||
if(istype(P, /obj/structure/closet))
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
move_the_basket_ball(4 + length(orbiting_balls) * 1.5)
|
||||
|
||||
playsound(loc, 'sound/magic/lightningbolt.ogg', 100, TRUE, extrarange = 30)
|
||||
playsound(loc, 'sound/magic/lightningbolt.ogg', 100, TRUE, extrarange = 30, channel = CHANNEL_ENGINE)
|
||||
|
||||
pixel_x = 0
|
||||
pixel_y = 0
|
||||
@@ -112,7 +112,7 @@
|
||||
energy_to_lower = energy_to_raise - 20
|
||||
energy_to_raise = energy_to_raise * 1.25
|
||||
|
||||
playsound(src.loc, 'sound/magic/lightning_chargeup.ogg', 100, TRUE, extrarange = 30)
|
||||
playsound(src.loc, 'sound/magic/lightning_chargeup.ogg', 100, TRUE, extrarange = 30, channel = CHANNEL_ENGINE)
|
||||
addtimer(CALLBACK(src, .proc/new_mini_ball), 100)
|
||||
|
||||
else if(energy < energy_to_lower && length(orbiting_balls))
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
|
||||
//Checks to see if there's 1 line or 2, adds text-icons-numbers/letters over display
|
||||
// Stolen from status_display
|
||||
/obj/machinery/treadmill_monitor/proc/update_display(var/line1, var/line2)
|
||||
/obj/machinery/treadmill_monitor/proc/update_display(line1, line2)
|
||||
line1 = uppertext(line1)
|
||||
line2 = uppertext(line2)
|
||||
var/new_text = {"<div style="font-size:[FONT_SIZE];color:[FONT_COLOR];font:'[FONT_STYLE]';text-align:center;" valign="top">[line1]<br>[line2]</div>"}
|
||||
|
||||
@@ -351,7 +351,7 @@
|
||||
/obj/machinery/computer/turbine_computer/locate_machinery()
|
||||
compressor = locate(/obj/machinery/power/compressor) in range(5, src)
|
||||
|
||||
/obj/machinery/computer/turbine_computer/attack_hand(var/mob/user as mob)
|
||||
/obj/machinery/computer/turbine_computer/attack_hand(mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user