mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-28 22:46:22 +01:00
Adds robot synths
This commit is contained in:
@@ -22,12 +22,13 @@
|
||||
var/list/construction_options = list("One Direction", "Full Window")
|
||||
|
||||
/obj/item/stack/sheet/glass/cyborg
|
||||
name = "glass"
|
||||
desc = "HOLY SHEET! That is a lot of glass."
|
||||
singular_name = "glass sheet"
|
||||
icon_state = "sheet-glass"
|
||||
name = "glass synthesizer"
|
||||
desc = "A device that makes glass."
|
||||
gender = MALE
|
||||
singular_name = "glass"
|
||||
matter = null
|
||||
created_window = /obj/structure/window/basic
|
||||
uses_charge = 1
|
||||
charge_cost = 1000
|
||||
stacktype = /obj/item/stack/sheet/glass
|
||||
|
||||
/obj/item/stack/sheet/glass/attack_self(mob/user as mob)
|
||||
@@ -69,7 +70,7 @@
|
||||
if(!user.IsAdvancedToolUser())
|
||||
return 0
|
||||
var/title = "Sheet-[name]"
|
||||
title += " ([src.amount] sheet\s left)"
|
||||
title += " ([src.get_amount()] sheet\s left)"
|
||||
switch(input(title, "What would you like to construct?") as null|anything in construction_options)
|
||||
if("One Direction")
|
||||
if(!src) return 1
|
||||
@@ -102,7 +103,7 @@
|
||||
if("Full Window")
|
||||
if(!src) return 1
|
||||
if(src.loc != user) return 1
|
||||
if(src.amount < 4)
|
||||
if(src.get_amount() < 4)
|
||||
user << "\red You need more glass to do that."
|
||||
return 1
|
||||
if(locate(/obj/structure/window) in user.loc)
|
||||
@@ -124,7 +125,7 @@
|
||||
user << "\red There is already a windoor in that location."
|
||||
return 1
|
||||
|
||||
if(src.amount < 5)
|
||||
if(src.get_amount() < 5)
|
||||
user << "\red You need more glass to do that."
|
||||
return 1
|
||||
|
||||
@@ -151,10 +152,33 @@
|
||||
construction_options = list("One Direction", "Full Window", "Windoor")
|
||||
|
||||
/obj/item/stack/sheet/glass/reinforced/cyborg
|
||||
name = "reinforced glass"
|
||||
desc = "Glass which has been reinforced with metal rods."
|
||||
name = "reinforced glass synthesizer"
|
||||
desc = "A device that makes reinforced glass."
|
||||
gender = MALE
|
||||
matter = null
|
||||
uses_charge = 1
|
||||
charge_cost = 1000
|
||||
singular_name = "reinforced glass sheet"
|
||||
icon_state = "sheet-rglass"
|
||||
var/datum/matter_synth/metal_synth
|
||||
var/datum/matter_synth/glass_synth
|
||||
var/metal_charge = 500
|
||||
var/glass_charge = 1000
|
||||
|
||||
/obj/item/stack/sheet/glass/reinforced/cyborg/get_amount()
|
||||
return min(round(metal_synth.energy / metal_charge), round(glass_synth.energy / glass_charge))
|
||||
|
||||
/obj/item/stack/sheet/glass/reinforced/cyborg/use(var/amount) // Requires special checks, because it uses two storages
|
||||
if(get_amount() < amount)
|
||||
return 0
|
||||
metal_synth.use_charge(amount * metal_charge)
|
||||
glass_synth.use_charge(amount * glass_charge)
|
||||
return 1
|
||||
|
||||
/obj/item/stack/sheet/glass/reinforced/cyborg/add(var/amount)
|
||||
metal_synth.add_charge(amount * metal_charge)
|
||||
glass_synth.add_charge(amount * glass_charge)
|
||||
return
|
||||
|
||||
/*
|
||||
* Phoron Glass sheets
|
||||
|
||||
@@ -137,9 +137,10 @@ obj/item/stack/sheet/mineral/iron/New()
|
||||
recipes = plastic_recipes
|
||||
|
||||
/obj/item/stack/sheet/mineral/plastic/cyborg
|
||||
name = "plastic sheets"
|
||||
icon_state = "sheet-plastic"
|
||||
perunit = 2000
|
||||
name = "plastic sheets synthesizer"
|
||||
gender = MALE
|
||||
uses_charge = 1
|
||||
charge_cost = 1000
|
||||
stacktype = /obj/item/stack/sheet/mineral/plastic
|
||||
|
||||
/obj/item/stack/sheet/mineral/gold
|
||||
|
||||
@@ -86,12 +86,12 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
|
||||
origin_tech = "materials=1"
|
||||
|
||||
/obj/item/stack/sheet/metal/cyborg
|
||||
name = "metal"
|
||||
desc = "Sheets made out off metal. It has been dubbed Metal Sheets."
|
||||
singular_name = "metal sheet"
|
||||
icon_state = "sheet-metal"
|
||||
throwforce = 14.0
|
||||
flags = CONDUCT
|
||||
name = "metal synthesizer"
|
||||
desc = "A device that makes metal sheets."
|
||||
gender = MALE
|
||||
matter = null
|
||||
uses_charge = 1
|
||||
charge_cost = 1000
|
||||
stacktype = /obj/item/stack/sheet/metal
|
||||
|
||||
/obj/item/stack/sheet/metal/New(var/loc, var/amount=null)
|
||||
@@ -121,9 +121,19 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
|
||||
flags = CONDUCT
|
||||
origin_tech = "materials=2"
|
||||
|
||||
/obj/item/stack/sheet/plasteel/cyborg
|
||||
name = "plasteel synthesizer"
|
||||
desc = "A device that makes plasteel sheets."
|
||||
gender = MALE
|
||||
singular_name = "plasteel sheet"
|
||||
matter = null
|
||||
uses_charge = 1
|
||||
charge_cost = 1000
|
||||
stacktype = /obj/item/stack/sheet/plasteel
|
||||
|
||||
/obj/item/stack/sheet/plasteel/New(var/loc, var/amount=null)
|
||||
recipes = plasteel_recipes
|
||||
return ..()
|
||||
recipes = plasteel_recipes
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Wood
|
||||
@@ -149,10 +159,13 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
|
||||
origin_tech = "materials=1;biotech=1"
|
||||
|
||||
/obj/item/stack/sheet/wood/cyborg
|
||||
name = "wooden plank"
|
||||
desc = "One can only guess that this is a bunch of wood."
|
||||
name = "wood synthesizer"
|
||||
desc = "A device that makes wooden planks."
|
||||
gender = MALE
|
||||
singular_name = "wood plank"
|
||||
icon_state = "sheet-wood"
|
||||
uses_charge = 1
|
||||
charge_cost = 1000
|
||||
stacktype = /obj/item/stack/sheet/wood
|
||||
|
||||
/obj/item/stack/sheet/wood/New(var/loc, var/amount=null)
|
||||
|
||||
Reference in New Issue
Block a user