mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-24 08:57:09 +01:00
- 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>
32 lines
998 B
Plaintext
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())
|