Adds the medal printer (#25153)

* Adds the medal printer: An autolathe subtype for medals.

* Rename medals

* Changes recipes. Corrects some errors.

* Adds access and emagging

* Minor fix

* Fixes some stuff

* Fixes stuff

* Stuff
This commit is contained in:
Goldsteel
2019-11-30 03:33:55 +00:00
committed by Kurfursten
parent 7ef8e0164f
commit 973cf9be51
8 changed files with 311 additions and 1 deletions

View File

@@ -1408,6 +1408,17 @@ obj/item/weapon/circuitboard/rdserver
/obj/item/weapon/stock_parts/micro_laser = 3,
/obj/item/weapon/stock_parts/console_screen = 1)
/obj/item/weapon/circuitboard/medal_printer
name = "Circuit board (Medal Printer)"
desc = "A circuit board for the medal printer."
board_type = MACHINE
origin_tech = Tc_PROGRAMMING + "=4;" + Tc_MATERIALS + "=4;" + Tc_ENGINEERING + "=4"
build_path = /obj/machinery/r_n_d/fabricator/mechanic_fab/autolathe/medal_printer
req_components = list(
/obj/item/weapon/stock_parts/matter_bin = 1,
/obj/item/weapon/stock_parts/manipulator = 2,
/obj/item/weapon/stock_parts/micro_laser = 1,
/obj/item/weapon/stock_parts/console_screen = 1)
/*
* Fishtanks

View File

@@ -0,0 +1,64 @@
/obj/machinery/r_n_d/fabricator/mechanic_fab/autolathe/medal_printer
name = "medal printer"
desc = "Prints a variety of medal accessories."
icon = 'icons/obj/machines/mechanic.dmi'
icon_state = "medalprinter"
icon_state_open = "medalprinter_t"
nano_file = "medalprinter.tmpl"
machine_flags = SCREWTOGGLE | CROWDESTROY | WRENCHMOVE | FIXED2WORK | EMAGGABLE
research_flags = NANOTOUCH | TAKESMATIN | HASOUTPUT | IGNORE_CHEMS | HASMAT_OVER | ACCESS_EMAG
req_access = list(access_hop)
allowed_materials = list(
MAT_IRON,
MAT_GOLD,
MAT_SILVER,
MAT_PLASMA
)
part_sets = list(
"Standard_Medals"=list(
new /obj/item/clothing/accessory/medal/participation(), \
new /obj/item/clothing/accessory/medal/silver(), \
new /obj/item/clothing/accessory/medal/gold(), \
),
"Unique_Medals"=list(
new /obj/item/clothing/accessory/medal/conduct(), \
new /obj/item/clothing/accessory/medal/bronze_heart(), \
new /obj/item/clothing/accessory/medal/silver/valor(), \
new /obj/item/clothing/accessory/medal/silver/security(), \
new /obj/item/clothing/accessory/medal/gold/captain(), \
new /obj/item/clothing/accessory/medal/gold/heroism(), \
new /obj/item/clothing/accessory/medal/nobel_science(), \
))
/obj/machinery/r_n_d/fabricator/mechanic_fab/autolathe/medal_printer/New()
. = ..()
component_parts = newlist(
/obj/item/weapon/circuitboard/medal_printer,
/obj/item/weapon/stock_parts/matter_bin,
/obj/item/weapon/stock_parts/manipulator,
/obj/item/weapon/stock_parts/manipulator,
/obj/item/weapon/stock_parts/micro_laser,
/obj/item/weapon/stock_parts/console_screen
)
RefreshParts()
/obj/machinery/r_n_d/fabricator/mechanic_fab/autolathe/medal_printer/attack_hand(mob/user as mob)
if(issilicon(user))
return
if(!allowed(usr) && !emagged)
to_chat(usr, "<span class='warning'>Access denied.</span>")
return
..()
/obj/machinery/r_n_d/fabricator/mechanic_fab/autolathe/medal_printer/attackby(var/obj/item/O, var/mob/user)
if(issilicon(user))
return
if(istype(O, /obj/item/clothing/accessory/medal) && ((allowed(user) || emagged)))
O.name = sanitize((input(user, "What would you like to label \the [O]?", "Medal Labelling", null) as text), 1, MAX_NAME_LEN)
if((loc == user && user.isUnconscious()))
O.name = "medal"
add_fingerprint(user)
..()

View File

@@ -53,6 +53,7 @@ The required techs are the following:
#define FLATPACKER 64 //This design creates a machine, not an item.
#define GENFAB 128 //Generic item.
#define AMMOLATHE 256 //Adding this for ammolathes but its pretty much the same as PROTOLATHE.
#define MEDALPRINTER 512 //Outputs misc items from metal, silver, gold and plasma. Similar to the protolathe.
//Note: More then one of these can be added to a design but imprinter and lathe designs are incompatable.
/datum/design //Datum for object designs, used in construction

View File

@@ -97,6 +97,16 @@
category = "Machine Boards"
build_path = /obj/item/weapon/circuitboard/coin_press
/datum/design/medal_printer
name = "Circuit Design (Medal Printer)"
desc = "Allows for the construction of circuit boards used to build a medal printer."
id = "medal_printer"
req_tech = list(Tc_PROGRAMMING = 4, Tc_MATERIALS = 4, Tc_ENGINEERING = 4)
build_type = IMPRINTER
materials = list(MAT_GLASS = 2000, MAT_GOLD = 1000, MAT_SILVER = 1000, SACID = 20)
category = "Machine Boards"
build_path = /obj/item/weapon/circuitboard/medal_printer
/datum/design/vendomat
name = "Circuit Design (Vending Machine)"
desc = "Allows for the construction of circuit boards used to build a vending machines."
@@ -170,4 +180,3 @@
desc = "Allows for the construction of circuit boards used to build a booze dispenser."
id = "booze_dispenser"
build_path = /obj/item/weapon/circuitboard/chem_dispenser/booze_dispenser

View File

@@ -0,0 +1,89 @@
/datum/design/medal/conduct
name = "distinguished conduct medal"
desc = "A bronze medal awarded for distinguished conduct. Whilst a great honor, this is most basic award given by Nanotrasen. It is often awarded by a captain to a member of his crew."
id = "medal_conduct"
build_type = MEDALPRINTER
materials = list(MAT_IRON = 2000)
category = "Misc"
build_path = /obj/item/clothing/accessory/medal/conduct
/datum/design/medal/participation
name = "super participation medal"
desc = "On closer inspection, this one is dated 2551..."
id = "medal_participation"
build_type = MEDALPRINTER
materials = list(MAT_IRON = 2000)
category = "Misc"
build_path = /obj/item/clothing/accessory/medal/participation
/datum/design/medal/bronze_heart
name = "bronze heart medal"
desc = "A bronze heart-shaped medal awarded for sacrifice. It is often awarded posthumously or for severe injury in the line of duty."
id = "medal_bronze_heart"
build_type = MEDALPRINTER
materials = list(MAT_IRON = 2000)
category = "Misc"
build_path = /obj/item/clothing/accessory/medal/bronze_heart
/datum/design/medal/nobel_science
name = "\improper Nobel sciences award"
desc = "A bronze medal which represents significant contributions to the field of science or engineering."
id = "medal_nobel_science"
build_type = MEDALPRINTER
materials = list(MAT_IRON = 2000, MAT_PLASMA = 2000)
category = "Misc"
build_path = /obj/item/clothing/accessory/medal/nobel_science
/datum/design/medal/silver
name = "silver medal"
desc = "A silver medal."
id = "medal_silver"
build_type = MEDALPRINTER
materials = list(MAT_IRON = 2000, MAT_SILVER = 2000)
category = "Misc"
build_path = /obj/item/clothing/accessory/medal/silver
/datum/design/medal/valor
name = "medal of valor"
desc = "A silver medal awarded for acts of exceptional valor."
id = "medal_valor"
build_type = MEDALPRINTER
materials = list(MAT_IRON = 2000, MAT_SILVER = 2000)
category = "Misc"
build_path = /obj/item/clothing/accessory/medal/silver/valor
/datum/design/medal/silver/security
name = "robust security award"
desc = "An award for distinguished combat and sacrifice in defence of Nanotrasen's commercial interests. Often awarded to security staff."
id = "medal_security"
build_type = MEDALPRINTER
materials = list(MAT_IRON = 2000, MAT_SILVER = 2000)
category = "Misc"
build_path = /obj/item/clothing/accessory/medal/silver/security
/datum/design/medal/gold
name = "gold medal"
desc = "A prestigious golden medal."
id = "medal_gold"
build_type = MEDALPRINTER
materials = list(MAT_IRON = 2000, MAT_GOLD = 2000)
category = "Misc"
build_path = /obj/item/clothing/accessory/medal/gold
/datum/design/medal/gold/captain
name = "medal of captaincy"
desc = "A golden medal awarded exclusively to those promoted to the rank of captain. It signifies the codified responsibilities of a captain to Nanotrasen, and their undisputable authority over their crew."
id = "medal_captain"
build_type = MEDALPRINTER
materials = list(MAT_IRON = 2000, MAT_GOLD = 2000)
category = "Misc"
build_path = /obj/item/clothing/accessory/medal/gold/captain
/datum/design/medal/gold/heroism
name = "medal of exceptional heroism"
desc = "An extremely rare golden medal awarded only by CentComm. To recieve such a medal is the highest honor and as such, very few exist. This medal is almost never awarded to anybody but commanders."
id = "medal_hero"
build_type = MEDALPRINTER
materials = list(MAT_IRON = 2000, MAT_GOLD = 2000)
category = "Misc"
build_path = /obj/item/clothing/accessory/medal/gold/heroism

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

@@ -0,0 +1,134 @@
<!--
Title: Medal Printer UI
Used In File(s): \code\game\machinery\medal_printer.dm
-->
<style type='text/css'>
#costsmall
{
width:250px;
float:left;
}
#misc
{
width:350px;
float:left;
}
</style>
<div style="float: right; width: 75%;">
<div class="itemLabel">
Queue
</div>
<div class="itemContentWide" style="width: 95%;">
<div class="statusDisplay">
<div class="line" style="overflow-y: auto; overflow-x: hidden; scrollbar-base-color: #336699; scrollbar-arrow-color: #ffffff; height: 165px">
{{for data.queue}}
<div class="statusValue">
{{:helper.link(value.name, 'gear', null, null, null, 'misc')}}
{{:helper.link("Remove", 'circle-arrow-s', value.commands, null, 'fixedLeftWide')}}
</div>
{{empty}}
<i>No parts in memory</i>
{{/for}}
</div>
<br>
<div class="line">
{{:helper.link('Process Queue', 'circle-arrow-s', {'process_queue':null}, null, null, 'misc')}}
{{:helper.link('Clear Queue', 'circle-arrow-s', {'clear_queue':null}, null, 'fixedLeft')}}
</div>
</div>
</div>
</div>
<div style="float: left; width: 25%;">
<div class="itemLabel">
Categories
</div>
<div class="line">
{{:helper.link('Standard Medals', 'gear',{'screen':11},(data.screen==11)?'linkOn':'', 'fixedLeftWide')}}
</div>
<div class="line">
{{:helper.link('Unique Medals', 'gear',{'screen':12},(data.screen==12)?'linkOn':'', 'fixedLeftWide')}}
</div>
<div class="itemLabel">
Other
</div>
<div class="line">
{{:helper.link('Material Storage', 'gear',{'screen':01},(data.screen==01)?'linkOn':'', 'fixedLeftWide')}}
</div>
</div>
{{if data.screen == 01}}
<div class="item">
<div class="itemLabel">
Material Storage
</div>
</div>
<div class="itemContentWide">
<div class="statusDisplay">
<div class="line">
{{for data.materials}}
<div class="line">
<div class="statusValue">
{{:helper.link(value.name, null, null, null, 'fixedLeft')}}
{{:helper.link(value.storage, null, null, null, 'fixedLeft')}}
{{:helper.link('Eject', 'circle-arrow-s', value.commands, null, 'fixedLeft')}}
</div>
</div>
{{empty}}
<i>No information is available</i>
{{/for}}
</div>
</div>
</div>
{{/if}}
{{if data.screen == 11}}
<div class="item">
<div class="itemLabel">
Standard Medals
</div>
<div class="itemContentWide" style="width:100%;">
<div class="statusDisplay">
<div class="line">
{{for data.parts.Standard_Medals}}
<div class="line">
<div class="statusValue">
{{:helper.link(value.name, 'gear', value.command2, null, null, 'misc')}}
{{:helper.link(value.cost, null, null, null, null, 'costsmall')}}
{{:helper.link('Queue', 'gear', value.command1, null, 'fixedLeft')}}
</div>
</div>
{{empty}}
<i>No parts in memory</i>
{{/for}}
</div>
</div>
</div>
</div>
{{/if}}
{{if data.screen == 12}}
<div class="item">
<div class="itemLabel">
Unique Medals
</div>
<div class="itemContentWide" style="width:100%;">
<div class="statusDisplay">
<div class="line">
{{for data.parts.Unique_Medals}}
<div class="line">
<div class="statusValue">
{{:helper.link(value.name, 'gear', value.command2, null, null, 'misc')}}
{{:helper.link(value.cost, null, null, null, null, 'costsmall')}}
{{:helper.link('Queue', 'gear', value.command1, null, 'fixedLeft')}}
</div>
</div>
{{empty}}
<i>No parts in memory</i>
{{/for}}
</div>
</div>
</div>
</div>
{{/if}}

View File

@@ -618,6 +618,7 @@
#include "code\game\machinery\magnet.dm"
#include "code\game\machinery\martian_printer.dm"
#include "code\game\machinery\mass_driver.dm"
#include "code\game\machinery\medal_printer.dm"
#include "code\game\machinery\metaldetector.dm"
#include "code\game\machinery\mommi_spawner.dm"
#include "code\game\machinery\navbeacon.dm"
@@ -2190,6 +2191,7 @@
#include "code\modules\research\designs\borg_upgrades.dm"
#include "code\modules\research\designs\data.dm"
#include "code\modules\research\designs\engineering.dm"
#include "code\modules\research\designs\medals.dm"
#include "code\modules\research\designs\medical.dm"
#include "code\modules\research\designs\mining.dm"
#include "code\modules\research\designs\misc.dm"