This commit is contained in:
SandPoot
2024-01-06 17:36:02 -03:00
parent cb2251ea37
commit 76e7ffc80d
10 changed files with 53 additions and 54 deletions

View File

@@ -31,6 +31,12 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list(
/obj/item/stack/marker_beacon/thirty //and they're bought in stacks of 1, 10, or 30
amount = 30
/obj/item/stack/marker_beacon/cyborg
is_cyborg = TRUE
custom_materials = null
source = /datum/robot_energy_storage/beacon
cost = 1
/obj/item/stack/marker_beacon/Initialize(mapload)
. = ..()
update_icon()

View File

@@ -86,7 +86,7 @@
if(!(m in R.held_items))
. += m
/obj/item/robot_module/proc/get_or_create_estorage(var/storage_type)
/obj/item/robot_module/proc/get_or_create_estorage(storage_type)
for(var/datum/robot_energy_storage/S in storages)
if(istype(S, storage_type))
return S
@@ -95,42 +95,9 @@
/obj/item/robot_module/proc/add_module(obj/item/I, nonstandard, requires_rebuild)
rad_flags |= RAD_NO_CONTAMINATE
if(istype(I, /obj/item/stack))
var/obj/item/stack/S = I
if(is_type_in_list(S, list(/obj/item/stack/sheet/metal, /obj/item/stack/rods, /obj/item/stack/tile/plasteel)))
if(S.custom_materials?.len && S.custom_materials[SSmaterials.GetMaterialRef(/datum/material/iron)])
S.cost = S.custom_materials[SSmaterials.GetMaterialRef(/datum/material/iron)] * 0.25
S.source = get_or_create_estorage(/datum/robot_energy_storage/metal)
else if(istype(S, /obj/item/stack/sheet/glass))
S.cost = 500
S.source = get_or_create_estorage(/datum/robot_energy_storage/glass)
else if(istype(S, /obj/item/stack/sheet/rglass/cyborg))
var/obj/item/stack/sheet/rglass/cyborg/G = S
G.source = get_or_create_estorage(/datum/robot_energy_storage/metal)
G.glasource = get_or_create_estorage(/datum/robot_energy_storage/glass)
else if(istype(S, /obj/item/stack/medical))
S.cost = 250
S.source = get_or_create_estorage(/datum/robot_energy_storage/medical)
else if(istype(S, /obj/item/stack/cable_coil))
S.cost = 1
S.source = get_or_create_estorage(/datum/robot_energy_storage/wire)
else if(istype(S, /obj/item/stack/marker_beacon))
S.cost = 1
S.source = get_or_create_estorage(/datum/robot_energy_storage/beacon)
else if(istype(S, /obj/item/stack/packageWrap))
S.cost = 1
S.source = get_or_create_estorage(/datum/robot_energy_storage/wrapping_paper)
if(S && S.source)
S.set_custom_materials(null)
S.is_cyborg = 1
var/obj/item/stack/S = I
if(istype(I, /obj/item/stack) && !S.is_cyborg) // Now handled in the type itself
stack_trace("Non-cyborg variant of /obj/item/stack added to a cyborg's modules.")
if(I.loc != src)
I.forceMove(src)
@@ -935,9 +902,9 @@
/obj/item/gps/cyborg,
/obj/item/gripper/mining,
/obj/item/cyborg_clamp,
/obj/item/stack/marker_beacon,
/obj/item/stack/marker_beacon/cyborg,
/obj/item/destTagger,
/obj/item/stack/packageWrap,
/obj/item/stack/packageWrap/cyborg,
/obj/item/card/id/miningborg)
emag_modules = list(/obj/item/borg/stun)
ratvar_modules = list(
@@ -1056,7 +1023,7 @@
/obj/item/surgicaldrill,
/obj/item/scalpel,
/obj/item/bonesetter,
/obj/item/stack/medical/bone_gel,
/obj/item/stack/medical/bone_gel/cyborg,
/obj/item/melee/transforming/energy/sword/cyborg/saw,
/obj/item/roller/robo,
/obj/item/card/emag,
@@ -1191,7 +1158,7 @@
/obj/item/surgicaldrill,
/obj/item/scalpel,
/obj/item/bonesetter,
/obj/item/stack/medical/bone_gel,
/obj/item/stack/medical/bone_gel/cyborg,
/obj/item/melee/transforming/energy/sword/cyborg/saw,
/obj/item/roller/robo,
/obj/item/stack/medical/gauze/cyborg,

View File

@@ -517,6 +517,7 @@ By design, d1 is the smallest direction and d2 is the highest
/obj/item/stack/cable_coil/cyborg
is_cyborg = TRUE
custom_materials = null
source = /datum/robot_energy_storage/wire
cost = 1
/obj/item/stack/cable_coil/cyborg/attack_self(mob/user)