Files
Paradise/code/modules/tgui/states/strippable_state.dm
Contrabang 744d9c6bed Ports and Adapts TGUI strip panel from TG (#24618)
* 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
2024-04-08 21:40:11 +00:00

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)