mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-21 21:10:30 +01:00
8111a8489b
Many, many, many items have inhand sprites in their .dmis but for whatever reasons do not display them in-game. This PR: 1. Updates many item definitions to point to their already-existing inhands correctly. This consists largely of held tools, but also gas tanks and jetpacks mounted in the suit storage slot. 2. Adds a few codersprites made by me for objects with either missing inhands or poorly matching mishands (IE, the tape recorder, which has a black case, reused the white inhand sprites of the health analyzer). The new sprites are modified or recolored variations of other inhand sprites from our repo, except for circuitboards which are new. <img width="444" height="400" alt="image" src="https://github.com/user-attachments/assets/7f107b9a-fe24-4e31-8f16-4d34768ee117" /> 3. Adds inhand sprites for Inflatables and Inflatable Boxes made by Tomixcomics. <img width="424" height="101" alt="image" src="https://github.com/user-attachments/assets/434107c4-8577-49a2-a58e-d6b014c03933" /> 4. Ports inhand sprites for the Hydraulic Rescue Tool from tg's Jaws of Life. <img width="224" height="94" alt="Screenshot 2026-02-07 172931" src="https://github.com/user-attachments/assets/070c7956-f6a8-4fb5-870f-10c64afcc8b3" /> 5. Some additional cleanup while in the area. The 'analyzer' has been renamed the 'gas analyzer' to be consistent with the other analyzer objects, standardized icon_state naming conventions where I saw oddballs, updated code docs to use DMDocs when in the area, etc. ### Asset Licenses The following assets that **have not** been created by myself are included in this PR: | Path | Original Author | License | | --- | --- | --- | | icons/obj/item/hydraulic_rescue_tool.dmi | [SomeAngryMiner (bee station)](https://github.com/BeeStation/BeeStation-Hornet/pull/2487), [maxymax (/tg/station)](https://github.com/tgstation/tgstation/pull/58616) | CC-BY-SA | | icons/obj/item/inflatables.dmi | [Tomixcomics](https://github.com/tomixcomics) | CC-BY-SA |
109 lines
3.2 KiB
Plaintext
109 lines
3.2 KiB
Plaintext
/atom/var/name_unlabel = ""
|
|
|
|
// Yes, this is totally worth a new variable and a proc!
|
|
/atom/proc/remove_label()
|
|
set name = "Remove Label"
|
|
set category = "Object"
|
|
set src in view(1)
|
|
|
|
if (!usr.IsAdvancedToolUser() || usr.incapacitated())
|
|
to_chat(usr, SPAN_NOTICE("You lack the dexerity to do this!"))
|
|
return FALSE
|
|
|
|
if (!name_unlabel)
|
|
to_chat(usr, SPAN_NOTICE("You look again, unable to find the label! Perhaps your eyes need checking?"))
|
|
src.verbs -= PROC_REF(remove_label)
|
|
return FALSE
|
|
|
|
var/mob/living/carbon/human/H = usr
|
|
|
|
name = name_unlabel
|
|
name_unlabel = ""
|
|
src.verbs -= PROC_REF(remove_label)
|
|
|
|
H.visible_message(SPAN_NOTICE("\The [H] removes the label from \the [src]."),
|
|
SPAN_NOTICE("You remove the label from \the [src]."))
|
|
|
|
return TRUE
|
|
|
|
/obj/item/hand_labeler
|
|
name = "hand labeler"
|
|
icon = 'icons/obj/bureaucracy.dmi'
|
|
icon_state = "labeler0"
|
|
item_state = "labeler0"
|
|
contained_sprite = TRUE
|
|
w_class = WEIGHT_CLASS_SMALL
|
|
var/label = null
|
|
var/labels_left = 30
|
|
var/mode = 0 //off or on.
|
|
matter = list(DEFAULT_WALL_MATERIAL = 120, MATERIAL_GLASS = 80)
|
|
|
|
/obj/item/hand_labeler/attack(mob/living/target_mob, mob/living/user, target_zone)
|
|
return
|
|
|
|
/obj/item/hand_labeler/afterattack(atom/A, mob/user as mob, proximity)
|
|
if(!proximity)
|
|
return
|
|
if(!mode) //if it's off, give up.
|
|
return
|
|
if(A == loc) // if placing the labeller into something (e.g. backpack)
|
|
return // don't set a label
|
|
if(loc != user)
|
|
return
|
|
|
|
if(!labels_left)
|
|
to_chat(user, SPAN_NOTICE("No labels left."))
|
|
return
|
|
if(!label || !length(label))
|
|
to_chat(user, SPAN_NOTICE("No text set."))
|
|
return
|
|
if(length(A.name) + length(label) > 64)
|
|
to_chat(user, SPAN_NOTICE("Label too big."))
|
|
return
|
|
if(ishuman(A))
|
|
to_chat(user, SPAN_NOTICE("The label refuses to stick to [A.name]."))
|
|
return
|
|
if(issilicon(A))
|
|
to_chat(user, SPAN_NOTICE("The label refuses to stick to [A.name]."))
|
|
return
|
|
if(isobserver(A))
|
|
to_chat(user, SPAN_NOTICE("[src] passes through [A.name]."))
|
|
return
|
|
if(istype(A, /obj/item/reagent_containers/glass))
|
|
to_chat(user, SPAN_NOTICE("The label can't stick to the [A.name]. (Try using a pen!)"))
|
|
return
|
|
if(istype(A, /obj/machinery/portable_atmospherics/hydroponics))
|
|
var/obj/machinery/portable_atmospherics/hydroponics/tray = A
|
|
if(!tray.mechanical)
|
|
to_chat(user, SPAN_NOTICE("How are you going to label that?"))
|
|
return
|
|
tray.labelled = label
|
|
spawn(1)
|
|
tray.update_icon()
|
|
|
|
user.visible_message("<b>[user]</b> labels [A] as <i>[label]</i>.", \
|
|
SPAN_NOTICE("You label [A] as <i>[label]</i>."))
|
|
|
|
// Prevent label stacking from making name unrecoverable.
|
|
if (!A.name_unlabel)
|
|
A.name_unlabel = A.name
|
|
A.verbs += /atom/proc/remove_label
|
|
|
|
A.name = "[A.name] ([label])"
|
|
|
|
/obj/item/hand_labeler/attack_self(mob/user as mob)
|
|
mode = !mode
|
|
icon_state = "labeler[mode]"
|
|
item_state = icon_state
|
|
if(mode)
|
|
to_chat(user, SPAN_NOTICE("You turn on \the [src]."))
|
|
//Now let them chose the text.
|
|
var/str = sanitizeSafe(input(user,"Label text?","Set label",""), MAX_NAME_LEN)
|
|
if(!str || !length(str))
|
|
to_chat(user, SPAN_NOTICE("Invalid text."))
|
|
return
|
|
label = str
|
|
to_chat(user, SPAN_NOTICE("You set the text to '[str]'."))
|
|
else
|
|
to_chat(user, SPAN_NOTICE("You turn off \the [src]."))
|