mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 23:17:02 +01:00
Verb cleanup (#22224)
* Verb cleanup * rest of the object verbs * little more object cleanup * more changes * last of it * this too * tgui * code review * time to go
This commit is contained in:
@@ -287,20 +287,6 @@
|
||||
add_fingerprint(user)
|
||||
toggle(user)
|
||||
|
||||
/obj/structure/closet/verb/verb_toggleopen()
|
||||
set src in oview(1)
|
||||
set category = null
|
||||
set name = "Toggle Open"
|
||||
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
|
||||
if(ishuman(usr) || isrobot(usr))
|
||||
add_fingerprint(usr)
|
||||
toggle(usr)
|
||||
return
|
||||
to_chat(usr, "<span class='warning'>This mob type can't use this verb.</span>")
|
||||
|
||||
/obj/structure/closet/update_icon_state()
|
||||
if(!opened)
|
||||
icon_state = "[icon_closed][transparent ? "_trans" : ""]"
|
||||
|
||||
@@ -127,38 +127,6 @@
|
||||
// no, you can't shove people into a fireaxe cabinet either
|
||||
return FALSE
|
||||
|
||||
/obj/structure/closet/fireaxecabinet/verb/toggle_openness() //nice name, huh? HUH?! -Erro //YEAH -Agouri
|
||||
set name = "Open/Close"
|
||||
set category = "Object"
|
||||
|
||||
if(isrobot(usr) || locked || smashed)
|
||||
if(locked)
|
||||
to_chat(usr, "<span class='warning'>The cabinet won't budge!</span>")
|
||||
else if(smashed)
|
||||
to_chat(usr, "<span class='notice'>The protective glass is broken!</span>")
|
||||
return
|
||||
|
||||
operate_panel()
|
||||
|
||||
/obj/structure/closet/fireaxecabinet/verb/remove_fire_axe()
|
||||
set name = "Remove Fire Axe"
|
||||
set category = "Object"
|
||||
|
||||
if(isrobot(usr))
|
||||
return
|
||||
|
||||
if(localopened)
|
||||
if(fireaxe)
|
||||
usr.put_in_hands(fireaxe)
|
||||
to_chat(usr, "<span class='notice'>You take \the [fireaxe] from [src].</span>")
|
||||
has_axe = "empty"
|
||||
fireaxe = null
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>[src] is empty.</span>")
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>[src] is closed.</span>")
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/structure/closet/fireaxecabinet/attack_ai(mob/user as mob)
|
||||
if(smashed)
|
||||
to_chat(user, "<span class='warning'>The security of the cabinet is compromised.</span>")
|
||||
|
||||
@@ -82,20 +82,6 @@
|
||||
else
|
||||
toggle(user)
|
||||
|
||||
/obj/structure/closet/secure_closet/verb/verb_togglelock()
|
||||
set src in oview(1) // One square distance
|
||||
set category = "Object"
|
||||
set name = "Toggle Lock"
|
||||
|
||||
if(usr.incapacitated()) // Don't use it if you're not able to! Checks for stuns, ghost and restrain
|
||||
return
|
||||
|
||||
if(ishuman(usr)||isrobot(usr))
|
||||
add_fingerprint(usr)
|
||||
togglelock(usr)
|
||||
return
|
||||
to_chat(usr, "<span class='warning'>This mob type can't use this verb.</span>")
|
||||
|
||||
/obj/structure/closet/secure_closet/update_overlays() //Putting the welded stuff in update_overlays() so it's easy to overwrite for special cases (Fridges, cabinets, and whatnot)
|
||||
cut_overlays()
|
||||
if(opened)
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
M.take_overall_damage((M.health - obj_integrity - 100),0) //any new damage the statue incurred is transfered to the mob
|
||||
|
||||
..()
|
||||
|
||||
|
||||
/obj/structure/closet/statue/shove_impact(mob/living/target, mob/living/attacker)
|
||||
return FALSE
|
||||
|
||||
@@ -105,9 +105,6 @@
|
||||
/obj/structure/closet/statue/attack_hand()
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/verb_toggleopen()
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/update_icon_state()
|
||||
return
|
||||
|
||||
|
||||
@@ -229,25 +229,13 @@
|
||||
|
||||
/obj/structure/closet/crate/secure/AltClick(mob/user)
|
||||
if(Adjacent(user) && !opened)
|
||||
verb_togglelock()
|
||||
if(HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || user.stat) // Don't use it if you're not able to! Checks for stuns, ghost and restrain
|
||||
return
|
||||
togglelock()
|
||||
return
|
||||
|
||||
. = ..()
|
||||
|
||||
/obj/structure/closet/crate/secure/verb/verb_togglelock()
|
||||
set src in oview(1) // One square distance
|
||||
set category = null
|
||||
set name = "Toggle Lock"
|
||||
|
||||
if(HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED) || usr.stat || usr.restrained()) // Don't use it if you're not able to! Checks for stuns, ghost and restrain
|
||||
return
|
||||
|
||||
if(ishuman(usr) || isrobot(usr))
|
||||
add_fingerprint(usr)
|
||||
togglelock(usr)
|
||||
return
|
||||
to_chat(usr, "<span class='warning'>This mob type can't use this verb.</span>")
|
||||
|
||||
/obj/structure/closet/crate/secure/attack_hand(mob/user)
|
||||
if(manifest)
|
||||
to_chat(user, "<span class='notice'>You tear the manifest off of the crate.</span>")
|
||||
|
||||
Reference in New Issue
Block a user