Business Cards (#11504)

This commit is contained in:
Geeves
2021-03-26 00:55:12 +02:00
committed by GitHub
parent 7c6b389d10
commit 492dc6d2ce
7 changed files with 89 additions and 6 deletions
+1
View File
@@ -989,6 +989,7 @@
#include "code\game\objects\items\weapons\storage\bible.dm"
#include "code\game\objects\items\weapons\storage\boxes.dm"
#include "code\game\objects\items\weapons\storage\briefcase.dm"
#include "code\game\objects\items\weapons\storage\business_card.dm"
#include "code\game\objects\items\weapons\storage\cell_backpack.dm"
#include "code\game\objects\items\weapons\storage\fancy.dm"
#include "code\game\objects\items\weapons\storage\field_ration.dm"
@@ -0,0 +1,36 @@
/obj/item/storage/business_card_holder
name = "business card holder"
desc = "A sleek holster for your business card. You wouldn't want it getting damaged in any way."
storage_slots = 5
icon = 'icons/obj/office_supplies.dmi'
icon_state = "holder"
w_class = ITEMSIZE_TINY
max_w_class = ITEMSIZE_TINY
can_hold = list(/obj/item/paper/business_card)
/obj/item/storage/business_card_holder/update_icon()
cut_overlays()
if(length(contents))
var/mutable_appearance/card_overlay = mutable_appearance(icon, "holder-overlay")
card_overlay.appearance_flags = RESET_COLOR
add_overlay(card_overlay)
/obj/item/paper/business_card
name = "business card"
desc = "A small slip of paper, capable of elevating your status on the social hierachy between you and your co-workers, provided you picked the right font."
icon = 'icons/obj/office_supplies.dmi'
icon_state = "generic_card1"
/obj/item/paper/business_card/attack_self(mob/living/user)
user.examinate(src)
/obj/item/paper/business_card/alt
icon_state = "generic_card2"
/obj/item/paper/business_card/rounded
icon_state = "rounded_corners"
/obj/item/paper/business_card/glass
name = "glass business card"
desc = "A fancy variant of the classic business card. This one immediately indicates that you're serious about your business, but the contents of the card will seal the deal."
icon_state = "glass_card"
@@ -35,7 +35,9 @@
/obj/item/stamp,
/obj/item/device/paicard,
/obj/item/device/encryptionkey,
/obj/item/fluff)
/obj/item/fluff,
/obj/item/storage/business_card_holder
)
slot_flags = SLOT_ID
var/obj/item/card/id/front_id = null
@@ -206,3 +206,20 @@ var/datum/gear_tweak/custom_desc/gear_tweak_free_desc = new()
if(!metadata)
return I.desc
I.desc = metadata
/*
Paper Data
*/
/datum/gear_tweak/paper_data/get_contents(var/metadata)
return "Written Content: [length(metadata) > 15 ? "[copytext_char(metadata, 1, 15)]..." : metadata]"
/datum/gear_tweak/paper_data/get_default()
return ""
/datum/gear_tweak/paper_data/get_metadata(var/user, var/metadata)
return sanitize(input(user, "Choose a pre-written message on the item.", "Pre-written Message", metadata) as message|null, MAX_PAPER_MESSAGE_LEN, extra = 0)
/datum/gear_tweak/paper_data/tweak_item(var/obj/item/paper/P, var/metadata)
if(!metadata || !istype(P))
return
P.info = P.parsepencode(metadata)
@@ -50,6 +50,7 @@
fountainpens["silver fountain pen"] = /obj/item/pen/fountain/silver
fountainpens["white fountain pen"] = /obj/item/pen/fountain/white
gear_tweaks += new/datum/gear_tweak/path(fountainpens)
/datum/gear/utility/paicard
display_name = "personal AI device"
path = /obj/item/device/paicard
@@ -73,11 +74,11 @@
/datum/gear/utility/recorder
display_name = "universal recorder"
path = /obj/item/device/taperecorder
path = /obj/item/device/taperecorder
/datum/gear/utility/camera
display_name = "camera"
path = /obj/item/device/camera
path = /obj/item/device/camera
/datum/gear/utility/himeo_kit
display_name = "himean voidsuit kit"
@@ -85,10 +86,30 @@
allowed_roles = list("Cargo Technician", "Shaft Miner", "Quartermaster", "Head of Personnel", "Station Engineer", "Atmospheric Technician", "Chief Engineer", "Engineering Apprentice")
/datum/gear/utility/wheelchair/color
display_name = "wheelchair"
path = /obj/item/wheelchair
cost = 4
display_name = "wheelchair"
path = /obj/item/wheelchair
cost = 4
/datum/gear/utility/wheelchair/color/New()
..()
gear_tweaks += gear_tweak_free_color_choice
/datum/gear/utility/business_card_holder
display_name = "business card holder"
path = /obj/item/storage/business_card_holder
flags = GEAR_HAS_NAME_SELECTION | GEAR_HAS_DESC_SELECTION | GEAR_HAS_COLOR_SELECTION
/datum/gear/utility/business_card
display_name = "business card"
path = /obj/item/paper/business_card
flags = 0
/datum/gear/utility/business_card/New()
..()
var/list/cards = list()
cards["business card, divided"] = /obj/item/paper/business_card
cards["business card, plain"] = /obj/item/paper/business_card/alt
cards["business card, rounded"] = /obj/item/paper/business_card/rounded
cards["business card, glass"] = /obj/item/paper/business_card/glass
gear_tweaks += new /datum/gear_tweak/path(cards)
gear_tweaks += new /datum/gear_tweak/paper_data()
@@ -0,0 +1,6 @@
author: Geeves
delete-after: True
changes:
- rscadd: "Added business cards to the utility loadout."
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB