mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
Adds a way to set the tag of loadout collars as part of the loadout
This commit is contained in:
1
code/_helpers/_global_objects_vr.dm
Normal file
1
code/_helpers/_global_objects_vr.dm
Normal file
@@ -0,0 +1 @@
|
||||
var/datum/gear_tweak/collar_tag/gear_tweak_collar_tag = new()
|
||||
@@ -0,0 +1,14 @@
|
||||
/datum/gear_tweak/collar_tag/get_contents(var/metadata)
|
||||
return "Tag: [metadata]"
|
||||
|
||||
/datum/gear_tweak/collar_tag/get_default()
|
||||
return ""
|
||||
|
||||
/datum/gear_tweak/collar_tag/get_metadata(var/user, var/metadata)
|
||||
return sanitize( input(user, "Choose the tag text", "Character Preference", metadata) as text , MAX_NAME_LEN )
|
||||
|
||||
/datum/gear_tweak/collar_tag/tweak_item(var/obj/item/clothing/accessory/collar/C, var/metadata)
|
||||
if(metadata == "")
|
||||
return
|
||||
else
|
||||
C.initialize_tag(metadata)
|
||||
@@ -6,6 +6,10 @@
|
||||
slot = slot_tie
|
||||
sort_category = "Accessories"
|
||||
|
||||
/datum/gear/collar/New()
|
||||
..()
|
||||
gear_tweaks = list(gear_tweak_collar_tag)
|
||||
|
||||
/datum/gear/collar/golden
|
||||
display_name = "collar, golden"
|
||||
path = /obj/item/clothing/accessory/collar/gold
|
||||
|
||||
@@ -211,13 +211,17 @@
|
||||
desc = initial(desc)
|
||||
else
|
||||
to_chat(user,"<span class='notice'>You set the [name]'s tag to '[str]'.</span>")
|
||||
name = initial(name) + " ([str])"
|
||||
if(istype(src,/obj/item/clothing/accessory/collar/holo))
|
||||
desc = initial(desc) + " The tag says \"[str]\"."
|
||||
else
|
||||
desc = initial(desc) + " \"[str]\" has been engraved on the tag."
|
||||
initialize_tag(str)
|
||||
|
||||
/obj/item/clothing/accessory/collar/proc/initialize_tag(var/tag)
|
||||
name = initial(name) + " ([tag])"
|
||||
desc = initial(desc) + " \"[tag]\" has been engraved on the tag."
|
||||
writtenon = 1
|
||||
|
||||
/obj/item/clothing/accessory/collar/holo/initialize_tag(var/tag)
|
||||
..()
|
||||
desc = initial(desc) + " The tag says \"[tag]\"."
|
||||
|
||||
/obj/item/clothing/accessory/collar/attackby(obj/item/I, mob/user)
|
||||
if(istype(src,/obj/item/clothing/accessory/collar/holo))
|
||||
return
|
||||
|
||||
@@ -91,6 +91,7 @@
|
||||
#include "code\_global_vars\sensitive.dm"
|
||||
#include "code\_global_vars\lists\mapping.dm"
|
||||
#include "code\_helpers\_global_objects.dm"
|
||||
#include "code\_helpers\_global_objects_vr.dm"
|
||||
#include "code\_helpers\_lists.dm"
|
||||
#include "code\_helpers\atmospherics.dm"
|
||||
#include "code\_helpers\atom_movables.dm"
|
||||
@@ -1586,6 +1587,7 @@
|
||||
#include "code\modules\client\preference_setup\global\05_media.dm"
|
||||
#include "code\modules\client\preference_setup\global\setting_datums.dm"
|
||||
#include "code\modules\client\preference_setup\loadout\gear_tweaks.dm"
|
||||
#include "code\modules\client\preference_setup\loadout\gear_tweaks_vr.dm"
|
||||
#include "code\modules\client\preference_setup\loadout\loadout.dm"
|
||||
#include "code\modules\client\preference_setup\loadout\loadout_accessories.dm"
|
||||
#include "code\modules\client\preference_setup\loadout\loadout_accessories_vr.dm"
|
||||
|
||||
Reference in New Issue
Block a user