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