Files
b4a124e557 [IDB IGNORE] cyborg refactor: icons, chassis, modules base (#6929)
- separates the composition of cyborgs into modules, iconsets, chassis,
upgrades
- modules / chassis atm can provide items, so can upgrades; in the
future we will want to probably generalize the item API a bit so
components can work
- chassis now can (unimplemented) easily be made to give different stats
- reorganizes all the cyborg sprites
- adds generalized item mounts with redirection support and tears out
legacy cyborg items
- entirely rebalances modules & writes some new lawsets in for future
use

---------

Co-authored-by: silicons <silicons@silicons.dev>
2026-01-13 18:39:38 +00:00

32 lines
998 B
Plaintext

//* This file is explicitly licensed under the MIT license. *//
//* Copyright (c) 2024 Citadel Station Developers *//
// doMove hook to ensure proper functionality when inv procs aren't called
/obj/item/doMove(atom/destination)
if(worn_slot && !worn_hook_suppressed)
// inventory handling
if(destination == worn_inside)
return ..()
var/mob/M = get_worn_mob()
if(!ismob(M))
worn_slot = null
worn_hook_suppressed = FALSE
stack_trace("item forcemove inv hook called without a mob as loc??")
M.temporarily_remove_from_inventory(src, INV_OP_FORCE)
return ..()
// todo: this is fucking awful
/obj/item/Move(atom/newloc, direct, step_x, step_y, glide_size_override)
if(!worn_slot)
return ..()
var/mob/M = get_worn_mob()
if(istype(M))
M.temporarily_remove_from_inventory(src, INV_OP_FORCE)
else
stack_trace("item Move inv hook called without a mob as loc??")
worn_slot = null
. = ..()
if(!. || (loc == M))
// kick them out
forceMove(M.drop_location())