mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 07:03:30 +01:00
744d9c6bed
* part 1 * these also * fuckin nuke it * more * more stuff * more crap * wow * holy fucking shit, it works * thats a start * oops * fubing bundle * hahah brrrrr * I LITERALLY ADDED IT BACK, FUCK OFF GIT * yeah more changes * hide abstract * blamo * thats enough for today * old code begone * goodbye can_strip * nearly there * finally * fuckin finally * review * tgui * unbreak shit * fix OD * okay, that should fix the last thing * remove hover on nodrop, fix early interacting
19 lines
456 B
Plaintext
19 lines
456 B
Plaintext
/**
|
|
* tgui state: strippable_state
|
|
*
|
|
* Checks if user can strip the mob src_object
|
|
*/
|
|
|
|
|
|
GLOBAL_DATUM_INIT(strippable_state, /datum/ui_state/strippable_state, new)
|
|
|
|
/datum/ui_state/strippable_state/can_use_topic(src_object, mob/user)
|
|
if(!ismob(src_object))
|
|
return UI_CLOSE
|
|
. = user.default_can_use_topic(src_object)
|
|
if(!HAS_TRAIT(user, TRAIT_CAN_STRIP))
|
|
. = min(., UI_UPDATE)
|
|
var/mob/M = src_object
|
|
if(!isturf(M.loc))
|
|
. = min(., UI_DISABLED)
|