Files
Polaris/code/game/objects/items/weapons/circuitboards/computer/supply.dm
Kelenius db30c15e4c Updates to science
Protolathe and CI build procs moved to them from RD console.
Protolathe and CI now have a build queue. Designs take varying time to
build.
P and CI material storage is now a list instead of a set of vars.
origin_tech is now a list.
All sheets now contain exactly 2000 units of matter.
In design datum, chemicals and materials are two separate lists.
Designs are now sorted. The method is kinda hacky but flexible. They
have a var, sort_string. Designs are sorted alphabetically using it.
Circuits how show whether they build a machine or a computer in CI menu.
Adds item construction, for now protolathe is used.
2015-04-04 13:38:03 +03:00

40 lines
1.5 KiB
Plaintext

#ifndef T_BOARD
#error T_BOARD macro is not defined but we need it!
#endif
/obj/item/weapon/circuitboard/supplycomp
name = T_BOARD("supply control console")
build_path = /obj/machinery/computer/supplycomp
origin_tech = list(TECH_DATA = 3)
var/contraband_enabled = 0
/obj/item/weapon/circuitboard/supplycomp/construct(var/obj/machinery/computer/supplycomp/SC)
if (..(SC))
SC.can_order_contraband = contraband_enabled
/obj/item/weapon/circuitboard/supplycomp/deconstruct(var/obj/machinery/computer/supplycomp/SC)
if (..(SC))
contraband_enabled = SC.can_order_contraband
/obj/item/weapon/circuitboard/supplycomp/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I,/obj/item/device/multitool))
var/catastasis = src.contraband_enabled
var/opposite_catastasis
if(catastasis)
opposite_catastasis = "STANDARD"
catastasis = "BROAD"
else
opposite_catastasis = "BROAD"
catastasis = "STANDARD"
switch( alert("Current receiver spectrum is set to: [catastasis]","Multitool-Circuitboard interface","Switch to [opposite_catastasis]","Cancel") )
//switch( alert("Current receiver spectrum is set to: " {(src.contraband_enabled) ? ("BROAD") : ("STANDARD")} , "Multitool-Circuitboard interface" , "Switch to " {(src.contraband_enabled) ? ("STANDARD") : ("BROAD")}, "Cancel") )
if("Switch to STANDARD","Switch to BROAD")
src.contraband_enabled = !src.contraband_enabled
if("Cancel")
return
else
user << "DERP! BUG! Report this (And what you were doing to cause it) to Agouri"
return