mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 11:34:19 +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:
@@ -17,15 +17,16 @@
|
||||
var/measured_health = 0 // Used for measuring health; we don't want this to stop applying once the person's health isn't changing.
|
||||
var/static/list/safe_chem_applicator_list = list("silver_sulfadiazine", "styptic_powder", "synthflesh")
|
||||
|
||||
/obj/item/reagent_containers/applicator/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='info'><b>Alt-Click</b> to empty it.</span>"
|
||||
|
||||
/obj/item/reagent_containers/applicator/emag_act(mob/user)
|
||||
if(!emagged)
|
||||
emagged = TRUE
|
||||
ignore_flags = TRUE
|
||||
to_chat(user, "<span class='warning'>You short out the safeties on [src].</span>")
|
||||
|
||||
/obj/item/reagent_containers/applicator/set_APTFT()
|
||||
set hidden = TRUE
|
||||
|
||||
/obj/item/reagent_containers/applicator/on_reagent_change()
|
||||
if(!emagged)
|
||||
var/found_forbidden_reagent = FALSE
|
||||
@@ -120,18 +121,14 @@
|
||||
|
||||
playsound(get_turf(src), pick('sound/goonstation/items/mender.ogg', 'sound/goonstation/items/mender2.ogg'), 50, 1)
|
||||
|
||||
/obj/item/reagent_containers/applicator/verb/empty()
|
||||
set name = "Empty Applicator"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if(usr.incapacitated())
|
||||
/obj/item/reagent_containers/applicator/AltClick(mob/user)
|
||||
if(user.stat || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || !Adjacent(user))
|
||||
return
|
||||
if(alert(usr, "Are you sure you want to empty [src]?", "Empty Applicator:", "Yes", "No") != "Yes")
|
||||
if(alert(user, "Are you sure you want to empty [src]?", "Empty Applicator:", "Yes", "No") != "Yes")
|
||||
return
|
||||
if(!usr.incapacitated() && isturf(usr.loc) && loc == usr)
|
||||
to_chat(usr, "<span class='notice'>You empty [src] onto the floor.</span>")
|
||||
reagents.reaction(usr.loc)
|
||||
if(!user.incapacitated() && isturf(user.loc) && loc == user)
|
||||
to_chat(user, "<span class='notice'>You empty [src] onto the floor.</span>")
|
||||
reagents.reaction(user.loc)
|
||||
reagents.clear_reagents()
|
||||
|
||||
/obj/item/reagent_containers/applicator/brute
|
||||
|
||||
@@ -130,6 +130,11 @@
|
||||
var/obj/item/assembly_holder/assembly = null
|
||||
var/can_assembly = 1
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/examine(mob/user)
|
||||
. = ..()
|
||||
if(assembly)
|
||||
. += "<span class='notice'>There is an [assembly] attached to it, use a screwdriver to remove it.</span>"
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/on_reagent_change()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
@@ -165,20 +170,6 @@
|
||||
if(assembly)
|
||||
. += "assembly"
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/verb/remove_assembly()
|
||||
set name = "Remove Assembly"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
if(assembly)
|
||||
to_chat(usr, "<span class='notice'>You detach [assembly] from [src]</span>")
|
||||
usr.put_in_hands(assembly)
|
||||
assembly = null
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>There is no assembly to remove.</span>")
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/proc/heat_beaker()
|
||||
if(reagents)
|
||||
reagents.temperature_reagents(4000)
|
||||
@@ -215,6 +206,17 @@
|
||||
if(assembly)
|
||||
assembly.hear_message(M, msg)
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/screwdriver_act(mob/living/user, obj/item/I)
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
if(assembly)
|
||||
to_chat(user, "<span class='notice'>You detach [assembly] from [src]</span>")
|
||||
user.put_in_hands(assembly)
|
||||
assembly = null
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There is no assembly to remove.</span>")
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/large
|
||||
name = "large beaker"
|
||||
desc = "A large glass beaker with twice the capacity of a normal beaker."
|
||||
|
||||
@@ -95,19 +95,16 @@
|
||||
. = ..()
|
||||
if(get_dist(user, src) && user == loc)
|
||||
. += "[round(reagents.total_volume)] units left."
|
||||
. += "<span class='info'><b>Alt-Click</b> to empty it.</span>"
|
||||
|
||||
/obj/item/reagent_containers/spray/verb/empty()
|
||||
|
||||
set name = "Empty Spray Bottle"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
if(usr.stat || HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED) || usr.restrained())
|
||||
/obj/item/reagent_containers/spray/AltClick(mob/user)
|
||||
if(user.stat || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || !Adjacent(user))
|
||||
return
|
||||
if(alert(usr, "Are you sure you want to empty that?", "Empty Bottle:", "Yes", "No") != "Yes")
|
||||
if(alert(user, "Are you sure you want to empty that?", "Empty Bottle:", "Yes", "No") != "Yes")
|
||||
return
|
||||
if(isturf(usr.loc) && loc == usr)
|
||||
to_chat(usr, "<span class='notice'>You empty [src] onto the floor.</span>")
|
||||
reagents.reaction(usr.loc)
|
||||
if(isturf(user.loc) && loc == user)
|
||||
to_chat(user, "<span class='notice'>You empty [src] onto the floor.</span>")
|
||||
reagents.reaction(user.loc)
|
||||
reagents.clear_reagents()
|
||||
|
||||
//space cleaner
|
||||
|
||||
@@ -23,9 +23,6 @@
|
||||
mode = SYRINGE_INJECT
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/syringe/set_APTFT()
|
||||
set hidden = TRUE
|
||||
|
||||
/obj/item/reagent_containers/syringe/on_reagent_change()
|
||||
update_icon()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user