Merge pull request #1229 from SinTwo/construction_update

Construction update
This commit is contained in:
Neerti
2016-03-26 15:45:19 -04:00
81 changed files with 1740 additions and 519 deletions

View File

@@ -22,6 +22,7 @@ log transactions
anchored = 1
use_power = 1
idle_power_usage = 10
circuit = /obj/item/weapon/circuitboard/atm
var/datum/money_account/authenticated_account
var/number_incorrect_tries = 0
var/previous_account_number = 0
@@ -79,6 +80,25 @@ log transactions
return 1
/obj/machinery/atm/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/weapon/screwdriver) && circuit)
user << "<span class='notice'>You start disconnecting the monitor.</span>"
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
var/obj/item/weapon/circuitboard/M = new circuit( A )
A.frame_type = "atm"
A.pixel_x = pixel_x
A.pixel_y = pixel_y
A.circuit = M
A.anchored = 1
for (var/obj/C in src)
C.forceMove(loc)
user << "<span class='notice'>You disconnect the monitor.</span>"
A.state = 4
A.icon_state = "atm_4"
M.deconstruct(src)
qdel(src)
return
if(istype(I, /obj/item/weapon/card))
if(emagged > 0)
//prevent inserting id into an emagged ATM

View File

@@ -94,16 +94,10 @@
user << "You load [W] into [src]."
return
if(istype(W,/obj/item/weapon/screwdriver))
open = !open
user << "<span class='notice'>You [open ? "open" : "close"] the maintenance panel.</span>"
if(default_deconstruction_screwdriver(user, W))
return
if(default_deconstruction_crowbar(user, W))
return
if(open)
if(istype(W, /obj/item/weapon/crowbar))
dismantle()
return
if(istype(W,/obj/item/weapon/disk/botany))
if(loaded_disk)
user << "There is already a data disk loaded."

View File

@@ -45,7 +45,7 @@
user << "<span class='notice'>You begin dismantling \the [src].</span>"
if(do_after(user,25))
user << "<span class='notice'>You dismantle \the [src].</span>"
new /obj/item/stack/material/wood(get_turf(src), amount = 3)
new /obj/item/stack/material/wood(get_turf(src), 3)
for(var/obj/item/weapon/book/b in contents)
b.loc = (get_turf(src))
qdel(src)

View File

@@ -47,9 +47,11 @@
recipes += new/datum/stack_recipe("cannon frame", /obj/item/weapon/cannonframe, 10, time = 15, one_per_turf = 0, on_floor = 0)
recipes += new/datum/stack_recipe("regular floor tile", /obj/item/stack/tile/floor, 1, 4, 20)
recipes += new/datum/stack_recipe("metal rod", /obj/item/stack/rods, 1, 2, 60)
recipes += new/datum/stack_recipe("computer frame", /obj/structure/computerframe, 5, time = 25, one_per_turf = 1, on_floor = 1)
recipes += new/datum/stack_recipe("frame", /obj/item/frame, 5, time = 25, one_per_turf = 1, on_floor = 1)
recipes += new/datum/stack_recipe("mirror frame", /obj/item/frame/mirror, 1, time = 5, one_per_turf = 0, on_floor = 1)
recipes += new/datum/stack_recipe("fire extinguisher cabinet frame", /obj/item/frame/extinguisher_cabinet, 4, time = 5, one_per_turf = 0, on_floor = 1)
//recipes += new/datum/stack_recipe("fire axe cabinet frame", /obj/item/frame/fireaxe_cabinet, 4, time = 5, one_per_turf = 0, on_floor = 1)
recipes += new/datum/stack_recipe("wall girders", /obj/structure/girder, 2, time = 50, one_per_turf = 1, on_floor = 1)
recipes += new/datum/stack_recipe("machine frame", /obj/machinery/constructable_frame/machine_frame, 5, time = 25, one_per_turf = 1, on_floor = 1)
recipes += new/datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, time = 25, one_per_turf = 1, on_floor = 1)
recipes += new/datum/stack_recipe_list("airlock assemblies", list( \
new/datum/stack_recipe("standard airlock assembly", /obj/structure/door_assembly, 4, time = 50, one_per_turf = 1, on_floor = 1), \
@@ -70,13 +72,17 @@
new/datum/stack_recipe("emergency shutter", /obj/structure/firedoor_assembly, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("multi-tile airlock assembly", /obj/structure/door_assembly/multi_tile, 4, time = 50, one_per_turf = 1, on_floor = 1), \
))
recipes += new/datum/stack_recipe("IV drip", /obj/machinery/iv_drip, 4, time = 20, one_per_turf = 1, on_floor = 1)
recipes += new/datum/stack_recipe("conveyor switch", /obj/machinery/conveyor_switch, 2, time = 20, one_per_turf = 1, on_floor = 1)
recipes += new/datum/stack_recipe("grenade casing", /obj/item/weapon/grenade/chem_grenade)
recipes += new/datum/stack_recipe("light fixture frame", /obj/item/frame/light, 2)
recipes += new/datum/stack_recipe("small light fixture frame", /obj/item/frame/light/small, 1)
recipes += new/datum/stack_recipe("apc frame", /obj/item/frame/apc, 2)
recipes += new/datum/stack_recipe("air alarm frame", /obj/item/frame/air_alarm, 2)
recipes += new/datum/stack_recipe("fire alarm frame", /obj/item/frame/fire_alarm, 2)
recipes += new/datum/stack_recipe_list("filing cabinets", list( \
new/datum/stack_recipe("filing cabinet", /obj/structure/filingcabinet, 4, time = 20, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("tall filing cabinet", /obj/structure/filingcabinet/filingcabinet, 4, time = 20, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("chest drawer", /obj/structure/filingcabinet/chestdrawer, 4, time = 20, one_per_turf = 1, on_floor = 1), \
))
/material/plasteel/generate_recipes()
..()
@@ -84,6 +90,7 @@
recipes += new/datum/stack_recipe("Metal crate", /obj/structure/closet/crate, 10, time = 50, one_per_turf = 1)
recipes += new/datum/stack_recipe("knife grip", /obj/item/weapon/material/butterflyhandle, 4, time = 20, one_per_turf = 0, on_floor = 1, supplied_material = "[name]")
recipes += new/datum/stack_recipe("dark floor tile", /obj/item/stack/tile/floor_dark, 1, 4, 20)
recipes += new/datum/stack_recipe("roller bed", /obj/item/roller, 5, time = 30, on_floor = 1)
/material/sandstone/generate_recipes()
..()
@@ -99,6 +106,10 @@
recipes += new/datum/stack_recipe("reagent dispenser cartridge (small)", /obj/item/weapon/reagent_containers/chem_disp_cartridge/small, 1, on_floor=0) // 100u
recipes += new/datum/stack_recipe("white floor tile", /obj/item/stack/tile/floor_white, 1, 4, 20)
recipes += new/datum/stack_recipe("freezer floor tile", /obj/item/stack/tile/floor_freezer, 1, 4, 20)
recipes += new/datum/stack_recipe("shower curtain", /obj/structure/curtain, 4, time = 15, one_per_turf = 1, on_floor = 1)
recipes += new/datum/stack_recipe("plastic flaps", /obj/structure/plasticflaps, 4, time = 25, one_per_turf = 1, on_floor = 1)
recipes += new/datum/stack_recipe("airtight plastic flaps", /obj/structure/plasticflaps/mining, 5, time = 25, one_per_turf = 1, on_floor = 1)
recipes += new/datum/stack_recipe("water-cooler", /obj/structure/reagent_dispensers/water_cooler, 4, time = 1, one_per_turf = 1, on_floor = 1)
/material/wood/generate_recipes()
..()
@@ -110,6 +121,7 @@
recipes += new/datum/stack_recipe("beehive assembly", /obj/item/beehive_assembly, 4)
recipes += new/datum/stack_recipe("beehive frame", /obj/item/honey_frame, 1)
recipes += new/datum/stack_recipe("book shelf", /obj/structure/bookcase, 5, time = 15, one_per_turf = 1, on_floor = 1)
recipes += new/datum/stack_recipe("noticeboard frame", /obj/item/frame/noticeboard, 4, time = 5, one_per_turf = 0, on_floor = 1)
/material/cardboard/generate_recipes()
..()

View File

@@ -9,6 +9,7 @@
name = "mining drill head"
desc = "An enormous drill."
icon_state = "mining_drill"
circuit = /obj/item/weapon/circuitboard/miningdrill
var/braces_needed = 2
var/list/supports = list()
var/supported = 0
@@ -43,7 +44,6 @@
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/miningdrill(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new /obj/item/weapon/stock_parts/micro_laser(src)

View File

@@ -11,8 +11,6 @@
//Has a list of items that it can hold.
var/list/can_hold = list(
/obj/item/weapon/cell,
/obj/item/weapon/firealarm_electronics,
/obj/item/weapon/airalarm_electronics,
/obj/item/weapon/airlock_electronics,
/obj/item/weapon/tracker_electronics,
/obj/item/weapon/module/power_control,

View File

@@ -71,7 +71,7 @@
//Parrots will generally sit on their pertch unless something catches their eye.
//These vars store their preffered perch and if they dont have one, what they can use as a perch
var/obj/parrot_perch = null
var/obj/desired_perches = list(/obj/structure/computerframe, /obj/structure/displaycase, \
var/obj/desired_perches = list(/obj/structure/frame, /obj/structure/displaycase, \
/obj/structure/filingcabinet, /obj/machinery/teleport, \
/obj/machinery/computer, /obj/machinery/clonepod, \
/obj/machinery/dna_scannernew, /obj/machinery/telecomms, \

View File

@@ -14,6 +14,7 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
use_power = 1
idle_power_usage = 30
active_power_usage = 200
frame_type = "fax"
var/obj/item/weapon/card/id/scan = null // identification
var/authenticated = 0

View File

@@ -17,12 +17,10 @@
density = 1
anchored = 1
/obj/structure/filingcabinet/chestdrawer
name = "chest drawer"
icon_state = "chestdrawer"
/obj/structure/filingcabinet/filingcabinet //not changing the path to avoid unecessary map issues, but please don't name stuff like this in the future -Pete
icon_state = "tallcabinet"
@@ -46,6 +44,16 @@
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
anchored = !anchored
user << "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>"
else if(istype(P, /obj/item/weapon/screwdriver))
user << "<span class='notice'>You begin taking the [name] apart.</span>"
if(do_after(user, 10))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "<span class='notice'>You take the [name] apart.</span>"
new /obj/item/stack/material/steel( src.loc, 4 )
for(var/obj/item/I in contents)
I.forceMove(loc)
qdel(src)
return
else
user << "<span class='notice'>You can't put [P] in [src]!</span>"
@@ -151,7 +159,7 @@
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src)
P.info = "<CENTER><B>Medical Record</B></CENTER><BR>"
P.info += "Name: [G.fields["name"]] ID: [G.fields["id"]]<BR>\nSex: [G.fields["sex"]]<BR>\nAge: [G.fields["age"]]<BR>\nFingerprint: [G.fields["fingerprint"]]<BR>\nPhysical Status: [G.fields["p_stat"]]<BR>\nMental Status: [G.fields["m_stat"]]<BR>"
P.info += "<BR>\n<CENTER><B>Medical Data</B></CENTER><BR>\nBlood Type: [M.fields["b_type"]]<BR>\nDNA: [M.fields["b_dna"]]<BR>\n<BR>\nMinor Disabilities: [M.fields["mi_dis"]]<BR>\nDetails: [M.fields["mi_dis_d"]]<BR>\n<BR>\nMajor Disabilities: [M.fields["ma_dis"]]<BR>\nDetails: [M.fields["ma_dis_d"]]<BR>\n<BR>\nAllergies: [M.fields["alg"]]<BR>\nDetails: [M.fields["alg_d"]]<BR>\n<BR>\nCurrent Diseases: [M.fields["cdi"]] (per disease info placed in log/comment section)<BR>\nDetails: [M.fields["cdi_d"]]<BR>\n<BR>\nImportant Notes:<BR>\n\t[M.fields["notes"]]<BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>"
var/counter = 1
while(M.fields["com_[counter]"])

View File

@@ -9,11 +9,21 @@
idle_power_usage = 30
active_power_usage = 200
power_channel = EQUIP
circuit = /obj/item/weapon/circuitboard/photocopier
frame_type = "photocopier"
var/obj/item/copyitem = null //what's in the copier!
var/copies = 1 //how many copies to print!
var/toner = 30 //how much toner is left! woooooo~
var/maxcopies = 10 //how many copies can be copied at once- idea shamelessly stolen from bs12's copier!
/obj/machinery/photocopier/New()
component_parts = list()
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
component_parts += new /obj/item/weapon/stock_parts/motor(src)
component_parts += new /obj/item/weapon/stock_parts/micro_laser(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
RefreshParts()
/obj/machinery/photocopier/attack_ai(mob/user as mob)
return attack_hand(user)
@@ -126,6 +136,12 @@
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
anchored = !anchored
user << "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>"
else if(default_deconstruction_screwdriver(user, O))
return
else if(default_deconstruction_crowbar(user, O))
return
return
/obj/machinery/photocopier/ex_act(severity)

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -310,6 +310,7 @@
use_power = 1
idle_power_usage = 5
active_power_usage = 100
circuit = /obj/item/weapon/circuitboard/grinder
var/inuse = 0
var/obj/item/weapon/reagent_containers/beaker = null
var/limit = 10
@@ -326,6 +327,10 @@
/obj/machinery/reagentgrinder/New()
..()
beaker = new /obj/item/weapon/reagent_containers/glass/beaker/large(src)
component_parts = list()
component_parts += new /obj/item/weapon/stock_parts/motor(src)
component_parts += new /obj/item/weapon/stock_parts/gear(src)
RefreshParts()
return
/obj/machinery/reagentgrinder/update_icon()
@@ -333,6 +338,11 @@
return
/obj/machinery/reagentgrinder/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(beaker)
if(default_deconstruction_screwdriver(user, O))
return
if(default_deconstruction_crowbar(user, O))
return
if (istype(O,/obj/item/weapon/reagent_containers/glass) || \
istype(O,/obj/item/weapon/reagent_containers/food/drinks/drinkingglass) || \

View File

@@ -40,7 +40,7 @@
/obj/machinery/sleeper,
/obj/machinery/smartfridge/,
/obj/machinery/biogenerator,
/obj/machinery/constructable_frame,
/obj/structure/frame,
/obj/machinery/radiocarbon_spectrometer
)
@@ -246,6 +246,17 @@
var/image/lid = image(icon, src, "lid_[initial(icon_state)]")
overlays += lid
/obj/item/weapon/reagent_containers/glass/cooler_bottle
desc = "A bottle for a water-cooler."
name = "water-cooler bottle"
icon = 'icons/obj/vending.dmi'
icon_state = "water_cooler_bottle"
matter = list(DEFAULT_WALL_MATERIAL = 200)
w_class = 3.0
amount_per_transfer_from_this = 20
possible_transfer_amounts = list(10,20,30,60,120)
volume = 120
/*
/obj/item/weapon/reagent_containers/glass/blender_jug
name = "Blender Jug"

View File

@@ -202,22 +202,66 @@
icon_state = "water_cooler"
possible_transfer_amounts = null
anchored = 1
New()
var/bottle = 0
/obj/structure/reagent_dispensers/water_cooler/New()
if(bottle == 1)
..()
reagents.add_reagent("water",500)
reagents.add_reagent("water",120)
else
icon_state = "water_cooler_0"
/obj/structure/reagent_dispensers/water_cooler/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W,/obj/item/weapon/wrench))
/obj/structure/reagent_dispensers/water_cooler/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/weapon/wrench))
src.add_fingerprint(user)
if(anchored)
user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.")
if(bottle)
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 20))
user << "<span class='notice'>You unfasten the jug.</span>"
var/obj/item/weapon/reagent_containers/glass/cooler_bottle/G = new /obj/item/weapon/reagent_containers/glass/cooler_bottle( src.loc )
for(var/datum/reagent/R in reagents.reagent_list)
var/total_reagent = reagents.get_reagent_amount(R.id)
G.reagents.add_reagent(R.id, total_reagent)
reagents.clear_reagents()
bottle = 0
icon_state = "water_cooler_0"
else
user.visible_message("\The [user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.")
if(anchored)
user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.")
else
user.visible_message("\The [user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.")
if(do_after(user, 20, src))
if(!src) return
user << "<span class='notice'>You [anchored? "un" : ""]secured \the [src]!</span>"
anchored = !anchored
return
if(do_after(user, 20, src))
if(!src) return
user << "<span class='notice'>You [anchored? "un" : ""]secured \the [src]!</span>"
anchored = !anchored
if(istype(I, /obj/item/weapon/screwdriver))
if(!bottle)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "<span class='notice'>You take the water-cooler apart.</span>"
new /obj/item/stack/material/plastic( src.loc, 4 )
qdel(src)
return
if(istype(I, /obj/item/weapon/reagent_containers/glass/cooler_bottle))
src.add_fingerprint(user)
if(!bottle)
if(anchored)
var/obj/item/weapon/reagent_containers/glass/cooler_bottle/G = I
user << "<span class='notice'>You start to screw the bottle onto the water-cooler.</span>"
if(do_after(user, 20))
bottle = 1
icon_state = "water_cooler"
user << "<span class='notice'>You screw the bottle onto the water-cooler but accidently spill some!</span>" //you spill some because it for somereason transfers 5 units to the bottle after it gets attached but before it's deleted...
for(var/datum/reagent/R in G.reagents.reagent_list)
var/total_reagent = G.reagents.get_reagent_amount(R.id)
reagents.add_reagent(R.id, total_reagent)
qdel(G)
else
user << "<span class='warning'>You need to wrench down the cooler first.</span>"
else
user << "<span class='warning'>There is already a bottle there!</span>"
return
else
return ..()

View File

@@ -8,6 +8,8 @@
desc = "A conveyor belt."
layer = 2 // so they appear under stuff
anchored = 1
circuit = /obj/item/weapon/circuitboard/conveyor
frame_type = "conveyor"
var/operating = 0 // 1 if running forward, -1 if backwards, 0 if off
var/operable = 1 // true if can operate (no broken segments in this belt run)
var/forwards // this is the default (forward) direction, set by the map dir
@@ -37,6 +39,14 @@
operating = 1
setmove()
component_parts = list()
component_parts += new /obj/item/weapon/stock_parts/gear(src)
component_parts += new /obj/item/weapon/stock_parts/motor(src)
component_parts += new /obj/item/weapon/stock_parts/gear(src)
component_parts += new /obj/item/weapon/stock_parts/motor(src)
component_parts += new /obj/item/stack/cable_coil(src,5)
RefreshParts()
/obj/machinery/conveyor/proc/setmove()
if(operating == 1)
movedir = forwards
@@ -81,6 +91,23 @@
if(isrobot(user)) return //Carn: fix for borgs dropping their modules on conveyor belts
if(I.loc != user) return // This should stop mounted modules ending up outside the module.
if(default_deconstruction_screwdriver(user, I))
return
if(default_deconstruction_crowbar(user, I))
return
if(istype(I, /obj/item/device/multitool))
if(panel_open)
var/input = sanitize(input(usr, "What id would you like to give this conveyor?", "Multitool-Conveyor interface", id))
if(!input)
usr << "No input found please hang up and try your call again."
return
id = input
for(var/obj/machinery/conveyor_switch/C in world)
if(C.id == id)
C.conveyors += src
return
user.drop_item(get_turf(src))
return
@@ -221,6 +248,36 @@
S.position = position
S.update()
/obj/machinery/conveyor_switch/attackby(var/obj/item/I, mob/user)
if(default_deconstruction_screwdriver(user, I))
return
if(istype(I, /obj/item/weapon/weldingtool))
if(panel_open)
var/obj/item/weapon/weldingtool/WT = I
if(!WT.remove_fuel(0, user))
user << "The welding tool must be on to complete this task."
return
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
if(do_after(user, 20))
if(!src || !WT.isOn()) return
user << "<span class='notice'>You deconstruct the frame.</span>"
new /obj/item/stack/material/steel( src.loc, 2 )
qdel(src)
return
if(istype(I, /obj/item/device/multitool))
if(panel_open)
var/input = sanitize(input(usr, "What id would you like to give this conveyor switch?", "Multitool-Conveyor interface", id))
if(!input)
usr << "No input found please hang up and try your call again."
return
id = input
for(var/obj/machinery/conveyor/C in world)
if(C.id == id)
conveyors += C
return
/obj/machinery/conveyor_switch/oneway
var/convdir = 1 //Set to 1 or -1 depending on which way you want the convayor to go. (In other words keep at 1 and set the proper dir on the belts.)
desc = "A conveyor control switch. It appears to only go in one direction."

View File

@@ -8,6 +8,7 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid).
name = "Circuit Imprinter"
icon_state = "circuit_imprinter"
flags = OPENCONTAINER
circuit = /obj/item/weapon/circuitboard/circuit_imprinter
var/list/datum/design/queue = list()
var/progress = 0
@@ -24,7 +25,6 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid).
/obj/machinery/r_n_d/circuit_imprinter/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/circuit_imprinter(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/reagent_containers/glass/beaker(src)

View File

@@ -11,7 +11,7 @@ Note: Must be placed within 3 tiles of the R&D Console
icon_state = "d_analyzer"
var/obj/item/weapon/loaded_item = null
var/decon_mod = 0
circuit = /obj/item/weapon/circuitboard/destructive_analyzer
use_power = 1
idle_power_usage = 30
active_power_usage = 2500
@@ -19,7 +19,6 @@ Note: Must be placed within 3 tiles of the R&D Console
/obj/machinery/r_n_d/destructive_analyzer/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/destructive_analyzer(src)
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/micro_laser(src)

View File

@@ -2,7 +2,7 @@
name = "Protolathe"
icon_state = "protolathe"
flags = OPENCONTAINER
circuit = /obj/item/weapon/circuitboard/protolathe
use_power = 1
idle_power_usage = 30
active_power_usage = 5000
@@ -20,7 +20,6 @@
/obj/machinery/r_n_d/protolathe/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/protolathe(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)

View File

@@ -13,11 +13,11 @@
idle_power_usage = 800
var/delay = 10
req_access = list(access_rd) //Only the R&D can change server settings.
circuit = /obj/item/weapon/circuitboard/rdserver
/obj/machinery/r_n_d/server/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/rdserver(src)
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
component_parts += new /obj/item/stack/cable_coil(src)
component_parts += new /obj/item/stack/cable_coil(src)

View File

@@ -3,6 +3,7 @@
desc = "This device is used to trigger station functions, which require more than one ID card to authenticate."
icon = 'icons/obj/monitors.dmi'
icon_state = "auth_off"
circuit = /obj/item/weapon/circuitboard/keycard_auth
var/active = 0 //This gets set to 1 on all devices except the one where the initial request was made.
var/event = ""
var/screen = 1
@@ -40,6 +41,24 @@
event_triggered_by = usr
broadcast_request() //This is the device making the initial event request. It needs to broadcast to other devices
if(istype(W, /obj/item/weapon/screwdriver))
user << "You remove the faceplate from the [src]"
var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
var/obj/item/weapon/circuitboard/M = new circuit( A )
A.frame_type = "keycard"
A.pixel_x = pixel_x
A.pixel_y = pixel_y
A.set_dir(dir)
A.circuit = M
A.anchored = 1
for (var/obj/C in src)
C.forceMove(loc)
A.state = 3
A.icon_state = "keycard_3"
M.deconstruct(src)
qdel(src)
return
/obj/machinery/keycard_auth/power_change()
..()
if(stat &NOPOWER)