Skip to content

Commit

Permalink
Adds on-mob sprites for the pocketwatch + differing states per slot w…
Browse files Browse the repository at this point in the history
…orn (#20375)

I feel so sigma!
![image](https://i.imgur.com/F3jQTaK.gif)
![image](https://i.imgur.com/WUKJSEO.gif)

---------

Co-authored-by: Gabby <[email protected]>
  • Loading branch information
FearTheGabby and Gabby authored Jan 19, 2025
1 parent eebc1fb commit cb109da
Show file tree
Hide file tree
Showing 19 changed files with 114 additions and 68 deletions.
2 changes: 1 addition & 1 deletion code/datums/trading/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@
/obj/item/clothing/head/beret/tajaran/nka/officer = TRADER_THIS_TYPE,
/obj/item/clothing/shoes/tajara/fancy = TRADER_THIS_TYPE,
/obj/item/device/versebook/nka = TRADER_THIS_TYPE,
/obj/item/pocketwatch/adhomai = TRADER_THIS_TYPE,
/obj/item/clothing/wrists/watch/pocketwatch/adhomai = TRADER_THIS_TYPE,
/obj/item/clothing/head/helmet/amohda = TRADER_THIS_TYPE,
/obj/item/clothing/suit/armor/amohda = TRADER_THIS_TYPE,
/obj/item/clothing/head/helmet/kettle = TRADER_THIS_TYPE,
Expand Down
6 changes: 3 additions & 3 deletions code/game/objects/items/tajara.dm
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
carrying primarily the essentials for survival and only a token amount of ammunition. Many detachments also make use of snow skiis in order to travel quickly in mountainous regions. \
They are well-known for their iconic thick light-colored cloaks which they wear while traversing the vast countrysides for warmth, as well as camouflage."

/obj/item/pocketwatch/adhomai
/obj/item/clothing/wrists/watch/pocketwatch/adhomai
name = "adhomian watch"
desc = "A watch made in the traditional adhomian style. It can be stored in a pocket or worn around the neck."
desc_extended = "Baltoris a fortress founded during the Gunpowder Age; it was the landing site of the royal armies during the Suns'wars. Baltor plays a strategic role in controlling the \
Expand All @@ -140,10 +140,10 @@
slot_flags = SLOT_MASK
var/static/months = list("Menshe-aysaif", "Sil'nryy-aysaif", "Menshe-rhazzimy", "Sil'nryy-rhazzimy")

/obj/item/pocketwatch/adhomai/get_mask_examine_text(mob/user)
/obj/item/clothing/wrists/watch/pocketwatch/adhomai/get_mask_examine_text(mob/user)
return "around [user.get_pronoun("his")] neck"

/obj/item/pocketwatch/adhomai/checktime(mob/user)
/obj/item/clothing/wrists/watch/pocketwatch/adhomai/checktime(mob/user)
set category = "Object"
set name = "Check Time"
set src in usr
Expand Down
49 changes: 0 additions & 49 deletions code/game/objects/structures/therapy.dm
Original file line number Diff line number Diff line change
@@ -1,52 +1,3 @@
/obj/item/pocketwatch
name = "pocketwatch"
desc = "A watch that goes in your pocket."
desc_extended = "Because your wrists have better things to do."
icon = 'icons/obj/items.dmi'
icon_state = "pocketwatch"
drop_sound = 'sound/items/drop/accessory.ogg'
pickup_sound = 'sound/items/pickup/accessory.ogg'
matter = list(MATERIAL_GLASS = 150, MATERIAL_GOLD = 50)
recyclable = TRUE
w_class = WEIGHT_CLASS_TINY
var/closed = FALSE

/obj/item/pocketwatch/AltClick(mob/user)
if(!closed)
icon_state = "[initial(icon_state)]_closed"
to_chat(user, "You clasp the [name] shut.")
playsound(src.loc, 'sound/weapons/blade_close.ogg', 50, 1)
else
icon_state = "[initial(icon_state)]"
to_chat(user, "You flip the [name] open.")
playsound(src.loc, 'sound/weapons/blade_open.ogg', 50, 1)
closed = !closed

/obj/item/pocketwatch/examine(mob/user, distance, is_adjacent, infix, suffix, show_extended)
. = ..()
if (distance <= 1)
checktime()

/obj/item/pocketwatch/verb/checktime(mob/user)
set category = "Object"
set name = "Check Time"
set src in usr

if(closed)
to_chat(usr, "You check your watch, realising it's closed.")
else
to_chat(usr, "You check your watch, glancing over at the watch face, reading the time to be '[worldtime2text()]'. Today's date is '[time2text(world.time, "Month DD")]. [GLOB.game_year]'.")

/obj/item/pocketwatch/verb/pointatwatch()
set category = "Object"
set name = "Point at watch"
set src in usr

if(closed)
usr.visible_message (SPAN_NOTICE("[usr] taps their foot on the floor, arrogantly pointing at the [src] in their hand with a look of derision in their eyes, not noticing it's closed."), SPAN_NOTICE("You point down at the [src], an arrogant look about your eyes."))
else
usr.visible_message (SPAN_NOTICE("[usr] taps their foot on the floor, arrogantly pointing at the [src] in their hand with a look of derision in their eyes."), SPAN_NOTICE("You point down at the [src], an arrogant look about your eyes."))

/obj/item/mesmetron
name = "mesmetron pocketwatch"
desc = "An elaborate pocketwatch, with a captivating gold etching and an enchanting face. . ."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
watchtype["holo watch"] = /obj/item/clothing/wrists/watch/holo
watchtype["leather watch"] = /obj/item/clothing/wrists/watch/leather
watchtype["spy watch"] = /obj/item/clothing/wrists/watch/spy
watchtype["pocketwatch"] = /obj/item/pocketwatch
watchtype["pocketwatch"] = /obj/item/clothing/wrists/watch/pocketwatch
gear_tweaks += new /datum/gear_tweak/path(watchtype)

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,15 +421,15 @@ ABSTRACT_TYPE(/datum/gear/shoes/tajara)
/datum/gear/adhomai_watch
display_name = "adhomian watch selection"
description = "A selection of Adhomian watches."
path = /obj/item/pocketwatch/adhomai
path = /obj/item/clothing/wrists/watch/pocketwatch/adhomai
sort_category = "Xenowear - Tajara"
whitelisted = list(SPECIES_TAJARA, SPECIES_TAJARA_ZHAN, SPECIES_TAJARA_MSAI)
flags = GEAR_HAS_DESC_SELECTION

/datum/gear/adhomai_watch/New()
..()
var/list/watch = list()
watch["adhomian pocket watch"] = /obj/item/pocketwatch/adhomai
watch["adhomian pocket watch"] = /obj/item/clothing/wrists/watch/pocketwatch/adhomai
watch["male adhomian wrist watch"] = /obj/item/clothing/wrists/watch/tajara
watch["female adhomian wrist watch"] = /obj/item/clothing/wrists/watch/tajara/female
gear_tweaks += new /datum/gear_tweak/path(watch)
Expand Down
36 changes: 36 additions & 0 deletions code/modules/clothing/wrists/watches.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,47 @@
/obj/item/clothing/wrists/watch/spy/checktime()
to_chat(usr, "You check your watch. Unfortunately for you, it's not a real watch, dork.")

/obj/item/clothing/wrists/watch/pocketwatch
name = "pocketwatch"
desc = "A watch that goes in your pocket."
desc_extended = "Because your wrists have better things to do. Can go on your belt, suit storage, or on your wrist to create different appearances."
icon_state = "pocketwatch"
item_state = "pocketwatch"
slot_flags = SLOT_WRISTS | SLOT_BELT | SLOT_S_STORE
var/closed = FALSE

/obj/item/clothing/wrists/watch/pocketwatch/AltClick(mob/user)
if(!closed)
icon_state = "[initial(icon_state)]_closed"
user.visible_message(SPAN_NOTICE("[user] clasps \the [name] shut."), SPAN_NOTICE("You clasp \the [name] shut."))
playsound(src.loc, 'sound/weapons/blade_close.ogg', 50, 1)
else
icon_state = "[initial(icon_state)]"
user.visible_message(SPAN_NOTICE("[user] flips \the [name] open."), SPAN_NOTICE("You flip \the [name] open."))
playsound(src.loc, 'sound/weapons/blade_open.ogg', 50, 1)
closed = !closed

/obj/item/clothing/wrists/watch/pocketwatch/get_wrist_examine_text(mob/user)
var/mob/living/carbon/human/H = user
return "in [user.get_pronoun("his")] pocket[H.pants ? ", the chain connected to [user.get_pronoun("his")] [H.pants.name]'s belt loop" : ""]"

/obj/item/clothing/wrists/watch/examine(mob/user, distance, is_adjacent, infix, suffix, show_extended)
. = ..()
if (distance <= 1)
checktime()

/obj/item/clothing/wrists/watch/pocketwatch/checktime(mob/user)
if(closed)
to_chat(usr, "You check your watch, realising it's closed.")
else
to_chat(usr, "You check your watch, glancing over at the watch face, reading the time to be '[worldtime2text()]'. Today's date is '[time2text(world.time, "Month DD")]. [GLOB.game_year]'.")

/obj/item/clothing/wrists/watch/pocketwatch/pointatwatch()
if(closed)
usr.visible_message(SPAN_NOTICE("[usr] taps their foot on the floor, arrogantly pointing at the [src] in their hand with a look of derision in their eyes, not noticing it's closed."), SPAN_NOTICE("You point down at the [src], an arrogant look about your eyes."))
else
usr.visible_message(SPAN_NOTICE("[usr] taps their foot on the floor, arrogantly pointing at the [src] in their hand with a look of derision in their eyes."), SPAN_NOTICE("You point down at the [src], an arrogant look about your eyes."))

/obj/item/clothing/wrists/watch/verb/checktime()
set category = "Object"
set name = "Check Time"
Expand Down
59 changes: 59 additions & 0 deletions html/changelogs/SimpleMaroon-pocketwatch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# - (fixes bugs)
# wip
# - (work in progress)
# qol
# - (quality of life)
# soundadd
# - (adds a sound)
# sounddel
# - (removes a sound)
# rscadd
# - (adds a feature)
# rscdel
# - (removes a feature)
# imageadd
# - (adds an image or sprite)
# imagedel
# - (removes an image or sprite)
# spellcheck
# - (fixes spelling or grammar)
# experiment
# - (experimental change)
# balance
# - (balance changes)
# code_imp
# - (misc internal code change)
# refactor
# - (refactors code)
# config
# - (makes a change to the config files)
# admin
# - (makes changes to administrator tools)
# server
# - (miscellaneous changes to server)
#################################

# Your name.
author: SimpleMaroon

# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True

# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit.
# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog.
changes:
- imageadd: "Added a variety of different sprites to the pocketwatch, depending on if you wear it on your wrist, your belt, or your suit storage."
- code_imp: "Changed the pocketwatch to be a subtype of other watches instead of its own thing."
Binary file modified icons/obj/item/clothing/wrists/wrist.dmi
Binary file not shown.
Binary file modified icons/obj/items.dmi
Binary file not shown.
2 changes: 1 addition & 1 deletion maps/away/scenarios/cryo_outpost/cryo_outpost_submaps.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@
"vC" = (
/obj/structure/closet/cabinet,
/obj/outfit/admin/generic,
/obj/item/pocketwatch,
/obj/item/clothing/wrists/watch/pocketwatch,
/obj/random/loot,
/turf/simulated/floor/wood/bamboo,
/area/template_noop)
Expand Down
4 changes: 2 additions & 2 deletions maps/away/ships/nka/nka_merchant/nka_merchant.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -988,8 +988,8 @@
/obj/structure/closet/crate,
/obj/item/deck/tarot/adhomai,
/obj/item/deck/tarot/adhomai,
/obj/item/pocketwatch/adhomai,
/obj/item/pocketwatch/adhomai,
/obj/item/clothing/wrists/watch/pocketwatch/adhomai,
/obj/item/clothing/wrists/watch/pocketwatch/adhomai,
/obj/effect/floor_decal/industrial/outline/yellow,
/turf/simulated/floor{
temperature = 278.15
Expand Down
4 changes: 2 additions & 2 deletions maps/away/ships/tajara/taj_smuggler/tajaran_smuggler.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -4202,8 +4202,8 @@
/obj/structure/closet/crate,
/obj/item/deck/tarot/adhomai,
/obj/item/deck/tarot/adhomai,
/obj/item/pocketwatch/adhomai,
/obj/item/pocketwatch/adhomai,
/obj/item/clothing/wrists/watch/pocketwatch/adhomai,
/obj/item/clothing/wrists/watch/pocketwatch/adhomai,
/obj/effect/floor_decal/industrial/outline/yellow,
/turf/simulated/floor{
temperature = 278.15
Expand Down
2 changes: 1 addition & 1 deletion maps/away/ships/yacht_civ/yacht_civ.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@
/obj/item/coin/gold{
pixel_x = 7
},
/obj/item/pocketwatch{
/obj/item/clothing/wrists/watch/pocketwatch{
pixel_x = -4;
pixel_y = 6
},
Expand Down
2 changes: 1 addition & 1 deletion maps/random_ruins/exoplanets/adhomai/adhomai_bar.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
shoes = /obj/item/clothing/shoes/workboots/tajara/adhomian_boots
back = /obj/item/storage/backpack/satchel/leather
suit = /obj/item/clothing/suit/storage/hooded/tajaran/maroon
l_pocket = /obj/item/pocketwatch/adhomai
l_pocket = /obj/item/clothing/wrists/watch/pocketwatch/adhomai
l_ear = null

id = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/area/adhomai_raskariim_hideout)
"ch" = (
/obj/structure/table/wood,
/obj/item/pocketwatch/adhomai,
/obj/item/clothing/wrists/watch/pocketwatch/adhomai,
/turf/simulated/floor/exoplanet/wood,
/area/adhomai_raskariim_hideout)
"cq" = (
Expand Down
2 changes: 1 addition & 1 deletion maps/random_ruins/exoplanets/adhomai/adhomai_village.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@
/area/adhomai_village)
"LL" = (
/obj/structure/table/wood,
/obj/item/pocketwatch/adhomai,
/obj/item/clothing/wrists/watch/pocketwatch/adhomai,
/turf/simulated/floor/exoplanet/wood,
/area/adhomai_village)
"Mv" = (
Expand Down
2 changes: 1 addition & 1 deletion maps/random_ruins/exoplanets/adhomai/ala_base.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@
/obj/item/storage/box/dpra_manifesto,
/obj/item/storage/field_ration/dpra,
/obj/item/flame/lighter/adhomai,
/obj/item/pocketwatch/adhomai,
/obj/item/clothing/wrists/watch/pocketwatch/adhomai,
/obj/item/clothing/under/tajaran/ala/black/officer,
/obj/item/clothing/head/tajaran/ala_officer,
/turf/simulated/floor/exoplanet/wood,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
/turf/unsimulated/mineral/asteroid,
/area/template_noop)
"rK" = (
/obj/item/pocketwatch,
/obj/item/clothing/wrists/watch/pocketwatch,
/turf/template_noop,
/area/template_noop)
"rY" = (
Expand Down
2 changes: 1 addition & 1 deletion maps/random_ruins/exoplanets/biesel/pra_camp_site.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@
/area/template_noop)
"M" = (
/obj/structure/table/standard,
/obj/item/pocketwatch/adhomai,
/obj/item/clothing/wrists/watch/pocketwatch/adhomai,
/turf/simulated/floor/exoplanet/dirt_konyang,
/area/template_noop)
"O" = (
Expand Down

0 comments on commit cb109da

Please sign in to comment.