mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +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:
@@ -503,7 +503,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
|
||||
//the mob M is attempting to equip this item into the slot passed through as 'slot'. Return 1 if it can do this and 0 if it can't.
|
||||
//If you are making custom procs but would like to retain partial or complete functionality of this one, include a 'return ..()' to where you want this to happen.
|
||||
//Set disable_warning to 1 if you wish it to not give you outputs.
|
||||
/obj/item/proc/mob_can_equip(mob/M, slot, disable_warning = 0)
|
||||
/obj/item/proc/mob_can_equip(mob/M, slot, disable_warning = FALSE)
|
||||
if(!M)
|
||||
return 0
|
||||
|
||||
@@ -920,3 +920,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
|
||||
"<span class='userdanger'>[pointer_mob] points [src] at you!</span>")
|
||||
SEND_SOUND(target_atom, sound('sound/weapons/targeton.ogg'))
|
||||
return TRUE
|
||||
|
||||
/obj/item/proc/canStrip(mob/stripper, mob/owner)
|
||||
SHOULD_BE_PURE(TRUE)
|
||||
return !(flags & NODROP) && !(flags & ABSTRACT)
|
||||
|
||||
@@ -134,11 +134,10 @@
|
||||
can_hold = list() // any
|
||||
cant_hold = list(/obj/item/disk/nuclear)
|
||||
|
||||
/obj/item/storage/bag/plasticbag/mob_can_equip(M as mob, slot)
|
||||
|
||||
if(slot==SLOT_HUD_HEAD && contents.len)
|
||||
/obj/item/storage/bag/plasticbag/mob_can_equip(mob/M, slot, disable_warning = FALSE)
|
||||
if(slot == SLOT_HUD_HEAD && length(contents))
|
||||
to_chat(M, "<span class='warning'>You need to empty the bag first!</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
/obj/item/storage/internal/attack_hand()
|
||||
return //make sure this is never picked up
|
||||
|
||||
/obj/item/storage/internal/mob_can_equip()
|
||||
/obj/item/storage/internal/mob_can_equip(mob/M, slot, disable_warning = FALSE)
|
||||
return 0 //make sure this is never picked up
|
||||
|
||||
//Helper procs to cleanly implement internal storages - storage items that provide inventory slots for other items.
|
||||
|
||||
@@ -83,11 +83,11 @@
|
||||
/obj/item/melee/baton/get_cell()
|
||||
return cell
|
||||
|
||||
/obj/item/melee/baton/mob_can_equip(mob/user, slot, disable_warning = TRUE)
|
||||
/obj/item/melee/baton/mob_can_equip(mob/user, slot, disable_warning = TRUE) // disable the warning
|
||||
if(turned_on && (slot == SLOT_HUD_BELT || slot == SLOT_HUD_SUIT_STORE))
|
||||
to_chat(user, "<span class='warning'>You can't equip [src] while it's active!</span>")
|
||||
return FALSE
|
||||
return ..(user, slot, disable_warning = TRUE) // call parent but disable warning
|
||||
return ..()
|
||||
|
||||
/obj/item/melee/baton/can_enter_storage(obj/item/storage/S, mob/user)
|
||||
if(turned_on)
|
||||
|
||||
Reference in New Issue
Block a user