Revert "12/21 modernizations from TG live"
This commit is contained in:
@@ -4,10 +4,9 @@
|
||||
icon = 'icons/obj/machines/particle_accelerator.dmi'
|
||||
icon_state = "particle"
|
||||
anchored = 1
|
||||
density = 0
|
||||
density = 1
|
||||
var/movement_range = 10
|
||||
var/energy = 10
|
||||
var/speed = 1
|
||||
|
||||
/obj/effect/accelerated_particle/weak
|
||||
movement_range = 8
|
||||
@@ -22,27 +21,24 @@
|
||||
energy = 50
|
||||
|
||||
|
||||
/obj/effect/accelerated_particle/New(loc)
|
||||
..()
|
||||
/obj/effect/accelerated_particle/New(loc, dir = 2)
|
||||
src.setDir(dir)
|
||||
|
||||
addtimer(src, "move", 1)
|
||||
spawn(0)
|
||||
move(1)
|
||||
|
||||
|
||||
/obj/effect/accelerated_particle/Bump(atom/A)
|
||||
if(A)
|
||||
if(isliving(A))
|
||||
if (A)
|
||||
if(ismob(A))
|
||||
toxmob(A)
|
||||
else if(istype(A, /obj/machinery/the_singularitygen))
|
||||
var/obj/machinery/the_singularitygen/S = A
|
||||
S.energy += energy
|
||||
else if(istype(A, /obj/singularity))
|
||||
var/obj/singularity/S = A
|
||||
S.energy += energy
|
||||
if((istype(A,/obj/machinery/the_singularitygen))||(istype(A,/obj/singularity/)))
|
||||
A:energy += energy
|
||||
|
||||
|
||||
/obj/effect/accelerated_particle/Crossed(atom/A)
|
||||
if(isliving(A))
|
||||
toxmob(A)
|
||||
/obj/effect/accelerated_particle/Bumped(atom/A)
|
||||
if(ismob(A))
|
||||
Bump(A)
|
||||
|
||||
|
||||
/obj/effect/accelerated_particle/ex_act(severity, target)
|
||||
@@ -50,13 +46,15 @@
|
||||
|
||||
/obj/effect/accelerated_particle/proc/toxmob(mob/living/M)
|
||||
M.rad_act(energy*6)
|
||||
M.updatehealth()
|
||||
|
||||
/obj/effect/accelerated_particle/proc/move()
|
||||
|
||||
/obj/effect/accelerated_particle/proc/move(lag)
|
||||
if(!step(src,dir))
|
||||
forceMove(get_step(src,dir))
|
||||
loc = get_step(src,dir)
|
||||
movement_range--
|
||||
if(movement_range == 0)
|
||||
qdel(src)
|
||||
else
|
||||
sleep(speed)
|
||||
move()
|
||||
sleep(lag)
|
||||
move(lag)
|
||||
|
||||
@@ -26,10 +26,6 @@
|
||||
icon_state = "none"
|
||||
anchored = 0
|
||||
density = 1
|
||||
obj_integrity = 500
|
||||
max_integrity = 500
|
||||
armor = list(melee = 30, bullet = 20, laser = 20, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 90, acid = 80)
|
||||
|
||||
var/obj/machinery/particle_accelerator/control_box/master = null
|
||||
var/construction_state = PA_CONSTRUCTION_UNSECURED
|
||||
var/reference = null
|
||||
@@ -99,7 +95,7 @@
|
||||
switch(construction_state)
|
||||
if(PA_CONSTRUCTION_UNSECURED)
|
||||
if(istype(W, /obj/item/weapon/wrench) && !isinspace())
|
||||
playsound(loc, W.usesound, 75, 1)
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
anchored = 1
|
||||
user.visible_message("[user.name] secures the [name] to the floor.", \
|
||||
"You secure the external bolts.")
|
||||
@@ -107,7 +103,7 @@
|
||||
did_something = TRUE
|
||||
if(PA_CONSTRUCTION_UNWIRED)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
playsound(loc, W.usesound, 75, 1)
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
anchored = 0
|
||||
user.visible_message("[user.name] detaches the [name] from the floor.", \
|
||||
"You remove the external bolts.")
|
||||
@@ -147,17 +143,16 @@
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/particle_accelerator/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
new /obj/item/stack/sheet/metal (loc, 5)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/particle_accelerator/Move()
|
||||
..()
|
||||
if(master && master.active)
|
||||
master.toggle_power()
|
||||
investigate_log("was moved whilst active; it <font color='red'>powered down</font>.","singulo")
|
||||
|
||||
/obj/structure/particle_accelerator/blob_act(obj/effect/blob/B)
|
||||
if(prob(50))
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/particle_accelerator/update_icon()
|
||||
switch(construction_state)
|
||||
@@ -170,6 +165,7 @@
|
||||
icon_state="[reference]p[strength]"
|
||||
else
|
||||
icon_state="[reference]c"
|
||||
return
|
||||
|
||||
/obj/structure/particle_accelerator/proc/update_state()
|
||||
if(master)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box
|
||||
name = "Particle Accelerator Control Console"
|
||||
desc = "This controls the density of the particles."
|
||||
@@ -159,7 +161,6 @@
|
||||
var/turf/T = loc
|
||||
|
||||
assembled = 0
|
||||
critical_machine = FALSE
|
||||
|
||||
var/obj/structure/particle_accelerator/fuel_chamber/F = locate() in orange(1,src)
|
||||
if(!F)
|
||||
@@ -190,7 +191,6 @@
|
||||
return 0
|
||||
|
||||
assembled = 1
|
||||
critical_machine = TRUE //Only counts if the PA is actually assembled.
|
||||
return 1
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/proc/check_part(turf/T, type)
|
||||
@@ -204,7 +204,7 @@
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/proc/toggle_power()
|
||||
active = !active
|
||||
investigate_log("turned [active?"<font color='green'>ON</font>":"<font color='red'>OFF</font>"] by [usr ? key_name(usr) : "outside forces"]","singulo")
|
||||
investigate_log("turned [active?"<font color='red'>ON</font>":"<font color='green'>OFF</font>"] by [usr ? key_name(usr) : "outside forces"]","singulo")
|
||||
message_admins("PA Control Computer turned [active ?"ON":"OFF"] by [usr ? key_name_admin(usr) : "outside forces"](<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[usr]'>FLW</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("PA Control Computer turned [active ?"ON":"OFF"] by [usr ? "[key_name(usr)]" : "outside forces"] in ([x],[y],[z])")
|
||||
if(active)
|
||||
@@ -226,7 +226,7 @@
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/interact(mob/user)
|
||||
if((get_dist(src, user) > 1) || (stat & (BROKEN|NOPOWER)))
|
||||
if(!issilicon(user))
|
||||
if(!istype(user, /mob/living/silicon))
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=pacontrol")
|
||||
return
|
||||
@@ -249,6 +249,8 @@
|
||||
dat += "Particle Strength: [strength] "
|
||||
dat += "<A href='?src=\ref[src];strengthdown=1'>--</A>|<A href='?src=\ref[src];strengthup=1'>++</A><BR><BR>"
|
||||
|
||||
//user << browse(dat, "window=pacontrol;size=420x500")
|
||||
//onclose(user, "pacontrol")
|
||||
var/datum/browser/popup = new(user, "pacontrol", name, 420, 300)
|
||||
popup.set_content(dat)
|
||||
popup.set_title_image(user.browse_rsc_icon(icon, icon_state))
|
||||
@@ -271,7 +273,7 @@
|
||||
switch(construction_state)
|
||||
if(PA_CONSTRUCTION_UNSECURED)
|
||||
if(istype(W, /obj/item/weapon/wrench) && !isinspace())
|
||||
playsound(loc, W.usesound, 75, 1)
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
anchored = 1
|
||||
user.visible_message("[user.name] secures the [name] to the floor.", \
|
||||
"You secure the external bolts.")
|
||||
@@ -279,7 +281,7 @@
|
||||
did_something = TRUE
|
||||
if(PA_CONSTRUCTION_UNWIRED)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
playsound(loc, W.usesound, 75, 1)
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
anchored = 0
|
||||
user.visible_message("[user.name] detaches the [name] from the floor.", \
|
||||
"You remove the external bolts.")
|
||||
@@ -318,7 +320,7 @@
|
||||
|
||||
..()
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/blob_act(obj/structure/blob/B)
|
||||
/obj/machinery/particle_accelerator/control_box/blob_act(obj/effect/blob/B)
|
||||
if(prob(50))
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -27,17 +27,15 @@
|
||||
/obj/structure/particle_accelerator/particle_emitter/proc/emit_particle(strength = 0)
|
||||
if((last_shot + fire_delay) <= world.time)
|
||||
last_shot = world.time
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/effect/accelerated_particle/P
|
||||
var/turf/T = get_step(src,dir)
|
||||
switch(strength)
|
||||
if(0)
|
||||
P = new/obj/effect/accelerated_particle/weak(T)
|
||||
new/obj/effect/accelerated_particle/weak(T, dir)
|
||||
if(1)
|
||||
P = new/obj/effect/accelerated_particle(T)
|
||||
new/obj/effect/accelerated_particle(T, dir)
|
||||
if(2)
|
||||
P = new/obj/effect/accelerated_particle/strong(T)
|
||||
new/obj/effect/accelerated_particle/strong(T, dir)
|
||||
if(3)
|
||||
P = new/obj/effect/accelerated_particle/powerful(T)
|
||||
P.setDir(dir)
|
||||
new/obj/effect/accelerated_particle/powerful(T, dir)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user