mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Construction Update
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
input_level_max = 0
|
||||
output_level_max = 0
|
||||
icon_state = "gsmes"
|
||||
circuit = /obj/item/weapon/circuitboard/batteryrack
|
||||
var/cells_amount = 0
|
||||
var/capacitors_amount = 0
|
||||
var/global/list/br_cache = null
|
||||
@@ -22,7 +23,6 @@
|
||||
//Maybe this should be moved up to obj/machinery
|
||||
/obj/machinery/power/smes/batteryrack/proc/add_parts()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/batteryrack
|
||||
component_parts += new /obj/item/weapon/cell/high
|
||||
component_parts += new /obj/item/weapon/cell/high
|
||||
component_parts += new /obj/item/weapon/cell/high
|
||||
@@ -49,7 +49,7 @@
|
||||
/obj/machinery/power/smes/batteryrack/update_icon()
|
||||
overlays.Cut()
|
||||
if(stat & BROKEN) return
|
||||
|
||||
|
||||
if(!br_cache)
|
||||
br_cache = list()
|
||||
br_cache.len = 7
|
||||
@@ -60,7 +60,7 @@
|
||||
br_cache[5] = image('icons/obj/power.dmi', "gsmes_og2")
|
||||
br_cache[6] = image('icons/obj/power.dmi', "gsmes_og3")
|
||||
br_cache[7] = image('icons/obj/power.dmi', "gsmes_og4")
|
||||
|
||||
|
||||
if (output_attempt)
|
||||
overlays += br_cache[1]
|
||||
if(inputting)
|
||||
@@ -83,9 +83,10 @@
|
||||
if (charge < (capacity / 100))
|
||||
if (!output_attempt && !input_attempt)
|
||||
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
|
||||
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc)
|
||||
var/obj/structure/frame/M = new /obj/structure/frame(src.loc)
|
||||
M.frame_type = "machine"
|
||||
M.state = 2
|
||||
M.icon_state = "box_1"
|
||||
M.icon_state = "machine_1"
|
||||
for(var/obj/I in component_parts)
|
||||
I.loc = src.loc
|
||||
qdel(src)
|
||||
@@ -117,12 +118,12 @@
|
||||
/obj/machinery/power/smes/batteryrack/makeshift
|
||||
name = "makeshift PSU"
|
||||
desc = "A rack of batteries connected by a mess of wires posing as a PSU."
|
||||
circuit = /obj/item/weapon/circuitboard/ghettosmes
|
||||
var/overcharge_percent = 0
|
||||
|
||||
|
||||
/obj/machinery/power/smes/batteryrack/makeshift/add_parts()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/ghettosmes
|
||||
component_parts += new /obj/item/weapon/cell/high
|
||||
component_parts += new /obj/item/weapon/cell/high
|
||||
component_parts += new /obj/item/weapon/cell/high
|
||||
|
||||
@@ -287,14 +287,15 @@
|
||||
else
|
||||
user << "\blue You close the access panel."
|
||||
else if(istype(O, /obj/item/weapon/crowbar) && open)
|
||||
var/obj/machinery/constructable_frame/machine_frame/new_frame = new /obj/machinery/constructable_frame/machine_frame(src.loc)
|
||||
var/obj/structure/frame/new_frame = new /obj/structure/frame(src.loc)
|
||||
for(var/obj/item/I in component_parts)
|
||||
I.loc = src.loc
|
||||
while ( sheets > 0 )
|
||||
DropFuel()
|
||||
|
||||
new_frame.frame_type = "machine"
|
||||
new_frame.state = 2
|
||||
new_frame.icon_state = "box_1"
|
||||
new_frame.icon_state = "machine_1"
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/attack_hand(mob/user as mob)
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 0
|
||||
circuit = /obj/item/weapon/circuitboard/smes
|
||||
|
||||
var/capacity = 5e6 // maximum charge
|
||||
var/charge = 1e6 // actual charge
|
||||
|
||||
@@ -116,7 +116,6 @@
|
||||
/obj/machinery/power/smes/buildable/New(var/install_coils = 1)
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/stack/cable_coil(src,30)
|
||||
component_parts += new /obj/item/weapon/circuitboard/smes(src)
|
||||
src.wires = new /datum/wires/smes(src)
|
||||
|
||||
// Allows for mapped-in SMESs with larger capacity/IO
|
||||
@@ -345,9 +344,10 @@
|
||||
return
|
||||
|
||||
usr << "\red You have disassembled the SMES cell!"
|
||||
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc)
|
||||
var/obj/structure/frame/M = new /obj/structure/frame(src.loc)
|
||||
M.frame_type = "machine"
|
||||
M.state = 2
|
||||
M.icon_state = "box_1"
|
||||
M.icon_state = "machine_1"
|
||||
for(var/obj/I in component_parts)
|
||||
I.loc = src.loc
|
||||
component_parts -= I
|
||||
|
||||
@@ -407,25 +407,27 @@ var/list/solars_list = list()
|
||||
if(do_after(user, 20))
|
||||
if (src.stat & BROKEN)
|
||||
user << "\blue The broken glass falls out."
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
|
||||
new /obj/item/weapon/material/shard( src.loc )
|
||||
var/obj/item/weapon/circuitboard/solar_control/M = new /obj/item/weapon/circuitboard/solar_control( A )
|
||||
for (var/obj/C in src)
|
||||
C.loc = src.loc
|
||||
A.circuit = M
|
||||
A.frame_type = "computer"
|
||||
A.state = 3
|
||||
A.icon_state = "3"
|
||||
A.icon_state = "computer_3"
|
||||
A.anchored = 1
|
||||
qdel(src)
|
||||
else
|
||||
user << "\blue You disconnect the monitor."
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
|
||||
var/obj/item/weapon/circuitboard/solar_control/M = new /obj/item/weapon/circuitboard/solar_control( A )
|
||||
for (var/obj/C in src)
|
||||
C.loc = src.loc
|
||||
A.circuit = M
|
||||
A.frame_type = "computer"
|
||||
A.state = 4
|
||||
A.icon_state = "4"
|
||||
A.icon_state = "computer_4"
|
||||
A.anchored = 1
|
||||
qdel(src)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user