More buildables, some fixes, upgradable smartfridge

- Fuel is now available in the tier 4 reagent list for buildable chem
dispensers.
- Seed extractor, gibber, and recycler can be built, but having better
stock parts has no effect.
- Smartfridge can hold up to 1500 items by default instead of 999,
upgrading matter bin allows it to hold more.
This commit is contained in:
DZD
2015-08-21 20:06:23 -04:00
parent 47f81b4d6f
commit 32c849a1d5
7 changed files with 148 additions and 24 deletions
@@ -324,6 +324,16 @@ to destroy them and players will be able to make replacements.
/obj/item/stack/cable_coil = 5,
/obj/item/weapon/stock_parts/console_screen = 1)
/obj/item/weapon/circuitboard/gibber
name = "circuit board (Gibber)"
build_path = /obj/machinery/gibber
board_type = "machine"
origin_tech = "programming=1"
req_components = list(
/obj/item/weapon/stock_parts/matter_bin = 1,
/obj/item/weapon/stock_parts/manipulator = 1)
/obj/item/weapon/circuitboard/processor
name = "circuit board (Food processor)"
build_path = /obj/machinery/processor
@@ -333,6 +343,15 @@ to destroy them and players will be able to make replacements.
/obj/item/weapon/stock_parts/matter_bin = 1,
/obj/item/weapon/stock_parts/manipulator = 1)
/obj/item/weapon/circuitboard/recycler
name = "circuit board (Recycler)"
build_path = /obj/machinery/recycler
board_type = "machine"
origin_tech = "programming=1"
req_components = list(
/obj/item/weapon/stock_parts/matter_bin = 1,
/obj/item/weapon/stock_parts/manipulator = 1)
/obj/item/weapon/circuitboard/seed_extractor
name = "circuit board (Seed Extractor)"
build_path = /obj/machinery/seed_extractor
+25 -8
View File
@@ -40,6 +40,14 @@
var/turf/T = get_step(src, acceptdir)
if(istype(T))
lturf = T
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/gibber(null)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
RefreshParts()
/obj/machinery/gibber/RefreshParts() //If you want to make the machine upgradable, this is where you would change any vars basd on its stock parts.
return
/obj/machinery/gibber/autogibber/process()
if(!lturf || occupant || locked || dirty || operating)
@@ -194,17 +202,26 @@
else
src.startgibbing(user)
/obj/machinery/gibber/attackby(obj/item/weapon/grab/G as obj, mob/user as mob, params)
if(!istype(G))
return ..()
if(G.state < 2)
user << "<span class='danger'>You need a better grip to do that!</span>"
/obj/machinery/gibber/attackby(obj/item/P as obj, mob/user as mob, params)
if(istype(P, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = P
if(G.state < 2)
user << "<span class='danger'>You need a better grip to do that!</span>"
return
move_into_gibber(user,G.affecting)
qdel(G)
return
move_into_gibber(user,G.affecting)
if(default_deconstruction_screwdriver(user, "grinder_open", "grinder", P))
return
qdel(G)
if(exchange_parts(user, P))
return
if(default_unfasten_wrench(user, P))
return
default_deconstruction_crowbar(P)
/obj/machinery/gibber/MouseDrop_T(mob/target, mob/user)
if(usr.stat || (!ishuman(user)) || user.restrained() || user.weakened || user.stunned || user.paralysis || user.resting)
+22 -9
View File
@@ -11,7 +11,7 @@
idle_power_usage = 5
active_power_usage = 100
flags = NOREACT
var/max_n_of_items = 999 //No, this should NOT be a global var.
var/max_n_of_items = 1500
var/icon_on = "smartfridge"
var/icon_off = "smartfridge-off"
var/icon_panel = "smartfridge-panel"
@@ -23,6 +23,17 @@
var/is_secure = 0
var/datum/wires/smartfridge/wires = null
/obj/machinery/smartfridge/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/smartfridge(null)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
RefreshParts()
/obj/machinery/smartfridge/RefreshParts()
for(var/obj/item/weapon/stock_parts/matter_bin/B in component_parts)
max_n_of_items = 1500 * B.rating
/obj/machinery/smartfridge/secure
is_secure = 1
@@ -162,16 +173,18 @@
********************/
/obj/machinery/smartfridge/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/weapon/screwdriver))
playsound(user, 'sound/items/Screwdriver.ogg', 50, 1)
panel_open = !panel_open
user.visible_message("[user] [panel_open ? "opens" : "closes"] the maintenance panel of \the [src].", "You [panel_open ? "open" : "close"] the maintenance panel of \the [src].")
overlays.Cut()
if(panel_open)
overlays += image(icon, icon_panel)
nanomanager.update_uis(src)
if(default_deconstruction_screwdriver(user, "smartfridge_open", "smartfridge", O))
return
if(exchange_parts(user, O))
return
if(default_unfasten_wrench(user, O))
power_change()
return
default_deconstruction_crowbar(O)
if(istype(O, /obj/item/device/multitool)||istype(O, /obj/item/weapon/wirecutters))
if(panel_open)
attack_hand(user)
+19 -6
View File
@@ -17,8 +17,16 @@ var/const/SAFETY_COOLDOWN = 100
/obj/machinery/recycler/New()
// On us
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/recycler(null)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
RefreshParts()
update_icon()
/obj/machinery/recycler/RefreshParts() //If you want to make the machine upgradable, this is where you would change any vars basd on its stock parts.
return
/obj/machinery/recycler/examine()
set src in view()
..()
@@ -32,14 +40,19 @@ var/const/SAFETY_COOLDOWN = 100
/obj/machinery/recycler/attackby(var/obj/item/I, var/mob/user, params)
if(istype(I, /obj/item/weapon/screwdriver) && emagged)
emagged = 0
update_icon()
user << "<span class='notice'>You reset the crusher to its default factory settings.</span>"
else
..()
if(default_deconstruction_screwdriver(user, "grinder-oOpen", "grinder-o0", I))
return
if(exchange_parts(user, I))
return
if(default_unfasten_wrench(user, I))
return
default_deconstruction_crowbar(I)
..()
add_fingerprint(user)
return
/obj/machinery/recycler/emag_act(user as mob)
if(!emagged)
+22
View File
@@ -6,8 +6,30 @@
density = 1
anchored = 1
/obj/machinery/seed_extractor/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/seed_extractor(null)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
RefreshParts()
/obj/machinery/seed_extractor/RefreshParts() //If you want to make the machine upgradable, this is where you would change any vars basd on its stock parts.
return
obj/machinery/seed_extractor/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
if(default_deconstruction_screwdriver(user, "sextractor_open", "sextractor", O))
return
if(exchange_parts(user, O))
return
if(default_unfasten_wrench(user, O))
return
default_deconstruction_crowbar(O)
// Fruits and vegetables.
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown) || istype(O, /obj/item/weapon/grown))
+1 -1
View File
@@ -294,7 +294,7 @@
var/list/special_reagents = list(list("hydrogen", "oxygen", "silicon", "phosphorus", "sulfur", "carbon", "nitrogen", "tungsten", "water"),
list("lithium", "sugar", "copper", "mercury", "sodium","iodine","bromine"),
list("ethanol", "chlorine", "potassium", "aluminum","plasma", "radium", "fluorine", "iron", "silver"),
list("oil", "ash", "acetone", "saltpetre", "ammonia", "diethylamine"))
list("oil", "ash", "acetone", "saltpetre", "ammonia", "diethylamine", "fuel"))
/obj/machinery/chem_dispenser/constructable/New()
..()
@@ -242,6 +242,26 @@
build_path = /obj/item/weapon/circuitboard/rdserver
category = list("Research Machinery")
/datum/design/gibber
name = "Machine Design (Gibber Board)"
desc = "The circuit board for a gibber."
id = "gibber"
req_tech = list("programming" = 1)
build_type = IMPRINTER
materials = list("$glass" = 1000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/gibber
category = list ("Misc. Machinery")
/datum/design/smartfridge
name = "Machine Design (Smartfridge Board)"
desc = "The circuit board for a smartfridge."
id = "smartfridge"
req_tech = list("programming" = 1)
build_type = IMPRINTER
materials = list("$glass" = 1000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/smartfridge
category = list ("Misc. Machinery")
/datum/design/monkey_recycler
name = "Machine Design (Monkey Recycler Board)"
desc = "The circuit board for a monkey recycler."
@@ -252,6 +272,16 @@
build_path = /obj/item/weapon/circuitboard/monkey_recycler
category = list ("Misc. Machinery")
/datum/design/seed_extractor
name = "Machine Design (Seed Extractor Board)"
desc = "The circuit board for a seed extractor."
id = "seed_extractor"
req_tech = list("programming" = 1)
build_type = IMPRINTER
materials = list("$glass" = 1000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/seed_extractor
category = list ("Misc. Machinery")
/datum/design/processor
name = "Machine Design (Processor Board)"
desc = "The circuit board for a processor."
@@ -262,6 +292,16 @@
build_path = /obj/item/weapon/circuitboard/processor
category = list ("Misc. Machinery")
/datum/design/recycler
name = "Machine Design (Recycler Board)"
desc = "The circuit board for a recycler."
id = "recycler"
req_tech = list("programming" = 1)
build_type = IMPRINTER
materials = list("$glass" = 1000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/recycler
category = list ("Misc. Machinery")
/datum/design/holopad
name = "Machine Design (AI Holopad Board)"
desc = "The circuit board for a holopad."