Files
Batrachophreno 8111a8489b Restore many missing inhand sprites for items, add/port others (#21831)
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 |
2026-02-17 17:51:22 +00:00

234 lines
8.8 KiB
Plaintext

//Analyzer, pestkillers, weedkillers, nutrients, hatchets, cutters.
/obj/item/wirecutters/clippers
name = "plant clippers"
desc = "A tool used to take samples from plants."
icon_state = "plantclippers"
item_state = "plantclippers"
item_icons = list(
slot_l_hand_str = 'icons/mob/items/lefthand_hydro.dmi',
slot_r_hand_str = 'icons/mob/items/righthand_hydro.dmi',
)
toolspeed = 0.7
/// Plant clippers have a 40% chance to successfully defuse a bomb, higher than standard because plant clippers are smaller.
bomb_defusal_chance = 40
build_from_parts = FALSE
/obj/item/wirecutters/clippers/update_icon()
var/matrix/tf = matrix()
var/obj/item/storage/S = loc
if(istype(S, /obj/item/storage) && !S.storage_slots)
tf.Turn(-90) //Vertical for storing compactly
tf.Translate(-1, 0) //Could do this with pixel_x but let's just update the appearance once.
transform = tf
/// Like a health analyzer, but for plants! Tells you everything you need to know.
/obj/item/analyzer/plant_analyzer
name = "plant analyzer"
icon = 'icons/obj/item/scanner.dmi'
icon_state = "hydro"
item_state = "hydro"
var/form_title
var/last_data
matter = list(DEFAULT_WALL_MATERIAL = 80, MATERIAL_GLASS = 20)
origin_tech = list(TECH_MAGNET = 1, TECH_BIO = 1)
/obj/item/analyzer/plant_analyzer/proc/print_report_verb()
set name = "Print Plant Report"
set category = "Object.Held"
set src = usr
if(usr.stat || usr.restrained() || usr.lying)
return
print_report(usr)
/obj/item/analyzer/plant_analyzer/Topic(href, href_list)
if(..())
return
if(href_list["print"])
print_report(usr)
/obj/item/analyzer/plant_analyzer/proc/print_report(var/mob/living/user)
if(!last_data)
to_chat(user, "There is no scan data to print.")
return
var/obj/item/paper/P = new /obj/item/paper(get_turf(src))
P.set_content_unsafe("paper - [form_title]", "[last_data]")
if(istype(user,/mob/living/carbon/human) && !(user.l_hand && user.r_hand))
user.put_in_hands(P)
user.visible_message("\The [src] spits out a piece of paper.")
return
/obj/item/analyzer/plant_analyzer/attack_self(mob/user as mob)
print_report(user)
return 0
/obj/item/analyzer/plant_analyzer/afterattack(obj/target, mob/user, flag)
if(!flag) return
var/datum/seed/grown_seed
var/datum/reagents/grown_reagents
if(istype(target,/obj/structure/table))
return ..()
else if(istype(target,/obj/item/reagent_containers/food/snacks/grown))
var/obj/item/reagent_containers/food/snacks/grown/G = target
grown_seed = SSplants.seeds[G.plantname]
grown_reagents = G.reagents
else if(istype(target,/obj/item/grown))
var/obj/item/grown/G = target
grown_seed = SSplants.seeds[G.plantname]
grown_reagents = G.reagents
else if(istype(target,/obj/item/seeds))
var/obj/item/seeds/S = target
grown_seed = S.seed
else if(istype(target,/obj/machinery/portable_atmospherics/hydroponics))
var/obj/machinery/portable_atmospherics/hydroponics/H = target
grown_seed = H.seed
grown_reagents = H.reagents
if(!grown_seed)
to_chat(user, SPAN_DANGER("[src] can tell you nothing about \the [target]."))
return
form_title = "[grown_seed.seed_name] (#[grown_seed.uid])"
var/dat = "<h3>Plant data for [form_title]</h3>"
user.visible_message(SPAN_NOTICE("[user] runs the scanner over \the [target]."))
dat += "<h2>General Data</h2>"
dat += "<table>"
dat += "<tr><td><b>Endurance</b></td><td>[GET_SEED_TRAIT(grown_seed, TRAIT_ENDURANCE)]</td></tr>"
dat += "<tr><td><b>Yield</b></td><td>[GET_SEED_TRAIT(grown_seed, TRAIT_YIELD)]</td></tr>"
dat += "<tr><td><b>Maturation time</b></td><td>[GET_SEED_TRAIT(grown_seed, TRAIT_MATURATION)]</td></tr>"
dat += "<tr><td><b>Production time</b></td><td>[GET_SEED_TRAIT(grown_seed, TRAIT_PRODUCTION)]</td></tr>"
dat += "<tr><td><b>Potency</b></td><td>[GET_SEED_TRAIT(grown_seed, TRAIT_POTENCY)]</td></tr>"
dat += "</table>"
if(LAZYLEN(grown_reagents?.reagent_volumes))
dat += "<h2>Reagent Data</h2>"
dat += "<br>This sample contains: "
for(var/_R in grown_reagents.reagent_volumes)
var/singleton/reagent/R = GET_SINGLETON(_R)
dat += "<br>- [R.name], [REAGENT_VOLUME(grown_reagents, _R)] unit(s)"
dat += "<h2>Other Data</h2>"
if(GET_SEED_TRAIT(grown_seed, TRAIT_HARVEST_REPEAT))
dat += "This plant can be harvested repeatedly.<br>"
if(GET_SEED_TRAIT(grown_seed, TRAIT_IMMUTABLE) == -1)
dat += "This plant is highly mutable.<br>"
else if(GET_SEED_TRAIT(grown_seed, TRAIT_IMMUTABLE) > 0)
dat += "This plant does not possess genetics that are alterable.<br>"
if(GET_SEED_TRAIT(grown_seed, TRAIT_REQUIRES_NUTRIENTS))
if(GET_SEED_TRAIT(grown_seed, TRAIT_NUTRIENT_CONSUMPTION) < 0.05)
dat += "It consumes a small amount of nutrient fluid.<br>"
else if(GET_SEED_TRAIT(grown_seed, TRAIT_NUTRIENT_CONSUMPTION) > 0.2)
dat += "It requires a heavy supply of nutrient fluid.<br>"
else
dat += "It requires a supply of nutrient fluid.<br>"
if(GET_SEED_TRAIT(grown_seed, TRAIT_REQUIRES_WATER))
if(GET_SEED_TRAIT(grown_seed, TRAIT_WATER_CONSUMPTION) < 1)
dat += "It requires very little water.<br>"
else if(GET_SEED_TRAIT(grown_seed, TRAIT_WATER_CONSUMPTION) > 5)
dat += "It requires a large amount of water.<br>"
else
dat += "It requires a stable supply of water.<br>"
if(grown_seed.mutants && grown_seed.mutants.len)
dat += "It exhibits a high degree of potential subspecies shift.<br>"
dat += "It thrives in a temperature of [GET_SEED_TRAIT(grown_seed, TRAIT_IDEAL_HEAT)] Kelvin."
if(GET_SEED_TRAIT(grown_seed, TRAIT_LOWKPA_TOLERANCE) < 20)
dat += "<br>It is well adapted to low pressure levels."
if(GET_SEED_TRAIT(grown_seed, TRAIT_HIGHKPA_TOLERANCE) > 220)
dat += "<br>It is well adapted to high pressure levels."
if(GET_SEED_TRAIT(grown_seed, TRAIT_HEAT_TOLERANCE) > 30)
dat += "<br>It is well adapted to a range of temperatures."
else if(GET_SEED_TRAIT(grown_seed, TRAIT_HEAT_TOLERANCE) < 10)
dat += "<br>It is very sensitive to temperature shifts."
dat += "<br>It thrives in a light level of [GET_SEED_TRAIT(grown_seed, TRAIT_IDEAL_LIGHT)] lumen\s."
if(GET_SEED_TRAIT(grown_seed, TRAIT_LIGHT_TOLERANCE) > 10)
dat += "<br>It is well adapted to a range of light levels."
else if(GET_SEED_TRAIT(grown_seed, TRAIT_LIGHT_TOLERANCE) < 3)
dat += "<br>It is very sensitive to light level shifts."
if(GET_SEED_TRAIT(grown_seed, TRAIT_TOXINS_TOLERANCE) < 3)
dat += "<br>It is highly sensitive to toxins."
else if(GET_SEED_TRAIT(grown_seed, TRAIT_TOXINS_TOLERANCE) > 6)
dat += "<br>It is remarkably resistant to toxins."
if(GET_SEED_TRAIT(grown_seed, TRAIT_PEST_TOLERANCE) < 3)
dat += "<br>It is highly sensitive to pests."
else if(GET_SEED_TRAIT(grown_seed, TRAIT_PEST_TOLERANCE) > 6)
dat += "<br>It is remarkably resistant to pests."
if(GET_SEED_TRAIT(grown_seed, TRAIT_WEED_TOLERANCE) < 3)
dat += "<br>It is highly sensitive to weeds."
else if(GET_SEED_TRAIT(grown_seed, TRAIT_WEED_TOLERANCE) > 6)
dat += "<br>It is remarkably resistant to weeds."
switch(GET_SEED_TRAIT(grown_seed, TRAIT_SPREAD))
if(1)
dat += "<br>It is able to be planted outside of a tray."
if(2)
dat += "<br>It is a robust and vigorous vine that will spread rapidly."
switch(GET_SEED_TRAIT(grown_seed, TRAIT_CARNIVOROUS))
if(1)
dat += "<br>It is carnivorous and will eat tray pests for sustenance."
if(2)
dat += "<br>It is carnivorous and poses a significant threat to living things around it."
if(GET_SEED_TRAIT(grown_seed, TRAIT_PARASITE))
dat += "<br>It is capable of parisitizing and gaining sustenance from tray weeds."
if(GET_SEED_TRAIT(grown_seed, TRAIT_ALTER_TEMP))
dat += "<br>It will periodically alter the local temperature by [GET_SEED_TRAIT(grown_seed, TRAIT_ALTER_TEMP)] degrees Kelvin."
if(GET_SEED_TRAIT(grown_seed, TRAIT_BIOLUM))
dat += "<br>It is [GET_SEED_TRAIT(grown_seed, TRAIT_BIOLUM_COLOUR) ? "<font color='[GET_SEED_TRAIT(grown_seed, TRAIT_BIOLUM_COLOUR)]'>bio-luminescent</font>" : "bio-luminescent"]."
if(GET_SEED_TRAIT(grown_seed, TRAIT_PRODUCES_POWER))
dat += "<br>The fruit will function as a battery if prepared appropriately."
if(GET_SEED_TRAIT(grown_seed, TRAIT_STINGS))
dat += "<br>The fruit is covered in stinging spines."
if(GET_SEED_TRAIT(grown_seed, TRAIT_JUICY) == 1)
dat += "<br>The fruit is soft-skinned and juicy."
else if(GET_SEED_TRAIT(grown_seed, TRAIT_JUICY) == 2)
dat += "<br>The fruit is excessively juicy."
if(GET_SEED_TRAIT(grown_seed, TRAIT_EXPLOSIVE))
dat += "<br>The fruit is internally unstable."
if(GET_SEED_TRAIT(grown_seed, TRAIT_TELEPORTING))
dat += "<br>The fruit is temporal/spatially unstable."
if(GET_SEED_TRAIT(grown_seed, TRAIT_EXUDE_GASSES))
dat += "<br>It will release gas into the environment."
if(GET_SEED_TRAIT(grown_seed, TRAIT_CONSUME_GASSES))
dat += "<br>It will remove gas from the environment."
if(dat)
last_data = dat
dat += "<br><br>\[<a href='byond://?src=[REF(src)];print=1'>print report</a>\]"
user << browse(HTML_SKELETON(dat),"window=plant_analyzer")
return