mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Makes R-UST machines deconstructable, some more fixes (#4634)
* More R-UST things * These too
This commit is contained in:
@@ -18,6 +18,8 @@ var/list/fusion_cores = list()
|
||||
active_power_usage = 500 //multiplied by field strength
|
||||
anchored = 0
|
||||
|
||||
circuit = /obj/item/weapon/circuitboard/fusion_core
|
||||
|
||||
var/obj/effect/fusion_em_field/owned_field
|
||||
var/field_strength = 1//0.01
|
||||
var/id_tag
|
||||
@@ -27,8 +29,12 @@ var/list/fusion_cores = list()
|
||||
|
||||
/obj/machinery/power/fusion_core/initialize()
|
||||
. = ..()
|
||||
connect_to_network()
|
||||
fusion_cores += src
|
||||
default_apply_parts()
|
||||
|
||||
/obj/machinery/power/fusion_core/mapped/initialize()
|
||||
. = ..()
|
||||
connect_to_network()
|
||||
|
||||
/obj/machinery/power/fusion_core/Destroy()
|
||||
for(var/obj/machinery/computer/fusion_core_control/FCC in machines)
|
||||
@@ -47,6 +53,7 @@ var/list/fusion_cores = list()
|
||||
owned_field.radiation_scale()
|
||||
owned_field.temp_dump()
|
||||
owned_field.temp_color()
|
||||
|
||||
/obj/machinery/power/fusion_core/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
@@ -106,23 +113,20 @@ var/list/fusion_cores = list()
|
||||
to_chat(user,"<span class='warning'>Shut \the [src] off first!</span>")
|
||||
return
|
||||
|
||||
if(default_deconstruction_screwdriver(user, W))
|
||||
return
|
||||
if(default_deconstruction_crowbar(user, W))
|
||||
return
|
||||
if(default_part_replacement(user, W))
|
||||
return
|
||||
|
||||
if(ismultitool(W))
|
||||
var/new_ident = input("Enter a new ident tag.", "Fusion Core", id_tag) as null|text
|
||||
if(new_ident && user.Adjacent(src))
|
||||
id_tag = new_ident
|
||||
return
|
||||
|
||||
else if(iswrench(W))
|
||||
anchored = !anchored
|
||||
playsound(src, W.usesound, 75, 1)
|
||||
if(anchored)
|
||||
user.visible_message("[user.name] secures [src.name] to the floor.", \
|
||||
"You secure the [src.name] to the floor.", \
|
||||
"You hear a ratchet")
|
||||
else
|
||||
user.visible_message("[user.name] unsecures [src.name] from the floor.", \
|
||||
"You unsecure the [src.name] from the floor.", \
|
||||
"You hear a ratchet")
|
||||
if(default_unfasten_wrench(user, W))
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
@@ -6,6 +6,12 @@
|
||||
anchored = 1
|
||||
layer = 4
|
||||
|
||||
circuit = /obj/item/weapon/circuitboard/fusion_fuel_compressor
|
||||
|
||||
/obj/machinery/fusion_fuel_compressor/initialize()
|
||||
. = ..()
|
||||
default_apply_parts()
|
||||
|
||||
/obj/machinery/fusion_fuel_compressor/MouseDrop_T(var/atom/movable/target, var/mob/user)
|
||||
if(user.incapacitated() || !user.Adjacent(src))
|
||||
return
|
||||
@@ -34,6 +40,14 @@
|
||||
return 0
|
||||
|
||||
/obj/machinery/fusion_fuel_compressor/attackby(var/obj/item/thing, var/mob/user)
|
||||
|
||||
if(default_deconstruction_screwdriver(user, thing))
|
||||
return
|
||||
if(default_deconstruction_crowbar(user, thing))
|
||||
return
|
||||
if(default_part_replacement(user, thing))
|
||||
return
|
||||
|
||||
if(istype(thing, /obj/item/stack/material))
|
||||
var/obj/item/stack/material/M = thing
|
||||
var/material/mat = M.get_material()
|
||||
|
||||
@@ -11,15 +11,17 @@ var/list/fuel_injectors = list()
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 500
|
||||
|
||||
circuit = /obj/item/weapon/circuitboard/fusion_injector
|
||||
|
||||
var/fuel_usage = 0.0001
|
||||
var/id_tag
|
||||
var/injecting = 0
|
||||
var/obj/item/weapon/fuel_assembly/cur_assembly
|
||||
|
||||
/obj/machinery/fusion_fuel_injector/New()
|
||||
..()
|
||||
/obj/machinery/fusion_fuel_injector/initialize()
|
||||
. = ..()
|
||||
fuel_injectors += src
|
||||
tag = null
|
||||
default_apply_parts()
|
||||
|
||||
/obj/machinery/fusion_fuel_injector/Destroy()
|
||||
if(cur_assembly)
|
||||
@@ -66,17 +68,18 @@ var/list/fuel_injectors = list()
|
||||
cur_assembly = W
|
||||
return
|
||||
|
||||
if(iswrench(W))
|
||||
if(iswrench(W) || isscrewdriver(W) || iscrowbar(W) || istype(W, /obj/item/weapon/storage/part_replacer))
|
||||
if(injecting)
|
||||
to_chat(user, "<span class='warning'>Shut \the [src] off first!</span>")
|
||||
return
|
||||
anchored = !anchored
|
||||
playsound(src, W.usesound, 75, 1)
|
||||
if(anchored)
|
||||
user.visible_message("\The [user] secures \the [src] to the floor.")
|
||||
else
|
||||
user.visible_message("\The [user] unsecures \the [src] from the floor.")
|
||||
return
|
||||
if(default_unfasten_wrench(user, W))
|
||||
return
|
||||
if(default_deconstruction_screwdriver(user, W))
|
||||
return
|
||||
if(default_deconstruction_crowbar(user, W))
|
||||
return
|
||||
if(default_part_replacement(user, W))
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -38,8 +38,6 @@
|
||||
return 0
|
||||
|
||||
/obj/effect/fusion_particle_catcher/CanPass(var/atom/movable/mover, var/turf/target, var/height=0, var/air_group=0)
|
||||
if(istype(mover, /obj/item/projectile/beam))
|
||||
return 0
|
||||
if(istype(mover, /obj/effect/accelerated_particle))
|
||||
return 0
|
||||
if(istype(mover, /obj/effect/accelerated_particle) || istype(mover, /obj/item/projectile/beam))
|
||||
return !density
|
||||
return 1
|
||||
|
||||
@@ -9,6 +9,8 @@ var/list/gyrotrons = list()
|
||||
use_power = 1
|
||||
active_power_usage = 50000
|
||||
|
||||
circuit = /obj/item/weapon/circuitboard/gyrotron
|
||||
|
||||
var/id_tag
|
||||
var/rate = 3
|
||||
var/mega_energy = 1
|
||||
@@ -21,6 +23,7 @@ var/list/gyrotrons = list()
|
||||
/obj/machinery/power/emitter/gyrotron/initialize()
|
||||
gyrotrons += src
|
||||
active_power_usage = mega_energy * 50000
|
||||
default_apply_parts()
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/power/emitter/gyrotron/Destroy()
|
||||
@@ -54,4 +57,12 @@ var/list/gyrotrons = list()
|
||||
if(new_ident && user.Adjacent(src))
|
||||
id_tag = new_ident
|
||||
return
|
||||
|
||||
if(default_deconstruction_screwdriver(user, W))
|
||||
return
|
||||
if(default_deconstruction_crowbar(user, W))
|
||||
return
|
||||
if(default_part_replacement(user, W))
|
||||
return
|
||||
|
||||
return ..()
|
||||
Reference in New Issue
Block a user