mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
Refactor stack recipes
- Styling fixes
- Added post_build() to stack recipes, for any recipes that need to do
something special
- Called with two arguments, the stack that it originated from, and the
new object.
- Moved stack recipes to their own file
Currently, only two things use post_build
- Cablecuffs use it to color the cuffs the same as the wire they
originated from
- Metal rods use it to call update_icon, in order to display the correct
sprite for whatever amount of rods you created.
This commit is contained in:
@@ -12,9 +12,9 @@
|
||||
return STATUS_CLOSE
|
||||
|
||||
/mob/proc/shared_nano_interaction()
|
||||
if(src.stat || !client)
|
||||
if(stat || !client)
|
||||
return STATUS_CLOSE // no updates, close the interface
|
||||
else if(restrained() || lying || stat || stunned || weakened)
|
||||
else if(restrained() || lying || stunned || weakened)
|
||||
return STATUS_UPDATE // update only (orange visibility)
|
||||
return STATUS_INTERACTIVE
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
|
||||
/obj/structure/cable
|
||||
level = 1
|
||||
anchored =1
|
||||
anchored = 1
|
||||
on_blueprints = TRUE
|
||||
var/datum/powernet/powernet
|
||||
name = "power cable"
|
||||
@@ -457,12 +457,13 @@ obj/structure/cable/proc/cableColor(var/colorC)
|
||||
|
||||
#define MAXCOIL 30
|
||||
|
||||
var/global/list/datum/stack_recipe/cable_coil_recipes = list ( \
|
||||
new/datum/stack_recipe("cable restraints", /obj/item/weapon/restraints/handcuffs/cable, 15), \
|
||||
)
|
||||
var/global/list/datum/stack_recipe/cable_coil_recipes = list(
|
||||
new /datum/stack_recipe/cable_restraints("cable restraints", /obj/item/weapon/restraints/handcuffs/cable, 15),
|
||||
)
|
||||
|
||||
/obj/item/stack/cable_coil
|
||||
name = "cable coil"
|
||||
singular_name = "cable"
|
||||
icon = 'icons/obj/power.dmi'
|
||||
icon_state = "coil"
|
||||
item_state = "coil_red"
|
||||
|
||||
Reference in New Issue
Block a user