push
This commit is contained in:
@@ -217,6 +217,7 @@
|
||||
/obj/item/stack/medical/gauze/cyborg
|
||||
custom_materials = null
|
||||
is_cyborg = TRUE
|
||||
source = /datum/robot_energy_storage/medical
|
||||
cost = 250
|
||||
|
||||
/obj/item/stack/medical/suture
|
||||
@@ -441,6 +442,7 @@
|
||||
/obj/item/stack/medical/bone_gel/cyborg
|
||||
custom_materials = null
|
||||
is_cyborg = TRUE
|
||||
source = /datum/robot_energy_storage/medical
|
||||
cost = 250
|
||||
|
||||
/obj/item/stack/medical/aloe
|
||||
|
||||
@@ -39,7 +39,7 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \
|
||||
|
||||
/obj/item/stack/rods/update_icon_state()
|
||||
var/amount = get_amount()
|
||||
if(amount <= 5)
|
||||
if(amount <= 5 && amount >= 1)
|
||||
icon_state = "rods-[amount]"
|
||||
else
|
||||
icon_state = "rods"
|
||||
@@ -77,11 +77,8 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \
|
||||
/obj/item/stack/rods/cyborg
|
||||
custom_materials = null
|
||||
is_cyborg = TRUE
|
||||
cost = 250
|
||||
|
||||
/obj/item/stack/rods/cyborg/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/update_icon_blocker)
|
||||
source = /datum/robot_energy_storage/medical
|
||||
cost = MINERAL_MATERIAL_AMOUNT * 0.125
|
||||
|
||||
/obj/item/stack/rods/ten
|
||||
amount = 10
|
||||
|
||||
@@ -52,7 +52,8 @@ GLOBAL_LIST_INIT(glass_recipes, list ( \
|
||||
/obj/item/stack/sheet/glass/cyborg
|
||||
custom_materials = null
|
||||
is_cyborg = TRUE
|
||||
cost = 500
|
||||
source = /datum/robot_energy_storage/glass
|
||||
cost = MINERAL_MATERIAL_AMOUNT * 0.25
|
||||
|
||||
/obj/item/stack/sheet/glass/fifty
|
||||
amount = 50
|
||||
@@ -179,9 +180,15 @@ GLOBAL_LIST_INIT(reinforced_glass_recipes, list ( \
|
||||
/obj/item/stack/sheet/rglass/cyborg
|
||||
custom_materials = null
|
||||
is_cyborg = TRUE
|
||||
var/datum/robot_energy_storage/glasource
|
||||
var/metcost = 250
|
||||
var/glacost = 500
|
||||
source = /datum/robot_energy_storage/metal
|
||||
var/datum/robot_energy_storage/glasource = /datum/robot_energy_storage/glass
|
||||
var/metcost = MINERAL_MATERIAL_AMOUNT * 0.125
|
||||
var/glacost = MINERAL_MATERIAL_AMOUNT * 0.25
|
||||
|
||||
/obj/item/stack/sheet/rglass/cyborg/prepare_estorage(obj/item/robot_module/module)
|
||||
. = ..()
|
||||
if(glasource)
|
||||
glasource = module.get_or_create_estorage(glasource)
|
||||
|
||||
/obj/item/stack/sheet/rglass/cyborg/get_amount()
|
||||
return min(round(source.energy / metcost), round(glasource.energy / glacost))
|
||||
@@ -189,10 +196,12 @@ GLOBAL_LIST_INIT(reinforced_glass_recipes, list ( \
|
||||
/obj/item/stack/sheet/rglass/cyborg/use(used, transfer = FALSE) // Requires special checks, because it uses two storages
|
||||
source.use_charge(used * metcost)
|
||||
glasource.use_charge(used * glacost)
|
||||
update_icon()
|
||||
|
||||
/obj/item/stack/sheet/rglass/cyborg/add(amount)
|
||||
source.add_charge(amount * metcost)
|
||||
glasource.add_charge(amount * glacost)
|
||||
update_icon()
|
||||
|
||||
/obj/item/stack/sheet/rglass/get_main_recipes()
|
||||
. = ..()
|
||||
|
||||
@@ -164,7 +164,8 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
|
||||
/obj/item/stack/sheet/metal/cyborg
|
||||
custom_materials = null
|
||||
is_cyborg = TRUE
|
||||
cost = 500
|
||||
source = /datum/robot_energy_storage/metal
|
||||
cost = MINERAL_MATERIAL_AMOUNT * 0.25
|
||||
|
||||
/obj/item/stack/sheet/metal/get_main_recipes()
|
||||
. = ..()
|
||||
|
||||
@@ -42,6 +42,9 @@
|
||||
var/matter_amount = 0
|
||||
|
||||
/obj/item/stack/Initialize(mapload, new_amount, merge = TRUE)
|
||||
if(is_cyborg && istype(loc, /obj/item/robot_module))
|
||||
prepare_estorage(loc)
|
||||
|
||||
if(new_amount != null)
|
||||
amount = new_amount
|
||||
while(amount > max_amount)
|
||||
@@ -383,7 +386,9 @@
|
||||
if(check && zero_amount())
|
||||
return FALSE
|
||||
if (is_cyborg)
|
||||
return source.use_charge(used * cost)
|
||||
. = source.use_charge(used * cost)
|
||||
update_icon()
|
||||
return
|
||||
if (amount < used)
|
||||
return FALSE
|
||||
amount -= used
|
||||
@@ -539,3 +544,7 @@
|
||||
/obj/item/stack/microwave_act(obj/machinery/microwave/M)
|
||||
if(istype(M) && M.dirty < 100)
|
||||
M.dirty += amount
|
||||
|
||||
/obj/item/stack/proc/prepare_estorage(obj/item/robot_module/module)
|
||||
if(source)
|
||||
source = module.get_or_create_estorage(source)
|
||||
|
||||
@@ -536,7 +536,8 @@
|
||||
/obj/item/stack/tile/plasteel/cyborg
|
||||
custom_materials = null // All other Borg versions of items have no Metal or Glass - RR
|
||||
is_cyborg = TRUE
|
||||
cost = 125
|
||||
source = /datum/robot_energy_storage/metal
|
||||
cost = MINERAL_MATERIAL_AMOUNT * 0.0625
|
||||
|
||||
/obj/item/stack/tile/material
|
||||
name = "floor tile"
|
||||
|
||||
@@ -40,6 +40,12 @@
|
||||
resistance_flags = FLAMMABLE
|
||||
grind_results = list(/datum/reagent/cellulose = 5)
|
||||
|
||||
/obj/item/stack/packageWrap/cyborg
|
||||
custom_materials = null
|
||||
is_cyborg = TRUE
|
||||
source = /datum/robot_energy_storage/wrapping_paper
|
||||
cost = 1
|
||||
|
||||
/obj/item/stack/packageWrap/suicide_act(mob/living/user)
|
||||
user.visible_message("<span class='suicide'>[user] begins wrapping [user.p_them()]self in \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
if(use(3))
|
||||
|
||||
Reference in New Issue
Block a user