mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 15:08:02 +01:00
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
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* 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)
|
||||
Reference in New Issue
Block a user