diff --git a/citadel.dme b/citadel.dme index a0505738a3ce..c6a3112e1514 100644 --- a/citadel.dme +++ b/citadel.dme @@ -49,6 +49,7 @@ #include "code\__DEFINES\holidays.dm" #include "code\__DEFINES\holomap.dm" #include "code\__DEFINES\icon_smoothing.dm" +#include "code\__DEFINES\ingredients.dm" #include "code\__DEFINES\instruments.dm" #include "code\__DEFINES\inventory_storage.dm" #include "code\__DEFINES\is_helpers.dm" @@ -141,6 +142,7 @@ #include "code\__DEFINES\controllers\throwing.dm" #include "code\__DEFINES\controllers\ticker.dm" #include "code\__DEFINES\controllers\timer.dm" +#include "code\__DEFINES\datums\design.dm" #include "code\__DEFINES\dcs\flags.dm" #include "code\__DEFINES\dcs\helpers.dm" #include "code\__DEFINES\dcs\components\riding.dm" @@ -212,6 +214,8 @@ #include "code\__DEFINES\mapping\maps.dm" #include "code\__DEFINES\mapping\multiz.dm" #include "code\__DEFINES\mapping\system.dm" +#include "code\__DEFINES\materials\balancing.dm" +#include "code\__DEFINES\materials\misc.dm" #include "code\__DEFINES\mining\legacy.dm" #include "code\__DEFINES\misc\message_ranges.dm" #include "code\__DEFINES\mobs\actions.dm" @@ -332,6 +336,7 @@ #include "code\__HELPERS\verbs.dm" #include "code\__HELPERS\datastructs\armor.dm" #include "code\__HELPERS\datastructs\bodytypes.dm" +#include "code\__HELPERS\datastructs\ingredients.dm" #include "code\__HELPERS\files\client_io.dm" #include "code\__HELPERS\files\hashing.dm" #include "code\__HELPERS\files\paths.dm" @@ -546,6 +551,7 @@ #include "code\controllers\subsystem\playtime.dm" #include "code\controllers\subsystem\radiation.dm" #include "code\controllers\subsystem\repository.dm" +#include "code\controllers\subsystem\research.dm" #include "code\controllers\subsystem\server_maint.dm" #include "code\controllers\subsystem\shuttles.dm" #include "code\controllers\subsystem\sonar.dm" @@ -623,6 +629,7 @@ #include "code\datums\beam.dm" #include "code\datums\callback.dm" #include "code\datums\category.dm" +#include "code\datums\changelog.dm" #include "code\datums\character_profile.dm" #include "code\datums\computerfiles.dm" #include "code\datums\datacore.dm" @@ -632,6 +639,7 @@ #include "code\datums\ghost_query.dm" #include "code\datums\hierarchy.dm" #include "code\datums\is_abstract.dm" +#include "code\datums\material_container.dm" #include "code\datums\mind.dm" #include "code\datums\mixed.dm" #include "code\datums\mutable_appearance.dm" @@ -699,13 +707,6 @@ #include "code\datums\armor\station\medical.dm" #include "code\datums\armor\station\science.dm" #include "code\datums\armor\station\security.dm" -#include "code\datums\autolathe\arms.dm" -#include "code\datums\autolathe\autolathe.dm" -#include "code\datums\autolathe\devices.dm" -#include "code\datums\autolathe\engineering.dm" -#include "code\datums\autolathe\general.dm" -#include "code\datums\autolathe\medical.dm" -#include "code\datums\autolathe\tools.dm" #include "code\datums\browser\_browser.dm" #include "code\datums\browser\_common.dm" #include "code\datums\browser\_modal.dm" @@ -714,7 +715,6 @@ #include "code\datums\browser\color_matrix_picker.dm" #include "code\datums\browser\listpicker.dm" #include "code\datums\browser\preflikepicker.dm" -#include "code\datums\changelog\changelog.dm" #include "code\datums\components\_component.dm" #include "code\datums\components\anti_magic.dm" #include "code\datums\components\connect_loc_behalf.dm" @@ -749,6 +749,35 @@ #include "code\datums\components\riding\mob\robot.dm" #include "code\datums\components\riding\simple\_simple.dm" #include "code\datums\components\riding\vehicle\_vehicle.dm" +#include "code\datums\design\design.dm" +#include "code\datums\design\design_holder.dm" +#include "code\datums\design\designs\sheets.dm" +#include "code\datums\design\designs\ammo\_ammo.dm" +#include "code\datums\design\designs\ammo\lmg.dm" +#include "code\datums\design\designs\ammo\pistol.dm" +#include "code\datums\design\designs\ammo\revolver.dm" +#include "code\datums\design\designs\ammo\rife.dm" +#include "code\datums\design\designs\ammo\shotgun.dm" +#include "code\datums\design\designs\ammo\smg.dm" +#include "code\datums\design\designs\devices\assemblies.dm" +#include "code\datums\design\designs\devices\devices.dm" +#include "code\datums\design\designs\machines\assemblies.dm" +#include "code\datums\design\designs\machines\circuits.dm" +#include "code\datums\design\designs\machines\parts.dm" +#include "code\datums\design\designs\medical\_medical.dm" +#include "code\datums\design\designs\medical\chemistry.dm" +#include "code\datums\design\designs\medical\misc.dm" +#include "code\datums\design\designs\misc\_misc.dm" +#include "code\datums\design\designs\misc\drinking_glass.dm" +#include "code\datums\design\designs\tools\_tool.dm" +#include "code\datums\design\designs\tools\engineering.dm" +#include "code\datums\design\designs\tools\general.dm" +#include "code\datums\design\designs\tools\security.dm" +#include "code\datums\design\designs\tools\surgical.dm" +#include "code\datums\design\designs\weapons\_weapons.dm" +#include "code\datums\design\designs\weapons\knives.dm" +#include "code\datums\design\designs\weapons\melee.dm" +#include "code\datums\design\designs\weapons\misc.dm" #include "code\datums\elements\_element.dm" #include "code\datums\elements\conflict_checking.dm" #include "code\datums\elements\connect_loc.dm" @@ -848,7 +877,6 @@ #include "code\datums\wires\airlock.dm" #include "code\datums\wires\alarm.dm" #include "code\datums\wires\apc.dm" -#include "code\datums\wires\autolathe.dm" #include "code\datums\wires\breaker.dm" #include "code\datums\wires\camera.dm" #include "code\datums\wires\coinbank.dm" @@ -1128,7 +1156,6 @@ #include "code\game\machinery\air_alarm.dm" #include "code\game\machinery\atm_ret_field.dm" #include "code\game\machinery\atmo_control.dm" -#include "code\game\machinery\autolathe.dm" #include "code\game\machinery\beacon.dm" #include "code\game\machinery\biogenerator.dm" #include "code\game\machinery\bioprinter.dm" @@ -1166,7 +1193,6 @@ #include "code\game\machinery\nuclear_bomb.dm" #include "code\game\machinery\OpTable.dm" #include "code\game\machinery\oxygen_pump.dm" -#include "code\game\machinery\partslathe_vr.dm" #include "code\game\machinery\pda_multicaster.dm" #include "code\game\machinery\pointdefense.dm" #include "code\game\machinery\portable_turret.dm" @@ -1211,7 +1237,6 @@ #include "code\game\machinery\computer\computer.dm" #include "code\game\machinery\computer\crew.dm" #include "code\game\machinery\computer\guestpass.dm" -#include "code\game\machinery\computer\id_restorer_vr.dm" #include "code\game\machinery\computer\law.dm" #include "code\game\machinery\computer\medical.dm" #include "code\game\machinery\computer\message.dm" @@ -1267,6 +1292,8 @@ #include "code\game\machinery\embedded_controller\embedded_program_base.dm" #include "code\game\machinery\embedded_controller\mapping_helpers.dm" #include "code\game\machinery\embedded_controller\simple_docking_controller.dm" +#include "code\game\machinery\lathes\autolathe.dm" +#include "code\game\machinery\lathes\lathe.dm" #include "code\game\machinery\misc\bioscan_antenna.dm" #include "code\game\machinery\pipe\construction.dm" #include "code\game\machinery\pipe\pipe_dispenser.dm" @@ -1278,10 +1305,12 @@ #include "code\game\machinery\suit_storage\suit_storage_unit.dm" #include "code\game\machinery\telecomms\_telecomms.dm" #include "code\game\machinery\telecomms\allinone.dm" +#include "code\game\machinery\telecomms\blackbox.dm" #include "code\game\machinery\telecomms\broadcaster.dm" #include "code\game\machinery\telecomms\bus.dm" #include "code\game\machinery\telecomms\hub.dm" #include "code\game\machinery\telecomms\logbrowser.dm" +#include "code\game\machinery\telecomms\message_server.dm" #include "code\game\machinery\telecomms\presets.dm" #include "code\game\machinery\telecomms\processor.dm" #include "code\game\machinery\telecomms\receiver.dm" @@ -1599,6 +1628,16 @@ #include "code\game\objects\items\stacks\sheets\leather.dm" #include "code\game\objects\items\stacks\tiles\fifty_spawner_tiles.dm" #include "code\game\objects\items\stacks\tiles\tile_types.dm" +#include "code\game\objects\items\stock_parts\_stock_parts.dm" +#include "code\game\objects\items\stock_parts\capacitor.dm" +#include "code\game\objects\items\stock_parts\console_screen.dm" +#include "code\game\objects\items\stock_parts\manipulator.dm" +#include "code\game\objects\items\stock_parts\matter_bin.dm" +#include "code\game\objects\items\stock_parts\mechanical.dm" +#include "code\game\objects\items\stock_parts\micro_laser.dm" +#include "code\game\objects\items\stock_parts\part_replacer.dm" +#include "code\game\objects\items\stock_parts\scanning_module.dm" +#include "code\game\objects\items\stock_parts\subspace.dm" #include "code\game\objects\items\storage\_storage.dm" #include "code\game\objects\items\storage\backpack.dm" #include "code\game\objects\items\storage\bags.dm" @@ -2077,6 +2116,7 @@ #include "code\modules\asset_cache\assets\legacy_nanomaps.dm" #include "code\modules\asset_cache\assets\legacy_nanoui.dm" #include "code\modules\asset_cache\assets\legacy_vstation.dm" +#include "code\modules\asset_cache\assets\materials.dm" #include "code\modules\asset_cache\assets\moods.dm" #include "code\modules\asset_cache\assets\notes.dm" #include "code\modules\asset_cache\assets\orbit.dm" @@ -2086,7 +2126,6 @@ #include "code\modules\asset_cache\assets\pipes.dm" #include "code\modules\asset_cache\assets\radar.dm" #include "code\modules\asset_cache\assets\safe.dm" -#include "code\modules\asset_cache\assets\sheetmaterials.dm" #include "code\modules\asset_cache\assets\tgfont.dm" #include "code\modules\asset_cache\assets\tgui.dm" #include "code\modules\asset_cache\assets\vv.dm" @@ -3043,7 +3082,45 @@ #include "code\modules\materials\material_sheets.dm" #include "code\modules\materials\material_synth.dm" #include "code\modules\materials\definitions\special.dm" -#include "code\modules\materials\definitions\unsorted_materials.dm" +#include "code\modules\materials\definitions\admin\alienalloy.dm" +#include "code\modules\materials\definitions\crystals\diamond.dm" +#include "code\modules\materials\definitions\crystals\glass.dm" +#include "code\modules\materials\definitions\metals\brass.dm" +#include "code\modules\materials\definitions\metals\bronze.dm" +#include "code\modules\materials\definitions\metals\copper.dm" +#include "code\modules\materials\definitions\metals\durasteel.dm" +#include "code\modules\materials\definitions\metals\gold.dm" +#include "code\modules\materials\definitions\metals\hydrogens.dm" +#include "code\modules\materials\definitions\metals\iron.dm" +#include "code\modules\materials\definitions\metals\lead.dm" +#include "code\modules\materials\definitions\metals\osmium.dm" +#include "code\modules\materials\definitions\metals\plasteel.dm" +#include "code\modules\materials\definitions\metals\platinum.dm" +#include "code\modules\materials\definitions\metals\silver.dm" +#include "code\modules\materials\definitions\metals\steel.dm" +#include "code\modules\materials\definitions\metals\titanium.dm" +#include "code\modules\materials\definitions\metals\uranium.dm" +#include "code\modules\materials\definitions\misc\cloths.dm" +#include "code\modules\materials\definitions\misc\foam.dm" +#include "code\modules\materials\definitions\misc\paper.dm" +#include "code\modules\materials\definitions\misc\plastic.dm" +#include "code\modules\materials\definitions\misc\snow.dm" +#include "code\modules\materials\definitions\misc\wax.dm" +#include "code\modules\materials\definitions\organic\bone.dm" +#include "code\modules\materials\definitions\organic\cotton.dm" +#include "code\modules\materials\definitions\organic\diona.dm" +#include "code\modules\materials\definitions\organic\flesh.dm" +#include "code\modules\materials\definitions\organic\leather.dm" +#include "code\modules\materials\definitions\organic\resin.dm" +#include "code\modules\materials\definitions\organic\wood.dm" +#include "code\modules\materials\definitions\special\cult.dm" +#include "code\modules\materials\definitions\special\morphium.dm" +#include "code\modules\materials\definitions\special\phoron.dm" +#include "code\modules\materials\definitions\special\supermatter.dm" +#include "code\modules\materials\definitions\special\valhollide.dm" +#include "code\modules\materials\definitions\special\verdantium.dm" +#include "code\modules\materials\definitions\stones\marble.dm" +#include "code\modules\materials\definitions\stones\sandstone.dm" #include "code\modules\media\media_machinery.dm" #include "code\modules\media\media_player_html5.dm" #include "code\modules\media\media_player_vlc.dm" @@ -4159,22 +4236,8 @@ #include "code\modules\recycling\disposal-construction.dm" #include "code\modules\recycling\disposal.dm" #include "code\modules\recycling\sortingmachinery.dm" -#include "code\modules\research\circuitprinter.dm" -#include "code\modules\research\designs.dm" -#include "code\modules\research\destructive_analyzer.dm" -#include "code\modules\research\mechfab_designs.dm" -#include "code\modules\research\message_server.dm" -#include "code\modules\research\prosfab_designs.dm" -#include "code\modules\research\prosfab_designs_vr.dm" -#include "code\modules\research\protolathe.dm" -#include "code\modules\research\rd-readme.dm" -#include "code\modules\research\rdconsole.dm" -#include "code\modules\research\rdconsole_tgui.dm" -#include "code\modules\research\rdmachines.dm" +#include "code\modules\research\design.dm" #include "code\modules\research\research.dm" -#include "code\modules\research\rigs_vr.dm" -#include "code\modules\research\server.dm" -#include "code\modules\research\teleport_vr.dm" #include "code\modules\research\designs\ai_holders.dm" #include "code\modules\research\designs\bag_of_holding.dm" #include "code\modules\research\designs\beakers.dm" @@ -4183,8 +4246,8 @@ #include "code\modules\research\designs\engineering.dm" #include "code\modules\research\designs\HUDs.dm" #include "code\modules\research\designs\implants.dm" -#include "code\modules\research\designs\implants_vr.dm" #include "code\modules\research\designs\locator_devices.dm" +#include "code\modules\research\designs\mechfab_designs.dm" #include "code\modules\research\designs\medical.dm" #include "code\modules\research\designs\mining_toys.dm" #include "code\modules\research\designs\misc.dm" @@ -4192,9 +4255,12 @@ #include "code\modules\research\designs\pdas.dm" #include "code\modules\research\designs\power_cells.dm" #include "code\modules\research\designs\precursor.dm" +#include "code\modules\research\designs\prosfab_designs.dm" +#include "code\modules\research\designs\rigs_vr.dm" #include "code\modules\research\designs\stock_parts.dm" #include "code\modules\research\designs\subspace_parts.dm" #include "code\modules\research\designs\tech_disks.dm" +#include "code\modules\research\designs\teleport_vr.dm" #include "code\modules\research\designs\weapons.dm" #include "code\modules\research\designs\xenoarch_toys.dm" #include "code\modules\research\designs\xenobio_toys.dm" @@ -4210,6 +4276,13 @@ #include "code\modules\research\designs\circuits\machines\chemistry.dm" #include "code\modules\research\designs\circuits\machines\misc.dm" #include "code\modules\research\designs\circuits\machines\nanites.dm" +#include "code\modules\research\machinery\circuitprinter.dm" +#include "code\modules\research\machinery\destructive_analyzer.dm" +#include "code\modules\research\machinery\protolathe.dm" +#include "code\modules\research\machinery\rdconsole.dm" +#include "code\modules\research\machinery\rdconsole_tgui.dm" +#include "code\modules\research\machinery\rdmachines.dm" +#include "code\modules\research\machinery\server.dm" #include "code\modules\resleeving\circuitboards.dm" #include "code\modules\resleeving\computers.dm" #include "code\modules\resleeving\documents.dm" @@ -4521,6 +4594,7 @@ #include "code\modules\tgui\modules\rcon.dm" #include "code\modules\tgui\modules\supermatter_monitor.dm" #include "code\modules\tgui\modules\general\cardmod.dm" +#include "code\modules\tgui\modules\specific\lathe_control.dm" #include "code\modules\tgui\states\admin.dm" #include "code\modules\tgui\states\always.dm" #include "code\modules\tgui\states\conscious.dm" diff --git a/code/__DEFINES/_flags/atom_flags.dm b/code/__DEFINES/_flags/atom_flags.dm index ccc17d955b9a..d29d8ee6cdf1 100644 --- a/code/__DEFINES/_flags/atom_flags.dm +++ b/code/__DEFINES/_flags/atom_flags.dm @@ -40,7 +40,7 @@ /// should not get harmed if this gets caught by an explosion? #define PREVENT_CONTENTS_EXPLOSION (1<<22) */ -#define HTML_USE_INITAL_ICON (1<<23) +#define HTML_USE_INITIAL_ICON (1<<23) DEFINE_BITFIELD(atom_flags, list( BITFIELD(ATOM_INITIALIZED), @@ -56,6 +56,7 @@ DEFINE_BITFIELD(atom_flags, list( BITFIELD(OPENCONTAINER), BITFIELD(PHORONGUARD), BITFIELD(NOPRINT), + BITFIELD(HTML_USE_INITIAL_ICON), )) //! /atom/movable/var/movable_flags diff --git a/code/__DEFINES/_flags/item_flags.dm b/code/__DEFINES/_flags/item_flags.dm index ef8f75fa367c..29e39d3fa157 100644 --- a/code/__DEFINES/_flags/item_flags.dm +++ b/code/__DEFINES/_flags/item_flags.dm @@ -7,7 +7,7 @@ #define ITEM_NOBLUDGEON (1<<2) /// for all things that are technically items but used for various different stuff #define ITEM_ABSTRACT (1<<3) -/// is this item in a storage component? +/// is this item in a storage datum? #define ITEM_IN_STORAGE (1<<4) /// we can't be caught when hitting a mob on throw #define ITEM_THROW_UNCATCHABLE (1<<5) @@ -17,6 +17,12 @@ #define ITEM_MULTIHAND_WIELDED (1<<7) /// don't allow help intent attacking #define ITEM_CAREFUL_BLUDGEON (1<<8) +/// allow easy lathe deconstruction +#define ITEM_EASY_LATHE_DECONSTRUCT (1<<9) +/// do not allow lathe deconstruction +#define ITEM_NO_LATHE_DECONSTRUCT (1<<10) +/// stack-like handling for ingredients +#define ITEM_MASS_INGREDIENT (1<<11) DEFINE_BITFIELD(item_flags, list( BITFIELD(ITEM_IN_INVENTORY), @@ -28,6 +34,9 @@ DEFINE_BITFIELD(item_flags, list( BITFIELD(ITEM_NO_TOOL_ATTACK), BITFIELD(ITEM_MULTIHAND_WIELDED), BITFIELD(ITEM_CAREFUL_BLUDGEON), + BITFIELD(ITEM_EASY_LATHE_DECONSTRUCT), + BITFIELD(ITEM_NO_LATHE_DECONSTRUCT), + BITFIELD(ITEM_MASS_INGREDIENT), )) //! Flags for the clothing_flags var on /obj/item diff --git a/code/__DEFINES/_lists.dm b/code/__DEFINES/_lists.dm index 00f52bb000a4..c8585eabf4e9 100644 --- a/code/__DEFINES/_lists.dm +++ b/code/__DEFINES/_lists.dm @@ -39,6 +39,11 @@ // Returns the key based on the index #define KEYBYINDEX(L, index) (((index <= length(L)) && (index > 0)) ? L[index] : null) +/// sanitize a lazy null-or-entry-or-list into always a list +#define COERCE_OPTIONS_LIST(Entry) (islist(Entry)? Entry : (isnull(Entry)? list() : list(Entry))) +/// COERCE_OPTIONS_LIST but does it to an existing variablew. +#define COERCE_OPTIONS_LIST_IN(Variable) Variable = COERCE_OPTIONS_LIST(Variable) + /// Passed into BINARY_INSERT to compare keys #define COMPARE_KEY __BIN_LIST[__BIN_MID] /// Passed into BINARY_INSERT to compare values diff --git a/code/__DEFINES/controllers/_subsystems.dm b/code/__DEFINES/controllers/_subsystems.dm index 4d5067ecd71a..e26b79472362 100644 --- a/code/__DEFINES/controllers/_subsystems.dm +++ b/code/__DEFINES/controllers/_subsystems.dm @@ -94,15 +94,15 @@ DEFINE_BITFIELD(runlevels, list( #define INIT_ORDER_INSTRUMENTS 50 #define INIT_ORDER_EARLY_ASSETS 48 #define INIT_ORDER_CHEMISTRY 35 -#define INIT_ORDER_MATERIALS 30 +#define INIT_ORDER_MATERIALS 34 #define INIT_ORDER_PHOTOGRAPHY 27 #define INIT_ORDER_MAPPING 25 #define INIT_ORDER_LEGACY_ATC 24 #define INIT_ORDER_LEGACY_LORE 23 #define INIT_ORDER_LOBBY 22 -#define INIT_ORDER_DECALS 20 #define INIT_ORDER_PLANTS 19 #define INIT_ORDER_ALARMS 18 +#define INIT_ORDER_RESEARCH 17 #define INIT_ORDER_ATOMS 15 #define INIT_ORDER_MACHINES 10 #define INIT_ORDER_SHUTTLES 3 @@ -126,7 +126,6 @@ DEFINE_BITFIELD(runlevels, list( #define INIT_ORDER_CIRCUIT -60 #define INIT_ORDER_AI -70 #define INIT_ORDER_PATH -98 -#define INIT_ORDER_OPENSPACE -99 #define INIT_ORDER_CHAT -100 //! Should be last to ensure chat remains smooth during init. diff --git a/code/__DEFINES/datums/design.dm b/code/__DEFINES/datums/design.dm new file mode 100644 index 000000000000..f5f900722778 --- /dev/null +++ b/code/__DEFINES/datums/design.dm @@ -0,0 +1,41 @@ +//? lathe_type bitfield + +#define LATHE_TYPE_AUTOLATHE (1<<0) +#define LATHE_TYPE_PROTOLATHE (1<<1) +#define LATHE_TYPE_CIRCUIT (1<<2) +#define LATHE_TYPE_PROSTHETICS (1<<3) +#define LATHE_TYPE_MECHA (1<<4) +#define LATHE_TYPE_BIOPRINTER (1<<5) + +DEFINE_BITFIELD(lathe_type, list( + BITFIELD(LATHE_TYPE_AUTOLATHE), + BITFIELD(LATHE_TYPE_PROTOLATHE), + BITFIELD(LATHE_TYPE_CIRCUIT), + BITFIELD(LATHE_TYPE_PROSTHETICS), + BITFIELD(LATHE_TYPE_MECHA), + BITFIELD(LATHE_TYPE_BIOPRINTER), +)) + +//? design_unlock bitfield + +/// any lathe that can print us should have us always +#define DESIGN_UNLOCK_INTRINSIC (1<<0) +/// any lathe that can print us can have us uploaded +#define DESIGN_UNLOCK_UPLOAD (1<<1) + +DEFINE_BITFIELD(design_unlock, list( + BITFIELD(DESIGN_UNLOCK_INTRINSIC), + BITFIELD(DESIGN_UNLOCK_UPLOAD), +)) + +//? design_flags bitfield + +/// do not scale with efficiency +#define DESIGN_NO_SCALE (1<<0) +/// unit tests should ignore the lack of materials +#define DESIGN_IGNORE_RESOURCE_SANITY (1<<2) + +DEFINE_BITFIELD(design_flags, list( + BITFIELD(DESIGN_NO_SCALE), + BITFIELD(DESIGN_IGNORE_RESOURCE_SANITY), +)) diff --git a/code/__DEFINES/ingredients.dm b/code/__DEFINES/ingredients.dm new file mode 100644 index 000000000000..14b165fc7949 --- /dev/null +++ b/code/__DEFINES/ingredients.dm @@ -0,0 +1,36 @@ +//? types; sync to tgui when modifying. + +#define INGREDIENT_DATA_TYPE "type" //! type of ingredient +#define INGREDIENT_DATA_AMOUNT "amt" //! amount to use; what this means depends on type +#define INGREDIENT_DATA_ALLOW "allow" //! what to allow; data depends on type +#define INGREDIENT_DATA_NAME "name" //! name in selection uis +#define INGREDIENT_DATA_KEY "key" //! what's passed back from use ingredients + +/** + * select: material id + * amount: sheets + * allowed: null for any, otherwise list of material ids + * return: material id + */ +#define INGREDIENT_TYPE_MATERIAL "material" +/** + * select: reagent id + * amount: units + * allowed: null for any, otherwise list of reagent ids + * return: reagent id + */ +#define INGREDIENT_TYPE_REAGENT "reagent" +/** + * select: stack path + * amount: stack amount + * allowed: null for any, otherwise list of typepaths + * return: stack path + */ +#define INGREDIENT_TYPE_STACK "stack" +/** + * select: item ref + * amount: item count + * allowed: null for any, otherwise list of typepaths, associate TRUE to enforce exact, otherwise subtypes work + * return: list of item instances; all selected items are deleted if unkeyed + */ +#define INGREDIENT_TYPE_ITEM "item" diff --git a/code/__DEFINES/materials/balancing.dm b/code/__DEFINES/materials/balancing.dm new file mode 100644 index 000000000000..13f0a822054b --- /dev/null +++ b/code/__DEFINES/materials/balancing.dm @@ -0,0 +1,6 @@ +//? master file for balancing / efficiency tuning + +//* efficiency + +/// scale a lathe's efficiency to upgrade level +#define MATERIAL_EFFICIENCY_LATHE_SCALE(tier) max(0, 1.1 - tier * 0.1) diff --git a/code/__DEFINES/materials/misc.dm b/code/__DEFINES/materials/misc.dm new file mode 100644 index 000000000000..239163a5aece --- /dev/null +++ b/code/__DEFINES/materials/misc.dm @@ -0,0 +1,60 @@ + +// Material Defines +#define MAT_BANANIUM "bananium" +#define MAT_CARBON "carbon" +#define MAT_CHITIN "chitin" +#define MAT_COPPER "copper" +#define MAT_DIAMOND "diamond" +#define MAT_DURASTEEL "durasteel" +#define MAT_DURASTEELHULL "durasteel hull" +#define MAT_GLASS "glass" +#define MAT_GOLD "gold" +#define MAT_GRAPHITE "graphite" +#define MAT_HARDLOG "hardwood log" +#define MAT_HARDWOOD "hardwood" +#define MAT_HEMATITE "hematite" +#define MAT_IRON "iron" +#define MAT_LEAD "lead" +#define MAT_LEATHER "leather" +#define MAT_LOG "log" +#define MAT_MARBLE "marble" +#define MAT_METALHYDROGEN "mhydrogen" +#define MAT_MORPHIUM "morphium" +#define MAT_MORPHIUMHULL "morphium hull" +#define MAT_OSMIUM "osmium" +#define MAT_PHORON "phoron" +#define MAT_PLASTEEL "plasteel" +#define MAT_PLASTEELHULL "plasteel hull" +#define MAT_PLASTIC "plastic" +#define MAT_PLATINUM "platinum" +#define MAT_SIFLOG "alien log" +#define MAT_SIFWOOD "alien wood" +#define MAT_SILENCIUM "silencium" +#define MAT_SILVER "silver" +#define MAT_SNOW "snow" +#define MAT_STEEL "steel" +#define MAT_STEELHULL "steel hull" +#define MAT_SUPERMATTER "supermatter" +#define MAT_TITANIUM "titanium" +#define MAT_TITANIUMHULL "titanium hull" +#define MAT_URANIUM "uranium" +#define MAT_VALHOLLIDE "valhollide" +#define MAT_VAUDIUM "vaudium" +#define MAT_VERDANTIUM "verdantium" +#define MAT_WOOD "wood" + + +#define SHARD_SHARD "shard" +#define SHARD_SHRAPNEL "shrapnel" +#define SHARD_STONE_PIECE "piece" +#define SHARD_SPLINTER "splinters" +#define SHARD_NONE "" + +#define MATERIAL_UNMELTABLE 0x1 +#define MATERIAL_BRITTLE 0x2 +#define MATERIAL_PADDING 0x4 + +/// Amount table damage is multiplied by if it is made of a brittle material (e.g. glass) +#define TABLE_BRITTLE_MATERIAL_MULTIPLIER 4 + +#define SHEET_MATERIAL_AMOUNT 2000 diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index b7a2401ce121..28f014d0e742 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -131,65 +131,6 @@ Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a s #define WALL_CAN_OPEN 1 #define WALL_OPENING 2 - -// Material Defines -#define MAT_BANANIUM "bananium" -#define MAT_CARBON "carbon" -#define MAT_CHITIN "chitin" -#define MAT_COPPER "copper" -#define MAT_DIAMOND "diamond" -#define MAT_DURASTEEL "durasteel" -#define MAT_DURASTEELHULL "durasteel hull" -#define MAT_GLASS "glass" -#define MAT_GOLD "gold" -#define MAT_GRAPHITE "graphite" -#define MAT_HARDLOG "hardwood log" -#define MAT_HARDWOOD "hardwood" -#define MAT_HEMATITE "hematite" -#define MAT_IRON "iron" -#define MAT_LEAD "lead" -#define MAT_LEATHER "leather" -#define MAT_LOG "log" -#define MAT_MARBLE "marble" -#define MAT_METALHYDROGEN "mhydrogen" -#define MAT_MORPHIUM "morphium" -#define MAT_MORPHIUMHULL "morphium hull" -#define MAT_OSMIUM "osmium" -#define MAT_PHORON "phoron" -#define MAT_PLASTEEL "plasteel" -#define MAT_PLASTEELHULL "plasteel hull" -#define MAT_PLASTIC "plastic" -#define MAT_PLATINUM "platinum" -#define MAT_SIFLOG "alien log" -#define MAT_SIFWOOD "alien wood" -#define MAT_SILENCIUM "silencium" -#define MAT_SILVER "silver" -#define MAT_SNOW "snow" -#define MAT_STEEL "steel" -#define MAT_STEELHULL "steel hull" -#define MAT_SUPERMATTER "supermatter" -#define MAT_TITANIUM "titanium" -#define MAT_TITANIUMHULL "titanium hull" -#define MAT_URANIUM "uranium" -#define MAT_VALHOLLIDE "valhollide" -#define MAT_VAUDIUM "vaudium" -#define MAT_VERDANTIUM "verdantium" -#define MAT_WOOD "wood" - - -#define SHARD_SHARD "shard" -#define SHARD_SHRAPNEL "shrapnel" -#define SHARD_STONE_PIECE "piece" -#define SHARD_SPLINTER "splinters" -#define SHARD_NONE "" - -#define MATERIAL_UNMELTABLE 0x1 -#define MATERIAL_BRITTLE 0x2 -#define MATERIAL_PADDING 0x4 - -/// Amount table damage is multiplied by if it is made of a brittle material (e.g. glass) -#define TABLE_BRITTLE_MATERIAL_MULTIPLIER 4 - #define BOMBCAP_DVSTN_RADIUS (max_explosion_range/4) #define BOMBCAP_HEAVY_RADIUS (max_explosion_range/2) #define BOMBCAP_LIGHT_RADIUS max_explosion_range diff --git a/code/__DEFINES/power/balancing.dm b/code/__DEFINES/power/balancing.dm index f62641a4aa44..d966ee58b549 100644 --- a/code/__DEFINES/power/balancing.dm +++ b/code/__DEFINES/power/balancing.dm @@ -1,10 +1,19 @@ //? master file for balancing / efficiency tuning -//* Machinery -/// Idle usage of a nanite chamber in watts -#define POWER_USAGE_NANITE_CHAMBER_IDLE 100 -/// Active usage of a nanite chamber in watts -#define POWER_USAGE_NANITE_CHAMBER_ACTIVE 5000 +//* Cells + +/// the closest thing we'll get to a cvar - cellrate is kJ per cell unit. kJ to avoid float precision loss. +GLOBAL_VAR_INIT(cellrate, 0.5) +/** + * current calculations + * cellrate 0.5 = 0.5 kj/unit + * for 10k cell, 5000kj + * 1 Wh = 60J-S*60s/m = 3600J = 3.6kJ + * 10k cell --> 1388.89 Wh + * damn, future cells be pogging + */ +/// the closest thing we'll get to a cvar - affects cell use_scaled - higher = things use less energy. handheld devices usually use this. +GLOBAL_VAR_INIT(cellefficiency, 1) //* Computers @@ -12,3 +21,29 @@ #define POWER_USAGE_COMPUTER_MID_IDLE 50 /// Active usage of a mid-range control computer in watts #define POWER_USAGE_COMPUTER_MID_ACTIVE 500 + +//* Equipment + +/// cost of shield difussion in cell units +#define CELL_COST_SHIELD_DIFFUSION 120 + +//* Machinery + +/// idle power usage of a lathe in watts +#define POWER_USAGE_LATHE_IDLE 25 +/// active power usage of lathe scaling to decisecond work unit (e.g. 4x speed lathe is 4 for input) in watts +#define POWER_USAGE_LATHE_ACTIVE_SCALE(factor) (factor * 1000) +/// Idle usage of a nanite chamber in watts +#define POWER_USAGE_NANITE_CHAMBER_IDLE 100 +/// Active usage of a nanite chamber in watts +#define POWER_USAGE_NANITE_CHAMBER_ACTIVE 5000 + +//* Misc + +//#define THERMOMACHINE_CHEAT_FACTOR 1 +#define RECHARGER_CHEAT_FACTOR 5 +#define SYNTHETIC_NUTRITION_KJ_PER_UNIT 10 +#define SYNTHETIC_NUTRITION_INDUCER_CHEAT_FACTOR 2 +#define CYBORG_POWER_USAGE_MULTIPLIER 2 +#define SPACE_HEATER_CHEAT_FACTOR 1.5 +#define THERMOREGULATOR_CHEAT_FACTOR 5 diff --git a/code/__DEFINES/power/power.dm b/code/__DEFINES/power/power.dm index 3b1a34bb6b78..cc8e4bb4ca30 100644 --- a/code/__DEFINES/power/power.dm +++ b/code/__DEFINES/power/power.dm @@ -175,38 +175,6 @@ #define DYNAMIC_CELL_UNITS_TO_KWM(U) (((U) * GLOB.cellrate) / (60)) #define DYNAMIC_CELL_UNITS_TO_WM(U) (((U) * GLOB.cellrate) / (60 / 1000)) -/// the closest thing we'll get to a cvar - cellrate is kJ per cell unit. kJ to avoid float precision loss. -GLOBAL_VAR_INIT(cellrate, 0.5) -/** - * current calculations - * cellrate 0.5 = 0.5 kj/unit - * for 10k cell, 5000kj - * 1 Wh = 60J-S*60s/m = 3600J = 3.6kJ - * 10k cell --> 1388.89 Wh - * damn, future cells be pogging - */ -/// the closest thing we'll get to a cvar - affects cell use_scaled - higher = things use less energy. handheld devices usually use this. -GLOBAL_VAR_INIT(cellefficiency, 1) - -/** - * OLD CALCS FOR ABOVE - * Multiplier for watts per tick <> cell storage (e.g., 0.02 means if there is a load of 1000 watts, 20 units will be taken from a cell per second) - * = 50Ws/u - * #define CELLRATE 0.002 // It's a conversion constant. power_used*CELLRATE = charge_provided, or charge_used/CELLRATE = power_provided - */ - -/** - * misc - */ - -//#define THERMOMACHINE_CHEAT_FACTOR 1 -#define RECHARGER_CHEAT_FACTOR 5 -#define SYNTHETIC_NUTRITION_KJ_PER_UNIT 10 -#define SYNTHETIC_NUTRITION_INDUCER_CHEAT_FACTOR 2 -#define CYBORG_POWER_USAGE_MULTIPLIER 2 -#define SPACE_HEATER_CHEAT_FACTOR 1.5 -#define THERMOREGULATOR_CHEAT_FACTOR 5 - /** * LEGACY ENUMS * @@ -218,13 +186,3 @@ GLOBAL_VAR_INIT(cellefficiency, 1) */ #define KILOWATTS * 1000 #define MEGAWATTS * 1000000 - -/** - * BALANCING - CELL AND EQUIPMENT - */ -/// cost of shield difussion -#define CELL_COST_SHIELD_DIFFUSION 120 - -/** - * BALANCING - MACHINERY POWER - */ diff --git a/code/__DEFINES/research/research.dm b/code/__DEFINES/research/research.dm index a14d1025b4bf..d36cace799d3 100644 --- a/code/__DEFINES/research/research.dm +++ b/code/__DEFINES/research/research.dm @@ -1,4 +1,3 @@ -#define SHEET_MATERIAL_AMOUNT 2000 #define TECH_MATERIAL "materials" #define TECH_ENGINEERING "engineering" @@ -12,14 +11,3 @@ #define TECH_ILLEGAL "syndicate" #define TECH_ARCANE "arcane" #define TECH_PRECURSOR "precursor" - -///For circuits. Uses glass/chemicals. -#define IMPRINTER 0x0001 -///New stuff. Uses glass/metal/chemicals -#define PROTOLATHE 0x0002 -///Mechfab -#define MECHFAB 0x0004 -///For protolathe, but differently -#define CHASSIS 0x0008 -///For prosthetics fab -#define PROSFAB 0x0010 diff --git a/code/__DEFINES/tools/functionality.dm b/code/__DEFINES/tools/functionality.dm index 63556c6728b5..1f6a4e3cc896 100644 --- a/code/__DEFINES/tools/functionality.dm +++ b/code/__DEFINES/tools/functionality.dm @@ -49,6 +49,7 @@ GLOBAL_REAL_VAR(_dyntool_image_states) = list( #define TOOL_HINT_WRENCH_WINDOW_DISASSEMBLY "dismantle" //? tool_locked var + /// unlocked - use dynamic tool system #define TOOL_LOCKING_DYNAMIC 1 /// use static behavior diff --git a/code/__HELPERS/datastructs/ingredients.dm b/code/__HELPERS/datastructs/ingredients.dm new file mode 100644 index 000000000000..c00dc9fb75ed --- /dev/null +++ b/code/__HELPERS/datastructs/ingredients.dm @@ -0,0 +1,154 @@ +//* INGREDIENTS SYSTEM - Check [code/__DEFINES/ingredients.dm] *// + +/// Ingredients are specially formatted lists. +/// These procs allow standardized operations on them. +/// Make sure these sync to Ingredients.tsx + +/** + * checks an ingredients list and a list of selected ingredients against an items list + * + * @return is everything there? + */ +/proc/check_ingredients(list/ingredients, list/selection, list/obj/item/items) + var/list/materials = list() + var/list/reagents = list() + var/list/stacks = list() + for(var/i in 1 to length(ingredients)) + if(i > length(selection)) + break + var/list/ingredient_list = ingredients[i] + var/type = ingredient_list[INGREDIENT_DATA_TYPE] + var/amt = ingredient_list[INGREDIENT_DATA_AMOUNT] + var/selected = selection[i] + switch(type) + if(INGREDIENT_TYPE_MATERIAL) + materials[selected] += amt + if(INGREDIENT_TYPE_REAGENT) + reagents[selected] += amt + if(INGREDIENT_TYPE_STACK) + stacks[selected] += amt + if(INGREDIENT_TYPE_ITEM) + var/obj/item/I = locate(selected) in items + if(isnull(I)) + return FALSE + // todo: reagents + for(var/obj/item/I as anything in items) + if(istype(I, /obj/item/stack)) + var/obj/item/stack/S = I + if(istype(I, /obj/item/stack/material)) + var/obj/item/stack/material/M = S + var/mat_id = M.material.id + if(materials[mat_id]) + materials[mat_id] -= M.amount * SHEET_MATERIAL_AMOUNT + if(materials[mat_id] <= 0) + materials -= mat_id + else + if(stacks[S.type]) + stacks[S.type] -= S.amount + if(stacks[S.type] <= 0) + stacks -= S.type + if(length(stacks) || length(materials)) // something wasn't consumed + return FALSE + return TRUE + +/** + * returns a list of things by key. + * anything unkeyed gets deleted. + * + * @return list of data by key ; datatype depends on the ingredient type. + */ +/proc/use_ingredients(list/ingredients, list/selection, list/obj/item/items) + . = list() + var/list/materials = list() + var/list/reagents = list() + var/list/stacks = list() + for(var/i in 1 to length(ingredients)) + if(i > length(selection)) + break + var/list/ingredient_list = ingredients[i] + var/type = ingredient_list[INGREDIENT_DATA_TYPE] + var/amt = ingredient_list[INGREDIENT_DATA_AMOUNT] + var/key = ingredient_list[INGREDIENT_DATA_KEY] + var/selected = selection[i] + switch(type) + if(INGREDIENT_TYPE_MATERIAL) + materials[selected] += amt + if(INGREDIENT_TYPE_REAGENT) + reagents[selected] += amt + if(INGREDIENT_TYPE_STACK) + stacks[selected] += amt + if(INGREDIENT_TYPE_ITEM) + var/obj/item/I = locate(selected) in items + if(isnull(I)) + continue + if(isnull(key)) + qdel(I) + .[key] = I + // todo: reagents + for(var/obj/item/I as anything in items) + if(istype(I, /obj/item/stack)) + var/obj/item/stack/S = I + if(istype(I, /obj/item/stack/material)) + var/obj/item/stack/material/M = S + var/mat_id = M.material.id + if(materials[mat_id]) + var/used = M.use(materials[mat_id] / SHEET_MATERIAL_AMOUNT) + materials[M.type] -= used * SHEET_MATERIAL_AMOUNT + if(materials[M.type] <= 0) + materials -= M.type + else + if(stacks[S.type]) + var/used = S.use(stacks[S.type]) + stacks[S.type] -= used + if(stacks[S.type] <= 0) + stacks -= S.type + +/proc/ui_ingredients_needed(list/ingredients) + return ingredients + +/proc/ui_ingredients_available(list/obj/item/items) + . = list() + var/list/materials = list() + var/list/material_lookup = list() + var/list/reagents = list() + var/list/reagent_lookup = list() + var/list/stacks = list() + var/list/stack_lookup = list() + var/list/item_instances = list() + var/list/mass_items = list() + var/list/mass_item_lookup = list() + + for(var/obj/item/I as anything in items) + if(istype(I, /obj/item/stack/material)) + var/obj/item/stack/material/M = I + materials[M.material.id] += M.amount + if(isnull(material_lookup[M.material.id])) + material_lookup[M.material.id] = M.material.display_name || M.material.name + else if(istype(I, /obj/item/stack)) + var/obj/item/stack/S = I + stacks[S.type] += S.amount + if(isnull(stack_lookup[S.type])) + stack_lookup[S.type] = S.singular_name || S.name + else if(I.item_flags & ITEM_MASS_INGREDIENT) + mass_items[I.type] += 1 + if(isnull(mass_item_lookup[I.type])) + mass_item_lookup[I.type] = I.name + else + item_instances[++item_instances.len] = list( + "name" = I.name, + "ref" = ref(I), + "path" = I.type, + ) + // todo: reagents + + return list( + "materials" = materials, + "materialLookup" = material_lookup, + "reagents" = reagents, + "reagentLookup" = reagent_lookup, + "stacks" = stacks, + "stackLookup" = stack_lookup, + "items" = item_instances, + "massItems" = mass_items, + "massItemLookup" = mass_item_lookup, + ) diff --git a/code/__HELPERS/icon_smoothing.dm b/code/__HELPERS/icon_smoothing.dm index 655633ad008e..d854c36e6a4d 100644 --- a/code/__HELPERS/icon_smoothing.dm +++ b/code/__HELPERS/icon_smoothing.dm @@ -181,7 +181,7 @@ */ /atom/proc/smooth_icon() smoothing_flags &= ~SMOOTH_QUEUED - atom_flags |= HTML_USE_INITAL_ICON + atom_flags |= HTML_USE_INITIAL_ICON if (!z) CRASH("[type] called smooth_icon() without being on a z-level") if(smoothing_flags & SMOOTH_CORNERS) diff --git a/code/controllers/subsystem/atoms.dm b/code/controllers/subsystem/atoms.dm index 87cff14387e8..dec55fa76c4a 100644 --- a/code/controllers/subsystem/atoms.dm +++ b/code/controllers/subsystem/atoms.dm @@ -93,6 +93,22 @@ SUBSYSTEM_DEF(atoms) return qdeleted || QDELING(A) +/** + * immediately creates and inits an atom + * + * @params + * * path - typepath + * * mapload - treat as mapload? + * * where - location to init at + * * ... - rest of args are passed to new() / Initialize(). + */ +/datum/controller/subsystem/atoms/proc/instance_atom_immediate(path, mapload, atom/where, ...) + var/old_initialized = initialized + initialized = mapload? INITIALIZATION_INNEW_MAPLOAD : INITIALIZATION_INNEW_REGULAR + var/atom/created = new path(arglist(args.Copy())) + initialized = old_initialized + return created + /datum/controller/subsystem/atoms/proc/map_loader_begin() old_subsystem_initialized = initialized initialized = INITIALIZATION_INSSATOMS diff --git a/code/controllers/subsystem/materials.dm b/code/controllers/subsystem/materials.dm index a9901c3c0de3..b4d9e9651102 100644 --- a/code/controllers/subsystem/materials.dm +++ b/code/controllers/subsystem/materials.dm @@ -79,3 +79,32 @@ SUBSYSTEM_DEF(materials) */ /proc/get_material_by_name(name) return SSmaterials.legacy_material_lookup[name] + +/** + * tgui materials context + * + * generates data for tgui/interfaces/common/Materials.tsx: + * * MaterialsContext + * * FullMaterialsContext + * + * @params + * * ids - material ids. defaults to all. + * * full - for FullMaterialsContext? usually not needed. + */ +/datum/controller/subsystem/materials/proc/tgui_materials_context(list/ids, full = FALSE) + var/list/data = list() + // a hack to make this default to all if not specified. + for(var/id in ids || material_lookup) + var/datum/material/mat = material_lookup[id] + var/list/built = list( + "name" = mat.display_name || mat.name, + "id" = mat.id, + "iconKey" = mat.tgui_icon_key, + "sheetAmount" = SHEET_MATERIAL_AMOUNT, + ) + data[mat.id] = built + // todo: per-material sheetAmount + return list( + "materials" = data, + "sheetAmount" = SHEET_MATERIAL_AMOUNT, + ) diff --git a/code/controllers/subsystem/playtime.dm b/code/controllers/subsystem/playtime.dm index a13bea15e9a3..eaee7e5f5001 100644 --- a/code/controllers/subsystem/playtime.dm +++ b/code/controllers/subsystem/playtime.dm @@ -71,6 +71,8 @@ SUBSYSTEM_DEF(playtime) return if(!C.initialized) CRASH("how was this called on an uninitialized client?") + if(!SSdbcore.Connect()) + return var/list/playtimes = playtime_for(C.mob) var/now = REALTIMEOFDAY // deciseconds to minutes diff --git a/code/controllers/subsystem/research.dm b/code/controllers/subsystem/research.dm new file mode 100644 index 000000000000..649a82933808 --- /dev/null +++ b/code/controllers/subsystem/research.dm @@ -0,0 +1,72 @@ +SUBSYSTEM_DEF(research) + subsystem_flags = SS_NO_FIRE + init_order = INIT_ORDER_RESEARCH + + //? designs + /// design lookup id = instance + var/list/design_lookup + + //? designs - caches + /// cached autolathe desgin ids + var/list/autolathe_design_ids + +/datum/controller/subsystem/research/Initialize() + build_designs() + return ..() + +/datum/controller/subsystem/research/Recover() + design_lookup = SSresearch.design_lookup + autolathe_design_ids = SSresearch.autolathe_design_ids + return ..() + +/datum/controller/subsystem/research/proc/build_designs() + design_lookup = list() + autolathe_design_ids = list() + for(var/datum/design/path as anything in subtypesof(/datum/design)) + if(initial(path.abstract_type) == path) + continue + path = new path + if(design_lookup[path.id]) + qdel(path) + continue + if(!register_design(path)) + stack_trace("failed to register [path]") + qdel(path) + +/** + * shove a design into lookup for the round + * + * you should know what you are doing before trying this + * make sure you drop all references of the design from your end! + */ +/datum/controller/subsystem/research/proc/register_design(datum/design/registering) + if(design_lookup[registering.id]) + return FALSE + . = TRUE + design_lookup[registering.id] = registering + if((registering.lathe_type & LATHE_TYPE_AUTOLATHE) && (registering.design_unlock & DESIGN_UNLOCK_INTRINSIC)) + autolathe_design_ids += registering.id + +/** + * gets a design datum + * + * *do not* modify the datum returned! + */ +/datum/controller/subsystem/research/proc/fetch_design(datum/design/id_or_typepath) + RETURN_TYPE(/datum/design) + return design_lookup[ispath(id_or_typepath)? initial(id_or_typepath.id) : id_or_typepath] + +/** + * gets a list of design datums by id or typepath + * + * *do not* modify the datums returned! + */ +/datum/controller/subsystem/research/proc/fetch_designs(list/datum/design/id_or_typepaths) + RETURN_TYPE(/list) + . = list() + var/datum/design/thing + for(thing as anything in id_or_typepaths) + thing = design_lookup[ispath(thing)? initial(thing.id) : thing] + if(isnull(thing)) + continue + . += thing diff --git a/code/datums/autolathe/arms.dm b/code/datums/autolathe/arms.dm deleted file mode 100644 index 6364ddc4ea0d..000000000000 --- a/code/datums/autolathe/arms.dm +++ /dev/null @@ -1,326 +0,0 @@ -/datum/category_item/autolathe/arms/syringegun_ammo - name = "syringe gun cartridge" - path =/obj/item/syringe_cartridge - -/datum/category_item/autolathe/arms/receiver - name = "receiver" - path =/obj/item/weaponcrafting/receiver - -//////////////// -/*Ammo casings*/ -//////////////// - -/datum/category_item/autolathe/arms/shotgun_blanks - name = "ammunition (12g, blank)" - path =/obj/item/ammo_casing/a12g/blank - -/datum/category_item/autolathe/arms/shotgun_beanbag - name = "ammunition (12g, beanbag)" - path =/obj/item/ammo_casing/a12g/beanbag - -/datum/category_item/autolathe/arms/shotgun_flare - name = "ammunition (12g, flare)" - path =/obj/item/ammo_casing/a12g/flare - -/datum/category_item/autolathe/arms/shot_holder - name = "ammunition - shotgun shell pouch (12g, empty)" - path =/obj/item/ammo_magazine/shotholder - -/datum/category_item/autolathe/arms/shotgun - name = "ammunition (12g, slug)" - path =/obj/item/ammo_casing/a12g - hidden = 1 - -/datum/category_item/autolathe/arms/shotgun_pellet - name = "ammunition (12g, pellet)" - path =/obj/item/ammo_casing/a12g/pellet - hidden = 1 - -/datum/category_item/autolathe/arms/stunshell - name = "ammunition (stun cartridge, shotgun)" - path =/obj/item/ammo_casing/a12g/stunshell - hidden = 1 - -////////////////// -/*Ammo magazines*/ -////////////////// - -//! ## 5mm -/* -/datum/category_item/autolathe/arms/pistol_5mm - name = "pistol magazine (5mm)" - path =/obj/item/ammo_magazine/c5mm - category = list("Arms and Ammunition") - hidden = 1 -*/ -////// 10x24mm -/datum/category_item/autolathe/arms/usmc/small - name = "small m41a magazine" - path = /obj/item/ammo_magazine/m10x24mm/small - hidden = 1 - -//! ## .45 -/datum/category_item/autolathe/arms/pistol_45 - name = "pistol magazine (.45)" - path =/obj/item/ammo_magazine/m45 - hidden = 1 - -/datum/category_item/autolathe/arms/pistol_45h - name = "pistol magazine (.45 hunter)" - path =/obj/item/ammo_magazine/m45/hunter - hidden = 1 - -/datum/category_item/autolathe/arms/pistol_45p - name = "pistol magazine (.45 practice)" - path =/obj/item/ammo_magazine/m45/practice - -/datum/category_item/autolathe/arms/pistol_45r - name = "pistol magazine (.45 rubber)" - path =/obj/item/ammo_magazine/m45/rubber - -/datum/category_item/autolathe/arms/pistol_45f - name = "pistol magazine (.45 flash)" - path =/obj/item/ammo_magazine/m45/flash - -/datum/category_item/autolathe/arms/pistol_45uzi - name = "uzi magazine (.45)" - path =/obj/item/ammo_magazine/m45uzi - hidden = 1 - -/datum/category_item/autolathe/arms/tommymag - name = "Tommy Gun magazine (.45)" - path =/obj/item/ammo_magazine/m45tommy - hidden = 1 - -/datum/category_item/autolathe/arms/tommydrum - name = "Tommy Gun drum magazine (.45)" - path =/obj/item/ammo_magazine/m45tommydrum - hidden = 1 - -//! ## 9mm - -// Full size pistol mags. -/datum/category_item/autolathe/arms/pistol_9mm - name = "pistol magazine (9mm)" - path =/obj/item/ammo_magazine/m9mm - hidden = 1 - -/datum/category_item/autolathe/arms/pistol_9mmr - name = "pistol magazine (9mm rubber)" - path =/obj/item/ammo_magazine/m9mm/rubber - -/datum/category_item/autolathe/arms/pistol_9mmp - name = "pistol magazine (9mm practice)" - path =/obj/item/ammo_magazine/m9mm/practice - -/datum/category_item/autolathe/arms/pistol_9mmf - name = "pistol magazine (9mm flash)" - path =/obj/item/ammo_magazine/m9mm/flash - -// Small mags for small or old guns. -/datum/category_item/autolathe/arms/pistol_9mm_compact - name = "compact pistol magazine (9mm)" - path =/obj/item/ammo_magazine/m9mm/compact - hidden = 1 - -/datum/category_item/autolathe/arms/pistol_9mmr_compact - name = "compact pistol magazine (9mm rubber)" - path =/obj/item/ammo_magazine/m9mm/compact/rubber - hidden = 1 // These are all hidden because they are traitor mags and will otherwise just clutter the Autolathe. - -/datum/category_item/autolathe/arms/pistol_9mmp_compact - name = "compact pistol magazine (9mm practice)" - path =/obj/item/ammo_magazine/m9mm/compact/practice - hidden = 1 - -/datum/category_item/autolathe/arms/pistol_9mmf_compact - name = "compact pistol magazine (9mm flash)" - path =/obj/item/ammo_magazine/m9mm/compact/flash - hidden = 1 - -// SMG mags -/datum/category_item/autolathe/arms/smg_9mm - name = "top-mounted SMG magazine (9mm)" - path =/obj/item/ammo_magazine/m9mmt - hidden = 1 - -/datum/category_item/autolathe/arms/smg_9mmh - name = "top-mounted SMG magazine (9mm hunter)" - path =/obj/item/ammo_magazine/m9mmt/hunter - hidden = 1 - -/datum/category_item/autolathe/arms/smg_9mmr - name = "top-mounted SMG magazine (9mm rubber)" - path =/obj/item/ammo_magazine/m9mmt/rubber - -/datum/category_item/autolathe/arms/smg_9mmp - name = "top-mounted SMG magazine (9mm practice)" - path =/obj/item/ammo_magazine/m9mmt/practice - -/datum/category_item/autolathe/arms/smg_9mmf - name = "top-mounted SMG magazine (9mm flash)" - path =/obj/item/ammo_magazine/m9mmt/flash - -//! ## 10mm -/datum/category_item/autolathe/arms/smg_10mm - name = "SMG magazine (10mm)" - path =/obj/item/ammo_magazine/m10mm - hidden = 1 - -/datum/category_item/autolathe/arms/pistol_44 - name = "pistol magazine (.44)" - path =/obj/item/ammo_magazine/m44 - hidden = 1 - -//! ## 5.45mm -/datum/category_item/autolathe/arms/rifle_545 - name = "rifle magazine (5.45mm)" - path =/obj/item/ammo_magazine/m545 - hidden = 1 - -/datum/category_item/autolathe/arms/rifle_545p - name = "rifle magazine (5.45mm practice)" - path =/obj/item/ammo_magazine/m545/practice - -/datum/category_item/autolathe/arms/machinegun_545 - name = "machinegun box magazine (5.45)" - path =/obj/item/ammo_magazine/m545saw - hidden = 1 - -//! ## 7.62 - -/datum/category_item/autolathe/arms/rifle_762 - name = "rifle magazine (7.62mm)" - path =/obj/item/ammo_magazine/m762 - hidden = 1 - -/* -/datum/category_item/autolathe/arms/rifle_small_762 - name = "rifle magazine (7.62mm)" - path =/obj/item/ammo_magazine/s762 - hidden = 1 -*/ - -//! ## Shotgun - -/datum/category_item/autolathe/arms/shotgun_clip_beanbag - name = "2-round 12g speedloader (beanbag)" - path =/obj/item/ammo_magazine/clip/c12g/beanbag - -/datum/category_item/autolathe/arms/shotgun_clip_slug - name = "2-round 12g speedloader (slug)" - path =/obj/item/ammo_magazine/clip/c12g - hidden = 1 - -/datum/category_item/autolathe/arms/shotgun_clip_pellet - name = "2-round 12g speedloader (buckshot)" - path =/obj/item/ammo_magazine/clip/c12g/pellet - hidden = 1 - -/datum/category_item/autolathe/arms/shotgun_clip_beanbag - name = "2-round 12g speedloader (beanbag)" - path =/obj/item/ammo_magazine/clip/c12g/beanbag - -/////////////////////////////// -/*Ammo clips and Speedloaders*/ -/////////////////////////////// - -/datum/category_item/autolathe/arms/speedloader_357 - name = "speedloader (.357)" - path =/obj/item/ammo_magazine/s357 - hidden = 1 - -/datum/category_item/autolathe/arms/speedloader_38 - name = "speedloader (.38)" - path =/obj/item/ammo_magazine/s38 - hidden = 1 - -/datum/category_item/autolathe/arms/speedloader_38r - name = "speedloader (.38 rubber)" - path =/obj/item/ammo_magazine/s38/rubber - -/datum/category_item/autolathe/arms/speedloader_45 - name = "speedloader (.45)" - path = /obj/item/ammo_magazine/s45 - hidden = 1 - -/datum/category_item/autolathe/arms/speedloader_45r - name = "speedloader (.45 rubber)" - path = /obj/item/ammo_magazine/s45/rubber - -/datum/category_item/autolathe/arms/rifle_clip_545 - name = "ammo clip (5.45mm)" - path =/obj/item/ammo_magazine/clip/c545 - category = list("Arms and Ammunition") - hidden = 1 - -/datum/category_item/autolathe/arms/rifle_clip_545_practice - name = "ammo clip (5.45mm practice)" - path =/obj/item/ammo_magazine/clip/c545/practice - category = list("Arms and Ammunition") - -/datum/category_item/autolathe/arms/rifle_clip_762 - name = "ammo clip (7.62mm)" - path =/obj/item/ammo_magazine/clip/c762 - hidden = 1 - -/datum/category_item/autolathe/arms/rifle_clip_762_practice - name = "ammo clip (7.62mm practice)" - path =/obj/item/ammo_magazine/clip/c762/practice - -/datum/category_item/autolathe/arms/knuckledusters - name = "knuckle dusters" - path =/obj/item/clothing/gloves/knuckledusters - hidden = 1 - -/datum/category_item/autolathe/arms/tacknife - name = "tactical knife" - path =/obj/item/material/knife/tacknife - hidden = 1 - -/datum/category_item/autolathe/arms/flamethrower - name = "flamethrower" - path =/obj/item/flamethrower/full - hidden = 1 - -//! ## VR FILE MERGE ## !// - -/datum/category_item/autolathe/arms/speedloader_357_flash - name = "speedloader (.357 flash)" - path =/obj/item/ammo_magazine/s357/flash - hidden = 1 - -/datum/category_item/autolathe/arms/speedloader_357_stun - name = "speedloader (.357 stun)" - path =/obj/item/ammo_magazine/s357/stun - hidden = 1 - -/datum/category_item/autolathe/arms/speedloader_357_rubber - name = "speedloader (.357 rubber)" - path =/obj/item/ammo_magazine/s357/rubber - hidden = 1 - -/datum/category_item/autolathe/arms/speedloader_44 - name = "speedloader (.44)" - path =/obj/item/ammo_magazine/s44 - hidden = 1 - -/datum/category_item/autolathe/arms/speedloader_44_rubber - name = "speedloader (.44 rubber)" - path =/obj/item/ammo_magazine/s44/rubber - hidden = 1 - -/datum/category_item/autolathe/arms/mag_44 - name = "magazine (.44)" - path =/obj/item/ammo_magazine/m44 - hidden = 1 - -/datum/category_item/autolathe/arms/mag_44_rubber - name = "magazine (.44 rubber)" - path =/obj/item/ammo_magazine/m44/rubber - hidden = 1 - -/datum/category_item/autolathe/arms/classic_smg_9mm - name = "SMG magazine (9mm)" - path = /obj/item/ammo_magazine/m9mml - hidden = 1 diff --git a/code/datums/autolathe/autolathe.dm b/code/datums/autolathe/autolathe.dm deleted file mode 100644 index eac7c2c2ddfd..000000000000 --- a/code/datums/autolathe/autolathe.dm +++ /dev/null @@ -1,75 +0,0 @@ -/datum/category_item/autolathe/New() - ..() - var/obj/item/I = new path() - if(I.matter && !resources) - resources = list() - for(var/material in I.matter) - var/coeff = (no_scale ? 1 : 1.25) //Most objects are more expensive to produce than to recycle - resources[material] = I.matter[material]*coeff //But if it's a sheet or RCD cartridge, it's 1:1 - if(is_stack) - if(istype(I, /obj/item/stack)) - var/obj/item/stack/IS = I - max_stack = IS.max_amount - else - max_stack = 10 - qdel(I) - -/**************************** -* Category Collection Setup * -****************************/ - -/datum/category_collection/autolathe - category_group_type = /datum/category_group/autolathe - -/************* -* Categories * -*************/ - -/datum/category_group/autolathe - -/datum/category_group/autolathe/all - name = "All" - category_item_type = /datum/category_item/autolathe - -///datum/category_group/autolathe/all/New() - -/datum/category_group/autolathe/arms - name = "Arms and Ammunition" - category_item_type = /datum/category_item/autolathe/arms - -/datum/category_group/autolathe/devices - name = "Devices and Components" - category_item_type = /datum/category_item/autolathe/devices - -/datum/category_group/autolathe/engineering - name = "Engineering" - category_item_type = /datum/category_item/autolathe/engineering - -/datum/category_group/autolathe/general - name = "General" - category_item_type = /datum/category_item/autolathe/general - -/datum/category_group/autolathe/medical - name = "Medical" - category_item_type = /datum/category_item/autolathe/medical - -/datum/category_group/autolathe/tools - name = "Tools" - category_item_type = /datum/category_item/autolathe/tools - -/******************* -* Category entries * -*******************/ - -/datum/category_item/autolathe - var/path - var/list/resources - var/hidden - var/power_use = 0 - var/is_stack // Creates multiple of an item if applied to non-stack items - var/max_stack - var/no_scale - var/man_rating = 0 - -/datum/category_item/autolathe/dd_SortValue() - return name diff --git a/code/datums/autolathe/devices.dm b/code/datums/autolathe/devices.dm deleted file mode 100644 index 3ba11f4269d8..000000000000 --- a/code/datums/autolathe/devices.dm +++ /dev/null @@ -1,46 +0,0 @@ -/datum/category_item/autolathe/devices/consolescreen - name = "console screen" - path =/obj/item/stock_parts/console_screen - -/datum/category_item/autolathe/devices/igniter - name = "igniter" - path =/obj/item/assembly/igniter - -/datum/category_item/autolathe/devices/signaler - name = "signaler" - path =/obj/item/assembly/signaler - -/datum/category_item/autolathe/devices/sensor_infra - name = "infrared sensor" - path =/obj/item/assembly/infra - -/datum/category_item/autolathe/devices/timer - name = "timer" - path =/obj/item/assembly/timer - -/datum/category_item/autolathe/devices/sensor_prox - name = "proximity sensor" - path =/obj/item/assembly/prox_sensor - -/datum/category_item/autolathe/devices/beartrap - name = "mechanical trap" - path =/obj/item/beartrap - -/datum/category_item/autolathe/devices/cell_charger_kit //cit edit - name = "cell charger kit" - path =/obj/item/cell_charger_kit - -/datum/category_item/autolathe/devices/electropack - name = "electropack" - path =/obj/item/radio/electropack - hidden = 1 - -/datum/category_item/autolathe/devices/geiger - name = "geiger counter" - path =/obj/item/geiger_counter - -//! ## VR FILE MERGE ## !// - -/datum/category_item/autolathe/devices/sleevecard - name = "sleevecard" - path =/obj/item/sleevecard diff --git a/code/datums/autolathe/engineering.dm b/code/datums/autolathe/engineering.dm deleted file mode 100644 index bc75e2025d08..000000000000 --- a/code/datums/autolathe/engineering.dm +++ /dev/null @@ -1,117 +0,0 @@ -/datum/category_item/autolathe/engineering/airlockmodule - name = "airlock electronics" - path =/obj/item/airlock_electronics - -/datum/category_item/autolathe/engineering/airalarm - name = "air alarm electronics" - path =/obj/item/circuitboard/airalarm - -/datum/category_item/autolathe/engineering/firealarm - name = "fire alarm electronics" - path =/obj/item/circuitboard/firealarm - -/datum/category_item/autolathe/engineering/powermodule - name = "power control module" - path =/obj/item/module/power_control - -/datum/category_item/autolathe/engineering/statusdisplay - name = "status display electronics" - path =/obj/item/circuitboard/status_display - -/datum/category_item/autolathe/engineering/aistatusdisplay - name = "ai status display electronics" - path =/obj/item/circuitboard/ai_status_display - -/datum/category_item/autolathe/engineering/newscaster - name = "newscaster electronics" - path =/obj/item/circuitboard/newscaster - -/datum/category_item/autolathe/engineering/atm - name = "atm electronics" - path =/obj/item/circuitboard/atm - -/datum/category_item/autolathe/engineering/intercom - name = "intercom electronics" - path =/obj/item/circuitboard/intercom - -/datum/category_item/autolathe/engineering/holopad - name = "holopad electronics" - path =/obj/item/circuitboard/holopad - -/datum/category_item/autolathe/engineering/guestpass - name = "guestpass console electronics" - path =/obj/item/circuitboard/guestpass - -/datum/category_item/autolathe/engineering/entertainment - name = "entertainment camera electronics" - path =/obj/item/circuitboard/security/telescreen/entertainment - -/datum/category_item/autolathe/engineering/keycard - name = "keycard authenticator electronics" - path =/obj/item/circuitboard/keycard_auth - -/datum/category_item/autolathe/engineering/photocopier - name = "photocopier electronics" - path =/obj/item/circuitboard/photocopier - -/datum/category_item/autolathe/engineering/fax - name = "fax machine electronics" - path =/obj/item/circuitboard/fax - -/datum/category_item/autolathe/engineering/papershredder - name = "paper shredder electronics" - path =/obj/item/circuitboard/papershredder - -/datum/category_item/autolathe/engineering/microwave - name = "microwave electronics" - path =/obj/item/circuitboard/microwave - -/datum/category_item/autolathe/engineering/washing - name = "washing machine electronics" - path =/obj/item/circuitboard/washing - -/datum/category_item/autolathe/engineering/request - name = "request console electronics" - path =/obj/item/circuitboard/request - -/datum/category_item/autolathe/engineering/pipelayer - name = "pipe layer electronics" - path =/obj/item/circuitboard/pipelayer - -/datum/category_item/autolathe/engineering/motor - name = "motor" - path =/obj/item/stock_parts/motor - -/datum/category_item/autolathe/engineering/gear - name = "gear" - path =/obj/item/stock_parts/gear - -/datum/category_item/autolathe/engineering/spring - name = "spring" - path =/obj/item/stock_parts/spring - -/datum/category_item/autolathe/engineering/rcd_ammo - name = "matter cartridge" - path =/obj/item/rcd_ammo - -/datum/category_item/autolathe/engineering/rcd - name = "rapid construction device" - path =/obj/item/rcd - -/datum/category_item/autolathe/engineering/camera_assembly - name = "camera assembly" - path =/obj/item/camera_assembly - -/datum/category_item/autolathe/engineering/rpd - name = "rapid piping device" - path =/obj/item/pipe_dispenser - -//! ## VR FILE MERGE ## !// - -/datum/category_item/autolathe/engineering/timeclock - name = "timeclock electronics" - path =/obj/item/circuitboard/timeclock - -/datum/category_item/autolathe/engineering/id_restorer - name = "ID restoration console electronics" - path =/obj/item/circuitboard/id_restorer diff --git a/code/datums/autolathe/general.dm b/code/datums/autolathe/general.dm deleted file mode 100644 index 98c64e5ff079..000000000000 --- a/code/datums/autolathe/general.dm +++ /dev/null @@ -1,149 +0,0 @@ -/datum/category_item/autolathe/general/bucket - name = "bucket" - path =/obj/item/reagent_containers/glass/bucket - -/datum/category_item/autolathe/general/cooler_bottle - name = "water-cooler bottle" - path =/obj/item/reagent_containers/glass/cooler_bottle - -/datum/category_item/autolathe/general/drinkingglass_square - name = "half-pint glass" - path =/obj/item/reagent_containers/food/drinks/glass2/square - -/datum/category_item/autolathe/general/drinkingglass_rocks - name = "rocks glass" - path =/obj/item/reagent_containers/food/drinks/glass2/rocks - -/datum/category_item/autolathe/general/drinkingglass_shake - name = "milkshake glass" - path =/obj/item/reagent_containers/food/drinks/glass2/shake - -/datum/category_item/autolathe/general/drinkingglass_cocktail - name = "cocktail glass" - path =/obj/item/reagent_containers/food/drinks/glass2/cocktail - -/datum/category_item/autolathe/general/drinkingglass_shot - name = "shot glass" - path =/obj/item/reagent_containers/food/drinks/glass2/shot - -/datum/category_item/autolathe/general/drinkingglass_pint - name = "pint glass" - path =/obj/item/reagent_containers/food/drinks/glass2/pint - -/datum/category_item/autolathe/general/drinkingglass_mug - name = "glass mug" - path =/obj/item/reagent_containers/food/drinks/glass2/mug - -/datum/category_item/autolathe/general/drinkingglass_wine - name = "wine glass" - path =/obj/item/reagent_containers/food/drinks/glass2/wine - -/datum/category_item/autolathe/general/drinkingglass_pitcher - name = "drinks pitcher" - path =/obj/item/reagent_containers/food/drinks/glass2/pitcher - -/datum/category_item/autolathe/general/flashlight - name = "flashlight" - path =/obj/item/flashlight - -/datum/category_item/autolathe/general/floor_light - name = "floor light" - path =/obj/machinery/floor_light - -/datum/category_item/autolathe/general/extinguisher - name = "extinguisher" - path =/obj/item/extinguisher - -/datum/category_item/autolathe/general/jar - name = "jar" - path =/obj/item/glass_jar - -/datum/category_item/autolathe/general/radio_headset - name = "radio headset" - path =/obj/item/radio/headset - -/datum/category_item/autolathe/general/radio_bounced - name = "station bounced radio" - path =/obj/item/radio/off - -/datum/category_item/autolathe/general/suit_cooler - name = "suit cooling unit" - path =/obj/item/suit_cooling_unit - -/datum/category_item/autolathe/general/weldermask - name = "welding mask" - path =/obj/item/clothing/head/welding - -/datum/category_item/autolathe/general/metal - name = "steel sheets" - path =/obj/item/stack/material/steel - is_stack = TRUE - no_scale = TRUE //prevents material duplication exploits - -/datum/category_item/autolathe/general/glass - name = "glass sheets" - path =/obj/item/stack/material/glass - is_stack = TRUE - no_scale = TRUE //prevents material duplication exploits - -/datum/category_item/autolathe/general/rglass - name = "reinforced glass sheets" - path =/obj/item/stack/material/glass/reinforced - is_stack = TRUE - no_scale = TRUE //prevents material duplication exploits - -/datum/category_item/autolathe/general/rods - name = "metal rods" - path =/obj/item/stack/rods - is_stack = TRUE - no_scale = TRUE //prevents material duplication exploits - -/datum/category_item/autolathe/general/knife - name = "kitchen knife" - path =/obj/item/material/knife - -/datum/category_item/autolathe/general/taperecorder - name = "tape recorder" - path =/obj/item/tape_recorder - -/datum/category_item/autolathe/general/tube - name = "light tube" - path =/obj/item/light/tube - is_stack = TRUE - -/datum/category_item/autolathe/general/bulb - name = "light bulb" - path =/obj/item/light/bulb - is_stack = TRUE - -/datum/category_item/autolathe/general/bulb/fairy - name = "fairy light bulb" - path = "/obj/item/light/bulb/fairy" - -/datum/category_item/autolathe/general/ashtray_glass - name = "glass ashtray" - path =/obj/item/material/ashtray/glass - -/datum/category_item/autolathe/general/weldinggoggles - name = "welding goggles" - path =/obj/item/clothing/glasses/welding - -/datum/category_item/autolathe/general/maglight - name = "maglight" - path =/obj/item/flashlight/maglight - -/datum/category_item/autolathe/general/handcuffs - name = "handcuffs" - path =/obj/item/handcuffs - hidden = 1 - -/datum/category_item/autolathe/general/spike - name = "jagged spike" - path = /obj/item/melee/spike - hidden = 1 - -//! ## VR FILE MERGE ## !// - -/datum/category_item/autolathe/general/holocollar - name = "Holo-collar" - path =/obj/item/clothing/accessory/collar/holo diff --git a/code/datums/autolathe/medical.dm b/code/datums/autolathe/medical.dm deleted file mode 100644 index fe7f74203f24..000000000000 --- a/code/datums/autolathe/medical.dm +++ /dev/null @@ -1,54 +0,0 @@ -/datum/category_item/autolathe/medical/scalpel - name = "scalpel" - path =/obj/item/surgical/scalpel - -/datum/category_item/autolathe/medical/circularsaw - name = "circular saw" - path =/obj/item/surgical/circular_saw - -/datum/category_item/autolathe/medical/surgicaldrill - name = "surgical drill" - path =/obj/item/surgical/surgicaldrill - -/datum/category_item/autolathe/medical/retractor - name = "retractor" - path =/obj/item/surgical/retractor - -/datum/category_item/autolathe/medical/cautery - name = "cautery" - path =/obj/item/surgical/cautery - -/datum/category_item/autolathe/medical/hemostat - name = "hemostat" - path =/obj/item/surgical/hemostat - -/datum/category_item/autolathe/medical/beaker - name = "glass beaker" - path =/obj/item/reagent_containers/glass/beaker - -/datum/category_item/autolathe/medical/beaker_large - name = "large glass beaker" - path =/obj/item/reagent_containers/glass/beaker/large - -/datum/category_item/autolathe/medical/vial - name = "glass vial" - path =/obj/item/reagent_containers/glass/beaker/vial -/datum/category_item/autolathe/medical/hypovial - name = "hypovial" - path =/obj/item/reagent_containers/glass/hypovial - -/datum/category_item/autolathe/medical/hypovial_large - name = "large hypovial" - path =/obj/item/reagent_containers/glass/hypovial/large - -/datum/category_item/autolathe/medical/syringe - name = "syringe" - path =/obj/item/reagent_containers/syringe - -/datum/category_item/autolathe/medical/implanter - name = "implanter" - path =/obj/item/implanter - -/datum/category_item/autolathe/medical/autoinjector - name = "empty autoinjector" - path =/obj/item/reagent_containers/hypospray/autoinjector/empty diff --git a/code/datums/autolathe/tools.dm b/code/datums/autolathe/tools.dm deleted file mode 100644 index 450ec511e9f4..000000000000 --- a/code/datums/autolathe/tools.dm +++ /dev/null @@ -1,54 +0,0 @@ -/datum/category_item/autolathe/general/cable - name = "cable" - path =/obj/item/stack/cable_coil - is_stack = TRUE - no_scale = TRUE //prevents material duplication exploits - -/datum/category_item/autolathe/tools/crowbar - name = "crowbar" - path =/obj/item/tool/crowbar - -/datum/category_item/autolathe/tools/multitool - name = "multitool" - path =/obj/item/multitool - -/datum/category_item/autolathe/tools/t_scanner - name = "T-ray scanner" - path =/obj/item/t_scanner - -/datum/category_item/autolathe/tools/weldertool - name = "welding tool" - path =/obj/item/weldingtool - -/datum/category_item/autolathe/tools/electric_welder - name = "electric welding tool" - path =/obj/item/weldingtool/electric/unloaded - hidden = 1 - -/datum/category_item/autolathe/tools/screwdriver - name = "screwdriver" - path =/obj/item/tool/screwdriver - -/datum/category_item/autolathe/tools/wirecutters - name = "wirecutters" - path =/obj/item/tool/wirecutters - -/datum/category_item/autolathe/tools/wrench - name = "wrench" - path =/obj/item/tool/wrench - -/datum/category_item/autolathe/tools/hatchet - name = "hatchet" - path =/obj/item/material/knife/machete/hatchet - -/datum/category_item/autolathe/tools/minihoe - name = "mini hoe" - path =/obj/item/material/minihoe - -/datum/category_item/autolathe/tools/welder_industrial - name = "industrial welding tool" - path =/obj/item/weldingtool/largetank - -/datum/category_item/autolathe/tools/prybar - name = "prybar" - path =/obj/item/tool/prybar diff --git a/code/datums/changelog/changelog.dm b/code/datums/changelog.dm similarity index 100% rename from code/datums/changelog/changelog.dm rename to code/datums/changelog.dm diff --git a/code/datums/design/design.dm b/code/datums/design/design.dm new file mode 100644 index 000000000000..bf49e747e31f --- /dev/null +++ b/code/datums/design/design.dm @@ -0,0 +1,203 @@ +/** + * design datums for holding what lathes can print. + * + * relevant bitfields are in [code/__DEFINES/machines/lathe.dm] + */ +/datum/design + /// Abstract type. + abstract_type = /datum/design + + //? Design Data - Core + /// Must be unique - id of design in CamelCase. + var/id + /// design flags - see [code/__DEFINES/datums/design.dm] + var/design_flags = NONE + /// how are we unlocked - see [code/__DEFINES/datums/design.dm] + var/design_unlock = NONE + /// is stack? autodetected. + var/is_stack = FALSE + /// max stack amount? autodetected. + var/max_stack + + //? Design Data - UI + /// name of design, shows in UIs. this is usually built from build_name. do *not* manually set this most of the time. + var/name + /// desc of design, shows in UIs. if null, it'll be auto-detected from the build_path if possible. + var/desc + /// overrides build_name for purposes of name generation. + var/design_name + /// category - string or list, or null; null results in undefined behavior depending on UI. + var/category = "Misc" + + //? Build Data + /// name of item before any name-generation is done. also shown in ui. if null, it'll be auto-detected from the build_path if possible. + var/build_name + /// desc of item before any desc-generation is done. also shown in ui. if null, it'll be auto-detected from the build_path if possible. + var/build_desc + /// type of what we build + var/build_path + /// types of lathes that can print us + var/lathe_type = NONE + /// time needed in deciseconds - for stacks, this is time *PER SHEET*. + var/work = 5 SECONDS + + //? Build Costs + /// list of materials needed - typepath or id to amount. null to auto-detect from the object in question. list() for no cost (DANGEROUS). + var/list/materials + /// for variable-material designs: assoc list of key to amounts + /// the key will be fed into print() during creation with the material id the user picked + /// autodetected if null. + /// this should obviously match material_parts on the /obj in question. + var/list/material_parts + /// Items needed, as ingredients list - see [code/__HELPERS/datastructs/ingredients.dm] + var/list/ingredients + /// list of reagents needed - typepath or id to amount. null to auto-detect from the object in question. list() for no cost (DANGEROUS). + var/list/reagents + // todo: reagent_parts? + + //? legacy + ///IDs of that techs the object originated from and the minimum level requirements. + var/list/req_tech = list() + +/datum/design/New() + autodetect() + generate() + +/datum/design/proc/autodetect() + if(isnull(build_path)) + return + if(ispath(build_path, /obj/item/stack)) + is_stack = TRUE + var/obj/item/stack/stack_path = build_path + max_stack = initial(stack_path.max_amount) + var/obj/item/instance = SSatoms.instance_atom_immediate(build_path) + // lathe designs shouldn't be qdeleting, but incase someone puts in a random.. + if(QDELETED(instance)) + return + // todo: maybe /obj/proc/detect_materials, /obj/proc/detect_material_parts ? this works fine for now tho. + if(isnull(materials)) + if(!isnull(instance.materials)) + materials = instance.materials.Copy() + if(!isnull(materials) && !isnull(instance.material_parts) && !isnull(instance.material_defaults)) + // subtract out the material defaults the instance itself added + for(var/key in instance.material_parts) + materials[instance.material_defaults[key]] -= instance.material_parts[key] + if(isnull(material_parts)) + if(!isnull(instance.material_parts)) + material_parts = instance.material_parts.Copy() + if(isnull(reagents)) + // if(!isnull(instance.reagents)) + // reagents = instance.reagents.Copy() + // detected_materials = TRUE + reagents = list() // nah no autodetect for now, reagents are way to ocomplicated + if(!build_name) + build_name = instance.name + if(!build_desc) + build_desc = instance.desc + qdel(instance) + +/datum/design/proc/generate() + if(!name) + name = generate_name(design_name || build_name) + if(!desc) + desc = generate_desc(design_name || build_name, build_desc) + +/datum/design/proc/generate_name(template) + return template + +/datum/design/proc/generate_desc(template_name, template_desc) + return template_desc + +/** + * Encodes data for [tgui/packages/tgui/interfaces/common/Design.tsx] + */ +/datum/design/proc/ui_data_list() + return list( + "name" = name, + "desc" = desc, + "id" = id, + "work" = work, + "category" = category, + "materials" = length(materials)? materials : null, + "material_parts" = length(material_parts)? material_parts : null, + "reagents" = length(reagents)? reagents : null, + "ingredients" = length(ingredients)? ingredients : null, + "resultItem" = list( + "name" = build_name, + "desc" = build_desc, + ), + ) + +/** + * Return a new instance of the item for the design + * This is called even before the fabricator can touch the item. + * + * @params + * * where - where to put the finished product + * * fabricator - the lathe printing the product + * + * @return created atom, or list of created atoms. + */ +/datum/design/proc/print(atom/where, amount, list/material_parts, list/ingredient_parts, list/reagent_parts, cost_multiplier = 1) + if(is_stack) + var/stack_size = max_stack + if(stack_size >= amount) + . = new build_path(where, amount) + on_print(., material_parts, ingredient_parts, reagent_parts, cost_multiplier) + else + . = list() + var/safety = 0 + var/left = amount + var/atom/made + while(left) + if(++safety > 50) + CRASH("way too high") + var/making = min(left, stack_size) + made = new build_path(where, making) + left -= making + . += made + on_print(made, material_parts, ingredient_parts, reagent_parts, cost_multiplier) + else + if(amount > 50) + STACK_TRACE("way too high") + if(amount == 1) + . = new build_path(where) + on_print(., material_parts, ingredient_parts, reagent_parts, cost_multiplier) + else + . = list() + var/atom/made + for(var/i in 1 to min(amount, 50)) + made = new build_path(where) + on_print(made, material_parts, ingredient_parts, reagent_parts, cost_multiplier) + . += made + +/datum/design/proc/on_print(atom/created, list/material_parts, list/ingredient_parts, list/reagent_parts, cost_multiplier = 1) + if(isobj(created)) + var/obj/O = created + var/list/effective_materials = materials.Copy() + for(var/key in material_parts) + effective_materials[material_parts[key]] += src.material_parts[key] + if(cost_multiplier != 1) + for(var/key in effective_materials) + effective_materials[key] *= cost_multiplier + O.materials = effective_materials + O.set_material_parts(material_parts) + +/** + * called when a lathe prints a design, instead of print() + * + * @params + * * where - where to put the finished product + * * fabricator - the lathe printing the product + * * material_parts - assoc list of materials to use, based on the variable of the same name + */ +/datum/design/proc/lathe_print(atom/where, amount, list/material_parts, list/ingredient_parts, list/reagent_parts, obj/machinery/lathe/fabricator, cost_multiplier = 1) + return print(where, amount, material_parts, ingredient_parts, reagent_parts, cost_multiplier) + +//? legacy below + +/** + * for legacy lathes + */ +/datum/design/proc/legacy_print(atom/where, fabricator) + return print(where, 1) diff --git a/code/datums/design/design_holder.dm b/code/datums/design/design_holder.dm new file mode 100644 index 000000000000..f0540aac04a0 --- /dev/null +++ b/code/datums/design/design_holder.dm @@ -0,0 +1,23 @@ +/datum/design_holder + /// any ids to specifically include + var/list/design_ids + /// owner datum - this can even be null, this is just so lathes don't delete "shared" holders. + var/datum/owner + +/datum/design_holder/New(datum/owner) + src.owner = owner + +/datum/design_holder/Destroy() + owner = null + return ..() + +/datum/design_holder/proc/available_ids() + RETURN_TYPE(/list) + return design_ids || list() + +/datum/design_holder/proc/available_designs() + RETURN_TYPE(/list) + return SSresearch.fetch_designs(available_ids()) + +/datum/design_holder/proc/has_id(id) + return id in available_ids() diff --git a/code/datums/design/designs/ammo/_ammo.dm b/code/datums/design/designs/ammo/_ammo.dm new file mode 100644 index 000000000000..708dda1b5f45 --- /dev/null +++ b/code/datums/design/designs/ammo/_ammo.dm @@ -0,0 +1,2 @@ +/datum/design/ammo + abstract_type = /datum/design/ammo diff --git a/code/datums/design/designs/ammo/lmg.dm b/code/datums/design/designs/ammo/lmg.dm new file mode 100644 index 000000000000..ca9444c7c352 --- /dev/null +++ b/code/datums/design/designs/ammo/lmg.dm @@ -0,0 +1,10 @@ +/datum/design/ammo/lmg + abstract_type = /datum/design/ammo/lmg + +/datum/design/ammo/lmg/m545mm + id = "AmmoLMG545mm" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/m545saw + + diff --git a/code/datums/design/designs/ammo/pistol.dm b/code/datums/design/designs/ammo/pistol.dm new file mode 100644 index 000000000000..fbc59829f718 --- /dev/null +++ b/code/datums/design/designs/ammo/pistol.dm @@ -0,0 +1,101 @@ +/datum/design/ammo/pistol + abstract_type = /datum/design/ammo/pistol + +/datum/design/ammo/pistol/a44 + id = "AmmoPistol44" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/m44 + +/datum/design/ammo/pistol/a44_rubber + id = "AmmoPistol44Rubber" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/m44/rubber + +/datum/design/ammo/pistol/a45 + id = "AmmoPistol45" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/m45 + +/datum/design/ammo/pistol/a45_hunter + id = "AmmoPistol45Hunter" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/m45/hunter + +/datum/design/ammo/pistol/a45_practice + id = "AmmoPistol45Practice" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/m45/practice + +/datum/design/ammo/pistol/a45_rubber + id = "AmmoPistol45Rubber" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/m45/rubber + +/datum/design/ammo/pistol/a45_flash + id = "AmmoPistol45Flash" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/m45/flash + +/datum/design/ammo/pistol/a45_uzi + id = "AmmoUzi45" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/m45uzi + +/datum/design/ammo/pistol/a9mm + id = "AmmoPistol9mm" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/m9mm + +/datum/design/ammo/pistol/a9mm_rubber + id = "AmmoPistol9mmRubber" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/m9mm/rubber + +/datum/design/ammo/pistol/a9mm_practice + id = "AmmoPistol9mmPractice" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/m9mm/practice + +/datum/design/ammo/pistol/a9mm_flash + id = "AmmoPistol9mmFlash" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/m9mm/flash + +/datum/design/ammo/pistol/compact + abstract_type = /datum/design/ammo/pistol/compact + +/datum/design/ammo/pistol/compact/a9mm + id = "AmmoCompact9mm" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/m9mm/compact + +/datum/design/ammo/pistol/compact/a9mm_rubber + id = "AmmoCompact9mmRubber" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/m9mm/compact/rubber + +/datum/design/ammo/pistol/compact/a9mm_practice + id = "AmmoCompact9mmPractice" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/m9mm/compact/practice + +/datum/design/ammo/pistol/compact/a9mm_flash + id = "AmmoCompact9mmFlash" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/m9mm/compact/flash diff --git a/code/datums/design/designs/ammo/revolver.dm b/code/datums/design/designs/ammo/revolver.dm new file mode 100644 index 000000000000..b82d458525cf --- /dev/null +++ b/code/datums/design/designs/ammo/revolver.dm @@ -0,0 +1,62 @@ +/datum/design/ammo/revolver + abstract_type = /datum/design/ammo/revolver + +/datum/design/ammo/revolver/a357 + id = "AmmoSpeedloader357" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/s357 + +/datum/design/ammo/revolver/a357_flash + id = "AmmoSpeedloader357Flash" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/s357/flash + +/datum/design/ammo/revolver/a357_stun + id = "AmmoSpeedloader357Stun" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/s357/stun + +/datum/design/ammo/revolver/a357_rubber + id = "AmmoSpeedloader357Rubber" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/s357/rubber + +/datum/design/ammo/revolver/a38 + id = "AmmoSpeedloader38" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/s38 + +/datum/design/ammo/revolver/a38_rubber + id = "AmmoSpeedloader38Rubber" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/s38/rubber + +/datum/design/ammo/revolver/a44 + id = "AmmoSpeedloader44" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/s44 + +/datum/design/ammo/revolver/a44_rubber + id = "AmmoSpeedloader44Rubber" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/s44/rubber + +/datum/design/ammo/revolver/a45 + id = "AmmoSpeedloader45" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/s45 + +/datum/design/ammo/revolver/a45_rubber + id = "AmmoSpeedloader45Rubber" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/s45/rubber diff --git a/code/datums/design/designs/ammo/rife.dm b/code/datums/design/designs/ammo/rife.dm new file mode 100644 index 000000000000..ca2de93240f2 --- /dev/null +++ b/code/datums/design/designs/ammo/rife.dm @@ -0,0 +1,44 @@ +/datum/design/ammo/rifle + abstract_type = /datum/design/ammo/rifle + +/datum/design/ammo/rifle/m762mm + id = "AmmoRifle762mm" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/m762 + +/datum/design/ammo/rifle/m545mm + id = "AmmoRifle545mm" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/m545 + +/datum/design/ammo/rifle/m545mm_practice + id = "AmmoRifle545mmPractice" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/m545/practice + +/datum/design/ammo/rifle/c545mm + id = "AmmoClip545mm" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/clip/c545 + +/datum/design/ammo/rifle/c545mm_practice + id = "AmmoClip545mmPractice" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/clip/c545/practice + +/datum/design/ammo/rifle/c762 + id = "AmmoClip762mm" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/clip/c762 + +/datum/design/ammo/rifle/c762_practice + id = "AmmoClip762mmPractice" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/clip/c762/practice diff --git a/code/datums/design/designs/ammo/shotgun.dm b/code/datums/design/designs/ammo/shotgun.dm new file mode 100644 index 000000000000..dabe1b82cb42 --- /dev/null +++ b/code/datums/design/designs/ammo/shotgun.dm @@ -0,0 +1,70 @@ +/datum/design/ammo/shotgun + abstract_type = /datum/design/ammo/shotgun + work = 2 SECONDS + +/datum/design/ammo/shotgun/blank + id = "AmmoShotshellBlank" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_casing/a12g/blank + +/datum/design/ammo/shotgun/beanbag + id = "AmmoShotshellBeanbag" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_casing/a12g/beanbag + +/datum/design/ammo/shotgun/slug + id = "AmmoShotshellSlug" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_casing/a12g + +/datum/design/ammo/shotgun/flare + id = "AmmoShotshellFlare" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_casing/a12g/flare + +/datum/design/ammo/shotgun/buckshot + id = "AmmoShotshellBuckshot" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_casing/a12g/pellet + +/datum/design/ammo/shotgun/stun + id = "AmmoShotshellStun" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_casing/a12g/stunshell + +/datum/design/ammo/shotgun/clip + abstract_type = /datum/design/ammo/shotgun/clip + +/datum/design/ammo/shotgun/clip/dual + abstract_type = /datum/design/ammo/shotgun/clip/dual + work = 5 SECONDS + +/datum/design/ammo/shotgun/clip/dual/beanbag + id = "ClipShotgunBeanbag2" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/clip/c12g/beanbag + +/datum/design/ammo/shotgun/clip/dual/slug + id = "ClipShotgunSlug2" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/clip/c12g + +/datum/design/ammo/shotgun/clip/dual/buckshot + id = "ClipShotgunBuckshot2" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/clip/c12g/pellet + +/datum/design/ammo/shotgun/pouch + id = "ShotgunShellPouch" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/shotholder diff --git a/code/datums/design/designs/ammo/smg.dm b/code/datums/design/designs/ammo/smg.dm new file mode 100644 index 000000000000..8c268b582b5c --- /dev/null +++ b/code/datums/design/designs/ammo/smg.dm @@ -0,0 +1,56 @@ +/datum/design/ammo/smg + abstract_type = /datum/design/ammo/smg + +/datum/design/ammo/smg/a9mm_t + id = "AmmoSMG9mmT" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/m9mmt + +/datum/design/ammo/smg/a9mm_hunter_t + id = "AmmoSMG9mmHunterT" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/m9mmt/hunter + +/datum/design/ammo/smg/a9mm_rubber_t + id = "AmmoSMG9mmRubberT" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/m9mmt/rubber + +/datum/design/ammo/smg/a9mm_practice_t + id = "AmmoSMG9mmPracticeT" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/m9mmt/practice + +/datum/design/ammo/smg/a9mm_flash_t + id = "AmmoSMG9mmFlashT" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/m9mmt/flash + +/datum/design/ammo/smg/a9mm + id = "AmmoSMG9mm" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/m9mml + +/datum/design/ammo/smg/a10mm + id = "AmmoSMG10mm" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/m10mm + +/datum/design/ammo/smg/a45tommy + id = "AmmoSMG45Tommy" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/m45tommy + +/datum/design/ammo/smg/a45tommydrum + id = "AmmoSMG45TommyDrum" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/ammo_magazine/m45tommydrum diff --git a/code/datums/design/designs/devices/assemblies.dm b/code/datums/design/designs/devices/assemblies.dm new file mode 100644 index 000000000000..fb6045085583 --- /dev/null +++ b/code/datums/design/designs/devices/assemblies.dm @@ -0,0 +1,52 @@ +/datum/design/assembly + abstract_type = /datum/design/assembly + work = 2.5 SECONDS + category = "Assemblies" + +/datum/design/assembly/igniter + id = "AseemblyIgniter" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/assembly/igniter + +/datum/design/assembly/signaler + id = "AseemblySignaler" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/assembly/signaler + +/datum/design/assembly/infrared + id = "AseemblyInfrared" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/assembly/infra + +/datum/design/assembly/timer + id = "AseemblyTimer" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/assembly/timer + +/datum/design/assembly/proximity + id = "AseemblyProximity" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/assembly/prox_sensor + +/datum/design/assembly/mousetrap + id = "AseemblyMousetrap" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/assembly/mousetrap + +/datum/design/assembly/voice + id = "AseemblyVoice" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/assembly/voice + +/datum/design/assembly/electropack + id = "AseemblyElectropack" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/radio/electropack diff --git a/code/datums/design/designs/devices/devices.dm b/code/datums/design/designs/devices/devices.dm new file mode 100644 index 000000000000..0a3a95c7386a --- /dev/null +++ b/code/datums/design/designs/devices/devices.dm @@ -0,0 +1,20 @@ +/datum/design/device + abstract_type = /datum/design/device + +/datum/design/device/radio_headset + id = "DeviceRadioHeadset" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/radio/headset + +/datum/design/device/radio_handheld + id = "DeviceRadioHandheld" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/radio/off + +/datum/design/device/suit_cooler + id = "DeviceSuitCooler" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/suit_cooling_unit/empty diff --git a/code/datums/design/designs/machines/assemblies.dm b/code/datums/design/designs/machines/assemblies.dm new file mode 100644 index 000000000000..d297e7a0cb73 --- /dev/null +++ b/code/datums/design/designs/machines/assemblies.dm @@ -0,0 +1,15 @@ +/datum/design/machine_assembly + abstract_type = /datum/design/machine_assembly + work = 7.5 SECONDS + +/datum/design/machine_assembly/cell_chargers + id = "MachineAssemblyCellCharger" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/cell_charger_kit + +/datum/design/machine_assembly/camera + id = "MachineAssemblyCamera" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/camera_assembly diff --git a/code/datums/design/designs/machines/circuits.dm b/code/datums/design/designs/machines/circuits.dm new file mode 100644 index 000000000000..d50ac0c7d887 --- /dev/null +++ b/code/datums/design/designs/machines/circuits.dm @@ -0,0 +1,117 @@ +/datum/design/machine_circuit + abstract_type = /datum/design/machine_circuit + category = "Machine Circuits" + +/datum/design/machine_circuit/airalarm + id = "CircuitAirAlarm" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/circuitboard/airalarm + +/datum/design/machine_circuit/firealarm + id = "CircuitFireAlarm" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/circuitboard/firealarm + +/datum/design/machine_circuit/apc + id = "CircuitAPC" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/module/power_control + +/datum/design/machine_circuit/statusdisplay + id = "CircuitStatusDisplay" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/circuitboard/status_display + +/datum/design/machine_circuit/aistatusdisplay + id = "CircuitAIStatusDisplay" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/circuitboard/ai_status_display + +/datum/design/machine_circuit/newscaster + id = "CircuitNewscaster" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/circuitboard/newscaster + +/datum/design/machine_circuit/atm + id = "CircuitATM" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/circuitboard/atm + +/datum/design/machine_circuit/intercom + id = "CircuitIntercom" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/circuitboard/intercom + +/datum/design/machine_circuit/holopad + id = "CircuitHolopad" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/circuitboard/machine/holopad + +/datum/design/machine_circuit/guestpass + id = "CircuitGuestpass" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/circuitboard/guestpass + +/datum/design/machine_circuit/entertainmentscreen + id = "CircuitEntertainmentScreen" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/circuitboard/security/telescreen/entertainment + +/datum/design/machine_circuit/keycardauth + id = "CircuitKeycardAuth" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/circuitboard/keycard_auth + +/datum/design/machine_circuit/photocopier + id = "CircuitPhotocopier" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/circuitboard/photocopier + +/datum/design/machine_circuit/fax + id = "CircuitFax" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/circuitboard/fax + +/datum/design/machine_circuit/papershredder + id = "CircuitPaperShredder" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/circuitboard/papershredder + +/datum/design/machine_circuit/microwave + id = "CircuitMicrowave" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/circuitboard/microwave + +/datum/design/machine_circuit/requestconsole + id = "CircuitRequestConsole" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/circuitboard/request + +/datum/design/machine_circuit/pipelayer + id = "CircuitPipeLayer" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/circuitboard/pipelayer + +/datum/design/machine_circuit/timeclock + id = "CircuitTimeclock" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/circuitboard/timeclock diff --git a/code/datums/design/designs/machines/parts.dm b/code/datums/design/designs/machines/parts.dm new file mode 100644 index 000000000000..12278ce09ff8 --- /dev/null +++ b/code/datums/design/designs/machines/parts.dm @@ -0,0 +1,58 @@ +/datum/design/stock_part + abstract_type = /datum/design/stock_part + work = 0.5 SECONDS + category = "Stock Parts" + +/datum/design/stock_part/manipulator + id = "PartManipulatorT1" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/stock_parts/manipulator + +/datum/design/stock_part/bin + id = "PartBinT1" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/stock_parts/matter_bin + +/datum/design/stock_part/scanner + id = "PartScannerT1" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/stock_parts/scanning_module + +/datum/design/stock_part/laser + id = "PartLaserT1" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/stock_parts/micro_laser + +/datum/design/stock_part/capacitor + id = "PartCapacitorT1" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/stock_parts/capacitor + +/datum/design/stock_part/screen + id = "PartScreen" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/stock_parts/console_screen + +/datum/design/stock_part/motor + id = "PartMotor" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/stock_parts/motor + +/datum/design/stock_part/spring + id = "PartSpring" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/stock_parts/spring + +/datum/design/stock_part/gear + id = "PartGear" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/stock_parts/gear diff --git a/code/datums/design/designs/medical/_medical.dm b/code/datums/design/designs/medical/_medical.dm new file mode 100644 index 000000000000..334d66612a87 --- /dev/null +++ b/code/datums/design/designs/medical/_medical.dm @@ -0,0 +1,3 @@ +/datum/design/medical + abstract_type = /datum/design/medical + category = "Medical" diff --git a/code/datums/design/designs/medical/chemistry.dm b/code/datums/design/designs/medical/chemistry.dm new file mode 100644 index 000000000000..58ae9631b977 --- /dev/null +++ b/code/datums/design/designs/medical/chemistry.dm @@ -0,0 +1,48 @@ +/datum/design/medical/chemistry + abstract_type = /datum/design/medical/chemistry + +/datum/design/medical/chemistry/beaker + id = "ChemistryBeaker" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/reagent_containers/glass/beaker + +/datum/design/medical/chemistry/beaker/large + id = "ChemistryBeakerLarge" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/reagent_containers/glass/beaker/large + +/datum/design/medical/chemistry/vial + id = "ChemistryVial" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/reagent_containers/glass/beaker/vial + +/datum/design/medical/chemistry/hypovial + id = "ChemistryHypovial" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/reagent_containers/glass/hypovial + +/datum/design/medical/chemistry/hypovial/large + id = "ChemistryHypovialLarge" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/reagent_containers/glass/hypovial/large + +/datum/design/medical/chemistry/syringe + id = "ChemistrySyringe" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/reagent_containers/syringe + +/datum/design/medical/chemistry/autoinjector + id = "ChemistryAutoinjector" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/reagent_containers/hypospray/autoinjector/empty + materials = list( + MAT_STEEL = 250, + MAT_GLASS = 250, + ) diff --git a/code/datums/design/designs/medical/misc.dm b/code/datums/design/designs/medical/misc.dm new file mode 100644 index 000000000000..ec69d7ea9eb5 --- /dev/null +++ b/code/datums/design/designs/medical/misc.dm @@ -0,0 +1,11 @@ +/datum/design/medical/syringe_gun_ammo + id = "AmmoSyringeCartridge" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/syringe_cartridge + +/datum/design/medical/implanter + id = "MedicalImplanter" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/implanter diff --git a/code/datums/design/designs/misc/_misc.dm b/code/datums/design/designs/misc/_misc.dm new file mode 100644 index 000000000000..042797ef0490 --- /dev/null +++ b/code/datums/design/designs/misc/_misc.dm @@ -0,0 +1,52 @@ +/datum/design/misc + abstract_type = /datum/design/misc + category = "General" + +/datum/design/misc/bucket + id = "ChemistryBucket" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/reagent_containers/glass/bucket + +/datum/design/misc/floor_light + id = "MiscFloorLight" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/machinery/floor_light + +/datum/design/misc/glass_jar + id = "MiscGlassJar" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/glass_jar + +/datum/design/misc/kitchen_knife + id = "MiscKitchenKnife" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/material/knife + +/datum/design/misc/light_tube + id = "MiscLightTube" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/light/tube + +/datum/design/misc/light_bulb + id = "MiscLightBulb" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/light/bulb + + +/datum/design/misc/light_fairy + id = "MiscLightFairy" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/light/bulb/fairy + +/datum/design/misc/glass_ashtray + id = "MiscGlassAshtray" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/material/ashtray/glass diff --git a/code/datums/design/designs/misc/drinking_glass.dm b/code/datums/design/designs/misc/drinking_glass.dm new file mode 100644 index 000000000000..142412a253ad --- /dev/null +++ b/code/datums/design/designs/misc/drinking_glass.dm @@ -0,0 +1,63 @@ +/datum/design/misc/cooler_bottle + id = "GlassWaterCooler" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/reagent_containers/glass/cooler_bottle + +/datum/design/misc/drink_glass + abstract_type = /datum/design/misc/drink_glass + work = 1 SECONDS + +/datum/design/misc/drink_glass/square + id = "GlassHalfPint" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/reagent_containers/food/drinks/glass2/square + +/datum/design/misc/drink_glass/rocks + id = "GlassRocks" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/reagent_containers/food/drinks/glass2/rocks + +/datum/design/misc/drink_glass/shake + id = "GlassMilkshake" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/reagent_containers/food/drinks/glass2/shake + +/datum/design/misc/drink_glass/cocktail + id = "GlassCocktail" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/reagent_containers/food/drinks/glass2/cocktail + +/datum/design/misc/drink_glass/shot + id = "GlassShot" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/reagent_containers/food/drinks/glass2/shot + +/datum/design/misc/drink_glass/pint + id = "GlassPint" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/reagent_containers/food/drinks/glass2/pint + +/datum/design/misc/drink_glass/mug + id = "GlassMug" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/reagent_containers/food/drinks/glass2/mug + +/datum/design/misc/drink_glass/wine + id = "GlassWine" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/reagent_containers/food/drinks/glass2/wine + +/datum/design/misc/drink_glass/pitcher + id = "GlassPitcher" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/reagent_containers/food/drinks/glass2/pitcher diff --git a/code/datums/design/designs/sheets.dm b/code/datums/design/designs/sheets.dm new file mode 100644 index 000000000000..f7652801a166 --- /dev/null +++ b/code/datums/design/designs/sheets.dm @@ -0,0 +1,23 @@ +/datum/design/sheet + abstract_type = /datum/design/sheet + +/datum/design/sheet/reinforced_glass + id = "SheetReinforcedGlass" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + materials = list( + MAT_STEEL = 1000, + MAT_GLASS = 2000, + ) + build_path = /obj/item/stack/material/glass/reinforced + work = 0.2 SECONDS + +/datum/design/sheet/metal_rods + id = "SheetSteelRods" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + materials = list( + MAT_STEEL = 1000 + ) + build_path = /obj/item/stack/rods + work = 0.1 SECONDS diff --git a/code/datums/design/designs/tools/_tool.dm b/code/datums/design/designs/tools/_tool.dm new file mode 100644 index 000000000000..f31c457e87cf --- /dev/null +++ b/code/datums/design/designs/tools/_tool.dm @@ -0,0 +1,3 @@ +/datum/design/tool + abstract_type = /datum/design/tool + category = "Tools" diff --git a/code/datums/design/designs/tools/engineering.dm b/code/datums/design/designs/tools/engineering.dm new file mode 100644 index 000000000000..7b30152e4ff7 --- /dev/null +++ b/code/datums/design/designs/tools/engineering.dm @@ -0,0 +1,24 @@ +/datum/design/tool/geiger + id = "ToolGeiger" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/geiger_counter + +/datum/design/tool/rcd + id = "ToolRCD" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/rcd + +/datum/design/tool/rpd + id = "ToolRPD" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/pipe_dispenser + +/datum/design/tool/rcd_ammo + id = "MatterCartridge" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + design_flags = DESIGN_NO_SCALE + build_path = /obj/item/rcd_ammo diff --git a/code/datums/design/designs/tools/general.dm b/code/datums/design/designs/tools/general.dm new file mode 100644 index 000000000000..ed687f1a45c8 --- /dev/null +++ b/code/datums/design/designs/tools/general.dm @@ -0,0 +1,118 @@ +/datum/design/tool/cable + id = "StackCableCoil" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + work = 0.1 SECONDS + build_path = /obj/item/stack/cable_coil + +/datum/design/tool/crowbar + id = "ToolCrowbar" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/tool/crowbar + +/datum/design/tool/multitool + id = "ToolMultitool" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/multitool + +/datum/design/tool/tray_scanner + id = "ToolTrayScanner" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/t_scanner + +/datum/design/tool/welder + id = "ToolWelder" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/weldingtool + +/datum/design/tool/industrial_welder + id = "ToolIndustrialWelder" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/weldingtool/largetank + +/datum/design/tool/electric_welder + id = "ToolElectricWelder" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/weldingtool/electric/unloaded + +/datum/design/tool/screwdriver + id = "ToolScrewdriver" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/tool/screwdriver + +/datum/design/tool/wirecutters + id = "ToolWirecutter" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/tool/wirecutters + +/datum/design/tool/wrench + id = "ToolWrench" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/tool/wrench + +/datum/design/tool/hatchet + id = "ToolHatchet" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/material/knife/machete/hatchet + +/datum/design/tool/minihoe + id = "ToolMinihoe" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/material/minihoe + materials = list(MAT_STEEL = 50) + material_parts = list( + "tip" = 250 + ) + +/datum/design/tool/prybar + id = "ToolPrybar" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/tool/prybar + +/datum/design/tool/flashlight + id = "ToolFlashlight" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/flashlight + +/datum/design/tool/maglight + id = "ToolMaglight" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/flashlight/maglight + +/datum/design/tool/welding_goggles + id = "ToolWeldingGoggles" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/clothing/glasses/welding + +/datum/design/tool/welding_mask + id = "ToolWeldingMask" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/clothing/head/welding + +/datum/design/tool/extinguisher + id = "ToolExtinguisher" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/extinguisher + +/datum/design/tool/extinguisher/mini + id = "ToolExtinguisherMini" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/extinguisher/mini diff --git a/code/datums/design/designs/tools/security.dm b/code/datums/design/designs/tools/security.dm new file mode 100644 index 000000000000..a1870c8b599f --- /dev/null +++ b/code/datums/design/designs/tools/security.dm @@ -0,0 +1,5 @@ +/datum/design/tool/handcuffs + id = "ToolHandcuffs" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/handcuffs diff --git a/code/datums/design/designs/tools/surgical.dm b/code/datums/design/designs/tools/surgical.dm new file mode 100644 index 000000000000..ed4bf5198b24 --- /dev/null +++ b/code/datums/design/designs/tools/surgical.dm @@ -0,0 +1,35 @@ +/datum/design/tool/scalpel + id = "ToolScalpel" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/surgical/scalpel + +/datum/design/tool/circular_saw + id = "ToolCircularSaw" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/surgical/circular_saw + +/datum/design/tool/surgical_drill + id = "ToolSurgicalDrill" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/surgical/surgicaldrill + +/datum/design/tool/retractor + id = "ToolRetractor" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/surgical/retractor + +/datum/design/tool/cautery + id = "ToolCautery" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/surgical/cautery + +/datum/design/tool/hemostat + id = "ToolHemostat" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/surgical/hemostat diff --git a/code/datums/design/designs/weapons/_weapons.dm b/code/datums/design/designs/weapons/_weapons.dm new file mode 100644 index 000000000000..9af3b23c8184 --- /dev/null +++ b/code/datums/design/designs/weapons/_weapons.dm @@ -0,0 +1,3 @@ +/datum/design/weapon + abstract_type = /datum/design/weapon + category = "Weapons" diff --git a/code/datums/design/designs/weapons/knives.dm b/code/datums/design/designs/weapons/knives.dm new file mode 100644 index 000000000000..107ec837c2a7 --- /dev/null +++ b/code/datums/design/designs/weapons/knives.dm @@ -0,0 +1,12 @@ + +/datum/design/weapon/tactical_knife + id = "WeaponTacticalKnife" + build_path = /obj/item/material/knife/tacknife + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + materials = list( + MAT_STEEL = 500, + ) + material_parts = list( + "blade" = 3000, + ) diff --git a/code/datums/design/designs/weapons/melee.dm b/code/datums/design/designs/weapons/melee.dm new file mode 100644 index 000000000000..907487746979 --- /dev/null +++ b/code/datums/design/designs/weapons/melee.dm @@ -0,0 +1,13 @@ +/datum/design/weapon/knuckle_duster + id = "WeaponKnuckleDusters" + build_path = /obj/item/clothing/gloves/knuckledusters + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + materials = list(MAT_STEEL = 2000) + +/datum/design/weapon/flamethrower + id = "WeaponFlamethrower" + build_path = /obj/item/flamethrower/full + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + diff --git a/code/datums/design/designs/weapons/misc.dm b/code/datums/design/designs/weapons/misc.dm new file mode 100644 index 000000000000..27d14790bec2 --- /dev/null +++ b/code/datums/design/designs/weapons/misc.dm @@ -0,0 +1,9 @@ +/datum/design/weapon/crafting_receiver + id = "WeaponModularReceiver" + lathe_type = LATHE_TYPE_AUTOLATHE + design_unlock = DESIGN_UNLOCK_INTRINSIC + build_path = /obj/item/weaponcrafting/receiver + materials = list( + MAT_STEEL = 8000, + MAT_GLASS = 2500, + ) diff --git a/code/datums/material_container.dm b/code/datums/material_container.dm new file mode 100644 index 000000000000..e487e63191af --- /dev/null +++ b/code/datums/material_container.dm @@ -0,0 +1,242 @@ +/datum/material_container + /// solid materials (so usually sheets), keyed by ID + var/list/stored + /// space available for materials - list with ids for specific, null for infinite, just a number for combined + var/list/capacity + +/datum/material_container/New(list/materials_capacity) + src.capacity = materials_capacity + +/datum/material_container/proc/set_capacity(new_capacity) + capacity = new_capacity + +/datum/material_container/proc/set_multiplied_capacity(new_capacity, multiplier = 1) + if(isnull(new_capacity)) + capacity = new_capacity + else if(isnum(new_capacity)) + capacity = new_capacity * multiplier + else if(islist(new_capacity)) + var/list/built = new_capacity + built = built.Copy() + for(var/key in built) + built[key] *= multiplier + capacity = built + +/** + * dumps everything out + * + * @params + * * where - where to put everything + */ +/datum/material_container/proc/dump_everything(atom/where) + if(isnull(stored)) + return + for(var/mat_id in stored) + var/datum/material/M = SSmaterials.get_material(mat_id) + if(isnull(M)) + continue + var/safety = 50 + var/sheets = round(stored[mat_id] / SHEET_MATERIAL_AMOUNT) + stored[mat_id] -= sheets * SHEET_MATERIAL_AMOUNT + var/obj/item/stack/stack_type = M.stack_type + if(!stack_type) + continue + var/stack_size = initial(stack_type.max_amount) + if(!stack_size) + continue + while(sheets > 0) + var/wanted = min(stack_size, sheets) + M.place_sheet(where, wanted) + sheets -= wanted + if(!--safety) + break + // if we somehow have remaining, which we shouldn't + stored[mat_id] += sheets * SHEET_MATERIAL_AMOUNT + +/** + * dumps x sheets of y material + * + * @params + * * where - where to dump + * * material - material id or instance + * * amount - sheets to dump; defaults to as many as possible + * + * @return sheets dumped + */ +/datum/material_container/proc/dump(atom/where, datum/material/material, amount = INFINITY) + if(!istype(material)) + material = SSmaterials.get_material(material) + var/can_dump = round(stored[material.id] / SHEET_MATERIAL_AMOUNT) + var/dumping = min(amount, can_dump) + stored[material.id] -= dumping * SHEET_MATERIAL_AMOUNT + var/safety = 50 + . = 0 + var/obj/item/stack/stack_type = material.stack_type + var/stack_size = initial(stack_type.max_amount) + if(!stack_type) + return 0 + while(dumping > 0) + var/wanted = min(stack_size, dumping) + material.place_sheet(where, wanted) + dumping -= wanted + . += wanted + if(!--safety) + break + +/** + * Inserts sheets + * + * Will use() / delete the sheets as needed + * + * If you want to just tick materials up, directly access the lists. + * + * @params + * * inserting - sheets + * * amount - max to insert + * * force - ignore capacity + * + * @return sheets consumed + */ +/datum/material_container/proc/insert_sheets(obj/item/stack/material/inserting, amount = INFINITY, force = FALSE) + if(!istype(inserting)) + return 0 + LAZYINITLIST(stored) + var/datum/material/mat = inserting.material + var/allowed = capacity_material_sheets(mat) + var/inserted = min(allowed, inserting.amount) + inserting.use(inserted) + stored[mat.id] += inserted * SHEET_MATERIAL_AMOUNT + return inserted + +/** + * has space for sheets + * + * @return sheets remaining of capacity + */ +/datum/material_container/proc/capacity_sheets(obj/item/stack/material/inserting) + if(!istype(inserting)) + return 0 + var/datum/material/mat = inserting.material + return capacity_material_sheets(mat) + +/** + * is this sheet instance allowed + */ +/datum/material_container/proc/allowed_sheets(obj/item/stack/material/inserting) + if(!istype(inserting)) + return 0 + return allowed_material(inserting.material) + +/** + * has space for material + * + * @params + * * mat - material instance + * + * @return number of sheets allowed + */ +/datum/material_container/proc/capacity_material_sheets(datum/material/mat) + if(isnull(capacity)) + return INFINITY + if(isnum(capacity)) + return max(0, round((capacity - total_stored()) / SHEET_MATERIAL_AMOUNT)) + if(islist(capacity)) + var/cap = capacity[mat.id] + var/cur = stored[mat.id] + if(isnull(cap)) + return 0 + return max(0, round((cap - cur) / SHEET_MATERIAL_AMOUNT)) + CRASH("what?") + +/** + * is this material allowed + */ +/datum/material_container/proc/allowed_material(datum/material/mat) + return isnull(capacity) || isnum(capacity) || !isnull(capacity[mat.id]) + +/** + * total utilization in units, not sheets + */ +/datum/material_container/proc/total_stored() + . = 0 + if(isnull(stored)) + return + for(var/key in stored) + . += stored[key] + +/** + * uses the given resources, failing if not enough + * + * @params + * * sheets - units of sheets to use + * * multiplier - multiplier for actual amount, for convenience + * + * @return TRUE / FALSE based on success / fail + */ +/datum/material_container/proc/checked_use(list/using, multiplier = 1) + if(!has(using, multiplier)) + return FALSE + return use(using, multiplier) + +/** + * uses the given resources + * + * @params + * * sheets - units of sheets to use + * * multiplier - multiplier to actual amount, for convenience + */ +/datum/material_container/proc/use(list/using, multiplier = 1) + if(isnull(stored)) + return + for(var/key in using) + if(isnull(stored[key])) + continue + stored[key] = max(0, stored[key] - using[key] * multiplier) + return TRUE + +/** + * checks if we have the given resources + * + * @params + * * sheets - units of sheets + * * multiplier - multiplier to actual amount, for convenience + */ +/datum/material_container/proc/has(list/wanted, multiplier = 1) + if(isnull(stored)) + return + for(var/key in wanted) + if(stored[key] < wanted[key] * multiplier) + return FALSE + return TRUE + +/** + * basically, divides by given resources and takes lowest. + */ +/datum/material_container/proc/has_multiple(list/wanted, multiplier = 1) + if(isnull(stored)) + return 0 + . = INFINITY + for(var/key in wanted) + if(!wanted[key]) + continue + . = min(., stored[key] / (wanted[key] * multiplier)) + if(!.) + return + +/datum/material_container/proc/has_space(list/materials, multiplier = 1) + LAZYINITLIST(stored) + if(isnull(capacity)) + return TRUE + if(isnum(capacity)) + var/tally = 0 + for(var/key in materials) + tally += materials[key] + return (capacity - (tally * multiplier + total_stored())) > 0 + +/datum/material_container/proc/add(list/materials, multiplier = 1) + LAZYINITLIST(stored) + for(var/key in materials) + stored[key] += materials[key] * multiplier + +/datum/material_container/proc/ui_storage_data() + . = isnull(stored)? list() : stored.Copy() diff --git a/code/datums/repositories/ammomaterial.dm b/code/datums/repositories/ammomaterial.dm index 0e6e8013eff7..0d9c5df39868 100644 --- a/code/datums/repositories/ammomaterial.dm +++ b/code/datums/repositories/ammomaterial.dm @@ -12,7 +12,7 @@ var/global/datum/repository/ammomaterial/ammo_repository = new() if(!(I in ammotypes)) ammotypes += I var/obj/item/ammo_casing/temp = new I - ammotypes[I] = temp.matter + ammotypes[I] = temp.materials qdel(temp) return ammotypes[I] diff --git a/code/datums/wires/autolathe.dm b/code/datums/wires/autolathe.dm deleted file mode 100644 index 114d0671f5a8..000000000000 --- a/code/datums/wires/autolathe.dm +++ /dev/null @@ -1,57 +0,0 @@ -/datum/wires/autolathe - holder_type = /obj/machinery/autolathe - wire_count = 6 - proper_name = "Autolathe" - -/datum/wires/autolathe/New(atom/_holder) - wires = list(WIRE_AUTOLATHE_HACK, WIRE_ELECTRIFY, WIRE_AUTOLATHE_DISABLE) - return ..() - -/datum/wires/autolathe/get_status() - . = ..() - var/obj/machinery/autolathe/A = holder - . += "The red light is [A.disabled ? "off" : "on"]." - . += "The green light is [A.shocked ? "off" : "on"]." - . += "The blue light is [A.hacked ? "off" : "on"]." - -/datum/wires/autolathe/interactable(mob/user) - var/obj/machinery/autolathe/A = holder - if(A.panel_open) - return TRUE - return FALSE - -/datum/wires/autolathe/on_cut(wire, mend) - var/obj/machinery/autolathe/A = holder - switch(wire) - if(WIRE_AUTOLATHE_HACK) - A.hacked = !mend - A.update_static_data(usr) - if(WIRE_ELECTRIFY) - A.shocked = !mend - if(WIRE_AUTOLATHE_DISABLE) - A.disabled = !mend - ..() - -/datum/wires/autolathe/on_pulse(wire) - if(is_cut(wire)) - return - var/obj/machinery/autolathe/A = holder - switch(wire) - if(WIRE_AUTOLATHE_HACK) - A.hacked = !A.hacked - A.update_static_data(usr) - spawn(50) - if(A && !is_cut(wire)) - A.hacked = FALSE - A.update_static_data(usr) - if(WIRE_ELECTRIFY) - A.shocked = !A.shocked - spawn(50) - if(A && !is_cut(wire)) - A.shocked = FALSE - if(WIRE_AUTOLATHE_DISABLE) - A.disabled = !A.disabled - spawn(50) - if(A && !is_cut(wire)) - A.disabled = FALSE - ..() diff --git a/code/game/atoms/atom.dm b/code/game/atoms/atom.dm index 6e3ebd8ba318..35dccecf3937 100644 --- a/code/game/atoms/atom.dm +++ b/code/game/atoms/atom.dm @@ -1117,3 +1117,12 @@ /atom/proc/auto_pixel_offset_to_center() set_base_pixel_y(get_centering_pixel_y_offset()) set_base_pixel_x(get_centering_pixel_x_offset()) + +//? materials + +/** + * get raw materials remaining in us as list (not reagents) + * used from everything from economy to lathe recycling + */ +/atom/proc/get_materials() + return list() diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm index 4c520d95b8b7..3c3ce515eb64 100644 --- a/code/game/gamemodes/nuclear/pinpointer.dm +++ b/code/game/gamemodes/nuclear/pinpointer.dm @@ -7,7 +7,7 @@ item_state = "electronic" throw_speed = 4 throw_range = 20 - matter = list(MAT_STEEL = 500) + materials = list(MAT_STEEL = 500) preserve_item = 1 var/obj/item/disk/nuclear/the_disk = null var/active = 0 diff --git a/code/game/machinery/_machinery.dm b/code/game/machinery/_machinery.dm index 20f0994585e7..0771ed8b1f7a 100644 --- a/code/game/machinery/_machinery.dm +++ b/code/game/machinery/_machinery.dm @@ -105,16 +105,21 @@ // todo: don't block rad contents and just have component parts be unable to be contaminated while inside // todo: wow rad contents is a weird system rad_flags = RAD_BLOCK_CONTENTS + // todo: anchored / unanchored should be replaced by movement force someday, how to handle that? //* Construction / Deconstruction - /// Can be constructed / deconstructed by players by default + /// Can be constructed / deconstructed by players by default. null for off, number for time needed. Panel must be open. // todo: proc for allow / disallow, refactor - var/allow_deconstruct = FALSE - /// Can be anchored / unanchored by players without deconstructing by default + var/default_deconstruct + /// Can have panel open / closed by players by default. null for off, number for time needed. You usually want 0 for instant. + var/default_panel + /// Can be anchored / unanchored by players without deconstructing by default with a wrench. null for off, number for time needed. // todo: proc for allow / disallow, refactor, unify with can_be_unanchored - var/allow_unanchor = FALSE - /// overlay state added when panel is open + var/default_unanchor + /// default icon state overlay for panel open var/panel_icon_state + /// is the maintenance panel open? + var/panel_open = FALSE //* unsorted var/machine_stat = 0 @@ -135,7 +140,6 @@ ///List of all the parts used to build it, if made from certain kinds of frames. var/list/component_parts = null var/uid - var/panel_open = FALSE var/global/gl_uid = 1 ///Sound played on succesful interface. Just put it in the list of vars at the start. var/clicksound @@ -189,14 +193,58 @@ qdel(A) return ..() +/obj/machinery/screwdriver_act(obj/item/I, mob/user, flags, hint) + if(!isnull(default_panel)) + default_deconstruction_screwdriver(user, I) + return TRUE + return ..() + +/obj/machinery/crowbar_act(obj/item/I, mob/user, flags, hint) + if(!isnull(default_deconstruct)) + default_deconstruction_crowbar(user, I) + return TRUE + return ..() + +/obj/machinery/wrench_act(obj/item/I, mob/user, flags, hint) + if(!isnull(default_unanchor)) + default_unfasten_wrench(user, I, default_unanchor) + return TRUE + return ..() + +/obj/machinery/dynamic_tool_functions(obj/item/I, mob/user) + . = ..() + if(!isnull(default_unanchor)) + COERCE_OPTIONS_LIST_IN(.[TOOL_WRENCH]) + .[TOOL_WRENCH] += anchored? "unfasten" : "fasten" + if(!isnull(default_deconstruct) && panel_open) + COERCE_OPTIONS_LIST_IN(.[TOOL_CROWBAR]) + .[TOOL_CROWBAR] += "deconstruct" + if(!isnull(default_panel)) + COERCE_OPTIONS_LIST_IN(.[TOOL_SCREWDRIVER]) + .[TOOL_SCREWDRIVER] += panel_open? "close panel" : "open panel" + +/obj/machinery/dynamic_tool_image(function, hint) + . = ..() + switch(hint) + if("unfasten") + return dyntool_image_backward(TOOL_WRENCH) + if("fasten") + return dyntool_image_forward(TOOL_WRENCH) + if("deconstruct") + return dyntool_image_backward(TOOL_CROWBAR) + if("open panel") + return dyntool_image_backward(TOOL_SCREWDRIVER) + if("close panel") + return dyntool_image_forward(TOOL_SCREWDRIVER) + +/obj/machinery/process(delta_time)//If you dont use process or power why are you here + return PROCESS_KILL + /obj/machinery/update_overlays() . = ..() if(panel_open && panel_icon_state) . += panel_icon_state -/obj/machinery/process()//If you dont use process or power why are you here - return PROCESS_KILL - /obj/machinery/emp_act(severity) if(use_power && machine_stat == NONE) use_power(7500/severity) @@ -212,6 +260,11 @@ qdel(pulse2) ..() +/obj/machinery/update_overlays() + . = ..() + if(panel_open && panel_icon_state) + . += panel_icon_state + /obj/machinery/legacy_ex_act(severity) switch(severity) if(1.0) diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm deleted file mode 100644 index 9256845dabba..000000000000 --- a/code/game/machinery/autolathe.dm +++ /dev/null @@ -1,365 +0,0 @@ -/obj/machinery/autolathe - name = "autolathe" - desc = "It produces items using metal and glass." - icon = 'icons/obj/machines/fabricators/autolathe.dmi' - icon_state = "autolathe" - density = TRUE - anchored = TRUE - use_power = USE_POWER_IDLE - idle_power_usage = 10 - active_power_usage = 2000 - clicksound = "keyboard" - clickvol = 30 - - circuit = /obj/item/circuitboard/autolathe - - var/static/datum/category_collection/autolathe/autolathe_recipes - var/list/stored_material = list(MAT_STEEL = 0, MAT_GLASS = 0) - var/list/storage_capacity = list(MAT_STEEL = 0, MAT_GLASS = 0) - - var/hacked = FALSE - var/disabled = FALSE - var/shocked = FALSE - var/busy = FALSE - - var/mat_efficiency = 1 - var/build_time = 50 - - var/datum/wires/autolathe/wires = null - - var/mb_rating = 0 - var/man_rating = 0 - - var/filtertext - -/obj/machinery/autolathe/Initialize(mapload) - . = ..() - if(!autolathe_recipes) - autolathe_recipes = new() - wires = new(src) - -/obj/machinery/autolathe/Destroy() - QDEL_NULL(wires) - return ..() - -/obj/machinery/autolathe/ui_interact(mob/user, datum/tgui/ui) - ui = SStgui.try_update_ui(user, src, ui) - if(!ui) - ui = new(user, src, "Autolathe", name) - ui.open() - -/obj/machinery/autolathe/ui_status(mob/user) - if(disabled) - return UI_CLOSE - return ..() - -/obj/machinery/autolathe/ui_static_data(mob/user) - var/list/data = ..() - - var/list/categories = list() - var/list/recipes = list() - for(var/datum/category_group/autolathe/A in autolathe_recipes.categories) - categories += A.name - for(var/datum/category_item/autolathe/M in A.items) - if(M.hidden && !hacked) - continue - if(M.man_rating > man_rating) - continue - recipes.Add(list(list( - "category" = A.name, - "name" = M.name, - "ref" = REF(M), - "requirements" = M.resources, - "hidden" = M.hidden, - "coeff_applies" = !M.no_scale, - ))) - data["recipes"] = recipes - data["categories"] = categories - - return data - -/obj/machinery/autolathe/ui_assets(mob/user) - return list( - get_asset_datum(/datum/asset/spritesheet/sheetmaterials) - ) - -/obj/machinery/autolathe/ui_data(mob/user, datum/tgui/ui, datum/ui_state/state) - var/list/data = ..() - - var/list/material_data = list() - for(var/mat_id in stored_material) - var/amount = stored_material[mat_id] - var/list/material_info = list( - "name" = mat_id, - "amount" = amount, - "sheets" = round(amount / SHEET_MATERIAL_AMOUNT), - "removable" = amount >= SHEET_MATERIAL_AMOUNT - ) - material_data += list(material_info) - data["busy"] = busy - data["materials"] = material_data - data["mat_efficiency"] = mat_efficiency - return data - -/obj/machinery/autolathe/interact(mob/user) - if(panel_open) - return wires.Interact(user) - - if(disabled) - to_chat(user, SPAN_DANGER("\The [src] is disabled!")) - return - - if(shocked) - shock(user, 50) - - ui_interact(user) - -/obj/machinery/autolathe/attackby(var/obj/item/O as obj, var/mob/user as mob) - if(busy) - to_chat(user, SPAN_NOTICE("\The [src] is busy. Please wait for completion of previous operation.")) - return - - if(default_deconstruction_screwdriver(user, O)) - interact(user) - return - if(default_deconstruction_crowbar(user, O)) - return - if(default_part_replacement(user, O)) - return - - if(machine_stat) - return - - if(panel_open) - //Don't eat multitools or wirecutters used on an open lathe. - if(O.is_multitool() || O.is_wirecutter()) - wires.Interact(user) - return - - if(O.loc != user && !(istype(O,/obj/item/stack))) - return FALSE - - if(is_robot_module(O)) - return FALSE - - if(istype(O,/obj/item/ammo_magazine/clip) || istype(O,/obj/item/ammo_magazine/s357) || istype(O,/obj/item/ammo_magazine/s38) || istype (O,/obj/item/ammo_magazine/s44)) - to_chat(user, "\The [O] is too hazardous to recycle with the autolathe!") - return - - ///Resources are being loaded. - var/obj/item/eating = O - if(!eating.matter) - to_chat(user, "\The [eating] does not contain significant amounts of useful materials and cannot be accepted.") - return - - ///Used to determine message. - var/filltype = 0 - ///Amount of material used. - var/total_used = 0 - ///Amount of material constituting one sheet. - var/mass_per_sheet = 0 - - for(var/material in eating.matter) - - if(isnull(stored_material[material]) || isnull(storage_capacity[material])) - continue - - if(stored_material[material] >= storage_capacity[material]) - continue - - var/total_material = eating.matter[material] - - //If it's a stack, we eat multiple sheets. - if(istype(eating,/obj/item/stack)) - var/obj/item/stack/stack = eating - total_material *= stack.get_amount() - - if(stored_material[material] + total_material > storage_capacity[material]) - total_material = storage_capacity[material] - stored_material[material] - filltype = 1 - else - filltype = 2 - - stored_material[material] += total_material - total_used += total_material - mass_per_sheet += eating.matter[material] - - if(!filltype) - to_chat(user, SPAN_NOTICE("\The [src] is full. Please remove material from the autolathe in order to insert more.")) - return - else if(filltype == 1) - to_chat(user, "You fill \the [src] to capacity with \the [eating].") - else - to_chat(user, "You fill \the [src] with \the [eating].") - - flick("autolathe_o", src) //Plays metal insertion animation. Work out a good way to work out a fitting animation. ~Z - - if(istype(eating,/obj/item/stack)) - var/obj/item/stack/stack = eating - stack.use(max(1, round(total_used/mass_per_sheet))) //Always use at least 1 to prevent infinite materials. - else - qdel(O) - - updateUsrDialog() - return - -/obj/machinery/autolathe/attack_hand(mob/user, list/params) - user.set_machine(src) - interact(user) - -/obj/machinery/autolathe/ui_act(action, list/params, datum/tgui/ui) - if(..()) - return TRUE - - usr.set_machine(src) - - if(busy) - to_chat(usr, SPAN_NOTICE("The autolathe is busy. Please wait for completion of previous operation.")) - return - - switch(action) - if("make") - var/datum/category_item/autolathe/making = locate(params["make"]) - if(!istype(making)) - return - if(making.hidden && !hacked) - return - - var/multiplier = 1 - - if(making.is_stack) - var/max_sheets - for(var/material in making.resources) - var/coeff = (making.no_scale ? 1 : mat_efficiency) //Stacks are unaffected by production coefficient - var/sheets = round(stored_material[material]/round(making.resources[material]*coeff)) - if(isnull(max_sheets) || max_sheets > sheets) - max_sheets = sheets - if(!isnull(stored_material[material]) && stored_material[material] < round(making.resources[material]*coeff)) - max_sheets = 0 - //Build list of multipliers for sheets. - multiplier = input(usr, "How many do you want to print? (0-[max_sheets])") as num|null - if(!multiplier || multiplier <= 0 || multiplier > max_sheets || ui_status(usr, ui.state) != UI_INTERACTIVE) - return FALSE - - busy = making.name - update_use_power(USE_POWER_ACTIVE) - - //Check if we still have the materials. - var/coeff = (making.no_scale ? 1 : mat_efficiency) //Stacks are unaffected by production coefficient - for(var/material in making.resources) - if(!isnull(stored_material[material])) - if(stored_material[material] < round(making.resources[material] * coeff) * multiplier) - return - - //Consume materials. - for(var/material in making.resources) - if(!isnull(stored_material[material])) - stored_material[material] = max(0, stored_material[material] - round(making.resources[material] * coeff) * multiplier) - - update_icon() //So lid closes - - sleep(build_time) - - busy = 0 - update_use_power(USE_POWER_IDLE) - update_icon() //So lid opens - - //Sanity check. - if(!making || !src) - return - - //Create the desired item. - var/obj/item/I = new making.path(src.loc) - flick("[initial(icon_state)]_finish", src) - if(multiplier > 1) - if(istype(I, /obj/item/stack)) - var/obj/item/stack/S = I - S.amount = multiplier - else - for(multiplier; multiplier > 1; --multiplier) //Create multiple items if it's not a stack. - new making.path(src.loc) - return TRUE - return FALSE - -/obj/machinery/autolathe/update_icon() - cut_overlays() - - icon_state = initial(icon_state) - - if(panel_open) - icon_state = "autolathe_t" - else if(busy) - icon_state = "autolathe_n" - else - if(icon_state == "autolathe_n") - flick("autolathe_u", src) //If lid WAS closed, show opening animation - icon_state = "autolathe" - -//Updates overall lathe storage size. -/obj/machinery/autolathe/RefreshParts() - ..() - var/mb_rating = 0 - var/man_rating = 0 - for(var/obj/item/stock_parts/matter_bin/MB in component_parts) - mb_rating += MB.rating - for(var/obj/item/stock_parts/manipulator/M in component_parts) - man_rating += M.rating - - storage_capacity[MAT_STEEL] = mb_rating * 25000 - storage_capacity[MAT_GLASS] = mb_rating * 12500 - build_time = 50 / man_rating - mat_efficiency = 1.1 - man_rating * 0.1 //Normally, price is 1.25 the amount of material, so this shouldn't go higher than 0.6. Maximum rating of parts is 5 - update_static_data(usr) - -/obj/machinery/autolathe/dismantle() - for(var/mat in stored_material) - var/datum/material/M = get_material_by_name(mat) - if(!istype(M)) - continue - var/obj/item/stack/material/S = new M.stack_type(get_turf(src)) - if(stored_material[mat] > S.perunit) - S.amount = round(stored_material[mat] / S.perunit) - else - qdel(S) - ..() - return 1 - -/datum/category_item/autolathe/arms/classic_smg_9mm - name = "SMG magazine (9mm)" - path = /obj/item/ammo_magazine/m9mml - hidden = 1 -/* De-coded? -/datum/category_item/autolathe/arms/classic_smg_9mmr - name = "SMG magazine (9mm rubber)" - path = /obj/item/ammo_magazine/m9mml/rubber - -/datum/category_item/autolathe/arms/classic_smg_9mmp - name = "SMG magazine (9mm practice)" - path = /obj/item/ammo_magazine/m9mml/practice - -/datum/category_item/autolathe/arms/classic_smg_9mmf - name = "SMG magazine (9mm flash)" - path = /obj/item/ammo_magazine/m9mml/flash -*/ - -// 0 amount = 0 means ejecting a full stack; -1 means eject everything -/obj/machinery/partslathe/proc/eject_materials(var/material, var/amount) - var/recursive = amount == -1 ? TRUE : FALSE - material = lowertext(material) - var/mattype - switch(material) - if(MAT_STEEL) - mattype = /obj/item/stack/material/steel - if(MAT_GLASS) - mattype = /obj/item/stack/material/glass - else - return - var/obj/item/stack/material/S = new mattype(loc) - if(amount <= 0) - amount = S.max_amount - var/ejected = min(round(materials[material] / S.perunit), amount) - if(!S.set_amount(min(ejected, amount))) - return - materials[material] -= ejected * S.perunit - if(recursive && materials[material] >= S.perunit) - eject_materials(material, -1) diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm index 962080398847..55550d1cf58b 100644 --- a/code/game/machinery/camera/camera_assembly.dm +++ b/code/game/machinery/camera/camera_assembly.dm @@ -6,7 +6,7 @@ w_class = ITEMSIZE_SMALL anchored = 0 - matter = list(MAT_STEEL = 700, MAT_GLASS = 300) + materials = list(MAT_STEEL = 700, MAT_GLASS = 300) // Motion, EMP-Proof, X-Ray var/list/obj/item/possible_upgrades = list(/obj/item/assembly/prox_sensor, /obj/item/stack/material/osmium, /obj/item/stock_parts/scanning_module) diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index 9fbbee1cd537..8002321d58f1 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -143,7 +143,7 @@ ) item_state = "syringe_kit" w_class = ITEMSIZE_NORMAL - matter = list(MAT_STEEL = 4000, MAT_GLASS = 1000) + materials = list(MAT_STEEL = 4000, MAT_GLASS = 1000) /obj/item/cell_charger_kit/attack_self(mob/user) . = ..() diff --git a/code/game/machinery/computer/id_restorer_vr.dm b/code/game/machinery/computer/id_restorer_vr.dm deleted file mode 100644 index e2489e6c1297..000000000000 --- a/code/game/machinery/computer/id_restorer_vr.dm +++ /dev/null @@ -1,99 +0,0 @@ -/obj/machinery/computer/id_restorer - name = "ID restoration terminal" - desc = "A terminal for restoration of damaged IDs. Mostly used for aftermath of unfortunate falls into vats of acid." - icon_state = "restorer" - icon_keyboard = null - light_color = "#11cc00" - layer = ABOVE_WINDOW_LAYER - icon_keyboard = null - icon = 'icons/obj/machines/id_restorer_vr.dmi' - density = FALSE - clicksound = null - circuit = /obj/item/circuitboard/id_restorer - - var/icon_success = "restorer_success" - var/icon_fail = "restorer_fail" - - var/obj/item/card/id/inserted - -/obj/machinery/computer/id_restorer/attackby(obj/I, mob/user) - if(istype(I, /obj/item/card/id) && !(istype(I,/obj/item/card/id/guest))) - if(!inserted) - if(!user.attempt_insert_item_for_installation(I, src)) - return - inserted = I - else if(inserted) - to_chat(user, "There is already ID card inside.") - return - ..() - -/obj/machinery/computer/id_restorer/attack_hand(mob/user, list/params) - if(..()) - return - if(machine_stat & (NOPOWER|BROKEN)) - return - - var/choice = alert(user,"What do you want to do?","[src]","Restore ID access","Eject ID","Cancel") - if(user.incapacitated() || (get_dist(src, user) > 1)) - return - switch(choice) - if("Restore ID access") - if(!inserted) - to_chat(user, "No ID is inserted.") - return - var/mob/living/carbon/human/H = user - if(!(istype(H))) - to_chat(user, "Invalid user detected. Access denied.") - flick(icon_fail, src) - return - else if((H.wear_mask && (H.wear_mask.inv_hide_flags & HIDEFACE)) || (H.head && (H.head.inv_hide_flags & HIDEFACE))) //Face hiding bad - to_chat(user, "Facial recognition scan failed due to physical obstructions. Access denied.") - flick(icon_fail, src) - return - else if(H.get_face_name() == "Unknown" || !(H.real_name == inserted.registered_name)) - to_chat(user, "Facial recognition scan failed. Access denied.") - flick(icon_fail, src) - return - else if(LAZYLEN(inserted.lost_access) && !(LAZYLEN(inserted.access))) - inserted.access = inserted.lost_access - inserted.lost_access = list() - inserted.desc = "A partially digested card that has seen better days. The damage to access codes, however, appears to have been mitigated." - to_chat(user, "ID access codes successfully restored.") - flick(icon_success, src) - return - else if(!(LAZYLEN(inserted.lost_access))) - to_chat(user, "No recent access codes damage detected. Restoration cancelled.") - return - else - to_chat(user, "Terminal encountered unknown error. Contact system administrator or try again.") - flick(icon_fail, src) - return - if("Eject ID") - if(!inserted) - to_chat(user, "No ID is inserted.") - return - if(ishuman(user)) - inserted.forceMove(get_turf(src)) - if(!user.get_active_held_item()) - user.put_in_hands(inserted) - inserted = null - else - inserted.forceMove(get_turf(src)) - inserted = null - return - if("Cancel") - return - - -//Frame -/datum/frame/frame_types/id_restorer - name = "ID Restoration Terminal" - frame_class = FRAME_CLASS_DISPLAY - frame_size = 2 - frame_style = FRAME_STYLE_WALL - x_offset = 30 - y_offset = 30 - icon_override = 'icons/obj/machines/id_restorer_vr.dmi' - -/datum/frame/frame_types/id_restorer/get_icon_state(var/state) - return "restorer_b[state]" diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 7e8513bf1486..839784f07415 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -647,7 +647,7 @@ About the new airlock wires panel: if (istype(mover, /obj/item)) var/obj/item/i = mover if(world.time > last_spark + 2 SECONDS) - if (i.matter && (MAT_STEEL in i.matter) && i.matter[MAT_STEEL] > 0) + if (i.materials && (MAT_STEEL in i.materials) && i.materials[MAT_STEEL] > 0) var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread() s.set_up(5, 1, src) s.start() diff --git a/code/game/machinery/doors/airlock_electronics.dm b/code/game/machinery/doors/airlock_electronics.dm index 072da162eb15..988e37fc6206 100644 --- a/code/game/machinery/doors/airlock_electronics.dm +++ b/code/game/machinery/doors/airlock_electronics.dm @@ -4,7 +4,7 @@ icon_state = "door_electronics" w_class = ITEMSIZE_SMALL //It should be tiny! -Agouri - matter = list(MAT_STEEL = 50, MAT_GLASS = 50) + materials = list(MAT_STEEL = 50, MAT_GLASS = 50) var/list/conf_req_access var/list/conf_req_one_access diff --git a/code/game/machinery/fire_alarm.dm b/code/game/machinery/fire_alarm.dm index 14264d8ffbdf..acae368d42e1 100644 --- a/code/game/machinery/fire_alarm.dm +++ b/code/game/machinery/fire_alarm.dm @@ -278,7 +278,7 @@ Just a object used in constructing fire alarms icon_state = "door_electronics" desc = "A circuit. It has a label on it, it says \"Can handle heat levels up to 40 degrees celsius!\"" w_class = ITEMSIZE_SMALL - matter = list(MAT_STEEL = 50, MAT_GLASS = 50) + materials = list(MAT_STEEL = 50, MAT_GLASS = 50) */ /obj/machinery/partyalarm name = "\improper PARTY BUTTON" diff --git a/code/game/machinery/floor_light.dm b/code/game/machinery/floor_light.dm index fc6a7acd7e00..54145073c6c8 100644 --- a/code/game/machinery/floor_light.dm +++ b/code/game/machinery/floor_light.dm @@ -11,7 +11,7 @@ var/list/floor_light_cache = list() idle_power_usage = 2 active_power_usage = 20 power_channel = LIGHT - matter = list(MAT_STEEL = 2500, MAT_GLASS = 2750) + materials = list(MAT_STEEL = 2500, MAT_GLASS = 2750) var/on var/damaged diff --git a/code/game/machinery/holopad.dm b/code/game/machinery/holopad.dm index 7edde2b10cc5..7f53db686258 100644 --- a/code/game/machinery/holopad.dm +++ b/code/game/machinery/holopad.dm @@ -13,11 +13,10 @@ GLOBAL_LIST_EMPTY(holopad_lookup) GLOBAL_VAR_INIT(holopad_connectivity_rebuild_queued, FALSE) -/obj/item/circuitboard/holopad +/obj/item/circuitboard/machine/holopad name = T_BOARD("holopad") build_path = /obj/machinery/holopad board_type = new /datum/frame/frame_types/holopad - matter = list(MAT_STEEL = 50, MAT_GLASS = 50) /obj/machinery/holopad name = "holopad" @@ -28,7 +27,7 @@ GLOBAL_VAR_INIT(holopad_connectivity_rebuild_queued, FALSE) anchored = TRUE atom_flags = ATOM_HEAR show_messages = TRUE - circuit = /obj/item/circuitboard/holopad + circuit = /obj/item/circuitboard/machine/holopad plane = TURF_PLANE layer = ABOVE_TURF_LAYER use_power = USE_POWER_IDLE @@ -863,7 +862,7 @@ GLOBAL_VAR_INIT(holopad_connectivity_rebuild_queued, FALSE) /obj/machinery/holopad/proc/unregister_hologram(obj/effect/overlay/hologram/holopad/holo) LAZYREMOVE(holograms, holo) -/obj/item/circuitboard/holopad/ship +/obj/item/circuitboard/machine/holopad/ship name = T_BOARD("sector holopad") build_path = /obj/machinery/holopad/ship @@ -872,9 +871,9 @@ GLOBAL_VAR_INIT(holopad_connectivity_rebuild_queued, FALSE) desc = "An expensive and immobile holopad used for long range ship-to-ship communications." icon_state = "shippad" base_icon_state = "shippad" - circuit = /obj/item/circuitboard/holopad/ship - allow_unanchor = FALSE - allow_deconstruct = FALSE + circuit = /obj/item/circuitboard/machine/holopad/ship + default_unanchor = 5 SECONDS + default_deconstruct = 5 SECONDS long_range = TRUE /obj/machinery/holopad/ship/starts_inactive diff --git a/code/game/machinery/lathes/autolathe.dm b/code/game/machinery/lathes/autolathe.dm new file mode 100644 index 000000000000..db2b02479d64 --- /dev/null +++ b/code/game/machinery/lathes/autolathe.dm @@ -0,0 +1,27 @@ +/obj/item/circuitboard/machine/lathe/autolathe + name = T_BOARD("autolathe") + build_path = /obj/machinery/lathe/autolathe + +/obj/machinery/lathe/autolathe + name = "autolathe" + desc = "A versatile lathe capable of printing many objects with the right loaded designs." + icon = 'icons/machinery/lathe/autolathe.dmi' + icon_state = "base" + circuit = /obj/item/circuitboard/machine/lathe/autolathe + design_holder = /datum/design_holder/lathe/autolathe + lathe_type = LATHE_TYPE_AUTOLATHE + has_interface = TRUE + active_icon_state = "active" + print_icon_state = "print" + paused_icon_state = "pause" + recycle_icon_state = "load_steel" + insert_icon_state_specific = list( + MAT_GLASS = "load_glass", + MAT_STEEL = "load_steel", + ) + insert_icon_state = "load_steel" + +/datum/design_holder/lathe/autolathe + +/datum/design_holder/lathe/autolathe/available_ids() + return SSresearch.autolathe_design_ids | ..() diff --git a/code/game/machinery/lathes/lathe.dm b/code/game/machinery/lathes/lathe.dm new file mode 100644 index 000000000000..a264d2330a27 --- /dev/null +++ b/code/game/machinery/lathes/lathe.dm @@ -0,0 +1,579 @@ +/obj/item/circuitboard/machine/lathe + abstract_type = /obj/item/circuitboard/machine/lathe + name = T_BOARD("lathe") + build_path = /obj/machinery/lathe + // todo: beakers / bins optional but needed for storage. + req_components = list( + /obj/item/stock_parts/console_screen = 1, + /obj/item/stock_parts/manipulator = 1, + /obj/item/stock_parts/matter_bin = 3, + ) + +/obj/machinery/lathe + abstract_type = /obj/machinery/lathe + name = "lathe" + icon = 'icons/machinery/lathe/autolathe.dmi' + icon_state = "base" + base_icon_state = "base" + panel_icon_state = "panel" + atom_flags = OPENCONTAINER + use_power = USE_POWER_IDLE + idle_power_usage = POWER_USAGE_LATHE_IDLE + active_power_usage = POWER_USAGE_LATHE_ACTIVE_SCALE(1) + density = TRUE + anchored = TRUE + circuit = /obj/item/circuitboard/machine/lathe + default_deconstruct = 0 SECONDS + default_panel = 0 SECONDS + + /// icon state when printing, if any + var/active_icon_state + /// icon state when there's stuff in queue but we're not printing, if any; otherwise uses base + var/paused_icon_state + /// icon state to flick when finishing a print + var/print_icon_state + /// icon state to flick when inserting sheets + var/insert_icon_state + /// specific icon states for specific materials + var/list/insert_icon_state_specific + /// icon state to flick when recycling, if any + var/recycle_icon_state + + /// print speed - multiplier. affects power cost. + var/speed_multiplier = 1 + /// power efficiency - multiplier. affects power cost. + var/power_multiplier = 1 + /// material efficiency - multiplier. + var/efficiency_multiplier = 1 + /// material storage - multiplier + var/storage_multiplier + + /// what kind of lathe is this + var/lathe_type = NONE + + /// material container datum + var/datum/material_container/stored_materials + /// material container capacity - list with ids for specific, null for infinite, just a number for combined. + var/materials_max = SHEET_MATERIAL_AMOUNT * 100 + /// reagents storage datum + var/datum/reagents/stored_reagents + /// has reagents? if above 0, we make reagents datum. + var/reagents_max = 0 + /// stored items + var/list/obj/item/stored_items + /// max stored items - 0 for off + var/items_max = 0 + + /// max queue length in items + var/queue_max = 20 + /// max amount per queue entry for stacks + var/queue_max_entry_stack = 200 + /// max amount per queue entry + var/queue_max_entry = 10 + /// maximum items we can print per tick - for stacks this is the item itself, not the stack amount. + var/max_items_per_tick = 4 + /// queued of /datum/lathe_queue_entry's. 1 is top of queue. + var/list/datum/lathe_queue_entry/queue + /// currently printing design + var/datum/design/printing + /// processing queue? + var/queue_active = FALSE + /// progress in deciseconds on current design + var/progress + + /// can recycle + var/recycle = TRUE + /// recycle efficiency + var/recycle_efficiency = 0.8 + + /// designs held - set to instance to instantiate. + var/datum/design_holder/design_holder = /datum/design_holder + + /// allow controlling from self + var/has_interface = FALSE + /// our lathe control instance, lazy init'd + var/datum/tgui_module/lathe_control/ui_controller + +/obj/machinery/lathe/Initialize(mapload) + create_storages() + if(ispath(design_holder)) + design_holder = new design_holder(src) + . = ..() + if(!isnull(insert_icon_state_specific)) + insert_icon_state_specific = typelist(NAMEOF(src, insert_icon_state_specific), insert_icon_state_specific) + +/obj/machinery/lathe/Destroy() + delete_storages() + if(design_holder?.owner == src) + QDEL_NULL(design_holder) + return ..() + +/obj/machinery/lathe/examine(mob/user) + . = ..() + if(recycle) + . += SPAN_NOTICE("You can recycle items in this by dragging a deconstructable item to it. Some items can furthermore be deconstructed by just clicking on the lathe while being held inhand.") + if(!has_interface) + . += SPAN_NOTICE("This one doesn't seem to have an interface, and is likely controlled elsewhere.") + +/obj/machinery/lathe/drop_products(method) + . = ..() + dump_storages() + +/obj/machinery/lathe/update_icon_state() + if(!isnull(active_icon_state) && queue_active) + icon_state = active_icon_state + else if(length(queue) && !isnull(paused_icon_state)) + icon_state = paused_icon_state + else + // todo: unified machinery base icon state + icon_state = base_icon_state + return ..() + +/obj/machinery/lathe/RefreshParts() + . = ..() + var/speed_factor = 1 + var/efficiency_factor = 1 + var/storage_factor = 1 + var/manips_total = 0 + var/manips_rating = 0 + var/bins_total = 0 + var/bins_rating = 0 + for(var/obj/item/stock_parts/manipulator/manip as anything in component_parts) + manips_rating += manip.rating + manips_total++ + for(var/obj/item/stock_parts/matter_bin/bin as anything in component_parts) + bins_rating += bin.rating + bins_total++ + manips_rating /= manips_total + bins_rating /= bins_total + speed_factor = manips_rating * 0.5 + 0.5 + efficiency_factor = MATERIAL_EFFICIENCY_LATHE_SCALE(manips_rating) + storage_factor = bins_rating * 0.5 + 0.5 + speed_multiplier = speed_factor + power_multiplier = 1 + storage_multiplier = storage_factor + efficiency_multiplier = efficiency_factor + update_active_power_usage(POWER_USAGE_LATHE_ACTIVE_SCALE(speed_factor)) + stored_materials.set_multiplied_capacity(materials_max, storage_factor) + ui_controller?.update_static_data() + +/obj/machinery/lathe/attackby(obj/item/I, mob/living/user, list/params, clickchain_flags, damage_multiplier) + if(user.a_intent == INTENT_HARM) + return ..() + if(istype(I, /obj/item/stack/material)) + var/used = stored_materials.insert_sheets(I) + var/obj/item/stack/material/M = I + if(used) + user.action_feedback(SPAN_NOTICE("You insert [used] sheets of [I]."), src) + ui_controller?.ui_materials_update() + else + user.action_feedback(SPAN_WARNING("[src] can't hold any more of [I]."), src) + return CLICKCHAIN_DO_NOT_PROPAGATE + if(!isnull(insert_icon_state_specific?[M.material.id])) + flick(insert_icon_state_specific[M.material.id], src) + else if(!isnull(insert_icon_state)) + flick(insert_icon_state, src) + return CLICKCHAIN_DID_SOMETHING | CLICKCHAIN_DO_NOT_PROPAGATE + else if(istype(I, /obj/item/reagent_containers/glass) && !isnull(stored_reagents)) + var/obj/item/reagent_containers/RC = I + if(RC.is_open_container()) + var/amt = RC.reagents?.trans_to_holder(stored_reagents, RC.amount_per_transfer_from_this) + if(amt) + user.action_feedback(SPAN_NOTICE("You transfer [amt] units of the solution from \the [I] to [src]."), src) + else + user.action_feedback(SPAN_WARNING("[src] can't hold any more reagents!"), src) + return CLICKCHAIN_DO_NOT_PROPAGATE + return CLICKCHAIN_DO_NOT_PROPAGATE | CLICKCHAIN_DID_SOMETHING + else if(isitem(I) && (user.a_intent == INTENT_HELP)) + if(!(I.item_flags & ITEM_EASY_LATHE_DECONSTRUCT)) + if(!insert_item(I, user)) + return CLICKCHAIN_DO_NOT_PROPAGATE + return CLICKCHAIN_DO_NOT_PROPAGATE | CLICKCHAIN_DID_SOMETHING + if(recycle_item(I, user)) + return CLICKCHAIN_DID_SOMETHING | CLICKCHAIN_DO_NOT_PROPAGATE + return CLICKCHAIN_DO_NOT_PROPAGATE + return ..() + +/obj/machinery/lathe/proc/insert_item(obj/item/I, mob/user) + if(LAZYLEN(stored_items) >= items_max) + user.action_feedback(SPAN_WARNING("[src] can't hold [items_max && "more"] items for machining."), src) + return FALSE + if(!isnull(user)) + if(user.is_in_inventory(I) && !user.transfer_item_to_loc(I, src)) + user.action_feedback(SPAN_WARNING("[I] is stuck to your hand!"), src) + return FALSE + user.action_feedback(SPAN_NOTICE("You insert [I] into [src]."), src) + I.forceMove(src) + LAZYADD(stored_items, I) + ui_controller?.ui_ingredients_update() + return TRUE + +/obj/machinery/lathe/proc/eject_item(obj/item/I) + I.forceMove(drop_location()) + LAZYREMOVE(stored_items, I) + ui_controller?.ui_ingredients_update() + +/obj/machinery/lathe/proc/recycle_item(obj/item/I, mob/user, efficiency_multiplier = 1) + efficiency_multiplier *= recycle_efficiency + var/list/materials = I.materials.Copy() + if(!isnull(user) && !user.temporarily_remove_from_inventory(I)) + user.action_feedback(SPAN_WARNING("[I] is stuck to your hand!"), src) + return FALSE + if(!length(materials)) + user?.action_feedback(SPAN_NOTICE("You trivially recycle \the [I] in [src].")) + qdel(I) + if(insert_icon_state) + flick(insert_icon_state, src) + return TRUE + if(!stored_materials?.has_space(materials, efficiency_multiplier)) + user?.action_feedback(SPAN_WARNING("[src] has no space to store the materials in [I]."), src) + return FALSE + stored_materials.add(materials, efficiency_multiplier) + user?.action_feedback(SPAN_NOTICE("You recycle [I] in [src]."), src) + qdel(I) + if(insert_icon_state) + flick(insert_icon_state, src) + return TRUE + +/obj/machinery/lathe/proc/create_storages() + if(isnull(stored_materials)) + if(materials_max != 0) + stored_materials = new(materials_max) + else + stored_materials.set_multiplied_capacity(materials_max, storage_multiplier) + if(isnull(stored_reagents)) + if(reagents_max != 0) + stored_reagents = new(reagents_max, src) + else + stored_reagents.maximum_volume = reagents_max + +/obj/machinery/lathe/proc/dump_storages() + var/atom/dump_location = drop_location() + stored_materials.dump_everything(dump_location) + for(var/obj/item/I as anything in stored_items) + I.forceMove(dump_location) + stored_items = null + +/obj/machinery/lathe/proc/delete_storages() + if(stored_materials) + QDEL_NULL(stored_materials) + if(stored_reagents) + QDEL_NULL(stored_reagents) + if(stored_items) + QDEL_LIST_NULL(stored_items) + +/obj/machinery/lathe/proc/has_design(datum/design/id_or_instance) + return design_holder.has_id(istext(id_or_instance)? id_or_instance : id_or_instance.id) + +/obj/machinery/lathe/proc/has_capabilities_for(datum/design/instance) + return lathe_type & instance.lathe_type + +/** + * returns if we have resources for something + * + * @return number of it we can print, this can be a decimal. if design requires ingredients, this will never be above 1. + */ +/obj/machinery/lathe/proc/has_resources_for(datum/design/instance, list/material_parts, list/ingredient_parts) + . = INFINITY + if(length(instance.materials)) + var/list/materials = instance.materials.Copy() + for(var/key in instance.material_parts) + var/id = material_parts[key] + materials[id] += instance.material_parts[key] + . = stored_materials.has_multiple(materials, efficiency_multiplier) + if(!.) + return + if(length(instance.reagents)) + . = min(., stored_reagents?.has_multiple(instance.reagents, efficiency_multiplier)) + if(!.) + return + // ingredients? return 1 at most. + if(length(instance.ingredients)) + . = min(., check_ingredients(instance.ingredients, ingredient_parts, stored_items)) + +/** + * uses materials with a multiplier + * efficiency multiplier is *not* applied in this proc. + * ingredients will ignore multiplier. you have been warned. + */ +/obj/machinery/lathe/proc/use_resources(list/materials, list/reagents, list/ingredients, list/ingredient_parts, multiplier = 1) + stored_materials.use(materials, multiplier) + for(var/key in reagents) + stored_reagents.remove_reagent(key, reagents[key] * multiplier) + use_ingredients(ingredients, ingredient_parts, stored_items) + +/obj/machinery/lathe/Exited(atom/movable/AM, atom/newLoc) + . = ..() + if(isitem(AM) && (AM in stored_items)) + stored_items -= AM + +/** + * returns if we can print something + * + * @return number of it we can print if so, null if we can't print at all and it isn't a resource issue + */ +/obj/machinery/lathe/proc/can_print(datum/design/instance, list/material_parts, list/ingredient_parts) + if(!has_design(instance)) + return FALSE + if(!has_capabilities_for(instance)) + return FALSE + return has_resources_for(instance, material_parts, ingredient_parts) + +/** + * returns why we can't print something + */ +/obj/machinery/lathe/proc/why_cant_print(datum/design/instance, list/material_parts, list/ingredient_parts) + if(!has_design(instance)) + return "Unknown design detected" + if(!has_capabilities_for(instance)) + return "Design is unsupported" + if(!round(has_resources_for(instance, material_parts, ingredient_parts))) + return "Out of resources" + +/** + * prints a design + * + * @return an object, or a list of objects. + */ +/obj/machinery/lathe/proc/do_print(datum/design/instance, amount = 1, list/material_parts, list/ingredient_parts, efficiency = efficiency_multiplier) + if(!amount) + return + var/list/materials_used = instance.materials?.Copy() || list() + for(var/key in material_parts) + materials_used[material_parts[key]] += instance.material_parts[key] + use_resources(materials_used, instance.reagents, instance.ingredients, ingredient_parts, amount * efficiency) + . = instance.lathe_print(drop_location(), amount, material_parts, ingredient_parts, null, src, efficiency_multiplier) + if(!isnull(print_icon_state)) + flick(print_icon_state, src) + +/obj/machinery/lathe/process(delta_time) + if(!queue_active) + return + progress_queue(delta_time * 10, 1) + +/** + * progresses queue by time deciseconds and mult multiplier + */ +/obj/machinery/lathe/proc/progress_queue(time, mult = 1) + if(!check_queue_head()) + return + var/total = time * mult + progress += total + var/datum/lathe_queue_entry/head = queue[1] + var/datum/design/D + var/left_this_tick = max_items_per_tick + var/printed_any = FALSE + while(!isnull(head)) + D = SSresearch.fetch_design(head.design_id) + var/resource_limited = has_resources_for(D, head.material_parts, head.ingredient_parts) + if(!resource_limited) + if(queue_active) + atom_say("Print queue interrupted - out of resources.") + stop_printing() + break + var/printed = min(head.amount, D.is_stack? (D.max_stack * left_this_tick) : left_this_tick, round(progress / D.work), resource_limited) + if(!printed) + break + printed_any = TRUE + left_this_tick -= D.is_stack? CEILING(D.max_stack / printed, 1) : printed + progress -= printed * D.work + head.amount -= printed + do_print(D, printed, head.material_parts, head.ingredient_parts) + if(!head.amount) + queue.Cut(1, 2) + if(!check_queue_head(check_resources = FALSE)) + ui_controller?.ui_queue_update() + return + head = queue[1] + if(left_this_tick <= 0) + break + if(printed_any) + ui_controller?.ui_queue_update() + +/obj/machinery/lathe/proc/reconsider_queue(autostart, silent) + if(!length(queue)) + stop_printing() + else if(length(queue) && autostart) + start_printing(silent) + +/obj/machinery/lathe/proc/queue_head_design() + RETURN_TYPE(/datum/design) + return length(queue)? (SSresearch.fetch_design(queue[1].design_id)) : null + +/obj/machinery/lathe/proc/check_queue_head(silent, check_resources = TRUE) + if(!length(queue)) + if(!silent && queue_active) + atom_say("Print queue complete.") + stop_printing() + return FALSE + var/datum/lathe_queue_entry/head = queue[1] + var/datum/design/D = SSresearch.fetch_design(head.design_id) + if(isnull(D)) + if(!silent && queue_active) + atom_say("Print queue interrupted - unknown entry in queue.") + stop_printing() + return FALSE + if(!has_design(D)) + if(!silent && queue_active) + atom_say("Print queue interrupted - unknown entry in queue.") + stop_printing() + return FALSE + if(!has_capabilities_for(D)) + if(!silent && queue_active) + atom_say("Print queue interrupted - incompatible design in queue.") + stop_printing() + return FALSE + if(check_resources && !round(has_resources_for(D, head.material_parts, head.ingredient_parts))) + if(!silent && queue_active) + atom_say("Print queue interrupted - out of resources.") + stop_printing() + return FALSE + return TRUE + +/obj/machinery/lathe/proc/start_printing(silent) + if(queue_active) + return + if(!check_queue_head(silent)) + return + ui_controller?.update_ui_data() + queue_active = TRUE + update_use_power(USE_POWER_ACTIVE) + update_icon() + +/obj/machinery/lathe/proc/stop_printing() + if(!queue_active) + return + queue_active = FALSE + ui_controller?.update_ui_data() + update_use_power(USE_POWER_IDLE) + update_icon() + +/** + * returns a list of names associated to "off" | "on" | "disabled" | null + * + * if "off", renders as toggle button that isn't selected + * if "on", renders as toggle button that is selected + * if "disabled", renders as a click button that's greyed out + * if null, renders as a click button that isn't + */ +/obj/machinery/lathe/proc/ui_custom_options() + return list() + +/** + * called when custom buttons are pressed + * + * @params + * * user - user doing it + * * name - name of button + * + * @return TRUE / FALSE, TRUE to update buttons. + */ +/obj/machinery/lathe/proc/ui_custom_act(mob/user, name) + return FALSE + +/** + * enqueues an instance with given material_parts + * + * amount variable is reserved but unused at this given time. + */ +/obj/machinery/lathe/proc/enqueue(datum/design/instance, amount = 1, list/material_parts, list/ingredient_parts, start_immediately) + if(instance.material_parts) + for(var/key in instance.material_parts) + if(!material_parts[key]) + return FALSE + var/datum/lathe_queue_entry/last = length(queue)? queue[length(queue)] : null + if(!isnull(last) && last.design_id == instance.id && last.material_parts ~= material_parts && last.ingredient_parts ~= ingredient_parts) + var/adding + if(instance.is_stack) + adding = amount // no limit on stacks + else + adding = clamp(amount, 0, queue_max_entry - last.amount) + last.amount += adding + amount -= adding + ui_controller?.ui_queue_update() + if(!amount) + return TRUE + if(length(queue) >= queue_max) + return FALSE + var/datum/lathe_queue_entry/inserting = new + inserting.design_id = instance.id + inserting.material_parts = material_parts + inserting.ingredient_parts = ingredient_parts + inserting.amount = amount + LAZYINITLIST(queue) + queue += inserting + reconsider_queue(start_immediately) + ui_controller?.ui_queue_update() + return TRUE + +/** + * dequeues the instance with the given position + */ +/obj/machinery/lathe/proc/dequeue(position) + if(position > 0 && position < length(queue)) + queue.Cut(position, position + 1) + else + return FALSE + reconsider_queue() + ui_controller?.ui_queue_update() + return TRUE + +/obj/machinery/lathe/proc/clear_queue() + if(!length(queue)) + return FALSE + queue = null + reconsider_queue() + return TRUE + +/obj/machinery/lathe/proc/tgui_controller() + RETURN_TYPE(/datum/tgui_module) + return ui_controller || (ui_controller = new(src)) + +/obj/machinery/lathe/proc/available_design_ids() + return design_holder.available_ids() + +/obj/machinery/lathe/proc/available_designs() + return design_holder.available_designs() + +/obj/machinery/lathe/proc/eject_sheets(id, amount) + return stored_materials.dump(drop_location(), id, amount) + +/obj/machinery/lathe/ui_interact(mob/user, datum/tgui/ui, datum/tgui/parent_ui) + if(!has_interface) + return + tgui_controller().ui_interact(user, ui, parent_ui) + +/obj/machinery/lathe/MouseDroppedOn(atom/dropping, mob/user, proximity, params) + if(!user.Adjacent(src)) + return ..() + if(!isitem(dropping)) + return ..() + var/obj/item/I = dropping + if(!user.is_holding(I) && !user.Reachability(I)) + return ..() + if(I.item_flags & ITEM_NO_LATHE_DECONSTRUCT) + user.action_feedback(SPAN_WARNING("[I] cannot be deconstructed."), src) + return CLICKCHAIN_DO_NOT_PROPAGATE + recycle_item(I, user) + return CLICKCHAIN_DID_SOMETHING | CLICKCHAIN_DO_NOT_PROPAGATE + +/** + * holder datum for queue data + */ +/datum/lathe_queue_entry + /// design id + var/design_id + /// amount + var/amount = 1 + /// material parts to use, key to id + var/list/material_parts + /// items to use for design - order matters! uses weakref's. + var/list/ingredient_parts + +/datum/lathe_queue_entry/ui_data() + return list( + "design" = design_id, + "amount" = amount, + "materials" = length(material_parts)? material_parts : null, + "ingredients" = length(ingredient_parts)? ingredient_parts : null, + ) diff --git a/code/game/machinery/misc/bioscan_antenna.dm b/code/game/machinery/misc/bioscan_antenna.dm index 6fed48429368..e7d0c52c06d8 100644 --- a/code/game/machinery/misc/bioscan_antenna.dm +++ b/code/game/machinery/misc/bioscan_antenna.dm @@ -2,8 +2,9 @@ GLOBAL_LIST_EMPTY(bioscan_antenna_list) /obj/machinery/bioscan_antenna name = "Bioscan Antenna" desc = "A fragile antenna used to locate nearby biosignatures." - allow_deconstruct = TRUE - allow_unanchor = TRUE + default_deconstruct = 0 SECONDS + default_unanchor = 5 SECONDS + default_panel = 0 SECONDS icon = 'icons/machinery/bioscan.dmi' base_icon_state = "antenna" icon_state = "antenna" @@ -33,30 +34,6 @@ GLOBAL_LIST_EMPTY(bioscan_antenna_list) change_network(null) return ..() -/obj/machinery/bioscan_antenna/crowbar_act(obj/item/I, mob/user, flags, hint) - if(!allow_deconstruct || !panel_open) - return ..() - if(default_deconstruction_crowbar(user, I)) - user.visible_message(SPAN_NOTICE("[user] dismantles [src]."), range = MESSAGE_RANGE_CONSTRUCTION) - return TRUE - return ..() - -/obj/machinery/bioscan_antenna/screwdriver_act(obj/item/I, mob/user, flags, hint) - if(!allow_deconstruct) - return ..() - if(default_deconstruction_screwdriver(user, I)) - user.visible_message(SPAN_NOTICE("[user] [panel_open? "opens" : "closes"] the panel on [src]."), range = MESSAGE_RANGE_CONSTRUCTION) - return TRUE - return ..() - -/obj/machinery/bioscan_antenna/wrench_act(obj/item/I, mob/user, flags, hint) - if(!allow_unanchor) - return ..() - if(default_unfasten_wrench(user, I, 4 SECONDS)) - user.visible_message(SPAN_NOTICE("[user] [anchored? "fastens [src] to the ground" : "unfastens [src] from the ground"]."), range = MESSAGE_RANGE_CONSTRUCTION) - return TRUE - return ..() - /obj/machinery/bioscan_antenna/multitool_act(obj/item/I, mob/user, flags, hint) if(!network_mutable) return ..() @@ -71,20 +48,7 @@ GLOBAL_LIST_EMPTY(bioscan_antenna_list) . = list() if(network_mutable) .[TOOL_MULTITOOL] = "change network" - if(allow_unanchor) - .[TOOL_WRENCH] = anchored? "anchor" : "unanchor" - if(allow_deconstruct) - .[TOOL_SCREWDRIVER] = panel_open? "close panel" : "open panel" - if(panel_open) - .[TOOL_CROWBAR] = "deconstruct" - -/obj/machinery/bioscan_antenna/dynamic_tool_image(function, hint) - switch(function) - if(TOOL_WRENCH) - return anchored? dyntool_image_backward(TOOL_WRENCH) : dyntool_image_forward(TOOL_WRENCH) - if(TOOL_SCREWDRIVER) - return panel_open? dyntool_image_forward(TOOL_SCREWDRIVER) : dyntool_image_backward(TOOL_SCREWDRIVER) - return ..() + return merge_double_lazy_assoc_list(., ..()) /obj/machinery/bioscan_antenna/attack_hand(mob/user, list/params) // todo: better xenomorphs @@ -118,5 +82,5 @@ GLOBAL_LIST_EMPTY(bioscan_antenna_list) /obj/machinery/bioscan_antenna/permanent desc = "A less fragile antenna used to locate nearby biosignatures. This one cannot be anchored or moved, only reprogrammed." - allow_deconstruct = FALSE - allow_unanchor = FALSE + default_deconstruct = null + default_unanchor = null diff --git a/code/game/machinery/partslathe_vr.dm b/code/game/machinery/partslathe_vr.dm deleted file mode 100644 index 3f1041f8aa8f..000000000000 --- a/code/game/machinery/partslathe_vr.dm +++ /dev/null @@ -1,371 +0,0 @@ -/* -** The Parts Lathe! Able to produce all tech level 1 stock parts for building machines! -** -** The idea is that engineering etc should be able to build/repair basic technology machines -** without having to use a protolathe to print what are not prototype technologies. -** Some felt having an autolathe do this might be OP, so its a separate machine. -** -** The other advantage is that this machine, specially focused for helping build stuff, -** actually reads circuit boards, tells you what parts are needed to build them, and -** can automatically queue them up to build! -** -** Leshana says: -** - Phase 1 of this project adds the machine and basic operation. -** - Phase 2 will enhance usability by making & labeling boxes with a set of parts. -** -** TODO - Implement phase 2 by adding cardboard boxes -*/ - -/obj/machinery/partslathe - name = "parts lathe" - icon = 'icons/obj/partslathe_vr.dmi' - icon_state = "partslathe-idle" - circuit = /obj/item/circuitboard/partslathe - anchored = TRUE - density = TRUE - use_power = USE_POWER_IDLE - idle_power_usage = 30 - active_power_usage = 5000 - - /// Amount of materials we can store total - var/list/materials = list(MAT_STEEL = 0, MAT_GLASS = 0) - var/list/storage_capacity = list(MAT_STEEL = 0, MAT_GLASS = 0) - /// The inserted board - var/obj/item/circuitboard/copy_board - /// The queue of things to build - var/list/datum/category_item/partslathe/queue = list() - /// Are we currently busy building stuff? - var/busy = FALSE - /// How many machine ticks have we spent building current thing? - var/progress = 0 - /// Material usage efficiency (less efficient than protolathe) - var/mat_efficiency = 3 - /// Ticks per tick build speed multiplier - var/speed = 1 - - /// Static list of recipies we will lazily generate - /// type -> /datum/category_item/partslathe/ - var/static/list/partslathe_recipies - -/obj/machinery/partslathe/Initialize(mapload) - . = ..() - update_icon() - update_recipe_list() - -/obj/machinery/partslathe/proc/getHighestOriginTechLevel(obj/item/I) - if(!istype(I) || !I.origin_tech) - return FALSE - var/highest = 0 - for(var/tech in I.origin_tech) - highest = max(highest, I.origin_tech[tech]) - return highest - -/obj/machinery/partslathe/RefreshParts() - var/mb_rating = 0 - for(var/obj/item/stock_parts/matter_bin/M in component_parts) - mb_rating += M.rating - storage_capacity[MAT_STEEL] = mb_rating * 16000 - storage_capacity["glass"] = mb_rating * 8000 - var/T = 0 - for(var/obj/item/stock_parts/manipulator/M in component_parts) - T += M.rating - mat_efficiency = 6 / T // Ranges from 3.0 to 1.0 - speed = T / 2 // Ranges from 1.0 to 3.0 - -/obj/machinery/partslathe/dismantle() - for(var/f in materials) - eject_materials(f, -1) - ..() - -/obj/machinery/partslathe/update_icon() - if(panel_open) - icon_state = "partslathe-open" - else if(inoperable()) - icon_state = "partslathe-off" - else if(busy) - icon_state = "partslathe-lidclose" - else - if(icon_state == "partslathe-lidclose") - flick("partslathe-lidopen", src) - icon_state = "partslathe-idle" - -/obj/machinery/partslathe/attackby(obj/item/O, mob/user) - if(busy) - to_chat(user, SPAN_NOTICE("\The [src] is busy. Please wait for completion of previous operation.")) - return TRUE - if(default_deconstruction_screwdriver(user, O)) - return - if(default_deconstruction_crowbar(user, O)) - return - if(default_part_replacement(user, O)) - return - if(inoperable()) - return - if(panel_open) - to_chat(user, SPAN_NOTICE("You can't load \the [src] while it's opened.")) - return - if(istype(O, /obj/item/circuitboard)) - if(copy_board) - to_chat(user, SPAN_WARNING("There is already a board inserted in \the [src].")) - return - if(!user.attempt_insert_item_for_installation(O, src)) - return - copy_board = O - user.visible_message("[user] inserts [O] into \the [src]'s circuit reader.", SPAN_NOTICE("You insert [O] into \the [src]'s circuit reader.")) - updateUsrDialog() - return - if(try_load_materials(user, O)) - return - else - to_chat(user, SPAN_NOTICE("You cannot insert this item into \the [src]!")) - return - -// Attept to load materials. Returns 0 if item wasn't a stack of materials, otherwise 1 (even if failed to load) -/obj/machinery/partslathe/proc/try_load_materials(mob/user, obj/item/stack/material/S) - if(!istype(S)) - return FALSE - if(!(S.material.name in materials)) - to_chat(user, SPAN_WARNING("The [src] doesn't accept [S.material]!")) - return TRUE - if(S.amount < 1) - return TRUE // Does this even happen? Sanity check I guess. - var/max_res_amount = storage_capacity[S.material.name] - if(materials[S.material.name] + S.perunit <= max_res_amount) - var/count = 0 - while(materials[S.material.name] + S.perunit <= max_res_amount && S.amount >= 1) - materials[S.material.name] += S.perunit - S.use(1) - count++ - user.visible_message( \ - "[user] inserts [S.name] into \the [src].", \ - SPAN_NOTICE("You insert [count] [S.name] into \the [src].")) - - flick("partslathe-load-[S.material.name]", src) - updateUsrDialog() - else - to_chat(user, SPAN_WARNING("\The [src] cannot hold more [S.name].")) - return TRUE - -/obj/machinery/partslathe/process(delta_time) - ..() - if(machine_stat) - update_icon() - return - if(queue.len == 0) - if (busy) - ping() // Job's done! - busy = FALSE - update_icon() - return - var/datum/category_item/partslathe/D = queue[1] - if(canBuild(D)) - busy = TRUE - update_use_power(USE_POWER_ACTIVE) - progress += speed - if(progress >= D.time) - build(D) - progress = 0 - removeFromQueue(1) - update_icon() - else if(busy) - visible_message(SPAN_NOTICE("\icon [src] flashes: insufficient materials: [getLackingMaterials(D)].")) - busy = FALSE - update_use_power(USE_POWER_IDLE) - update_icon() - playsound(src.loc, 'sound/machines/chime.ogg', 50, FALSE) - -/obj/machinery/partslathe/proc/addToQueue(datum/category_item/partslathe/D) - queue += D - return - -/obj/machinery/partslathe/proc/removeFromQueue(index) - queue.Cut(index, index + 1) - return - -/obj/machinery/partslathe/proc/canBuild(datum/category_item/partslathe/D) - for(var/M in D.resources) - if(materials[M] < CEILING((D.resources[M] * mat_efficiency), 1)) - return FALSE - return TRUE - -/obj/machinery/partslathe/proc/getLackingMaterials(datum/category_item/partslathe/D) - var/ret = "" - for(var/M in D.resources) - if(materials[M] < CEILING((D.resources[M] * mat_efficiency), 1)) - if(ret != "") - ret += ", " - ret += "[CEILING((D.resources[M] * mat_efficiency), 1) - materials[M]] [M]" - return ret - -/obj/machinery/partslathe/proc/build(datum/category_item/partslathe/D) - for(var/M in D.resources) - materials[M] = max(0, materials[M] - CEILING((D.resources[M] * mat_efficiency), 1)) - var/obj/new_item = D.build(loc); - if(new_item) - new_item.loc = loc - if(mat_efficiency < 1) //No matter out of nowhere - if(new_item.matter && new_item.matter.len > 0) - for(var/i in new_item.matter) - new_item.matter[i] = CEILING((new_item.matter[i] * mat_efficiency), 1) - -/obj/machinery/partslathe/attack_ai(mob/user) - src.attack_hand(user) - -/obj/machinery/partslathe/attack_hand(mob/user, list/params) - if(..()) - return - ui_interact(user) - -/obj/machinery/partslathe/ui_assets(mob/user) - return list( - get_asset_datum(/datum/asset/spritesheet/sheetmaterials) - ) - -/obj/machinery/partslathe/ui_interact(mob/user, datum/tgui/ui, datum/tgui/parent_ui) - ui = SStgui.try_update_ui(user, src, ui) - if(!ui) - ui = new(user, src, "PartsLathe", name) - ui.open() - -/obj/machinery/partslathe/ui_data(mob/user, datum/tgui/ui, datum/ui_state/state) - var/list/data = ..() - data["panelOpen"] = panel_open - - var/list/materials_ui = list() - for(var/M in materials) - materials_ui.Add(list(list( - "name" = M, - "amount" = materials[M], - "sheets" = round(materials[M] / SHEET_MATERIAL_AMOUNT), - "removable" = materials[M] >= SHEET_MATERIAL_AMOUNT, - ))) - data["materials"] = materials_ui - - data["copyBoard"] = null - data["copyBoardReqComponents"] = null - if(istype(copy_board)) - data["copyBoard"] = copy_board.name - var/list/req_components_ui = list() - for(var/CP in (copy_board.req_components || list())) - var/obj/comp_path = CP - var/comp_amt = copy_board.req_components[comp_path] - if(comp_amt && (comp_path in partslathe_recipies)) - req_components_ui.Add(list(list("name" = initial(comp_path.name), "qty" = comp_amt))) - data["copyBoardReqComponents"] = req_components_ui - - data["queue"] = list() - for(var/datum/category_item/partslathe/Q in queue) - data["queue"] += Q.name - - data["building"] = null - data["buildPercent"] = null - if(busy && queue.len > 0) - var/datum/category_item/partslathe/current = queue[1] - data["building"] = current.name - data["buildPercent"] = (progress / current.time * 100) - - data["error"] = null - if(queue.len > 0 && !canBuild(queue[1])) - data["error"] = getLackingMaterials(queue[1]) - - var/list/recipies_ui = list() - for(var/T in partslathe_recipies) - var/datum/category_item/partslathe/R = partslathe_recipies[T] - recipies_ui.Add(list(list("name" = R.name, "type" = "[T]"))) - data["recipies"] = recipies_ui - - return data - -/obj/machinery/partslathe/ui_act(action, list/params, datum/tgui/ui) - if(..()) - return TRUE - - add_fingerprint(usr) - switch(action) - //Queue management can be done even while busy - if("queue") - var/type_to_build = text2path(params["queue"]) - var/datum/category_item/partslathe/to_build = partslathe_recipies[type_to_build] - if(to_build) - addToQueue(to_build) - return TRUE - - if("queueBoard") - if(!istype(copy_board) || !copy_board.req_components) - return - for(var/comp_path in copy_board.req_components) - var/comp_amt = copy_board.req_components[comp_path] - if(!comp_amt) - continue - var/datum/category_item/partslathe/to_build = partslathe_recipies[comp_path] - if(!to_build) - continue //We don't support building whatever this is - for(var/i in 1 to comp_amt) - addToQueue(to_build) - return TRUE - - if("cancel") - var/index = text2num(params["cancel"]) - if(index < 1 || index > queue.len) - return - if(busy && index == 1) - return - removeFromQueue(index) - return TRUE - - if(busy) - to_chat(usr, SPAN_NOTICE("[src] is busy. Please wait for completion of previous operation.")) - return - - switch(action) - if("ejectBoard") - if(copy_board) - visible_message(SPAN_NOTICE("[copy_board] is ejected from [src]'s circuit reader.")) - copy_board.forceMove(src.loc) - copy_board = null - return TRUE - - if("remove_mat") - // Remove a material from the fab - var/mat_id = params["id"] - var/amount = text2num(params["amount"]) - eject_materials(mat_id, amount) - return - -///Builds a list of recipies to include all tech level 1 stock parts. -/obj/machinery/partslathe/proc/update_recipe_list() - if(!partslathe_recipies) - partslathe_recipies = list() - var/list/paths = typesof(/obj/item/stock_parts)-/obj/item/stock_parts - for(var/type in paths) - var/obj/item/stock_parts/I = new type() - if(getHighestOriginTechLevel(I) > 1) - qdel(I) - continue // Ignore high-tech parts - if(!I.matter) - qdel(I) - continue // Ignore parts we can't build - - var/datum/category_item/partslathe/recipie = new() - recipie.name = I.name - recipie.path = type - recipie.resources = list() - for(var/material in I.matter) - recipie.resources[material] = I.matter[material]*1.25 // More expensive to produce than they are to recycle. - partslathe_recipies[type] = recipie - qdel(I) - -/*************************** -* Parts Lathe Recipie Type * -***************************/ - -/datum/category_item/partslathe - var/path - var/list/resources - var/time = 2 // In machine controller ticks, so about 4 seconds. - -/datum/category_item/partslathe/dd_SortValue() - return name - -/datum/category_item/partslathe/proc/build(loc) - return new path(loc) diff --git a/code/game/machinery/pipe/pipelayer.dm b/code/game/machinery/pipe/pipelayer.dm index 9e4cee40e74a..c6303fa7eb31 100644 --- a/code/game/machinery/pipe/pipelayer.dm +++ b/code/game/machinery/pipe/pipelayer.dm @@ -91,7 +91,7 @@ return if(istype(W, /obj/item/pipe)) // NOTE - We must check for matter, otherwise the (free) pipe dispenser can be used to get infinite steel. - if(!W.matter || W.matter[MAT_STEEL] < pipe_cost * SHEET_MATERIAL_AMOUNT) + if(!W.materials || W.materials[MAT_STEEL] < pipe_cost * SHEET_MATERIAL_AMOUNT) to_chat(user, "\The [W] doesn't contain enough [MAT_STEEL] to recycle.") else if(metal + pipe_cost > max_metal) to_chat(user, "\The [src] is full.") @@ -174,7 +174,7 @@ var/obj/item/pipe/P = new pi_type(w_turf, p_type, p_dir) P.setPipingLayer(p_layer) // We used metal to make these, so should be reclaimable! - P.matter = list(MAT_STEEL = pipe_cost * SHEET_MATERIAL_AMOUNT) + P.materials = list(MAT_STEEL = pipe_cost * SHEET_MATERIAL_AMOUNT) P.attackby(W , src) return 1 diff --git a/code/game/machinery/robot_fabricator.dm b/code/game/machinery/robot_fabricator.dm index 4e04d13fabe3..ec6631308913 100644 --- a/code/game/machinery/robot_fabricator.dm +++ b/code/game/machinery/robot_fabricator.dm @@ -22,7 +22,7 @@ if(!M.get_amount()) return while(metal_amount < 150000 && M.amount) - metal_amount += O.matter[MAT_STEEL] /*O:height * O:width * O:length * 100000.0*/ + metal_amount += O.materials[MAT_STEEL] /*O:height * O:width * O:length * 100000.0*/ M.use(1) count++ diff --git a/code/modules/research/message_server.dm b/code/game/machinery/telecomms/blackbox.dm similarity index 51% rename from code/modules/research/message_server.dm rename to code/game/machinery/telecomms/blackbox.dm index 2f04a5147e65..4c17bae3307d 100644 --- a/code/modules/research/message_server.dm +++ b/code/game/machinery/telecomms/blackbox.dm @@ -1,172 +1,3 @@ -#define MESSAGE_SERVER_SPAM_REJECT 1 -#define MESSAGE_SERVER_DEFAULT_SPAM_LIMIT 10 - -var/global/list/obj/machinery/message_server/message_servers = list() - -/datum/data_pda_msg - var/recipient = "Unspecified" //name of the person - var/sender = "Unspecified" //name of the sender - var/message = "Blank" //transferred message - -/datum/data_pda_msg/New(var/param_rec = "",var/param_sender = "",var/param_message = "") - - if(param_rec) - recipient = param_rec - if(param_sender) - sender = param_sender - if(param_message) - message = param_message - -/datum/data_rc_msg - var/rec_dpt = "Unspecified" //name of the person - var/send_dpt = "Unspecified" //name of the sender - var/message = "Blank" //transferred message - var/stamp = "Unstamped" - var/id_auth = "Unauthenticated" - var/priority = "Normal" - -/datum/data_rc_msg/New(var/param_rec = "",var/param_sender = "",var/param_message = "",var/param_stamp = "",var/param_id_auth = "",var/param_priority) - if(param_rec) - rec_dpt = param_rec - if(param_sender) - send_dpt = param_sender - if(param_message) - message = param_message - if(param_stamp) - stamp = param_stamp - if(param_id_auth) - id_auth = param_id_auth - if(param_priority) - switch(param_priority) - if(1) - priority = "Normal" - if(2) - priority = "High" - if(3) - priority = "Extreme" - else - priority = "Undetermined" - -/obj/machinery/message_server - icon = 'icons/obj/machines/research.dmi' - icon_state = "server" - name = "Messaging Server" - density = 1 - anchored = 1.0 - use_power = USE_POWER_IDLE - idle_power_usage = 10 - active_power_usage = 100 - - var/list/datum/data_pda_msg/pda_msgs = list() - var/list/datum/data_rc_msg/rc_msgs = list() - var/active = 1 - var/decryptkey = "password" - - //Spam filtering stuff - var/list/spamfilter = list("You have won", "your prize", "male enhancement", "shitcurity", \ - "are happy to inform you", "account number", "enter your PIN") - //Messages having theese tokens will be rejected by server. Case sensitive - var/spamfilter_limit = MESSAGE_SERVER_DEFAULT_SPAM_LIMIT //Maximal amount of tokens - -/obj/machinery/message_server/Initialize(mapload, newdir) - . = ..() - message_servers += src - decryptkey = GenerateKey() - send_pda_message("System Administrator", "system", "This is an automated message. The messaging system is functioning correctly.") - - -/obj/machinery/message_server/Destroy() - message_servers -= src - return ..() - -/obj/machinery/message_server/proc/GenerateKey() - //Feel free to move to Helpers. - var/newKey - newKey += pick("the", "if", "of", "as", "in", "a", "you", "from", "to", "an", "too", "little", "snow", "dead", "drunk", "rosebud", "duck", "al", "le") - newKey += pick("diamond", "beer", "mushroom", "assistant", "clown", "captain", "twinkie", "security", "nuke", "small", "big", "escape", "yellow", "gloves", "monkey", "engine", "nuclear", "ai") - newKey += pick("1", "2", "3", "4", "5", "6", "7", "8", "9", "0") - return newKey - -/obj/machinery/message_server/process(delta_time) - //if(decryptkey == "password") - // decryptkey = generateKey() - if(active && (machine_stat & (BROKEN|NOPOWER))) - active = 0 - return - update_icon() - return - -/obj/machinery/message_server/proc/send_pda_message(var/recipient = "",var/sender = "",var/message = "") - var/result - for (var/token in spamfilter) - if (findtextEx(message,token)) - message = "[message]" //Rejected messages will be indicated by red color. - result = token //Token caused rejection (if there are multiple, last will be chosen>. - pda_msgs += new/datum/data_pda_msg(recipient,sender,message) - return result - -/obj/machinery/message_server/proc/send_rc_message(var/recipient = "",var/sender = "",var/message = "",var/stamp = "", var/id_auth = "", var/priority = 1) - rc_msgs += new/datum/data_rc_msg(recipient,sender,message,stamp,id_auth) - var/authmsg = "[message]
" - if (id_auth) - authmsg += "[id_auth]
" - if (stamp) - authmsg += "[stamp]
" - for (var/obj/machinery/requests_console/Console in allConsoles) - if (ckey(Console.department) == ckey(recipient)) - if(Console.inoperable()) - Console.message_log += "Message lost due to console failure.
Please contact [station_name()] system adminsitrator or AI for technical assistance.
" - continue - if(Console.newmessagepriority < priority) - Console.newmessagepriority = priority - Console.icon_state = "req_comp[priority]" - switch(priority) - if(2) - if(!Console.silent) - playsound(Console.loc, 'sound/machines/twobeep.ogg', 50, 1) - Console.audible_message( - message = "[icon2html(thing = Console, target = world)] *The Requests Console beeps: 'PRIORITY Alert in [sender]'", - hearing_distance = 5, - ) - Console.message_log += "High Priority message from [sender]
[authmsg]" - else - if(!Console.silent) - playsound(Console.loc, 'sound/machines/twobeep.ogg', 50, 1) - Console.audible_message( - message = "[icon2html(thing = Console, target = world)] *The Requests Console beeps: 'Message from [sender]'", - hearing_distance = 4, - ) - Console.message_log += "Message from [sender]
[authmsg]" - Console.set_light(2) - - -/obj/machinery/message_server/attack_hand(mob/user, list/params) -// to_chat(user, "There seem to be some parts missing from this server. They should arrive on the station in a few days, give or take a few CentCom delays.") - to_chat(user, "You toggle PDA message passing from [active ? "On" : "Off"] to [active ? "Off" : "On"]") - active = !active - update_icon() - - return - -/obj/machinery/message_server/attackby(obj/item/O as obj, mob/living/user as mob) - if (active && !(machine_stat & (BROKEN|NOPOWER)) && (spamfilter_limit < MESSAGE_SERVER_DEFAULT_SPAM_LIMIT*2) && \ - istype(O, /obj/item/circuitboard/message_monitor)) - if(!user.attempt_consume_item_for_construction(O)) - return - spamfilter_limit += round(MESSAGE_SERVER_DEFAULT_SPAM_LIMIT / 2) - to_chat(user, "You install additional memory and processors into message server. Its filtering capabilities been enhanced.") - else - return ..(O, user) - -/obj/machinery/message_server/update_icon_state() - . = ..() - if((machine_stat & (BROKEN|NOPOWER))) - icon_state = "server-nopower" - else if (!active) - icon_state = "server-off" - else - icon_state = "server-on" - /datum/feedback_variable var/variable var/value diff --git a/code/game/machinery/telecomms/message_server.dm b/code/game/machinery/telecomms/message_server.dm new file mode 100644 index 000000000000..56b0aec8744a --- /dev/null +++ b/code/game/machinery/telecomms/message_server.dm @@ -0,0 +1,168 @@ +#define MESSAGE_SERVER_SPAM_REJECT 1 +#define MESSAGE_SERVER_DEFAULT_SPAM_LIMIT 10 + +var/global/list/obj/machinery/message_server/message_servers = list() + +/datum/data_pda_msg + var/recipient = "Unspecified" //name of the person + var/sender = "Unspecified" //name of the sender + var/message = "Blank" //transferred message + +/datum/data_pda_msg/New(var/param_rec = "",var/param_sender = "",var/param_message = "") + + if(param_rec) + recipient = param_rec + if(param_sender) + sender = param_sender + if(param_message) + message = param_message + +/datum/data_rc_msg + var/rec_dpt = "Unspecified" //name of the person + var/send_dpt = "Unspecified" //name of the sender + var/message = "Blank" //transferred message + var/stamp = "Unstamped" + var/id_auth = "Unauthenticated" + var/priority = "Normal" + +/datum/data_rc_msg/New(var/param_rec = "",var/param_sender = "",var/param_message = "",var/param_stamp = "",var/param_id_auth = "",var/param_priority) + if(param_rec) + rec_dpt = param_rec + if(param_sender) + send_dpt = param_sender + if(param_message) + message = param_message + if(param_stamp) + stamp = param_stamp + if(param_id_auth) + id_auth = param_id_auth + if(param_priority) + switch(param_priority) + if(1) + priority = "Normal" + if(2) + priority = "High" + if(3) + priority = "Extreme" + else + priority = "Undetermined" + +/obj/machinery/message_server + icon = 'icons/obj/machines/research.dmi' + icon_state = "server" + name = "Messaging Server" + density = 1 + anchored = 1.0 + use_power = USE_POWER_IDLE + idle_power_usage = 10 + active_power_usage = 100 + + var/list/datum/data_pda_msg/pda_msgs = list() + var/list/datum/data_rc_msg/rc_msgs = list() + var/active = 1 + var/decryptkey = "password" + + //Spam filtering stuff + var/list/spamfilter = list("You have won", "your prize", "male enhancement", "shitcurity", \ + "are happy to inform you", "account number", "enter your PIN") + //Messages having theese tokens will be rejected by server. Case sensitive + var/spamfilter_limit = MESSAGE_SERVER_DEFAULT_SPAM_LIMIT //Maximal amount of tokens + +/obj/machinery/message_server/Initialize(mapload, newdir) + . = ..() + message_servers += src + decryptkey = GenerateKey() + send_pda_message("System Administrator", "system", "This is an automated message. The messaging system is functioning correctly.") + + +/obj/machinery/message_server/Destroy() + message_servers -= src + return ..() + +/obj/machinery/message_server/proc/GenerateKey() + //Feel free to move to Helpers. + var/newKey + newKey += pick("the", "if", "of", "as", "in", "a", "you", "from", "to", "an", "too", "little", "snow", "dead", "drunk", "rosebud", "duck", "al", "le") + newKey += pick("diamond", "beer", "mushroom", "assistant", "clown", "captain", "twinkie", "security", "nuke", "small", "big", "escape", "yellow", "gloves", "monkey", "engine", "nuclear", "ai") + newKey += pick("1", "2", "3", "4", "5", "6", "7", "8", "9", "0") + return newKey + +/obj/machinery/message_server/process(delta_time) + //if(decryptkey == "password") + // decryptkey = generateKey() + if(active && (machine_stat & (BROKEN|NOPOWER))) + active = 0 + return + update_icon() + return + +/obj/machinery/message_server/proc/send_pda_message(var/recipient = "",var/sender = "",var/message = "") + var/result + for (var/token in spamfilter) + if (findtextEx(message,token)) + message = "[message]" //Rejected messages will be indicated by red color. + result = token //Token caused rejection (if there are multiple, last will be chosen>. + pda_msgs += new/datum/data_pda_msg(recipient,sender,message) + return result + +/obj/machinery/message_server/proc/send_rc_message(var/recipient = "",var/sender = "",var/message = "",var/stamp = "", var/id_auth = "", var/priority = 1) + rc_msgs += new/datum/data_rc_msg(recipient,sender,message,stamp,id_auth) + var/authmsg = "[message]
" + if (id_auth) + authmsg += "[id_auth]
" + if (stamp) + authmsg += "[stamp]
" + for (var/obj/machinery/requests_console/Console in allConsoles) + if (ckey(Console.department) == ckey(recipient)) + if(Console.inoperable()) + Console.message_log += "Message lost due to console failure.
Please contact [station_name()] system adminsitrator or AI for technical assistance.
" + continue + if(Console.newmessagepriority < priority) + Console.newmessagepriority = priority + Console.icon_state = "req_comp[priority]" + switch(priority) + if(2) + if(!Console.silent) + playsound(Console.loc, 'sound/machines/twobeep.ogg', 50, 1) + Console.audible_message( + message = "[icon2html(thing = Console, target = world)] *The Requests Console beeps: 'PRIORITY Alert in [sender]'", + hearing_distance = 5, + ) + Console.message_log += "High Priority message from [sender]
[authmsg]" + else + if(!Console.silent) + playsound(Console.loc, 'sound/machines/twobeep.ogg', 50, 1) + Console.audible_message( + message = "[icon2html(thing = Console, target = world)] *The Requests Console beeps: 'Message from [sender]'", + hearing_distance = 4, + ) + Console.message_log += "Message from [sender]
[authmsg]" + Console.set_light(2) + + +/obj/machinery/message_server/attack_hand(mob/user, list/params) +// to_chat(user, "There seem to be some parts missing from this server. They should arrive on the station in a few days, give or take a few CentCom delays.") + to_chat(user, "You toggle PDA message passing from [active ? "On" : "Off"] to [active ? "Off" : "On"]") + active = !active + update_icon() + + return + +/obj/machinery/message_server/attackby(obj/item/O as obj, mob/living/user as mob) + if (active && !(machine_stat & (BROKEN|NOPOWER)) && (spamfilter_limit < MESSAGE_SERVER_DEFAULT_SPAM_LIMIT*2) && \ + istype(O, /obj/item/circuitboard/message_monitor)) + if(!user.attempt_consume_item_for_construction(O)) + return + spamfilter_limit += round(MESSAGE_SERVER_DEFAULT_SPAM_LIMIT / 2) + to_chat(user, "You install additional memory and processors into message server. Its filtering capabilities been enhanced.") + else + return ..(O, user) + +/obj/machinery/message_server/update_icon_state() + . = ..() + if((machine_stat & (BROKEN|NOPOWER))) + icon_state = "server-nopower" + else if (!active) + icon_state = "server-off" + else + icon_state = "server-on" diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 180d4629ca11..0df4c120f5ff 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -1325,7 +1325,7 @@ /obj/item/circuitboard/status_display = 2, /obj/item/circuitboard/ai_status_display = 2, /obj/item/circuitboard/newscaster = 2, - /obj/item/circuitboard/holopad = 2, + /obj/item/circuitboard/machine/holopad = 2, /obj/item/circuitboard/intercom = 4, /obj/item/circuitboard/security/telescreen/entertainment = 4, /obj/item/stock_parts/motor = 2, diff --git a/code/game/mecha/equipment/tools/shield.dm b/code/game/mecha/equipment/tools/shield.dm index 27ad7f591e1b..5e51ca2ccebc 100644 --- a/code/game/mecha/equipment/tools/shield.dm +++ b/code/game/mecha/equipment/tools/shield.dm @@ -20,7 +20,6 @@ my_shield = new my_shield_type my_shield.shield_regen_delay = equip_cooldown my_shield.my_tool = src - return /obj/item/mecha_parts/mecha_equipment/combat_shield/critfail() ..() @@ -28,14 +27,16 @@ return /obj/item/mecha_parts/mecha_equipment/combat_shield/Destroy() - chassis.cut_overlay(drone_overlay) - my_shield.forceMove(src) - my_shield.destroy_shields() - my_shield.my_tool = null - my_shield.my_mecha = null - qdel(my_shield) - my_shield = null - ..() + if(!isnull(chassis)) + chassis.cut_overlay(drone_overlay) + if(!isnull(my_shield)) + my_shield.forceMove(src) + my_shield.destroy_shields() + my_shield.my_tool = null + my_shield.my_mecha = null + qdel(my_shield) + my_shield = null + return ..() /obj/item/mecha_parts/mecha_equipment/combat_shield/add_equip_overlay(obj/mecha/M) ..() diff --git a/code/game/mecha/equipment/tools/syringe_gun.dm b/code/game/mecha/equipment/tools/syringe_gun.dm index 9c04e46be03d..33c486e54941 100644 --- a/code/game/mecha/equipment/tools/syringe_gun.dm +++ b/code/game/mecha/equipment/tools/syringe_gun.dm @@ -321,7 +321,7 @@ /obj/item/mecha_parts/mecha_equipment/crisis_drone/Destroy() STOP_PROCESSING(SSobj, src) - ..() + return ..() /obj/item/mecha_parts/mecha_equipment/crisis_drone/attach(obj/mecha/M as obj) . = ..(M) diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index ddb7572db549..f15549224295 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -35,7 +35,7 @@ ///Coefficient for the efficiency of material usage in item building. Based on the installed parts. var/component_coeff = 1 - var/list/materials = list( + var/list/stored_materials = list( MAT_STEEL = 0, MAT_GLASS = 0, MAT_PLASTIC = 0, @@ -59,8 +59,8 @@ var/res_max_amount = 200000 var/datum/research/files - var/valid_buildtype = MECHFAB - ///A list of categories that valid MECHFAB design datums will broadly categorise themselves under. + var/valid_buildtype = LATHE_TYPE_MECHA + ///A list of categories that valid LATHE_TYPE_MECHA design datums will broadly categorise themselves under. var/list/part_sets = list( "Cyborg", "Ripley", @@ -99,10 +99,10 @@ // todo: WHY ARE YOU dOING ThiS JUST DONT STORE THE MATERIAL for(var/datum/material/M as anything in SSmaterials.all_materials()) var/Name = M.name - if(Name in materials) + if(Name in stored_materials) continue - materials[Name] = 0 + stored_materials[Name] = 0 files = new /datum/research(src) //Setup the research data holder. @@ -122,7 +122,7 @@ add_overlay("[base_icon_state]-active") /obj/machinery/mecha_part_fabricator/dismantle() - for(var/f in materials) + for(var/f in stored_materials) eject_materials(f, -1) ..() @@ -204,12 +204,12 @@ var/list/part = list( "name" = D.name, "desc" = initial(built_item.desc), - "printTime" = get_construction_time_w_coeff(initial(D.time))/10, + "printTime" = get_construction_time_w_coeff(initial(D.work)), "cost" = cost, "id" = D.id, "subCategory" = sub_category, "categoryOverride" = category_override, - "searchMeta" = D.search_metadata + "searchMeta" = "", // temporarily removed ) return part @@ -224,8 +224,8 @@ /obj/machinery/mecha_part_fabricator/proc/output_available_resources() var/list/material_data = list() - for(var/mat_id in materials) - var/amount = materials[mat_id] + for(var/mat_id in stored_materials) + var/amount = stored_materials[mat_id] var/list/material_info = list( "name" = mat_id, "amount" = amount, @@ -279,12 +279,12 @@ * * D - Design datum to calculate the modified resource cost of. */ /obj/machinery/mecha_part_fabricator/proc/check_resources(datum/design/D) - if(length(D.chemicals)) // No reagents storage - no reagent designs. + if(length(D.reagents)) // No reagents storage - no reagent designs. return FALSE . = TRUE var/list/coeff_required = get_resources_w_coeff(D) for(var/mat_id in coeff_required) - if(materials[mat_id] < coeff_required[mat_id]) + if(stored_materials[mat_id] < coeff_required[mat_id]) return FALSE /** @@ -324,10 +324,10 @@ build_materials = get_resources_w_coeff(D) for(var/mat_id in build_materials) - materials[mat_id] -= build_materials[mat_id] + stored_materials[mat_id] -= build_materials[mat_id] being_built = D - build_finish = world.time + get_construction_time_w_coeff(initial(D.time)) + build_finish = world.time + get_construction_time_w_coeff(initial(D.work)) build_start = world.time desc = "It's building \a [D.name]." @@ -370,7 +370,7 @@ * * D - Design datum to attempt to dispense. */ /obj/machinery/mecha_part_fabricator/proc/dispense_built_part(datum/design/D) - var/obj/item/I = D.Fabricate(src, src) + var/obj/item/I = D.legacy_print(src, src) // I.material_flags |= MATERIAL_NO_EFFECTS //Find a better way to do this. // I.set_custom_materials(build_materials) @@ -396,7 +396,7 @@ */ /obj/machinery/mecha_part_fabricator/proc/add_part_set_to_queue(list/part_list) for(var/datum/design/D in files.known_designs) - if((D.build_type & valid_buildtype) && (D.id in part_list)) + if((D.lathe_type & valid_buildtype) && (D.id in part_list)) add_to_queue(D) /** @@ -479,7 +479,7 @@ /obj/machinery/mecha_part_fabricator/ui_assets(mob/user) return list( - get_asset_datum(/datum/asset/spritesheet/sheetmaterials) + get_asset_datum(/datum/asset/spritesheet/materials) ) /obj/machinery/mecha_part_fabricator/attack_hand(mob/user, list/params) @@ -505,7 +505,7 @@ final_sets += part_set for(var/datum/design/D in files.known_designs) - if((D.build_type & valid_buildtype) && D.id != "id") // bugfix for weird null entries + if((D.lathe_type & valid_buildtype) && D.id != "id") // bugfix for weird null entries // This is for us. var/list/part = output_part_info(D, TRUE) @@ -541,7 +541,7 @@ var/list/part = list( "name" = being_built.name, "duration" = build_finish - world.time, - "printTime" = get_construction_time_w_coeff(initial(being_built.time)) + "printTime" = get_construction_time_w_coeff(initial(being_built.work)) ) data["buildingPart"] = part else @@ -581,7 +581,7 @@ // Add a specific part to queue var/T = params["id"] for(var/datum/design/D in files.known_designs) - if((D.build_type & valid_buildtype) && (D.id == T)) + if((D.lathe_type & valid_buildtype) && (D.id == T)) add_to_queue(D) break return @@ -615,7 +615,7 @@ var/id = params["id"] var/datum/design/D = null for(var/datum/design/D_new in files.known_designs) - if((D_new.build_type == valid_buildtype) && (D_new.id == id)) + if((D_new.lathe_type == valid_buildtype) && (D_new.id == id)) D = D_new break @@ -657,22 +657,22 @@ if(istype(I,/obj/item/stack/material)) var/obj/item/stack/material/S = I - if(!(S.material.name in materials)) + if(!(S.material.name in stored_materials)) to_chat(user, SPAN_WARNING("The [src] doesn't accept [S.material]!")) return var/sname = "[S.name]" var/matname = "[S.material.name]" var/amnt = S.perunit - if(materials[S.material.name] + amnt <= res_max_amount) + if(stored_materials[S.material.name] + amnt <= res_max_amount) if(S && S.get_amount() >= 1) var/count = 0 //This is dumb that it happens here but whatever. I guess it's a TODO then. add_overlay("[initial(icon_state)]-load-[matname]") spawn(10) cut_overlay("[initial(icon_state)]-load-[matname]") - while(materials[S.material.name] + amnt <= res_max_amount && S.get_amount() >= 1) - materials[S.material.name] += amnt + while(stored_materials[S.material.name] + amnt <= res_max_amount && S.get_amount() >= 1) + stored_materials[S.material.name] += amnt S.use(1) count++ to_chat(user, "You insert [count] [sname] into the fabricator.") @@ -705,7 +705,7 @@ /obj/machinery/mecha_part_fabricator/proc/eject_materials(var/material, var/amount) // 0 amount = 0 means ejecting a full stack; -1 means eject everything var/recursive = amount == -1 ? 1 : 0 var/matstring = lowertext(material) - var/contains = materials[matstring] + var/contains = stored_materials[matstring] if(!contains) return var/datum/material/M = get_material_by_name(matstring) @@ -718,6 +718,6 @@ if(S.amount <= 0) qdel(S) return - materials[matstring] -= ejected * S.perunit + stored_materials[matstring] -= ejected * S.perunit if(recursive && contains >= S.perunit) eject_materials(matstring, -1) diff --git a/code/game/mecha/mech_prosthetics.dm b/code/game/mecha/mech_prosthetics.dm index 212ad14872b1..4c9619e4004c 100644 --- a/code/game/mecha/mech_prosthetics.dm +++ b/code/game/mecha/mech_prosthetics.dm @@ -35,8 +35,8 @@ MAT_MORPHIUM = 0) res_max_amount = 200000 - valid_buildtype = PROSFAB - ///A list of categories that valid PROSFAB design datums will broadly categorise themselves under. + valid_buildtype = LATHE_TYPE_PROSTHETICS + ///A list of categories that valid LATHE_TYPE_PROSTHETICS design datums will broadly categorise themselves under. part_sets = list( "Cyborg", "Ripley", @@ -75,9 +75,9 @@ /obj/machinery/mecha_part_fabricator/pros/dispense_built_part(datum/design/D) var/obj/item/I = ..() - if(isobj(I) && I.matter && I.matter.len > 0) - for(var/i in I.matter) - I.matter[i] = I.matter[i] * component_coeff + if(isobj(I) && I.materials && I.materials.len > 0) + for(var/i in I.materials) + I.materials[i] = I.materials[i] * component_coeff /obj/machinery/mecha_part_fabricator/pros/ui_data(mob/user) var/list/data = ..() diff --git a/code/game/mecha/micro/mechfab_designs_vr.dm b/code/game/mecha/micro/mechfab_designs_vr.dm index ee252a761839..86355541079a 100644 --- a/code/game/mecha/micro/mechfab_designs_vr.dm +++ b/code/game/mecha/micro/mechfab_designs_vr.dm @@ -1,192 +1,195 @@ -/datum/design/item/mechfab/gopher +/datum/design/science/mechfab/gopher + abstract_type = /datum/design/science/mechfab/gopher category = list("Gopher") - time = 5 + work = (5 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. -/datum/design/item/mechfab/gopher/chassis +/datum/design/science/mechfab/gopher/chassis name = "Gopher Chassis" id = "gopher_chassis" build_path = /obj/item/mecha_parts/micro/chassis/gopher - time = 3 + work = (3 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 7000) -/datum/design/item/mechfab/gopher/torso +/datum/design/science/mechfab/gopher/torso name = "Gopher Torso" id = "gopher_torso" build_path = /obj/item/mecha_parts/micro/part/gopher_torso materials = list(MAT_STEEL = 15000, MAT_GLASS = 5250) -/datum/design/item/mechfab/gopher/left_arm +/datum/design/science/mechfab/gopher/left_arm name = "Gopher Left Arm" id = "gopher_left_arm" build_path = /obj/item/mecha_parts/micro/part/gopher_left_arm materials = list(MAT_STEEL = 8750) -/datum/design/item/mechfab/gopher/right_arm +/datum/design/science/mechfab/gopher/right_arm name = "Gopher Right Arm" id = "gopher_right_arm" build_path = /obj/item/mecha_parts/micro/part/gopher_right_arm materials = list(MAT_STEEL = 8750) -/datum/design/item/mechfab/gopher/left_leg +/datum/design/science/mechfab/gopher/left_leg name = "Gopher Left Leg" id = "gopher_left_leg" build_path = /obj/item/mecha_parts/micro/part/gopher_left_leg materials = list(MAT_STEEL = 12500) -/datum/design/item/mechfab/gopher/right_leg +/datum/design/science/mechfab/gopher/right_leg name = "Gopher Right Leg" id = "gopher_right_leg" build_path = /obj/item/mecha_parts/micro/part/gopher_right_leg materials = list(MAT_STEEL = 12500) -/datum/design/item/mecha/drill/micro +/datum/design/science/mecha/drill/micro name = "Miniature Drill" id = "micro_drill" build_path = /obj/item/mecha_parts/mecha_equipment/tool/drill/micro - time = 5 + work = (5 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 2500) -/datum/design/item/mecha/hydraulic_clamp/micro +/datum/design/science/mecha/hydraulic_clamp/micro name = "Mounted ore box" id = "ore_scoop" build_path = /obj/item/mecha_parts/mecha_equipment/tool/micro/orescoop - time = 5 + work = (5 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 2500) -/datum/design/item/mechfab/polecat +/datum/design/science/mechfab/polecat + abstract_type = /datum/design/science/mechfab/polecat category = list("Polecat") - time = 10 + work = (10 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. -/datum/design/item/mechfab/polecat/chassis +/datum/design/science/mechfab/polecat/chassis name = "Polecat Chassis" id = "polecat_chassis" build_path = /obj/item/mecha_parts/micro/chassis/polecat - time = 3 + work = (3 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 7000) -/datum/design/item/mechfab/polecat/torso +/datum/design/science/mechfab/polecat/torso name = "Polecat Torso" id = "polecat_torso" build_path = /obj/item/mecha_parts/micro/part/polecat_torso materials = list(MAT_STEEL = 15000, MAT_GLASS = 5250) -/datum/design/item/mechfab/polecat/left_arm +/datum/design/science/mechfab/polecat/left_arm name = "Polecat Left Arm" id = "polecat_left_arm" build_path = /obj/item/mecha_parts/micro/part/polecat_left_arm materials = list(MAT_STEEL = 8750) -/datum/design/item/mechfab/polecat/right_arm +/datum/design/science/mechfab/polecat/right_arm name = "Polecat Right Arm" id = "polecat_right_arm" build_path = /obj/item/mecha_parts/micro/part/polecat_right_arm materials = list(MAT_STEEL = 8750) -/datum/design/item/mechfab/polecat/left_leg +/datum/design/science/mechfab/polecat/left_leg name = "Polecat Left Leg" id = "polecat_left_leg" build_path = /obj/item/mecha_parts/micro/part/polecat_left_leg materials = list(MAT_STEEL = 12500) -/datum/design/item/mechfab/polecat/right_leg +/datum/design/science/mechfab/polecat/right_leg name = "Polecat Right Leg" id = "polecat_right_leg" build_path = /obj/item/mecha_parts/micro/part/polecat_right_leg materials = list(MAT_STEEL = 12500) -/datum/design/item/mechfab/polecat/armour +/datum/design/science/mechfab/polecat/armour name = "Polecat Armour Plates" id = "polecat_armour" build_path = /obj/item/mecha_parts/micro/part/polecat_armour - time = 25 + work = (25 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 12500, MAT_PLASTIC = 7500) -/datum/design/item/mecha/taser/micro +/datum/design/science/mecha/taser/micro name = "\improper TS-12 \"Suppressor\" integrated taser" id = "micro_taser" build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/microtaser -/datum/design/item/mecha/weapon/laser/micro +/datum/design/science/mecha/weapon/laser/micro name = "\improper WS-19 \"Torch\" laser carbine" id = "micro_laser" // req_tech = list(TECH_COMBAT = 3, TECH_MAGNET = 3) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/microlaser -/datum/design/item/mecha/weapon/laser_heavy/micro +/datum/design/science/mecha/weapon/laser_heavy/micro name = "\improper PC-20 \"Lance\" light laser cannon" id = "micro_laser_heavy" req_tech = list(TECH_COMBAT = 4, TECH_MATERIAL = 3, TECH_POWER = 3) materials = list(MAT_STEEL = 10000, MAT_GLASS = 2000, MAT_DIAMOND = 1000) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/microheavy -/datum/design/item/mecha/weapon/grenade_launcher/micro +/datum/design/science/mecha/weapon/grenade_launcher/micro name = "\improper FP-20 mounted grenade launcher" id = "micro_flashbang_launcher" // req_tech = list(TECH_COMBAT = 3) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/grenade/microflashbang -/datum/design/item/mecha/weapon/scattershot/micro +/datum/design/science/mecha/weapon/scattershot/micro name = "\improper Remington C-12 \"Boomstick\"" desc = "A mounted combat shotgun with integrated ammo-lathe." id = "micro_scattershot" // req_tech = list(TECH_COMBAT = 4) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/microshotgun -/datum/design/item/mechfab/weasel +/datum/design/science/mechfab/weasel + abstract_type = /datum/design/science/mechfab/weasel category = list("Weasel") - time = 5 + work = (5 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. -/datum/design/item/mechfab/weasel/chassis +/datum/design/science/mechfab/weasel/chassis name = "Weasel Chassis" id = "weasel_chassis" build_path = /obj/item/mecha_parts/micro/chassis/weasel - time = 3 + work = (3 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 7000) -/datum/design/item/mechfab/weasel/torso +/datum/design/science/mechfab/weasel/torso name = "Weasel Torso" id = "weasel_torso" build_path = /obj/item/mecha_parts/micro/part/weasel_torso materials = list(MAT_STEEL = 15000, MAT_GLASS = 5250) -/datum/design/item/mechfab/weasel/left_arm +/datum/design/science/mechfab/weasel/left_arm name = "Weasel Left Arm" id = "weasel_left_arm" build_path = /obj/item/mecha_parts/micro/part/weasel_left_arm materials = list(MAT_STEEL = 8750) -/datum/design/item/mechfab/weasel/right_arm +/datum/design/science/mechfab/weasel/right_arm name = "Weasel Right Arm" id = "weasel_right_arm" build_path = /obj/item/mecha_parts/micro/part/weasel_right_arm materials = list(MAT_STEEL = 8750) -/*/datum/design/item/mechfab/weasel/left_leg +/*/datum/design/science/mechfab/weasel/left_leg name = "Weasel Left Leg" id = "weasel_left_leg" build_path = /obj/item/mecha_parts/micro/part/weasel_left_leg materials = list(MAT_STEEL = 12500) -/datum/design/item/mechfab/weasel/right_leg +/datum/design/science/mechfab/weasel/right_leg name = "Weasel Right Leg" id = "weasel_right_leg" build_path = /obj/item/mecha_parts/micro/part/weasel_right_leg materials = list(MAT_STEEL = 12500)*/ -/datum/design/item/mechfab/weasel/tri_leg +/datum/design/science/mechfab/weasel/tri_leg name = "Weasel Tri Leg" id = "weasel_right_leg" build_path = /obj/item/mecha_parts/micro/part/weasel_tri_leg materials = list(MAT_STEEL = 27500) -/datum/design/item/mechfab/weasel/head +/datum/design/science/mechfab/weasel/head name = "Weasel Head" id = "weasel_head" build_path = /obj/item/mecha_parts/micro/part/weasel_head materials = list(MAT_STEEL = 7000, MAT_GLASS = 2500) -/datum/design/item/mecha/medigun +/datum/design/science/mecha/medigun name = "BL-3/P directed restoration system" desc = "A portable medical system used to treat external injuries from afar." id = "mech_medigun" diff --git a/code/game/objects/items/circuitboards/circuitboard.dm b/code/game/objects/items/circuitboards/circuitboard.dm index 9f82aeef7718..89a41e1f8a9a 100644 --- a/code/game/objects/items/circuitboards/circuitboard.dm +++ b/code/game/objects/items/circuitboards/circuitboard.dm @@ -9,6 +9,10 @@ name = "circuit board" icon = 'icons/obj/module.dmi' icon_state = "id_mod" + materials = list( + MAT_STEEL = 1000, + MAT_GLASS = 250, + ) origin_tech = list(TECH_DATA = 2) density = FALSE anchored = FALSE diff --git a/code/game/objects/items/circuitboards/circuitboards_vr.dm b/code/game/objects/items/circuitboards/circuitboards_vr.dm index 482c12fd66c0..44d2de5eb34a 100644 --- a/code/game/objects/items/circuitboards/circuitboards_vr.dm +++ b/code/game/objects/items/circuitboards/circuitboards_vr.dm @@ -2,18 +2,6 @@ #error T_BOARD macro is not defined but we need it! #endif -// Board for the parts lathe in partslathe.dm -/obj/item/circuitboard/partslathe - name = T_BOARD("parts lathe") - build_path = /obj/machinery/partslathe - board_type = new /datum/frame/frame_types/machine - origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2) - req_components = list( - /obj/item/stock_parts/matter_bin = 2, - /obj/item/stock_parts/manipulator = 2, - /obj/item/stock_parts/console_screen = 1, - ) - // Board for the algae oxygen generator in algae_generator.dm /obj/item/circuitboard/algae_farm name = T_BOARD("algae oxygen generator") @@ -77,11 +65,4 @@ name = T_BOARD("timeclock") build_path = /obj/machinery/computer/timeclock board_type = new /datum/frame/frame_types/timeclock_terminal - matter = list(MAT_STEEL = 50, MAT_GLASS = 50) - -// Board for the ID restorer in id_restorer_vr.dm -/obj/item/circuitboard/id_restorer - name = T_BOARD("ID restoration console") - build_path = /obj/machinery/computer/id_restorer - board_type = new /datum/frame/frame_types/id_restorer - matter = list(MAT_STEEL = 50, MAT_GLASS = 50) + materials = list(MAT_STEEL = 50, MAT_GLASS = 50) diff --git a/code/game/objects/items/circuitboards/computer/camera_monitor.dm b/code/game/objects/items/circuitboards/computer/camera_monitor.dm index 5d0eb5d950a9..a241a3b76220 100644 --- a/code/game/objects/items/circuitboards/computer/camera_monitor.dm +++ b/code/game/objects/items/circuitboards/computer/camera_monitor.dm @@ -37,7 +37,7 @@ name = T_BOARD("entertainment camera monitor") build_path = /obj/machinery/computer/security/telescreen/entertainment board_type = new /datum/frame/frame_types/display - matter = list(MAT_STEEL = 50, MAT_GLASS = 50) + materials = list(MAT_STEEL = 50, MAT_GLASS = 50) /obj/item/circuitboard/security/telescreen/entertainment/Initialize(mapload) . = ..() diff --git a/code/game/objects/items/circuitboards/frame.dm b/code/game/objects/items/circuitboards/frame.dm index 9674abd418ae..7d31d2ebb937 100644 --- a/code/game/objects/items/circuitboards/frame.dm +++ b/code/game/objects/items/circuitboards/frame.dm @@ -10,37 +10,37 @@ name = T_BOARD("guestpass console") build_path = /obj/machinery/computer/guestpass board_type = new /datum/frame/frame_types/guest_pass_console - matter = list(MAT_STEEL = 50, MAT_GLASS = 50) + materials = list(MAT_STEEL = 50, MAT_GLASS = 50) /obj/item/circuitboard/status_display name = T_BOARD("status display") build_path = /obj/machinery/status_display board_type = new /datum/frame/frame_types/display - matter = list(MAT_STEEL = 50, MAT_GLASS = 50) + materials = list(MAT_STEEL = 50, MAT_GLASS = 50) /obj/item/circuitboard/ai_status_display name = T_BOARD("ai status display") build_path = /obj/machinery/ai_status_display board_type = new /datum/frame/frame_types/display - matter = list(MAT_STEEL = 50, MAT_GLASS = 50) + materials = list(MAT_STEEL = 50, MAT_GLASS = 50) /obj/item/circuitboard/newscaster name = T_BOARD("newscaster") build_path = /obj/machinery/newscaster board_type = new /datum/frame/frame_types/newscaster - matter = list(MAT_STEEL = 50, MAT_GLASS = 50) + materials = list(MAT_STEEL = 50, MAT_GLASS = 50) /obj/item/circuitboard/atm name = T_BOARD("atm") build_path = /obj/machinery/atm board_type = new /datum/frame/frame_types/atm - matter = list(MAT_STEEL = 50, MAT_GLASS = 50) + materials = list(MAT_STEEL = 50, MAT_GLASS = 50) /obj/item/circuitboard/request name = T_BOARD("request console") build_path = /obj/machinery/requests_console board_type = new /datum/frame/frame_types/supply_request_console - matter = list(MAT_STEEL = 50, MAT_GLASS = 50) + materials = list(MAT_STEEL = 50, MAT_GLASS = 50) //! Alarms @@ -48,25 +48,25 @@ name = T_BOARD("fire alarm") build_path = /obj/machinery/firealarm board_type = new /datum/frame/frame_types/fire_alarm - matter = list(MAT_STEEL = 50, MAT_GLASS = 50) + materials = list(MAT_STEEL = 50, MAT_GLASS = 50) /obj/item/circuitboard/airalarm name = T_BOARD("air alarm") build_path = /obj/machinery/alarm board_type = new /datum/frame/frame_types/air_alarm - matter = list(MAT_STEEL = 50, MAT_GLASS = 50) + materials = list(MAT_STEEL = 50, MAT_GLASS = 50) /obj/item/circuitboard/intercom name = T_BOARD("intercom") build_path = /obj/item/radio/intercom board_type = new /datum/frame/frame_types/intercom - matter = list(MAT_STEEL = 50, MAT_GLASS = 50) + materials = list(MAT_STEEL = 50, MAT_GLASS = 50) /obj/item/circuitboard/keycard_auth name = T_BOARD("keycard authenticator") build_path = /obj/machinery/keycard_auth board_type = new /datum/frame/frame_types/keycard_authenticator - matter = list(MAT_STEEL = 50, MAT_GLASS = 50) + materials = list(MAT_STEEL = 50, MAT_GLASS = 50) //! Computers @@ -88,7 +88,7 @@ name = T_BOARD("photocopier") build_path = /obj/machinery/photocopier board_type = new /datum/frame/frame_types/photocopier - matter = list(MAT_STEEL = 50, MAT_GLASS = 50) + materials = list(MAT_STEEL = 50, MAT_GLASS = 50) req_components = list( /obj/item/stock_parts/matter_bin = 1, /obj/item/stock_parts/micro_laser = 1, @@ -100,7 +100,7 @@ name = T_BOARD("fax") build_path = /obj/machinery/photocopier/faxmachine board_type = new /datum/frame/frame_types/fax - matter = list(MAT_STEEL = 50, MAT_GLASS = 50) + materials = list(MAT_STEEL = 50, MAT_GLASS = 50) req_components = list( /obj/item/stock_parts/matter_bin = 1, /obj/item/stock_parts/micro_laser = 1, @@ -122,7 +122,7 @@ name = T_BOARD("microwave") build_path = /obj/machinery/microwave board_type = new /datum/frame/frame_types/microwave - matter = list(MAT_STEEL = 50, MAT_GLASS = 50) + materials = list(MAT_STEEL = 50, MAT_GLASS = 50) req_components = list( /obj/item/stock_parts/capacitor = 1, /obj/item/stock_parts/console_screen = 1, @@ -156,7 +156,7 @@ name = T_BOARD("washing machine") build_path = /obj/machinery/washing_machine board_type = new /datum/frame/frame_types/washing_machine - matter = list(MAT_STEEL = 50, MAT_GLASS = 50) + materials = list(MAT_STEEL = 50, MAT_GLASS = 50) req_components = list( /obj/item/stock_parts/gear = 2, /obj/item/stock_parts/motor = 1, diff --git a/code/game/objects/items/circuitboards/machinery/engineering.dm b/code/game/objects/items/circuitboards/machinery/engineering.dm index c26937ef09ec..77243a9faa12 100644 --- a/code/game/objects/items/circuitboards/machinery/engineering.dm +++ b/code/game/objects/items/circuitboards/machinery/engineering.dm @@ -6,7 +6,7 @@ name = T_BOARD("pipe layer") build_path = /obj/machinery/pipelayer board_type = new /datum/frame/frame_types/machine - matter = list(MAT_STEEL = 50, MAT_GLASS = 50) + materials = list(MAT_STEEL = 50, MAT_GLASS = 50) req_components = list( /obj/item/stock_parts/motor = 1, /obj/item/stock_parts/gear = 1, diff --git a/code/game/objects/items/circuitboards/machinery/papershredder.dm b/code/game/objects/items/circuitboards/machinery/papershredder.dm index 85631b1a4be8..45241eddae27 100644 --- a/code/game/objects/items/circuitboards/machinery/papershredder.dm +++ b/code/game/objects/items/circuitboards/machinery/papershredder.dm @@ -6,7 +6,7 @@ name = T_BOARD("papershredder") build_path = /obj/machinery/papershredder board_type = new /datum/frame/frame_types/machine - matter = list(MAT_STEEL = 50, MAT_GLASS = 50) + materials = list(MAT_STEEL = 50, MAT_GLASS = 50) req_components = list( /obj/item/stock_parts/gear = 2, /obj/item/stock_parts/micro_laser = 1, diff --git a/code/game/objects/items/circuitboards/machinery/research.dm b/code/game/objects/items/circuitboards/machinery/research.dm index 0ce314d65da0..3b3bd4d73481 100644 --- a/code/game/objects/items/circuitboards/machinery/research.dm +++ b/code/game/objects/items/circuitboards/machinery/research.dm @@ -41,17 +41,6 @@ /obj/item/stock_parts/scanning_module = 1, ) -/obj/item/circuitboard/autolathe - name = T_BOARD("autolathe") - build_path = /obj/machinery/autolathe - board_type = new /datum/frame/frame_types/machine - origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2) - req_components = list( - /obj/item/stock_parts/console_screen = 1, - /obj/item/stock_parts/manipulator = 1, - /obj/item/stock_parts/matter_bin = 3, - ) - /obj/item/circuitboard/protolathe name = T_BOARD("protolathe") build_path = /obj/machinery/r_n_d/protolathe diff --git a/code/game/objects/items/devices/advnifrepair.dm b/code/game/objects/items/devices/advnifrepair.dm index e0f390420fe8..57d7cff3c3be 100644 --- a/code/game/objects/items/devices/advnifrepair.dm +++ b/code/game/objects/items/devices/advnifrepair.dm @@ -10,7 +10,7 @@ w_class = ITEMSIZE_SMALL throw_speed = 5 throw_range = 10 - matter = list(MAT_STEEL = 4000, MAT_GLASS = 6000) + materials = list(MAT_STEEL = 4000, MAT_GLASS = 6000) origin_tech = list(TECH_MAGNET = 5, TECH_BLUESPACE = 5, TECH_MATERIAL = 5, TECH_ENGINEERING = 5, TECH_DATA = 5) var/datum/reagents/supply var/efficiency = 15 //How many units reagent per 1 unit nanopaste diff --git a/code/game/objects/items/devices/binoculars.dm b/code/game/objects/items/devices/binoculars.dm index 40caebacdf43..0e4c8aaf1084 100644 --- a/code/game/objects/items/devices/binoculars.dm +++ b/code/game/objects/items/devices/binoculars.dm @@ -9,7 +9,7 @@ throw_range = 15 throw_speed = 3 - //matter = list("metal" = 50, MAT_GLASS = 50) + //materials = list("metal" = 50, MAT_GLASS = 50) /obj/item/binoculars/attack_self(mob/user) diff --git a/code/game/objects/items/devices/body_snatcher_vr.dm b/code/game/objects/items/devices/body_snatcher_vr.dm index d759ac291f48..a89be30cd710 100644 --- a/code/game/objects/items/devices/body_snatcher_vr.dm +++ b/code/game/objects/items/devices/body_snatcher_vr.dm @@ -8,7 +8,7 @@ item_flags = ITEM_NOBLUDGEON slot_flags = SLOT_BELT w_class = ITEMSIZE_SMALL - matter = list(MAT_STEEL = 200) + materials = list(MAT_STEEL = 200) origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2, TECH_ILLEGAL = 1) /obj/item/bodysnatcher/attack_mob(mob/target, mob/user, clickchain_flags, list/params, mult, target_zone, intent) diff --git a/code/game/objects/items/devices/communicator/communicator.dm b/code/game/objects/items/devices/communicator/communicator.dm index fbfd28c4747c..e82c7391e25b 100644 --- a/code/game/objects/items/devices/communicator/communicator.dm +++ b/code/game/objects/items/devices/communicator/communicator.dm @@ -26,7 +26,7 @@ var/global/list/obj/item/communicator/all_communicators = list() show_messages = 1 origin_tech = list(TECH_ENGINEERING = 2, TECH_MAGNET = 2, TECH_BLUESPACE = 2, TECH_DATA = 2) - matter = list(MAT_STEEL = 30, MAT_GLASS = 20) + materials = list(MAT_STEEL = 30, MAT_GLASS = 20) var/video_range = 3 var/obj/machinery/camera/communicator/video_source // Their camera diff --git a/code/game/objects/items/devices/debugger.dm b/code/game/objects/items/devices/debugger.dm index 65711f020968..2c2d50904410 100644 --- a/code/game/objects/items/devices/debugger.dm +++ b/code/game/objects/items/devices/debugger.dm @@ -16,7 +16,7 @@ throw_speed = 3 desc = "You can use this on airlocks or APCs to try to hack them without cutting wires." - matter = list(MAT_STEEL = 50, MAT_GLASS = 20) + materials = list(MAT_STEEL = 50, MAT_GLASS = 20) origin_tech = list(TECH_MAGNET = 1, TECH_ENGINEERING = 1) var/obj/machinery/telecomms/buffer // simple machine buffer for device linkage diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 9923fe80a490..7465420ab86f 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -5,7 +5,7 @@ icon_state = "flashlight" w_class = ITEMSIZE_SMALL slot_flags = SLOT_BELT - matter = list(MAT_STEEL = 50, MAT_GLASS = 20) + materials = list(MAT_STEEL = 50, MAT_GLASS = 20) action_button_name = "Toggle Flashlight" light_wedge = LIGHT_WIDE @@ -267,7 +267,7 @@ slot_flags = SLOT_BELT w_class = ITEMSIZE_SMALL attack_verb = list ("smacked", "thwacked", "thunked") - matter = list(MAT_STEEL = 200, MAT_GLASS = 50) + materials = list(MAT_STEEL = 200, MAT_GLASS = 50) hitsound = "swing_hit" light_color = LIGHT_COLOR_FLUORESCENT_FLASHLIGHT light_wedge = LIGHT_NARROW diff --git a/code/game/objects/items/devices/geiger.dm b/code/game/objects/items/devices/geiger.dm index ba204d106bbe..f6029a911f9b 100644 --- a/code/game/objects/items/devices/geiger.dm +++ b/code/game/objects/items/devices/geiger.dm @@ -16,7 +16,7 @@ item_state = "multitool" w_class = ITEMSIZE_SMALL rad_flags = RAD_NO_CONTAMINATE | RAD_BLOCK_CONTENTS - matter = list(MAT_STEEL = 200, MAT_GLASS = 100) + materials = list(MAT_STEEL = 200, MAT_GLASS = 100) var/grace = RAD_GRACE_PERIOD var/datum/looping_sound/geiger/soundloop diff --git a/code/game/objects/items/devices/gps.dm b/code/game/objects/items/devices/gps.dm index ec1daf450a91..d276e9d47e8a 100644 --- a/code/game/objects/items/devices/gps.dm +++ b/code/game/objects/items/devices/gps.dm @@ -25,7 +25,7 @@ w_class = ITEMSIZE_TINY slot_flags = SLOT_BELT origin_tech = list(TECH_MATERIAL = 2, TECH_BLUESPACE = 2, TECH_MAGNET = 1) - matter = list(MAT_STEEL = 500) + materials = list(MAT_STEEL = 500) /// our GPS tag var/gps_tag = "GEN0" diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm index 8e5f7a09f7ee..d6c5f2ec5207 100644 --- a/code/game/objects/items/devices/laserpointer.dm +++ b/code/game/objects/items/devices/laserpointer.dm @@ -6,7 +6,7 @@ item_state = "pen" var/pointer_icon_state slot_flags = SLOT_BELT - matter = list(MAT_GLASS = 500,"metal" = 500) + materials = list(MAT_GLASS = 500,"metal" = 500) w_class = 2 //Increased to 2, because diodes are w_class 2. Conservation of matter. origin_tech = list(TECH_MAGNET = 2, TECH_COMBAT = 1) var/turf/pointer_loc diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm index 2b4936b43825..e01568003e6a 100755 --- a/code/game/objects/items/devices/multitool.dm +++ b/code/game/objects/items/devices/multitool.dm @@ -18,7 +18,7 @@ drop_sound = 'sound/items/drop/multitool.ogg' pickup_sound = 'sound/items/pickup/multitool.ogg' - matter = list(MAT_STEEL = 50, MAT_GLASS = 20) + materials = list(MAT_STEEL = 50, MAT_GLASS = 20) var/mode_index = 1 var/toolmode = MULTITOOL_MODE_STANDARD @@ -126,7 +126,7 @@ icon_state = "crystal_multitool" item_state = "crystal_tool" icon = 'icons/obj/crystal_tools.dmi' - matter = list(MATERIAL_CRYSTAL = 1250) + materials = list(MATERIAL_CRYSTAL = 1250) /obj/item/multitool/crystal/Initialize() . = ..() diff --git a/code/game/objects/items/devices/powersink.dm b/code/game/objects/items/devices/powersink.dm index c43ef7b68954..63868fdb3ca9 100644 --- a/code/game/objects/items/devices/powersink.dm +++ b/code/game/objects/items/devices/powersink.dm @@ -10,7 +10,7 @@ throw_speed = 1 throw_range = 2 - matter = list(MAT_STEEL = 750) + materials = list(MAT_STEEL = 750) origin_tech = list(TECH_POWER = 3, TECH_ILLEGAL = 5) /// amount of power to drain per tick in kw diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm index 6dcc9d7aa504..98224e408e53 100644 --- a/code/game/objects/items/devices/radio/electropack.dm +++ b/code/game/objects/items/devices/radio/electropack.dm @@ -11,7 +11,7 @@ slot_flags = SLOT_BACK w_class = ITEMSIZE_HUGE - matter = list(MAT_STEEL = 10000, MAT_GLASS = 2500) + materials = list(MAT_STEEL = 10000, MAT_GLASS = 2500) var/code = 2 diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index 0c884a76bd51..8f2e0053ad1d 100755 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -4,7 +4,7 @@ var/radio_desc = "" icon_state = "headset" item_state = null // To remove the radio's state - matter = list(MAT_STEEL = 75) + materials = list(MAT_STEEL = 75) subspace_transmission = 1 canhear_range = 0 // Can't hear headsets from very far away slot_flags = SLOT_EARS diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 7db70ff866b3..2c8ee98d1832 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -65,7 +65,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list( var/bs_tx_preload_id var/bs_rx_preload_id - matter = list(MAT_GLASS = 25,MAT_STEEL = 75) + materials = list(MAT_GLASS = 25,MAT_STEEL = 75) var/const/FREQ_LISTENING = 1 var/list/internal_channels diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 1dfac9c2bf1c..7cd3bb4c9acf 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -22,7 +22,7 @@ HALOGEN COUNTER - Radcount on mobs w_class = ITEMSIZE_SMALL throw_speed = 5 throw_range = 10 - matter = list(MAT_STEEL = 200) + materials = list(MAT_STEEL = 200) origin_tech = list(TECH_MAGNET = 1, TECH_BIO = 1) var/mode = 1 var/advscan = 0 @@ -347,7 +347,7 @@ HALOGEN COUNTER - Radcount on mobs throw_speed = 4 throw_range = 20 - matter = list(MAT_STEEL = 30, MAT_GLASS = 20) + materials = list(MAT_STEEL = 30, MAT_GLASS = 20) origin_tech = list(TECH_MAGNET = 1, TECH_ENGINEERING = 1) @@ -367,7 +367,7 @@ HALOGEN COUNTER - Radcount on mobs throw_force = 5 throw_speed = 4 throw_range = 20 - matter = list(MAT_STEEL = 30, MAT_GLASS = 20) + materials = list(MAT_STEEL = 30, MAT_GLASS = 20) origin_tech = list(TECH_MAGNET = 3, TECH_ENGINEERING = 3) /obj/item/analyzer/atmosanalyze(var/mob/user) @@ -415,7 +415,7 @@ HALOGEN COUNTER - Radcount on mobs throw_speed = 4 throw_range = 20 - matter = list(MAT_STEEL = 30, MAT_GLASS = 20) + materials = list(MAT_STEEL = 30, MAT_GLASS = 20) origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2) var/details = 0 @@ -479,7 +479,7 @@ HALOGEN COUNTER - Radcount on mobs throw_force = 5 throw_speed = 4 throw_range = 20 - matter = list(MAT_STEEL = 30, MAT_GLASS = 20) + materials = list(MAT_STEEL = 30, MAT_GLASS = 20) origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2) var/details = 0 @@ -531,7 +531,7 @@ HALOGEN COUNTER - Radcount on mobs throw_force = 0 throw_speed = 3 throw_range = 7 - matter = list(MAT_STEEL = 30, MAT_GLASS = 20) + materials = list(MAT_STEEL = 30, MAT_GLASS = 20) /obj/item/slime_scanner/attack_mob(mob/target, mob/user, clickchain_flags, list/params, mult, target_zone, intent) . = CLICKCHAIN_DO_NOT_PROPAGATE diff --git a/code/game/objects/items/devices/scanners_vr.dm b/code/game/objects/items/devices/scanners_vr.dm index d37f06b0ecb2..ad23160b97c6 100644 --- a/code/game/objects/items/devices/scanners_vr.dm +++ b/code/game/objects/items/devices/scanners_vr.dm @@ -12,7 +12,7 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob w_class = ITEMSIZE_SMALL throw_speed = 5 throw_range = 10 - matter = list(MAT_STEEL = 200) + materials = list(MAT_STEEL = 200) origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2) var/datum/mind/stored_mind diff --git a/code/game/objects/items/devices/suit_cooling.dm b/code/game/objects/items/devices/suit_cooling.dm index 2029a499c8f4..d32a4a0219a7 100644 --- a/code/game/objects/items/devices/suit_cooling.dm +++ b/code/game/objects/items/devices/suit_cooling.dm @@ -13,7 +13,7 @@ throw_range = 4 action_button_name = "Toggle Heatsink" - matter = list(MAT_STEEL = 15000, MAT_GLASS = 3500) + materials = list(MAT_STEEL = 15000, MAT_GLASS = 3500) origin_tech = list(TECH_MAGNET = 2, TECH_MATERIAL = 2) var/on = 0 //is it turned on? @@ -25,6 +25,9 @@ //TODO: make it heat up the surroundings when not in space +/obj/item/suit_cooling_unit/empty + cell = null + /obj/item/suit_cooling_unit/ui_action_click() toggle(usr) diff --git a/code/game/objects/items/devices/t_scanner.dm b/code/game/objects/items/devices/t_scanner.dm index 92a98b0ec289..b214d3e30146 100644 --- a/code/game/objects/items/devices/t_scanner.dm +++ b/code/game/objects/items/devices/t_scanner.dm @@ -8,7 +8,7 @@ item_state = "t-ray" slot_flags = SLOT_BELT w_class = ITEMSIZE_SMALL - matter = list(MAT_STEEL = 150) + materials = list(MAT_STEEL = 150) origin_tech = list(TECH_MAGNET = 1, TECH_ENGINEERING = 1) var/scan_range = 1 @@ -144,14 +144,14 @@ /obj/item/t_scanner/upgraded name = "Upgraded T-ray Scanner" desc = "An upgraded version of the terahertz-ray emitter and scanner used to detect underfloor objects such as cables and pipes." - matter = list(MAT_STEEL = 500, PHORON = 150) + materials = list(MAT_STEEL = 500, PHORON = 150) origin_tech = list(TECH_MAGNET = 4, TECH_ENGINEERING = 5) scan_range = 3 /obj/item/t_scanner/advanced name = "Advanced T-ray Scanner" desc = "An advanced version of the terahertz-ray emitter and scanner used to detect underfloor objects such as cables and pipes." - matter = list(MAT_STEEL = 1500, PHORON = 200, SILVER = 250) + materials = list(MAT_STEEL = 1500, PHORON = 200, SILVER = 250) origin_tech = list(TECH_MAGNET = 7, TECH_ENGINEERING = 7, TECH_MATERIAL = 6) scan_range = 7 diff --git a/code/game/objects/items/devices/tape_recorder/cassette_tape.dm b/code/game/objects/items/devices/tape_recorder/cassette_tape.dm index 31498388ed2a..4d1749bbc8de 100644 --- a/code/game/objects/items/devices/tape_recorder/cassette_tape.dm +++ b/code/game/objects/items/devices/tape_recorder/cassette_tape.dm @@ -19,7 +19,7 @@ icon_state = "tape_white" item_state = "analyzer" w_class = ITEMSIZE_TINY - matter = list(MAT_STEEL=20, "glass"=5) + materials = list(MAT_STEEL=20, "glass"=5) damage_force = 1 throw_force = 0 diff --git a/code/game/objects/items/devices/tape_recorder/tape_recorder.dm b/code/game/objects/items/devices/tape_recorder/tape_recorder.dm index 195dd873c7e4..06a2eb35e528 100644 --- a/code/game/objects/items/devices/tape_recorder/tape_recorder.dm +++ b/code/game/objects/items/devices/tape_recorder/tape_recorder.dm @@ -9,7 +9,7 @@ throw_force = 2 throw_speed = 4 throw_range = 20 - matter = list(MAT_STEEL = 60, MAT_GLASS = 30) + materials = list(MAT_STEEL = 60, MAT_GLASS = 30) /// inserted tape var/obj/item/cassette_tape/tape = /obj/item/cassette_tape/random diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm index e6f10ca35887..b9135bac54b9 100644 --- a/code/game/objects/items/devices/taperecorder.dm +++ b/code/game/objects/items/devices/taperecorder.dm @@ -6,7 +6,7 @@ icon = 'icons/obj/device.dmi' w_class = ITEMSIZE_SMALL - matter = list(MAT_STEEL = 60, MAT_GLASS = 30) + materials = list(MAT_STEEL = 60, MAT_GLASS = 30) var/emagged = 0.0 var/recording = 0.0 @@ -370,7 +370,7 @@ icon_state = "tape_white" item_state = "analyzer" w_class = ITEMSIZE_TINY - matter = list(MAT_STEEL=20, "glass"=5) + materials = list(MAT_STEEL=20, "glass"=5) damage_force = 1 throw_force = 0 var/max_capacity = 1800 diff --git a/code/game/objects/items/devices/translator.dm b/code/game/objects/items/devices/translator.dm index e31aa2ac84d8..7bd4ed16d291 100644 --- a/code/game/objects/items/devices/translator.dm +++ b/code/game/objects/items/devices/translator.dm @@ -25,7 +25,7 @@ set_context(context) /obj/item/universal_translator/Destroy() - if(context) + if(context && !ispath(context)) QDEL_NULL(context) return ..() diff --git a/code/game/objects/items/glassjar.dm b/code/game/objects/items/glassjar.dm index 2f9490ed405e..5b5e9ca52c11 100644 --- a/code/game/objects/items/glassjar.dm +++ b/code/game/objects/items/glassjar.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/items.dmi' icon_state = "jar" w_class = ITEMSIZE_SMALL - matter = list(MAT_GLASS = 200) + materials = list(MAT_GLASS = 200) item_flags = ITEM_NOBLUDGEON var/list/accept_mobs = list(/mob/living/simple_mob/animal/passive/lizard, /mob/living/simple_mob/animal/passive/mouse, /mob/living/simple_mob/animal/sif/leech, /mob/living/simple_mob/animal/sif/frostfly, /mob/living/simple_mob/animal/sif/glitterfly) var/contains = 0 // 0 = nothing, 1 = money, 2 = animal, 3 = spiderling diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm index a9806caced48..259293a41609 100644 --- a/code/game/objects/items/stacks/rods.dm +++ b/code/game/objects/items/stacks/rods.dm @@ -10,7 +10,7 @@ throw_range = 20 drop_sound = 'sound/items/drop/metalweapon.ogg' pickup_sound = 'sound/items/pickup/metalweapon.ogg' - matter = list(MAT_STEEL = SHEET_MATERIAL_AMOUNT / 2) + materials = list(MAT_STEEL = SHEET_MATERIAL_AMOUNT / 2) max_amount = 60 attack_verb = list("hit", "bludgeoned", "whacked") @@ -18,7 +18,7 @@ name = "metal rod synthesizer" desc = "A device that makes metal rods." gender = NEUTER - matter = null + materials = null uses_charge = 1 charge_costs = list(500) stacktype = /obj/item/stack/rods diff --git a/code/game/objects/items/stacks/sandbag.dm b/code/game/objects/items/stacks/sandbag.dm index 1c5f6a5d40e3..9f363cb3ebec 100644 --- a/code/game/objects/items/stacks/sandbag.dm +++ b/code/game/objects/items/stacks/sandbag.dm @@ -11,7 +11,7 @@ throw_range = 20 drop_sound = 'sound/items/drop/backpack.ogg' pickup_sound = 'sound/items/pickup/backpack.ogg' - matter = list("cloth" = 2) + materials = list("cloth" = 2) max_amount = 50 attack_verb = list("tapped", "smacked", "flapped") @@ -58,7 +58,7 @@ throw_range = 10 drop_sound = 'sound/items/drop/backpack.ogg' pickup_sound = 'sound/items/pickup/backpack.ogg' - matter = list("cloth" = 2) + materials = list("cloth" = 2) max_amount = 50 attack_verb = list("hit", "bludgeoned", "whacked") diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index b03fdf9c5e87..ddb070824b4e 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -40,7 +40,6 @@ /obj/item/stack/Initialize(mapload, new_amount, merge = TRUE) if(new_amount != null) amount = new_amount - safety_check() if(!stacktype) stacktype = type . = ..() @@ -50,15 +49,6 @@ merge(S) update_icon() -/obj/item/stack/proc/safety_check() - if(amount > max_amount) - to_chat(usr, "The [name] spills on the [get_area_name(src)]!") - amount -= max_amount - var/obj/item/stack/newstack = new type(get_turf(usr)) - newstack.amount = max_amount - return TRUE - return FALSE - /obj/item/stack/Destroy() if (src && usr && usr.machine == src) usr << browse(null, "window=stack") @@ -88,8 +78,6 @@ . = ..() if(.) return - if(safety_check()) - return list_recipes(user) /obj/item/stack/proc/list_recipes(mob/user, recipes_sublist) @@ -365,8 +353,6 @@ break /obj/item/stack/attack_hand(mob/user, list/params) - if(safety_check()) - return if(user.get_inactive_held_item() == src) change_stack(user, 1) else diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm index 2fd69714e016..86d54fc31cdc 100644 --- a/code/game/objects/items/stacks/tiles/tile_types.dm +++ b/code/game/objects/items/stacks/tiles/tile_types.dm @@ -163,8 +163,8 @@ var/global/list/datum/stack_recipe/grass_recipes = list( \ singular_name = "floor tile" desc = "A metal tile fit for covering a section of floor." icon_state = "tile" + materials = list(MAT_STEEL = SHEET_MATERIAL_AMOUNT / 4) damage_force = 6.0 - matter = list(MAT_STEEL = SHEET_MATERIAL_AMOUNT / 4) throw_force = 15.0 throw_speed = 5 throw_range = 20 @@ -193,21 +193,21 @@ var/global/list/datum/stack_recipe/grass_recipes = list( \ name = "steel floor tile" singular_name = "steel floor tile" icon_state = "tile_steel" - matter = list(MAT_PLASTEEL = SHEET_MATERIAL_AMOUNT / 4) + materials = list(MAT_PLASTEEL = SHEET_MATERIAL_AMOUNT / 4) no_variants = FALSE /obj/item/stack/tile/floor/steel name = "steel floor tile" singular_name = "steel floor tile" icon_state = "tile_steel" - matter = list(MAT_PLASTEEL = SHEET_MATERIAL_AMOUNT / 4) + materials = list(MAT_PLASTEEL = SHEET_MATERIAL_AMOUNT / 4) no_variants = FALSE /obj/item/stack/tile/floor/white name = "white floor tile" singular_name = "white floor tile" icon_state = "tile_white" - matter = list(MAT_PLASTIC = SHEET_MATERIAL_AMOUNT / 4) + materials = list(MAT_PLASTIC = SHEET_MATERIAL_AMOUNT / 4) no_variants = FALSE /obj/item/stack/tile/floor/yellow @@ -221,21 +221,21 @@ var/global/list/datum/stack_recipe/grass_recipes = list( \ name = "dark floor tile" singular_name = "dark floor tile" icon_state = "tile_steel" - matter = list(MAT_PLASTEEL = SHEET_MATERIAL_AMOUNT / 4) + materials = list(MAT_PLASTEEL = SHEET_MATERIAL_AMOUNT / 4) no_variants = FALSE /obj/item/stack/tile/floor/freezer name = "freezer floor tile" singular_name = "freezer floor tile" icon_state = "tile_freezer" - matter = list(MAT_PLASTIC = SHEET_MATERIAL_AMOUNT / 4) + materials = list(MAT_PLASTIC = SHEET_MATERIAL_AMOUNT / 4) no_variants = FALSE /obj/item/stack/tile/floor/cyborg name = "floor tile synthesizer" desc = "A device that makes floor tiles." gender = NEUTER - matter = null + materials = null uses_charge = 1 charge_costs = list(250) stacktype = /obj/item/stack/tile/floor @@ -246,7 +246,7 @@ var/global/list/datum/stack_recipe/grass_recipes = list( \ singular_name = "sandstone tile" desc = "Hardened sand compacted into a brick akin to stone in toughness." icon_state = "tile-sandstone" - matter = list("sandstone" = SHEET_MATERIAL_AMOUNT / 4) + materials = list("sandstone" = SHEET_MATERIAL_AMOUNT / 4) no_variants = FALSE /obj/item/stack/tile/linoleum diff --git a/code/game/objects/items/stock_parts/_stock_parts.dm b/code/game/objects/items/stock_parts/_stock_parts.dm new file mode 100644 index 000000000000..5a275cdef4de --- /dev/null +++ b/code/game/objects/items/stock_parts/_stock_parts.dm @@ -0,0 +1,16 @@ +/obj/item/stock_parts + name = "stock part" + desc = "What?" + gender = PLURAL + icon = 'icons/obj/stock_parts.dmi' + w_class = ITEMSIZE_SMALL + item_flags = ITEM_EASY_LATHE_DECONSTRUCT + var/rating = 1 + +/obj/item/stock_parts/Initialize(mapload) + . = ..() + pixel_x = rand(-5.0, 5) + pixel_y = rand(-5.0, 5) + +/obj/item/stock_parts/get_rating() + return rating diff --git a/code/game/objects/items/stock_parts/capacitor.dm b/code/game/objects/items/stock_parts/capacitor.dm new file mode 100644 index 000000000000..2be667604018 --- /dev/null +++ b/code/game/objects/items/stock_parts/capacitor.dm @@ -0,0 +1,56 @@ +/obj/item/stock_parts/capacitor + name = "capacitor" + desc = "A basic capacitor used in the construction of a variety of devices." + icon_state = "capacitor" + origin_tech = list(TECH_POWER = 1) + materials = list(MAT_STEEL = 50, MAT_GLASS = 50) + + var/charge = 0 + var/max_charge = 1000 + +/obj/item/stock_parts/capacitor/Initialize(mapload) + . = ..() + max_charge *= rating // this is garbage someone remove it later and hardcode + +/obj/item/stock_parts/capacitor/proc/charge(amount) + charge += amount + if(charge > max_charge) + charge = max_charge + +/obj/item/stock_parts/capacitor/proc/use(amount) + if(charge) + charge -= amount + if(charge < 0) + charge = 0 + +/obj/item/stock_parts/capacitor/adv + name = "advanced capacitor" + desc = "An advanced capacitor used in the construction of a variety of devices." + icon_state = "capacitor_adv" + origin_tech = list(TECH_POWER = 3) + rating = 2 + materials = list(MAT_STEEL = 50, MAT_GLASS = 50) + +/obj/item/stock_parts/capacitor/super + name = "super capacitor" + desc = "A super-high capacity capacitor used in the construction of a variety of devices." + icon_state = "capacitor_super" + origin_tech = list(TECH_POWER = 5, TECH_MATERIAL = 4) + rating = 3 + materials = list(MAT_STEEL = 50, MAT_GLASS = 50) + +/obj/item/stock_parts/capacitor/hyper + name = "hyper capacitor" + desc = "A hyper-capacity capacitor used in the construction of a variety of devices." + icon_state = "capacitor_hyper" + origin_tech = list(TECH_POWER = 6, TECH_MATERIAL = 5, TECH_BLUESPACE = 1, TECH_ARCANE = 1) + rating = 4 + materials = list(MAT_STEEL = 80, MAT_GLASS = 40) + +/obj/item/stock_parts/capacitor/omni + name = "omni-capacitor" + desc = "A capacitor of immense capacity used in the construction of a variety of devices." + icon_state = "capacitor_omni" + origin_tech = list(TECH_POWER = 7, TECH_MATERIAL = 6, TECH_BLUESPACE = 3, TECH_PRECURSOR = 1) + rating = 5 + materials = list(MAT_STEEL = 80, MAT_GLASS = 40) diff --git a/code/game/objects/items/stock_parts/console_screen.dm b/code/game/objects/items/stock_parts/console_screen.dm new file mode 100644 index 000000000000..21ab4372e32c --- /dev/null +++ b/code/game/objects/items/stock_parts/console_screen.dm @@ -0,0 +1,6 @@ +/obj/item/stock_parts/console_screen + name = "console screen" + desc = "Used in the construction of computers and other devices with a interactive console." + icon_state = "screen" + origin_tech = list(TECH_MATERIAL = 1) + materials = list(MAT_GLASS = 200) diff --git a/code/game/objects/items/stock_parts/manipulator.dm b/code/game/objects/items/stock_parts/manipulator.dm new file mode 100644 index 000000000000..82e559795349 --- /dev/null +++ b/code/game/objects/items/stock_parts/manipulator.dm @@ -0,0 +1,38 @@ +/obj/item/stock_parts/manipulator + name = "micro-manipulator" + desc = "A tiny little manipulator used in the construction of certain devices." + icon_state = "micro_mani" + origin_tech = list(TECH_MATERIAL = 1, TECH_DATA = 1) + materials = list(MAT_STEEL = 30) + +/obj/item/stock_parts/manipulator/nano + name = "nano-manipulator" + desc = "A tiny little manipulator used in the construction of certain devices." + icon_state = "nano_mani" + origin_tech = list(TECH_MATERIAL = 3, TECH_DATA = 2) + rating = 2 + materials = list(MAT_STEEL = 30) + +/obj/item/stock_parts/manipulator/pico + name = "pico-manipulator" + desc = "A tiny little manipulator used in the construction of certain devices." + icon_state = "pico_mani" + origin_tech = list(TECH_MATERIAL = 5, TECH_DATA = 2) + rating = 3 + materials = list(MAT_STEEL = 30) + +/obj/item/stock_parts/manipulator/hyper + name = "planck-manipulator" + desc = "A miniscule manipulator used in the construction of certain devices." + icon_state = "hyper_mani" + origin_tech = list(TECH_MATERIAL = 6, TECH_DATA = 3, TECH_ARCANE = 1) + rating = 4 + materials = list(MAT_STEEL = 30) + +/obj/item/stock_parts/manipulator/omni + name = "omni-manipulator" + desc = "A strange, infinitesimal manipulator used in the construction of certain devices." + icon_state = "omni_mani" + origin_tech = list(TECH_MATERIAL = 7, TECH_DATA = 4, TECH_PRECURSOR = 1) + rating = 5 + materials = list(MAT_STEEL = 30) diff --git a/code/game/objects/items/stock_parts/matter_bin.dm b/code/game/objects/items/stock_parts/matter_bin.dm new file mode 100644 index 000000000000..181b87e9e782 --- /dev/null +++ b/code/game/objects/items/stock_parts/matter_bin.dm @@ -0,0 +1,38 @@ +/obj/item/stock_parts/matter_bin + name = "matter bin" + desc = "A container for hold compressed matter awaiting re-construction." + icon_state = "matter_bin" + origin_tech = list(TECH_MATERIAL = 1) + materials = list(MAT_STEEL = 80) + +/obj/item/stock_parts/matter_bin/adv + name = "advanced matter bin" + desc = "A container for hold compressed matter awaiting re-construction." + icon_state = "advanced_matter_bin" + origin_tech = list(TECH_MATERIAL = 3) + rating = 2 + materials = list(MAT_STEEL = 80) + +/obj/item/stock_parts/matter_bin/super + name = "super matter bin" + desc = "A container for hold compressed matter awaiting re-construction." + icon_state = "super_matter_bin" + origin_tech = list(TECH_MATERIAL = 5) + rating = 3 + materials = list(MAT_STEEL = 80) + +/obj/item/stock_parts/matter_bin/hyper + name = "hyper matter bin" + desc = "A container for holding compressed matter awaiting re-construction." + icon_state = "hyper_matter_bin" + origin_tech = list(TECH_MATERIAL = 6, TECH_ARCANE = 1) + rating = 4 + materials = list(MAT_STEEL = 100) + +/obj/item/stock_parts/matter_bin/omni + name = "omni-matter bin" + desc = "A strange container for holding compressed matter awaiting re-construction." + icon_state = "omni_matter_bin" + origin_tech = list(TECH_MATERIAL = 7, TECH_PRECURSOR = 1) + rating = 5 + materials = list(MAT_STEEL = 100) diff --git a/code/game/objects/items/stock_parts/mechanical.dm b/code/game/objects/items/stock_parts/mechanical.dm new file mode 100644 index 000000000000..577d660daac8 --- /dev/null +++ b/code/game/objects/items/stock_parts/mechanical.dm @@ -0,0 +1,25 @@ +//* industrial / mechanical parts - tierless + +/obj/item/stock_parts/gear + name = "gear" + desc = "A gear used for construction." + icon = 'icons/obj/stock_parts.dmi' + icon_state = "gear" + origin_tech = list(TECH_ENGINEERING = 1) + materials = list(MAT_STEEL = 50) + +/obj/item/stock_parts/motor + name = "motor" + desc = "A motor used for construction." + icon = 'icons/obj/stock_parts.dmi' + icon_state = "motor" + origin_tech = list(TECH_ENGINEERING = 1) + materials = list(MAT_STEEL = 60, MAT_GLASS = 10) + +/obj/item/stock_parts/spring + name = "spring" + desc = "A spring used for construction." + icon = 'icons/obj/stock_parts.dmi' + icon_state = "spring" + origin_tech = list(TECH_ENGINEERING = 1) + materials = list(MAT_STEEL = 40) diff --git a/code/game/objects/items/stock_parts/micro_laser.dm b/code/game/objects/items/stock_parts/micro_laser.dm new file mode 100644 index 000000000000..889e80e6d3db --- /dev/null +++ b/code/game/objects/items/stock_parts/micro_laser.dm @@ -0,0 +1,38 @@ +/obj/item/stock_parts/micro_laser + name = "micro-laser" + desc = "A tiny laser used in certain devices." + icon_state = "micro_laser" + origin_tech = list(TECH_MAGNET = 1) + materials = list(MAT_STEEL = 10, MAT_GLASS = 20) + +/obj/item/stock_parts/micro_laser/high + name = "high-power micro-laser" + desc = "A tiny laser used in certain devices." + icon_state = "high_micro_laser" + origin_tech = list(TECH_MAGNET = 3) + rating = 2 + materials = list(MAT_STEEL = 10, MAT_GLASS = 20) + +/obj/item/stock_parts/micro_laser/ultra + name = "ultra-high-power micro-laser" + icon_state = "ultra_high_micro_laser" + desc = "A tiny laser used in certain devices." + origin_tech = list(TECH_MAGNET = 5) + rating = 3 + materials = list(MAT_STEEL = 10, MAT_GLASS = 20) + +/obj/item/stock_parts/micro_laser/hyper + name = "hyper-power micro-laser" + icon_state = "hyper_micro_laser" + desc = "A tiny laser used in certain devices." + origin_tech = list(TECH_MAGNET = 6, TECH_ARCANE = 1) + rating = 4 + materials = list(MAT_STEEL = 30, MAT_GLASS = 40) + +/obj/item/stock_parts/micro_laser/omni + name = "omni-power micro-laser" + icon_state = "omni_micro_laser" + desc = "A strange laser used in certain devices." + origin_tech = list(TECH_MAGNET = 7, TECH_PRECURSOR = 1) + rating = 5 + materials = list(MAT_STEEL = 30, MAT_GLASS = 40) diff --git a/code/game/objects/items/stock_parts/part_replacer.dm b/code/game/objects/items/stock_parts/part_replacer.dm new file mode 100644 index 000000000000..6af99faae20d --- /dev/null +++ b/code/game/objects/items/stock_parts/part_replacer.dm @@ -0,0 +1,72 @@ +/obj/item/storage/part_replacer + name = "rapid part exchange device" + desc = "A special mechanical module made to store, sort, and apply standard machine parts." + icon_state = "RPED" + w_class = ITEMSIZE_HUGE + can_hold = list(/obj/item/stock_parts) + storage_slots = 100 + use_to_pickup = 1 + allow_quick_gather = 1 + allow_quick_empty = 1 + collection_mode = 1 + display_contents_with_number = 1 + max_w_class = ITEMSIZE_NORMAL + max_storage_space = 200 + materials = list( + MAT_STEEL = 8000, + MAT_GLASS = 2500, + ) + var/panel_req = TRUE + +/obj/item/storage/part_repalcer/basic + name = "basic part exchanger" + desc = "A basic part exchanger. It can't seem to store much." + storage_slots = 35 + materials = list( + MAT_STEEL = 4000, + MAT_GLASS = 1500, + ) + +/obj/item/storage/part_replacer/adv + name = "advanced rapid part exchange device" + desc = "A special mechanical module made to store, sort, and apply standard machine parts. This one has a greatly upgraded storage capacity" + icon_state = "RPED" + w_class = ITEMSIZE_HUGE + can_hold = list(/obj/item/stock_parts) + storage_slots = 200 + use_to_pickup = 1 + allow_quick_gather = 1 + allow_quick_empty = 1 + collection_mode = 1 + display_contents_with_number = 1 + max_w_class = ITEMSIZE_NORMAL + max_storage_space = 400 + materials = list( + MAT_STEEL = 12000, + MAT_GLASS = 4000, + ) + +/obj/item/storage/part_replacer/adv/discount_bluespace + name = "discount bluespace rapid part exchange device" + desc = "A special mechanical module made to store, sort, and apply standard machine parts. This one has a further increased storage capacity, \ + and the ability to work on machines with closed maintenance panels." + storage_slots = 400 + max_storage_space = 800 + panel_req = FALSE + +/obj/item/storage/part_replacer/drop_contents() // hacky-feeling tier-based drop system + hide_from(usr) + var/turf/T = get_turf(src) + var/lowest_rating = INFINITY // We want the lowest-part tier rating in the RPED so we only drop the lowest-tier parts. + /* + * Why not just use the stock part's rating variable? + * Future-proofing for a potential future where stock parts aren't the only thing that can fit in an RPED. + * see: /tg/ and /vg/'s RPEDs fitting power cells, beakers, etc. + */ + for(var/obj/item/B in contents) + if(B.rped_rating() < lowest_rating) + lowest_rating = B.rped_rating() + for(var/obj/item/B in contents) + if(B.rped_rating() > lowest_rating) + continue + remove_from_storage(B, T) diff --git a/code/game/objects/items/stock_parts/scanning_module.dm b/code/game/objects/items/stock_parts/scanning_module.dm new file mode 100644 index 000000000000..02e7fad6f00d --- /dev/null +++ b/code/game/objects/items/stock_parts/scanning_module.dm @@ -0,0 +1,38 @@ +/obj/item/stock_parts/scanning_module + name = "scanning module" + desc = "A compact, high resolution scanning module used in the construction of certain devices." + icon_state = "scan_module" + origin_tech = list(TECH_MAGNET = 1) + materials = list(MAT_STEEL = 50, MAT_GLASS = 20) + +/obj/item/stock_parts/scanning_module/adv + name = "advanced scanning module" + desc = "A compact, high resolution scanning module used in the construction of certain devices." + icon_state = "scan_module_adv" + origin_tech = list(TECH_MAGNET = 3) + rating = 2 + materials = list(MAT_STEEL = 50, MAT_GLASS = 20) + +/obj/item/stock_parts/scanning_module/phasic + name = "phasic scanning module" + desc = "A compact, high resolution phasic scanning module used in the construction of certain devices." + icon_state = "scan_module_phasic" + origin_tech = list(TECH_MAGNET = 5) + rating = 3 + materials = list(MAT_STEEL = 50, MAT_GLASS = 20) + +/obj/item/stock_parts/scanning_module/hyper + name = "quantum scanning module" + desc = "A compact, near-perfect resolution quantum scanning module used in the construction of certain devices." + icon_state = "scan_module_hyper" + origin_tech = list(TECH_MAGNET = 6, TECH_BLUESPACE = 1, TECH_ARCANE = 1) + rating = 4 + materials = list(MAT_STEEL = 100, MAT_GLASS = 40) + +/obj/item/stock_parts/scanning_module/omni + name = "omni-scanning module" + desc = "A compact, perfect resolution temporospatial scanning module used in the construction of certain devices." + icon_state = "scan_module_omni" + origin_tech = list(TECH_MAGNET = 7, TECH_BLUESPACE = 3, TECH_PRECURSOR = 1) + rating = 5 + materials = list(MAT_STEEL = 100, MAT_GLASS = 40) diff --git a/code/game/objects/items/stock_parts/subspace.dm b/code/game/objects/items/stock_parts/subspace.dm new file mode 100644 index 000000000000..9989d7e64e1c --- /dev/null +++ b/code/game/objects/items/stock_parts/subspace.dm @@ -0,0 +1,50 @@ +//* subspace parts - tier-less + +/obj/item/stock_parts/subspace/ansible + name = "subspace ansible" + icon_state = "subspace_ansible" + desc = "A compact module capable of sensing extradimensional activity." + origin_tech = list(TECH_DATA = 3, TECH_MAGNET = 5 ,TECH_MATERIAL = 4, TECH_BLUESPACE = 2) + materials = list(MAT_STEEL = 30, MAT_GLASS = 10) + +/obj/item/stock_parts/subspace/sub_filter + name = "hyperwave filter" + icon_state = "hyperwave_filter" + desc = "A tiny device capable of filtering and converting super-intense radiowaves." + origin_tech = list(TECH_DATA = 4, TECH_MAGNET = 2) + materials = list(MAT_STEEL = 30, MAT_GLASS = 10) + +/obj/item/stock_parts/subspace/amplifier + name = "subspace amplifier" + icon_state = "subspace_amplifier" + desc = "A compact micro-machine capable of amplifying weak subspace transmissions." + origin_tech = list(TECH_DATA = 3, TECH_MAGNET = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2) + materials = list(MAT_STEEL = 30, MAT_GLASS = 10) + +/obj/item/stock_parts/subspace/treatment + name = "subspace treatment disk" + icon_state = "treatment_disk" + desc = "A compact micro-machine capable of stretching out hyper-compressed radio waves." + origin_tech = list(TECH_DATA = 3, TECH_MAGNET = 2, TECH_MATERIAL = 5, TECH_BLUESPACE = 2) + materials = list(MAT_STEEL = 30, MAT_GLASS = 10) + +/obj/item/stock_parts/subspace/analyzer + name = "subspace wavelength analyzer" + icon_state = "wavelength_analyzer" + desc = "A sophisticated analyzer capable of analyzing cryptic subspace wavelengths." + origin_tech = list(TECH_DATA = 3, TECH_MAGNET = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2) + materials = list(MAT_STEEL = 30, MAT_GLASS = 10) + +/obj/item/stock_parts/subspace/crystal + name = "ansible crystal" + icon_state = "ansible_crystal" + desc = "A crystal made from pure glass used to transmit laser databursts to subspace." + origin_tech = list(TECH_MAGNET = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2) + materials = list(MAT_GLASS = 50) + +/obj/item/stock_parts/subspace/transmitter + name = "subspace transmitter" + icon_state = "subspace_transmitter" + desc = "A large piece of equipment used to open a window into the subspace dimension." + origin_tech = list(TECH_MAGNET = 5, TECH_MATERIAL = 5, TECH_BLUESPACE = 3) + materials = list(MAT_STEEL = 50) diff --git a/code/game/objects/items/tools/crowbar.dm b/code/game/objects/items/tools/crowbar.dm index b578566a9d4b..6edc8c1509e6 100644 --- a/code/game/objects/items/tools/crowbar.dm +++ b/code/game/objects/items/tools/crowbar.dm @@ -16,7 +16,7 @@ item_state = "crowbar" w_class = ITEMSIZE_SMALL origin_tech = list(TECH_ENGINEERING = 1) - matter = list(MAT_STEEL = 50) + materials = list(MAT_STEEL = 50) attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked") tool_sound = 'sound/items/crowbar.ogg' drop_sound = 'sound/items/drop/crowbar.ogg' @@ -93,7 +93,7 @@ desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a prying head." icon_state = "jaws_pry" item_state = "jawsoflife" - matter = list(MAT_METAL=150, MAT_SILVER=50) + materials = list(MAT_METAL=150, MAT_SILVER=50) origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2) tool_sound = 'sound/items/jaws_pry.ogg' damage_force = 15 @@ -139,7 +139,7 @@ item_state = "crowbar" w_class = ITEMSIZE_SMALL origin_tech = list(TECH_ENGINEERING = 1) - matter = list(MAT_STEEL = 30) + materials = list(MAT_STEEL = 30) attack_verb = list("whapped", "smacked", "swatted", "thwacked", "hit") tool_sound = 'sound/items/crowbar.ogg' tool_speed = 1 @@ -161,7 +161,7 @@ icon_state = "crystal_crowbar" item_state = "crystal_tool" icon = 'icons/obj/crystal_tools.dmi' - matter = list(MATERIAL_CRYSTAL = 1250) + materials = list(MATERIAL_CRYSTAL = 1250) tool_speed = 0.2 /obj/item/tool/crowbar/crystal/Initialize() diff --git a/code/game/objects/items/tools/screwdriver.dm b/code/game/objects/items/tools/screwdriver.dm index fd764485b371..2ab66c31d2d8 100644 --- a/code/game/objects/items/tools/screwdriver.dm +++ b/code/game/objects/items/tools/screwdriver.dm @@ -18,7 +18,7 @@ tool_sound = 'sound/items/screwdriver.ogg' drop_sound = 'sound/items/drop/screwdriver.ogg' pickup_sound = 'sound/items/pickup/screwdriver.ogg' - matter = list(MAT_STEEL = 75) + materials = list(MAT_STEEL = 75) attack_verb = list("stabbed") sharp = 1 tool_speed = 1 @@ -139,7 +139,7 @@ desc = "A simple powered hand drill. It's fitted with a screw bit." icon_state = "drill_screw" item_state = "drill" - matter = list(MAT_STEEL = 150, MAT_SILVER = 50) + materials = list(MAT_STEEL = 150, MAT_SILVER = 50) origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2) slot_flags = SLOT_BELT damage_force = 8 @@ -184,7 +184,7 @@ icon_state = "crystal_screwdriver" item_state = "crystal_tool" icon = 'icons/obj/crystal_tools.dmi' - matter = list(MATERIAL_CRYSTAL = 1250) + materials = list(MATERIAL_CRYSTAL = 1250) tool_speed = 0.2 /obj/item/tool/screwdriver/crystal/Initialize() diff --git a/code/game/objects/items/tools/weldingtool.dm b/code/game/objects/items/tools/weldingtool.dm index 0de4fc0e3293..a080a6322f25 100644 --- a/code/game/objects/items/tools/weldingtool.dm +++ b/code/game/objects/items/tools/weldingtool.dm @@ -18,7 +18,7 @@ w_class = ITEMSIZE_SMALL //Cost to make in the autolathe - matter = list(MAT_STEEL = 70, MAT_GLASS = 30) + materials = list(MAT_STEEL = 70, MAT_GLASS = 30) //R&D tech level origin_tech = list(TECH_ENGINEERING = 1) @@ -334,7 +334,7 @@ icon_state = "indwelder" max_fuel = 40 origin_tech = list(TECH_ENGINEERING = 2, TECH_PHORON = 2) - matter = list(MAT_STEEL = 70, MAT_GLASS = 60) + materials = list(MAT_STEEL = 70, MAT_GLASS = 60) /obj/item/weldingtool/largetank/cyborg name = "integrated welding tool" @@ -348,7 +348,7 @@ max_fuel = 80 w_class = ITEMSIZE_NORMAL origin_tech = list(TECH_ENGINEERING = 3) - matter = list(MAT_STEEL = 70, MAT_GLASS = 120) + materials = list(MAT_STEEL = 70, MAT_GLASS = 120) /obj/item/weldingtool/mini name = "emergency welding tool" @@ -356,7 +356,7 @@ icon_state = "miniwelder" max_fuel = 10 w_class = ITEMSIZE_SMALL - matter = list(MAT_METAL = 30, MAT_GLASS = 10) + materials = list(MAT_METAL = 30, MAT_GLASS = 10) change_icons = 0 tool_speed = 2 eye_safety_modifier = 1 // Safer on eyes. @@ -366,7 +366,7 @@ desc = "A curious welding tool that uses an anomalous ignition method." icon_state = "ashwelder" max_fuel = 20 - matter = list(MAT_METAL = 30, MAT_BONE = 10) + materials = list(MAT_METAL = 30, MAT_BONE = 10) tool_speed = 1.5 eye_safety_modifier = 3 // Safe for Scorians who don't have goggles. always_process = TRUE @@ -382,7 +382,7 @@ desc = "A brass plated welder utilizing an antiquated, yet incredibly efficient, fuel system." icon_state = "brasswelder" max_fuel = 40 - matter = list(MAT_STEEL = 70, "brass" = 60) + materials = list(MAT_STEEL = 70, "brass" = 60) tool_speed = 0.75 /datum/category_item/catalogue/anomalous/precursor_a/alien_welder @@ -434,7 +434,7 @@ max_fuel = 40 w_class = ITEMSIZE_NORMAL origin_tech = list(TECH_ENGINEERING = 4, TECH_PHORON = 3) - matter = list(MAT_STEEL = 70, MAT_GLASS = 120) + materials = list(MAT_STEEL = 70, MAT_GLASS = 120) tool_speed = 0.5 change_icons = 0 flame_intensity = 3 @@ -470,7 +470,7 @@ icon_state = "tubewelder" max_fuel = 10 w_class = ITEMSIZE_NO_CONTAINER - matter = null + materials = null tool_speed = 1.25 change_icons = 0 flame_intensity = 1 @@ -530,7 +530,7 @@ icon_state = "welderspear" max_fuel = 10 w_class = ITEMSIZE_NORMAL - matter = list(MAT_METAL = 50, MAT_GLASS = 10) + materials = list(MAT_METAL = 50, MAT_GLASS = 10) tool_speed = 1.5 eye_safety_modifier = 1 // Safer on eyes. reach = 2 @@ -707,7 +707,7 @@ icon_state = "crystal_welder" item_state = "crystal_tool" icon = 'icons/obj/crystal_tools.dmi' - matter = list(MATERIAL_CRYSTAL = 1250) + materials = list(MATERIAL_CRYSTAL = 1250) cell_type = null charge_cost = null tool_speed = 0.2 diff --git a/code/game/objects/items/tools/wirecutters.dm b/code/game/objects/items/tools/wirecutters.dm index 1ac2bc6658b5..f2c4f501d63a 100644 --- a/code/game/objects/items/tools/wirecutters.dm +++ b/code/game/objects/items/tools/wirecutters.dm @@ -14,7 +14,7 @@ throw_range = 9 w_class = ITEMSIZE_SMALL origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINEERING = 1) - matter = list(MAT_STEEL = 80) + materials = list(MAT_STEEL = 80) attack_verb = list("pinched", "nipped") hitsound = 'sound/items/wirecutter.ogg' tool_sound = 'sound/items/wirecutter.ogg' @@ -121,7 +121,7 @@ icon_state = "jaws_cutter" item_state = "jawsoflife" origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2) - matter = list(MAT_METAL=150, MAT_SILVER=50) + materials = list(MAT_METAL=150, MAT_SILVER=50) tool_sound = 'sound/items/jaws_cut.ogg' damage_force = 15 tool_speed = 0.25 @@ -157,7 +157,7 @@ icon_state = "crystal_wirecutter" item_state = "crystal_tool" icon = 'icons/obj/crystal_tools.dmi' - matter = list(MATERIAL_CRYSTAL = 1250) + materials = list(MATERIAL_CRYSTAL = 1250) tool_speed = 0.2 /obj/item/tool/wirecutters/crystal/Initialize() diff --git a/code/game/objects/items/tools/wrench.dm b/code/game/objects/items/tools/wrench.dm index 8a640c4fca1d..acabc9ac3d7b 100644 --- a/code/game/objects/items/tools/wrench.dm +++ b/code/game/objects/items/tools/wrench.dm @@ -13,7 +13,7 @@ throw_force = 7 w_class = ITEMSIZE_SMALL origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINEERING = 1) - matter = list(MAT_STEEL = 150) + materials = list(MAT_STEEL = 150) attack_verb = list("bashed", "battered", "bludgeoned", "whacked") tool_sound = 'sound/items/ratchet.ogg' tool_speed = 1 @@ -121,7 +121,7 @@ icon_state = "drill_bolt" item_state = "drill" tool_sound = 'sound/items/drill_use.ogg' - matter = list(MAT_STEEL = 150, MAT_SILVER = 50) + materials = list(MAT_STEEL = 150, MAT_SILVER = 50) origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2) damage_force = 8 w_class = ITEMSIZE_SMALL @@ -160,7 +160,7 @@ icon_state = "crystal_wrench" item_state = "crystal_tool" icon = 'icons/obj/crystal_tools.dmi' - matter = list(MATERIAL_CRYSTAL = 1250) + materials = list(MATERIAL_CRYSTAL = 1250) tool_speed = 0.2 /obj/item/tool/wrench/crystal/Initialize() diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index ad65d06db8c4..f12d4fac3951 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -18,7 +18,7 @@ throw_range = 5 w_class = ITEMSIZE_NORMAL origin_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 2) - matter = list(MAT_STEEL = 24000) + materials = list(MAT_STEEL = 24000) preserve_item = TRUE // RCDs are pretty important. var/datum/effect_system/spark_spread/spark_system var/stored_matter = 0 @@ -423,13 +423,13 @@ w_class = ITEMSIZE_SMALL origin_tech = list(TECH_MATERIAL = 2) - matter = list(MAT_STEEL = 20000, MAT_GLASS = 4000) + materials = list(MAT_STEEL = 20000, MAT_GLASS = 4000) var/remaining = RCD_MAX_CAPACITY / 3 /obj/item/rcd_ammo/large name = "high-capacity matter cartridge" desc = "Do not ingest." - matter = list(MAT_STEEL = 60000, MAT_GLASS = 12000) + materials = list(MAT_STEEL = 60000, MAT_GLASS = 12000) origin_tech = list(TECH_MATERIAL = 4) remaining = RCD_MAX_CAPACITY diff --git a/code/game/objects/items/weapons/RPD.dm b/code/game/objects/items/weapons/RPD.dm index ee7e30f205e7..fcaf1ab2cf4b 100644 --- a/code/game/objects/items/weapons/RPD.dm +++ b/code/game/objects/items/weapons/RPD.dm @@ -24,7 +24,7 @@ throw_range = 5 w_class = ITEMSIZE_NORMAL slot_flags = SLOT_BELT - matter = list(MAT_STEEL = 50000, MAT_GLASS = 25000) + materials = list(MAT_STEEL = 20000, MAT_GLASS = 10000) ///Sparks system used when changing device in the UI var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread ///Direction of the device we are going to spawn, set up in the UI diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index f9bee916b886..ba3640fb08b0 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -9,8 +9,8 @@ w_class = ITEMSIZE_NORMAL throw_speed = 2 throw_range = 10 + materials = list(MAT_STEEL = 90) damage_force = 10 - matter = list(MAT_STEEL = 90) attack_verb = list("slammed", "whacked", "bashed", "thunked", "battered", "bludgeoned", "thrashed") drop_sound = 'sound/items/drop/gascan.ogg' pickup_sound = 'sound/items/pickup/gascan.ogg' diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm index 55f329da29fa..b6c572d7eb89 100644 --- a/code/game/objects/items/weapons/flamethrower.dm +++ b/code/game/objects/items/weapons/flamethrower.dm @@ -14,7 +14,7 @@ throw_range = 5 w_class = ITEMSIZE_NORMAL origin_tech = list(TECH_COMBAT = 1, TECH_PHORON = 1) - matter = list(MAT_STEEL = 500) + materials = list(MAT_STEEL = 500) var/status = 0 var/throw_amount = 100 var/lit = 0 //on or off diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm index 4a8ebfefa1db..5a325eafe813 100644 --- a/code/game/objects/items/weapons/handcuffs.dm +++ b/code/game/objects/items/weapons/handcuffs.dm @@ -10,7 +10,7 @@ throw_speed = 2 throw_range = 5 origin_tech = list(TECH_MATERIAL = 1) - matter = list(MAT_STEEL = 500) + materials = list(MAT_STEEL = 500) drop_sound = 'sound/items/drop/accessory.ogg' pickup_sound = 'sound/items/pickup/accessory.ogg' var/elastic diff --git a/code/game/objects/items/weapons/implants/implantcircuits.dm b/code/game/objects/items/weapons/implants/implantcircuits.dm index 4fb6179f646a..9ec47f6d9943 100644 --- a/code/game/objects/items/weapons/implants/implantcircuits.dm +++ b/code/game/objects/items/weapons/implants/implantcircuits.dm @@ -14,9 +14,10 @@ IC.implant = src /obj/item/implant/integrated_circuit/Destroy() - IC.implant = null - qdel(IC) - ..() + if(!isnull(IC)) + IC.implant = null + qdel(IC) + return ..() /obj/item/implant/integrated_circuit/get_data() var/dat = {" diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm index cf729b7eabe7..9c9737963af8 100644 --- a/code/game/objects/items/weapons/implants/implanter.dm +++ b/code/game/objects/items/weapons/implants/implanter.dm @@ -6,7 +6,7 @@ throw_speed = 1 throw_range = 5 w_class = ITEMSIZE_SMALL - matter = list(MAT_STEEL = 1000, MAT_GLASS = 1000) + materials = list(MAT_STEEL = 1000, MAT_GLASS = 1000) var/obj/item/implant/imp = null var/active = 1 diff --git a/code/game/objects/items/weapons/material/ashtray.dm b/code/game/objects/items/weapons/material/ashtray.dm index f309e806a59e..9fcbf2083f4b 100644 --- a/code/game/objects/items/weapons/material/ashtray.dm +++ b/code/game/objects/items/weapons/material/ashtray.dm @@ -6,6 +6,7 @@ var/global/list/ashtray_cache = list() icon_state = "blank" force_divisor = 0.1 thrown_force_divisor = 0.1 + materials = list(MAT_STEEL = 4000) var/image/base_image var/max_butts = 10 diff --git a/code/game/objects/items/weapons/material/knives.dm b/code/game/objects/items/weapons/material/knives.dm index ccd27c2565e5..aae4f571ae06 100644 --- a/code/game/objects/items/weapons/material/knives.dm +++ b/code/game/objects/items/weapons/material/knives.dm @@ -79,7 +79,7 @@ sharp = 1 edge = 1 force_divisor = 0.15 // 9 when wielded with hardness 60 (steel) - matter = list(MAT_STEEL = 12000) + materials = list(MAT_STEEL = 12000) origin_tech = list(TECH_MATERIAL = 1) attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") diff --git a/code/game/objects/items/weapons/material/material_weapons.dm b/code/game/objects/items/weapons/material/material_weapons.dm index 3721f581b763..82e62f878009 100644 --- a/code/game/objects/items/weapons/material/material_weapons.dm +++ b/code/game/objects/items/weapons/material/material_weapons.dm @@ -39,11 +39,11 @@ qdel(src) return - matter = material.get_matter() - if(matter.len) - for(var/material_type in matter) - if(!isnull(matter[material_type])) - matter[material_type] *= force_divisor // May require a new var instead. + materials = material.get_matter() + if(materials.len) + for(var/material_type in materials) + if(!isnull(materials[material_type])) + materials[material_type] *= force_divisor // May require a new var instead. if(!(material.conductive)) src.atom_flags |= NOCONDUCT @@ -51,6 +51,12 @@ /obj/item/material/get_material() return material +/obj/item/material/set_material_parts(list/parts) + . = ..() + // todo: this is shit but whatever, we'll redo this later. + if(length(parts) >= 1) + set_material(parts[parts[1]]) + /obj/item/material/proc/update_force() if(no_force_calculations) return @@ -72,8 +78,11 @@ //spawn(1) // to_chat(world, "[src] has damage_force [damage_force] and throw_force [throw_force] when made from default material [material.name]") -/obj/item/material/proc/set_material(var/new_material) - material = get_material_by_name(new_material) +/obj/item/material/proc/set_material(datum/material/new_material) + if(istype(new_material)) + material = new_material + else + material = get_material_by_name(new_material) || SSmaterials.get_material(new_material) if(!material) qdel(src) else diff --git a/code/game/objects/items/weapons/mop.dm b/code/game/objects/items/weapons/mop.dm index 38a6645e924d..b47d9d0f31e5 100644 --- a/code/game/objects/items/weapons/mop.dm +++ b/code/game/objects/items/weapons/mop.dm @@ -13,7 +13,7 @@ GLOBAL_LIST_BOILERPLATE(all_mops, /obj/item/mop) throw_range = 10 w_class = ITEMSIZE_NORMAL attack_verb = list("mopped", "bashed", "bludgeoned", "whacked") - matter = list(MAT_PLASTIC = 3) + materials = list(MAT_PLASTIC = 3) var/mopping = 0 var/mopcount = 0 var/mopspeed = 23 diff --git a/code/game/objects/items/weapons/other.dm b/code/game/objects/items/weapons/other.dm index 24336cd1804f..34ac4aece889 100644 --- a/code/game/objects/items/weapons/other.dm +++ b/code/game/objects/items/weapons/other.dm @@ -126,7 +126,7 @@ damage_force = 5.0 throw_force = 7.0 w_class = ITEMSIZE_NORMAL - matter = list(MAT_STEEL = 50) + materials = list(MAT_STEEL = 50) attack_verb = list("bludgeoned", "whacked", "disciplined", "thrashed") /obj/item/cane/concealed @@ -333,7 +333,7 @@ item_state = "radio" throw_speed = 4 throw_range = 20 - matter = list("metal" = 100 + materials = list("metal" = 100 origin_tech = list(TECH_MAGNET = 2, TECH_ILLEGAL = 3)*/ /obj/item/SWF_uplink @@ -352,7 +352,7 @@ w_class = ITEMSIZE_SMALL throw_speed = 4 throw_range = 20 - matter = list(MAT_STEEL = 100) + materials = list(MAT_STEEL = 100) origin_tech = list(TECH_MAGNET = 1) /obj/item/staff @@ -413,7 +413,7 @@ icon_state = "power_mod" item_state = "std_mod" desc = "Heavy-duty switching circuits for power control." - matter = list(MAT_STEEL = 50, MAT_GLASS = 50) + materials = list(MAT_STEEL = 50, MAT_GLASS = 50) /obj/item/module/power_control/attackby(obj/item/W, mob/user) if (istype(W, /obj/item/multitool)) @@ -466,360 +466,6 @@ ///////////////////////////////////////Stock Parts ///////////////////////////////// -/obj/item/storage/part_replacer - name = "rapid part exchange device" - desc = "A special mechanical module made to store, sort, and apply standard machine parts." - icon_state = "RPED" - w_class = ITEMSIZE_HUGE - can_hold = list(/obj/item/stock_parts) - storage_slots = 100 - use_to_pickup = 1 - allow_quick_gather = 1 - allow_quick_empty = 1 - collection_mode = 1 - display_contents_with_number = 1 - max_w_class = ITEMSIZE_NORMAL - max_storage_space = 200 - var/panel_req = TRUE - -/obj/item/storage/part_replacer/adv - name = "advanced rapid part exchange device" - desc = "A special mechanical module made to store, sort, and apply standard machine parts. This one has a greatly upgraded storage capacity" - icon_state = "RPED" - w_class = ITEMSIZE_HUGE - can_hold = list(/obj/item/stock_parts) - storage_slots = 200 - use_to_pickup = 1 - allow_quick_gather = 1 - allow_quick_empty = 1 - collection_mode = 1 - display_contents_with_number = 1 - max_w_class = ITEMSIZE_NORMAL - max_storage_space = 400 - -/obj/item/storage/part_replacer/adv/discount_bluespace - name = "discount bluespace rapid part exchange device" - desc = "A special mechanical module made to store, sort, and apply standard machine parts. This one has a further increased storage capacity, \ - and the ability to work on machines with closed maintenance panels." - storage_slots = 400 - max_storage_space = 800 - panel_req = FALSE - -/obj/item/storage/part_replacer/drop_contents() // hacky-feeling tier-based drop system - hide_from(usr) - var/turf/T = get_turf(src) - var/lowest_rating = INFINITY // We want the lowest-part tier rating in the RPED so we only drop the lowest-tier parts. - /* - * Why not just use the stock part's rating variable? - * Future-proofing for a potential future where stock parts aren't the only thing that can fit in an RPED. - * see: /tg/ and /vg/'s RPEDs fitting power cells, beakers, etc. - */ - for(var/obj/item/B in contents) - if(B.rped_rating() < lowest_rating) - lowest_rating = B.rped_rating() - for(var/obj/item/B in contents) - if(B.rped_rating() > lowest_rating) - continue - remove_from_storage(B, T) - -/obj/item/stock_parts - name = "stock part" - desc = "What?" - gender = PLURAL - icon = 'icons/obj/stock_parts.dmi' - w_class = ITEMSIZE_SMALL - var/rating = 1 - -/obj/item/stock_parts/Initialize(mapload) - . = ..() - pixel_x = rand(-5.0, 5) - pixel_y = rand(-5.0, 5) - -/obj/item/stock_parts/get_rating() - return rating - -//Rank 1 - -/obj/item/stock_parts/console_screen - name = "console screen" - desc = "Used in the construction of computers and other devices with a interactive console." - icon_state = "screen" - origin_tech = list(TECH_MATERIAL = 1) - matter = list(MAT_GLASS = 200) - -/obj/item/stock_parts/capacitor - name = "capacitor" - desc = "A basic capacitor used in the construction of a variety of devices." - icon_state = "capacitor" - origin_tech = list(TECH_POWER = 1) - matter = list(MAT_STEEL = 50, MAT_GLASS = 50) - - var/charge = 0 - var/max_charge = 1000 - -/obj/item/stock_parts/capacitor/Initialize(mapload) - . = ..() - max_charge *= rating // this is garbage someone remove it later and hardcode - -/obj/item/stock_parts/capacitor/proc/charge(amount) - charge += amount - if(charge > max_charge) - charge = max_charge - -/obj/item/stock_parts/capacitor/proc/use(amount) - if(charge) - charge -= amount - if(charge < 0) - charge = 0 - -/obj/item/stock_parts/scanning_module - name = "scanning module" - desc = "A compact, high resolution scanning module used in the construction of certain devices." - icon_state = "scan_module" - origin_tech = list(TECH_MAGNET = 1) - matter = list(MAT_STEEL = 50, MAT_GLASS = 20) - -/obj/item/stock_parts/manipulator - name = "micro-manipulator" - desc = "A tiny little manipulator used in the construction of certain devices." - icon_state = "micro_mani" - origin_tech = list(TECH_MATERIAL = 1, TECH_DATA = 1) - matter = list(MAT_STEEL = 30) - -/obj/item/stock_parts/micro_laser - name = "micro-laser" - desc = "A tiny laser used in certain devices." - icon_state = "micro_laser" - origin_tech = list(TECH_MAGNET = 1) - matter = list(MAT_STEEL = 10, MAT_GLASS = 20) - -/obj/item/stock_parts/matter_bin - name = "matter bin" - desc = "A container for hold compressed matter awaiting re-construction." - icon_state = "matter_bin" - origin_tech = list(TECH_MATERIAL = 1) - matter = list(MAT_STEEL = 80) - -//Rank 2 - -/obj/item/stock_parts/capacitor/adv - name = "advanced capacitor" - desc = "An advanced capacitor used in the construction of a variety of devices." - icon_state = "capacitor_adv" - origin_tech = list(TECH_POWER = 3) - rating = 2 - matter = list(MAT_STEEL = 50, MAT_GLASS = 50) - -/obj/item/stock_parts/scanning_module/adv - name = "advanced scanning module" - desc = "A compact, high resolution scanning module used in the construction of certain devices." - icon_state = "scan_module_adv" - origin_tech = list(TECH_MAGNET = 3) - rating = 2 - matter = list(MAT_STEEL = 50, MAT_GLASS = 20) - -/obj/item/stock_parts/manipulator/nano - name = "nano-manipulator" - desc = "A tiny little manipulator used in the construction of certain devices." - icon_state = "nano_mani" - origin_tech = list(TECH_MATERIAL = 3, TECH_DATA = 2) - rating = 2 - matter = list(MAT_STEEL = 30) - -/obj/item/stock_parts/micro_laser/high - name = "high-power micro-laser" - desc = "A tiny laser used in certain devices." - icon_state = "high_micro_laser" - origin_tech = list(TECH_MAGNET = 3) - rating = 2 - matter = list(MAT_STEEL = 10, MAT_GLASS = 20) - -/obj/item/stock_parts/matter_bin/adv - name = "advanced matter bin" - desc = "A container for hold compressed matter awaiting re-construction." - icon_state = "advanced_matter_bin" - origin_tech = list(TECH_MATERIAL = 3) - rating = 2 - matter = list(MAT_STEEL = 80) - -//Rating 3 - -/obj/item/stock_parts/capacitor/super - name = "super capacitor" - desc = "A super-high capacity capacitor used in the construction of a variety of devices." - icon_state = "capacitor_super" - origin_tech = list(TECH_POWER = 5, TECH_MATERIAL = 4) - rating = 3 - matter = list(MAT_STEEL = 50, MAT_GLASS = 50) - -/obj/item/stock_parts/scanning_module/phasic - name = "phasic scanning module" - desc = "A compact, high resolution phasic scanning module used in the construction of certain devices." - icon_state = "scan_module_phasic" - origin_tech = list(TECH_MAGNET = 5) - rating = 3 - matter = list(MAT_STEEL = 50, MAT_GLASS = 20) - -/obj/item/stock_parts/manipulator/pico - name = "pico-manipulator" - desc = "A tiny little manipulator used in the construction of certain devices." - icon_state = "pico_mani" - origin_tech = list(TECH_MATERIAL = 5, TECH_DATA = 2) - rating = 3 - matter = list(MAT_STEEL = 30) - -/obj/item/stock_parts/micro_laser/ultra - name = "ultra-high-power micro-laser" - icon_state = "ultra_high_micro_laser" - desc = "A tiny laser used in certain devices." - origin_tech = list(TECH_MAGNET = 5) - rating = 3 - matter = list(MAT_STEEL = 10, MAT_GLASS = 20) - -/obj/item/stock_parts/matter_bin/super - name = "super matter bin" - desc = "A container for hold compressed matter awaiting re-construction." - icon_state = "super_matter_bin" - origin_tech = list(TECH_MATERIAL = 5) - rating = 3 - matter = list(MAT_STEEL = 80) - -// Rating 4 - Anomaly - -/obj/item/stock_parts/capacitor/hyper - name = "hyper capacitor" - desc = "A hyper-capacity capacitor used in the construction of a variety of devices." - icon_state = "capacitor_hyper" - origin_tech = list(TECH_POWER = 6, TECH_MATERIAL = 5, TECH_BLUESPACE = 1, TECH_ARCANE = 1) - rating = 4 - matter = list(MAT_STEEL = 80, MAT_GLASS = 40) - -/obj/item/stock_parts/scanning_module/hyper - name = "quantum scanning module" - desc = "A compact, near-perfect resolution quantum scanning module used in the construction of certain devices." - icon_state = "scan_module_hyper" - origin_tech = list(TECH_MAGNET = 6, TECH_BLUESPACE = 1, TECH_ARCANE = 1) - rating = 4 - matter = list(MAT_STEEL = 100, MAT_GLASS = 40) - -/obj/item/stock_parts/manipulator/hyper - name = "planck-manipulator" - desc = "A miniscule manipulator used in the construction of certain devices." - icon_state = "hyper_mani" - origin_tech = list(TECH_MATERIAL = 6, TECH_DATA = 3, TECH_ARCANE = 1) - rating = 4 - matter = list(MAT_STEEL = 30) - -/obj/item/stock_parts/micro_laser/hyper - name = "hyper-power micro-laser" - icon_state = "hyper_micro_laser" - desc = "A tiny laser used in certain devices." - origin_tech = list(TECH_MAGNET = 6, TECH_ARCANE = 1) - rating = 4 - matter = list(MAT_STEEL = 30, MAT_GLASS = 40) - -/obj/item/stock_parts/matter_bin/hyper - name = "hyper matter bin" - desc = "A container for holding compressed matter awaiting re-construction." - icon_state = "hyper_matter_bin" - origin_tech = list(TECH_MATERIAL = 6, TECH_ARCANE = 1) - rating = 4 - matter = list(MAT_STEEL = 100) - -// Rating 5 - Precursor - -/obj/item/stock_parts/capacitor/omni - name = "omni-capacitor" - desc = "A capacitor of immense capacity used in the construction of a variety of devices." - icon_state = "capacitor_omni" - origin_tech = list(TECH_POWER = 7, TECH_MATERIAL = 6, TECH_BLUESPACE = 3, TECH_PRECURSOR = 1) - rating = 5 - matter = list(MAT_STEEL = 80, MAT_GLASS = 40) - -/obj/item/stock_parts/scanning_module/omni - name = "omni-scanning module" - desc = "A compact, perfect resolution temporospatial scanning module used in the construction of certain devices." - icon_state = "scan_module_omni" - origin_tech = list(TECH_MAGNET = 7, TECH_BLUESPACE = 3, TECH_PRECURSOR = 1) - rating = 5 - matter = list(MAT_STEEL = 100, MAT_GLASS = 40) - -/obj/item/stock_parts/manipulator/omni - name = "omni-manipulator" - desc = "A strange, infinitesimal manipulator used in the construction of certain devices." - icon_state = "omni_mani" - origin_tech = list(TECH_MATERIAL = 7, TECH_DATA = 4, TECH_PRECURSOR = 1) - rating = 5 - matter = list(MAT_STEEL = 30) - -/obj/item/stock_parts/micro_laser/omni - name = "omni-power micro-laser" - icon_state = "omni_micro_laser" - desc = "A strange laser used in certain devices." - origin_tech = list(TECH_MAGNET = 7, TECH_PRECURSOR = 1) - rating = 5 - matter = list(MAT_STEEL = 30, MAT_GLASS = 40) - -/obj/item/stock_parts/matter_bin/omni - name = "omni-matter bin" - desc = "A strange container for holding compressed matter awaiting re-construction." - icon_state = "omni_matter_bin" - origin_tech = list(TECH_MATERIAL = 7, TECH_PRECURSOR = 1) - rating = 5 - matter = list(MAT_STEEL = 100) - - -// Subspace stock parts - -/obj/item/stock_parts/subspace/ansible - name = "subspace ansible" - icon_state = "subspace_ansible" - desc = "A compact module capable of sensing extradimensional activity." - origin_tech = list(TECH_DATA = 3, TECH_MAGNET = 5 ,TECH_MATERIAL = 4, TECH_BLUESPACE = 2) - matter = list(MAT_STEEL = 30, MAT_GLASS = 10) - -/obj/item/stock_parts/subspace/sub_filter - name = "hyperwave filter" - icon_state = "hyperwave_filter" - desc = "A tiny device capable of filtering and converting super-intense radiowaves." - origin_tech = list(TECH_DATA = 4, TECH_MAGNET = 2) - matter = list(MAT_STEEL = 30, MAT_GLASS = 10) - -/obj/item/stock_parts/subspace/amplifier - name = "subspace amplifier" - icon_state = "subspace_amplifier" - desc = "A compact micro-machine capable of amplifying weak subspace transmissions." - origin_tech = list(TECH_DATA = 3, TECH_MAGNET = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2) - matter = list(MAT_STEEL = 30, MAT_GLASS = 10) - -/obj/item/stock_parts/subspace/treatment - name = "subspace treatment disk" - icon_state = "treatment_disk" - desc = "A compact micro-machine capable of stretching out hyper-compressed radio waves." - origin_tech = list(TECH_DATA = 3, TECH_MAGNET = 2, TECH_MATERIAL = 5, TECH_BLUESPACE = 2) - matter = list(MAT_STEEL = 30, MAT_GLASS = 10) - -/obj/item/stock_parts/subspace/analyzer - name = "subspace wavelength analyzer" - icon_state = "wavelength_analyzer" - desc = "A sophisticated analyzer capable of analyzing cryptic subspace wavelengths." - origin_tech = list(TECH_DATA = 3, TECH_MAGNET = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2) - matter = list(MAT_STEEL = 30, MAT_GLASS = 10) - -/obj/item/stock_parts/subspace/crystal - name = "ansible crystal" - icon_state = "ansible_crystal" - desc = "A crystal made from pure glass used to transmit laser databursts to subspace." - origin_tech = list(TECH_MAGNET = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2) - matter = list(MAT_GLASS = 50) - -/obj/item/stock_parts/subspace/transmitter - name = "subspace transmitter" - icon_state = "subspace_transmitter" - desc = "A large piece of equipment used to open a window into the subspace dimension." - origin_tech = list(TECH_MAGNET = 5, TECH_MATERIAL = 5, TECH_BLUESPACE = 3) - matter = list(MAT_STEEL = 50) - /obj/item/ectoplasm name = "ectoplasm" desc = "Spooky!" @@ -834,32 +480,6 @@ icon_state = "smes_coil" origin_tech = list(TECH_MATERIAL = 19, TECH_ENGINEERING = 19, TECH_PHORON = 19, TECH_POWER = 19, TECH_BLUESPACE = 19, TECH_BIO = 19, TECH_COMBAT = 19, TECH_MAGNET = 19, TECH_DATA = 19, TECH_ILLEGAL = 19, TECH_ARCANE = 19, TECH_PRECURSOR = 19) -// Additional construction stock parts - -/obj/item/stock_parts/gear - name = "gear" - desc = "A gear used for construction." - icon = 'icons/obj/stock_parts.dmi' - icon_state = "gear" - origin_tech = list(TECH_ENGINEERING = 1) - matter = list(MAT_STEEL = 50) - -/obj/item/stock_parts/motor - name = "motor" - desc = "A motor used for construction." - icon = 'icons/obj/stock_parts.dmi' - icon_state = "motor" - origin_tech = list(TECH_ENGINEERING = 1) - matter = list(MAT_STEEL = 60, MAT_GLASS = 10) - -/obj/item/stock_parts/spring - name = "spring" - desc = "A spring used for construction." - icon = 'icons/obj/stock_parts.dmi' - icon_state = "spring" - origin_tech = list(TECH_ENGINEERING = 1) - matter = list(MAT_STEEL = 40) - //Yay Saddles. /obj/item/saddle name = "saddle" diff --git a/code/game/objects/items/weapons/paint.dm b/code/game/objects/items/weapons/paint.dm index 1f7c4164a6ac..ab1206913bf3 100644 --- a/code/game/objects/items/weapons/paint.dm +++ b/code/game/objects/items/weapons/paint.dm @@ -9,7 +9,7 @@ var/global/list/cached_icons = list() icon = 'icons/obj/items.dmi' icon_state = "paint_neutral" item_state = "paintcan" - matter = list(MAT_STEEL = 200) + materials = list(MAT_STEEL = 200) w_class = ITEMSIZE_NORMAL amount_per_transfer_from_this = 10 possible_transfer_amounts = list(10,20,30,60) diff --git a/code/game/objects/items/weapons/shields.dm b/code/game/objects/items/weapons/shields.dm index 5f7bc9dabcfd..13ca9fae3b61 100644 --- a/code/game/objects/items/weapons/shields.dm +++ b/code/game/objects/items/weapons/shields.dm @@ -68,7 +68,7 @@ throw_range = 4 w_class = ITEMSIZE_LARGE origin_tech = list(TECH_MATERIAL = 2) - matter = list(MAT_GLASS = 7500, MAT_STEEL = 1000) + materials = list(MAT_GLASS = 7500, MAT_STEEL = 1000) attack_verb = list("shoved", "bashed") var/cooldown = 0 //shield bash cooldown. based on world.time @@ -260,7 +260,7 @@ icon = 'icons/obj/weapons.dmi' icon_state = "roman_shield" slot_flags = SLOT_BACK - matter = list(MAT_WOOD = 7500, MAT_STEEL = 1000) + materials = list(MAT_WOOD = 7500, MAT_STEEL = 1000) item_icons = list( SLOT_ID_LEFT_HAND = 'icons/mob/items/lefthand_melee.dmi', SLOT_ID_RIGHT_HAND = 'icons/mob/items/righthand_melee.dmi', @@ -272,7 +272,7 @@ icon = 'icons/obj/weapons.dmi' icon_state = "buckler" slot_flags = SLOT_BACK | SLOT_BELT - matter = list(MAT_WOOD = 7500, MAT_STEEL = 1000) + materials = list(MAT_WOOD = 7500, MAT_STEEL = 1000) item_icons = list( SLOT_ID_LEFT_HAND = 'icons/mob/items/lefthand_melee.dmi', SLOT_ID_RIGHT_HAND = 'icons/mob/items/righthand_melee.dmi', @@ -485,7 +485,7 @@ throw_force = 0 throw_speed = 2 throw_range = 6 - matter = list(MAT_PLASTIC = 7500, "foam" = 1000) + materials = list(MAT_PLASTIC = 7500, "foam" = 1000) item_icons = list( SLOT_ID_LEFT_HAND = 'icons/mob/items/lefthand_melee.dmi', SLOT_ID_RIGHT_HAND = 'icons/mob/items/righthand_melee.dmi', diff --git a/code/game/objects/items/weapons/surgery_tools.dm b/code/game/objects/items/weapons/surgery_tools.dm index b7ada53617f5..7b57ee6337de 100644 --- a/code/game/objects/items/weapons/surgery_tools.dm +++ b/code/game/objects/items/weapons/surgery_tools.dm @@ -26,7 +26,7 @@ name = "retractor" desc = "Retracts stuff." icon_state = "retractor" - matter = list(MAT_STEEL = 10000, MAT_GLASS = 5000) + materials = list(MAT_STEEL = 10000, MAT_GLASS = 5000) origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) /* @@ -36,7 +36,7 @@ name = "hemostat" desc = "You think you have seen this before." icon_state = "hemostat" - matter = list(MAT_STEEL = 5000, MAT_GLASS = 2500) + materials = list(MAT_STEEL = 5000, MAT_GLASS = 2500) origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) attack_verb = list("attacked", "pinched") @@ -47,7 +47,7 @@ name = "cautery" desc = "This stops bleeding." icon_state = "cautery" - matter = list(MAT_STEEL = 5000, MAT_GLASS = 2500) + materials = list(MAT_STEEL = 5000, MAT_GLASS = 2500) origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) attack_verb = list("burnt") @@ -59,8 +59,8 @@ desc = "You can drill using this item. You dig?" icon_state = "drill" hitsound = 'sound/weapons/circsawhit.ogg' - matter = list(MAT_STEEL = 15000, MAT_GLASS = 10000) - damage_force = 15.0 + materials = list(MAT_STEEL = 15000, MAT_GLASS = 10000) + damage_force = 15 w_class = ITEMSIZE_NORMAL origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) attack_verb = list("drilled") @@ -89,7 +89,7 @@ throw_speed = 3 throw_range = 5 origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) - matter = list(MAT_STEEL = 10000, MAT_GLASS = 5000) + materials = list(MAT_STEEL = 10000, MAT_GLASS = 5000) attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") /obj/item/surgical/scalpel/suicide_act(mob/user) @@ -151,7 +151,7 @@ throw_speed = 3 throw_range = 5 origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) - matter = list(MAT_STEEL = 20000, MAT_GLASS = 10000) + materials = list(MAT_STEEL = 20000, MAT_GLASS = 10000) attack_verb = list("attacked", "slashed", "sawed", "cut") sharp = 1 edge = 1 @@ -165,7 +165,7 @@ damtype = SEARING w_class = ITEMSIZE_LARGE origin_tech = list(TECH_BIO = 4, TECH_MATERIAL = 6, TECH_MAGNET = 6) - matter = list(MAT_STEEL = 12500) + materials = list(MAT_STEEL = 12500) attack_verb = list("attacked", "slashed", "seared", "cut") tool_speed = 0.75 @@ -285,14 +285,14 @@ name = "primitive retractor" desc = "An archaic retractor fashioned out of bone and treated sinew." icon_state = "retractor_bone" - matter = list("bone" = 5000) + materials = list("bone" = 5000) origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) /obj/item/surgical/hemostat_primitive name = "primitive hemostat" desc = "Two long bones connected by sinew, used as fine clamps." icon_state = "hemostat_bone" - matter = list("bone" = 5000) + materials = list("bone" = 5000) origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) attack_verb = list("attacked", "pinched") @@ -300,7 +300,7 @@ name = "primitive cautery" desc = "An arcane gemstone inserted into whittled bone. It seems to be useful for stopping bleeding." icon_state = "cautery_bone" - matter = list("bone" = 5000) + materials = list("bone" = 5000) origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) attack_verb = list("burnt") @@ -317,7 +317,7 @@ throw_speed = 3 throw_range = 5 origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) - matter = list("bone" = 5000, MAT_GLASS = 2500) + materials = list("bone" = 5000, MAT_GLASS = 2500) attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") /obj/item/surgical/scalpel_primitive/suicide_act(mob/user) @@ -337,7 +337,7 @@ throw_speed = 3 throw_range = 5 origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) - matter = list("bone" = 6000, MAT_GLASS = 4000) + materials = list("bone" = 6000, MAT_GLASS = 4000) attack_verb = list("attacked", "slashed", "sawed", "cut") sharp = 1 edge = 1 @@ -346,4 +346,4 @@ name = "primitive bone setter" desc = "Large leg bones whittled down and woven together with sinew. Used to set other bones." icon_state = "bone_setter_bone" - matter = list("bone" = 5000) + materials = list("bone" = 5000) diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm index f7f393e80405..20b117bb1ac6 100644 --- a/code/game/objects/items/weapons/swords_axes_etc.dm +++ b/code/game/objects/items/weapons/swords_axes_etc.dm @@ -166,7 +166,7 @@ embed_chance = 100 // these should probably come in a bandolier or have some sort of fabricator, tbf damage_force = 5 // HAVING A STICK JAMMED INTO YOU IS LIKELY BAD FOR YOUR HEALTH // well to be fair most of the damage comes from the embed not the stab w_class = WEIGHT_CLASS_SMALL - matter = list(MAT_STEEL = 2500) + materials = list(MAT_STEEL = 2500) sharp = TRUE edge = TRUE icon_state = "embed_spike" diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm index b45d6bd6bba0..b7665c9cbffb 100644 --- a/code/game/objects/items/weapons/teleportation.dm +++ b/code/game/objects/items/weapons/teleportation.dm @@ -21,7 +21,7 @@ throw_speed = 4 throw_range = 20 origin_tech = list(TECH_MAGNET = 1) - matter = list(MAT_STEEL = 400) + materials = list(MAT_STEEL = 400) /obj/item/locator/attack_self(mob/user) . = ..() @@ -130,7 +130,7 @@ Frequency: throw_speed = 3 throw_range = 5 origin_tech = list(TECH_MAGNET = 1, TECH_BLUESPACE = 3) - matter = list(MAT_STEEL = 10000) + materials = list(MAT_STEEL = 10000) preserve_item = 1 /obj/item/hand_tele/attack_self(mob/user) diff --git a/code/game/objects/items/weapons/traps.dm b/code/game/objects/items/weapons/traps.dm index 87d5da28dc2d..ffd13e67131c 100644 --- a/code/game/objects/items/weapons/traps.dm +++ b/code/game/objects/items/weapons/traps.dm @@ -10,7 +10,7 @@ throw_force = 0 w_class = ITEMSIZE_NORMAL origin_tech = list(TECH_MATERIAL = 1) - matter = list(MAT_STEEL = 18750) + materials = list(MAT_STEEL = 18750) buckle_restrained_resist_time = 15 SECONDS var/deployed = 0 var/camo_net = FALSE diff --git a/code/game/objects/items/weapons/trays.dm b/code/game/objects/items/weapons/trays.dm index c40f7564afb0..6cf635b382ca 100644 --- a/code/game/objects/items/weapons/trays.dm +++ b/code/game/objects/items/weapons/trays.dm @@ -11,7 +11,7 @@ throw_speed = 1 throw_range = 5 w_class = ITEMSIZE_NORMAL - matter = list(MAT_STEEL = 3000) + materials = list(MAT_STEEL = 3000) var/list/carrying = list() // List of things on the tray. - Doohl var/max_carry = 10 diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 4b8ab9fd7ab6..33bc578db287 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -12,25 +12,6 @@ /// ONLY FOR MAPPING: Sets flags from a string list, handled in Initialize. Usage: set_obj_flags = "EMAGGED;!CAN_BE_HIT" to set EMAGGED and clear CAN_BE_HIT. var/set_obj_flags - //? misc / legacy - //Used to store information about the contents of the object. - var/list/matter - var/w_class // Size of the object. - var/unacidable = 0 //universal "unacidabliness" var, here so you can use it in any obj. - var/sharp = 0 // whether this object cuts - var/edge = 0 // whether this object is more likely to dismember - var/pry = 0 //Used in attackby() to open doors - var/in_use = 0 // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING! - var/damtype = "brute" - // todo: /obj/item level, /obj/projectile level, how to deal with armor? - var/armor_penetration = 0 - var/show_messages - var/preserve_item = 0 //whether this object is preserved when its owner goes into cryo-storage, gateway, etc - var/can_speak = 0 //For MMIs and admin trickery. If an object has a brainmob in its contents, set this to 1 to allow it to speak. - - var/show_examine = TRUE // Does this pop up on a mob when the mob is examined? - var/register_as_dangerous_object = FALSE // Should this tell its turf that it is dangerous automatically? - //? Access - see [modules/jobs/access.dm] /// If set, all of these accesses are needed to access this object. var/list/req_access @@ -41,6 +22,17 @@ /// economic category for objects var/economic_category_obj = ECONOMIC_CATEGORY_OBJ_DEFAULT + //? Materials + /// static materials in us + /// material id = amount + var/list/materials + /// material parts - lazy list; lets us track what we're made of. + /// key = cost in cm3 + var/list/material_parts + /// material parts on spawn + /// key = material id + var/list/material_defaults + //? Sounds /// volume when breaking out using resist process var/breakout_sound = 'sound/effects/grillehit.ogg' @@ -50,11 +42,33 @@ //? misc / legacy /// Set when a player renames a renamable object. var/renamed_by_player = FALSE + var/w_class // Size of the object. + var/unacidable = 0 //universal "unacidabliness" var, here so you can use it in any obj. + var/sharp = 0 // whether this object cuts + var/edge = 0 // whether this object is more likely to dismember + var/pry = 0 //Used in attackby() to open doors + var/in_use = 0 // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING! + var/damtype = "brute" + // todo: /obj/item level, /obj/projectile level, how to deal with armor? + var/armor_penetration = 0 + var/show_messages + var/preserve_item = 0 //whether this object is preserved when its owner goes into cryo-storage, gateway, etc + var/can_speak = 0 //For MMIs and admin trickery. If an object has a brainmob in its contents, set this to 1 to allow it to speak. + + var/show_examine = TRUE // Does this pop up on a mob when the mob is examined? + var/register_as_dangerous_object = FALSE // Should this tell its turf that it is dangerous automatically? /obj/Initialize(mapload) if(register_as_dangerous_object) register_dangerous_to_step() . = ..() + if(!isnull(materials)) + materials = typelist(NAMEOF(src, materials), materials) + if(!isnull(material_parts)) + material_parts = typelist(NAMEOF(src, material_parts), material_parts) + if(!isnull(material_defaults)) + material_defaults = typelist(NAMEOF(src, material_defaults), material_defaults) + init_materials() if (set_obj_flags) var/flagslist = splittext(set_obj_flags,";") var/list/string_to_objflag = GLOB.bitfields["obj_flags"] @@ -201,16 +215,16 @@ /obj/examine(mob/user, dist) . = ..() - if(matter) - if(!matter.len) + if(materials) + if(!materials.len) return var/materials_list var/i = 1 - while(i + * In tgui, usually would be clsasName={classes(['sheetmaterials32x32', 'glass-3'])} */ #define SPR_SIZE 1 #define SPR_IDX 2 diff --git a/code/modules/asset_cache/assets/materials.dm b/code/modules/asset_cache/assets/materials.dm new file mode 100644 index 000000000000..791ead24e31d --- /dev/null +++ b/code/modules/asset_cache/assets/materials.dm @@ -0,0 +1,5 @@ +/datum/asset/spritesheet/materials + name = "sheetmaterials" + +/datum/asset/spritesheet/materials/create_spritesheets() + InsertAll("stack", 'icons/interface/materials.dmi') diff --git a/code/modules/asset_cache/assets/research_designs.dm b/code/modules/asset_cache/assets/research_designs.dm index bca782207a1b..c2c26affbb54 100644 --- a/code/modules/asset_cache/assets/research_designs.dm +++ b/code/modules/asset_cache/assets/research_designs.dm @@ -23,7 +23,7 @@ var/atom/item = initial(D.build_path) if (!ispath(item, /atom)) // biogenerator outputs to beakers by default - if (initial(D.build_type) & BIOGENERATOR) + if (initial(D.lathe_type) & BIOGENERATOR) item = /obj/item/reagent_containers/glass/beaker/large else continue // shouldn't happen, but just in case diff --git a/code/modules/asset_cache/assets/sheetmaterials.dm b/code/modules/asset_cache/assets/sheetmaterials.dm deleted file mode 100644 index d19e5c2ac1ef..000000000000 --- a/code/modules/asset_cache/assets/sheetmaterials.dm +++ /dev/null @@ -1,9 +0,0 @@ -/datum/asset/spritesheet/sheetmaterials - name = "sheetmaterials" - -/datum/asset/spritesheet/sheetmaterials/create_spritesheets() - InsertAll("", 'icons/obj/stacks.dmi') - //InsertAll("", 'icons/obj/stack_objects.dmi') - - // Special case to handle Bluespace Crystals - Insert("polycrystal", 'icons/obj/telescience.dmi', "polycrystal") diff --git a/code/modules/cargo/supplypacks/medical.dm b/code/modules/cargo/supplypacks/medical.dm index c5d1ce987664..247291511267 100644 --- a/code/modules/cargo/supplypacks/medical.dm +++ b/code/modules/cargo/supplypacks/medical.dm @@ -423,7 +423,7 @@ container_name = "Compact Defibrillator crate" access = ACCESS_MEDICAL_EQUIPMENT -/datum/supply_pack/med/ml3m +/datum/supply_pack/med/medigun name = "Cell-Loaded Medigun crate" contains = list( /obj/item/gun/ballistic/cell_loaded/medical = 1, @@ -434,7 +434,7 @@ container_name = "Cell-Loaded Medigun crate" access = ACCESS_MEDICAL_CMO -/datum/supply_pack/med/ml3m_cells +/datum/supply_pack/med/medigun_cells name = "Cell-Loaded Medigun Cell Pack crate" contains = list( /obj/item/ammo_casing/microbattery/medical/brute = 3, diff --git a/code/modules/client/onboarding/age_verification.dm b/code/modules/client/onboarding/age_verification.dm index 44c43bf13c57..9f85b5f0416b 100644 --- a/code/modules/client/onboarding/age_verification.dm +++ b/code/modules/client/onboarding/age_verification.dm @@ -1,4 +1,6 @@ /client/proc/age_verification() + if(!SSdbcore.Connect()) + return TRUE if(!player.block_on_available(10 SECONDS)) message_admins("FATAL: player data unavailable during age verification.") . = TRUE diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index 49ab8b5948ec..1d01f047fa0f 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -429,7 +429,7 @@ icon_state = "deagle" w_class = ITEMSIZE_NORMAL origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 2, TECH_ILLEGAL = 4) - matter = list() + materials = list() fire_sound = 'sound/weapons/Gunshot1.ogg' projectile_type = /obj/projectile/chameleon diff --git a/code/modules/clothing/glasses/_glasses.dm b/code/modules/clothing/glasses/_glasses.dm index ad60983dd4b9..c93ccd1b092c 100644 --- a/code/modules/clothing/glasses/_glasses.dm +++ b/code/modules/clothing/glasses/_glasses.dm @@ -416,7 +416,7 @@ BLIND // can't see anything icon_state = "welding-g" item_state_slots = list(SLOT_ID_RIGHT_HAND = "welding-g", SLOT_ID_LEFT_HAND = "welding-g") action_button_name = "Flip Welding Goggles" - matter = list(MAT_STEEL = 1500, MAT_GLASS = 1000) + materials = list(MAT_STEEL = 1500, MAT_GLASS = 1000) var/up = 0 flash_protection = FLASH_PROTECTION_MAJOR tint = TINT_HEAVY @@ -849,4 +849,4 @@ BLIND // can't see anything icon_state = "laconic-g" item_state_slots = list(SLOT_ID_RIGHT_HAND = "welding-g", SLOT_ID_LEFT_HAND = "welding-g") action_button_name = "Adjust Goggles" - matter = list("brass" = 1500, MAT_GLASS = 1000) + materials = list("brass" = 1500, MAT_GLASS = 1000) diff --git a/code/modules/clothing/gloves/miscellaneous.dm b/code/modules/clothing/gloves/miscellaneous.dm index 20feab1a510d..b27cb6f697bd 100644 --- a/code/modules/clothing/gloves/miscellaneous.dm +++ b/code/modules/clothing/gloves/miscellaneous.dm @@ -131,7 +131,7 @@ name = "knuckle dusters" desc = "A pair of brass knuckles. Generally used to enhance the user's punches." icon_state = "knuckledusters" - matter = list("brass" = 500) + materials = list(MAT_STEEL = 500) attack_verb = list("punched", "beaten", "struck") clothing_flags = CLOTHING_THICK_MATERIAL siemens_coefficient = 1 diff --git a/code/modules/clothing/head/misc.dm b/code/modules/clothing/head/misc.dm index 3fe2aa80b145..6ccdf8b6df8d 100644 --- a/code/modules/clothing/head/misc.dm +++ b/code/modules/clothing/head/misc.dm @@ -42,7 +42,7 @@ name = "magnetic 'pin'" addblends = null desc = "Finally, a hair pin even a Morpheus chassis can use." - matter = list(MAT_STEEL = 10) + materials = list(MAT_STEEL = 10) /obj/item/clothing/head/pin/flower name = "red flower pin" diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index 781e2a1d1a5a..16a5667e23c0 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -17,7 +17,7 @@ desc = "A head-mounted face cover designed to protect the wearer completely from space-arc eye." icon_state = "welding" item_state_slots = list(SLOT_ID_RIGHT_HAND = "welding", SLOT_ID_LEFT_HAND = "welding") - matter = list(MAT_STEEL = 3000, MAT_GLASS = 1000) + materials = list(MAT_STEEL = 3000, MAT_GLASS = 1000) var/up = 0 armor_type = /datum/armor/head/hardhat inv_hide_flags = (HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE) diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm index 4d798ea49e79..552c6bed3931 100644 --- a/code/modules/clothing/under/accessories/accessory.dm +++ b/code/modules/clothing/under/accessories/accessory.dm @@ -790,7 +790,7 @@ icon_state = "collar_holo" item_state = "collar_holo_overlay" overlay_state = "collar_holo_overlay" - matter = list(MAT_STEEL = 50) + materials = list(MAT_STEEL = 50) /obj/item/clothing/accessory/collar/silvercolor name = "Dyeable Silver tag collar" diff --git a/code/modules/detectivework/tools/uvlight.dm b/code/modules/detectivework/tools/uvlight.dm index e30a914c3db2..d420857cef92 100644 --- a/code/modules/detectivework/tools/uvlight.dm +++ b/code/modules/detectivework/tools/uvlight.dm @@ -7,7 +7,7 @@ w_class = ITEMSIZE_SMALL item_state = "electronic" action_button_name = "Toggle UV light" - matter = list(MAT_STEEL = 150) + materials = list(MAT_STEEL = 150) origin_tech = list(TECH_MAGNET = 1, TECH_ENGINEERING = 1) var/list/scanned = list() diff --git a/code/modules/fishing/machinery/fishing_portal.dm b/code/modules/fishing/machinery/fishing_portal.dm index 49c558ebab77..1a6bec0de36d 100644 --- a/code/modules/fishing/machinery/fishing_portal.dm +++ b/code/modules/fishing/machinery/fishing_portal.dm @@ -8,33 +8,14 @@ idle_power_usage = 0 active_power_usage = 0 - allow_unanchor = TRUE + default_unanchor = 3 SECONDS + anchored = FALSE density = TRUE var/active = FALSE var/fishing_source = /datum/fish_source/portal -/obj/machinery/fishing_portal/dynamic_tool_functions(obj/item/I, mob/user) - . = list() - if(allow_unanchor) - .[TOOL_WRENCH] = anchored? "anchor" : "unanchor" - return merge_double_lazy_assoc_list(., ..()) - -/obj/machinery/fishing_portal/dynamic_tool_image(function, hint) - switch(function) - if(TOOL_WRENCH) - return anchored? dyntool_image_backward(TOOL_WRENCH) : dyntool_image_forward(TOOL_WRENCH) - return ..() - -/obj/machinery/fishing_portal/wrench_act(obj/item/I, mob/user, flags, hint) - if(!allow_unanchor) - return ..() - if(default_unfasten_wrench(user, I, 4 SECONDS)) - user.visible_message(SPAN_NOTICE("[user] [anchored? "fastens [src] to the ground" : "unfastens [src] from the ground"]."), range = MESSAGE_RANGE_CONSTRUCTION) - return TRUE - return ..() - /obj/machinery/fishing_portal/interact(mob/user, special_state) . = ..() if(active) diff --git a/code/modules/food/drinkingglass/drinkingglass.dm b/code/modules/food/drinkingglass/drinkingglass.dm index 1545938785fd..7df2ff048c12 100644 --- a/code/modules/food/drinkingglass/drinkingglass.dm +++ b/code/modules/food/drinkingglass/drinkingglass.dm @@ -25,7 +25,7 @@ possible_transfer_amounts = list(5,10,15,30) atom_flags = OPENCONTAINER - matter = list(MAT_GLASS = 60) + materials = list(MAT_GLASS = 60) /obj/item/reagent_containers/food/drinks/glass2/examine(mob/user, dist) . = ..() diff --git a/code/modules/food/drinkingglass/glass_types.dm b/code/modules/food/drinkingglass/glass_types.dm index f37f4b9a95ca..7eec7b46c481 100644 --- a/code/modules/food/drinkingglass/glass_types.dm +++ b/code/modules/food/drinkingglass/glass_types.dm @@ -7,7 +7,7 @@ volume = 30 possible_transfer_amounts = list(5,10,15,30) rim_pos = list(23,13,20) // y, x0, x1 - matter = list(MAT_GLASS = 60) + materials = list(MAT_GLASS = 60) /obj/item/reagent_containers/food/drinks/glass2/rocks name = "rocks glass" @@ -18,7 +18,7 @@ volume = 20 possible_transfer_amounts = list(5,10,20) rim_pos = list(21, 10, 23) - matter = list(MAT_GLASS = 40) + materials = list(MAT_GLASS = 40) /obj/item/reagent_containers/food/drinks/glass2/shake name = "milkshake glass" @@ -29,7 +29,7 @@ volume = 30 possible_transfer_amounts = list(5,10,15,30) rim_pos = list(25, 13, 21) - matter = list(MAT_GLASS = 30) + materials = list(MAT_GLASS = 30) /obj/item/reagent_containers/food/drinks/glass2/cocktail name = "cocktail glass" @@ -40,7 +40,7 @@ volume = 15 possible_transfer_amounts = list(5,10,15) rim_pos = list(22, 13, 21) - matter = list(MAT_GLASS = 30) + materials = list(MAT_GLASS = 30) /obj/item/reagent_containers/food/drinks/glass2/shot name = "shot glass" @@ -51,7 +51,7 @@ volume = 5 possible_transfer_amounts = list(1,2,5) rim_pos = list(17, 13, 21) - matter = list(MAT_GLASS = 10) + materials = list(MAT_GLASS = 10) /obj/item/reagent_containers/food/drinks/glass2/pint name = "pint glass" @@ -62,7 +62,7 @@ volume = 60 possible_transfer_amounts = list(5,10,15,30,60) rim_pos = list(25, 12, 21) - matter = list(MAT_GLASS = 120) + materials = list(MAT_GLASS = 120) /obj/item/reagent_containers/food/drinks/glass2/mug name = "glass mug" @@ -73,7 +73,7 @@ volume = 40 possible_transfer_amounts = list(5,10,20,40) rim_pos = list(22, 12, 20) - matter = list(MAT_GLASS = 80) + materials = list(MAT_GLASS = 80) /obj/item/reagent_containers/food/drinks/glass2/wine name = "wine glass" @@ -84,7 +84,7 @@ volume = 25 possible_transfer_amounts = list(5, 10, 15, 25) rim_pos = list(25, 12, 21) - matter = list(MAT_GLASS = 50) + materials = list(MAT_GLASS = 50) /obj/item/reagent_containers/food/drinks/glass2/pitcher name = "pitcher" @@ -96,4 +96,4 @@ amount_per_transfer_from_this = 30 possible_transfer_amounts = list(5,10,15,30,60) rim_pos = list(25, 12, 21) - matter = list(MAT_GLASS = 600) + materials = list(MAT_GLASS = 600) diff --git a/code/modules/food/drinkingglass/metaglass.dm b/code/modules/food/drinkingglass/metaglass.dm index 0acf148f36a0..fbec4b958b94 100644 --- a/code/modules/food/drinkingglass/metaglass.dm +++ b/code/modules/food/drinkingglass/metaglass.dm @@ -6,7 +6,7 @@ volume = 30 unacidable = 1 //glass center_of_mass = list("x"=16, "y"=10) - matter = list(MAT_GLASS = 500) + materials = list(MAT_GLASS = 500) icon = 'icons/obj/drinks.dmi' /obj/item/reagent_containers/food/drinks/metaglass/on_reagent_change() diff --git a/code/modules/food/drinkingglass/shaker.dm b/code/modules/food/drinkingglass/shaker.dm index 63d05615dde0..56f39026e8e5 100644 --- a/code/modules/food/drinkingglass/shaker.dm +++ b/code/modules/food/drinkingglass/shaker.dm @@ -5,7 +5,7 @@ icon_state = "fitness-cup_black" base_icon = "fitness-cup" volume = 50 - matter = list(MAT_PLASTIC = 2000) + materials = list(MAT_PLASTIC = 2000) filling_states = list(5,10,15,20,25,30,35,40,45,50) possible_transfer_amounts = list(5, 10, 15, 25) rim_pos = null // no fruit slices diff --git a/code/modules/food/food/drinks/drinkingglass.dm b/code/modules/food/food/drinks/drinkingglass.dm index 07ffb310d1a9..e306b21c391d 100644 --- a/code/modules/food/food/drinks/drinkingglass.dm +++ b/code/modules/food/food/drinks/drinkingglass.dm @@ -8,7 +8,7 @@ center_of_mass = list("x"=16, "y"=10) drop_sound = 'sound/items/drop/drinkglass.ogg' pickup_sound = 'sound/items/pickup/drinkglass.ogg' - matter = list(MAT_GLASS = 500) + materials = list(MAT_GLASS = 500) /obj/item/reagent_containers/food/drinks/drinkingglass/on_reagent_change() /*if(reagents.reagent_list.len > 1 ) @@ -113,7 +113,7 @@ icon_state = "shotglass" amount_per_transfer_from_this = 10 volume = 10 - matter = list(MAT_GLASS = 175) + materials = list(MAT_GLASS = 175) /obj/item/reagent_containers/food/drinks/drinkingglass/shotglass/on_reagent_change() cut_overlays() @@ -140,7 +140,7 @@ desc = "Big enough to contain enough protein to get perfectly swole. Don't mind the bits." icon_state = "fitness-cup_black" volume = 100 - matter = list(MAT_PLASTIC = 2000) + materials = list(MAT_PLASTIC = 2000) /obj/item/reagent_containers/food/drinks/drinkingglass/fitnessflask/Initialize(mapload) . = ..() diff --git a/code/modules/hardsuits/modules/modules.dm b/code/modules/hardsuits/modules/modules.dm index 70d83bf92902..a7362db9b347 100644 --- a/code/modules/hardsuits/modules/modules.dm +++ b/code/modules/hardsuits/modules/modules.dm @@ -13,7 +13,7 @@ desc = "It looks pretty sciency." icon = 'icons/obj/rig_modules.dmi' icon_state = "module" - matter = list(MAT_STEEL = 20000, MAT_PLASTIC = 30000, MAT_GLASS = 5000) + materials = list(MAT_STEEL = 20000, MAT_PLASTIC = 30000, MAT_GLASS = 5000) var/damage = 0 var/obj/item/hardsuit/holder @@ -134,6 +134,10 @@ stat_modules += new/stat_hardsuit_module/select(src) stat_modules += new/stat_hardsuit_module/charge(src) +/obj/item/hardsuit_module/Destroy() + QDEL_LIST(stat_modules) + return ..() + // Called when the module is installed into a suit. /obj/item/hardsuit_module/proc/installed(var/obj/item/hardsuit/new_holder) holder = new_holder @@ -259,6 +263,10 @@ ..() src.module = module +/stat_hardsuit_module/Destroy() + module = null + return ..() + /stat_hardsuit_module/proc/AddHref(var/list/href_list) return diff --git a/code/modules/materials/_materials.dm b/code/modules/materials/_materials.dm index 49840c5127a2..523edf50d626 100644 --- a/code/modules/materials/_materials.dm +++ b/code/modules/materials/_materials.dm @@ -169,6 +169,10 @@ /// economic category for this var/economic_category_material = ECONOMIC_CATEGORY_MATERIAL_DEFAULT + //? TGUI + /// tgui icon key in icons/interface/materials.dm + var/tgui_icon_key = "unknown" + /// Placeholders for light tiles and rglass. /datum/material/proc/build_rod_product(mob/user, obj/item/stack/used_stack, obj/item/stack/target_stack) if(!rod_product) @@ -281,7 +285,6 @@ if(stack_type) return new stack_type(target, ispath(stack_type, /obj/item/stack)? amount : null) - // As above. /datum/material/proc/place_shard(turf/target) if(shard_type) diff --git a/code/modules/materials/definitions/admin/alienalloy.dm b/code/modules/materials/definitions/admin/alienalloy.dm new file mode 100644 index 000000000000..dc364b26a1c8 --- /dev/null +++ b/code/modules/materials/definitions/admin/alienalloy.dm @@ -0,0 +1,43 @@ +// Adminspawn only, do not let anyone get this. +/datum/material/alienalloy + name = "alienalloy" + id = "alien_alloy" + display_name = "durable alloy" + stack_type = null + icon_colour = "#6C7364" + integrity = 1200 + melting_point = 6000 // Hull plating. + explosion_resistance = 200 // Hull plating. + hardness = 500 + weight = 500 + protectiveness = 80 // 80% + +// Likewise. +// todo: kill with fire +/datum/material/alienalloy/elevatorium + id = "elevatorium" + name = "elevatorium" + display_name = "elevator panelling" + icon_colour = "#666666" + +// Ditto. +// todo: KILL WITH FIRE +/datum/material/alienalloy/dungeonium + id = "dungeonium" + name = "dungeonium" + display_name = "ultra-durable" + icon_base = 'icons/turf/walls/dungeon.dmi' + icon_colour = "#FFFFFF" + +/datum/material/alienalloy/bedrock + id = "bedrock" + name = "bedrock" + display_name = "impassable rock" + icon_base = 'icons/turf/walls/rock.dmi' + icon_colour = "#FFFFFF" + +/datum/material/alienalloy/alium + id = "abductor_alloy" + name = "alium" + display_name = "alien" + icon_colour = "#FFFFFF" diff --git a/code/modules/materials/definitions/crystals/diamond.dm b/code/modules/materials/definitions/crystals/diamond.dm new file mode 100644 index 000000000000..7b0effb5d56d --- /dev/null +++ b/code/modules/materials/definitions/crystals/diamond.dm @@ -0,0 +1,15 @@ +/datum/material/diamond + id = "diamond" + name = "diamond" + stack_type = /obj/item/stack/material/diamond + flags = MATERIAL_UNMELTABLE + cut_delay = 60 + icon_colour = "#00FFE1" + opacity = 0.4 + reflectivity = 0.6 + conductivity = 1 + shard_type = SHARD_SHARD + tableslam_noise = 'sound/effects/Glasshit.ogg' + hardness = 100 + stack_origin_tech = list(TECH_MATERIAL = 6) + tgui_icon_key = "diamond" diff --git a/code/modules/materials/definitions/crystals/glass.dm b/code/modules/materials/definitions/crystals/glass.dm new file mode 100644 index 000000000000..37002f35ede4 --- /dev/null +++ b/code/modules/materials/definitions/crystals/glass.dm @@ -0,0 +1,155 @@ +/datum/material/glass + id = "glass" + name = "glass" + stack_type = /obj/item/stack/material/glass + flags = MATERIAL_BRITTLE + icon_colour = "#00E1FF" + opacity = 0.3 + integrity = 100 + shard_type = SHARD_SHARD + tableslam_noise = 'sound/effects/Glasshit.ogg' + hardness = 30 + weight = 15 + protectiveness = 0 // 0% + conductive = 0 + conductivity = 1 // Glass shards don't conduct. + door_icon_base = "stone" + destruction_desc = "shatters" + window_options = list("One Direction" = 1, "Full Window" = 2, "Windoor" = 2) + created_window = /obj/structure/window/basic + created_fulltile_window = /obj/structure/window/basic/full + rod_product = /obj/item/stack/material/glass/reinforced + table_icon_base = "glass" + table_reinf_icon_base = "rglass" + tgui_icon_key = "glass" + +/datum/material/glass/build_windows(var/mob/living/user, var/obj/item/stack/used_stack) + + if(!user || !used_stack || !created_window || !created_fulltile_window || !window_options.len) + return 0 + + if(!user.IsAdvancedToolUser()) + to_chat(user, "This task is too complex for your clumsy hands.") + return 1 + + var/title = "Sheet-[used_stack.name] ([used_stack.get_amount()] sheet\s left)" + var/choice = input(title, "What would you like to construct?") as null|anything in window_options + var/build_path = /obj/structure/windoor_assembly + var/sheets_needed = window_options[choice] + if(choice == "Windoor") + if(is_reinforced()) + build_path = /obj/structure/windoor_assembly/secure + else if(choice == "Full Window") + build_path = created_fulltile_window + else + build_path = created_window + + if(used_stack.get_amount() < sheets_needed) + to_chat(user, "You need at least [sheets_needed] sheets to build this.") + return 1 + + if(!choice || !used_stack || !user || used_stack.loc != user || user.stat) + return 1 + + var/turf/T = user.loc + if(!istype(T)) + to_chat(user, "You must be standing on open flooring to build a window.") + return 1 + + // Get data for building windows here. + var/list/possible_directions = GLOB.cardinal.Copy() + var/window_count = 0 + for (var/obj/structure/window/check_window in user.loc) + window_count++ + if(check_window.fulltile) + possible_directions -= GLOB.cardinal + else + possible_directions -= check_window.dir + for (var/obj/structure/windoor_assembly/check_assembly in user.loc) + window_count++ + possible_directions -= check_assembly.dir + for (var/obj/machinery/door/window/check_windoor in user.loc) + window_count++ + possible_directions -= check_windoor.dir + + // Get the closest available dir to the user's current facing. + var/build_dir = SOUTHWEST //Default to southwest for fulltile windows. + var/failed_to_build + + if(window_count >= 4) + failed_to_build = 1 + else + if(choice in list("One Direction","Windoor")) + if(possible_directions.len) + for(var/direction in list(user.dir, turn(user.dir,90), turn(user.dir,270), turn(user.dir,180))) + if(direction in possible_directions) + build_dir = direction + break + else + failed_to_build = 1 + if(failed_to_build) + to_chat(user, "There is no room in this location.") + return 1 + + // Build the structure and update sheet count etc. + used_stack.use(sheets_needed) + new build_path(T, build_dir, 1) + return 1 + +/datum/material/glass/proc/is_reinforced() + return (hardness > 35) //todo + +/datum/material/glass/reinforced + id = "glass_reinf" + name = "rglass" + display_name = "reinforced glass" + stack_type = /obj/item/stack/material/glass/reinforced + flags = MATERIAL_BRITTLE + icon_colour = "#00E1FF" + opacity = 0.3 + integrity = 100 + shard_type = SHARD_SHARD + tableslam_noise = 'sound/effects/Glasshit.ogg' + hardness = 40 + weight = 30 + stack_origin_tech = list(TECH_MATERIAL = 2) + composite_material = list(MAT_STEEL = SHEET_MATERIAL_AMOUNT / 2, MAT_GLASS = SHEET_MATERIAL_AMOUNT) + window_options = list("One Direction" = 1, "Full Window" = 2, "Windoor" = 2) + created_window = /obj/structure/window/reinforced + created_fulltile_window = /obj/structure/window/reinforced/full + wire_product = null + rod_product = null + tgui_icon_key = "rglass" + +/datum/material/glass/phoron + id = "glass_boro" + name = "borosilicate glass" + display_name = "borosilicate glass" + stack_type = /obj/item/stack/material/glass/phoronglass + flags = MATERIAL_BRITTLE + integrity = 100 + icon_colour = "#FC2BC5" + stack_origin_tech = list(TECH_MATERIAL = 4) + window_options = list("One Direction" = 1, "Full Window" = 2) + created_window = /obj/structure/window/phoronbasic + created_fulltile_window = /obj/structure/window/phoronbasic/full + wire_product = null + rod_product = /obj/item/stack/material/glass/phoronrglass + tgui_icon_key = "pglass" + +/datum/material/glass/phoron/reinforced + id = "glass_boro_reinf" + name = "reinforced borosilicate glass" + display_name = "reinforced borosilicate glass" + stack_type = /obj/item/stack/material/glass/phoronrglass + stack_origin_tech = list(TECH_MATERIAL = 5) + composite_material = list() //todo + window_options = list("One Direction" = 1, "Full Window" = 2) + created_window = /obj/structure/window/phoronreinforced + created_fulltile_window = /obj/structure/window/phoronreinforced/full + hardness = 40 + weight = 30 + stack_origin_tech = list(TECH_MATERIAL = 2) + composite_material = list() //todo + rod_product = null + tgui_icon_key = "prglass" diff --git a/code/modules/materials/definitions/metals/brass.dm b/code/modules/materials/definitions/metals/brass.dm new file mode 100644 index 000000000000..b1ac1ba2a61b --- /dev/null +++ b/code/modules/materials/definitions/metals/brass.dm @@ -0,0 +1,7 @@ +/datum/material/brass + id = "brass" + name = "brass" + icon_colour = "#CAC955" + integrity = 150 + stack_type = /obj/item/stack/material/brass + tgui_icon_key = "brass" diff --git a/code/modules/materials/definitions/metals/bronze.dm b/code/modules/materials/definitions/metals/bronze.dm new file mode 100644 index 000000000000..051e8fc17a3a --- /dev/null +++ b/code/modules/materials/definitions/metals/bronze.dm @@ -0,0 +1,13 @@ +// todo: this is just a placeholder +/datum/material/bronze + id = "bronze" + name = "bronze" + icon_colour = "#EDD12F" + stack_type = /obj/item/stack/material/gold + weight = 24 + hardness = 40 + conductivity = 41 + stack_origin_tech = list(TECH_MATERIAL = 4) + sheet_singular_name = "ingot" + sheet_plural_name = "ingots" + tgui_icon_key = "bronze" diff --git a/code/modules/materials/definitions/metals/copper.dm b/code/modules/materials/definitions/metals/copper.dm new file mode 100644 index 000000000000..8f738cc6fd5f --- /dev/null +++ b/code/modules/materials/definitions/metals/copper.dm @@ -0,0 +1,9 @@ +/datum/material/copper + id = "copper" + name = "copper" + icon_colour = "#b45c13" + weight = 15 + hardness = 30 + conductivity = 35 + stack_type = /obj/item/stack/material/copper + tgui_icon_key = "copper" diff --git a/code/modules/materials/definitions/metals/durasteel.dm b/code/modules/materials/definitions/metals/durasteel.dm new file mode 100644 index 000000000000..6a7ce162bd75 --- /dev/null +++ b/code/modules/materials/definitions/metals/durasteel.dm @@ -0,0 +1,28 @@ +/datum/material/durasteel + id = "durasteel" + name = "durasteel" + stack_type = /obj/item/stack/material/durasteel + integrity = 600 + melting_point = 7000 + icon_base = 'icons/turf/walls/metal_wall.dmi' + icon_reinf = 'icons/turf/walls/solid_wall_reinforced.dmi' + icon_colour = "#6EA7BE" + explosion_resistance = 75 + hardness = 100 + weight = 28 + protectiveness = 60 // 75% + reflectivity = 0.7 // Not a perfect mirror, but close. + stack_origin_tech = list(TECH_MATERIAL = 8) + composite_material = list(MAT_PLASTEEL = SHEET_MATERIAL_AMOUNT, MAT_DIAMOND = SHEET_MATERIAL_AMOUNT) //shrug + table_icon_base = "metal" + tgui_icon_key = "durasteel" + +/datum/material/durasteel/hull //The 'Hardball' of starship hulls. + id = "durasteel_hull" + name = MAT_DURASTEELHULL + icon_colour = "#45829a" + explosion_resistance = 90 + reflectivity = 0.9 + +/datum/material/durasteel/hull/place_sheet(var/turf/target) //Deconstructed into normal durasteel sheets. + new /obj/item/stack/material/durasteel(target) diff --git a/code/modules/materials/definitions/metals/gold.dm b/code/modules/materials/definitions/metals/gold.dm new file mode 100644 index 000000000000..7c3832fe878f --- /dev/null +++ b/code/modules/materials/definitions/metals/gold.dm @@ -0,0 +1,12 @@ +/datum/material/gold + id = "gold" + name = "gold" + stack_type = /obj/item/stack/material/gold + icon_colour = "#EDD12F" + weight = 24 + hardness = 40 + conductivity = 41 + stack_origin_tech = list(TECH_MATERIAL = 4) + sheet_singular_name = "ingot" + sheet_plural_name = "ingots" + tgui_icon_key = "gold" diff --git a/code/modules/materials/definitions/metals/hydrogens.dm b/code/modules/materials/definitions/metals/hydrogens.dm new file mode 100644 index 000000000000..2b09a539f1b5 --- /dev/null +++ b/code/modules/materials/definitions/metals/hydrogens.dm @@ -0,0 +1,33 @@ +/datum/material/mhydrogen + name = "mhydrogen" + id = "mhydrogen" + stack_type = /obj/item/stack/material/mhydrogen + icon_colour = "#E6C5DE" + stack_origin_tech = list(TECH_MATERIAL = 6, TECH_POWER = 6, TECH_MAGNET = 5) + conductivity = 100 + is_fusion_fuel = 1 + tgui_icon_key = "mhydrogen" + +/datum/material/tritium + name = "tritium" + id = "tritium" + stack_type = /obj/item/stack/material/tritium + icon_colour = "#777777" + stack_origin_tech = list(TECH_MATERIAL = 5) + sheet_singular_name = "ingot" + sheet_plural_name = "ingots" + is_fusion_fuel = 1 + conductive = 0 + tgui_icon_key = "ingots" + +/datum/material/deuterium + name = "deuterium" + id = "deuterium" + stack_type = /obj/item/stack/material/deuterium + icon_colour = "#999999" + stack_origin_tech = list(TECH_MATERIAL = 3) + sheet_singular_name = "ingot" + sheet_plural_name = "ingots" + is_fusion_fuel = 1 + conductive = 0 + tgui_icon_key = "ingots" diff --git a/code/modules/materials/definitions/metals/iron.dm b/code/modules/materials/definitions/metals/iron.dm new file mode 100644 index 000000000000..5848214c1a72 --- /dev/null +++ b/code/modules/materials/definitions/metals/iron.dm @@ -0,0 +1,10 @@ +/datum/material/iron + name = "iron" + id = "iron" + stack_type = /obj/item/stack/material/iron + icon_colour = "#5C5454" + weight = 22 + conductivity = 10 + sheet_singular_name = "ingot" + sheet_plural_name = "ingots" + tgui_icon_key = "ingots" diff --git a/code/modules/materials/definitions/metals/lead.dm b/code/modules/materials/definitions/metals/lead.dm new file mode 100644 index 000000000000..bf0f6b4b07c2 --- /dev/null +++ b/code/modules/materials/definitions/metals/lead.dm @@ -0,0 +1,11 @@ +/datum/material/lead + name = MAT_LEAD + id = "lead" + stack_type = /obj/item/stack/material/lead + icon_colour = "#273956" + weight = 23 // Lead is a bit more dense than silver IRL, and silver has 22 ingame. + conductivity = 10 + sheet_singular_name = "ingot" + sheet_plural_name = "ingots" + radiation_resistance = 25 // Lead is Special and so gets to block more radiation than it normally would with just weight, totalling in 48 protection. + tgui_icon_key = "ingots" diff --git a/code/modules/materials/definitions/metals/osmium.dm b/code/modules/materials/definitions/metals/osmium.dm new file mode 100644 index 000000000000..c2c9c6852d4d --- /dev/null +++ b/code/modules/materials/definitions/metals/osmium.dm @@ -0,0 +1,10 @@ +/datum/material/osmium + name = "osmium" + id = "osmium" + stack_type = /obj/item/stack/material/osmium + icon_colour = "#9999FF" + stack_origin_tech = list(TECH_MATERIAL = 5) + sheet_singular_name = "ingot" + sheet_plural_name = "ingots" + conductivity = 100 + tgui_icon_key = "ingots" diff --git a/code/modules/materials/definitions/metals/plasteel.dm b/code/modules/materials/definitions/metals/plasteel.dm new file mode 100644 index 000000000000..4e642b77042e --- /dev/null +++ b/code/modules/materials/definitions/metals/plasteel.dm @@ -0,0 +1,30 @@ +/datum/material/plasteel + id = "plasteel" + name = "plasteel" + stack_type = /obj/item/stack/material/plasteel + integrity = 400 + melting_point = 6000 + icon_base = 'icons/turf/walls/metal_wall.dmi' + icon_reinf = 'icons/turf/walls/solid_wall_reinforced.dmi' + icon_colour = "#777777" + explosion_resistance = 25 + hardness = 80 + weight = 23 + protectiveness = 20 // 50% + conductivity = 13 // For the purposes of balance. + stack_origin_tech = list(TECH_MATERIAL = 2) + composite_material = list(MAT_STEEL = SHEET_MATERIAL_AMOUNT, MAT_PLATINUM = SHEET_MATERIAL_AMOUNT) //todo + radiation_resistance = 14 + table_icon_base = "metal" + tgui_icon_key = "plasteel" + +/datum/material/plasteel/hull + id = "plasteel_hull" + name = MAT_PLASTEELHULL + stack_type = /obj/item/stack/material/plasteel/hull + integrity = 600 + icon_colour = "#777788" + explosion_resistance = 40 + +/datum/material/plasteel/hull/place_sheet(var/turf/target) //Deconstructed into normal plasteel sheets. + new /obj/item/stack/material/plasteel(target) diff --git a/code/modules/materials/definitions/metals/platinum.dm b/code/modules/materials/definitions/metals/platinum.dm new file mode 100644 index 000000000000..b123e9ca69b3 --- /dev/null +++ b/code/modules/materials/definitions/metals/platinum.dm @@ -0,0 +1,11 @@ +/datum/material/platinum + name = "platinum" + id = "platinum" + stack_type = /obj/item/stack/material/platinum + icon_colour = "#9999FF" + weight = 27 + conductivity = 9.43 + stack_origin_tech = list(TECH_MATERIAL = 2) + sheet_singular_name = "ingot" + sheet_plural_name = "ingots" + tgui_icon_key = "ingots" diff --git a/code/modules/materials/definitions/metals/silver.dm b/code/modules/materials/definitions/metals/silver.dm new file mode 100644 index 000000000000..ae1bc14fe5e2 --- /dev/null +++ b/code/modules/materials/definitions/metals/silver.dm @@ -0,0 +1,12 @@ +/datum/material/silver + id = "silver" + name = "silver" + stack_type = /obj/item/stack/material/silver + icon_colour = "#D1E6E3" + weight = 22 + hardness = 50 + conductivity = 63 + stack_origin_tech = list(TECH_MATERIAL = 3) + sheet_singular_name = "ingot" + sheet_plural_name = "ingots" + tgui_icon_key = "silver" diff --git a/code/modules/materials/definitions/metals/steel.dm b/code/modules/materials/definitions/metals/steel.dm new file mode 100644 index 000000000000..dc83f6cf7cfe --- /dev/null +++ b/code/modules/materials/definitions/metals/steel.dm @@ -0,0 +1,30 @@ +/datum/material/steel + id = "steel" + name = MAT_STEEL + stack_type = /obj/item/stack/material/steel + integrity = 150 + conductivity = 11 // Assuming this is carbon steel, it would actually be slightly less conductive than iron, but lets ignore that. + protectiveness = 10 // 33% + icon_base = 'icons/turf/walls/metal_wall.dmi' + icon_reinf = 'icons/turf/walls/solid_wall_reinforced.dmi' + icon_colour = "#666666" + table_icon_base = "metal" + tgui_icon_key = "metal" + +/datum/material/steel/hull + id = "steel_hull" + name = MAT_STEELHULL + stack_type = /obj/item/stack/material/steel/hull + integrity = 250 + explosion_resistance = 10 + icon_colour = "#666677" + +/datum/material/steel/hull/place_sheet(var/turf/target) //Deconstructed into normal steel sheets. + new /obj/item/stack/material/steel(target) + +/datum/material/steel/holographic + id = "steel_holo" + name = "holo" + MAT_STEEL + display_name = "steel" + stack_type = null + shard_type = SHARD_NONE diff --git a/code/modules/materials/definitions/metals/titanium.dm b/code/modules/materials/definitions/metals/titanium.dm new file mode 100644 index 000000000000..12fbd2c310cc --- /dev/null +++ b/code/modules/materials/definitions/metals/titanium.dm @@ -0,0 +1,28 @@ +/datum/material/plasteel/titanium + id = "titanium" + name = MAT_TITANIUM + stack_type = /obj/item/stack/material/titanium + conductivity = 2.38 + icon_base = 'icons/turf/walls/metal_wall.dmi' + icon_reinf = 'icons/turf/walls/solid_wall_reinforced.dmi' + door_icon_base = "metal" + icon_colour = "#D1E6E3" + table_icon_base = "metal" + tgui_icon_key = "titanium" + +/datum/material/plasteel/titanium/hull + id = "titanium_hull" + name = MAT_TITANIUMHULL + stack_type = null + integrity = 400 + melting_point = 6000 + icon_colour = "#777777" + explosion_resistance = 25 + hardness = 80 + weight = 23 + protectiveness = 20 // 50% + conductivity = 13 // For the purposes of balance. + stack_origin_tech = list(TECH_MATERIAL = 2) + composite_material = list(MAT_STEEL = SHEET_MATERIAL_AMOUNT, MAT_PLATINUM = SHEET_MATERIAL_AMOUNT) //todo + radiation_resistance = 14 + table_icon_base = "metal" diff --git a/code/modules/materials/definitions/metals/uranium.dm b/code/modules/materials/definitions/metals/uranium.dm new file mode 100644 index 000000000000..3ec97fe32cc8 --- /dev/null +++ b/code/modules/materials/definitions/metals/uranium.dm @@ -0,0 +1,13 @@ +/datum/material/uranium + id = "uranium" + name = "uranium" + stack_type = /obj/item/stack/material/uranium + radioactivity = RAD_INTENSITY_MAT_URANIUM + icon_base = 'icons/turf/walls/stone_wall.dmi' + icon_reinf = 'icons/turf/walls/reinforced_stone.dmi' + icon_reinf_directionals = TRUE + icon_colour = "#007A00" + weight = 22 + stack_origin_tech = list(TECH_MATERIAL = 5) + door_icon_base = "stone" + tgui_icon_key = "uranium" diff --git a/code/modules/materials/definitions/misc/cloths.dm b/code/modules/materials/definitions/misc/cloths.dm new file mode 100644 index 000000000000..1818d5ebad68 --- /dev/null +++ b/code/modules/materials/definitions/misc/cloths.dm @@ -0,0 +1,110 @@ +/datum/material/cloth //todo + id = "cloth" + name = "cloth" + stack_origin_tech = list(TECH_MATERIAL = 2) + stack_type = /obj/item/stack/material/cloth + door_icon_base = "wood" + ignition_point = T0C+232 + melting_point = T0C+300 + protectiveness = 1 // 4% + flags = MATERIAL_PADDING + conductive = 0 + pass_stack_colors = TRUE + +/datum/material/carpet + id = "carpet" + name = "carpet" + display_name = "comfy" + use_name = "red upholstery" + icon_colour = "#DA020A" + flags = MATERIAL_PADDING + ignition_point = T0C+232 + melting_point = T0C+300 + sheet_singular_name = "tile" + sheet_plural_name = "tiles" + protectiveness = 1 // 4% + +// This all needs to be OOP'd and use inheritence if its ever used in the future. +/datum/material/cloth_teal + id = "cloth_teal" + name = "teal" + display_name ="teal" + use_name = "teal cloth" + icon_colour = "#00EAFA" + flags = MATERIAL_PADDING + ignition_point = T0C+232 + melting_point = T0C+300 + protectiveness = 1 // 4% + conductive = 0 + +/datum/material/cloth_black + id = "cloth_black" + name = "black" + display_name = "black" + use_name = "black cloth" + icon_colour = "#505050" + flags = MATERIAL_PADDING + ignition_point = T0C+232 + melting_point = T0C+300 + protectiveness = 1 // 4% + conductive = 0 + +/datum/material/cloth_green + id = "cloth_green" + name = "green" + display_name = "green" + use_name = "green cloth" + icon_colour = "#01C608" + flags = MATERIAL_PADDING + ignition_point = T0C+232 + melting_point = T0C+300 + protectiveness = 1 // 4% + conductive = 0 + +/datum/material/cloth_puple + id = "cloth_purple" + name = "purple" + display_name = "purple" + use_name = "purple cloth" + icon_colour = "#9C56C4" + flags = MATERIAL_PADDING + ignition_point = T0C+232 + melting_point = T0C+300 + protectiveness = 1 // 4% + conductive = 0 + +/datum/material/cloth_blue + id = "cloth_blue" + name = "blue" + display_name = "blue" + use_name = "blue cloth" + icon_colour = "#6B6FE3" + flags = MATERIAL_PADDING + ignition_point = T0C+232 + melting_point = T0C+300 + protectiveness = 1 // 4% + conductive = 0 + +/datum/material/cloth_beige + id = "cloth_beige" + name = "beige" + display_name = "beige" + use_name = "beige cloth" + icon_colour = "#E8E7C8" + flags = MATERIAL_PADDING + ignition_point = T0C+232 + melting_point = T0C+300 + protectiveness = 1 // 4% + conductive = 0 + +/datum/material/cloth_lime + id = "cloth_lime" + name = "lime" + display_name = "lime" + use_name = "lime cloth" + icon_colour = "#62E36C" + flags = MATERIAL_PADDING + ignition_point = T0C+232 + melting_point = T0C+300 + protectiveness = 1 // 4% + conductive = 0 diff --git a/code/modules/materials/definitions/misc/foam.dm b/code/modules/materials/definitions/misc/foam.dm new file mode 100644 index 000000000000..2a189a5c4360 --- /dev/null +++ b/code/modules/materials/definitions/misc/foam.dm @@ -0,0 +1,13 @@ +/datum/material/toy_foam + id = "foam" + name = "foam" + display_name = "foam" + use_name = "foam" + flags = MATERIAL_PADDING + ignition_point = T0C+232 + melting_point = T0C+300 + icon_colour = "#ff9900" + hardness = 0 + weight = 0 + protectiveness = 0 // 0% + conductive = 0 diff --git a/code/modules/materials/definitions/misc/paper.dm b/code/modules/materials/definitions/misc/paper.dm new file mode 100644 index 000000000000..059ac27001e0 --- /dev/null +++ b/code/modules/materials/definitions/misc/paper.dm @@ -0,0 +1,20 @@ +/datum/material/cardboard + id = "cardboard" + name = "cardboard" + stack_type = /obj/item/stack/material/cardboard + flags = MATERIAL_BRITTLE + integrity = 10 + icon_base = 'icons/turf/walls/solid.dmi' + icon_reinf = 'icons/turf/walls/reinforced_solid.dmi' + icon_colour = "#AAAAAA" + hardness = 1 + weight = 1 + protectiveness = 0 // 0% + conductive = 0 + ignition_point = T0C+232 //"the temperature at which book-paper catches fire, and burns." close enough + melting_point = T0C+232 //temperature at which cardboard walls would be destroyed + stack_origin_tech = list(TECH_MATERIAL = 1) + door_icon_base = "wood" + destruction_desc = "crumples" + radiation_resistance = 1 + pass_stack_colors = TRUE diff --git a/code/modules/materials/definitions/misc/plastic.dm b/code/modules/materials/definitions/misc/plastic.dm new file mode 100644 index 000000000000..745f9ee5dd8d --- /dev/null +++ b/code/modules/materials/definitions/misc/plastic.dm @@ -0,0 +1,22 @@ +/datum/material/plastic + name = "plastic" + id = "plastic" + stack_type = /obj/item/stack/material/plastic + flags = MATERIAL_BRITTLE + icon_base = 'icons/turf/walls/solid_wall.dmi' + icon_reinf = 'icons/turf/walls/solid_wall_reinforced.dmi' + icon_colour = "#CCCCCC" + hardness = 10 + weight = 12 + protectiveness = 5 // 20% + conductive = 0 + conductivity = 2 // For the sake of material armor diversity, we're gonna pretend this plastic is a good insulator. + melting_point = T0C+371 //assuming heat resistant plastic + stack_origin_tech = list(TECH_MATERIAL = 3) + +/datum/material/plastic/holographic + name = "holoplastic" + id = "plastic_holo" + display_name = "plastic" + stack_type = null + shard_type = SHARD_NONE diff --git a/code/modules/materials/definitions/misc/snow.dm b/code/modules/materials/definitions/misc/snow.dm new file mode 100644 index 000000000000..40f292cfac54 --- /dev/null +++ b/code/modules/materials/definitions/misc/snow.dm @@ -0,0 +1,38 @@ +/datum/material/snow + id = "snow" + name = MAT_SNOW + stack_type = /obj/item/stack/material/snow + flags = MATERIAL_BRITTLE + icon_base = 'icons/turf/walls/solid.dmi' + icon_reinf = 'icons/turf/walls/reinforced_solid.dmi' + icon_colour = "#FFFFFF" + integrity = 1 + hardness = 1 + weight = 1 + protectiveness = 0 // 0% + stack_origin_tech = list(TECH_MATERIAL = 1) + melting_point = T0C+1 + destruction_desc = "crumples" + sheet_singular_name = "pile" + sheet_plural_name = "pile" //Just a bigger pile + radiation_resistance = 1 + +/datum/material/snowbrick //only slightly stronger than snow, used to make igloos mostly + id = "snow_packed" + name = "packed snow" + flags = MATERIAL_BRITTLE + stack_type = /obj/item/stack/material/snowbrick + icon_base = 'icons/turf/walls/stone_wall.dmi' + icon_reinf = 'icons/turf/walls/reinforced_stone.dmi' + icon_reinf_directionals = TRUE + icon_colour = "#D8FDFF" + integrity = 50 + weight = 2 + hardness = 2 + protectiveness = 0 // 0% + stack_origin_tech = list(TECH_MATERIAL = 1) + melting_point = T0C+1 + destruction_desc = "crumbles" + sheet_singular_name = "brick" + sheet_plural_name = "bricks" + radiation_resistance = 1 diff --git a/code/modules/materials/definitions/misc/wax.dm b/code/modules/materials/definitions/misc/wax.dm new file mode 100644 index 000000000000..a6c8ca26add5 --- /dev/null +++ b/code/modules/materials/definitions/misc/wax.dm @@ -0,0 +1,10 @@ +/datum/material/wax + id = "wax" + name = "wax" + stack_type = /obj/item/stack/material/wax + icon_colour = "#ebe6ac" + melting_point = T0C+300 + weight = 1 + hardness = 20 + integrity = 100 + pass_stack_colors = TRUE diff --git a/code/modules/materials/definitions/organic/bone.dm b/code/modules/materials/definitions/organic/bone.dm new file mode 100644 index 000000000000..82a7d57e8cb4 --- /dev/null +++ b/code/modules/materials/definitions/organic/bone.dm @@ -0,0 +1,28 @@ +/datum/material/bone + id = "bone" + name = "bone" + icon_colour = "#e6dfc8" + stack_type = /obj/item/stack/material/bone + icon_base = 'icons/turf/walls/stone_wall.dmi' + icon_reinf = 'icons/turf/walls/reinforced_mesh.dmi' + melting_point = T0C+300 + sheet_singular_name = "fragment" + sheet_plural_name = "fragments" + conductive = 0 + explosion_resistance = 60 + radiation_resistance = 10 + stack_origin_tech = list(TECH_MATERIAL = 8, TECH_PHORON = 4, TECH_BLUESPACE = 4, TECH_BIO = 7) + door_icon_base = "stone" + table_icon_base = "stone" + +/datum/material/bone/wall_touch_special(var/turf/simulated/wall/W, var/mob/living/L) + var/mob/living/carbon/M = L + if(istype(M) && L.mind.isholy) + to_chat(M, "\The [W] shudders under your touch, starting to become porous.") + playsound(W, 'sound/effects/attackblob.ogg', 50, 1) + if(do_after(L, 5 SECONDS)) + spawn(2) + playsound(W, 'sound/effects/attackblob.ogg', 100, 1) + W.dismantle_wall() + return 1 + return 0 diff --git a/code/modules/materials/definitions/organic/cotton.dm b/code/modules/materials/definitions/organic/cotton.dm new file mode 100644 index 000000000000..4d3652c989bc --- /dev/null +++ b/code/modules/materials/definitions/organic/cotton.dm @@ -0,0 +1,10 @@ +/datum/material/cotton + id = "cotton" + name = "cotton" + display_name ="cotton" + icon_colour = "#FFFFFF" + flags = MATERIAL_PADDING + ignition_point = T0C+232 + melting_point = T0C+300 + protectiveness = 1 // 4% + conductive = 0 diff --git a/code/modules/materials/definitions/organic/diona.dm b/code/modules/materials/definitions/organic/diona.dm new file mode 100644 index 000000000000..38b06bd26003 --- /dev/null +++ b/code/modules/materials/definitions/organic/diona.dm @@ -0,0 +1,14 @@ +/datum/material/diona + id = "biomass_diona" + name = "biomass" + icon_colour = null + stack_type = null + integrity = 600 + icon_base = 'icons/turf/walls/diona.dmi' + icon_reinf = null + +/datum/material/diona/place_dismantled_product() + return + +/datum/material/diona/place_dismantled_girder(var/turf/target) + spawn_diona_nymph(target) diff --git a/code/modules/materials/definitions/organic/flesh.dm b/code/modules/materials/definitions/organic/flesh.dm new file mode 100644 index 000000000000..71eb57956e43 --- /dev/null +++ b/code/modules/materials/definitions/organic/flesh.dm @@ -0,0 +1,44 @@ +/datum/material/flesh + id = "flesh" + name = "flesh" + icon_colour = "#35343a" + dooropen_noise = 'sound/effects/attackblob.ogg' + door_icon_base = "fleshclosed" + melting_point = T0C+300 + sheet_singular_name = "glob" + sheet_plural_name = "globs" + conductive = 0 + explosion_resistance = 60 + radiation_resistance = 10 + stack_origin_tech = list(TECH_MATERIAL = 8, TECH_PHORON = 4, TECH_BLUESPACE = 4, TECH_BIO = 7) + +/datum/material/flesh + id = "flesh" + name = "flesh" + display_name = "chunk of flesh" + icon_colour = "#dd90aa" + sheet_singular_name = "meat" + sheet_plural_name = "meats" + integrity = 1200 + melting_point = 6000 + explosion_resistance = 200 + hardness = 500 + weight = 500 + +/datum/material/flesh/can_open_material_door(var/mob/living/user) + var/mob/living/carbon/M = user + if(istype(M)) + return 1 + return 0 + +/datum/material/flesh/wall_touch_special(var/turf/simulated/wall/W, var/mob/living/L) + var/mob/living/carbon/M = L + if(istype(M) && L.mind.isholy) + to_chat(M, "\The [W] shudders under your touch, starting to become porous.") + playsound(W, 'sound/effects/attackblob.ogg', 50, 1) + if(do_after(L, 5 SECONDS)) + spawn(2) + playsound(W, 'sound/effects/attackblob.ogg', 100, 1) + W.dismantle_wall() + return 1 + return 0 diff --git a/code/modules/materials/definitions/organic/leather.dm b/code/modules/materials/definitions/organic/leather.dm new file mode 100644 index 000000000000..cc237aa297f7 --- /dev/null +++ b/code/modules/materials/definitions/organic/leather.dm @@ -0,0 +1,13 @@ +//TODO PLACEHOLDERS: +// todo: wtf are these they need to be subtyped properly and uhh yea +/datum/material/leather + id = "leather" + name = "leather" + icon_colour = "#5C4831" + stack_type = /obj/item/stack/material/leather + stack_origin_tech = list(TECH_MATERIAL = 2) + flags = MATERIAL_PADDING + ignition_point = T0C+300 + melting_point = T0C+300 + protectiveness = 3 // 13% + conductive = 0 diff --git a/code/modules/materials/definitions/organic/resin.dm b/code/modules/materials/definitions/organic/resin.dm new file mode 100644 index 000000000000..dc2dcf0321dd --- /dev/null +++ b/code/modules/materials/definitions/organic/resin.dm @@ -0,0 +1,34 @@ +/datum/material/resin + id = "xenoresin" + name = "resin" + icon_colour = "#261438" + icon_base = 'icons/turf/walls/resin.dmi' + dooropen_noise = 'sound/effects/attackblob.ogg' + door_icon_base = "resin" + icon_reinf = 'icons/turf/walls/reinforced_mesh.dmi' + melting_point = T0C+300 + sheet_singular_name = "blob" + sheet_plural_name = "blobs" + conductive = 0 + explosion_resistance = 60 + radiation_resistance = 10 + stack_origin_tech = list(TECH_MATERIAL = 8, TECH_PHORON = 4, TECH_BLUESPACE = 4, TECH_BIO = 7) + stack_type = /obj/item/stack/material/resin + +/datum/material/resin/can_open_material_door(var/mob/living/user) + var/mob/living/carbon/M = user + if(istype(M) && locate(/obj/item/organ/internal/xenos/hivenode) in M.internal_organs) + return 1 + return 0 + +/datum/material/resin/wall_touch_special(var/turf/simulated/wall/W, var/mob/living/L) + var/mob/living/carbon/M = L + if(istype(M) && locate(/obj/item/organ/internal/xenos/hivenode) in M.internal_organs) + to_chat(M, "\The [W] shudders under your touch, starting to become porous.") + playsound(W, 'sound/effects/attackblob.ogg', 50, 1) + if(do_after(L, 5 SECONDS)) + spawn(2) + playsound(W, 'sound/effects/attackblob.ogg', 100, 1) + W.dismantle_wall() + return 1 + return 0 diff --git a/code/modules/materials/definitions/organic/wood.dm b/code/modules/materials/definitions/organic/wood.dm new file mode 100644 index 000000000000..42eda7dce0d0 --- /dev/null +++ b/code/modules/materials/definitions/organic/wood.dm @@ -0,0 +1,75 @@ +/datum/material/wood + id = "wood" + name = MAT_WOOD + stack_type = /obj/item/stack/material/wood + icon_colour = "#9c5930" + integrity = 50 + icon_base = 'icons/turf/walls/wood_wall.dmi' + wall_stripe_icon = 'icons/turf/walls/wood_wall_stripe.dmi' + explosion_resistance = 2 + shard_type = SHARD_SPLINTER + shard_can_repair = 0 // you can't weld splinters back into planks + hardness = 15 + weight = 18 + protectiveness = 8 // 28% + conductive = 0 + conductivity = 1 + melting_point = T0C+300 //okay, not melting in this case, but hot enough to destroy wood + ignition_point = T0C+288 + stack_origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) + dooropen_noise = 'sound/effects/doorcreaky.ogg' + door_icon_base = "wood" + destruction_desc = "splinters" + sheet_singular_name = "plank" + sheet_plural_name = "planks" + table_icon_base = "wood" + tgui_icon_key = "plank" + +/datum/material/wood/log + id = "log" + name = "log" + icon_base = 'icons/turf/walls/log.dmi' + stack_type = /obj/item/stack/material/log + sheet_singular_name = null + sheet_plural_name = "pile" + tgui_icon_key = "log" + +/datum/material/wood/log/sif + id = "log_sif" + name = MAT_SIFLOG + icon_colour = "#0099cc" // Cyan-ish + stack_origin_tech = list(TECH_MATERIAL = 2, TECH_BIO = 2) + stack_type = /obj/item/stack/material/log/sif + +/datum/material/wood/log/hard + id = "log_hardwood" + name = MAT_HARDLOG + icon_colour = "#6f432a" + stack_type = /obj/item/stack/material/log/hard + +/datum/material/wood/holographic + id = "wood_holo" + name = "holowood" + display_name = "wood" + stack_type = null + shard_type = SHARD_NONE + +/datum/material/wood/sif + id = "wood_sif" + name = MAT_SIFWOOD + stack_type = /obj/item/stack/material/wood/sif + icon_colour = "#0099cc" // Cyan-ish + stack_origin_tech = list(TECH_MATERIAL = 2, TECH_BIO = 2) // Alien wood would presumably be more interesting to the analyzer. + +/datum/material/wood/hardwood + id = "wood_hardwood" + name = MAT_HARDWOOD + stack_type = /obj/item/stack/material/wood/hard + icon_colour = "#42291a" + icon_base = 'icons/turf/walls/wood_wall.dmi' + wall_stripe_icon = 'icons/turf/walls/wood_wall_stripe.dmi' + icon_reinf_directionals = TRUE + integrity = 65 //a bit stronger than regular wood + hardness = 20 + weight = 20 //likewise, heavier + table_icon_base = "stone" diff --git a/code/modules/materials/definitions/special/cult.dm b/code/modules/materials/definitions/special/cult.dm new file mode 100644 index 000000000000..58e73d852510 --- /dev/null +++ b/code/modules/materials/definitions/special/cult.dm @@ -0,0 +1,24 @@ +/datum/material/cult + id = "cult" + name = "cult" + display_name = "disturbing stone" + icon_base = 'icons/turf/walls/cult.dmi' + icon_colour = "#402821" + icon_reinf = "reinf_cult" + shard_type = SHARD_STONE_PIECE + sheet_singular_name = "brick" + sheet_plural_name = "bricks" + +/datum/material/cult/place_dismantled_girder(var/turf/target) + new /obj/structure/girder/cult(target, "cult") + +/datum/material/cult/place_dismantled_product(var/turf/target) + new /obj/effect/debris/cleanable/blood(target) + +/datum/material/cult/reinf + id = "cult_reinforced" + name = "cult2" + display_name = "human remains" + +/datum/material/cult/reinf/place_dismantled_product(var/turf/target) + new /obj/effect/decal/remains/human(target) diff --git a/code/modules/materials/definitions/special/morphium.dm b/code/modules/materials/definitions/special/morphium.dm new file mode 100644 index 000000000000..272598336ef7 --- /dev/null +++ b/code/modules/materials/definitions/special/morphium.dm @@ -0,0 +1,27 @@ +/datum/material/morphium + name = MAT_MORPHIUM + id = "morphium" + stack_type = /obj/item/stack/material/morphium + icon_base = 'icons/turf/walls/metal.dmi' + icon_reinf = 'icons/turf/walls/reinforced_metal.dmi' + door_icon_base = "metal" + icon_colour = "#37115A" + protectiveness = 60 + integrity = 900 + conductive = 0 + conductivity = 1.5 + hardness = 80 + shard_type = SHARD_SHARD + weight = 30 + negation = 25 + explosion_resistance = 85 + reflectivity = 0.2 + radiation_resistance = 10 + stack_origin_tech = list(TECH_MATERIAL = 8, TECH_MAGNET = 8, TECH_PHORON = 6, TECH_BLUESPACE = 6, TECH_ARCANE = 3) + +/datum/material/morphium/hull + name = MAT_MORPHIUMHULL + id = "morphium_hull" + stack_type = /obj/item/stack/material/morphium/hull + icon_base = 'icons/turf/walls/hull.dmi' + icon_reinf = 'icons/turf/walls/reinforced_mesh.dmi' diff --git a/code/modules/materials/definitions/special/phoron.dm b/code/modules/materials/definitions/special/phoron.dm new file mode 100644 index 000000000000..23f5bb49e7d7 --- /dev/null +++ b/code/modules/materials/definitions/special/phoron.dm @@ -0,0 +1,32 @@ + +/datum/material/phoron + id = "phoron" + name = "phoron" + stack_type = /obj/item/stack/material/phoron + ignition_point = PHORON_MINIMUM_BURN_TEMPERATURE + icon_base = 'icons/turf/walls/solid_wall.dmi' + icon_reinf = 'icons/turf/walls/solid_wall_reinforced.dmi' + icon_colour = "#FC2BC5" + shard_type = SHARD_SHARD + hardness = 30 + stack_origin_tech = list(TECH_MATERIAL = 2, TECH_PHORON = 2) + door_icon_base = "stone" + sheet_singular_name = "crystal" + sheet_plural_name = "crystals" + +// Commenting this out while fires are so spectacularly lethal, as I can't seem to get this balanced appropriately. +/* +/datum/material/phoron/combustion_effect(var/turf/T, var/temperature, var/effect_multiplier) + if(isnull(ignition_point)) + return 0 + if(temperature < ignition_point) + return 0 + var/totalPhoron = 0 + for(var/turf/simulated/floor/target_tile in range(2,T)) + var/phoronToDeduce = (temperature/30) * effect_multiplier + totalPhoron += phoronToDeduce + target_tile.assume_gas(/datum/gas/phoron, phoronToDeduce, 200+T0C) + spawn (0) + target_tile.hotspot_expose(temperature, 400) + return round(totalPhoron/100) +*/ diff --git a/code/modules/materials/definitions/special/supermatter.dm b/code/modules/materials/definitions/special/supermatter.dm new file mode 100644 index 000000000000..87959972d958 --- /dev/null +++ b/code/modules/materials/definitions/special/supermatter.dm @@ -0,0 +1,17 @@ +/datum/material/supermatter + id = "supermatter" + name = "supermatter" + icon_colour = "#FFFF00" + stack_type = /obj/item/stack/material/supermatter + shard_type = SHARD_SHARD + radioactivity = RAD_INTENSITY_MAT_SUPERMATTER + luminescence = 3 + ignition_point = PHORON_MINIMUM_BURN_TEMPERATURE + icon_base = 'icons/turf/walls/stone_wall.dmi' + shard_type = SHARD_SHARD + hardness = 30 + door_icon_base = "stone" + sheet_singular_name = "crystal" + sheet_plural_name = "crystals" + is_fusion_fuel = 1 + stack_origin_tech = list(TECH_MATERIAL = 8, TECH_PHORON = 5, TECH_BLUESPACE = 4) diff --git a/code/modules/materials/definitions/special/valhollide.dm b/code/modules/materials/definitions/special/valhollide.dm new file mode 100644 index 000000000000..fa2f952d060f --- /dev/null +++ b/code/modules/materials/definitions/special/valhollide.dm @@ -0,0 +1,21 @@ +/datum/material/valhollide + name = MAT_VALHOLLIDE + id = "valhollide" + stack_type = /obj/item/stack/material/valhollide + icon_base = 'icons/turf/walls/stone_wall.dmi' + door_icon_base = "stone" + icon_reinf = 'icons/turf/walls/reinforced_mesh.dmi' + icon_colour = "##FFF3B2" + protectiveness = 30 + integrity = 240 + weight = 30 + hardness = 45 + negation = 2 + conductive = 0 + conductivity = 5 + reflectivity = 0.5 + radiation_resistance = 20 + spatial_instability = 30 + stack_origin_tech = list(TECH_MATERIAL = 7, TECH_PHORON = 5, TECH_BLUESPACE = 5) + sheet_singular_name = "gem" + sheet_plural_name = "gems" diff --git a/code/modules/materials/definitions/special/verdantium.dm b/code/modules/materials/definitions/special/verdantium.dm new file mode 100644 index 000000000000..950f74d91fc3 --- /dev/null +++ b/code/modules/materials/definitions/special/verdantium.dm @@ -0,0 +1,20 @@ +/datum/material/verdantium + name = MAT_VERDANTIUM + id = "verdantium" + stack_type = /obj/item/stack/material/verdantium + icon_base = 'icons/turf/walls/metal.dmi' + icon_reinf = 'icons/turf/walls/reinforced_metal.dmi' + door_icon_base = "metal" + icon_colour = "#4FE95A" + integrity = 80 + protectiveness = 15 + weight = 15 + hardness = 30 + shard_type = SHARD_SHARD + negation = 15 + conductivity = 60 + reflectivity = 0.3 + radiation_resistance = 5 + stack_origin_tech = list(TECH_MATERIAL = 6, TECH_POWER = 5, TECH_BIO = 4) + sheet_singular_name = "sheet" + sheet_plural_name = "sheets" diff --git a/code/modules/materials/definitions/stones/marble.dm b/code/modules/materials/definitions/stones/marble.dm new file mode 100644 index 000000000000..8e8b776c4243 --- /dev/null +++ b/code/modules/materials/definitions/stones/marble.dm @@ -0,0 +1,20 @@ +/datum/material/marble + id = "marble" + name = "marble" + icon_colour = "#AAAAAA" + weight = 26 + hardness = 30 + integrity = 201 //hack to stop kitchen benches being flippable, todo: refactor into weight system + stack_type = /obj/item/stack/material/marble + icon_base = 'icons/turf/walls/stone_wall.dmi' + icon_reinf = 'icons/turf/walls/reinforced_stone.dmi' + icon_reinf_directionals = TRUE + shard_type = SHARD_STONE_PIECE + protectiveness = 5 // 20% + conductive = 0 + conductivity = 5 + door_icon_base = "stone" + sheet_singular_name = "brick" + sheet_plural_name = "bricks" + table_icon_base = "stone" + tgui_icon_key = "marble" diff --git a/code/modules/materials/definitions/stones/sandstone.dm b/code/modules/materials/definitions/stones/sandstone.dm new file mode 100644 index 000000000000..2f19c4de200a --- /dev/null +++ b/code/modules/materials/definitions/stones/sandstone.dm @@ -0,0 +1,19 @@ +/datum/material/sandstone + id = "sandstone" + name = "sandstone" + stack_type = /obj/item/stack/material/sandstone + icon_base = 'icons/turf/walls/stone_wall.dmi' + icon_reinf = 'icons/turf/walls/reinforced_stone.dmi' + icon_reinf_directionals = TRUE + icon_colour = "#D9C179" + shard_type = SHARD_STONE_PIECE + weight = 22 + hardness = 55 + protectiveness = 5 // 20% + conductive = 0 + conductivity = 5 + door_icon_base = "stone" + sheet_singular_name = "brick" + sheet_plural_name = "bricks" + table_icon_base = "stone" + tgui_icon_key = "sandstone" diff --git a/code/modules/materials/definitions/unsorted_materials.dm b/code/modules/materials/definitions/unsorted_materials.dm deleted file mode 100644 index 13933590aeca..000000000000 --- a/code/modules/materials/definitions/unsorted_materials.dm +++ /dev/null @@ -1,1123 +0,0 @@ - -// Datum definitions follow. -/datum/material/uranium - id = "uranium" - name = "uranium" - stack_type = /obj/item/stack/material/uranium - radioactivity = RAD_INTENSITY_MAT_URANIUM - icon_base = 'icons/turf/walls/stone_wall.dmi' - icon_reinf = 'icons/turf/walls/reinforced_stone.dmi' - icon_reinf_directionals = TRUE - icon_colour = "#007A00" - weight = 22 - stack_origin_tech = list(TECH_MATERIAL = 5) - door_icon_base = "stone" - -/datum/material/diamond - id = "diamond" - name = "diamond" - stack_type = /obj/item/stack/material/diamond - flags = MATERIAL_UNMELTABLE - cut_delay = 60 - icon_colour = "#00FFE1" - opacity = 0.4 - reflectivity = 0.6 - conductivity = 1 - shard_type = SHARD_SHARD - tableslam_noise = 'sound/effects/Glasshit.ogg' - hardness = 100 - stack_origin_tech = list(TECH_MATERIAL = 6) - -/datum/material/gold - id = "gold" - name = "gold" - stack_type = /obj/item/stack/material/gold - icon_colour = "#EDD12F" - weight = 24 - hardness = 40 - conductivity = 41 - stack_origin_tech = list(TECH_MATERIAL = 4) - sheet_singular_name = "ingot" - sheet_plural_name = "ingots" - -/datum/material/gold/bronze //placeholder for ashtrays - id = "bronze" - name = "bronze" - icon_colour = "#EDD12F" - -/datum/material/silver - id = "silver" - name = "silver" - stack_type = /obj/item/stack/material/silver - icon_colour = "#D1E6E3" - weight = 22 - hardness = 50 - conductivity = 63 - stack_origin_tech = list(TECH_MATERIAL = 3) - sheet_singular_name = "ingot" - sheet_plural_name = "ingots" - -//R-UST port -/datum/material/supermatter - id = "supermatter" - name = "supermatter" - icon_colour = "#FFFF00" - stack_type = /obj/item/stack/material/supermatter - shard_type = SHARD_SHARD - radioactivity = RAD_INTENSITY_MAT_SUPERMATTER - luminescence = 3 - ignition_point = PHORON_MINIMUM_BURN_TEMPERATURE - icon_base = 'icons/turf/walls/stone_wall.dmi' - shard_type = SHARD_SHARD - hardness = 30 - door_icon_base = "stone" - sheet_singular_name = "crystal" - sheet_plural_name = "crystals" - is_fusion_fuel = 1 - stack_origin_tech = list(TECH_MATERIAL = 8, TECH_PHORON = 5, TECH_BLUESPACE = 4) - -/datum/material/phoron - id = "phoron" - name = "phoron" - stack_type = /obj/item/stack/material/phoron - ignition_point = PHORON_MINIMUM_BURN_TEMPERATURE - icon_base = 'icons/turf/walls/solid_wall.dmi' - icon_reinf = 'icons/turf/walls/solid_wall_reinforced.dmi' - icon_colour = "#FC2BC5" - shard_type = SHARD_SHARD - hardness = 30 - stack_origin_tech = list(TECH_MATERIAL = 2, TECH_PHORON = 2) - door_icon_base = "stone" - sheet_singular_name = "crystal" - sheet_plural_name = "crystals" - -/* -// Commenting this out while fires are so spectacularly lethal, as I can't seem to get this balanced appropriately. -/datum/material/phoron/combustion_effect(var/turf/T, var/temperature, var/effect_multiplier) - if(isnull(ignition_point)) - return 0 - if(temperature < ignition_point) - return 0 - var/totalPhoron = 0 - for(var/turf/simulated/floor/target_tile in range(2,T)) - var/phoronToDeduce = (temperature/30) * effect_multiplier - totalPhoron += phoronToDeduce - target_tile.assume_gas(/datum/gas/phoron, phoronToDeduce, 200+T0C) - spawn (0) - target_tile.hotspot_expose(temperature, 400) - return round(totalPhoron/100) -*/ - -/datum/material/sandstone - id = "sandstone" - name = "sandstone" - stack_type = /obj/item/stack/material/sandstone - icon_base = 'icons/turf/walls/stone_wall.dmi' - icon_reinf = 'icons/turf/walls/reinforced_stone.dmi' - icon_reinf_directionals = TRUE - icon_colour = "#D9C179" - shard_type = SHARD_STONE_PIECE - weight = 22 - hardness = 55 - protectiveness = 5 // 20% - conductive = 0 - conductivity = 5 - door_icon_base = "stone" - sheet_singular_name = "brick" - sheet_plural_name = "bricks" - table_icon_base = "stone" - -/datum/material/sandstone/marble - id = "marble" - name = "marble" - icon_colour = "#AAAAAA" - weight = 26 - hardness = 30 - integrity = 201 //hack to stop kitchen benches being flippable, todo: refactor into weight system - stack_type = /obj/item/stack/material/marble - -/datum/material/steel - id = "steel" - name = MAT_STEEL - stack_type = /obj/item/stack/material/steel - integrity = 150 - conductivity = 11 // Assuming this is carbon steel, it would actually be slightly less conductive than iron, but lets ignore that. - protectiveness = 10 // 33% - icon_base = 'icons/turf/walls/metal_wall.dmi' - icon_reinf = 'icons/turf/walls/solid_wall_reinforced.dmi' - icon_colour = "#666666" - table_icon_base = "metal" - -/datum/material/steel/hull - id = "steel_hull" - name = MAT_STEELHULL - stack_type = /obj/item/stack/material/steel/hull - integrity = 250 - explosion_resistance = 10 - icon_base = 'icons/turf/walls/metal_wall.dmi' - icon_reinf = 'icons/turf/walls/solid_wall_reinforced.dmi' - icon_colour = "#666677" - -/datum/material/steel/hull/place_sheet(var/turf/target) //Deconstructed into normal steel sheets. - new /obj/item/stack/material/steel(target) - -/datum/material/diona - id = "biomass_diona" - name = "biomass" - icon_colour = null - stack_type = null - integrity = 600 - icon_base = 'icons/turf/walls/diona.dmi' - icon_reinf = null - -/datum/material/diona/place_dismantled_product() - return - -/datum/material/diona/place_dismantled_girder(var/turf/target) - spawn_diona_nymph(target) - -/datum/material/steel/holographic - id = "steel_holo" - name = "holo" + MAT_STEEL - display_name = "steel" - stack_type = null - shard_type = SHARD_NONE - -/datum/material/plasteel - id = "plasteel" - name = "plasteel" - stack_type = /obj/item/stack/material/plasteel - integrity = 400 - melting_point = 6000 - icon_base = 'icons/turf/walls/metal_wall.dmi' - icon_reinf = 'icons/turf/walls/solid_wall_reinforced.dmi' - icon_colour = "#777777" - explosion_resistance = 25 - hardness = 80 - weight = 23 - protectiveness = 20 // 50% - conductivity = 13 // For the purposes of balance. - stack_origin_tech = list(TECH_MATERIAL = 2) - composite_material = list(MAT_STEEL = SHEET_MATERIAL_AMOUNT, MAT_PLATINUM = SHEET_MATERIAL_AMOUNT) //todo - radiation_resistance = 14 - table_icon_base = "metal" - -/datum/material/plasteel/hull - id = "plasteel_hull" - name = MAT_PLASTEELHULL - stack_type = /obj/item/stack/material/plasteel/hull - integrity = 600 - icon_base = 'icons/turf/walls/metal_wall.dmi' - icon_reinf = 'icons/turf/walls/solid_wall_reinforced.dmi' - icon_colour = "#777788" - explosion_resistance = 40 - -/datum/material/plasteel/hull/place_sheet(var/turf/target) //Deconstructed into normal plasteel sheets. - new /obj/item/stack/material/plasteel(target) - -// Very rare alloy that is reflective, should be used sparingly. -/datum/material/durasteel - id = "durasteel" - name = "durasteel" - stack_type = /obj/item/stack/material/durasteel - integrity = 600 - melting_point = 7000 - icon_base = 'icons/turf/walls/metal_wall.dmi' - icon_reinf = 'icons/turf/walls/solid_wall_reinforced.dmi' - icon_colour = "#6EA7BE" - explosion_resistance = 75 - hardness = 100 - weight = 28 - protectiveness = 60 // 75% - reflectivity = 0.7 // Not a perfect mirror, but close. - stack_origin_tech = list(TECH_MATERIAL = 8) - composite_material = list(MAT_PLASTEEL = SHEET_MATERIAL_AMOUNT, MAT_DIAMOND = SHEET_MATERIAL_AMOUNT) //shrug - table_icon_base = "metal" - -/datum/material/durasteel/hull //The 'Hardball' of starship hulls. - id = "durasteel_hull" - name = MAT_DURASTEELHULL - icon_base = 'icons/turf/walls/metal_wall.dmi' - icon_reinf = 'icons/turf/walls/solid_wall_reinforced.dmi' - icon_colour = "#45829a" - explosion_resistance = 90 - reflectivity = 0.9 - -/datum/material/durasteel/hull/place_sheet(var/turf/target) //Deconstructed into normal durasteel sheets. - new /obj/item/stack/material/durasteel(target) - -/datum/material/plasteel/titanium - id = "titanium" - name = MAT_TITANIUM - stack_type = /obj/item/stack/material/titanium - conductivity = 2.38 - icon_base = 'icons/turf/walls/metal_wall.dmi' - icon_reinf = 'icons/turf/walls/solid_wall_reinforced.dmi' - door_icon_base = "metal" - icon_colour = "#D1E6E3" - table_icon_base = "metal" - -/datum/material/plasteel/titanium/hull - id = "titanium_hull" - name = MAT_TITANIUMHULL - stack_type = null - icon_base = 'icons/turf/walls/metal_wall.dmi' - icon_reinf = 'icons/turf/walls/solid_wall_reinforced.dmi' - -/datum/material/glass - id = "glass" - name = "glass" - stack_type = /obj/item/stack/material/glass - flags = MATERIAL_BRITTLE - icon_colour = "#00E1FF" - opacity = 0.3 - integrity = 100 - shard_type = SHARD_SHARD - tableslam_noise = 'sound/effects/Glasshit.ogg' - hardness = 30 - weight = 15 - protectiveness = 0 // 0% - conductive = 0 - conductivity = 1 // Glass shards don't conduct. - door_icon_base = "stone" - destruction_desc = "shatters" - window_options = list("One Direction" = 1, "Full Window" = 2, "Windoor" = 2) - created_window = /obj/structure/window/basic - created_fulltile_window = /obj/structure/window/basic/full - rod_product = /obj/item/stack/material/glass/reinforced - table_icon_base = "glass" - table_reinf_icon_base = "rglass" - -/datum/material/glass/build_windows(var/mob/living/user, var/obj/item/stack/used_stack) - - if(!user || !used_stack || !created_window || !created_fulltile_window || !window_options.len) - return 0 - - if(!user.IsAdvancedToolUser()) - to_chat(user, "This task is too complex for your clumsy hands.") - return 1 - - var/title = "Sheet-[used_stack.name] ([used_stack.get_amount()] sheet\s left)" - var/choice = input(title, "What would you like to construct?") as null|anything in window_options - var/build_path = /obj/structure/windoor_assembly - var/sheets_needed = window_options[choice] - if(choice == "Windoor") - if(is_reinforced()) - build_path = /obj/structure/windoor_assembly/secure - else if(choice == "Full Window") - build_path = created_fulltile_window - else - build_path = created_window - - if(used_stack.get_amount() < sheets_needed) - to_chat(user, "You need at least [sheets_needed] sheets to build this.") - return 1 - - if(!choice || !used_stack || !user || used_stack.loc != user || user.stat) - return 1 - - var/turf/T = user.loc - if(!istype(T)) - to_chat(user, "You must be standing on open flooring to build a window.") - return 1 - - // Get data for building windows here. - var/list/possible_directions = GLOB.cardinal.Copy() - var/window_count = 0 - for (var/obj/structure/window/check_window in user.loc) - window_count++ - if(check_window.fulltile) - possible_directions -= GLOB.cardinal - else - possible_directions -= check_window.dir - for (var/obj/structure/windoor_assembly/check_assembly in user.loc) - window_count++ - possible_directions -= check_assembly.dir - for (var/obj/machinery/door/window/check_windoor in user.loc) - window_count++ - possible_directions -= check_windoor.dir - - // Get the closest available dir to the user's current facing. - var/build_dir = SOUTHWEST //Default to southwest for fulltile windows. - var/failed_to_build - - if(window_count >= 4) - failed_to_build = 1 - else - if(choice in list("One Direction","Windoor")) - if(possible_directions.len) - for(var/direction in list(user.dir, turn(user.dir,90), turn(user.dir,270), turn(user.dir,180))) - if(direction in possible_directions) - build_dir = direction - break - else - failed_to_build = 1 - if(failed_to_build) - to_chat(user, "There is no room in this location.") - return 1 - - // Build the structure and update sheet count etc. - used_stack.use(sheets_needed) - new build_path(T, build_dir, 1) - return 1 - -/datum/material/glass/proc/is_reinforced() - return (hardness > 35) //todo - -/datum/material/glass/reinforced - id = "glass_reinf" - name = "rglass" - display_name = "reinforced glass" - stack_type = /obj/item/stack/material/glass/reinforced - flags = MATERIAL_BRITTLE - icon_colour = "#00E1FF" - opacity = 0.3 - integrity = 100 - shard_type = SHARD_SHARD - tableslam_noise = 'sound/effects/Glasshit.ogg' - hardness = 40 - weight = 30 - stack_origin_tech = list(TECH_MATERIAL = 2) - composite_material = list(MAT_STEEL = SHEET_MATERIAL_AMOUNT / 2, MAT_GLASS = SHEET_MATERIAL_AMOUNT) - window_options = list("One Direction" = 1, "Full Window" = 2, "Windoor" = 2) - created_window = /obj/structure/window/reinforced - created_fulltile_window = /obj/structure/window/reinforced/full - wire_product = null - rod_product = null - -/datum/material/glass/phoron - id = "glass_boro" - name = "borosilicate glass" - display_name = "borosilicate glass" - stack_type = /obj/item/stack/material/glass/phoronglass - flags = MATERIAL_BRITTLE - integrity = 100 - icon_colour = "#FC2BC5" - stack_origin_tech = list(TECH_MATERIAL = 4) - window_options = list("One Direction" = 1, "Full Window" = 2) - created_window = /obj/structure/window/phoronbasic - created_fulltile_window = /obj/structure/window/phoronbasic/full - wire_product = null - rod_product = /obj/item/stack/material/glass/phoronrglass - -/datum/material/glass/phoron/reinforced - id = "glass_boro_reinf" - name = "reinforced borosilicate glass" - display_name = "reinforced borosilicate glass" - stack_type = /obj/item/stack/material/glass/phoronrglass - stack_origin_tech = list(TECH_MATERIAL = 5) - composite_material = list() //todo - window_options = list("One Direction" = 1, "Full Window" = 2) - created_window = /obj/structure/window/phoronreinforced - created_fulltile_window = /obj/structure/window/phoronreinforced/full - hardness = 40 - weight = 30 - stack_origin_tech = list(TECH_MATERIAL = 2) - composite_material = list() //todo - rod_product = null - -/datum/material/plastic - name = "plastic" - id = "plastic" - stack_type = /obj/item/stack/material/plastic - flags = MATERIAL_BRITTLE - icon_base = 'icons/turf/walls/solid_wall.dmi' - icon_reinf = 'icons/turf/walls/solid_wall_reinforced.dmi' - icon_colour = "#CCCCCC" - hardness = 10 - weight = 12 - protectiveness = 5 // 20% - conductive = 0 - conductivity = 2 // For the sake of material armor diversity, we're gonna pretend this plastic is a good insulator. - melting_point = T0C+371 //assuming heat resistant plastic - stack_origin_tech = list(TECH_MATERIAL = 3) - -/datum/material/plastic/holographic - name = "holoplastic" - id = "plastic_holo" - display_name = "plastic" - stack_type = null - shard_type = SHARD_NONE - -/datum/material/osmium - name = "osmium" - id = "osmium" - stack_type = /obj/item/stack/material/osmium - icon_colour = "#9999FF" - stack_origin_tech = list(TECH_MATERIAL = 5) - sheet_singular_name = "ingot" - sheet_plural_name = "ingots" - conductivity = 100 - -/datum/material/tritium - name = "tritium" - id = "tritium" - stack_type = /obj/item/stack/material/tritium - icon_colour = "#777777" - stack_origin_tech = list(TECH_MATERIAL = 5) - sheet_singular_name = "ingot" - sheet_plural_name = "ingots" - is_fusion_fuel = 1 - conductive = 0 - -/datum/material/deuterium - name = "deuterium" - id = "deuterium" - stack_type = /obj/item/stack/material/deuterium - icon_colour = "#999999" - stack_origin_tech = list(TECH_MATERIAL = 3) - sheet_singular_name = "ingot" - sheet_plural_name = "ingots" - is_fusion_fuel = 1 - conductive = 0 - -/datum/material/mhydrogen - name = "mhydrogen" - id = "mhydrogen" - stack_type = /obj/item/stack/material/mhydrogen - icon_colour = "#E6C5DE" - stack_origin_tech = list(TECH_MATERIAL = 6, TECH_POWER = 6, TECH_MAGNET = 5) - conductivity = 100 - is_fusion_fuel = 1 - -/datum/material/platinum - name = "platinum" - id = "platinum" - stack_type = /obj/item/stack/material/platinum - icon_colour = "#9999FF" - weight = 27 - conductivity = 9.43 - stack_origin_tech = list(TECH_MATERIAL = 2) - sheet_singular_name = "ingot" - sheet_plural_name = "ingots" - -/datum/material/iron - name = "iron" - id = "iron" - stack_type = /obj/item/stack/material/iron - icon_colour = "#5C5454" - weight = 22 - conductivity = 10 - sheet_singular_name = "ingot" - sheet_plural_name = "ingots" - -/datum/material/lead - name = MAT_LEAD - id = "lead" - stack_type = /obj/item/stack/material/lead - icon_colour = "#273956" - weight = 23 // Lead is a bit more dense than silver IRL, and silver has 22 ingame. - conductivity = 10 - sheet_singular_name = "ingot" - sheet_plural_name = "ingots" - radiation_resistance = 25 // Lead is Special and so gets to block more radiation than it normally would with just weight, totalling in 48 protection. - -// Particle Smasher and other exotic materials. - -/datum/material/verdantium - name = MAT_VERDANTIUM - id = "verdantium" - stack_type = /obj/item/stack/material/verdantium - icon_base = 'icons/turf/walls/metal.dmi' - icon_reinf = 'icons/turf/walls/reinforced_metal.dmi' - door_icon_base = "metal" - icon_colour = "#4FE95A" - integrity = 80 - protectiveness = 15 - weight = 15 - hardness = 30 - shard_type = SHARD_SHARD - negation = 15 - conductivity = 60 - reflectivity = 0.3 - radiation_resistance = 5 - stack_origin_tech = list(TECH_MATERIAL = 6, TECH_POWER = 5, TECH_BIO = 4) - sheet_singular_name = "sheet" - sheet_plural_name = "sheets" - -//exotic wonder material -/datum/material/morphium - name = MAT_MORPHIUM - id = "morphium" - stack_type = /obj/item/stack/material/morphium - icon_base = 'icons/turf/walls/metal.dmi' - icon_reinf = 'icons/turf/walls/reinforced_metal.dmi' - door_icon_base = "metal" - icon_colour = "#37115A" - protectiveness = 60 - integrity = 900 - conductive = 0 - conductivity = 1.5 - hardness = 80 - shard_type = SHARD_SHARD - weight = 30 - negation = 25 - explosion_resistance = 85 - reflectivity = 0.2 - radiation_resistance = 10 - stack_origin_tech = list(TECH_MATERIAL = 8, TECH_MAGNET = 8, TECH_PHORON = 6, TECH_BLUESPACE = 6, TECH_ARCANE = 3) - -/datum/material/morphium/hull - name = MAT_MORPHIUMHULL - id = "morphium_hull" - stack_type = /obj/item/stack/material/morphium/hull - icon_base = 'icons/turf/walls/hull.dmi' - icon_reinf = 'icons/turf/walls/reinforced_mesh.dmi' - -/datum/material/valhollide - name = MAT_VALHOLLIDE - id = "valhollide" - stack_type = /obj/item/stack/material/valhollide - icon_base = 'icons/turf/walls/stone_wall.dmi' - door_icon_base = "stone" - icon_reinf = 'icons/turf/walls/reinforced_mesh.dmi' - icon_colour = "##FFF3B2" - protectiveness = 30 - integrity = 240 - weight = 30 - hardness = 45 - negation = 2 - conductive = 0 - conductivity = 5 - reflectivity = 0.5 - radiation_resistance = 20 - spatial_instability = 30 - stack_origin_tech = list(TECH_MATERIAL = 7, TECH_PHORON = 5, TECH_BLUESPACE = 5) - sheet_singular_name = "gem" - sheet_plural_name = "gems" - - -// Adminspawn only, do not let anyone get this. -/datum/material/alienalloy - name = "alienalloy" - id = "alien_alloy" - display_name = "durable alloy" - stack_type = null - icon_colour = "#6C7364" - integrity = 1200 - melting_point = 6000 // Hull plating. - explosion_resistance = 200 // Hull plating. - hardness = 500 - weight = 500 - protectiveness = 80 // 80% - -// Likewise. -// todo: kill with fire -/datum/material/alienalloy/elevatorium - id = "elevatorium" - name = "elevatorium" - display_name = "elevator panelling" - icon_colour = "#666666" - -// Ditto. -// todo: KILL WITH FIRE -/datum/material/alienalloy/dungeonium - id = "dungeonium" - name = "dungeonium" - display_name = "ultra-durable" - icon_base = 'icons/turf/walls/dungeon.dmi' - icon_colour = "#FFFFFF" - -/datum/material/alienalloy/bedrock - id = "bedrock" - name = "bedrock" - display_name = "impassable rock" - icon_base = 'icons/turf/walls/rock.dmi' - icon_colour = "#FFFFFF" - -/datum/material/alienalloy/alium - id = "abductor_alloy" - name = "alium" - display_name = "alien" - icon_colour = "#FFFFFF" - -/datum/material/resin - id = "xenoresin" - name = "resin" - icon_colour = "#261438" - icon_base = 'icons/turf/walls/resin.dmi' - dooropen_noise = 'sound/effects/attackblob.ogg' - door_icon_base = "resin" - icon_reinf = 'icons/turf/walls/reinforced_mesh.dmi' - melting_point = T0C+300 - sheet_singular_name = "blob" - sheet_plural_name = "blobs" - conductive = 0 - explosion_resistance = 60 - radiation_resistance = 10 - stack_origin_tech = list(TECH_MATERIAL = 8, TECH_PHORON = 4, TECH_BLUESPACE = 4, TECH_BIO = 7) - stack_type = /obj/item/stack/material/resin - -/datum/material/resin/can_open_material_door(var/mob/living/user) - var/mob/living/carbon/M = user - if(istype(M) && locate(/obj/item/organ/internal/xenos/hivenode) in M.internal_organs) - return 1 - return 0 - -/datum/material/resin/wall_touch_special(var/turf/simulated/wall/W, var/mob/living/L) - var/mob/living/carbon/M = L - if(istype(M) && locate(/obj/item/organ/internal/xenos/hivenode) in M.internal_organs) - to_chat(M, "\The [W] shudders under your touch, starting to become porous.") - playsound(W, 'sound/effects/attackblob.ogg', 50, 1) - if(do_after(L, 5 SECONDS)) - spawn(2) - playsound(W, 'sound/effects/attackblob.ogg', 100, 1) - W.dismantle_wall() - return 1 - return 0 - -/datum/material/wood - id = "wood" - name = MAT_WOOD - stack_type = /obj/item/stack/material/wood - icon_colour = "#9c5930" - integrity = 50 - icon_base = 'icons/turf/walls/wood_wall.dmi' - wall_stripe_icon = 'icons/turf/walls/wood_wall_stripe.dmi' - explosion_resistance = 2 - shard_type = SHARD_SPLINTER - shard_can_repair = 0 // you can't weld splinters back into planks - hardness = 15 - weight = 18 - protectiveness = 8 // 28% - conductive = 0 - conductivity = 1 - melting_point = T0C+300 //okay, not melting in this case, but hot enough to destroy wood - ignition_point = T0C+288 - stack_origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) - dooropen_noise = 'sound/effects/doorcreaky.ogg' - door_icon_base = "wood" - destruction_desc = "splinters" - sheet_singular_name = "plank" - sheet_plural_name = "planks" - table_icon_base = "wood" - -/datum/material/wood/log - id = "log" - name = "log" - icon_base = 'icons/turf/walls/log.dmi' - stack_type = /obj/item/stack/material/log - sheet_singular_name = null - sheet_plural_name = "pile" - -/datum/material/wood/log/sif - id = "log_sif" - name = MAT_SIFLOG - icon_colour = "#0099cc" // Cyan-ish - stack_origin_tech = list(TECH_MATERIAL = 2, TECH_BIO = 2) - stack_type = /obj/item/stack/material/log/sif - -/datum/material/wood/log/hard - id = "log_hardwood" - name = MAT_HARDLOG - icon_colour = "#6f432a" - stack_type = /obj/item/stack/material/log/hard - -/datum/material/wood/holographic - id = "wood_holo" - name = "holowood" - display_name = "wood" - stack_type = null - shard_type = SHARD_NONE - -/datum/material/wood/sif - id = "wood_sif" - name = MAT_SIFWOOD - stack_type = /obj/item/stack/material/wood/sif - icon_colour = "#0099cc" // Cyan-ish - stack_origin_tech = list(TECH_MATERIAL = 2, TECH_BIO = 2) // Alien wood would presumably be more interesting to the analyzer. - -/datum/material/wood/hardwood - id = "wood_hardwood" - name = MAT_HARDWOOD - stack_type = /obj/item/stack/material/wood/hard - icon_colour = "#42291a" - icon_base = 'icons/turf/walls/wood_wall.dmi' - wall_stripe_icon = 'icons/turf/walls/wood_wall_stripe.dmi' - icon_reinf_directionals = TRUE - integrity = 65 //a bit stronger than regular wood - hardness = 20 - weight = 20 //likewise, heavier - table_icon_base = "stone" - -/datum/material/cardboard - id = "cardboard" - name = "cardboard" - stack_type = /obj/item/stack/material/cardboard - flags = MATERIAL_BRITTLE - integrity = 10 - icon_base = 'icons/turf/walls/solid_wall.dmi' - icon_reinf = 'icons/turf/walls/reinforced_solid.dmi' - icon_colour = "#AAAAAA" - hardness = 1 - weight = 1 - protectiveness = 0 // 0% - conductive = 0 - ignition_point = T0C+232 //"the temperature at which book-paper catches fire, and burns." close enough - melting_point = T0C+232 //temperature at which cardboard walls would be destroyed - stack_origin_tech = list(TECH_MATERIAL = 1) - door_icon_base = "wood" - destruction_desc = "crumples" - radiation_resistance = 1 - pass_stack_colors = TRUE - -/datum/material/snow - id = "snow" - name = MAT_SNOW - stack_type = /obj/item/stack/material/snow - flags = MATERIAL_BRITTLE - icon_base = 'icons/turf/walls/solid_wall.dmi' - icon_reinf = 'icons/turf/walls/reinforced_solid.dmi' - icon_colour = "#FFFFFF" - integrity = 1 - hardness = 1 - weight = 1 - protectiveness = 0 // 0% - stack_origin_tech = list(TECH_MATERIAL = 1) - melting_point = T0C+1 - destruction_desc = "crumples" - sheet_singular_name = "pile" - sheet_plural_name = "pile" //Just a bigger pile - radiation_resistance = 1 - -/datum/material/snowbrick //only slightly stronger than snow, used to make igloos mostly - id = "snow_packed" - name = "packed snow" - flags = MATERIAL_BRITTLE - stack_type = /obj/item/stack/material/snowbrick - icon_base = 'icons/turf/walls/stone_wall.dmi' - icon_reinf = 'icons/turf/walls/reinforced_stone.dmi' - icon_reinf_directionals = TRUE - icon_colour = "#D8FDFF" - integrity = 50 - weight = 2 - hardness = 2 - protectiveness = 0 // 0% - stack_origin_tech = list(TECH_MATERIAL = 1) - melting_point = T0C+1 - destruction_desc = "crumbles" - sheet_singular_name = "brick" - sheet_plural_name = "bricks" - radiation_resistance = 1 - -/datum/material/cloth //todo - id = "cloth" - name = "cloth" - stack_origin_tech = list(TECH_MATERIAL = 2) - stack_type = /obj/item/stack/material/cloth - door_icon_base = "wood" - ignition_point = T0C+232 - melting_point = T0C+300 - protectiveness = 1 // 4% - flags = MATERIAL_PADDING - conductive = 0 - pass_stack_colors = TRUE - -/datum/material/cult - id = "cult" - name = "cult" - display_name = "disturbing stone" - icon_base = 'icons/turf/walls/cult.dmi' - icon_colour = "#402821" - icon_reinf = "reinf_cult" - shard_type = SHARD_STONE_PIECE - sheet_singular_name = "brick" - sheet_plural_name = "bricks" - -/datum/material/cult/place_dismantled_girder(var/turf/target) - new /obj/structure/girder/cult(target, "cult") - -/datum/material/cult/place_dismantled_product(var/turf/target) - new /obj/effect/debris/cleanable/blood(target) - -/datum/material/cult/reinf - id = "cult_reinforced" - name = "cult2" - display_name = "human remains" - -/datum/material/cult/reinf/place_dismantled_product(var/turf/target) - new /obj/effect/decal/remains/human(target) - -/datum/material/flesh - id = "flesh" - name = "flesh" - icon_colour = "#35343a" - dooropen_noise = 'sound/effects/attackblob.ogg' - door_icon_base = "fleshclosed" - melting_point = T0C+300 - sheet_singular_name = "glob" - sheet_plural_name = "globs" - conductive = 0 - explosion_resistance = 60 - radiation_resistance = 10 - stack_origin_tech = list(TECH_MATERIAL = 8, TECH_PHORON = 4, TECH_BLUESPACE = 4, TECH_BIO = 7) - -/datum/material/flesh/can_open_material_door(var/mob/living/user) - var/mob/living/carbon/M = user - if(istype(M)) - return 1 - return 0 - -/datum/material/flesh/wall_touch_special(var/turf/simulated/wall/W, var/mob/living/L) - var/mob/living/carbon/M = L - if(istype(M) && L.mind.isholy) - to_chat(M, "\The [W] shudders under your touch, starting to become porous.") - playsound(W, 'sound/effects/attackblob.ogg', 50, 1) - if(do_after(L, 5 SECONDS)) - spawn(2) - playsound(W, 'sound/effects/attackblob.ogg', 100, 1) - W.dismantle_wall() - return 1 - return 0 - -/datum/material/bone - id = "bone" - name = "bone" - icon_colour = "#e6dfc8" - stack_type = /obj/item/stack/material/bone - icon_base = 'icons/turf/walls/stone_wall.dmi' - icon_reinf = 'icons/turf/walls/reinforced_mesh.dmi' - melting_point = T0C+300 - sheet_singular_name = "fragment" - sheet_plural_name = "fragments" - conductive = 0 - explosion_resistance = 60 - radiation_resistance = 10 - stack_origin_tech = list(TECH_MATERIAL = 8, TECH_PHORON = 4, TECH_BLUESPACE = 4, TECH_BIO = 7) - door_icon_base = "stone" - table_icon_base = "stone" - -/datum/material/bone/wall_touch_special(var/turf/simulated/wall/W, var/mob/living/L) - var/mob/living/carbon/M = L - if(istype(M) && L.mind.isholy) - to_chat(M, "\The [W] shudders under your touch, starting to become porous.") - playsound(W, 'sound/effects/attackblob.ogg', 50, 1) - if(do_after(L, 5 SECONDS)) - spawn(2) - playsound(W, 'sound/effects/attackblob.ogg', 100, 1) - W.dismantle_wall() - return 1 - return 0 - -//TODO PLACEHOLDERS: -// todo: wtf are these they need to be subtyped properly and uhh yea -/datum/material/leather - id = "leather" - name = "leather" - icon_colour = "#5C4831" - stack_type = /obj/item/stack/material/leather - stack_origin_tech = list(TECH_MATERIAL = 2) - flags = MATERIAL_PADDING - ignition_point = T0C+300 - melting_point = T0C+300 - protectiveness = 3 // 13% - conductive = 0 - -/datum/material/carpet - id = "carpet" - name = "carpet" - display_name = "comfy" - use_name = "red upholstery" - icon_colour = "#DA020A" - flags = MATERIAL_PADDING - ignition_point = T0C+232 - melting_point = T0C+300 - sheet_singular_name = "tile" - sheet_plural_name = "tiles" - protectiveness = 1 // 4% - -/datum/material/cotton - id = "cotton" - name = "cotton" - display_name ="cotton" - icon_colour = "#FFFFFF" - flags = MATERIAL_PADDING - ignition_point = T0C+232 - melting_point = T0C+300 - protectiveness = 1 // 4% - conductive = 0 - -// This all needs to be OOP'd and use inheritence if its ever used in the future. -/datum/material/cloth_teal - id = "cloth_teal" - name = "teal" - display_name ="teal" - use_name = "teal cloth" - icon_colour = "#00EAFA" - flags = MATERIAL_PADDING - ignition_point = T0C+232 - melting_point = T0C+300 - protectiveness = 1 // 4% - conductive = 0 - -/datum/material/cloth_black - id = "cloth_black" - name = "black" - display_name = "black" - use_name = "black cloth" - icon_colour = "#505050" - flags = MATERIAL_PADDING - ignition_point = T0C+232 - melting_point = T0C+300 - protectiveness = 1 // 4% - conductive = 0 - -/datum/material/cloth_green - id = "cloth_green" - name = "green" - display_name = "green" - use_name = "green cloth" - icon_colour = "#01C608" - flags = MATERIAL_PADDING - ignition_point = T0C+232 - melting_point = T0C+300 - protectiveness = 1 // 4% - conductive = 0 - -/datum/material/cloth_puple - id = "cloth_purple" - name = "purple" - display_name = "purple" - use_name = "purple cloth" - icon_colour = "#9C56C4" - flags = MATERIAL_PADDING - ignition_point = T0C+232 - melting_point = T0C+300 - protectiveness = 1 // 4% - conductive = 0 - -/datum/material/cloth_blue - id = "cloth_blue" - name = "blue" - display_name = "blue" - use_name = "blue cloth" - icon_colour = "#6B6FE3" - flags = MATERIAL_PADDING - ignition_point = T0C+232 - melting_point = T0C+300 - protectiveness = 1 // 4% - conductive = 0 - -/datum/material/cloth_beige - id = "cloth_beige" - name = "beige" - display_name = "beige" - use_name = "beige cloth" - icon_colour = "#E8E7C8" - flags = MATERIAL_PADDING - ignition_point = T0C+232 - melting_point = T0C+300 - protectiveness = 1 // 4% - conductive = 0 - -/datum/material/cloth_lime - id = "cloth_lime" - name = "lime" - display_name = "lime" - use_name = "lime cloth" - icon_colour = "#62E36C" - flags = MATERIAL_PADDING - ignition_point = T0C+232 - melting_point = T0C+300 - protectiveness = 1 // 4% - conductive = 0 - -/datum/material/toy_foam - id = "foam" - name = "foam" - display_name = "foam" - use_name = "foam" - flags = MATERIAL_PADDING - ignition_point = T0C+232 - melting_point = T0C+300 - icon_colour = "#ff9900" - hardness = 0 - weight = 0 - protectiveness = 0 // 0% - conductive = 0 - -//Vaudium products -/datum/material/bananium - id = "bananium" - name = "bananium" - stack_type = /obj/item/stack/material/bananium - integrity = 150 - conductivity = 0 // Weird rubber metal. - protectiveness = 10 // 33% - icon_colour = "#d6c100" - -/datum/material/sandstone/silencium - id = "silencium" - name = "silencium" - icon_colour = "#AAAAAA" - weight = 26 - hardness = 30 - integrity = 201 //hack to stop kitchen benches being flippable, todo: refactor into weight system - stack_type = /obj/item/stack/material/silencium - -/datum/material/brass - id = "brass" - name = "brass" - icon_colour = "#CAC955" - integrity = 150 - stack_type = /obj/item/stack/material/brass - -/datum/material/copper - id = "copper" - name = "copper" - icon_colour = "#b45c13" - weight = 15 - hardness = 30 - conductivity = 35 - stack_type = /obj/item/stack/material/copper - - -/datum/material/wax - id = "wax" - name = "wax" - stack_type = /obj/item/stack/material/wax - icon_colour = "#ebe6ac" - melting_point = T0C+300 - weight = 1 - hardness = 20 - integrity = 100 - pass_stack_colors = TRUE - -/datum/material/flesh - id = "flesh" - name = "flesh" - display_name = "chunk of flesh" - icon_colour = "#dd90aa" - sheet_singular_name = "meat" - sheet_plural_name = "meats" - integrity = 1200 - melting_point = 6000 - explosion_resistance = 200 - hardness = 500 - weight = 500 - -/datum/material/fluff //This is to allow for 2 handed weapons that don't want to have a prefix. - id = "fluff" - name = " " - display_name = "" - icon_colour = "#000000" - sheet_singular_name = "fluff" - sheet_plural_name = "fluffs" - hardness = 60 - weight = 20 //Strong as iron. - -// what the fuck? -/datum/material/darkglass - id = "glass_dark" - name = "darkglass" - display_name = "darkglass" - icon_base = "darkglass" - icon_colour = "#FFFFFF" - -// what the fuck? -/datum/material/fancyblack - id = "black_fancy" - name = "fancyblack" - display_name = "fancyblack" - icon_base = "fancyblack" - icon_colour = "#FFFFFF" diff --git a/code/modules/materials/material_sheets.dm b/code/modules/materials/material_sheets.dm index 7cb1ce93b467..b9d32de0dea6 100644 --- a/code/modules/materials/material_sheets.dm +++ b/code/modules/materials/material_sheets.dm @@ -44,7 +44,7 @@ if(!material.conductive) atom_flags |= NOCONDUCT - matter = material.get_matter() + materials = material.get_matter() update_strings() /obj/item/stack/material/get_material() diff --git a/code/modules/materials/material_synth.dm b/code/modules/materials/material_synth.dm index f5fe7f1362a8..9421547abc95 100644 --- a/code/modules/materials/material_synth.dm +++ b/code/modules/materials/material_synth.dm @@ -4,13 +4,13 @@ uses_charge = 1 charge_costs = list(1000) gender = NEUTER - matter = null // Don't shove it in the autholathe. + materials = null // Don't shove it in the autholathe. /obj/item/stack/material/cyborg/Initialize(mapload, new_amount, merge) . = ..() name = "[material.display_name] synthesiser" desc = "A device that synthesises [material.display_name]." - matter = null + materials = null /obj/item/stack/material/cyborg/update_strings() return diff --git a/code/modules/mining/drilling/scanner.dm b/code/modules/mining/drilling/scanner.dm index b56df3dfd094..7cc2385854a9 100644 --- a/code/modules/mining/drilling/scanner.dm +++ b/code/modules/mining/drilling/scanner.dm @@ -5,7 +5,7 @@ icon_state = "forensic0-old" //GET A BETTER SPRITE. item_state = "electronic" origin_tech = list(TECH_MAGNET = 1, TECH_ENGINEERING = 1) - matter = list(MAT_STEEL = 150) + materials = list(MAT_STEEL = 150) var/scanrange = 2 var/maxscanrange = 2 var/scan_time = 3 SECONDS @@ -97,7 +97,7 @@ icon_state = "mining-scanner" //thank you eris spriters w_class = ITEMSIZE_SMALL origin_tech = list(TECH_MAGNET = 4, TECH_ENGINEERING = 4) - matter = list(MAT_STEEL = 2000, MAT_GLASS = 1000) + materials = list(MAT_STEEL = 2000, MAT_GLASS = 1000) scanrange = 5 maxscanrange = 5 scan_time = 1 SECONDS diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index 09ded5fcaed8..b3d1096c2000 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -20,7 +20,7 @@ icon_state = "pickaxe" item_state = "jackhammer" w_class = ITEMSIZE_LARGE - matter = list(MAT_STEEL = 3750) + materials = list(MAT_STEEL = 3750) var/digspeed = 40 //moving the delay to an item var so R&D can make improved picks. --NEO var/sand_dig = FALSE origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINEERING = 1) @@ -128,7 +128,7 @@ icon_state = "icepick" item_state = "spickaxe" //im lazy fuck u w_class = ITEMSIZE_SMALL - matter = list(MAT_STEEL = 2750, MAT_TITANIUM = 2000) + materials = list(MAT_STEEL = 2750, MAT_TITANIUM = 2000) digspeed = 25 //More expensive than a diamond pick, a lot smaller but decently slower. origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINEERING = 1) attack_verb = list("mined", "pierced", "stabbed", "attacked") @@ -274,7 +274,7 @@ item_state = "shovel" w_class = ITEMSIZE_NORMAL origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINEERING = 1) - matter = list(MAT_STEEL = 50) + materials = list(MAT_STEEL = 50) attack_verb = list("bashed", "bludgeoned", "thrashed", "whacked") sharp = 0 edge = 1 diff --git a/code/modules/mob/living/silicon/robot/analyzer.dm b/code/modules/mob/living/silicon/robot/analyzer.dm index f8e8e52ae918..abfef33fe093 100644 --- a/code/modules/mob/living/silicon/robot/analyzer.dm +++ b/code/modules/mob/living/silicon/robot/analyzer.dm @@ -13,7 +13,7 @@ throw_speed = 5 throw_range = 10 origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 1, TECH_ENGINEERING = 2) - matter = list(MAT_STEEL = 500, MAT_GLASS = 200) + materials = list(MAT_STEEL = 500, MAT_GLASS = 200) var/mode = 1; /obj/item/robotanalyzer/attack_mob(mob/target, mob/user, clickchain_flags, list/params, mult, target_zone, intent) diff --git a/code/modules/mob/living/silicon/robot/component.dm b/code/modules/mob/living/silicon/robot/component.dm index 32458fd058a3..0f43db9d1632 100644 --- a/code/modules/mob/living/silicon/robot/component.dm +++ b/code/modules/mob/living/silicon/robot/component.dm @@ -208,7 +208,7 @@ name = "broken component" icon = 'icons/obj/robot_component.dmi' icon_state = "broken" - matter = list(MAT_STEEL = 1000) + materials = list(MAT_STEEL = 1000) /obj/item/broken_device/random var/static/list/possible_icons = list("binradio_broken", diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm index 00bf8011e03e..cdc94e169f22 100644 --- a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm +++ b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm @@ -598,9 +598,9 @@ drain(-50 * digested) if(volume) water.add_charge(volume) - if(recycles && T.matter) - for(var/material in T.matter) - var/total_material = T.matter[material] + if(recycles && T.materials) + for(var/material in T.materials) + var/total_material = T.materials[material] if(istype(T,/obj/item/stack)) var/obj/item/stack/stack = T total_material *= stack.get_amount() @@ -672,7 +672,7 @@ /obj/item/dogborg/sleeper/compactor/decompiler name = "Matter Decompiler" - desc = "A mounted matter decompiling unit with fuel processor." + desc = "A mounted materials decompiling unit with fuel processor." icon_state = "decompiler" max_item_count = 10 decompiler = TRUE diff --git a/code/modules/modular_computers/hardware/battery_module.dm b/code/modules/modular_computers/hardware/battery_module.dm index 73421c7a9ccd..d5e053550366 100644 --- a/code/modules/modular_computers/hardware/battery_module.dm +++ b/code/modules/modular_computers/hardware/battery_module.dm @@ -70,7 +70,8 @@ return ..() /obj/item/computer_hardware/battery_module/Destroy() - QDEL_NULL(battery) + if(!isnull(battery) && !ispath(battery)) + QDEL_NULL(battery) return ..() /obj/item/computer_hardware/battery_module/proc/charge_to_full() diff --git a/code/modules/modular_computers/hardware/network_card.dm b/code/modules/modular_computers/hardware/network_card.dm index df92dcad4c49..5b48fb8d1bd7 100644 --- a/code/modules/modular_computers/hardware/network_card.dm +++ b/code/modules/modular_computers/hardware/network_card.dm @@ -111,8 +111,3 @@ var/global/ntnet_card_uid = 1 return 1 return 0 // Computer is not on station and does not have upgraded network card. No signal. - -/obj/item/computer_hardware/network_card/Destroy() - if(holder2 && (holder2.network_card == src)) - holder2.network_card = null - ..() diff --git a/code/modules/organs/subtypes/nano.dm b/code/modules/organs/subtypes/nano.dm index 9fcb38f9410e..02cdd22195e2 100644 --- a/code/modules/organs/subtypes/nano.dm +++ b/code/modules/organs/subtypes/nano.dm @@ -108,23 +108,23 @@ organ_tag = O_FACT parent_organ = BP_TORSO - var/list/materials = list(MAT_STEEL = 0) + var/list/stored_materials = list(MAT_STEEL = 0) var/max_storage = 10000 var/processingbuffs = FALSE /obj/item/organ/internal/nano/refactory/proc/get_stored_material(var/material) if(status & ORGAN_DEAD) return 0 - return materials[material] || 0 + return stored_materials[material] || 0 /obj/item/organ/internal/nano/refactory/proc/add_stored_material(var/material,var/amt) if(status & ORGAN_DEAD) return 0 - var/increase = min(amt,max(max_storage-materials[material],0)) - if(isnum(materials[material])) - materials[material] += increase + var/increase = min(amt,max(max_storage-stored_materials[material],0)) + if(isnum(stored_materials[material])) + stored_materials[material] += increase else - materials[material] = increase + stored_materials[material] = increase return increase @@ -132,15 +132,15 @@ if(status & ORGAN_DEAD) return 0 - var/available = materials[material] + var/available = stored_materials[material] //Success if(available >= amt) var/new_amt = available-amt if(new_amt == 0) - materials -= material + stored_materials -= material else - materials[material] = new_amt + stored_materials[material] = new_amt return amt //Failure diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index dc34db77f48b..6a6bcf21ee32 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -24,7 +24,7 @@ w_class = ITEMSIZE_TINY throw_speed = 7 throw_range = 15 - matter = list(MAT_STEEL = 10) + materials = list(MAT_STEEL = 10) var/colour = "black" //what colour the ink is! pressure_resistance = 2 drop_sound = 'sound/items/drop/accessory.ogg' @@ -362,4 +362,4 @@ name = "charcoal stick" desc = "Carefully burnt carbon, compacted and held together with a binding agent. One of the oldest common implements for writing across the galaxy." icon_state = "charcoal" - matter = list(MAT_CARBON = 10) + materials = list(MAT_CARBON = 10) diff --git a/code/modules/paperwork/stamps.dm b/code/modules/paperwork/stamps.dm index f23821c92c2a..56f7204055e8 100644 --- a/code/modules/paperwork/stamps.dm +++ b/code/modules/paperwork/stamps.dm @@ -9,7 +9,7 @@ slot_flags = SLOT_HOLSTER throw_speed = 7 throw_range = 15 - matter = list(MAT_STEEL = 60) + materials = list(MAT_STEEL = 60) pressure_resistance = 2 attack_verb = list("stamped") diff --git a/code/modules/photography/camera.dm b/code/modules/photography/camera.dm index c40ae00373b5..c20953a79a1a 100644 --- a/code/modules/photography/camera.dm +++ b/code/modules/photography/camera.dm @@ -10,7 +10,7 @@ item_flags = ITEM_NOBLUDGEON w_class = ITEMSIZE_SMALL slot_flags = SLOT_BELT - matter = list(MAT_STEEL = 2000) + materials = list(MAT_STEEL = 2000) var/pictures_max = 10 var/pictures_left = 10 var/on = 1 diff --git a/code/modules/power/antimatter/shielding.dm b/code/modules/power/antimatter/shielding.dm index be64a6b7476a..ee4a91d1962d 100644 --- a/code/modules/power/antimatter/shielding.dm +++ b/code/modules/power/antimatter/shielding.dm @@ -197,7 +197,7 @@ throw_force = 5 throw_speed = 1 throw_range = 2 - matter = list(MAT_STEEL = 100) + materials = list(MAT_STEEL = 100) /obj/item/am_shielding_container/attackby(var/obj/item/I, var/mob/user) if(istype(I, /obj/item/multitool) && istype(src.loc,/turf)) diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 4999c5fc79a2..1093169419b5 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -535,7 +535,7 @@ GLOBAL_LIST_INIT(possible_cable_coil_colours, list( w_class = ITEMSIZE_SMALL throw_speed = 2 throw_range = 5 - matter = list(MAT_STEEL = 50, MAT_GLASS = 20) + materials = list(MAT_STEEL = 50, MAT_GLASS = 20) slot_flags = SLOT_BELT item_state = "coil" attack_verb = list("whipped", "lashed", "disciplined", "flogged") @@ -547,7 +547,7 @@ GLOBAL_LIST_INIT(possible_cable_coil_colours, list( name = "cable coil synthesizer" desc = "A device that makes cable." gender = NEUTER - matter = null + materials = null uses_charge = 1 charge_costs = list(1) @@ -966,7 +966,7 @@ GLOBAL_LIST_INIT(possible_cable_coil_colours, list( w_class = ITEMSIZE_SMALL throw_speed = 2 throw_range = 5 - matter = list(MAT_STEEL = 50, MAT_GLASS = 20) + materials = list(MAT_STEEL = 50, MAT_GLASS = 20) slot_flags = SLOT_BELT attack_verb = list("whipped", "lashed", "disciplined", "flogged") stacktype = null diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index 3fe3e96ff304..7803d3581ac1 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -24,7 +24,7 @@ var/charge_amount = 25 // How much power to give, if self_recharge is true. The number is in absolute cell charge, as it gets divided by CELLRATE later. var/last_use = 0 // A tracker for use in self-charging var/charge_delay = 0 // How long it takes for the cell to start recharging after last use - matter = list(MAT_STEEL = 700, MAT_GLASS = 50) + materials = list(MAT_STEEL = 700, MAT_GLASS = 50) // Overlay stuff. var/overlay_half_state = "cell-o1" // Overlay used when not fully charged but not empty. diff --git a/code/modules/power/cells/device_cells.dm b/code/modules/power/cells/device_cells.dm index 6fa5710e2e14..324509f5d6d5 100644 --- a/code/modules/power/cells/device_cells.dm +++ b/code/modules/power/cells/device_cells.dm @@ -10,7 +10,7 @@ throw_range = 7 maxcharge = 480 charge_amount = 5 - matter = list("metal" = 350, MAT_GLASS = 50) + materials = list("metal" = 350, MAT_GLASS = 50) preserve_item = 1 /obj/item/cell/device/empty diff --git a/code/modules/power/cells/power_cells.dm b/code/modules/power/cells/power_cells.dm index 5d46d3c57140..a864b6881f56 100644 --- a/code/modules/power/cells/power_cells.dm +++ b/code/modules/power/cells/power_cells.dm @@ -3,7 +3,7 @@ desc = "You can't top the plasma top." //TOTALLY TRADEMARK INFRINGEMENT origin_tech = list(TECH_POWER = 0) maxcharge = 500 - matter = list(MAT_STEEL = 700, MAT_GLASS = 40) + materials = list(MAT_STEEL = 700, MAT_GLASS = 40) /obj/item/cell/crap/empty charge = 0 @@ -12,7 +12,7 @@ name = "security borg rechargable D battery" origin_tech = list(TECH_POWER = 0) maxcharge = 600 //600 max charge / 100 charge per shot = six shots - matter = list(MAT_STEEL = 700, MAT_GLASS = 40) + materials = list(MAT_STEEL = 700, MAT_GLASS = 40) /obj/item/cell/secborg/empty charge = 0 @@ -21,14 +21,14 @@ name = "heavy-duty power cell" origin_tech = list(TECH_POWER = 1) maxcharge = 5000 - matter = list(MAT_STEEL = 700, MAT_GLASS = 50) + materials = list(MAT_STEEL = 700, MAT_GLASS = 50) /obj/item/cell/high name = "high-capacity power cell" origin_tech = list(TECH_POWER = 2) icon_state = "hcell" maxcharge = 10000 - matter = list(MAT_STEEL = 700, MAT_GLASS = 60) + materials = list(MAT_STEEL = 700, MAT_GLASS = 60) /obj/item/cell/high/empty charge = 0 @@ -38,7 +38,7 @@ origin_tech = list(TECH_POWER = 5) icon_state = "scell" maxcharge = 20000 - matter = list(MAT_STEEL = 700, MAT_GLASS = 70) + materials = list(MAT_STEEL = 700, MAT_GLASS = 70) /obj/item/cell/super/empty charge = 0 @@ -48,7 +48,7 @@ origin_tech = list(TECH_POWER = 6) icon_state = "hpcell" maxcharge = 30000 - matter = list(MAT_STEEL = 700, MAT_GLASS = 80) + materials = list(MAT_STEEL = 700, MAT_GLASS = 80) /obj/item/cell/hyper/empty charge = 0 @@ -58,7 +58,7 @@ icon_state = "icell" origin_tech = null maxcharge = 30000 //determines how badly mobs get shocked - matter = list(MAT_STEEL = 700, MAT_GLASS = 80) + materials = list(MAT_STEEL = 700, MAT_GLASS = 80) /obj/item/cell/infinite/check_charge() return 1 @@ -84,7 +84,7 @@ icon_state = "yellow slime extract" //"potato_battery" description_info = "This 'cell' holds a max charge of 10k and self recharges over time." maxcharge = 10000 - matter = null + materials = null self_recharge = TRUE charge_amount = 750 @@ -132,7 +132,7 @@ name = "miniature power cell" desc = "A tiny power cell with a very low power capacity. Used in light fixtures to power them in the event of an outage." maxcharge = 120 //Emergency lights use 0.2 W per tick, meaning ~10 minutes of emergency power from a cell - matter = list(MAT_GLASS = 20) + materials = list(MAT_GLASS = 20) w_class = ITEMSIZE_TINY /obj/item/cell/emergency_light/Initialize(mapload) diff --git a/code/modules/power/fusion/fusion_circuits.dm b/code/modules/power/fusion/fusion_circuits.dm index 998dbb33aad3..e37ea5d05026 100644 --- a/code/modules/power/fusion/fusion_circuits.dm +++ b/code/modules/power/fusion/fusion_circuits.dm @@ -65,35 +65,29 @@ name = "fusion core control console" id = "fusion_core_control" build_path = /obj/item/circuitboard/fusion_core_control - sort_string = "LAAAD" req_tech = list(TECH_POWER = 3, TECH_ENGINEERING = 3, TECH_MATERIAL = 3) /datum/design/circuit/fusion/fuel_compressor name = "fusion fuel compressor" id = "fusion_fuel_compressor" build_path = /obj/item/circuitboard/fusion_fuel_compressor - sort_string = "LAAAE" /datum/design/circuit/fusion/fuel_control name = "fusion fuel control console" id = "fusion_fuel_control" build_path = /obj/item/circuitboard/fusion_fuel_control - sort_string = "LAAAF" /datum/design/circuit/fusion/gyrotron_control name = "gyrotron control console" id = "gyrotron_control" build_path = /obj/item/circuitboard/gyrotron_control - sort_string = "LAAAG" /datum/design/circuit/fusion/core name = "fusion core" id = "fusion_core" build_path = /obj/item/circuitboard/fusion_core - sort_string = "LAAAH" /datum/design/circuit/fusion/injector name = "fusion fuel injector" id = "fusion_injector" build_path = /obj/item/circuitboard/fusion_injector - sort_string = "LAAAI" diff --git a/code/modules/power/lighting/lights.dm b/code/modules/power/lighting/lights.dm index b68f13d404f4..e96678b18a23 100644 --- a/code/modules/power/lighting/lights.dm +++ b/code/modules/power/lighting/lights.dm @@ -8,7 +8,7 @@ damage_force = 2 throw_force = 5 w_class = ITEMSIZE_TINY - matter = list(MAT_STEEL = 60) + materials = list(MAT_STEEL = 60) drop_sound = 'sound/items/drop/glass.ogg' pickup_sound = 'sound/items/pickup/glass.ogg' @@ -35,7 +35,7 @@ icon_state = "ltube" base_icon_state = "ltube" item_state = "c_tube" - matter = list(MAT_GLASS = 100) + materials = list(MAT_GLASS = 100) brightness_range = 8 brightness_power = 0.8 brightness_color = LIGHT_COLOR_HALOGEN @@ -103,7 +103,7 @@ icon_state = "lbulb" base_icon_state = "lbulb" item_state = "contvapour" - matter = list(MAT_GLASS = 100) + materials = list(MAT_GLASS = 100) brightness_color = LIGHT_COLOR_TUNGSTEN brightness_range = 4 @@ -117,7 +117,7 @@ icon_state = "lbulb" base_icon_state = "lbulb" item_state = "contvapour" - matter = list(MAT_GLASS = 100) + materials = list(MAT_GLASS = 100) brightness_color = LIGHT_COLOR_TUNGSTEN brightness_range = 8 @@ -184,7 +184,7 @@ icon_state = "fbulb" base_icon_state = "fbulb" item_state = "egg4" - matter = list(MAT_GLASS = 100) + materials = list(MAT_GLASS = 100) /// Fairylights /obj/item/light/bulb/fairy @@ -192,7 +192,7 @@ desc = "A tiny replacement light bulb." icon_state = "fbulb" base_icon_state = "fbulb" - matter = list(MAT_GLASS = 10) + materials = list(MAT_GLASS = 10) brightness_range = 5 // update the icon state and description of the light diff --git a/code/modules/power/tesla/telsa_construction.dm b/code/modules/power/tesla/telsa_construction.dm index ab29a5ac606c..877276dc0227 100644 --- a/code/modules/power/tesla/telsa_construction.dm +++ b/code/modules/power/tesla/telsa_construction.dm @@ -1,8 +1,3 @@ -////////////////////////// -// Circuits and Research -////////////////////////// - -// Tesla coils are built as machines using a circuit researchable in RnD /obj/item/circuitboard/tesla_coil name = T_BOARD("tesla coil") build_path = /obj/machinery/power/tesla_coil @@ -13,19 +8,20 @@ /datum/design/circuit/tesla_coil name = "Machine Design (Tesla Coil Board)" desc = "The circuit board for a tesla coil." - id = "tesla_coil" + id = "CircuitTeslaCoil" build_path = /obj/item/circuitboard/tesla_coil req_tech = list(TECH_MAGNET = 2, TECH_POWER = 4) - sort_string = "MAAAC" -// Grounding rods can be built as machines using a circuit made in an autolathe. /obj/item/circuitboard/grounding_rod name = T_BOARD("grounding rod") build_path = /obj/machinery/power/grounding_rod board_type = new /datum/frame/frame_types/machine - matter = list(MAT_STEEL = 50, MAT_GLASS = 50) + materials = list(MAT_STEEL = 50, MAT_GLASS = 50) req_components = list() -/datum/category_item/autolathe/engineering/grounding_rod - name = "grounding rod electronics" - path = /obj/item/circuitboard/grounding_rod +/datum/design/circuit/grounding_rod + name = "Machine Design (Grounding Rod)" + desc = "The circuit board for a grounding rod." + id = "CircuitGroundingRod" + build_path = /obj/item/circuitboard/grounding_rod + req_tech = list(TECH_MAGNET = 2, TECH_POWER = 2) diff --git a/code/modules/projectiles/ammunition/ammo_casing.dm b/code/modules/projectiles/ammunition/ammo_casing.dm index 50954b51e83f..af3afd358323 100644 --- a/code/modules/projectiles/ammunition/ammo_casing.dm +++ b/code/modules/projectiles/ammunition/ammo_casing.dm @@ -4,6 +4,7 @@ icon = 'icons/obj/ammo.dmi' icon_state = "s-casing" slot_flags = SLOT_BELT | SLOT_EARS + item_flags = ITEM_EASY_LATHE_DECONSTRUCT throw_force = 1 w_class = ITEMSIZE_TINY preserve_item = 1 diff --git a/code/modules/projectiles/ammunition/rounds.dm b/code/modules/projectiles/ammunition/rounds.dm index 4a822772fee1..29a059610eca 100644 --- a/code/modules/projectiles/ammunition/rounds.dm +++ b/code/modules/projectiles/ammunition/rounds.dm @@ -27,14 +27,14 @@ desc = "A .357 bullet casing." caliber = ".357" projectile_type = /obj/projectile/bullet/pistol/strong - matter = list(MAT_STEEL = 210) + materials = list(MAT_STEEL = 210) /obj/item/ammo_casing/a357/silver desc = "A .357 silver bullet casing. Bless and Sancitfied to banish otherworlds entities." caliber = ".357" icon_state = "ag-casing" projectile_type = /obj/projectile/bullet/pistol/strong - matter = list(MAT_STEEL = 350, MAT_SILVER = 200) + materials = list(MAT_STEEL = 350, MAT_SILVER = 200) /* * .38 @@ -44,7 +44,7 @@ desc = "A .38 bullet casing." caliber = ".38" projectile_type = /obj/projectile/bullet/pistol - matter = list(MAT_STEEL = 60) + materials = list(MAT_STEEL = 60) /obj/item/ammo_casing/a38/rubber desc = "A .38 rubber bullet casing." @@ -56,13 +56,13 @@ desc = "A .38 bullet casing fitted with a single-use ion pulse generator." icon_state = "empcasing" projectile_type = /obj/projectile/ion/small - matter = list(MAT_STEEL = 130, MAT_URANIUM = 100) + materials = list(MAT_STEEL = 130, MAT_URANIUM = 100) /obj/item/ammo_casing/a38/silver desc = "A .38 silver bullet casing. Bless and Sancitfied to banish otherworlds entities." icon_state = "ag-casing" projectile_type = /obj/projectile/bullet/pistol/silver - matter = list(MAT_STEEL = 130, MAT_SILVER = 100) + materials = list(MAT_STEEL = 130, MAT_SILVER = 100) /* @@ -73,19 +73,19 @@ desc = "A .44 bullet casing." caliber = ".44" projectile_type = /obj/projectile/bullet/pistol/strong - matter = list(MAT_STEEL = 210) + materials = list(MAT_STEEL = 210) /obj/item/ammo_casing/a44/rubber icon_state = "r-casing" desc = "A .44 rubber bullet casing." projectile_type = /obj/projectile/bullet/pistol/rubber/strong - matter = list(MAT_STEEL = 60) + materials = list(MAT_STEEL = 60) /obj/item/ammo_casing/a44/silver desc = "A .44 silver bullet casing. Bless and Sancitfied to banish otherworlds entities." icon_state = "ag_casing" projectile_type = /obj/projectile/bullet/pistol/strong/silver - matter = list(MAT_STEEL = 350, MAT_SILVER = 200) + materials = list(MAT_STEEL = 350, MAT_SILVER = 200) /* * .75 (aka Gyrojet Rockets, aka admin abuse) @@ -95,7 +95,7 @@ desc = "A .75 gyrojet rocket sheathe." caliber = ".75" projectile_type = /obj/projectile/bullet/gyro - matter = list(MAT_STEEL = 4000) + materials = list(MAT_STEEL = 4000) /* * 9mm @@ -105,12 +105,12 @@ desc = "A 9mm bullet casing." caliber = "9mm" projectile_type = /obj/projectile/bullet/pistol - matter = list(MAT_STEEL = 60) + materials = list(MAT_STEEL = 60) /obj/item/ammo_casing/a9mm/ap desc = "A 9mm armor-piercing bullet casing." projectile_type = /obj/projectile/bullet/pistol/ap - matter = list(MAT_STEEL = 80) + materials = list(MAT_STEEL = 80) /obj/item/ammo_casing/a9mm/hp desc = "A 9mm hollow-point bullet casing." @@ -119,7 +119,7 @@ /obj/item/ammo_casing/a9mm/hunter desc = "A 9mm hunting bullet casing." projectile_type = /obj/projectile/bullet/pistol/hunter - matter = list(MAT_STEEL = 80) + materials = list(MAT_STEEL = 80) /obj/item/ammo_casing/a9mm/flash desc = "A 9mm flash shell casing." @@ -140,7 +140,7 @@ desc = "A 9mm silver bullet casing. Bless and Sancitfied to banish otherworlds entities." icon_state = "ag-casing" projectile_type = /obj/projectile/bullet/pistol/silver - matter = list(MAT_STEEL = 130, MAT_SILVER = 100) + materials = list(MAT_STEEL = 130, MAT_SILVER = 100) /* * 5.7 @@ -149,22 +149,22 @@ desc = "A 5.7x28mm bullet casing." caliber = "5.7x28mm" projectile_type = /obj/projectile/bullet/pistol/lap - matter = list(MAT_STEEL = 30, MAT_COPPER = 30) + materials = list(MAT_STEEL = 30, MAT_COPPER = 30) /obj/item/ammo_casing/a57x28mm/ap desc = "A 5.7x28mm armor-piercing bullet casing." projectile_type = /obj/projectile/bullet/pistol/ap - matter = list(MAT_STEEL = 80, MAT_COPPER = 30) + materials = list(MAT_STEEL = 80, MAT_COPPER = 30) /obj/item/ammo_casing/a57x28mm/hp desc = "A 5.7x28mm hollow-point bullet casing." projectile_type = /obj/projectile/bullet/pistol/hp - matter = list(MAT_STEEL = 60, MAT_COPPER = 30) + materials = list(MAT_STEEL = 60, MAT_COPPER = 30) /obj/item/ammo_casing/a57x28mm/hunter desc = "A 5.7x28mm hunting bullet casing." projectile_type = /obj/projectile/bullet/pistol/hunter - matter = list(MAT_STEEL = 30, MAT_COPPER = 50) + materials = list(MAT_STEEL = 30, MAT_COPPER = 50) /* * .45 @@ -174,7 +174,7 @@ desc = "A .45 bullet casing." caliber = ".45" projectile_type = /obj/projectile/bullet/pistol/medium - matter = list(MAT_STEEL = 75) + materials = list(MAT_STEEL = 75) /obj/item/ammo_casing/a45/ap desc = "A .45 Armor-Piercing bullet casing." @@ -184,32 +184,32 @@ /obj/item/ammo_casing/a45/hunter desc = "A .45 hunting bullet casing." projectile_type = /obj/projectile/bullet/pistol/medium/hunter - matter = list(MAT_STEEL = 75) + materials = list(MAT_STEEL = 75) /obj/item/ammo_casing/a45/practice desc = "A .45 practice bullet casing." icon_state = "r-casing" projectile_type = /obj/projectile/bullet/practice - matter = list(MAT_STEEL = 60) + materials = list(MAT_STEEL = 60) /obj/item/ammo_casing/a45/rubber desc = "A .45 rubber bullet casing." icon_state = "r-casing" projectile_type = /obj/projectile/bullet/pistol/rubber - matter = list(MAT_STEEL = 60) + materials = list(MAT_STEEL = 60) /obj/item/ammo_casing/a45/flash desc = "A .45 flash shell casing." icon_state = "r-casing" projectile_type = /obj/projectile/energy/flash - matter = list(MAT_STEEL = 60) + materials = list(MAT_STEEL = 60) /obj/item/ammo_casing/a45/emp name = ".45 haywire round" desc = "A .45 bullet casing fitted with a single-use ion pulse generator." projectile_type = /obj/projectile/ion/small icon_state = "empcasing" - matter = list(MAT_STEEL = 130, MAT_URANIUM = 100) + materials = list(MAT_STEEL = 130, MAT_URANIUM = 100) /obj/item/ammo_casing/a45/hp desc = "A .45 hollow-point bullet casing." @@ -220,7 +220,7 @@ desc = "A .45 silver bullet casing. Bless and Sancitfied to banish otherworlds entities." icon_state = "ag-casing" projectile_type = /obj/projectile/bullet/pistol/silver - matter = list(MAT_STEEL = 130, MAT_SILVER = 100) + materials = list(MAT_STEEL = 130, MAT_SILVER = 100) /* @@ -231,14 +231,14 @@ desc = "A 10mm bullet casing." caliber = "10mm" projectile_type = /obj/projectile/bullet/pistol/medium - matter = list(MAT_STEEL = 75) + materials = list(MAT_STEEL = 75) /obj/item/ammo_casing/a10mm/emp name = "10mm haywire round" desc = "A 10mm bullet casing fitted with a single-use ion pulse generator." projectile_type = /obj/projectile/ion/small icon_state = "empcasing" - matter = list(MAT_STEEL = 130, MAT_URANIUM = 100) + materials = list(MAT_STEEL = 130, MAT_URANIUM = 100) /* * 12g (aka shotgun ammo) @@ -250,7 +250,7 @@ icon_state = "slshell" caliber = "12g" projectile_type = /obj/projectile/bullet/shotgun - matter = list(MAT_STEEL = 360) + materials = list(MAT_STEEL = 360) fall_sounds = list('sound/weapons/guns/shotgun_fall.ogg') /obj/item/ammo_casing/a12g/pellet @@ -264,28 +264,28 @@ desc = "A blank shell." icon_state = "blshell" projectile_type = /obj/projectile/bullet/blank - matter = list(MAT_STEEL = 90) + materials = list(MAT_STEEL = 90) /obj/item/ammo_casing/a12g/practice name = "shotgun shell" desc = "A practice shell." icon_state = "pshell" projectile_type = /obj/projectile/bullet/practice - matter = list(MAT_STEEL = 90) + materials = list(MAT_STEEL = 90) /obj/item/ammo_casing/a12g/beanbag name = "beanbag shell" desc = "A beanbag shell." icon_state = "bshell" projectile_type = /obj/projectile/bullet/shotgun/beanbag - matter = list(MAT_STEEL = 180) + materials = list(MAT_STEEL = 180) /obj/item/ammo_casing/a12g/improvised name = "improvised shell" desc = "An extremely weak shotgun shell with multiple small pellets made out of metal shards." icon_state = "improvshell" projectile_type = /obj/projectile/bullet/pellet/shotgun_improvised - matter = list(MAT_STEEL = 500, MAT_GLASS = 200) + materials = list(MAT_STEEL = 500, MAT_GLASS = 200) //Can stun in one hit if aimed at the head, but //is blocked by clothing that stops tasers and is vulnerable to EMP @@ -294,7 +294,7 @@ desc = "A 12 gauge taser cartridge." icon_state = "stunshell" projectile_type = /obj/projectile/energy/electrode/stunshot - matter = list(MAT_STEEL = 360, MAT_GLASS = 720) + materials = list(MAT_STEEL = 360, MAT_GLASS = 720) //Does not stun, only blinds, but has area of effect. /obj/item/ammo_casing/a12g/flare @@ -302,7 +302,7 @@ desc = "A chemical shell used to signal distress or provide illumination." icon_state = "fshell" projectile_type = /obj/projectile/energy/flash/flare - matter = list(MAT_STEEL = 90, MAT_GLASS = 90) + materials = list(MAT_STEEL = 90, MAT_GLASS = 90) //Silver 12g /obj/item/ammo_casing/a12g/silver @@ -311,7 +311,7 @@ icon_state = "agshell" caliber = "12g" projectile_type = /obj/projectile/bullet/pellet/shotgun/silver - matter = list(MAT_STEEL = 360, MAT_SILVER = 240) + materials = list(MAT_STEEL = 360, MAT_SILVER = 240) //Wooden Stake 12g /obj/item/ammo_casing/a12g/stake @@ -320,7 +320,7 @@ icon_state = "agshell" caliber = "12g" projectile_type = /obj/projectile/bullet/shotgun/stake - matter = list(MAT_STEEL = 500) + materials = list(MAT_STEEL = 500) //Techshell & Derivatives /obj/item/ammo_casing/a12g/techshell @@ -329,14 +329,14 @@ icon_state = "cshell" caliber = "12g" projectile_type = null - matter = list(MAT_STEEL = 500, MAT_PHORON = 200) + materials = list(MAT_STEEL = 500, MAT_PHORON = 200) /obj/item/ammo_casing/a12g/techshell/meteorslug name = "meteorslug shell" desc = "A shotgun shell rigged with CMC technology, which launches a massive slug when fired." icon_state = "mshell" projectile_type = /obj/projectile/meteor/slug - matter = list(MAT_STEEL = 500, MAT_GOLD = 200) + materials = list(MAT_STEEL = 500, MAT_GOLD = 200) /obj/item/ammo_casing/a12g/techshell/emp name = "ion shell" @@ -344,7 +344,7 @@ icon_state = "empshell" projectile_type = /obj/projectile/scatter/ion // projectile_type = /obj/projectile/bullet/shotgun/ion - matter = list(MAT_STEEL = 360, MAT_URANIUM = 240) + materials = list(MAT_STEEL = 360, MAT_URANIUM = 240) /obj/item/ammo_casing/a12g/techshell/pulseslug name = "pulse slug" @@ -353,7 +353,7 @@ would have difficulty with." icon_state = "plshell" projectile_type = /obj/projectile/beam/pulse/shotgun - matter = list(MAT_STEEL = 500, MAT_SILVER = 200) + materials = list(MAT_STEEL = 500, MAT_SILVER = 200) /obj/item/ammo_casing/a12g/techshell/dragonsbreath name = "dragonsbreath shell" @@ -366,14 +366,14 @@ desc = "A high explosive breaching round for a 12 gauge shotgun." icon_state = "heshell" projectile_type = /obj/projectile/bullet/shotgun/frag12 - matter = list(MAT_STEEL = 500, MAT_PHORON = 200) + materials = list(MAT_STEEL = 500, MAT_PHORON = 200) /obj/item/ammo_casing/a12g/techshell/laserslug name = "scatter laser shell" desc = "An advanced shotgun shell that uses a micro laser to replicate the effects of a scatter laser weapon in a ballistic package." icon_state = "lshell" projectile_type = /obj/projectile/scatter/laser - matter = list(MAT_STEEL = 500, MAT_GLASS = 200) + materials = list(MAT_STEEL = 500, MAT_GLASS = 200) /* * 7.62mm @@ -384,23 +384,23 @@ caliber = "7.62mm" icon_state = "rifle-casing" projectile_type = /obj/projectile/bullet/rifle/a762 - matter = list(MAT_STEEL = 200) + materials = list(MAT_STEEL = 200) /obj/item/ammo_casing/a762/ap desc = "A 7.62mm armor-piercing bullet casing." projectile_type = /obj/projectile/bullet/rifle/a762/ap - matter = list(MAT_STEEL = 300) + materials = list(MAT_STEEL = 300) /obj/item/ammo_casing/a762/practice desc = "A 7.62mm practice bullet casing." icon_state = "rifle-casing" // Need to make an icon for these projectile_type = /obj/projectile/bullet/practice - matter = list(MAT_STEEL = 90) + materials = list(MAT_STEEL = 90) /obj/item/ammo_casing/a762/blank desc = "A blank 7.62mm bullet casing." projectile_type = /obj/projectile/bullet/blank - matter = list(MAT_STEEL = 90) + materials = list(MAT_STEEL = 90) /obj/item/ammo_casing/a762/hp desc = "A 7.62mm hollow-point bullet casing." @@ -422,7 +422,7 @@ desc = "A 7.62mm hunting bullet casing. Bless and Sancitfied to banish otherworlds entities." icon_state = "agrifle-casing" projectile_type = /obj/projectile/bullet/rifle/a762/silver - matter = list(MAT_STEEL = 300, MAT_SILVER = 150) + materials = list(MAT_STEEL = 300, MAT_SILVER = 150) /* * 14.5mm (anti-materiel rifle round) @@ -433,7 +433,7 @@ icon_state = "lcasing" caliber = "14.5mm" projectile_type = /obj/projectile/bullet/rifle/a145 - matter = list(MAT_STEEL = 1250) + materials = list(MAT_STEEL = 1250) /* * 5.45mm @@ -444,23 +444,23 @@ caliber = "5.45mm" icon_state = "rifle-casing" projectile_type = /obj/projectile/bullet/rifle/a545 - matter = list(MAT_STEEL = 180) + materials = list(MAT_STEEL = 180) /obj/item/ammo_casing/a545/ap desc = "A 5.45mm armor-piercing bullet casing." projectile_type = /obj/projectile/bullet/rifle/a545/ap - matter = list(MAT_STEEL = 270) + materials = list(MAT_STEEL = 270) /obj/item/ammo_casing/a545/practice desc = "A 5.45mm practice bullet casing." icon_state = "rifle-casing" // Need to make an icon for these projectile_type = /obj/projectile/bullet/practice - matter = list(MAT_STEEL = 90) + materials = list(MAT_STEEL = 90) /obj/item/ammo_casing/a545/blank desc = "A blank 5.45mm bullet casing." projectile_type = /obj/projectile/bullet/blank - matter = list(MAT_STEEL = 90) + materials = list(MAT_STEEL = 90) /obj/item/ammo_casing/a545/hp desc = "A 5.45mm hollow-point bullet casing." @@ -479,7 +479,7 @@ caliber = "10mmCL" icon_state = "casing" projectile_type = /obj/projectile/bullet/pistol/medium - matter = list(MAT_STEEL = 180) + materials = list(MAT_STEEL = 180) casing_flags = CASING_DELETE /obj/item/ammo_casing/a10x24mmcaseless/ap @@ -487,14 +487,14 @@ caliber = "10mmCL" icon_state = "casing" projectile_type = /obj/projectile/bullet/pistol/medium/ap - matter = list(MAT_STEEL = 180) + materials = list(MAT_STEEL = 180) /obj/item/ammo_casing/a10x24mmcaseless/hp desc = "A 10x24mm caseless round, common during the Xenomorph wars due to its use the the battle rifles of the United Solar Marine Corps. This one was meant to shred armored targets." caliber = "10mmCL" icon_state = "casing" projectile_type = /obj/projectile/bullet/pistol/medium/hp - matter = list(MAT_STEEL = 180) + materials = list(MAT_STEEL = 180) /* * 5mm Caseless @@ -505,7 +505,7 @@ caliber = "5mm caseless" icon_state = "casing" // Placeholder. Should probably be purple. projectile_type = /obj/projectile/bullet/pistol // Close enough to be comparable. - matter = list(MAT_STEEL = 180) + materials = list(MAT_STEEL = 180) casing_flags = CASING_DELETE /obj/item/ammo_casing/a5mmcaseless/stun @@ -522,12 +522,12 @@ icon_state = "rocketshell" projectile_type = /obj/projectile/bullet/srmrocket caliber = "rocket" - matter = list(MAT_STEEL = 10000) + materials = list(MAT_STEEL = 10000) /obj/item/ammo_casing/rocket/weak name = "low-yield rocket shell" projectile_type = /obj/projectile/bullet/srmrocket/weak - matter = list(MAT_STEEL = 5000) + materials = list(MAT_STEEL = 5000) /obj/item/ammo_casing/cap name = "cap" @@ -536,7 +536,7 @@ icon_state = "r-casing" color = "#FF0000" projectile_type = /obj/projectile/bullet/pistol/cap - matter = list(MAT_STEEL = 85) + materials = list(MAT_STEEL = 85) /obj/item/ammo_casing/spent // For simple hostile mobs only, so they don't cough up usable bullets when firing. This is for literally nothing else. icon_state = "s-casing-spent" @@ -549,7 +549,7 @@ icon_state = "globule" color = "#FFE0E2" projectile_type = /obj/projectile/bullet/organic - matter = list("flesh" = 100) + materials = list("flesh" = 100) /obj/item/ammo_casing/organic/wax name = "wax globule" @@ -558,7 +558,7 @@ icon_state = "globule" color = "#E6E685" projectile_type = /obj/projectile/bullet/organic/wax - matter = list("wax" = 100) + materials = list("wax" = 100) /obj/item/ammo_casing/musket name = "musket ball" @@ -566,7 +566,7 @@ icon_state = "musketball" caliber = "musket" projectile_type = /obj/projectile/bullet/musket - matter = list("lead" = 100) + materials = list("lead" = 100) casing_flags = CASING_DELETE /obj/item/ammo_casing/musket/silver @@ -574,7 +574,7 @@ desc = "A solid ball made of a lead-silver alloy." icon_state = "silverball" projectile_type = /obj/projectile/bullet/musket/silver - matter = list("lead" = 100, "silver" = 100) + materials = list("lead" = 100, "silver" = 100) /obj/item/ammo_casing/musket/blunderbuss name = "shot" @@ -582,14 +582,14 @@ icon_state = "blunderbuss" caliber = "blunderbuss" projectile_type = /obj/projectile/bullet/pellet/blunderbuss - matter = list("lead" = 500) + materials = list("lead" = 500) /obj/item/ammo_casing/musket/blunderbuss/silver name = "sliver shot" desc = "A bundle of silver lead allow balls and other assorted bits of silver." icon_state = "silverbuss" projectile_type = /obj/projectile/bullet/pellet/blunderbuss/silver - matter = list("lead" = 500, "silver" = 500) + materials = list("lead" = 500, "silver" = 500) //Ten Gauge Rounds for Exotic Shotguns /obj/item/ammo_casing/a10g @@ -598,7 +598,7 @@ icon_state = "brshell" caliber = "10g" projectile_type = /obj/projectile/bullet/heavy_shotgun - matter = list(MAT_STEEL = 300, "brass" = 200) + materials = list(MAT_STEEL = 300, "brass" = 200) fall_sounds = list('sound/weapons/guns/shotgun_fall.ogg') /obj/item/ammo_casing/a10g/pellet //Spread variant. diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index e6fb0f7496c1..88484a90a49e 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -39,7 +39,7 @@ icon_state = "detective" item_state = "gun" slot_flags = SLOT_BELT|SLOT_HOLSTER - matter = list(MAT_STEEL = 2000) + materials = list(MAT_STEEL = 2000) rad_flags = RAD_BLOCK_CONTENTS w_class = ITEMSIZE_NORMAL throw_force = 5 diff --git a/code/modules/projectiles/guns/ballistic.dm b/code/modules/projectiles/guns/ballistic.dm index 7175ad5f9891..593d4f6c1bd5 100644 --- a/code/modules/projectiles/guns/ballistic.dm +++ b/code/modules/projectiles/guns/ballistic.dm @@ -5,7 +5,7 @@ icon_state = "revolver" origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2) w_class = ITEMSIZE_NORMAL - matter = list(MAT_STEEL = 1000) + materials = list(MAT_STEEL = 1000) recoil = 0 projectile_type = /obj/projectile/bullet/pistol/strong //Only used for chameleon guns diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm index 66a003d44a3f..a87f04010b40 100644 --- a/code/modules/projectiles/guns/energy/laser.dm +++ b/code/modules/projectiles/guns/energy/laser.dm @@ -10,7 +10,7 @@ w_class = ITEMSIZE_LARGE damage_force = 10 origin_tech = list(TECH_COMBAT = 3, TECH_MAGNET = 2) - matter = list(MAT_STEEL = 2000) + materials = list(MAT_STEEL = 2000) projectile_type = /obj/projectile/beam/midlaser heavy = TRUE one_handed_penalty = 30 @@ -242,7 +242,7 @@ item_state = "laser" desc = "Based off an ancient model of laser gun, the NT-Tagger will make you the terror of the next workplace lasertag tournament." origin_tech = list(TECH_COMBAT = 1, TECH_MAGNET = 2) - matter = list(MAT_STEEL = 2000) + materials = list(MAT_STEEL = 2000) projectile_type = /obj/projectile/beam/lasertag/blue cell_type = /obj/item/cell/device/weapon/recharge battery_lock = 1 @@ -316,7 +316,7 @@ w_class = ITEMSIZE_LARGE damage_force = 10 origin_tech = list(TECH_COMBAT = 5, TECH_MAGNET = 2) - matter = list(MAT_STEEL = 2000, "plastic" = 1000) + materials = list(MAT_STEEL = 2000, "plastic" = 1000) projectile_type = /obj/projectile/beam/midlaser heavy = FALSE one_handed_penalty = 25 diff --git a/code/modules/projectiles/guns/energy/modular/modulargun.dm b/code/modules/projectiles/guns/energy/modular/modulargun.dm index 89d58fe25b2b..89e7eb2eeca7 100644 --- a/code/modules/projectiles/guns/energy/modular/modulargun.dm +++ b/code/modules/projectiles/guns/energy/modular/modulargun.dm @@ -46,6 +46,8 @@ // hilariously snowflake proc to force a firemode switch because i can't be assed to do it properly holy shit fuck you /obj/item/gun/energy/modular/proc/generatefiremodes() do_generatefiremodes() + if(!length(firemodes)) + return var/datum/firemode/new_mode = firemodes[1] new_mode.apply_to(src) diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index fff2b2bea644..6e0943fdd1ae 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -435,7 +435,7 @@ heavy = TRUE damage_force = 10 origin_tech = list(TECH_COMBAT = 3, TECH_ENGINEERING = 3, TECH_MAGNET = 2) - matter = list(MAT_STEEL = 2000, MAT_GLASS = 1000) + materials = list(MAT_STEEL = 2000, MAT_GLASS = 1000) one_handed_penalty = 50 /obj/item/gun/energy/ionrifle/pistol/tyrmalin @@ -476,7 +476,7 @@ heavy = TRUE damage_force = 10 origin_tech = list(TECH_COMBAT = 6, TECH_ENGINEERING = 5, TECH_MAGNET = 5) - matter = list(MAT_STEEL = 10000, MAT_GLASS = 2000) + materials = list(MAT_STEEL = 10000, MAT_GLASS = 2000) one_handed_penalty = 50 var/overheating = 0 @@ -519,7 +519,7 @@ heavy = FALSE damage_force = 5 origin_tech = list(TECH_COMBAT = 6, TECH_ENGINEERING = 5, TECH_MAGNET = 5) - matter = list(MAT_STEEL = 8000, MAT_GLASS = 2000) + materials = list(MAT_STEEL = 8000, MAT_GLASS = 2000) one_handed_penalty = 10 /obj/item/gun/energy/plasma/pistol/update_icon() diff --git a/code/modules/projectiles/guns/energy/stun.dm b/code/modules/projectiles/guns/energy/stun.dm index 6e1fa88fe699..ce7ce878c134 100644 --- a/code/modules/projectiles/guns/energy/stun.dm +++ b/code/modules/projectiles/guns/energy/stun.dm @@ -52,7 +52,7 @@ w_class = ITEMSIZE_SMALL item_state = "crossbow" origin_tech = list(TECH_COMBAT = 2, TECH_MAGNET = 2, TECH_ILLEGAL = 5) - matter = list(MAT_STEEL = 2000) + materials = list(MAT_STEEL = 2000) slot_flags = SLOT_BELT | SLOT_HOLSTER silenced = 1 projectile_type = /obj/projectile/energy/bolt @@ -69,8 +69,8 @@ name = "energy crossbow" desc = "A weapon favored by mercenary infiltration teams." w_class = ITEMSIZE_LARGE + materials = list(MAT_STEEL = 200000) damage_force = 10 - matter = list(MAT_STEEL = 200000) slot_flags = SLOT_BELT projectile_type = /obj/projectile/energy/bolt/large diff --git a/code/modules/projectiles/guns/launcher/grenade_launcher.dm b/code/modules/projectiles/guns/launcher/grenade_launcher.dm index dd7fd7a82d77..441eccdc715e 100644 --- a/code/modules/projectiles/guns/launcher/grenade_launcher.dm +++ b/code/modules/projectiles/guns/launcher/grenade_launcher.dm @@ -16,7 +16,7 @@ var/list/grenades = new/list() var/max_grenades = 5 //holds this + one in the chamber - matter = list(MAT_STEEL = 2000) + materials = list(MAT_STEEL = 2000) //revolves the magazine, allowing players to choose between multiple grenade types /obj/item/gun/launcher/grenade/proc/pump(mob/M as mob) diff --git a/code/modules/projectiles/guns/launcher/syringe_gun.dm b/code/modules/projectiles/guns/launcher/syringe_gun.dm index 494f5587aa6e..c9f16b0789a5 100644 --- a/code/modules/projectiles/guns/launcher/syringe_gun.dm +++ b/code/modules/projectiles/guns/launcher/syringe_gun.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/ammo.dmi' icon_state = "syringe-cartridge" var/icon_flight = "syringe-cartridge-flight" //so it doesn't look so weird when shot - matter = list(MAT_STEEL = 125, MAT_GLASS = 375) + materials = list(MAT_STEEL = 125, MAT_GLASS = 375) slot_flags = SLOT_BELT | SLOT_EARS throw_force = 3 damage_force = 3 @@ -70,8 +70,8 @@ icon_state = "syringegun" item_state = "syringegun" w_class = ITEMSIZE_NORMAL + materials = list(MAT_STEEL = 2000) damage_force = 7 - matter = list(MAT_STEEL = 2000) slot_flags = SLOT_BELT fire_sound = 'sound/weapons/empty.ogg' diff --git a/code/modules/projectiles/magazines/magazine.dm b/code/modules/projectiles/magazines/magazine.dm index f1223edaee51..d50d31301ad1 100644 --- a/code/modules/projectiles/magazines/magazine.dm +++ b/code/modules/projectiles/magazines/magazine.dm @@ -4,9 +4,10 @@ desc = "A magazine for some kind of gun." icon_state = ".357" icon = 'icons/obj/ammo.dmi' + item_flags = ITEM_EASY_LATHE_DECONSTRUCT slot_flags = SLOT_BELT item_state = "syringe_kit" - matter = list(MAT_STEEL = 500) + materials = list(MAT_STEEL = 500) throw_force = 5 w_class = ITEMSIZE_SMALL throw_speed = 4 diff --git a/code/modules/projectiles/magazines/unsorted.dm b/code/modules/projectiles/magazines/unsorted.dm index 94616692d84d..39597a574ba9 100644 --- a/code/modules/projectiles/magazines/unsorted.dm +++ b/code/modules/projectiles/magazines/unsorted.dm @@ -32,7 +32,7 @@ icon_state = "38" caliber = ".357" ammo_type = /obj/item/ammo_casing/a357 - matter = list(MAT_STEEL = 1260) + materials = list(MAT_STEEL = 1260) max_ammo = 6 multiple_sprites = 1 @@ -40,7 +40,7 @@ name = "speedloader (.357 silver)" icon_state = "ag_38" ammo_type = /obj/item/ammo_casing/a357/silver - matter = list(MAT_STEEL = 2100, MAT_SILVER = 1200) + materials = list(MAT_STEEL = 2100, MAT_SILVER = 1200) ///////// .38 ///////// @@ -49,7 +49,7 @@ desc = "A speedloader for .38 revolvers." icon_state = "38" caliber = ".38" - matter = list(MAT_STEEL = 360) + materials = list(MAT_STEEL = 360) ammo_type = /obj/item/ammo_casing/a38 max_ammo = 6 multiple_sprites = 1 @@ -67,7 +67,7 @@ name = "speedloader (.38 silver)" icon_state = "ag_38" ammo_type = /obj/item/ammo_casing/a38/silver - matter = list(MAT_STEEL = 780, MAT_SILVER = 600) + materials = list(MAT_STEEL = 780, MAT_SILVER = 600) ///////// .45 ///////// @@ -76,7 +76,7 @@ icon_state = "45" mag_type = MAGAZINE ammo_type = /obj/item/ammo_casing/a45 - matter = list(MAT_STEEL = 525) //metal costs are very roughly based around 1 .45 casing = 75 metal + materials = list(MAT_STEEL = 525) //metal costs are very roughly based around 1 .45 casing = 75 metal caliber = ".45" max_ammo = 7 multiple_sprites = 1 @@ -113,7 +113,7 @@ icon_state = "uzi45" mag_type = MAGAZINE ammo_type = /obj/item/ammo_casing/a45 - matter = list(MAT_STEEL = 1200) + materials = list(MAT_STEEL = 1200) caliber = ".45" max_ammo = 16 multiple_sprites = 1 @@ -126,7 +126,7 @@ icon_state = "wt274" mag_type = MAGAZINE ammo_type = /obj/item/ammo_casing/a45 - matter = list(MAT_STEEL = 2400) + materials = list(MAT_STEEL = 2400) caliber = ".45" max_ammo = 32 multiple_sprites = 1 @@ -136,7 +136,7 @@ icon_state = "tommy-mag" mag_type = MAGAZINE ammo_type = /obj/item/ammo_casing/a45 - matter = list(MAT_STEEL = 1500) + materials = list(MAT_STEEL = 1500) caliber = ".45" max_ammo = 20 @@ -153,7 +153,7 @@ w_class = ITEMSIZE_NORMAL // Bulky ammo doesn't fit in your pockets! mag_type = MAGAZINE ammo_type = /obj/item/ammo_casing/a45 - matter = list(MAT_STEEL = 3750) + materials = list(MAT_STEEL = 3750) caliber = ".45" max_ammo = 50 @@ -170,7 +170,7 @@ desc = "A stripper clip for reloading .45 rounds into magazines." caliber = ".45" ammo_type = /obj/item/ammo_casing/a45 - matter = list(MAT_STEEL = 675) // metal costs very roughly based around one .45 casing = 75 metal + materials = list(MAT_STEEL = 675) // metal costs very roughly based around one .45 casing = 75 metal max_ammo = 9 multiple_sprites = 1 @@ -194,7 +194,7 @@ name = "speedloader (.45)" icon_state = "45s" ammo_type = /obj/item/ammo_casing/a45 - matter = list(MAT_STEEL = 525) //metal costs are very roughly based around 1 .45 casing = 75 metal + materials = list(MAT_STEEL = 525) //metal costs are very roughly based around 1 .45 casing = 75 metal caliber = ".45" max_ammo = 7 multiple_sprites = 1 @@ -222,7 +222,7 @@ name = "speedloader (.45 silver)" icon_state = "ag45s" ammo_type = /obj/item/ammo_casing/a45/silver - matter = list(MAT_STEEL = 780, MAT_SILVER = 600) + materials = list(MAT_STEEL = 780, MAT_SILVER = 600) ///////// 10x24mm Caseless ///////// @@ -232,7 +232,7 @@ icon_state = "usmc-large" caliber = "10mmCL" w_class = ITEMSIZE_NORMAL - matter = list(MAT_STEEL = 8500) + materials = list(MAT_STEEL = 8500) mag_type = MAGAZINE max_ammo = 96 multiple_sprites = 1 @@ -240,7 +240,7 @@ /obj/item/ammo_magazine/m10x24mm/large name = "magazine (large) (10mm caseless)" icon_state = "usmc-large" - matter = list(MAT_STEEL = 8500) + materials = list(MAT_STEEL = 8500) max_ammo = 96 /obj/item/ammo_magazine/m10x24mm/large/hp @@ -256,7 +256,7 @@ /obj/item/ammo_magazine/m10x24mm/med name = "magazine (medium) (10mm caseless)" icon_state = "usmc-med" - matter = list(MAT_STEEL = 5500) + materials = list(MAT_STEEL = 5500) max_ammo = 64 multiple_sprites = 1 @@ -273,7 +273,7 @@ /obj/item/ammo_magazine/m10x24mm/small name = "magazine (small) (10mm caseless)" icon_state = "usmc-small" - matter = list(MAT_STEEL = 2500) + materials = list(MAT_STEEL = 2500) max_ammo = 32 multiple_sprites = 1 @@ -324,7 +324,7 @@ icon_state = "9x19p_fullsize" origin_tech = list(TECH_COMBAT = 2) mag_type = MAGAZINE - matter = list(MAT_STEEL = 600) + materials = list(MAT_STEEL = 600) caliber = "9mm" ammo_type = /obj/item/ammo_casing/a9mm max_ammo = 10 @@ -364,7 +364,7 @@ icon_state = "9x19p" origin_tech = list(TECH_COMBAT = 2) mag_type = MAGAZINE - matter = list(MAT_STEEL = 480) + materials = list(MAT_STEEL = 480) caliber = "9mm" ammo_type = /obj/item/ammo_casing/a9mm max_ammo = 8 @@ -391,7 +391,7 @@ icon_state = "9mmt" mag_type = MAGAZINE ammo_type = /obj/item/ammo_casing/a9mm - matter = list(MAT_STEEL = 1200) + materials = list(MAT_STEEL = 1200) caliber = "9mm" max_ammo = 20 multiple_sprites = 1 @@ -421,7 +421,7 @@ desc = "A stripper clip for reloading 9mm rounds into magazines." caliber = "9mm" ammo_type = /obj/item/ammo_casing/a9mm - matter = list(MAT_STEEL = 600) // metal costs are very roughly based around one 9mm casing = 60 metal + materials = list(MAT_STEEL = 600) // metal costs are very roughly based around one 9mm casing = 60 metal max_ammo = 10 multiple_sprites = 1 @@ -445,14 +445,14 @@ name = "ammo clip (9mm silver)" ammo_type = /obj/item/ammo_casing/a9mm/silver icon_state = "clip_pistol_ag" - matter = list(MAT_STEEL = 1300, MAT_SILVER = 1000) + materials = list(MAT_STEEL = 1300, MAT_SILVER = 1000) /obj/item/ammo_magazine/m9mmAdvanced desc = "A very high capacity double stack magazine made specially for the Advanced SMG. Filled with 21 9mm bullets." icon_state = "S9mm" mag_type = MAGAZINE ammo_type = /obj/item/ammo_casing/a9mm - matter = list(MAT_STEEL = 1200) + materials = list(MAT_STEEL = 1200) caliber = "9mm" max_ammo = 21 origin_tech = list(TECH_COMBAT = 2, TECH_ILLEGAL = 1) @@ -462,7 +462,7 @@ desc = "A high capacity double stack magazine made specially for the Advanced SMG. Filled with 21 9mm armor piercing bullets." icon_state = "S9mm" ammo_type = /obj/item/ammo_casing/a9mm/ap - matter = list(MAT_STEEL = 2000) + materials = list(MAT_STEEL = 2000) /obj/item/ammo_magazine/m9mmR/saber/empty initial_ammo = 0 @@ -474,7 +474,7 @@ icon_state = "ntles" origin_tech = list(TECH_COMBAT = 2) mag_type = MAGAZINE - matter = list(MAT_STEEL = 300, MAT_COPPER = 300) + materials = list(MAT_STEEL = 300, MAT_COPPER = 300) caliber = "5.7x28mm" ammo_type = /obj/item/ammo_casing/a57x28mm max_ammo = 20 @@ -546,7 +546,7 @@ icon_state = "fiveseven" origin_tech = list(TECH_COMBAT = 2) mag_type = MAGAZINE - matter = list(MAT_STEEL = 300, MAT_COPPER = 300) + materials = list(MAT_STEEL = 300, MAT_COPPER = 300) caliber = "5.7x28mm" ammo_type = /obj/item/ammo_casing/a57x28mm max_ammo = 20 @@ -600,7 +600,7 @@ icon_state = "p90" mag_type = MAGAZINE ammo_type = /obj/item/ammo_casing/a57x28mm/ap - matter = list(MAT_STEEL = 1500, MAT_COPPER = 1500) + materials = list(MAT_STEEL = 1500, MAT_COPPER = 1500) caliber = "5.7x28mm" max_ammo = 50 multiple_sprites = 1 @@ -620,7 +620,7 @@ origin_tech = list(TECH_COMBAT = 2) mag_type = MAGAZINE caliber = "10mm" - matter = list(MAT_STEEL = 1500) + materials = list(MAT_STEEL = 1500) ammo_type = /obj/item/ammo_casing/a10mm max_ammo = 20 multiple_sprites = 1 @@ -634,7 +634,7 @@ desc = "A stripper clip for reloading 5mm rounds into magazines." caliber = "10mm" ammo_type = /obj/item/ammo_casing/a10mm - matter = list(MAT_STEEL = 675) // metal costs are very roughly based around one 10mm casing = 75 metal + materials = list(MAT_STEEL = 675) // metal costs are very roughly based around one 10mm casing = 75 metal max_ammo = 9 multiple_sprites = 1 @@ -650,14 +650,14 @@ origin_tech = list(TECH_COMBAT = 2) mag_type = MAGAZINE caliber = "5.45mm" - matter = list(MAT_STEEL = 1800) + materials = list(MAT_STEEL = 1800) ammo_type = /obj/item/ammo_casing/a545 max_ammo = 20 multiple_sprites = 1 /obj/item/ammo_magazine/m545/ext name = "extended magazine (5.45mm)" - matter = list(MAT_STEEL = 2700) + materials = list(MAT_STEEL = 2700) max_ammo = 30 /obj/item/ammo_magazine/m545/empty @@ -693,7 +693,7 @@ /obj/item/ammo_magazine/m545/small name = "reduced magazine (5.45mm)" icon_state = "m545-small" - matter = list(MAT_STEEL = 900) + materials = list(MAT_STEEL = 900) max_ammo = 10 /obj/item/ammo_magazine/m545/small/empty @@ -716,7 +716,7 @@ icon_state = "clip_rifle" caliber = "5.45mm" ammo_type = /obj/item/ammo_casing/a545 - matter = list(MAT_STEEL = 450) // metal costs are very roughly based around one 10mm casing = 180 metal + materials = list(MAT_STEEL = 450) // metal costs are very roughly based around one 10mm casing = 180 metal max_ammo = 5 multiple_sprites = 1 @@ -738,7 +738,7 @@ origin_tech = list(TECH_COMBAT = 2) mag_type = MAGAZINE caliber = "5.45mm" - matter = list(MAT_STEEL = 10000) + materials = list(MAT_STEEL = 10000) ammo_type = /obj/item/ammo_casing/a545 w_class = ITEMSIZE_NORMAL // This should NOT fit in your pocket!! max_ammo = 50 @@ -763,7 +763,7 @@ origin_tech = list(TECH_COMBAT = 2) mag_type = MAGAZINE caliber = ".44" - matter = list(MAT_STEEL = 1260) + materials = list(MAT_STEEL = 1260) ammo_type = /obj/item/ammo_casing/a44 max_ammo = 7 multiple_sprites = 1 @@ -777,7 +777,7 @@ desc = "A stripper clip for reloading .44 rounds into magazines." caliber = ".44" ammo_type = /obj/item/ammo_casing/a44 - matter = list(MAT_STEEL = 1620) // metal costs are very roughly based around one .50 casing = 180 metal + materials = list(MAT_STEEL = 1620) // metal costs are very roughly based around one .50 casing = 180 metal max_ammo = 9 multiple_sprites = 1 @@ -786,7 +786,7 @@ icon_state = "44" icon = 'icons/obj/ammo.dmi' ammo_type = /obj/item/ammo_casing/a44 - matter = list(MAT_STEEL = 1260) //metal costs are very roughly based around 1 .45 casing = 75 metal + materials = list(MAT_STEEL = 1260) //metal costs are very roughly based around 1 .45 casing = 75 metal caliber = ".44" max_ammo = 6 multiple_sprites = 1 @@ -803,7 +803,7 @@ name = "speedloader (.44 silver)" icon_state = "ag44" ammo_type = /obj/item/ammo_casing/a44/silver - matter = list(MAT_STEEL = 2100, MAT_SILVER = 1200) + materials = list(MAT_STEEL = 2100, MAT_SILVER = 1200) ///////// 7.62mm ///////// @@ -812,7 +812,7 @@ icon_state = "m762-small" mag_type = MAGAZINE caliber = "7.62mm" - matter = list(MAT_STEEL = 2000) + materials = list(MAT_STEEL = 2000) ammo_type = /obj/item/ammo_casing/a762 max_ammo = 10 multiple_sprites = 1 @@ -829,7 +829,7 @@ icon_state = "m762" mag_type = MAGAZINE caliber = "7.62mm" - matter = list(MAT_STEEL = 4000) + materials = list(MAT_STEEL = 4000) ammo_type = /obj/item/ammo_casing/a762 max_ammo = 20 multiple_sprites = 1 @@ -846,7 +846,7 @@ icon_state = "gclip" mag_type = MAGAZINE caliber = "7.62mm" - matter = list(MAT_STEEL = 1600) + materials = list(MAT_STEEL = 1600) ammo_type = /obj/item/ammo_casing/a762 max_ammo = 8 multiple_sprites = 1 @@ -871,7 +871,7 @@ icon_state = "clip_rifle" caliber = "7.62mm" ammo_type = /obj/item/ammo_casing/a762 - matter = list(MAT_STEEL = 1000) // metal costs are very roughly based around one 7.62 casing = 200 metal + materials = list(MAT_STEEL = 1000) // metal costs are very roughly based around one 7.62 casing = 200 metal max_ammo = 5 multiple_sprites = 1 @@ -899,14 +899,14 @@ name = "rifle clip (7.62mm silver)" icon_state = "agclip_rifle" ammo_type = /obj/item/ammo_casing/a762/silver - matter = list(MAT_STEEL = 1500, MAT_SILVER = 750) + materials = list(MAT_STEEL = 1500, MAT_SILVER = 750) /obj/item/ammo_magazine/m762svd name = "\improper SVD magazine (7.62mm)" icon_state = "SVD" mag_type = MAGAZINE caliber = "7.62mm" - matter = list(MAT_STEEL = 2000) + materials = list(MAT_STEEL = 2000) ammo_type = /obj/item/ammo_casing/a762 max_ammo = 10 multiple_sprites = 1 @@ -924,7 +924,7 @@ origin_tech = list(TECH_COMBAT = 2) mag_type = MAGAZINE caliber = "7.62mm" - matter = list(MAT_STEEL = 10000) + materials = list(MAT_STEEL = 10000) ammo_type = /obj/item/ammo_casing/a762 w_class = ITEMSIZE_NORMAL max_ammo = 50 @@ -942,7 +942,7 @@ icon_state = "M60MAG" mag_type = MAGAZINE caliber = "7.62mm" - matter = list(MAT_STEEL = 20000) + materials = list(MAT_STEEL = 20000) ammo_type = /obj/item/ammo_casing/a762 max_ammo = 75 multiple_sprites = 1 @@ -957,7 +957,7 @@ icon_state = "ashot-mag" mag_type = MAGAZINE caliber = "12g" - matter = list(MAT_STEEL = 13000) + materials = list(MAT_STEEL = 13000) ammo_type = /obj/item/ammo_casing/a12g max_ammo = 24 multiple_sprites = 1 @@ -983,7 +983,7 @@ desc = "A color-coded metal clip for holding and quickly loading shotgun shells. This one is loaded with slugs." caliber = "12g" ammo_type = /obj/item/ammo_casing/a12g - matter = list(MAT_STEEL = 1070) // slugs shells x2 + 350 metal for the clip itself. + materials = list(MAT_STEEL = 1070) // slugs shells x2 + 350 metal for the clip itself. max_ammo = 2 multiple_sprites = 1 @@ -992,21 +992,21 @@ icon_state = "12gclipshell" desc = "A color-coded metal clip for holding and quickly loading shotgun shells. This one is loaded with buckshot." ammo_type = /obj/item/ammo_casing/a12g/pellet - matter = list(MAT_STEEL = 1070) // buckshot and slugs cost the same + materials = list(MAT_STEEL = 1070) // buckshot and slugs cost the same /obj/item/ammo_magazine/clip/c12g/beanbag name = "ammo clip (12g beanbag)" icon_state = "12gclipbean" desc = "A color-coded metal clip for holding and quickly loading shotgun shells. This one is loaded with beanbags." ammo_type = /obj/item/ammo_casing/a12g/beanbag - matter = list(MAT_STEEL = 710) //beanbags x2 + 350 metal + materials = list(MAT_STEEL = 710) //beanbags x2 + 350 metal /obj/item/ammo_magazine/clip/c12g/silver name = "ammo clip (12g buckshot)" icon_state = "12gclipag" desc = "A color-coded metal clip for holding and quickly loading shotgun shells. This one is loaded with silver buckshot." ammo_type = /obj/item/ammo_casing/a12g/silver - matter = list(MAT_STEEL = 1070, MAT_SILVER = 480) + materials = list(MAT_STEEL = 1070, MAT_SILVER = 480) /obj/item/ammo_magazine/holyshot_mag name = "blessed drum magazine (12 gauge)" @@ -1014,7 +1014,7 @@ desc = "Thrice-blessed, this drum magazine is loaded with silver shot designed to combat supernatural threats." mag_type = MAGAZINE caliber = "12g" - matter = list(MAT_STEEL = 100, MAT_SILVER = 1100) + materials = list(MAT_STEEL = 100, MAT_SILVER = 1100) ammo_type = /obj/item/ammo_casing/a12g/silver max_ammo = 12 @@ -1045,7 +1045,7 @@ caliber = "caps" color = "#FF0000" ammo_type = /obj/item/ammo_casing/cap - matter = list(MAT_STEEL = 600) + materials = list(MAT_STEEL = 600) max_ammo = 7 multiple_sprites = 1 @@ -1056,7 +1056,7 @@ mag_type = MAGAZINE caliber = "organic" ammo_type = /obj/item/ammo_casing/organic - matter = list("flesh" = 1000) + materials = list("flesh" = 1000) max_ammo = 10 multiple_sprites = 1 @@ -1078,7 +1078,7 @@ mag_type = MAGAZINE caliber = "apidean" ammo_type = /obj/item/ammo_casing/organic/wax - matter = list("wax" = 1000) + materials = list("wax" = 1000) max_ammo = 10 multiple_sprites = 1 @@ -1088,7 +1088,7 @@ desc = "You shouldn't be seeing this, contact a Maintainer!" icon_state = "toy_pistol" mag_type = MAGAZINE - matter = list(MAT_PLASTIC = 480) + materials = list(MAT_PLASTIC = 480) caliber = "foamdart" ammo_type = /obj/item/ammo_casing/foam max_ammo = 8 @@ -1111,7 +1111,7 @@ name = "toy c20r magazine" desc = "A plastic recreation of the classic c20r submachine gun." icon_state = "toy_c20" - matter = list(MAT_PLASTIC = 1500) + materials = list(MAT_PLASTIC = 1500) max_ammo = 20 /obj/item/ammo_magazine/mfoam/c20/empty @@ -1126,7 +1126,7 @@ name = "toy magazine box" desc = "A heavy plastic box designed to hold belts of foam darts! Wow!" icon_state = "toy_lmg" - matter = list(MAT_PLASTIC = 10000) + materials = list(MAT_PLASTIC = 10000) w_class = ITEMSIZE_NORMAL max_ammo = 50 @@ -1142,7 +1142,7 @@ name = "toy submachine gun magazine" desc = "A plastic recreation of a double-stack submachine gun magazine." icon_state = "toy_smg" - matter = list(MAT_PLASTIC = 1200) + materials = list(MAT_PLASTIC = 1200) max_ammo = 20 /obj/item/ammo_magazine/mfoam/smg/empty @@ -1160,7 +1160,7 @@ icon_state = "shotholder" caliber = "12g" ammo_type = null - matter = list(MAT_STEEL = 1440) + materials = list(MAT_STEEL = 1440) ammo_type = /obj/item/ammo_casing/a12g initial_ammo = 0 max_ammo = 4 diff --git a/code/modules/projectiles/unsorted/magnetic.dm b/code/modules/projectiles/unsorted/magnetic.dm index b24220fc7664..1ce18645c57d 100644 --- a/code/modules/projectiles/unsorted/magnetic.dm +++ b/code/modules/projectiles/unsorted/magnetic.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/ammo.dmi' icon_state = "5.56" w_class = ITEMSIZE_SMALL - matter = list(MAT_STEEL = 1800) + materials = list(MAT_STEEL = 1800) origin_tech = list(TECH_COMBAT = 1) var/remaining = 9 preserve_item = 1 diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index c0f9ad14a0e9..6290a7efed5e 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -220,15 +220,31 @@ return 0 return 0 -/datum/reagents/proc/has_all_reagents(list/check_reagents) +/datum/reagents/proc/has_all_reagents(list/check_reagents, multiplier = 1) //this only works if check_reagents has no duplicate entries... hopefully okay since it expects an associative list var/missing = check_reagents.len for(var/datum/reagent/current in reagent_list) if(current.id in check_reagents) - if(current.volume >= check_reagents[current.id]) + if(current.volume >= check_reagents[current.id] * multiplier) missing-- return !missing +/** + * returns lowest multiple of what we have compared to reagents list. + * + * both typepaths and ids are acceptable. + */ +/datum/reagents/proc/has_multiple(list/reagents, multiplier = 1) + . = INFINITY + // *sigh* + var/list/legacy_translating = list() + for(var/datum/reagent/R in reagent_list) + legacy_translating[R.id] = R.volume + for(var/datum/reagent/reagent as anything in reagents) + . = min(., legacy_translating[ispath(reagent)? initial(reagent.id) : reagent] / reagents[reagent]) + if(!.) + return + /datum/reagents/proc/clear_reagents() for(var/datum/reagent/current in reagent_list) del_reagent(current.id) diff --git a/code/modules/reagents/items/hypovial.dm b/code/modules/reagents/items/hypovial.dm index 7a2edc1a0d88..77c67506c8a3 100644 --- a/code/modules/reagents/items/hypovial.dm +++ b/code/modules/reagents/items/hypovial.dm @@ -4,6 +4,10 @@ desc = "A standard issue vial used for hyposprays." icon = 'icons/modules/reagents/items/hypospray.dmi' icon_state = "vial" + materials = list( + MAT_STEEL = 250, + MAT_GLASS = 1000, + ) w_class = WEIGHT_CLASS_TINY // 14 fits in a box, not 7 volume = 60 start_rename = TRUE @@ -24,6 +28,10 @@ name = "large hypospray vial" desc = "A larger variant of the common hypospray vial. Only compatible with advanced units." icon_state = "vial-l" + materials = list( + MAT_STEEL = 500, + MAT_GLASS = 2000, + ) w_class = WEIGHT_CLASS_SMALL volume = 120 overlay_count = 4 diff --git a/code/modules/reagents/machinery/dispenser/dispenser.dm b/code/modules/reagents/machinery/dispenser/dispenser.dm index 25adc359c1eb..a3157edca30e 100644 --- a/code/modules/reagents/machinery/dispenser/dispenser.dm +++ b/code/modules/reagents/machinery/dispenser/dispenser.dm @@ -20,8 +20,9 @@ use_power = USE_POWER_IDLE idle_power_usage = 50 anchored = TRUE - allow_unanchor = TRUE - allow_deconstruct = TRUE + default_unanchor = 3 SECONDS + default_deconstruct = 0 SECONDS + default_panel = 0 SECONDS interaction_flags_machine = INTERACT_MACHINE_OFFLINE | INTERACT_MACHINE_OPEN | INTERACT_MACHINE_OPEN_SILICON | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OFFLINE_SILICON @@ -460,47 +461,6 @@ update_static_data() return TRUE -/obj/machinery/chemical_dispenser/crowbar_act(obj/item/I, mob/user, flags, hint) - if(!allow_deconstruct || !panel_open) - return ..() - if(default_deconstruction_crowbar(user, I)) - user.visible_message(SPAN_NOTICE("[user] dismantles [src]."), range = MESSAGE_RANGE_CONSTRUCTION) - return TRUE - return ..() - -/obj/machinery/chemical_dispenser/screwdriver_act(obj/item/I, mob/user, flags, hint) - if(!allow_deconstruct) - return ..() - if(default_deconstruction_screwdriver(user, I)) - user.visible_message(SPAN_NOTICE("[user] [panel_open? "opens" : "closes"] the panel on [src]."), range = MESSAGE_RANGE_CONSTRUCTION) - return TRUE - return ..() - -/obj/machinery/chemical_dispenser/wrench_act(obj/item/I, mob/user, flags, hint) - if(!allow_unanchor) - return ..() - if(default_unfasten_wrench(user, I, 4 SECONDS)) - user.visible_message(SPAN_NOTICE("[user] [anchored? "fastens [src] to the ground" : "unfastens [src] from the ground"]."), range = MESSAGE_RANGE_CONSTRUCTION) - return TRUE - return ..() - -/obj/machinery/chemical_dispenser/dynamic_tool_functions(obj/item/I, mob/user) - . = list() - if(allow_unanchor) - .[TOOL_WRENCH] = anchored? "anchor" : "unanchor" - if(allow_deconstruct) - .[TOOL_SCREWDRIVER] = panel_open? "close panel" : "open panel" - if(panel_open) - .[TOOL_CROWBAR] = "deconstruct" - -/obj/machinery/chemical_dispenser/dynamic_tool_image(function, hint) - switch(function) - if(TOOL_WRENCH) - return anchored? dyntool_image_backward(TOOL_WRENCH) : dyntool_image_forward(TOOL_WRENCH) - if(TOOL_SCREWDRIVER) - return panel_open? dyntool_image_forward(TOOL_SCREWDRIVER) : dyntool_image_backward(TOOL_SCREWDRIVER) - return ..() - /obj/machinery/chemical_dispenser/drop_products(method) . = ..() if(synthesizers && !synthesizers_swappable) diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index 6361165d2f71..3d54b62ce0d4 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -151,8 +151,8 @@ icon_state = "beaker" base_icon_state = "beaker" item_state = "beaker" + materials = list(MAT_GLASS = 500) w_class = WEIGHT_CLASS_TINY - matter = list(MAT_GLASS = 500) drop_sound = 'sound/items/drop/glass.ogg' pickup_sound = 'sound/items/pickup/glass.ogg' @@ -203,8 +203,8 @@ desc = "A large beaker." icon_state = "beakerlarge" base_icon_state = "beakerlarge" + materials = list(MAT_GLASS = 1000) w_class = WEIGHT_CLASS_SMALL - matter = list(MAT_GLASS = 1000) volume = 120 amount_per_transfer_from_this = 10 possible_transfer_amounts = list(5,10,15,25,30,60,120) @@ -215,8 +215,8 @@ desc = "A cryostasis beaker that allows for chemical storage without reactions." icon_state = "beakernoreact" base_icon_state = "beakernoreact" + materials = list(MAT_GLASS = 500) w_class = WEIGHT_CLASS_SMALL - matter = list(MAT_GLASS = 500) volume = 60 amount_per_transfer_from_this = 10 atom_flags = OPENCONTAINER | NOREACT @@ -226,8 +226,8 @@ desc = "A bluespace beaker, powered by experimental bluespace technology." icon_state = "beakerbluespace" base_icon_state = "beakerbluespace" + materials = list(MAT_GLASS = 5000) w_class = WEIGHT_CLASS_SMALL - matter = list(MAT_GLASS = 5000) volume = 300 amount_per_transfer_from_this = 10 possible_transfer_amounts = list(5,10,15,25,30,60,120,300) @@ -238,7 +238,7 @@ desc = "A small glass vial." icon_state = "vial0" base_icon_state = "vial" - matter = list(MAT_GLASS = 250) + materials = list(MAT_GLASS = 250) volume = 30 w_class = ITEMSIZE_TINY amount_per_transfer_from_this = 10 @@ -261,7 +261,7 @@ icon_state = "bucket" base_icon_state = "bucket" item_state = "bucket" - matter = list(MAT_STEEL = 200) + materials = list(MAT_STEEL = 200) w_class = ITEMSIZE_NORMAL amount_per_transfer_from_this = 20 possible_transfer_amounts = list(10,20,30,60,120) @@ -324,7 +324,7 @@ icon_state = "woodbucket" base_icon_state = "woodbucket" item_state = "woodbucket" - matter = list(MAT_WOOD = 50) + materials = list(MAT_WOOD = 50) w_class = ITEMSIZE_LARGE amount_per_transfer_from_this = 20 possible_transfer_amounts = list(10,20,30,60,120) @@ -361,7 +361,7 @@ icon_state = "sandbucket" base_icon_state = "sandbucket" item_state = "woodbucket" - matter = list("sandstone" = 50) + materials = list("sandstone" = 50) w_class = ITEMSIZE_LARGE unacidable = 1 @@ -394,7 +394,7 @@ icon = 'icons/obj/vending.dmi' icon_state = "water_cooler_bottle" base_icon_state = "water_cooler_bottle" - matter = list(MAT_GLASS = 2000) + materials = list(MAT_GLASS = 2000) w_class = ITEMSIZE_NORMAL amount_per_transfer_from_this = 20 possible_transfer_amounts = list(10,20,30,60,120) @@ -407,7 +407,7 @@ icon = 'icons/obj/tank.dmi' icon_state = "portable_fuelcan" base_icon_state = "portable_fuelcan" - matter = list("metal" = 2000) + materials = list("metal" = 2000) w_class = ITEMSIZE_SMALL amount_per_transfer_from_this = 10 possible_transfer_amounts = list(10,20,50,100) @@ -435,7 +435,7 @@ desc = "A tiny fuel canister used to refuel tools and gear in the field. Useful for single recharges." icon_state = "portable_fuelcan_tiny" base_icon_state = "portable_fuelcan_tiny" - matter = list("metal" = 500) + materials = list("metal" = 500) w_class = ITEMSIZE_TINY volume = 20 diff --git a/code/modules/reagents/reagent_containers/organic.dm b/code/modules/reagents/reagent_containers/organic.dm index de40756f4aab..b6d6bdb7d89d 100644 --- a/code/modules/reagents/reagent_containers/organic.dm +++ b/code/modules/reagents/reagent_containers/organic.dm @@ -154,7 +154,7 @@ name = "waxcomb (honey)" desc = "A glob of freshly produced honey encased in sturdy wax." icon_state = "waxcomb" - matter = list("wax" = 100) + materials = list("wax" = 100) volume = 30 w_class = ITEMSIZE_TINY amount_per_transfer_from_this = 10 @@ -165,7 +165,7 @@ name = "waxcomb (jelly)" desc = "A glob of freshly produced jelly encased in sturdy wax." icon_state = "waxcomb" - matter = list("wax" = 100) + materials = list("wax" = 100) volume = 30 w_class = ITEMSIZE_TINY amount_per_transfer_from_this = 10 diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 361b6f6758ba..4e87d47b3ae8 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -8,7 +8,7 @@ icon = 'icons/obj/medical/syringe.dmi' item_state = "syringe_0" icon_state = "0" - matter = list(MAT_GLASS = 150) + materials = list(MAT_GLASS = 150) amount_per_transfer_from_this = 5 possible_transfer_amounts = null volume = 15 diff --git a/code/modules/recycling/disposal-construction.dm b/code/modules/recycling/disposal-construction.dm index 56b75e8f2c3b..84a815311acb 100644 --- a/code/modules/recycling/disposal-construction.dm +++ b/code/modules/recycling/disposal-construction.dm @@ -10,7 +10,7 @@ anchored = 0 density = 0 pressure_resistance = 5*ONE_ATMOSPHERE - matter = list(MAT_STEEL = 1850) + materials = list(MAT_STEEL = 1850) level = 2 var/sortType = "" var/ptype = 0 diff --git a/code/modules/research/design.dm b/code/modules/research/design.dm new file mode 100644 index 000000000000..86b3a3306947 --- /dev/null +++ b/code/modules/research/design.dm @@ -0,0 +1,26 @@ + +/** + * legacy science designs + */ +/datum/design/science + abstract_type = /datum/design/science + lathe_type = LATHE_TYPE_PROTOLATHE + var/legacy_stack_amount = 1 + +//Make sure items don't get free power +/datum/design/science/print(atom/where, amount, list/material_parts, list/ingredient_parts, list/reagent_parts, cost_multiplier = 1) + if(isnull(amount) || amount == 1) + if(is_stack) + amount = legacy_stack_amount + else + amount = 1 + var/obj/item/I = ..() + var/obj/item/cell/C = I.get_cell() + if(C) + C.charge = 0 + I.update_icon() + if(istype(I, /obj/item/gun)) + var/obj/item/gun/G = I + G.pin = null + + return I diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm deleted file mode 100644 index 28beb3f4a2db..000000000000 --- a/code/modules/research/designs.dm +++ /dev/null @@ -1,111 +0,0 @@ -/*************************************************************** -** Design Datums ** -** All the data for building stuff and tracking reliability. ** -***************************************************************/ -/* -For the materials datum, it assumes you need reagents unless specified otherwise. To designate a material that isn't a reagent, -you use one of the material IDs below. These are NOT ids in the usual sense (they aren't defined in the object or part of a datum), -they are simply references used as part of a "has materials?" type proc. They all start with a to denote that they aren't reagents. -The currently supporting non-reagent materials: - -Don't add new keyword/IDs if they are made from an existing one (such as rods which are made from metal). Only add raw materials. - -Design Guidlines -- When adding new designs, check rdreadme.dm to see what kind of things have already been made and where new stuff is needed. -- A single sheet of anything is 2000 units of material. Materials besides metal/glass require help from other jobs (mining for -other types of metals and chemistry for reagents). - -*/ -//Note: More then one of these can be added to a design. - -/** - * makes new datums for all hardcoded designs - */ -/proc/instantiate_all_hardcoded_designs() - . = list() - for(var/path in subtypesof(/datum/design)) - var/datum/design/D = path - if(initial(D.abstract_type) == path) - continue - if(initial(D.id) == "id") - continue - D = new path - . += D - -///Datum for object designs, used in construction -/datum/design - /// Abstract type. - abstract_type = /datum/design - - ///Name of the created object. If null it will be 'guessed' from build_path if possible. - var/name = null - ///Description of the created object. If null it will use group_desc and name where applicable. - var/desc = null - ///An item name before it is modified by various name-modifying procs - var/item_name = null - ///ID of the created object for easy refernece. Alphanumeric, lower-case, no symbols. - var/id = "id" - ///IDs of that techs the object originated from and the minimum level requirements. - var/list/req_tech = list() - ///Flag as to what kind machine the design is built in. See defines. - var/build_type = null - ///List of materials. Format: "id" = amount. - var/list/materials = list() - ///List of chemicals. - var/list/chemicals = list() - ///The path of the object that gets created. - var/build_path = null - ///How many ticks it requires to build - var/time = 6 - ///Primarily used for Mech Fabricators, but can be used for anything. - var/list/category = list() - ///Sorting order - var/sort_string = "ZZZZZ" - ///Optional string that interfaces can use as part of search filters. See- item/borg/upgrade/ai and the Exosuit Fabs. - var/search_metadata - -/datum/design/New() - if(!islist(category)) - log_runtime(EXCEPTION("Warning: Design [type] defined a non-list category. Please fix this.")) - category = list(category) - item_name = name - AssembleDesignInfo() - -//These procs are used in subtypes for assigning names and descriptions dynamically -/datum/design/proc/AssembleDesignInfo() - AssembleDesignName() - AssembleDesignDesc() - return - -/datum/design/proc/AssembleDesignName() - if(!name && build_path) //Get name from build path if posible - var/atom/movable/A = build_path - name = initial(A.name) - item_name = name - return - -/datum/design/proc/AssembleDesignDesc() - if(!desc) //Try to make up a nice description if we don't have one - desc = "Allows for the construction of \a [item_name]." - return - -//Returns a new instance of the item for this design -//This is to allow additional initialization to be performed, including possibly additional contructor arguments. -/datum/design/proc/Fabricate(var/newloc, var/fabricator) - return new build_path(newloc) - -/datum/design/item - build_type = PROTOLATHE - -//Make sure items don't get free power -/datum/design/item/Fabricate() - var/obj/item/I = ..() - var/obj/item/cell/C = I.get_cell() - if(C) - C.charge = 0 - I.update_icon() - if(istype(I, /obj/item/gun)) - var/obj/item/gun/G = I - G.pin = null - - return I diff --git a/code/modules/research/designs/HUDs.dm b/code/modules/research/designs/HUDs.dm index c74467d6fb92..82b9b3349c79 100644 --- a/code/modules/research/designs/HUDs.dm +++ b/code/modules/research/designs/HUDs.dm @@ -1,57 +1,49 @@ -// HUDs - -/datum/design/item/hud +/datum/design/science/hud + abstract_type = /datum/design/science/hud materials = list(MAT_STEEL = 50, MAT_GLASS = 50) -/datum/design/item/hud/AssembleDesignName() - ..() - name = "HUD glasses prototype ([item_name])" +/datum/design/science/hud/generate_name(template) + return "HUD glasses prototype ([..()])" -/datum/design/item/hud/AssembleDesignDesc() - desc = "Allows for the construction of \a [item_name] HUD glasses." +/datum/design/science/hud/generate_desc(template_name, template_desc) + return "Allows for the construction of \a [template_name] HUD glasses." -/datum/design/item/hud/health - name = "health scanner" +/datum/design/science/hud/health + design_name = "health scanner" id = "health_hud" req_tech = list(TECH_BIO = 2, TECH_MAGNET = 3) build_path = /obj/item/clothing/glasses/hud/health - sort_string = "EAAAA" -/datum/design/item/hud/security - name = "security records" +/datum/design/science/hud/security + design_name = "security records" id = "security_hud" req_tech = list(TECH_MAGNET = 3, TECH_COMBAT = 2) build_path = /obj/item/clothing/glasses/hud/security - sort_string = "EAAAB" -/datum/design/item/hud/mesons - name = "optical meson scanner" +/datum/design/science/hud/mesons + design_name = "optical meson scanner" id = "mesons" req_tech = list(TECH_MAGNET = 2, TECH_ENGINEERING = 2) build_path = /obj/item/clothing/glasses/meson - sort_string = "EAAAC" -/datum/design/item/hud/material - name = "optical material scanner" +/datum/design/science/hud/material + design_name = "optical material scanner" id = "material" req_tech = list(TECH_MAGNET = 3, TECH_ENGINEERING = 3) build_path = /obj/item/clothing/glasses/material - sort_string = "EAAAD" /* Graviton't -/datum/design/item/hud/graviton_visor - name = "graviton visor" +/datum/design/science/hud/graviton_visor + design_name = "graviton visor" id = "graviton_goggles" req_tech = list(TECH_MAGNET = 5, TECH_ENGINEERING = 3, TECH_BLUESPACE = 3, TECH_PHORON = 3) materials = list(MAT_PLASTEEL = 2000, MAT_GLASS = 3000, MAT_PHORON = 1500) build_path = /obj/item/clothing/glasses/graviton - sort_string = "EAAAE" */ -/datum/design/item/hud/omni - name = "AR glasses" +/datum/design/science/hud/omni + design_name = "AR glasses" id = "omnihud" req_tech = list(TECH_MAGNET = 4, TECH_COMBAT = 3, TECH_BIO = 3) materials = list(MAT_STEEL = 1000, MAT_GLASS = 1000) build_path = /obj/item/clothing/glasses/omnihud - sort_string = "EAAVA" diff --git a/code/modules/research/designs/ai_holders.dm b/code/modules/research/designs/ai_holders.dm index 53a4eb1d4097..49ca747cbb12 100644 --- a/code/modules/research/designs/ai_holders.dm +++ b/code/modules/research/designs/ai_holders.dm @@ -1,51 +1,48 @@ +/datum/design/science/ai_holder + abstract_type = /datum/design/science/ai_holder + // Various AI/mind holding device -/datum/design/item/ai_holder/AssembleDesignName() - ..() - name = "Mind storage device prototype ([item_name])" +/datum/design/science/ai_holder/generate_name(template) + return "Mind storage device prototype ([..()])" -/datum/design/item/ai_holder/mmi - name = "Man-machine interface" +/datum/design/science/ai_holder/mmi + design_name = "Man-machine interface" id = "mmi" req_tech = list(TECH_DATA = 2, TECH_BIO = 3) - build_type = PROTOLATHE | PROSFAB + lathe_type = LATHE_TYPE_PROTOLATHE | LATHE_TYPE_PROSTHETICS materials = list(MAT_STEEL = 1000, MAT_GLASS = 500) build_path = /obj/item/mmi category = list("Misc") - sort_string = "SAAAA" -/datum/design/item/ai_holder/posibrain - name = "Positronic brain" +/datum/design/science/ai_holder/posibrain + design_name = "Positronic brain" id = "posibrain" req_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 6, TECH_BLUESPACE = 2, TECH_DATA = 4) - build_type = PROTOLATHE | PROSFAB + lathe_type = LATHE_TYPE_PROTOLATHE | LATHE_TYPE_PROSTHETICS materials = list(MAT_STEEL = 2000, MAT_GLASS = 1000, MAT_SILVER = 1000, MAT_GOLD = 500, MAT_PHORON = 500, MAT_DIAMOND = 100) build_path = /obj/item/mmi/digital/posibrain category = list("Misc") - sort_string = "SAAAB" -/datum/design/item/ai_holder/dronebrain - name = "Robotic intelligence circuit" +/datum/design/science/ai_holder/dronebrain + design_name = "Robotic intelligence circuit" id = "dronebrain" req_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 5, TECH_DATA = 4) - build_type = PROTOLATHE | PROSFAB + lathe_type = LATHE_TYPE_PROTOLATHE | LATHE_TYPE_PROSTHETICS materials = list(MAT_STEEL = 2000, MAT_GLASS = 1000, MAT_SILVER = 1000, MAT_GOLD = 500) build_path = /obj/item/mmi/digital/robot category = list("Misc") - sort_string = "SAAAC" -/datum/design/item/ai_holder/paicard - name = "'pAI', personal artificial intelligence device" +/datum/design/science/ai_holder/paicard + design_name = "'pAI', personal artificial intelligence device" id = "paicard" req_tech = list(TECH_DATA = 2) materials = list(MAT_GLASS = 500, MAT_STEEL = 500) build_path = /obj/item/paicard - sort_string = "SBAAA" -/datum/design/item/ai_holder/intellicard - name = "intelliCore" +/datum/design/science/ai_holder/intellicard + design_name = "intelliCore" desc = "Allows for the construction of an intelliCore." id = "intellicore" req_tech = list(TECH_DATA = 4, TECH_MATERIAL = 4) materials = list(MAT_GLASS = 1000, MAT_GOLD = 200) build_path = /obj/item/aicard - sort_string = "SCAAA" diff --git a/code/modules/research/designs/ai_modules.dm b/code/modules/research/designs/ai_modules.dm deleted file mode 100644 index d3a70693a0ef..000000000000 --- a/code/modules/research/designs/ai_modules.dm +++ /dev/null @@ -1,117 +0,0 @@ -/datum/design/aimodule - build_type = IMPRINTER - materials = list(MAT_GLASS = 2000, MAT_GOLD = 100) - -/datum/design/aimodule/AssembleDesignName() - name = "AI module design ([name])" - -/datum/design/aimodule/AssembleDesignDesc() - desc = "Allows for the construction of \a '[name]' AI module." - -/datum/design/aimodule/safeguard - name = "Safeguard" - id = "safeguard" - req_tech = list(TECH_DATA = 3, TECH_MATERIAL = 4) - build_path = /obj/item/aiModule/safeguard - sort_string = "XABAA" - -/datum/design/aimodule/onehuman - name = "OneCrewMember" - id = "onehuman" - req_tech = list(TECH_DATA = 4, TECH_MATERIAL = 6) - build_path = /obj/item/aiModule/oneHuman - sort_string = "XABAB" - -/datum/design/aimodule/protectstation - name = "ProtectStation" - id = "protectstation" - req_tech = list(TECH_DATA = 3, TECH_MATERIAL = 6) - build_path = /obj/item/aiModule/protectStation - sort_string = "XABAC" - -/datum/design/aimodule/notele - name = "TeleporterOffline" - id = "notele" - req_tech = list(TECH_DATA = 3) - build_path = /obj/item/aiModule/teleporterOffline - sort_string = "XABAD" - -/datum/design/aimodule/quarantine - name = "Quarantine" - id = "quarantine" - req_tech = list(TECH_DATA = 3, TECH_BIO = 2, TECH_MATERIAL = 4) - build_path = /obj/item/aiModule/quarantine - sort_string = "XABAE" - -/datum/design/aimodule/oxygen - name = "OxygenIsToxicToHumans" - id = "oxygen" - req_tech = list(TECH_DATA = 3, TECH_BIO = 2, TECH_MATERIAL = 4) - build_path = /obj/item/aiModule/oxygen - sort_string = "XABAF" - -/datum/design/aimodule/freeform - name = "Freeform" - id = "freeform" - req_tech = list(TECH_DATA = 4, TECH_MATERIAL = 4) - build_path = /obj/item/aiModule/freeform - sort_string = "XABAG" - -/datum/design/aimodule/reset - name = "Reset" - id = "reset" - req_tech = list(TECH_DATA = 3, TECH_MATERIAL = 6) - build_path = /obj/item/aiModule/reset - sort_string = "XAAAZ" // Duplicate string, really need to redo this whole thing - -/datum/design/aimodule/purge - name = "Purge" - id = "purge" - req_tech = list(TECH_DATA = 4, TECH_MATERIAL = 6) - build_path = /obj/item/aiModule/purge - sort_string = "XAAAB" - -// Core modules -/datum/design/aimodule/core - req_tech = list(TECH_DATA = 4, TECH_MATERIAL = 6) - -/datum/design/aimodule/core/AssembleDesignName() - name = "AI core module design ([name])" - -/datum/design/aimodule/core/AssembleDesignDesc() - desc = "Allows for the construction of \a '[name]' AI core module." - -/datum/design/aimodule/core/freeformcore - name = "Freeform" - id = "freeformcore" - build_path = /obj/item/aiModule/freeformcore - sort_string = "XACAA" - -/datum/design/aimodule/core/asimov - name = "Asimov" - id = "asimov" - build_path = /obj/item/aiModule/asimov - sort_string = "XACAB" - -/datum/design/aimodule/core/paladin - name = "P.A.L.A.D.I.N." - id = "paladin" - build_path = /obj/item/aiModule/paladin - sort_string = "XACAC" - -/datum/design/aimodule/core/tyrant - name = "T.Y.R.A.N.T." - id = "tyrant" - req_tech = list(TECH_DATA = 4, TECH_ILLEGAL = 2, TECH_MATERIAL = 6) - build_path = /obj/item/aiModule/tyrant - sort_string = "XACAD" - -// AI file, AI tool -/datum/design/item/intellicard - name = "'intelliCore', AI preservation and transportation system" - desc = "Allows for the construction of an intelliCore." - id = "intellicore" - req_tech = list(TECH_DATA = 4, TECH_MATERIAL = 4) - materials = list(MAT_GLASS = 1000, MAT_GOLD = 200) - build_path = /obj/item/aicard - sort_string = "VACAA" diff --git a/code/modules/research/designs/bag_of_holding.dm b/code/modules/research/designs/bag_of_holding.dm index 5dd013457956..0e13209e8c35 100644 --- a/code/modules/research/designs/bag_of_holding.dm +++ b/code/modules/research/designs/bag_of_holding.dm @@ -1,23 +1,21 @@ -// Bags of holding +/datum/design/science/boh + abstract_type = /datum/design/science/boh -/datum/design/item/boh/AssembleDesignName() - ..() - name = "Infinite capacity storage prototype ([item_name])" +/datum/design/science/boh/generate_name(template) + return "Bluespace storage prototype ([..()])" -/datum/design/item/boh/bag_holding - name = "Bag of Holding" +/datum/design/science/boh/bag_holding + design_name = "Bag of Holding" desc = "Using localized pockets of bluespace this bag prototype offers incredible storage capacity with the contents weighting nothing. It's a shame the bag itself is pretty heavy." id = "bag_holding" req_tech = list(TECH_BLUESPACE = 4, TECH_MATERIAL = 6) materials = list(MAT_GOLD = 3000, MAT_DIAMOND = 1500, MAT_URANIUM = 250) build_path = /obj/item/storage/backpack/holding - sort_string = "QAAAA" -/datum/design/item/boh/dufflebag_holding - name = "DuffleBag of Holding" +/datum/design/science/boh/dufflebag_holding + design_name = "DuffleBag of Holding" desc = "A minaturized prototype of the popular Bag of Holding, the Dufflebag of Holding is, functionally, identical to the bag of holding, but comes in a more stylish and compact form." id = "duffle-holding" req_tech = list(TECH_BLUESPACE = 4, TECH_MATERIAL = 6) materials = list(MAT_GOLD = 3000, MAT_DIAMOND = 1500, MAT_URANIUM = 250) build_path = /obj/item/storage/backpack/holding/duffle - sort_string = "QAAAB" diff --git a/code/modules/research/designs/beakers.dm b/code/modules/research/designs/beakers.dm index c3929d2d3f6b..d899ec05c5a3 100644 --- a/code/modules/research/designs/beakers.dm +++ b/code/modules/research/designs/beakers.dm @@ -1,22 +1,21 @@ -// Various beakers +/datum/design/science/beaker + abstract_type = /datum/design/science/beaker -/datum/design/item/beaker/AssembleDesignName() - name = "Beaker prototype ([item_name])" +/datum/design/science/beaker/generate_name(template) + return "Beaker prototype ([template])" -/datum/design/item/beaker/noreact - name = "cryostasis" +/datum/design/science/beaker/noreact + design_name = "cryostasis" desc = "A cryostasis beaker that allows for chemical storage without reactions. Can hold up to 50 units." id = "splitbeaker" req_tech = list(TECH_MATERIAL = 2) materials = list(MAT_STEEL = 3000) build_path = /obj/item/reagent_containers/glass/beaker/noreact - sort_string = "IAAAA" -/datum/design/item/beaker/bluespace - name = TECH_BLUESPACE +/datum/design/science/beaker/bluespace + design_name = TECH_BLUESPACE desc = "A bluespace beaker, powered by experimental bluespace technology and Element Cuban combined with the Compound Pete. Can hold up to 300 units." id = "bluespacebeaker" req_tech = list(TECH_BLUESPACE = 2, TECH_MATERIAL = 6) materials = list(MAT_STEEL = 3000, MAT_PHORON = 3000, MAT_DIAMOND = 500) build_path = /obj/item/reagent_containers/glass/beaker/bluespace - sort_string = "IAAAB" diff --git a/code/modules/research/designs/bio_devices.dm b/code/modules/research/designs/bio_devices.dm index bde025472c94..71222e7cc0f6 100644 --- a/code/modules/research/designs/bio_devices.dm +++ b/code/modules/research/designs/bio_devices.dm @@ -1,84 +1,75 @@ -/datum/design/item/biotech +/datum/design/science/biotech + abstract_type = /datum/design/science/biotech materials = list(MAT_STEEL = 30, MAT_GLASS = 20) -/datum/design/item/biotech/AssembleDesignName() - ..() - name = "Biotech device prototype ([item_name])" +/datum/design/science/biotech/generate_name(template) + return "Biotech device prototype ([..()])" // Biotech of various types -/datum/design/item/biotech/mass_spectrometer +/datum/design/science/biotech/mass_spectrometer desc = "A device for analyzing chemicals in blood." id = "mass_spectrometer" req_tech = list(TECH_BIO = 2, TECH_MAGNET = 2) build_path = /obj/item/mass_spectrometer - sort_string = "JAAAA" -/datum/design/item/biotech/adv_mass_spectrometer +/datum/design/science/biotech/adv_mass_spectrometer desc = "A device for analyzing chemicals in blood and their quantities." id = "adv_mass_spectrometer" req_tech = list(TECH_BIO = 2, TECH_MAGNET = 4) build_path = /obj/item/mass_spectrometer/adv - sort_string = "JAAAB" -/datum/design/item/biotech/reagent_scanner +/datum/design/science/biotech/reagent_scanner desc = "A device for identifying chemicals." id = "reagent_scanner" req_tech = list(TECH_BIO = 2, TECH_MAGNET = 2) build_path = /obj/item/reagent_scanner - sort_string = "JAABA" -/datum/design/item/biotech/adv_reagent_scanner +/datum/design/science/biotech/adv_reagent_scanner desc = "A device for identifying chemicals and their proportions." id = "adv_reagent_scanner" req_tech = list(TECH_BIO = 2, TECH_MAGNET = 4) build_path = /obj/item/reagent_scanner/adv - sort_string = "JAABB" -/datum/design/item/biotech/robot_scanner +/datum/design/science/biotech/robot_scanner desc = "A hand-held scanner able to diagnose robotic injuries." id = "robot_scanner" req_tech = list(TECH_MAGNET = 3, TECH_BIO = 2, TECH_ENGINEERING = 3) materials = list(MAT_STEEL = 500, MAT_GLASS = 200) build_path = /obj/item/robotanalyzer - sort_string = "JAACA" -/datum/design/item/biotech/nanopaste +/datum/design/science/biotech/nanopaste desc = "A tube of paste containing swarms of repair nanites. Very effective in repairing robotic machinery." id = "nanopaste" req_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 3) materials = list(MAT_STEEL = 7000, MAT_GLASS = 7000) build_path = /obj/item/stack/nanopaste - sort_string = "JAACB" + legacy_stack_amount = 10 -/datum/design/item/biotech/plant_analyzer +/datum/design/science/biotech/plant_analyzer desc = "A device capable of quickly scanning all relevant data about a plant." id = "plant_analyzer" req_tech = list(TECH_MAGNET = 2, TECH_BIO = 2) materials = list(MAT_STEEL = 500, MAT_GLASS = 500) build_path = /obj/item/analyzer/plant_analyzer - sort_string = "JAADA" -/datum/design/item/biotech/nif - name = "nanite implant framework" +/datum/design/science/biotech/nif + design_name = "nanite implant framework" id = "nif" req_tech = list(TECH_MAGNET = 5, TECH_BLUESPACE = 5, TECH_MATERIAL = 5, TECH_ENGINEERING = 5, TECH_DATA = 5) materials = list(MAT_STEEL = 5000, MAT_GLASS = 8000, MAT_URANIUM = 6000, MAT_DIAMOND = 6000) build_path = /obj/item/nif - sort_string = "JVAAA" -/datum/design/item/biotech/nifbio - name = "bioadaptive NIF" +/datum/design/science/biotech/nifbio + design_name = "bioadaptive NIF" id = "bioadapnif" req_tech = list(TECH_MAGNET = 5, TECH_BLUESPACE = 5, TECH_MATERIAL = 5, TECH_ENGINEERING = 5, TECH_DATA = 5, TECH_BIO = 5) materials = list(MAT_STEEL = 10000, MAT_GLASS = 15000, MAT_URANIUM = 10000, MAT_DIAMOND = 10000) build_path = /obj/item/nif/bioadap - sort_string = "JVAAB" -/datum/design/item/biotech/nifrepairtool - name = "adv. NIF repair tool" +/datum/design/science/biotech/nifrepairtool + design_name = "adv. NIF repair tool" id = "anrt" req_tech = list(TECH_MAGNET = 5, TECH_BLUESPACE = 5, TECH_MATERIAL = 5, TECH_ENGINEERING = 5, TECH_DATA = 5) materials = list(MAT_STEEL = 200, MAT_GLASS = 3000, MAT_URANIUM = 2000, MAT_DIAMOND = 2000) build_path = /obj/item/nifrepairer - sort_string = "JVABA" diff --git a/code/modules/research/designs/circuit_assembly.dm b/code/modules/research/designs/circuit_assembly.dm index 48641d04201d..eefebb0a2137 100644 --- a/code/modules/research/designs/circuit_assembly.dm +++ b/code/modules/research/designs/circuit_assembly.dm @@ -1,99 +1,91 @@ -// Integrated circuits stuff +/datum/design/science/integrated_circuitry + abstract_type = /datum/design/science/integrated_circuitry -/datum/design/item/integrated_circuitry/AssembleDesignName() - ..() - name = "Circuitry device design ([item_name])" +/datum/design/science/integrated_circuitry/generate_name(template) + return "Circuitry device design ([..()])" -/datum/design/item/integrated_circuitry/custom_circuit_printer - name = "Portable integrated circuit printer" +/datum/design/science/integrated_circuitry/custom_circuit_printer + design_name = "Portable integrated circuit printer" desc = "A portable(ish) printer for modular machines." id = "ic_printer" req_tech = list(TECH_MATERIAL = 3, TECH_ENGINEERING = 4, TECH_DATA = 5) materials = list(MAT_STEEL = 10000) build_path = /obj/item/integrated_circuit_printer - sort_string = "UAAAA" -/datum/design/item/integrated_circuitry/custom_circuit_printer_upgrade - name = "Integrated circuit printer upgrade - advanced designs" +/datum/design/science/integrated_circuitry/custom_circuit_printer_upgrade + design_name = "Integrated circuit printer upgrade - advanced designs" desc = "Allows the integrated circuit printer to create advanced circuits" id = "ic_printer_upgrade_adv" req_tech = list(TECH_ENGINEERING = 3, TECH_DATA = 4) materials = list(MAT_STEEL = 2000) build_path = /obj/item/disk/integrated_circuit/upgrade/advanced - sort_string = "UBAAA" -/datum/design/item/integrated_circuitry/wirer - name = "Custom wirer tool" +/datum/design/science/integrated_circuitry/wirer + design_name = "Custom wirer tool" id = "wirer" req_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2) materials = list(MAT_STEEL = 5000, MAT_GLASS = 2500) build_path = /obj/item/integrated_electronics/wirer - sort_string = "UCAAA" -/datum/design/item/integrated_circuitry/debugger - name = "Custom circuit debugger tool" +/datum/design/science/integrated_circuitry/debugger + design_name = "Custom circuit debugger tool" id = "debugger" req_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2) materials = list(MAT_STEEL = 5000, MAT_GLASS = 2500) build_path = /obj/item/integrated_electronics/debugger - sort_string = "UCBBB" // Assemblies -/datum/design/item/integrated_circuitry/assembly/AssembleDesignName() - ..() - name = "Circuitry assembly design ([item_name])" +/datum/design/science/integrated_circuitry/assembly + abstract_type = /datum/design/science/integrated_circuitry/assembly -/datum/design/item/integrated_circuitry/assembly/custom_circuit_assembly_small - name = "Small custom assembly" +/datum/design/science/integrated_circuitry/assembly/generate_name(template) + return "Circuitry assembly design ([..()])" + +/datum/design/science/integrated_circuitry/assembly/custom_circuit_assembly_small + design_name = "Small custom assembly" desc = "A customizable assembly for simple, small devices." id = "assembly-small" req_tech = list(TECH_MATERIAL = 3, TECH_ENGINEERING = 2, TECH_POWER = 2) materials = list(MAT_STEEL = 10000) build_path = /obj/item/electronic_assembly - sort_string = "UDAAA" -/datum/design/item/integrated_circuitry/assembly/custom_circuit_assembly_medium - name = "Medium custom assembly" +/datum/design/science/integrated_circuitry/assembly/custom_circuit_assembly_medium + design_name = "Medium custom assembly" desc = "A customizable assembly suited for more ambitious mechanisms." id = "assembly-medium" req_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 3, TECH_POWER = 3) materials = list(MAT_STEEL = 20000) build_path = /obj/item/electronic_assembly/medium - sort_string = "UDAAB" -/datum/design/item/integrated_circuitry/assembly/custom_circuit_assembly_large - name = "Large custom assembly" +/datum/design/science/integrated_circuitry/assembly/custom_circuit_assembly_large + design_name = "Large custom assembly" desc = "A customizable assembly for large machines." id = "assembly-large" req_tech = list(TECH_MATERIAL = 5, TECH_ENGINEERING = 4, TECH_POWER = 4) materials = list(MAT_STEEL = 40000) build_path = /obj/item/electronic_assembly/large - sort_string = "UDAAC" -/datum/design/item/integrated_circuitry/assembly/custom_circuit_assembly_drone - name = "Drone custom assembly" +/datum/design/science/integrated_circuitry/assembly/custom_circuit_assembly_drone + design_name = "Drone custom assembly" desc = "A customizable assembly optimized for autonomous devices." id = "assembly-drone" req_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 4, TECH_POWER = 4) materials = list(MAT_STEEL = 30000) build_path = /obj/item/electronic_assembly/drone - sort_string = "UDAAD" -/datum/design/item/integrated_circuitry/assembly/custom_circuit_assembly_device - name = "Device custom assembly" +/datum/design/science/integrated_circuitry/assembly/custom_circuit_assembly_device + design_name = "Device custom assembly" desc = "An customizable assembly designed to interface with other devices." id = "assembly-device" req_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2, TECH_POWER = 2) materials = list(MAT_STEEL = 5000) build_path = /obj/item/assembly/electronic_assembly - sort_string = "UDAAE" -/datum/design/item/integrated_circuitry/assembly/custom_circuit_assembly_implant - name = "Implant custom assembly" +/datum/design/science/integrated_circuitry/assembly/custom_circuit_assembly_implant + design_name = "Implant custom assembly" desc = "An customizable assembly for very small devices, implanted into living entities." id = "assembly-implant" req_tech = list(TECH_MATERIAL = 5, TECH_ENGINEERING = 4, TECH_POWER = 3, TECH_BIO = 5) materials = list(MAT_STEEL = 2000) build_path = /obj/item/implant/integrated_circuit - sort_string = "UDAAF" diff --git a/code/modules/research/designs/circuits/ai_modules.dm b/code/modules/research/designs/circuits/ai_modules.dm index 9320253c9370..1619c8194b72 100644 --- a/code/modules/research/designs/circuits/ai_modules.dm +++ b/code/modules/research/designs/circuits/ai_modules.dm @@ -1,107 +1,96 @@ /datum/design/aimodule - build_type = IMPRINTER + abstract_type = /datum/design/aimodule + lathe_type = LATHE_TYPE_CIRCUIT materials = list(MAT_GLASS = 2000, MAT_GOLD = 100) -/datum/design/aimodule/AssembleDesignName() - name = "AI module design ([name])" +/datum/design/aimodule/generate_name(template) + return "AI module design ([template])" -/datum/design/aimodule/AssembleDesignDesc() - desc = "Allows for the construction of \a '[name]' AI module." +/datum/design/aimodule/generate_desc(template_name, template_desc) + return "Allows for the construction of \a '[template_name]' AI module." /datum/design/aimodule/safeguard - name = "Safeguard" + design_name = "Safeguard" id = "safeguard" req_tech = list(TECH_DATA = 3, TECH_MATERIAL = 4) build_path = /obj/item/aiModule/safeguard - sort_string = "XABAA" /datum/design/aimodule/onehuman - name = "OneCrewMember" + design_name = "OneCrewMember" id = "onehuman" req_tech = list(TECH_DATA = 4, TECH_MATERIAL = 6) build_path = /obj/item/aiModule/oneHuman - sort_string = "XABAB" /datum/design/aimodule/protectstation - name = "ProtectStation" + design_name = "ProtectStation" id = "protectstation" req_tech = list(TECH_DATA = 3, TECH_MATERIAL = 6) build_path = /obj/item/aiModule/protectStation - sort_string = "XABAC" /datum/design/aimodule/notele - name = "TeleporterOffline" + design_name = "TeleporterOffline" id = "notele" req_tech = list(TECH_DATA = 3) build_path = /obj/item/aiModule/teleporterOffline - sort_string = "XABAD" /datum/design/aimodule/quarantine - name = "Quarantine" + design_name = "Quarantine" id = "quarantine" req_tech = list(TECH_DATA = 3, TECH_BIO = 2, TECH_MATERIAL = 4) build_path = /obj/item/aiModule/quarantine - sort_string = "XABAE" /datum/design/aimodule/oxygen - name = "OxygenIsToxicToHumans" + design_name = "OxygenIsToxicToHumans" id = "oxygen" req_tech = list(TECH_DATA = 3, TECH_BIO = 2, TECH_MATERIAL = 4) build_path = /obj/item/aiModule/oxygen - sort_string = "XABAF" /datum/design/aimodule/freeform - name = "Freeform" + design_name = "Freeform" id = "freeform" req_tech = list(TECH_DATA = 4, TECH_MATERIAL = 4) build_path = /obj/item/aiModule/freeform - sort_string = "XABAG" /datum/design/aimodule/reset - name = "Reset" + design_name = "Reset" id = "reset" req_tech = list(TECH_DATA = 3, TECH_MATERIAL = 6) build_path = /obj/item/aiModule/reset - sort_string = "XAAAZ" // Duplicate string, really need to redo this whole thing /datum/design/aimodule/purge - name = "Purge" + design_name = "Purge" id = "purge" req_tech = list(TECH_DATA = 4, TECH_MATERIAL = 6) build_path = /obj/item/aiModule/purge - sort_string = "XAAAB" // Core modules /datum/design/aimodule/core + abstract_type = /datum/design/aimodule/core req_tech = list(TECH_DATA = 4, TECH_MATERIAL = 6) -/datum/design/aimodule/core/AssembleDesignName() - name = "AI core module design ([name])" +/datum/design/aimodule/core/generate_name(template) + return "AI core module design ([template])" -/datum/design/aimodule/core/AssembleDesignDesc() - desc = "Allows for the construction of \a '[name]' AI core module." +/datum/design/aimodule/core/generate_desc(template_name, template_desc) + return "Allows for the construction of \a '[template_name]' AI core module." /datum/design/aimodule/core/freeformcore - name = "Freeform" + design_name = "Freeform" id = "freeformcore" build_path = /obj/item/aiModule/freeformcore - sort_string = "XACAA" /datum/design/aimodule/core/asimov - name = "Asimov" + design_name = "Asimov" id = "asimov" build_path = /obj/item/aiModule/asimov - sort_string = "XACAB" /datum/design/aimodule/core/paladin - name = "P.A.L.A.D.I.N." + design_name = "P.A.L.A.D.I.N." id = "paladin" build_path = /obj/item/aiModule/paladin - sort_string = "XACAC" /datum/design/aimodule/core/tyrant - name = "T.Y.R.A.N.T." + design_name = "T.Y.R.A.N.T." id = "tyrant" req_tech = list(TECH_DATA = 4, TECH_ILLEGAL = 2, TECH_MATERIAL = 6) build_path = /obj/item/aiModule/tyrant - sort_string = "XACAD" diff --git a/code/modules/research/designs/circuits/circuits.dm b/code/modules/research/designs/circuits/circuits.dm index 0bf986be1873..54b0e7b545a6 100644 --- a/code/modules/research/designs/circuits/circuits.dm +++ b/code/modules/research/designs/circuits/circuits.dm @@ -3,777 +3,676 @@ CIRCUITS BELOW */ /datum/design/circuit - build_type = IMPRINTER + lathe_type = LATHE_TYPE_CIRCUIT req_tech = list(TECH_DATA = 2) materials = list(MAT_GLASS = 2000) - chemicals = list("sacid" = 20) - time = 5 + reagents = list("sacid" = 20) + work = (5 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. -/datum/design/circuit/AssembleDesignName() - ..() +/datum/design/circuit/generate_name(template) if(build_path) var/obj/item/circuitboard/C = build_path if(initial(C.board_type) == "machine") - name = "Machine circuit design ([item_name])" + return "Machine circuit design ([..()])" else if(initial(C.board_type) == "computer") - name = "Computer circuit design ([item_name])" + return "Computer circuit design ([..()])" else - name = "Circuit design ([item_name])" + return "Circuit design ([..()])" -/datum/design/circuit/AssembleDesignDesc() - if(!desc) - desc = "Allows for the construction of \a [item_name] circuit board." +/datum/design/circuit/generate_desc(template_name, template_desc) + return "Allows for the construction of \a [build_name] circuit board." /datum/design/circuit/arcademachine - name = "battle arcade machine" + design_name = "battle arcade machine" id = "arcademachine" req_tech = list(TECH_DATA = 1) build_path = /obj/item/circuitboard/arcade/battle - sort_string = "MAAAA" /datum/design/circuit/oriontrail - name = "orion trail arcade machine" + design_name = "orion trail arcade machine" id = "oriontrail" req_tech = list(TECH_DATA = 1) build_path = /obj/item/circuitboard/arcade/orion_trail - sort_string = "MAAAB" // Duplicate string, really need to redo this whole thing /datum/design/circuit/clawmachine - name = "grab-a-gift arcade machine" + design_name = "grab-a-gift arcade machine" id = "clawmachine" req_tech = list(TECH_DATA = 1) build_path = /obj/item/circuitboard/arcade/clawmachine - sort_string = "MAAAC" /datum/design/circuit/jukebox - name = "jukebox" + design_name = "jukebox" id = "jukebox" req_tech = list(TECH_MAGNET = 2, TECH_DATA = 1) build_path = /obj/item/circuitboard/jukebox - sort_string = "MAAAO" /datum/design/circuit/seccamera - name = "security camera monitor" + design_name = "security camera monitor" id = "seccamera" build_path = /obj/item/circuitboard/security - sort_string = "DAAAZ" // Duplicate string, really need to redo this whole thing /datum/design/circuit/secdata - name = "security records console" + design_name = "security records console" id = "sec_data" build_path = /obj/item/circuitboard/secure_data - sort_string = "DABAA" /datum/design/circuit/prisonmanage - name = "prisoner management console" + design_name = "prisoner management console" id = "prisonmanage" build_path = /obj/item/circuitboard/prisoner - sort_string = "DACAA" /datum/design/circuit/med_data - name = "medical records console" + design_name = "medical records console" id = "med_data" build_path = /obj/item/circuitboard/med_data - sort_string = "FAAAA" /datum/design/circuit/operating - name = "patient monitoring console" + design_name = "patient monitoring console" id = "operating" build_path = /obj/item/circuitboard/operating - sort_string = "FACAA" /datum/design/circuit/scan_console - name = "DNA machine" + design_name = "DNA machine" id = "scan_console" build_path = /obj/item/circuitboard/scan_consolenew - sort_string = "FAGAA" /datum/design/circuit/clonecontrol - name = "cloning control console" + design_name = "cloning control console" id = "clonecontrol" req_tech = list(TECH_DATA = 3, TECH_BIO = 3) build_path = /obj/item/circuitboard/cloning - sort_string = "FAGAC" /datum/design/circuit/clonepod - name = "clone pod" + design_name = "clone pod" id = "clonepod" req_tech = list(TECH_DATA = 3, TECH_BIO = 3) build_path = /obj/item/circuitboard/clonepod - sort_string = "FAGAE" /datum/design/circuit/clonescanner - name = "cloning scanner" + design_name = "cloning scanner" id = "clonescanner" req_tech = list(TECH_DATA = 3, TECH_BIO = 3) build_path = /obj/item/circuitboard/clonescanner - sort_string = "FAGAG" /datum/design/circuit/crewconsole - name = "crew monitoring console" + design_name = "crew monitoring console" id = "crewconsole" req_tech = list(TECH_DATA = 3, TECH_MAGNET = 2, TECH_BIO = 2) build_path = /obj/item/circuitboard/crew - sort_string = "FAGAI" /datum/design/circuit/teleconsole - name = "teleporter control console" + design_name = "teleporter control console" id = "teleconsole" req_tech = list(TECH_DATA = 3, TECH_BLUESPACE = 2) build_path = /obj/item/circuitboard/teleporter - sort_string = "HAAAA" /datum/design/circuit/robocontrol - name = "robotics control console" + design_name = "robotics control console" id = "robocontrol" req_tech = list(TECH_DATA = 4) build_path = /obj/item/circuitboard/robotics - sort_string = "HAAAB" /datum/design/circuit/mechacontrol - name = "exosuit control console" + design_name = "exosuit control console" id = "mechacontrol" req_tech = list(TECH_DATA = 3) build_path = /obj/item/circuitboard/mecha_control - sort_string = "HAAAC" /datum/design/circuit/rdconsole - name = "R&D control console" + design_name = "R&D control console" id = "rdconsole" req_tech = list(TECH_DATA = 4) build_path = /obj/item/circuitboard/rdconsole - sort_string = "HAAAE" /datum/design/circuit/aifixer - name = "AI integrity restorer" + design_name = "AI integrity restorer" id = "aifixer" req_tech = list(TECH_DATA = 3, TECH_BIO = 2) build_path = /obj/item/circuitboard/aifixer - sort_string = "HAAAF" /datum/design/circuit/comm_monitor - name = "telecommunications monitoring console" + design_name = "telecommunications monitoring console" id = "comm_monitor" req_tech = list(TECH_DATA = 3) build_path = /obj/item/circuitboard/comm_monitor - sort_string = "HAACA" /datum/design/circuit/comm_server - name = "telecommunications server monitoring console" + design_name = "telecommunications server monitoring console" id = "comm_server" req_tech = list(TECH_DATA = 3) build_path = /obj/item/circuitboard/comm_server - sort_string = "HAACB" /datum/design/circuit/message_monitor - name = "messaging monitor console" + design_name = "messaging monitor console" id = "message_monitor" req_tech = list(TECH_DATA = 5) build_path = /obj/item/circuitboard/message_monitor - sort_string = "HAACC" /datum/design/circuit/aiupload - name = "AI upload console" + design_name = "AI upload console" id = "aiupload" req_tech = list(TECH_DATA = 4) build_path = /obj/item/circuitboard/aiupload - sort_string = "HAABA" /datum/design/circuit/borgupload - name = "cyborg upload console" + design_name = "cyborg upload console" id = "borgupload" req_tech = list(TECH_DATA = 4) build_path = /obj/item/circuitboard/borgupload - sort_string = "HAABB" /datum/design/circuit/destructive_analyzer - name = "destructive analyzer" + design_name = "destructive analyzer" id = "destructive_analyzer" req_tech = list(TECH_DATA = 2, TECH_MAGNET = 2, TECH_ENGINEERING = 2) build_path = /obj/item/circuitboard/destructive_analyzer - sort_string = "HABAA" /datum/design/circuit/protolathe - name = "protolathe" + design_name = "protolathe" id = "protolathe" req_tech = list(TECH_DATA = 2, TECH_ENGINEERING = 2) build_path = /obj/item/circuitboard/protolathe - sort_string = "HABAB" /datum/design/circuit/circuit_imprinter - name = "circuit imprinter" + design_name = "circuit imprinter" id = "circuit_imprinter" req_tech = list(TECH_DATA = 2, TECH_ENGINEERING = 2) build_path = /obj/item/circuitboard/circuit_imprinter - sort_string = "HABAC" /datum/design/circuit/autolathe - name = "autolathe board" + design_name = "autolathe board" id = "autolathe" req_tech = list(TECH_DATA = 2, TECH_ENGINEERING = 2) - build_path = /obj/item/circuitboard/autolathe - sort_string = "HABAD" + build_path = /obj/item/circuitboard/machine/lathe/autolathe /datum/design/circuit/rdservercontrol - name = "R&D server control console" + design_name = "R&D server control console" id = "rdservercontrol" req_tech = list(TECH_DATA = 3) build_path = /obj/item/circuitboard/rdservercontrol - sort_string = "HABBA" /datum/design/circuit/rdserver - name = "R&D server" + design_name = "R&D server" id = "rdserver" req_tech = list(TECH_DATA = 3) build_path = /obj/item/circuitboard/rdserver - sort_string = "HABBB" /datum/design/circuit/mechfab - name = "exosuit fabricator" + design_name = "exosuit fabricator" id = "mechfab" req_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 3) build_path = /obj/item/circuitboard/mechfab - sort_string = "HABAE" /datum/design/circuit/prosfab - name = "prosthetics fabricator" + design_name = "prosthetics fabricator" id = "prosfab" req_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 3) build_path = /obj/item/circuitboard/prosthetics - sort_string = "HABAF" /datum/design/circuit/mech_recharger - name = "mech recharger" + design_name = "mech recharger" id = "mech_recharger" req_tech = list(TECH_DATA = 2, TECH_POWER = 2, TECH_ENGINEERING = 2) build_path = /obj/item/circuitboard/mech_recharger - sort_string = "HACAA" /datum/design/circuit/recharge_station - name = "cyborg recharge station" + design_name = "cyborg recharge station" id = "recharge_station" req_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 2) build_path = /obj/item/circuitboard/recharge_station - sort_string = "HACAC" /datum/design/circuit/atmosalerts - name = "atmosphere alert console" + design_name = "atmosphere alert console" id = "atmosalerts" build_path = /obj/item/circuitboard/atmos_alert - sort_string = "JAAAA" /datum/design/circuit/air_management - name = "atmosphere monitoring console" + design_name = "atmosphere monitoring console" id = "air_management" build_path = /obj/item/circuitboard/air_management - sort_string = "JAAAB" /datum/design/circuit/rcon_console - name = "RCON remote control console" + design_name = "RCON remote control console" id = "rcon_console" req_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 3, TECH_POWER = 5) build_path = /obj/item/circuitboard/rcon_console - sort_string = "JAAAC" /datum/design/circuit/dronecontrol - name = "drone control console" + design_name = "drone control console" id = "dronecontrol" req_tech = list(TECH_DATA = 4) build_path = /obj/item/circuitboard/drone_control - sort_string = "JAAAD" /datum/design/circuit/powermonitor - name = "power monitoring console" + design_name = "power monitoring console" id = "powermonitor" build_path = /obj/item/circuitboard/powermonitor - sort_string = "JAAAE" /datum/design/circuit/solarcontrol - name = "solar control console" + design_name = "solar control console" id = "solarcontrol" build_path = /obj/item/circuitboard/solar_control - sort_string = "JAAAF" /* /datum/design/circuit/shutoff_monitor - name = "Automatic shutoff valve monitor" + design_name = "Automatic shutoff valve monitor" id = "shutoff_monitor" req_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 3) build_path = /obj/item/circuitboard/shutoff_monitor - sort_string = "JAAAG" */ /datum/design/circuit/pacman - name = "PACMAN-type generator" + design_name = "PACMAN-type generator" id = "pacman" req_tech = list(TECH_DATA = 3, TECH_PHORON = 3, TECH_POWER = 3, TECH_ENGINEERING = 3) build_path = /obj/item/circuitboard/pacman - sort_string = "JBAAA" /datum/design/circuit/superpacman - name = "SUPERPACMAN-type generator" + design_name = "SUPERPACMAN-type generator" id = "superpacman" req_tech = list(TECH_DATA = 3, TECH_POWER = 4, TECH_ENGINEERING = 4) build_path = /obj/item/circuitboard/pacman/super - sort_string = "JBAAB" /datum/design/circuit/mrspacman - name = "MRSPACMAN-type generator" + design_name = "MRSPACMAN-type generator" id = "mrspacman" req_tech = list(TECH_DATA = 3, TECH_POWER = 5, TECH_ENGINEERING = 5) build_path = /obj/item/circuitboard/pacman/mrs - sort_string = "JBAAC" /datum/design/circuit/batteryrack - name = "cell rack PSU" + design_name = "cell rack PSU" id = "batteryrack" req_tech = list(TECH_POWER = 3, TECH_ENGINEERING = 2) build_path = /obj/item/circuitboard/batteryrack - sort_string = "JBABA" /datum/design/circuit/smes_cell - name = "'SMES' superconductive magnetic energy storage" + design_name = "'SMES' superconductive magnetic energy storage" desc = "Allows for the construction of circuit boards used to build a SMES." id = "smes_cell" req_tech = list(TECH_POWER = 7, TECH_ENGINEERING = 5) build_path = /obj/item/circuitboard/smes - sort_string = "JBABB" /datum/design/circuit/grid_checker - name = "power grid checker" + design_name = "power grid checker" desc = "Allows for the construction of circuit boards used to build a grid checker." id = "grid_checker" req_tech = list(TECH_POWER = 4, TECH_ENGINEERING = 3) build_path = /obj/item/circuitboard/grid_checker - sort_string = "JBABC" /datum/design/circuit/breakerbox - name = "breaker box" + design_name = "breaker box" desc = "Allows for the construction of circuit boards used to build a breaker box." id = "breakerbox" req_tech = list(TECH_POWER = 3, TECH_ENGINEERING = 3) build_path = /obj/item/circuitboard/breakerbox - sort_string = "JBABD" /datum/design/circuit/gas_heater - name = "gas heating system" + design_name = "gas heating system" id = "gasheater" req_tech = list(TECH_POWER = 2, TECH_ENGINEERING = 1) build_path = /obj/item/circuitboard/unary_atmos/heater - sort_string = "JCAAA" /datum/design/circuit/gas_cooler - name = "gas cooling system" + design_name = "gas cooling system" id = "gascooler" req_tech = list(TECH_MAGNET = 2, TECH_ENGINEERING = 2) build_path = /obj/item/circuitboard/unary_atmos/cooler - sort_string = "JCAAB" /datum/design/circuit/secure_airlock - name = "secure airlock electronics" + design_name = "secure airlock electronics" desc = "Allows for the construction of a tamper-resistant airlock electronics." id = "securedoor" req_tech = list(TECH_DATA = 3) build_path = /obj/item/airlock_electronics/secure - sort_string = "JDAAA" /datum/design/circuit/ordercomp - name = "supply ordering console" + design_name = "supply ordering console" id = "ordercomp" build_path = /obj/item/circuitboard/supplycomp - sort_string = "KAAAY" // Duplicate string, really need to redo this whole thing /datum/design/circuit/supplycomp - name = "supply control console" + design_name = "supply control console" id = "supplycomp" req_tech = list(TECH_DATA = 3) build_path = /obj/item/circuitboard/supplycomp/control - sort_string = "KAAAZ" // Duplicate string, really need to redo this whole thing /datum/design/circuit/biogenerator - name = "biogenerator" + design_name = "biogenerator" id = "biogenerator" req_tech = list(TECH_DATA = 2) build_path = /obj/item/circuitboard/biogenerator - sort_string = "KBAAA" /datum/design/circuit/miningdrill - name = "mining drill head" + design_name = "mining drill head" id = "mining drill head" req_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1) build_path = /obj/item/circuitboard/miningdrill - sort_string = "KCAAA" /datum/design/circuit/miningdrillbrace - name = "mining drill brace" + design_name = "mining drill brace" id = "mining drill brace" req_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1) build_path = /obj/item/circuitboard/miningdrillbrace - sort_string = "KCAAB" /datum/design/circuit/comconsole - name = "communications console" + design_name = "communications console" id = "comconsole" build_path = /obj/item/circuitboard/communications - sort_string = "LAAAA" /datum/design/circuit/idcardconsole - name = "ID card modification console" + design_name = "ID card modification console" id = "idcardconsole" build_path = /obj/item/circuitboard/card - sort_string = "LAAAB" /datum/design/circuit/emp_data - name = "employment records console" + design_name = "employment records console" id = "emp_data" build_path = /obj/item/circuitboard/skills - sort_string = "LAAAC" /datum/design/circuit/arf_generator - name = "atmospheric field generator" + design_name = "atmospheric field generator" id = "arf_generator" req_tech = list(TECH_MAGNET = 4, TECH_POWER = 4, TECH_BIO = 3) build_path = /obj/item/circuitboard/arf_generator - sort_string = "LAAAD" /datum/design/circuit/mecha + abstract_type = /datum/design/circuit/mecha req_tech = list(TECH_DATA = 3) -/datum/design/circuit/mecha/AssembleDesignName() - name = "Exosuit module circuit design ([name])" -/datum/design/circuit/mecha/AssembleDesignDesc() - desc = "Allows for the construction of \a [name] module." +/datum/design/circuit/mecha/generate_name(template) + return "Exosuit module circuit design ([template])" + +/datum/design/circuit/mecha/generate_desc(template_name, template_desc) + return "Allows for the construction of \a [template_name] module." /datum/design/circuit/mecha/ripley_main - name = "APLU 'Ripley' central control" + design_name = "APLU 'Ripley' central control" id = "ripley_main" build_path = /obj/item/circuitboard/mecha/ripley/main - sort_string = "NAAAA" /datum/design/circuit/mecha/ripley_peri - name = "APLU 'Ripley' peripherals control" + design_name = "APLU 'Ripley' peripherals control" id = "ripley_peri" build_path = /obj/item/circuitboard/mecha/ripley/peripherals - sort_string = "NAAAB" /datum/design/circuit/mecha/odysseus_main - name = "'Odysseus' central control" + design_name = "'Odysseus' central control" id = "odysseus_main" req_tech = list(TECH_DATA = 3,TECH_BIO = 2) build_path = /obj/item/circuitboard/mecha/odysseus/main - sort_string = "NAABA" /datum/design/circuit/mecha/odysseus_peri - name = "'Odysseus' peripherals control" + design_name = "'Odysseus' peripherals control" id = "odysseus_peri" req_tech = list(TECH_DATA = 3,TECH_BIO = 2) build_path = /obj/item/circuitboard/mecha/odysseus/peripherals - sort_string = "NAABB" /datum/design/circuit/mecha/gygax_main - name = "'Gygax' central control" + design_name = "'Gygax' central control" id = "gygax_main" req_tech = list(TECH_DATA = 4) build_path = /obj/item/circuitboard/mecha/gygax/main - sort_string = "NAACA" /datum/design/circuit/mecha/gygax_peri - name = "'Gygax' peripherals control" + design_name = "'Gygax' peripherals control" id = "gygax_peri" req_tech = list(TECH_DATA = 4) build_path = /obj/item/circuitboard/mecha/gygax/peripherals - sort_string = "NAACB" /datum/design/circuit/mecha/gygax_targ - name = "'Gygax' weapon control and targeting" + design_name = "'Gygax' weapon control and targeting" id = "gygax_targ" req_tech = list(TECH_DATA = 4, TECH_COMBAT = 2) build_path = /obj/item/circuitboard/mecha/gygax/targeting - sort_string = "NAACC" /datum/design/circuit/mecha/gygax_medical - name = "'Serenity' medical control" + design_name = "'Serenity' medical control" id = "gygax_medical" req_tech = list(TECH_DATA = 4, TECH_BIO = 2) build_path = /obj/item/circuitboard/mecha/gygax/medical - sort_string = "NAACD" /datum/design/circuit/mecha/durand_main - name = "'Durand' central control" + design_name = "'Durand' central control" id = "durand_main" req_tech = list(TECH_DATA = 4) build_path = /obj/item/circuitboard/mecha/durand/main - sort_string = "NAADA" /datum/design/circuit/mecha/durand_peri - name = "'Durand' peripherals control" + design_name = "'Durand' peripherals control" id = "durand_peri" req_tech = list(TECH_DATA = 4) build_path = /obj/item/circuitboard/mecha/durand/peripherals - sort_string = "NAADB" /datum/design/circuit/mecha/durand_targ - name = "'Durand' weapon control and targeting" + design_name = "'Durand' weapon control and targeting" id = "durand_targ" req_tech = list(TECH_DATA = 4, TECH_COMBAT = 2) build_path = /obj/item/circuitboard/mecha/durand/targeting - sort_string = "NAADC" /datum/design/circuit/mecha/honker_main - name = "'H.O.N.K.' central control" + design_name = "'H.O.N.K.' central control" id = "honker_main" req_tech = list(TECH_DATA = 4, TECH_ILLEGAL = 4) build_path = /obj/item/circuitboard/mecha/honker/main - sort_string = "NAAEA" /datum/design/circuit/mecha/honker_peri - name = "'H.O.N.K.' peripherals control" + design_name = "'H.O.N.K.' peripherals control" id = "honker_peri" req_tech = list(TECH_DATA = 4, TECH_ILLEGAL = 4) build_path = /obj/item/circuitboard/mecha/honker/peripherals - sort_string = "NAAEB" /datum/design/circuit/mecha/honker_targ - name = "'H.O.N.K.' weapon control and targeting" + design_name = "'H.O.N.K.' weapon control and targeting" id = "honker_targ" req_tech = list(TECH_DATA = 4, TECH_COMBAT = 2, TECH_ILLEGAL = 4) build_path = /obj/item/circuitboard/mecha/honker/targeting - sort_string = "NAAEC" /datum/design/circuit/mecha/reticent_main - name = "'Reticent' central control" + design_name = "'Reticent' central control" id = "reticent_main" req_tech = list(TECH_DATA = 5, TECH_ILLEGAL = 4) build_path = /obj/item/circuitboard/mecha/reticent/main - sort_string = "NAAFA" /datum/design/circuit/mecha/reticent_peri - name = "'Reticent' peripherals control" + design_name = "'Reticent' peripherals control" id = "reticent_peri" req_tech = list(TECH_DATA = 5, TECH_ILLEGAL = 4) build_path = /obj/item/circuitboard/mecha/reticent/peripherals - sort_string = "NAAFB" /datum/design/circuit/mecha/reticent_targ - name = "'Reticent' weapon control and targeting" + design_name = "'Reticent' weapon control and targeting" id = "reticent_targ" req_tech = list(TECH_DATA = 5, TECH_COMBAT = 2, TECH_ILLEGAL = 4) build_path = /obj/item/circuitboard/mecha/reticent/targeting - sort_string = "NAAFC" ///Fighters/// +/datum/design/circuit/mecha/fighter + abstract_type = /datum/design/circuit/mecha/fighter + //Pinnace// /datum/design/circuit/mecha/fighter/pinnace_main - name = "Pinnace central control board" + design_name = "Pinnace central control board" id = "pinnace_main" req_tech = list(TECH_DATA = 3, TECH_POWER = 4) build_path = /obj/item/circuitboard/mecha/fighter/pinnace/main - sort_string = "NAAGA" /datum/design/circuit/mecha/fighter/pinnace_flight - name = "Pinnace flight control board" + design_name = "Pinnace flight control board" id = "pinnace_flight" req_tech = list(TECH_DATA = 3, TECH_POWER = 4) build_path = /obj/item/circuitboard/mecha/fighter/pinnace/flight - sort_string = "NAAGB" /datum/design/circuit/mecha/fighter/pinnace_targeting - name = "Pinnace weapon control and targeting board" + design_name = "Pinnace weapon control and targeting board" id = "pinnace_targeting" req_tech = list(TECH_DATA = 3, TECH_POWER = 4) build_path = /obj/item/circuitboard/mecha/fighter/pinnace/targeting - sort_string = "NAAGC" /datum/design/circuit/mecha/fighter/pinnace_cockpit_control - name = "Pinnace manual flight control instruments" + design_name = "Pinnace manual flight control instruments" id = "pinnace_cockpit_control" req_tech = list(TECH_DATA = 3, TECH_POWER = 4) build_path = /obj/item/circuitboard/mecha/fighter/pinnace/cockpitboard - sort_string = "NAAGD" //Baron// /datum/design/circuit/mecha/fighter/baron_main - name = "Baron central control board" + design_name = "Baron central control board" id = "baron_main" req_tech = list(TECH_DATA = 5, TECH_POWER = 4) build_path = /obj/item/circuitboard/mecha/fighter/baron/main - sort_string = "NAAHA" /datum/design/circuit/mecha/fighter/baron_flight - name = "Baron flight control board" + design_name = "Baron flight control board" id = "baron_flight" req_tech = list(TECH_DATA = 5, TECH_POWER = 4) build_path = /obj/item/circuitboard/mecha/fighter/baron/flight - sort_string = "NAAHB" /datum/design/circuit/mecha/fighter/baron_targeting - name = "Baron weapon control and targeting board" + design_name = "Baron weapon control and targeting board" id = "baron_targeting" req_tech = list(TECH_DATA = 5, TECH_POWER = 4, TECH_COMBAT = 3) build_path = /obj/item/circuitboard/mecha/fighter/baron/targeting - sort_string = "NAAHC" /datum/design/circuit/mecha/fighter/baron_cockpit_control - name = "Baron manual flight control instruments" + design_name = "Baron manual flight control instruments" id = "baron_cockpit_control" req_tech = list(TECH_DATA = 5, TECH_POWER = 4, TECH_COMBAT = 3) build_path = /obj/item/circuitboard/mecha/fighter/baron/cockpitboard - sort_string = "NAAHD" //Duke// /datum/design/circuit/mecha/fighter/duke_main - name = "Duke central control board" + design_name = "Duke central control board" id = "duke_main" req_tech = list(TECH_DATA = 5, TECH_POWER = 4) build_path = /obj/item/circuitboard/mecha/fighter/duke/main - sort_string = "NAAIA" /datum/design/circuit/mecha/fighter/duke_flight - name = "Duke flight control board" + design_name = "Duke flight control board" id = "duke_flight" req_tech = list(TECH_DATA = 5, TECH_POWER = 4) build_path = /obj/item/circuitboard/mecha/fighter/duke/flight - sort_string = "NAAIB" /datum/design/circuit/mecha/fighter/duke_targeting - name = "Duke weapon control and targeting board" + design_name = "Duke weapon control and targeting board" id = "duke_targeting" req_tech = list(TECH_DATA = 5, TECH_POWER = 4, TECH_COMBAT = 3) build_path = /obj/item/circuitboard/mecha/fighter/duke/targeting - sort_string = "NAAIC" /datum/design/circuit/mecha/fighter/duke_cockpit_control - name = "Duke manual flight control instruments" + design_name = "Duke manual flight control instruments" id = "duke_cockpit_control" req_tech = list(TECH_DATA = 5, TECH_POWER = 4, TECH_COMBAT = 3) build_path = /obj/item/circuitboard/mecha/fighter/duke/cockpitboard - sort_string = "NAAID" //Tcomms// /datum/design/circuit/tcom + abstract_type = /datum/design/circuit/tcom req_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 4) -/datum/design/circuit/tcom/AssembleDesignName() - name = "Telecommunications machinery circuit design ([name])" -/datum/design/circuit/tcom/AssembleDesignDesc() - desc = "Allows for the construction of a telecommunications [name] circuit board." +/datum/design/circuit/tcom/generate_name(template) + return "Telecommunications machinery circuit design ([template])" + +/datum/design/circuit/tcom/generate_desc(template_name, template_desc) + return "Allows for the construction of a telecommunications [template_name] circuit board." /datum/design/circuit/tcom/server - name = "server mainframe" + design_name = "server mainframe" id = "tcom-server" build_path = /obj/item/circuitboard/telecomms/server - sort_string = "PAAAA" /datum/design/circuit/tcom/processor - name = "processor unit" + design_name = "processor unit" id = "tcom-processor" build_path = /obj/item/circuitboard/telecomms/processor - sort_string = "PAAAB" /datum/design/circuit/tcom/bus - name = "bus mainframe" + design_name = "bus mainframe" id = "tcom-bus" build_path = /obj/item/circuitboard/telecomms/bus - sort_string = "PAAAC" /datum/design/circuit/tcom/hub - name = "hub mainframe" + design_name = "hub mainframe" id = "tcom-hub" build_path = /obj/item/circuitboard/telecomms/hub - sort_string = "PAAAD" /datum/design/circuit/tcom/relay - name = "relay mainframe" + design_name = "relay mainframe" id = "tcom-relay" req_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 4, TECH_BLUESPACE = 3) build_path = /obj/item/circuitboard/telecomms/relay - sort_string = "PAAAE" /datum/design/circuit/tcom/broadcaster - name = "subspace broadcaster" + design_name = "subspace broadcaster" id = "tcom-broadcaster" req_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 4, TECH_BLUESPACE = 2) build_path = /obj/item/circuitboard/telecomms/broadcaster - sort_string = "PAAAF" /datum/design/circuit/tcom/receiver - name = "subspace receiver" + design_name = "subspace receiver" id = "tcom-receiver" req_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 3, TECH_BLUESPACE = 2) build_path = /obj/item/circuitboard/telecomms/receiver - sort_string = "PAAAG" /datum/design/circuit/tcom/exonet_node - name = "exonet node" + design_name = "exonet node" id = "tcom-exonet_node" req_tech = list(TECH_DATA = 5, TECH_ENGINEERING = 5, TECH_BLUESPACE = 4) build_path = /obj/item/circuitboard/telecomms/exonet_node - sort_string = "PAAAH" /datum/design/circuit/ntnet_relay - name = "NTNet Quantum Relay" + design_name = "NTNet Quantum Relay" id = "ntnet_relay" req_tech = list(TECH_DATA = 4) build_path = /obj/item/circuitboard/ntnet_relay - sort_string = "WAAAA" /datum/design/circuit/aicore - name = "AI core" + design_name = "AI core" id = "aicore" req_tech = list(TECH_DATA = 4, TECH_BIO = 3) build_path = /obj/item/circuitboard/aicore - sort_string = "XAAAA" /datum/design/circuit/fossilrevive - name = "Fossil DNA extractor" + design_name = "Fossil DNA extractor" id = "fossilrevive" req_tech = list(TECH_DATA = 4, TECH_BIO = 3) build_path = /obj/item/circuitboard/dnarevive - sort_string = "ZAAAA" /datum/design/circuit/shield_generator - name = "shield generator" + design_name = "shield generator" id = "shield_generator" req_tech = list(TECH_MAGNET = 3, TECH_POWER = 4, TECH_BLUESPACE = 2, TECH_ENGINEERING = 3) build_path = /obj/item/circuitboard/shield_generator - sort_string = "OAAAA" /datum/design/circuit/shield_diffuser - name = "shield diffuser" + design_name = "shield diffuser" id = "shield_diffuser" req_tech = list(TECH_MAGNET = 4, TECH_POWER = 2, TECH_ENGINEERING = 5) build_path = /obj/item/circuitboard/shield_diffuser - sort_string = "OAAAB" /datum/design/circuit/pointdefense - name = "point defense battery" + design_name = "point defense battery" id = "pointdefense" req_tech = list(TECH_DATA = 2, TECH_ENGINEERING = 3, TECH_COMBAT = 4) build_path = /obj/item/circuitboard/pointdefense - sort_string = "OAABA" /datum/design/circuit/pointdefense_control - name = "point defense control" //Once upon a time, this was called a deluxe microwave. + design_name = "point defense control" //Once upon a time, this was called a deluxe microwave. id = "pointdefense_control" req_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 3, TECH_COMBAT = 2) build_path = /obj/item/circuitboard/pointdefense_control - sort_string = "OAABB" /datum/design/circuit/massive_gas_pump - name = "High performance gas pump" + design_name = "High performance gas pump" id = "massive_gas_pump" req_tech = list(TECH_ENGINEERING = 3) build_path = /obj/item/circuitboard/massive_gas_pump - sort_string = "OAABC" /datum/design/circuit/massive_heat_pump - name = "High performance heat pump" + design_name = "High performance heat pump" id = "massive_heat_pump" req_tech = list(TECH_ENGINEERING = 4) build_path = /obj/item/circuitboard/massive_heat_pump - sort_string = "OAABD" diff --git a/code/modules/research/designs/circuits/circuits_vr.dm b/code/modules/research/designs/circuits/circuits_vr.dm index d8b24c371e32..279f09985e9e 100644 --- a/code/modules/research/designs/circuits/circuits_vr.dm +++ b/code/modules/research/designs/circuits/circuits_vr.dm @@ -1,149 +1,116 @@ /datum/design/circuit/algae_farm - name = "Algae Oxygen Generator" + design_name = "Algae Oxygen Generator" id = "algae_farm" req_tech = list(TECH_ENGINEERING = 3, TECH_BIO = 2) build_path = /obj/item/circuitboard/algae_farm - sort_string = "HABAE" /datum/design/circuit/thermoregulator - name = "thermal regulator" + design_name = "thermal regulator" id = "thermoregulator" req_tech = list(TECH_ENGINEERING = 4, TECH_POWER = 3) build_path = /obj/item/circuitboard/thermoregulator - sort_string = "HABAF" /datum/design/circuit/bomb_tester - name = "Explosive Effect Simulator" + design_name = "Explosive Effect Simulator" id = "bomb_tester" req_tech = list(TECH_PHORON = 3, TECH_DATA = 2, TECH_MAGNET = 2) build_path = /obj/item/circuitboard/bomb_tester - sort_string = "HABAG" /datum/design/circuit/quantum_pad - name = "Quantum Pad" - id = "quantum_pad" + design_name = "Quantum Pad" + id = "QuantumPadCircuit" req_tech = list(TECH_ENGINEERING = 4, TECH_POWER = 4, TECH_BLUESPACE = 4, TECH_PRECURSOR = 1) build_path = /obj/item/circuitboard/quantumpad - sort_string = "HABAH" //////Micro mech stuff /datum/design/circuit/mecha/gopher_main - name = "'Gopher' central control" + design_name = "'Gopher' central control" id = "gopher_main" build_path = /obj/item/circuitboard/mecha/gopher/main - sort_string = "NAAEA" /datum/design/circuit/mecha/gopher_peri - name = "'Gopher' peripherals control" + design_name = "'Gopher' peripherals control" id = "gopher_peri" build_path = /obj/item/circuitboard/mecha/gopher/peripherals - sort_string = "NAAEB" /datum/design/circuit/mecha/polecat_main - name = "'Polecat' central control" + design_name = "'Polecat' central control" id = "polecat_main" req_tech = list(TECH_DATA = 4) build_path = /obj/item/circuitboard/mecha/polecat/main - sort_string = "NAAFA" /datum/design/circuit/mecha/polecat_peri - name = "'Polecat' peripherals control" + design_name = "'Polecat' peripherals control" id = "polecat_peri" req_tech = list(TECH_DATA = 4) build_path = /obj/item/circuitboard/mecha/polecat/peripherals - sort_string = "NAAFB" /datum/design/circuit/mecha/polecat_targ - name = "'Polecat' weapon control and targeting" + design_name = "'Polecat' weapon control and targeting" id = "polecat_targ" req_tech = list(TECH_DATA = 4, TECH_COMBAT = 2) build_path = /obj/item/circuitboard/mecha/polecat/targeting - sort_string = "NAAFC" /datum/design/circuit/mecha/weasel_main - name = "'Weasel' central control" + design_name = "'Weasel' central control" id = "weasel_main" req_tech = list(TECH_DATA = 4) build_path = /obj/item/circuitboard/mecha/weasel/main - sort_string = "NAAGA" /datum/design/circuit/mecha/weasel_peri - name = "'Weasel' peripherals control" + design_name = "'Weasel' peripherals control" id = "weasel_peri" req_tech = list(TECH_DATA = 4) build_path = /obj/item/circuitboard/mecha/weasel/peripherals - sort_string = "NAAGB" /datum/design/circuit/mecha/weasel_targ - name = "'Weasel' weapon control and targeting" + design_name = "'Weasel' weapon control and targeting" id = "weasel_targ" req_tech = list(TECH_DATA = 4, TECH_COMBAT = 2) build_path = /obj/item/circuitboard/mecha/weasel/targeting - sort_string = "NAAGC" /datum/design/circuit/transhuman_clonepod - name = "grower pod" + design_name = "grower pod" id = "transhuman_clonepod" req_tech = list(TECH_DATA = 3, TECH_BIO = 3) build_path = /obj/item/circuitboard/transhuman_clonepod - sort_string = "HAADA" /datum/design/circuit/transhuman_synthprinter - name = "SynthFab 3000" + design_name = "SynthFab 3000" id = "transhuman_synthprinter" req_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 3) build_path = /obj/item/circuitboard/transhuman_synthprinter - sort_string = "HAADB" /datum/design/circuit/transhuman_resleever - name = "Resleeving pod" + design_name = "Resleeving pod" id = "transhuman_resleever" req_tech = list(TECH_ENGINEERING = 4, TECH_BIO = 4) build_path = /obj/item/circuitboard/transhuman_resleever - sort_string = "HAADC" // Resleeving /datum/design/circuit/resleeving_control - name = "Resleeving control console" + design_name = "Resleeving control console" id = "resleeving_control" req_tech = list(TECH_DATA = 5) build_path = /obj/item/circuitboard/resleeving_control - sort_string = "HAADE" - -/datum/design/circuit/partslathe - name = "Parts lathe" - id = "partslathe" - req_tech = list(TECH_DATA = 2, TECH_ENGINEERING = 2) - build_path = /obj/item/circuitboard/partslathe - sort_string = "HABAD" // Telesci stuff /datum/design/circuit/telesci_console - name = "Telepad Control Console" + design_name = "Telepad Control Console" id = "telesci_console" req_tech = list(TECH_DATA = 3, TECH_BLUESPACE = 3, TECH_PHORON = 4) build_path = /obj/item/circuitboard/telesci_console - sort_string = "HAAEA" /datum/design/circuit/telesci_pad - name = "Telepad" + design_name = "Telepad" id = "telesci_pad" req_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 4, TECH_PHORON = 4, TECH_BLUESPACE = 5) build_path = /obj/item/circuitboard/telesci_pad - sort_string = "HAAEB" - -/datum/design/circuit/quantum_pad - name = "Quantum Pad" - id = "quantum_pad" - req_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 4, TECH_PHORON = 4, TECH_BLUESPACE = 5, TECH_PRECURSOR = 1) - build_path = /obj/item/circuitboard/quantumpad - sort_string = "HAAC" /datum/design/circuit/vitals_monitor - name = "vitals monitor" + design_name = "vitals monitor" id = "vitals" req_tech = list(TECH_DATA = 3, TECH_BIO = 4, TECH_ENGINEERING = 2) build_path = /obj/item/circuitboard/machine/vitals_monitor - sort_string = "HAAF" diff --git a/code/modules/research/designs/circuits/computer.dm b/code/modules/research/designs/circuits/computer.dm index 1374a55500b6..28006860110e 100644 --- a/code/modules/research/designs/circuits/computer.dm +++ b/code/modules/research/designs/circuits/computer.dm @@ -1,6 +1,6 @@ /datum/design/circuit/computer abstract_type = /datum/design/circuit/computer -/datum/design/circuit/computer/AssembleDesignName() - name = "Computer circuit design ([name])" +/datum/design/circuit/computer/generate_name(template) + return "Computer circuit design ([template])" diff --git a/code/modules/research/designs/circuits/computers/misc.dm b/code/modules/research/designs/circuits/computers/misc.dm index ac50d9afabdd..4cf42ccb228a 100644 --- a/code/modules/research/designs/circuits/computers/misc.dm +++ b/code/modules/research/designs/circuits/computers/misc.dm @@ -1,5 +1,5 @@ /datum/design/circuit/computer/bioscan_console - name = "Bioscan Console" + design_name = "Bioscan Console" build_path = /obj/item/circuitboard/computer/bioscan id = "console_bioscan" req_tech = list(TECH_DATA = 1) diff --git a/code/modules/research/designs/circuits/computers/nanites.dm b/code/modules/research/designs/circuits/computers/nanites.dm index 980fb05a0138..7536b6778d37 100644 --- a/code/modules/research/designs/circuits/computers/nanites.dm +++ b/code/modules/research/designs/circuits/computers/nanites.dm @@ -1,5 +1,5 @@ /datum/design/circuit/computer/nanite_chamber - name = "Nanite Chamber Control" + design_name = "Nanite Chamber Control" build_path = /obj/item/circuitboard/computer/nanite_chamber id = "CircuitNaniteChamberConsole" req_tech = list(TECH_DATA = 1) diff --git a/code/modules/research/designs/circuits/disks.dm b/code/modules/research/designs/circuits/disks.dm index 837c20b9abb3..47081d04fea9 100644 --- a/code/modules/research/designs/circuits/disks.dm +++ b/code/modules/research/designs/circuits/disks.dm @@ -1,44 +1,41 @@ /datum/design/circuit/disk - build_type = IMPRINTER + abstract_type = /datum/design/circuit/disk + lathe_type = LATHE_TYPE_CIRCUIT req_tech = list(TECH_DATA = 3) materials = list(MAT_PLASTIC = 2000, MAT_GLASS = 1000) - chemicals = list("pacid" = 10) - time = 5 + reagents = list("pacid" = 10) + work = (5 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. -/datum/design/circuit/disk/AssembleDesignName() - ..() +/datum/design/circuit/disk/generate_name(template) if(build_path) var/obj/item/disk/D = build_path - if(istype(D, /obj/item/disk/species)) - name = "Species Prosthetic design ([item_name])" + if(ispath(D, /obj/item/disk/species)) + return "Species prosthetic design ([..()])" else - name = "Disk design ([item_name])" + return "Disk design ([..()])" + return ..() /datum/design/circuit/disk/skrellprint - name = SPECIES_SKRELL + design_name = SPECIES_SKRELL id = "prosthetic_skrell" req_tech = list(TECH_DATA = 3, TECH_BIO = 3) build_path = /obj/item/disk/species/skrell - sort_string = "DBAAA" /datum/design/circuit/disk/tajprint - name = SPECIES_TAJ + design_name = SPECIES_TAJ id = "prosthetic_tajaran" req_tech = list(TECH_DATA = 3, TECH_BIO = 3) build_path = /obj/item/disk/species/tajaran - sort_string = "DBAAB" /datum/design/circuit/disk/unathiprint - name = SPECIES_UNATHI + design_name = SPECIES_UNATHI id = "prosthetic_unathi" req_tech = list(TECH_DATA = 3, TECH_BIO = 4) build_path = /obj/item/disk/species/unathi - sort_string = "DBAAC" /datum/design/circuit/disk/teshariprint - name = SPECIES_TESHARI + design_name = SPECIES_TESHARI id = "prosthetic_teshari" req_tech = list(TECH_DATA = 3, TECH_BIO = 4) build_path = /obj/item/disk/species/teshari - sort_string = "DBAAD" diff --git a/code/modules/research/designs/circuits/machine.dm b/code/modules/research/designs/circuits/machine.dm index 8ac273cc4f88..8f242ba815c1 100644 --- a/code/modules/research/designs/circuits/machine.dm +++ b/code/modules/research/designs/circuits/machine.dm @@ -1,5 +1,5 @@ /datum/design/circuit/machine abstract_type = /datum/design/circuit/machine -/datum/design/circuit/machine/AssembleDesignName() - name = "Machine circuit design ([name])" +/datum/design/circuit/machine/generate_name(template) + return "Machine circuit ([template])" diff --git a/code/modules/research/designs/circuits/machines/chemistry.dm b/code/modules/research/designs/circuits/machines/chemistry.dm index 9545857bcf8c..5f269347cdcd 100644 --- a/code/modules/research/designs/circuits/machines/chemistry.dm +++ b/code/modules/research/designs/circuits/machines/chemistry.dm @@ -1,23 +1,23 @@ /datum/design/circuit/machine/chemical_dispenser - name = "Chemical Dispenser" + design_name = "Chemical Dispenser" build_path = /obj/item/circuitboard/machine/chemical_dispenser id = "MachineChemicalDispenser" req_tech = list(TECH_DATA = 3, TECH_BIO = 3, TECH_MATERIAL = 4) /datum/design/circuit/machine/soda_dispenser - name = "Drink Dispenser (Soda)" + design_name = "Drink Dispenser (Soda)" build_path = /obj/item/circuitboard/machine/chemical_dispenser/soda id = "MachineDrinkDispenserSoda" req_tech = list(TECH_DATA = 3, TECH_BIO = 3, TECH_MATERIAL = 4) /datum/design/circuit/machine/booze_dispenser - name = "Drink Dispenser (Bar)" + design_name = "Drink Dispenser (Bar)" build_path = /obj/item/circuitboard/machine/chemical_dispenser/booze id = "MachineDrinkDispenserBooze" req_tech = list(TECH_DATA = 3, TECH_BIO = 3, TECH_MATERIAL = 4) /datum/design/circuit/machine/cafe_dispenser - name = "Drink Dispenser (Cafe)" + design_name = "Drink Dispenser (Cafe)" build_path = /obj/item/circuitboard/machine/chemical_dispenser/cafe id = "MachineDrinkDispenserCafe" req_tech = list(TECH_DATA = 3, TECH_BIO = 3, TECH_MATERIAL = 4) diff --git a/code/modules/research/designs/circuits/machines/misc.dm b/code/modules/research/designs/circuits/machines/misc.dm index 944687ff1dcb..6c4483ba4b3d 100644 --- a/code/modules/research/designs/circuits/machines/misc.dm +++ b/code/modules/research/designs/circuits/machines/misc.dm @@ -1,5 +1,5 @@ /datum/design/circuit/machine/bioscan_antenna - name = "Bioscan Antenna" + design_name = "Bioscan Antenna" build_path = /obj/item/circuitboard/machine/bioscan id = "machine_bioscan" req_tech = list(TECH_DATA = 1) diff --git a/code/modules/research/designs/circuits/machines/nanites.dm b/code/modules/research/designs/circuits/machines/nanites.dm index c76db5819209..26ef61769fe9 100644 --- a/code/modules/research/designs/circuits/machines/nanites.dm +++ b/code/modules/research/designs/circuits/machines/nanites.dm @@ -1,5 +1,5 @@ /datum/design/circuit/machine/nanite_chamber - name = "Nanite Chamber" + design_name = "Nanite Chamber" build_path = /obj/item/circuitboard/machine/nanite_chamber id = "CircuitNaniteChamber" req_tech = list(TECH_DATA = 1) diff --git a/code/modules/research/designs_vr.dm b/code/modules/research/designs/designs_vr.dm similarity index 55% rename from code/modules/research/designs_vr.dm rename to code/modules/research/designs/designs_vr.dm index 797521f14c1a..b13bb4150f84 100644 --- a/code/modules/research/designs_vr.dm +++ b/code/modules/research/designs/designs_vr.dm @@ -1,309 +1,231 @@ -/* Make language great again -/datum/design/item/implant/language - name = "Language implant" - id = "implant_language" - req_tech = list(TECH_MATERIAL = 5, TECH_BIO = 5, TECH_DATA = 4, TECH_ENGINEERING = 4) //This is not an easy to make implant. - materials = list(MAT_STEEL = 7000, MAT_GLASS = 7000, MAT_GOLD = 2000, MAT_DIAMOND = 3000) - build_path = /obj/item/implantcase/vrlanguage -*/ -// /datum/design/item/implant/backup -// name = "Backup implant" -// id = "implant_backup" -// req_tech = list(TECH_MATERIAL = 2, TECH_BIO = 2, TECH_DATA = 4, TECH_ENGINEERING = 2) -// materials = list(MAT_STEEL = 2000, MAT_GLASS = 2000) -// build_path = /obj/item/implantcase/backup - -/datum/design/item/weapon/sizegun - name = "Size gun" + + +/datum/design/science/weapon/sizegun + design_name = "Size gun" id = "sizegun" req_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3, TECH_POWER = 2) materials = list(MAT_STEEL = 3000, MAT_GLASS = 2000, MAT_URANIUM = 2000) build_path = /obj/item/gun/energy/sizegun - sort_string = "TAAAB" -/datum/design/item/bluespace_jumpsuit - name = "Bluespace jumpsuit" +/datum/design/science/bluespace_jumpsuit + design_name = "Bluespace jumpsuit" id = "bsjumpsuit" req_tech = list(TECH_BLUESPACE = 2, TECH_MATERIAL = 3, TECH_POWER = 2) materials = list(MAT_STEEL = 4000, MAT_GLASS = 4000) build_path = /obj/item/clothing/under/bluespace - sort_string = "TAAAC" - -// /datum/design/item/sleevemate -// name = "SleeveMate 3700" -// id = "sleevemate" -// req_tech = list(TECH_MATERIAL = 3, TECH_MAGNET = 2, TECH_BIO = 2) -// materials = list(MAT_STEEL = 4000, MAT_GLASS = 4000) -// build_path = /obj/item/sleevemate -// sort_string = "TAAAD" - -// /datum/design/item/bodysnatcher -// name = "Body Snatcher" -// id = "bodysnatcher" -// req_tech = list(TECH_MAGNET = 3, TECH_BIO = 3, TECH_ILLEGAL = 2) -// materials = list(MAT_STEEL = 4000, MAT_GLASS = 4000) -// build_path = /obj/item/bodysnatcher - -/datum/design/item/item/pressureinterlock - name = "APP pressure interlock" + +/datum/design/science/item/pressureinterlock + design_name = "APP pressure interlock" id = "pressureinterlock" req_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 2) materials = list(MAT_STEEL = 1000, MAT_GLASS = 250) build_path = /obj/item/pressurelock - sort_string = "TAADA" -/datum/design/item/weapon/advparticle - name = "Advanced anti-particle rifle" +/datum/design/science/weapon/advparticle + design_name = "Advanced anti-particle rifle" id = "advparticle" req_tech = list(TECH_COMBAT = 4, TECH_MATERIAL = 5, TECH_POWER = 3, TECH_MAGNET = 3) materials = list(MAT_STEEL = 5000, MAT_GLASS = 1000, MAT_GOLD = 1000, MAT_URANIUM = 750) build_path = /obj/item/gun/energy/particle/advanced - sort_string = "TAADB" -/datum/design/item/weapon/particlecannon - name = "Anti-particle cannon" +/datum/design/science/weapon/particlecannon + design_name = "Anti-particle cannon" id = "particlecannon" req_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 5, TECH_POWER = 4, TECH_MAGNET = 4) materials = list(MAT_STEEL = 10000, MAT_GLASS = 1500, MAT_GOLD = 2000, MAT_URANIUM = 1000, MAT_DIAMOND = 2000) build_path = /obj/item/gun/energy/particle/cannon - sort_string = "TAADC" -/datum/design/item/hud/omni - name = "AR glasses" +/datum/design/science/hud/omni + design_name = "AR glasses" id = "omnihud" req_tech = list(TECH_MAGNET = 4, TECH_COMBAT = 3, TECH_BIO = 3) materials = list(MAT_STEEL = 1000, MAT_GLASS = 1000) build_path = /obj/item/clothing/glasses/omnihud - sort_string = "GAAFB" -/datum/design/item/translocator - name = "Personal translocator" +/datum/design/science/translocator + design_name = "Personal translocator" id = "translocator" req_tech = list(TECH_MAGNET = 5, TECH_BLUESPACE = 5, TECH_ILLEGAL = 6) materials = list(MAT_STEEL = 4000, MAT_GLASS = 2000, MAT_URANIUM = 4000, MAT_DIAMOND = 2000) build_path = /obj/item/perfect_tele - sort_string = "HABAF" -/datum/design/item/nif - name = "nanite implant framework" +/datum/design/science/nif + design_name = "nanite implant framework" id = "nif" req_tech = list(TECH_MAGNET = 5, TECH_BLUESPACE = 5, TECH_MATERIAL = 5, TECH_ENGINEERING = 5, TECH_DATA = 5) materials = list(MAT_STEEL = 5000, MAT_GLASS = 8000, MAT_URANIUM = 6000, MAT_DIAMOND = 6000) build_path = /obj/item/nif - sort_string = "HABBC" -/datum/design/item/nifbio - name = "bioadaptive NIF" +/datum/design/science/nifbio + design_name = "bioadaptive NIF" id = "bioadapnif" req_tech = list(TECH_MAGNET = 5, TECH_BLUESPACE = 5, TECH_MATERIAL = 5, TECH_ENGINEERING = 5, TECH_DATA = 5, TECH_BIO = 5) materials = list(MAT_STEEL = 10000, MAT_GLASS = 15000, MAT_URANIUM = 10000, MAT_DIAMOND = 10000) build_path = /obj/item/nif/bioadap - sort_string = "HABBD" //Changed String from HABBE to HABBD //Addiing bioadaptive NIF to Protolathe -/datum/design/item/nifrepairtool - name = "adv. NIF repair tool" +/datum/design/science/nifrepairtool + design_name = "adv. NIF repair tool" id = "anrt" req_tech = list(TECH_MAGNET = 5, TECH_BLUESPACE = 5, TECH_MATERIAL = 5, TECH_ENGINEERING = 5, TECH_DATA = 5) materials = list(MAT_STEEL = 200, MAT_GLASS = 3000, MAT_URANIUM = 2000, MAT_DIAMOND = 2000) build_path = /obj/item/nifrepairer - sort_string = "HABBE" //Changed String from HABBD to HABBE // Resleeving Circuitboards /datum/design/circuit/transhuman_clonepod - name = "grower pod" + design_name = "grower pod" id = "transhuman_clonepod" req_tech = list(TECH_DATA = 3, TECH_BIO = 3) build_path = /obj/item/circuitboard/transhuman_clonepod - sort_string = "HAADA" /datum/design/circuit/transhuman_synthprinter - name = "SynthFab 3000" + design_name = "SynthFab 3000" id = "transhuman_synthprinter" req_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 3) build_path = /obj/item/circuitboard/transhuman_synthprinter - sort_string = "HAADB" /datum/design/circuit/transhuman_resleever - name = "Resleeving pod" + design_name = "Resleeving pod" id = "transhuman_resleever" req_tech = list(TECH_ENGINEERING = 4, TECH_BIO = 4) build_path = /obj/item/circuitboard/transhuman_resleever - sort_string = "HAADC" /datum/design/circuit/resleeving_control - name = "Resleeving control console" + design_name = "Resleeving control console" id = "resleeving_control" req_tech = list(TECH_DATA = 5) build_path = /obj/item/circuitboard/resleeving_control - sort_string = "HAADE" - -/datum/design/circuit/partslathe - name = "Parts lathe" - id = "partslathe" - req_tech = list(TECH_DATA = 2, TECH_ENGINEERING = 2) - build_path = /obj/item/circuitboard/partslathe - sort_string = "HABAD" -/datum/design/item/weapon/netgun - name = "\'Retiarius\' capture gun" //cit change +/datum/design/science/weapon/netgun + design_name = "\'Retiarius\' capture gun" //cit change id = "netgun" req_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 5, TECH_MAGNET = 3) materials = list(MAT_STEEL = 6000, MAT_GLASS = 3000) build_path = /obj/item/gun/energy/netgun - sort_string = "TAADF" /datum/design/circuit/algae_farm - name = "Algae Oxygen Generator" + design_name = "Algae Oxygen Generator" id = "algae_farm" req_tech = list(TECH_ENGINEERING = 3, TECH_BIO = 2) build_path = /obj/item/circuitboard/algae_farm - sort_string = "HABAE" /datum/design/circuit/thermoregulator - name = "thermal regulator" + design_name = "thermal regulator" id = "thermoregulator" req_tech = list(TECH_ENGINEERING = 4, TECH_POWER = 3) build_path = /obj/item/circuitboard/thermoregulator - sort_string = "HABAF" /datum/design/circuit/bomb_tester - name = "Explosive Effect Simulator" + design_name = "Explosive Effect Simulator" id = "bomb_tester" req_tech = list(TECH_PHORON = 3, TECH_DATA = 2, TECH_MAGNET = 2) build_path = /obj/item/circuitboard/bomb_tester - sort_string = "HABAG" - -/datum/design/circuit/quantum_pad - name = "Quantum Pad" - id = "quantum_pad" - req_tech = list(TECH_ENGINEERING = 4, TECH_POWER = 4, TECH_BLUESPACE = 4, TECH_PRECURSOR = 1) - build_path = /obj/item/circuitboard/quantumpad - sort_string = "HABAH" //////Micro mech stuff /datum/design/circuit/mecha/gopher_main - name = "'Gopher' central control" + design_name = "'Gopher' central control" id = "gopher_main" build_path = /obj/item/circuitboard/mecha/gopher/main - sort_string = "NAAEA" /datum/design/circuit/mecha/gopher_peri - name = "'Gopher' peripherals control" + design_name = "'Gopher' peripherals control" id = "gopher_peri" build_path = /obj/item/circuitboard/mecha/gopher/peripherals - sort_string = "NAAEB" /datum/design/circuit/mecha/polecat_main - name = "'Polecat' central control" + design_name = "'Polecat' central control" id = "polecat_main" req_tech = list(TECH_DATA = 4) build_path = /obj/item/circuitboard/mecha/polecat/main - sort_string = "NAAFA" /datum/design/circuit/mecha/polecat_peri - name = "'Polecat' peripherals control" + design_name = "'Polecat' peripherals control" id = "polecat_peri" req_tech = list(TECH_DATA = 4) build_path = /obj/item/circuitboard/mecha/polecat/peripherals - sort_string = "NAAFB" /datum/design/circuit/mecha/polecat_targ - name = "'Polecat' weapon control and targeting" + design_name = "'Polecat' weapon control and targeting" id = "polecat_targ" req_tech = list(TECH_DATA = 4, TECH_COMBAT = 2) build_path = /obj/item/circuitboard/mecha/polecat/targeting - sort_string = "NAAFC" /datum/design/circuit/mecha/weasel_main - name = "'Weasel' central control" + design_name = "'Weasel' central control" id = "weasel_main" req_tech = list(TECH_DATA = 4) build_path = /obj/item/circuitboard/mecha/weasel/main - sort_string = "NAAGA" /datum/design/circuit/mecha/weasel_peri - name = "'Weasel' peripherals control" + design_name = "'Weasel' peripherals control" id = "weasel_peri" req_tech = list(TECH_DATA = 4) build_path = /obj/item/circuitboard/mecha/weasel/peripherals - sort_string = "NAAGB" /datum/design/circuit/mecha/weasel_targ - name = "'Weasel' weapon control and targeting" + design_name = "'Weasel' weapon control and targeting" id = "weasel_targ" req_tech = list(TECH_DATA = 4, TECH_COMBAT = 2) build_path = /obj/item/circuitboard/mecha/weasel/targeting - sort_string = "NAAGC" ////// RIGSuit Stuff /* -/datum/design/item/hardsuit +/datum/design/science/hardsuit req_tech = list(TECH_MATERIAL = 5, TECH_POWER = 5, TECH_MAGNET = 5) materials = list(MAT_STEEL = 6000, MAT_GLASS = 6000, MAT_SILVER = 6000, MAT_URANIUM = 4000) -/datum/design/item/hardsuit/eva - name = "eva hardsuit (empty)" +/datum/design/science/hardsuit/eva + design_name = "eva hardsuit (empty)" id = "eva_hardsuit" build_path = /obj/item/hardsuit/eva - sort_string = "HCAAA" -/datum/design/item/hardsuit/mining - name = "industrial hardsuit (empty)" +/datum/design/science/hardsuit/mining + design_name = "industrial hardsuit (empty)" id = "ind_hardsuit" build_path = /obj/item/hardsuit/industrial - sort_string = "HCAAB" -/datum/design/item/hardsuit/research - name = "ami hardsuit (empty)" +/datum/design/science/hardsuit/research + design_name = "ami hardsuit (empty)" id = "ami_hardsuit" build_path = /obj/item/hardsuit/hazmat - sort_string = "HCAAC" -/datum/design/item/hardsuit/medical - name = "medical hardsuit (empty)" +/datum/design/science/hardsuit/medical + design_name = "medical hardsuit (empty)" id = "med_hardsuit" build_path = /obj/item/hardsuit/medical - sort_string = "HCAAD" */ -/datum/design/item/hardsuit_module +/datum/design/science/hardsuit_module req_tech = list(TECH_MATERIAL = 5, TECH_POWER = 5, TECH_MAGNET = 5) materials = list(MAT_STEEL = 6000, MAT_GLASS = 6000, MAT_SILVER = 4000, MAT_URANIUM = 2000) -/datum/design/item/hardsuit_module/plasma_cutter - name = "hardsuit module - plasma cutter" - id = "rigmod_plasmacutter" +/datum/design/science/hardsuit_module/plasma_cutter + design_name = "hardsuit module - plasma cutter" + id = "hardsuitmod_plasmacutter" build_path = /obj/item/hardsuit_module/device/plasmacutter - sort_string = "HCAAE" -/datum/design/item/hardsuit_module/diamond_drill - name = "hardsuit module - diamond drill" - id = "rigmod_diamonddrill" +/datum/design/science/hardsuit_module/diamond_drill + design_name = "hardsuit module - diamond drill" + id = "hardsuitmod_diamonddrill" build_path = /obj/item/hardsuit_module/device/drill - sort_string = "HCAAF" -/datum/design/item/hardsuit_module/maneuvering_jets - name = "hardsuit module - maneuvering jets" - id = "rigmod_maneuveringjets" +/datum/design/science/hardsuit_module/maneuvering_jets + design_name = "hardsuit module - maneuvering jets" + id = "hardsuitmod_maneuveringjets" build_path = /obj/item/hardsuit_module/maneuvering_jets - sort_string = "HCAAG" -/datum/design/item/hardsuit_module/anomaly_scanner - name = "hardsuit module - anomaly scanner" - id = "rigmod_anomalyscanner" +/datum/design/science/hardsuit_module/anomaly_scanner + design_name = "hardsuit module - anomaly scanner" + id = "hardsuitmod_anomalyscanner" build_path = /obj/item/hardsuit_module/device/anomaly_scanner - sort_string = "HCAAH" -/datum/design/item/hardsuit_module/orescanner - name = "hardsuit module - ore scanner" - id = "rigmod_orescanner" +/datum/design/science/hardsuit_module/orescanner + design_name = "hardsuit module - ore scanner" + id = "hardsuitmod_orescanner" build_path = /obj/item/hardsuit_module/device/orescanner - sort_string = "HCAAI" -/datum/design/item/hardsuit_module/orescanneradv - name = "hardsuit module - adv. ore scanner" - id = "rigmod_orescanner_adv" +/datum/design/science/hardsuit_module/orescanneradv + design_name = "hardsuit module - adv. ore scanner" + id = "hardsuitmod_orescanner_adv" build_path = /obj/item/hardsuit_module/device/orescanner/advanced - sort_string = "HCAAJ" diff --git a/code/modules/research/designs/engineering.dm b/code/modules/research/designs/engineering.dm index a2cb524d43b6..9e12c9495cc1 100644 --- a/code/modules/research/designs/engineering.dm +++ b/code/modules/research/designs/engineering.dm @@ -1,92 +1,83 @@ -// Tools +/datum/design/science/tool + abstract_type = /datum/design/science/tool -/datum/design/item/tool/AssembleDesignName() - ..() - name = "Experimental tool prototype ([item_name])" +/datum/design/science/tool/generate_name(template) + return "Experimental tool prototype ([..()])" -/datum/design/item/tool/experimental_welder - name = "Experimental welding tool" +/datum/design/science/tool/experimental_welder + design_name = "Experimental welding tool" desc = "A welding tool that generates fuel for itself." id = "expwelder" req_tech = list(TECH_ENGINEERING = 4, TECH_PHORON = 3, TECH_MATERIAL = 4) materials = list(MAT_STEEL = 70, MAT_GLASS = 120, MAT_PHORON = 100) build_path = /obj/item/weldingtool/experimental - sort_string = "NAAAA" -/datum/design/item/tool/hand_drill - name = "Hand drill" +/datum/design/science/tool/hand_drill + design_name = "Hand drill" desc = "A simple powered hand drill." id = "handdrill" req_tech = list(TECH_ENGINEERING = 3, TECH_MATERIAL = 2) materials = list(MAT_STEEL = 300, MAT_SILVER = 100) build_path = /obj/item/tool/screwdriver/power - sort_string = "NAAAB" -/datum/design/item/tool/jaws_life - name = "Jaws of life" +/datum/design/science/tool/jaws_life + design_name = "Jaws of life" desc = "A set of jaws of life, compressed through the magic of science." id = "jawslife" req_tech = list(TECH_ENGINEERING = 3, TECH_MATERIAL = 2) materials = list(MAT_STEEL = 300, MAT_SILVER = 100) build_path = /obj/item/tool/crowbar/power - sort_string = "NAAAC" -/datum/design/item/tool/switchtool - name = "Switchtool" +/datum/design/science/tool/switchtool + design_name = "Switchtool" desc = "A combined wirecutter, screwdriver, crowbar, wrench and multitool. The small size makes it somewhat slower at work." id = "switchtool" req_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 4) materials = list(MAT_STEEL = 4000, MAT_GLASS = 2000) build_path = /obj/item/switchtool - sort_string = "NAAAD" -// Other devices +/datum/design/science/engineering + abstract_type = /datum/design/science/engineering -/datum/design/item/engineering/AssembleDesignName() - ..() - name = "Engineering device prototype ([item_name])" +/datum/design/science/engineering/generate_name(template) + return "Engineering device prototype ([..()])" -/datum/design/item/engineering/t_scanner - name = "T-ray Scanner" +/datum/design/science/engineering/t_scanner + design_name = "T-ray Scanner" desc = "A terahertz-ray emitter and scanner used to detect underfloor objects such as cables and pipes." id = "tscanner" req_tech = list(TECH_MAGNET = 2, TECH_ENGINEERING = 2, TECH_MATERIAL = 2) materials = list(MAT_STEEL = 200) build_path = /obj/item/t_scanner - sort_string = "NBAAA" -/datum/design/item/engineering/t_scanner_upg - name = "Upgraded T-ray Scanner" +/datum/design/science/engineering/t_scanner_upg + design_name = "Upgraded T-ray Scanner" desc = "An upgraded version of the terahertz-ray emitter and scanner used to detect underfloor objects such as cables and pipes." id = "upgradedtscanner" req_tech = list(TECH_MAGNET = 3, TECH_ENGINEERING = 4, TECH_MATERIAL = 2) materials = list(MAT_STEEL = 500, MAT_PHORON = 150) build_path = /obj/item/t_scanner/upgraded - sort_string = "NBAAB" -/datum/design/item/engineering/t_scanner_adv - name = "Advanced T-ray Scanner" +/datum/design/science/engineering/t_scanner_adv + design_name = "Advanced T-ray Scanner" desc = "An advanced version of the terahertz-ray emitter and scanner used to detect underfloor objects such as cables and pipes." id = "advancedtscanner" req_tech = list(TECH_MAGNET = 6, TECH_ENGINEERING = 6, TECH_MATERIAL = 6) materials = list(MAT_STEEL = 1250, MAT_PHORON = 500, MAT_SILVER = 50) build_path = /obj/item/t_scanner/advanced - sort_string = "NBAAC" -/datum/design/item/engineering/atmosanalyzer - name = "Atmospheric Analyzer" +/datum/design/science/engineering/atmosanalyzer + design_name = "Atmospheric Analyzer" desc = "A hand-held environmental scanner which reports current gas levels." id = "atmosanalyzer" req_tech = list(TECH_ENGINEERING = 2) materials = list(MAT_STEEL = 200, MAT_GLASS = 100) build_path = /obj/item/analyzer - sort_string = "NBABA" -/datum/design/item/engineering/atmosanalyzerlongrange - name = "Long Range Atmospheric Analyzer" +/datum/design/science/engineering/atmosanalyzerlongrange + design_name = "Long Range Atmospheric Analyzer" desc = "A hand-held environmental scanner which reports current gas levels from a distance." id = "atmosanalyzerlr" req_tech = list(TECH_ENGINEERING = 4) materials = list(MAT_STEEL = 300, MAT_GLASS = 300) build_path = /obj/item/analyzer/longrange - sort_string = "NBABB" diff --git a/code/modules/research/designs/implants.dm b/code/modules/research/designs/implants.dm index 130f1188a297..5a5738790cca 100644 --- a/code/modules/research/designs/implants.dm +++ b/code/modules/research/designs/implants.dm @@ -1,22 +1,25 @@ -// Implants - -/datum/design/item/implant +/datum/design/science/implant + abstract_type = /datum/design/science/implant materials = list(MAT_STEEL = 50, MAT_GLASS = 50) -/datum/design/item/implant/AssembleDesignName() - ..() - name = "Implantable biocircuit design ([item_name])" +/datum/design/science/implant/generate_name(template) + return "Implantable biocircuit design ([..()])" -/datum/design/item/implant/chemical - name = "chemical" +/datum/design/science/implant/chemical + design_name = "chemical" id = "implant_chem" req_tech = list(TECH_MATERIAL = 2, TECH_BIO = 3) build_path = /obj/item/implantcase/chem - sort_string = "MFAAA" -/datum/design/item/implant/freedom - name = "freedom" +/datum/design/science/implant/freedom + design_name = "freedom" id = "implant_free" req_tech = list(TECH_ILLEGAL = 2, TECH_BIO = 3) build_path = /obj/item/implantcase/freedom - sort_string = "MFAAB" + +/datum/design/science/implant/sizecontrol + design_name = "Size control implant" + id = "implant_size" + req_tech = list(TECH_MATERIAL = 3, TECH_BIO = 4, TECH_DATA = 4, TECH_ENGINEERING = 3) + materials = list(MAT_STEEL = 2000, MAT_GLASS = 2000, MAT_SILVER = 3000) + build_path = /obj/item/implanter/sizecontrol diff --git a/code/modules/research/designs/implants_vr.dm b/code/modules/research/designs/implants_vr.dm deleted file mode 100644 index dc92e641337d..000000000000 --- a/code/modules/research/designs/implants_vr.dm +++ /dev/null @@ -1,25 +0,0 @@ -// /datum/design/item/implant/backup -// name = "Backup implant" -// id = "implant_backup" -// req_tech = list(TECH_MATERIAL = 2, TECH_BIO = 2, TECH_DATA = 4, TECH_ENGINEERING = 2) -// materials = list(MAT_STEEL = 2000, MAT_GLASS = 2000) -// build_path = /obj/item/implantcase/backup -// sort_string = "MFAVA" - -/datum/design/item/implant/sizecontrol - name = "Size control implant" - id = "implant_size" - req_tech = list(TECH_MATERIAL = 3, TECH_BIO = 4, TECH_DATA = 4, TECH_ENGINEERING = 3) - materials = list(MAT_STEEL = 2000, MAT_GLASS = 2000, MAT_SILVER = 3000) - build_path = /obj/item/implanter/sizecontrol - sort_string = "MFAVB" - -/* Make language great again -/datum/design/item/implant/language - name = "Language implant" - id = "implant_language" - req_tech = list(TECH_MATERIAL = 5, TECH_BIO = 5, TECH_DATA = 4, TECH_ENGINEERING = 4) //This is not an easy to make implant. - materials = list(MAT_STEEL = 7000, MAT_GLASS = 7000, MAT_GOLD = 2000, MAT_DIAMOND = 3000) - build_path = /obj/item/implantcase/vrlanguage - sort_string = "MFAVC" -*/ diff --git a/code/modules/research/designs/locator_devices.dm b/code/modules/research/designs/locator_devices.dm index 5a29014e387d..51ca6041e716 100644 --- a/code/modules/research/designs/locator_devices.dm +++ b/code/modules/research/designs/locator_devices.dm @@ -1,80 +1,68 @@ -// GPS - -/datum/design/item/gps +/datum/design/science/gps + abstract_type = /datum/design/science/gps req_tech = list(TECH_MATERIAL = 2, TECH_DATA = 2, TECH_BLUESPACE = 2) materials = list(MAT_STEEL = 500) -/datum/design/item/gps/AssembleDesignName() - ..() - name = "Triangulating device design ([name])" +/datum/design/science/gps/generate_name(template) + return "Triangulating device design ([..()])" -/datum/design/item/gps/generic - name = "GEN" +/datum/design/science/gps/generic + design_name = "GEN" id = "gps_gen" build_path = /obj/item/gps - sort_string = "DAAAA" -/datum/design/item/gps/command - name = "COM" +/datum/design/science/gps/command + design_name = "COM" id = "gps_com" build_path = /obj/item/gps/command - sort_string = "DAAAB" -/datum/design/item/gps/security - name = "SEC" +/datum/design/science/gps/security + design_name = "SEC" id = "gps_sec" build_path = /obj/item/gps/security - sort_string = "DAAAC" -/datum/design/item/gps/medical - name = "MED" +/datum/design/science/gps/medical + design_name = "MED" id = "gps_med" build_path = /obj/item/gps/medical - sort_string = "DAAAD" -/datum/design/item/gps/engineering - name = "ENG" +/datum/design/science/gps/engineering + design_name = "ENG" id = "gps_eng" build_path = /obj/item/gps/engineering - sort_string = "DAAAE" -/datum/design/item/gps/science - name = "SCI" +/datum/design/science/gps/science + design_name = "SCI" id = "gps_sci" build_path = /obj/item/gps/science - sort_string = "DAAAF" -/datum/design/item/gps/mining - name = "MINE" +/datum/design/science/gps/mining + design_name = "MINE" id = "gps_mine" build_path = /obj/item/gps/mining - sort_string = "DAAAG" -/datum/design/item/gps/explorer - name = "EXP" +/datum/design/science/gps/explorer + design_name = "EXP" id = "gps_exp" build_path = /obj/item/gps/explorer - sort_string = "DAAAH" -// Other locators +/datum/design/science/locator + abstract_type = /datum/design/science/locator -/datum/design/item/locator/AssembleDesignName() - ..() - name = "Locator device design ([name])" +/datum/design/science/locator/generate_name(template) + return "Locator device design ([..()])" -/datum/design/item/locator/beacon_locator - name = "Tracking beacon pinpointer" +/datum/design/science/locator/beacon_locator + design_name = "Tracking beacon pinpointer" desc = "Used to scan and locate signals on a particular frequency." id = "beacon_locator" req_tech = list(TECH_MAGNET = 3, TECH_ENGINEERING = 2, TECH_BLUESPACE = 3) materials = list(MAT_STEEL = 1000, MAT_GLASS = 500) build_path = /obj/item/beacon_locator - sort_string = "DBAAA" -/datum/design/item/locator/beacon - name = "Bluespace tracking beacon" +/datum/design/science/locator/beacon + design_name = "Bluespace tracking beacon" id = "beacon" req_tech = list(TECH_BLUESPACE = 1) materials = list (MAT_STEEL = 20, MAT_GLASS = 10) build_path = /obj/item/radio/beacon - sort_string = "DBABA" diff --git a/code/modules/research/mechfab_designs.dm b/code/modules/research/designs/mechfab_designs.dm similarity index 62% rename from code/modules/research/mechfab_designs.dm rename to code/modules/research/designs/mechfab_designs.dm index b5454c3c8142..02f1144cf037 100644 --- a/code/modules/research/mechfab_designs.dm +++ b/code/modules/research/designs/mechfab_designs.dm @@ -1,687 +1,696 @@ -/datum/design/item/mechfab - build_type = MECHFAB +/datum/design/science/mechfab + abstract_type = /datum/design/science/mechfab + lathe_type = LATHE_TYPE_MECHA category = list("Other") req_tech = list(TECH_MATERIAL = 1) -/datum/design/item/mechfab/ripley +/datum/design/science/mechfab/ripley + abstract_type = /datum/design/science/mechfab/ripley category = list("Ripley") -/datum/design/item/mechfab/ripley/chassis - name = "Ripley Chassis" +/datum/design/science/mechfab/ripley/chassis + design_name = "Ripley Chassis" id = "ripley_chassis" build_path = /obj/item/mecha_parts/chassis/ripley - time = 10 + work = (10 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 15000) -/datum/design/item/mechfab/ripley/chassis/firefighter - name = "Firefigher Chassis" +/datum/design/science/mechfab/ripley/chassis/firefighter + design_name = "Firefigher Chassis" id = "firefighter_chassis" build_path = /obj/item/mecha_parts/chassis/firefighter -/datum/design/item/mechfab/ripley/chassis/geiger - name = "Geiger Chassis" +/datum/design/science/mechfab/ripley/chassis/geiger + design_name = "Geiger Chassis" id = "geiger_chassis" build_path = /obj/item/mecha_parts/chassis/geiger -/datum/design/item/mechfab/ripley/torso - name = "Ripley Torso" +/datum/design/science/mechfab/ripley/torso + design_name = "Ripley Torso" id = "ripley_torso" build_path = /obj/item/mecha_parts/part/ripley_torso - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 30000, MAT_GLASS = 11250) -/datum/design/item/mechfab/ripley/torso/geiger - name = "Geiger Torso" +/datum/design/science/mechfab/ripley/torso/geiger + design_name = "Geiger Torso" id = "geiger_torso" build_path = /obj/item/mecha_parts/part/geiger_torso - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 25000, MAT_GLASS = 10000) -/datum/design/item/mechfab/ripley/left_arm - name = "Ripley Left Arm" +/datum/design/science/mechfab/ripley/left_arm + design_name = "Ripley Left Arm" id = "ripley_left_arm" build_path = /obj/item/mecha_parts/part/ripley_left_arm - time = 15 + work = (15 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 18750) -/datum/design/item/mechfab/ripley/right_arm - name = "Ripley Right Arm" +/datum/design/science/mechfab/ripley/right_arm + design_name = "Ripley Right Arm" id = "ripley_right_arm" build_path = /obj/item/mecha_parts/part/ripley_right_arm - time = 15 + work = (15 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 18750) -/datum/design/item/mechfab/ripley/left_leg - name = "Ripley Left Leg" +/datum/design/science/mechfab/ripley/left_leg + design_name = "Ripley Left Leg" id = "ripley_left_leg" build_path = /obj/item/mecha_parts/part/ripley_left_leg - time = 15 + work = (15 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 22500) -/datum/design/item/mechfab/ripley/right_leg - name = "Ripley Right Leg" +/datum/design/science/mechfab/ripley/right_leg + design_name = "Ripley Right Leg" id = "ripley_right_leg" build_path = /obj/item/mecha_parts/part/ripley_right_leg - time = 15 + work = (15 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 22500) -/datum/design/item/mechfab/odysseus +/datum/design/science/mechfab/odysseus + abstract_type = /datum/design/science/mechfab/odysseus category = list("Odysseus") -/datum/design/item/mechfab/odysseus/chassis - name = "Odysseus Chassis" +/datum/design/science/mechfab/odysseus/chassis + design_name = "Odysseus Chassis" id = "odysseus_chassis" build_path = /obj/item/mecha_parts/chassis/odysseus - time = 10 + work = (10 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 15000) -/datum/design/item/mechfab/odysseus/torso - name = "Odysseus Torso" +/datum/design/science/mechfab/odysseus/torso + design_name = "Odysseus Torso" id = "odysseus_torso" build_path = /obj/item/mecha_parts/part/odysseus_torso - time = 18 + work = (18 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 18750) -/datum/design/item/mechfab/odysseus/head - name = "Odysseus Head" +/datum/design/science/mechfab/odysseus/head + design_name = "Odysseus Head" id = "odysseus_head" build_path = /obj/item/mecha_parts/part/odysseus_head - time = 10 + work = (10 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 1500, MAT_GLASS = 7500) -/datum/design/item/mechfab/odysseus/left_arm - name = "Odysseus Left Arm" +/datum/design/science/mechfab/odysseus/left_arm + design_name = "Odysseus Left Arm" id = "odysseus_left_arm" build_path = /obj/item/mecha_parts/part/odysseus_left_arm - time = 12 + work = (12 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 7500) -/datum/design/item/mechfab/odysseus/right_arm - name = "Odysseus Right Arm" +/datum/design/science/mechfab/odysseus/right_arm + design_name = "Odysseus Right Arm" id = "odysseus_right_arm" build_path = /obj/item/mecha_parts/part/odysseus_right_arm - time = 12 + work = (12 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 7500) -/datum/design/item/mechfab/odysseus/left_leg - name = "Odysseus Left Leg" +/datum/design/science/mechfab/odysseus/left_leg + design_name = "Odysseus Left Leg" id = "odysseus_left_leg" build_path = /obj/item/mecha_parts/part/odysseus_left_leg - time = 13 + work = (13 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 11250) -/datum/design/item/mechfab/odysseus/right_leg - name = "Odysseus Right Leg" +/datum/design/science/mechfab/odysseus/right_leg + design_name = "Odysseus Right Leg" id = "odysseus_right_leg" build_path = /obj/item/mecha_parts/part/odysseus_right_leg - time = 13 + work = (13 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 11250) -/datum/design/item/mechfab/gygax +/datum/design/science/mechfab/gygax + abstract_type = /datum/design/science/mechfab/gygax category = list("Gygax") -/datum/design/item/mechfab/gygax/chassis/serenity - name = "Serenity Chassis" +/datum/design/science/mechfab/gygax/chassis/serenity + design_name = "Serenity Chassis" id = "serenity_chassis" build_path = /obj/item/mecha_parts/chassis/serenity materials = list(MAT_STEEL = 18750, MAT_PHORON = 4000) -/datum/design/item/mechfab/gygax/chassis - name = "Gygax Chassis" +/datum/design/science/mechfab/gygax/chassis + design_name = "Gygax Chassis" id = "gygax_chassis" build_path = /obj/item/mecha_parts/chassis/gygax - time = 10 + work = (10 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 18750) -/datum/design/item/mechfab/gygax/torso - name = "Gygax Torso" +/datum/design/science/mechfab/gygax/torso + design_name = "Gygax Torso" id = "gygax_torso" build_path = /obj/item/mecha_parts/part/gygax_torso - time = 30 + work = (30 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 37500, MAT_GLASS = 15000) -/datum/design/item/mechfab/gygax/head - name = "Gygax Head" +/datum/design/science/mechfab/gygax/head + design_name = "Gygax Head" id = "gygax_head" build_path = /obj/item/mecha_parts/part/gygax_head - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 15000, MAT_GLASS = 7500) -/datum/design/item/mechfab/gygax/left_arm - name = "Gygax Left Arm" +/datum/design/science/mechfab/gygax/left_arm + design_name = "Gygax Left Arm" id = "gygax_left_arm" build_path = /obj/item/mecha_parts/part/gygax_left_arm - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 22500) -/datum/design/item/mechfab/gygax/right_arm - name = "Gygax Right Arm" +/datum/design/science/mechfab/gygax/right_arm + design_name = "Gygax Right Arm" id = "gygax_right_arm" build_path = /obj/item/mecha_parts/part/gygax_right_arm - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 22500) -/datum/design/item/mechfab/gygax/left_leg - name = "Gygax Left Leg" +/datum/design/science/mechfab/gygax/left_leg + design_name = "Gygax Left Leg" id = "gygax_left_leg" build_path = /obj/item/mecha_parts/part/gygax_left_leg - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 26250) -/datum/design/item/mechfab/gygax/right_leg - name = "Gygax Right Leg" +/datum/design/science/mechfab/gygax/right_leg + design_name = "Gygax Right Leg" id = "gygax_right_leg" build_path = /obj/item/mecha_parts/part/gygax_right_leg - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 26250) -/datum/design/item/mechfab/gygax/armour - name = "Gygax Armour Plates" +/datum/design/science/mechfab/gygax/armour + design_name = "Gygax Armour Plates" id = "gygax_armour" build_path = /obj/item/mecha_parts/part/gygax_armour - time = 60 + work = (60 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 37500, MAT_DIAMOND = 7500) -/datum/design/item/mechfab/durand +/datum/design/science/mechfab/durand + abstract_type = /datum/design/science/mechfab/durand category = list("Durand") -/datum/design/item/mechfab/durand/chassis - name = "Durand Chassis" +/datum/design/science/mechfab/durand/chassis + design_name = "Durand Chassis" id = "durand_chassis" build_path = /obj/item/mecha_parts/chassis/durand - time = 10 + work = (10 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 18750) -/datum/design/item/mechfab/durand/torso - name = "Durand Torso" +/datum/design/science/mechfab/durand/torso + design_name = "Durand Torso" id = "durand_torso" build_path = /obj/item/mecha_parts/part/durand_torso - time = 30 + work = (30 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 41250, MAT_GLASS = 15000, MAT_SILVER = 7500) -/datum/design/item/mechfab/durand/head - name = "Durand Head" +/datum/design/science/mechfab/durand/head + design_name = "Durand Head" id = "durand_head" build_path = /obj/item/mecha_parts/part/durand_head - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 18750, MAT_GLASS = 7500, MAT_SILVER = 2250) -/datum/design/item/mechfab/durand/left_arm - name = "Durand Left Arm" +/datum/design/science/mechfab/durand/left_arm + design_name = "Durand Left Arm" id = "durand_left_arm" build_path = /obj/item/mecha_parts/part/durand_left_arm - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 26250, MAT_SILVER = 2250) -/datum/design/item/mechfab/durand/right_arm - name = "Durand Right Arm" +/datum/design/science/mechfab/durand/right_arm + design_name = "Durand Right Arm" id = "durand_right_arm" build_path = /obj/item/mecha_parts/part/durand_right_arm - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 26250, MAT_SILVER = 2250) -/datum/design/item/mechfab/durand/left_leg - name = "Durand Left Leg" +/datum/design/science/mechfab/durand/left_leg + design_name = "Durand Left Leg" id = "durand_left_leg" build_path = /obj/item/mecha_parts/part/durand_left_leg - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 30000, MAT_SILVER = 2250) -/datum/design/item/mechfab/durand/right_leg - name = "Durand Right Leg" +/datum/design/science/mechfab/durand/right_leg + design_name = "Durand Right Leg" id = "durand_right_leg" build_path = /obj/item/mecha_parts/part/durand_right_leg - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 30000, MAT_SILVER = 2250) -/datum/design/item/mechfab/durand/armour - name = "Durand Armour Plates" +/datum/design/science/mechfab/durand/armour + design_name = "Durand Armour Plates" id = "durand_armour" build_path = /obj/item/mecha_parts/part/durand_armour - time = 60 + work = (60 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 37500, MAT_URANIUM = 7500) -/datum/design/item/mechfab/janus +/datum/design/science/mechfab/janus + abstract_type = /datum/design/science/mechfab/janus category = list("Janus") req_tech = list(TECH_MATERIAL = 7, TECH_BLUESPACE = 5, TECH_MAGNET = 6, TECH_PHORON = 3, TECH_ARCANE = 1, TECH_PRECURSOR = 2) -/datum/design/item/mechfab/janus/chassis - name = "Janus Chassis" +/datum/design/science/mechfab/janus/chassis + design_name = "Janus Chassis" id = "janus_chassis" build_path = /obj/item/mecha_parts/chassis/janus - time = 100 + work = (100 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_DURASTEEL = 19000, MAT_MORPHIUM = 10500, MAT_PLASTEEL = 5500, MAT_LEAD = 2500) req_tech = list(TECH_MATERIAL = 7, TECH_BLUESPACE = 5, TECH_MAGNET = 6, TECH_PHORON = 3, TECH_ARCANE = 1, TECH_PRECURSOR = 3) -/datum/design/item/mechfab/janus/torso - name = "Imperion Torso" +/datum/design/science/mechfab/janus/torso + design_name = "Imperion Torso" id = "janus_torso" build_path = /obj/item/mecha_parts/part/janus_torso - time = 300 + work = (300 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 30000, MAT_DURASTEEL = 8000, MAT_MORPHIUM = 10000, MAT_GOLD = 5000, MAT_VERDANTIUM = 5000) -/datum/design/item/mechfab/janus/head - name = "Imperion Head" +/datum/design/science/mechfab/janus/head + design_name = "Imperion Head" id = "janus_head" build_path = /obj/item/mecha_parts/part/janus_head - time = 200 + work = (200 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 30000, MAT_DURASTEEL = 2000, MAT_MORPHIUM = 6000, MAT_GOLD = 5000) -/datum/design/item/mechfab/janus/left_arm - name = "Prototype Gygax Left Arm" +/datum/design/science/mechfab/janus/left_arm + design_name = "Prototype Gygax Left Arm" id = "janus_left_arm" build_path = /obj/item/mecha_parts/part/janus_left_arm - time = 200 + work = (200 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 30000, MAT_METALHYDROGEN = 3000, MAT_DURASTEEL = 2000, MAT_MORPHIUM = 3000, MAT_GOLD = 5000, MAT_DIAMOND = 7000) -/datum/design/item/mechfab/janus/right_arm - name = "Prototype Gygax Right Arm" +/datum/design/science/mechfab/janus/right_arm + design_name = "Prototype Gygax Right Arm" id = "janus_right_arm" build_path = /obj/item/mecha_parts/part/janus_right_arm - time = 200 + work = (200 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 30000, MAT_METALHYDROGEN = 3000, MAT_DURASTEEL = 2000, MAT_MORPHIUM = 3000, MAT_GOLD = 5000, MAT_DIAMOND = 7000) -/datum/design/item/mechfab/janus/left_leg - name = "Prototype Durand Left Leg" +/datum/design/science/mechfab/janus/left_leg + design_name = "Prototype Durand Left Leg" id = "janus_left_leg" build_path = /obj/item/mecha_parts/part/janus_left_leg - time = 200 + work = (200 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 30000, MAT_METALHYDROGEN = 3000, MAT_DURASTEEL = 2000, MAT_MORPHIUM = 3000, MAT_GOLD = 5000, MAT_URANIUM = 7000) -/datum/design/item/mechfab/janus/right_leg - name = "Prototype Durand Right Leg" +/datum/design/science/mechfab/janus/right_leg + design_name = "Prototype Durand Right Leg" id = "janus_right_leg" build_path = /obj/item/mecha_parts/part/janus_right_leg - time = 200 + work = (200 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 30000, MAT_METALHYDROGEN = 3000, MAT_DURASTEEL = 2000, MAT_MORPHIUM = 3000, MAT_GOLD = 5000, MAT_URANIUM = 7000) -/datum/design/item/mechfab/janus/phase_coil - name = "Janus Phase Coil" +/datum/design/science/mechfab/janus/phase_coil + design_name = "Janus Phase Coil" id = "janus_coil" build_path = /obj/item/prop/alien/phasecoil - time = 600 + work = (600 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_SUPERMATTER = 2000, MAT_PLASTEEL = 60000, MAT_URANIUM = 3250, MAT_DURASTEEL = 2000, MAT_MORPHIUM = 3000, MAT_GOLD = 5000, MAT_VERDANTIUM = 5000, MAT_DIAMOND = 10000, MAT_LEAD = 15000) -/datum/design/item/mechfab/honker +/datum/design/science/mechfab/honker + abstract_type = /datum/design/science/mechfab/honker category = list("H.O.N.K.") -/datum/design/item/mechfab/honker/chassis - name = "H.O.N.K. Chassis" +/datum/design/science/mechfab/honker/chassis + design_name = "H.O.N.K. Chassis" id = "honker_chassis" build_path = /obj/item/mecha_parts/chassis/honker - time = 10 + work = (10 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 18750) -/datum/design/item/mechfab/honker/torso - name = "H.O.N.K. Torso" +/datum/design/science/mechfab/honker/torso + design_name = "H.O.N.K. Torso" id = "honker_torso" build_path = /obj/item/mecha_parts/part/honker_torso - time = 30 + work = (30 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 37500, MAT_GLASS = 15000, MAT_PLASTIC = 10000) -/datum/design/item/mechfab/honker/head - name = "H.O.N.K. Head" +/datum/design/science/mechfab/honker/head + design_name = "H.O.N.K. Head" id = "honker_head" build_path = /obj/item/mecha_parts/part/honker_head - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 15000, MAT_GLASS = 7500, MAT_PLASTIC = 5000) -/datum/design/item/mechfab/honker/left_arm - name = "H.O.N.K. Left Arm" +/datum/design/science/mechfab/honker/left_arm + design_name = "H.O.N.K. Left Arm" id = "honker_left_arm" build_path = /obj/item/mecha_parts/part/honker_left_arm - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 22500, MAT_PLASTIC = 12000) -/datum/design/item/mechfab/honker/right_arm - name = "H.O.N.K. Right Arm" +/datum/design/science/mechfab/honker/right_arm + design_name = "H.O.N.K. Right Arm" id = "honker_right_arm" build_path = /obj/item/mecha_parts/part/honker_right_arm - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 22500, MAT_PLASTIC = 12000) -/datum/design/item/mechfab/honker/left_leg - name = "H.O.N.K. Left Leg" +/datum/design/science/mechfab/honker/left_leg + design_name = "H.O.N.K. Left Leg" id = "honker_left_leg" build_path = /obj/item/mecha_parts/part/honker_left_leg - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 26250, MAT_PLASTIC = 15000) -/datum/design/item/mechfab/honker/right_leg - name = "H.O.N.K. Right Leg" +/datum/design/science/mechfab/honker/right_leg + design_name = "H.O.N.K. Right Leg" id = "honker_right_leg" build_path = /obj/item/mecha_parts/part/honker_right_leg - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 26250, MAT_PLASTIC = 15000) -/datum/design/item/mechfab/honker/armour - name = "H.O.N.K. Armour Plates" +/datum/design/science/mechfab/honker/armour + design_name = "H.O.N.K. Armour Plates" id = "honker_armour" build_path = /obj/item/mecha_parts/part/honker_armour - time = 60 + work = (60 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 37500, MAT_DIAMOND = 7500, MAT_PLASTIC = 5000, MAT_BANANIUM = 20000) -/datum/design/item/mechfab/reticent +/datum/design/science/mechfab/reticent + abstract_type = /datum/design/science/mechfab/reticent category = list("Reticent") -/datum/design/item/mechfab/reticent/chassis - name = "Reticent Chassis" +/datum/design/science/mechfab/reticent/chassis + design_name = "Reticent Chassis" id = "reticent_chassis" build_path = /obj/item/mecha_parts/chassis/reticent - time = 10 + work = (10 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 18750) -/datum/design/item/mechfab/reticent/torso - name = "Reticent Torso" +/datum/design/science/mechfab/reticent/torso + design_name = "Reticent Torso" id = "reticent_torso" build_path = /obj/item/mecha_parts/part/reticent_torso - time = 30 + work = (30 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 37500, MAT_GLASS = 15000, MAT_OSMIUM = 5000) -/datum/design/item/mechfab/reticent/head - name = "Reticent Head" +/datum/design/science/mechfab/reticent/head + design_name = "Reticent Head" id = "reticent_head" build_path = /obj/item/mecha_parts/part/reticent_head - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 15000, MAT_GLASS = 7500, MAT_OSMIUM = 5000) -/datum/design/item/mechfab/reticent/left_arm - name = "Reticent Left Arm" +/datum/design/science/mechfab/reticent/left_arm + design_name = "Reticent Left Arm" id = "reticent_left_arm" build_path = /obj/item/mecha_parts/part/reticent_left_arm - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 22500, MAT_PLASTIC = 12000) -/datum/design/item/mechfab/reticent/right_arm - name = "Reticent Right Arm" +/datum/design/science/mechfab/reticent/right_arm + design_name = "Reticent Right Arm" id = "reticent_right_arm" build_path = /obj/item/mecha_parts/part/reticent_right_arm - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 22500, MAT_PLASTIC = 12000) -/datum/design/item/mechfab/reticent/left_leg - name = "Reticent Left Leg" +/datum/design/science/mechfab/reticent/left_leg + design_name = "Reticent Left Leg" id = "reticent_left_leg" build_path = /obj/item/mecha_parts/part/reticent_left_leg - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 26250, MAT_PLASTIC = 15000) -/datum/design/item/mechfab/reticent/right_leg - name = "Reticent Right Leg" +/datum/design/science/mechfab/reticent/right_leg + design_name = "Reticent Right Leg" id = "reticent_right_leg" build_path = /obj/item/mecha_parts/part/reticent_right_leg - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 26250, MAT_PLASTIC = 15000) -/datum/design/item/mechfab/reticent/armour - name = "Reticent Armour Plates" +/datum/design/science/mechfab/reticent/armour + design_name = "Reticent Armour Plates" id = "reticent_armour" build_path = /obj/item/mecha_parts/part/reticent_armour - time = 60 + work = (60 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 37500, MAT_OSMIUM = 7500, MAT_PLASTIC = 5000, MAT_SILENCIUM = 20000) -/datum/design/item/mecha - build_type = MECHFAB +/datum/design/science/mecha + abstract_type = /datum/design/science/mecha + lathe_type = LATHE_TYPE_MECHA category = list("Exosuit Equipment") - time = 10 + work = (10 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 7500) -/datum/design/item/mecha/AssembleDesignDesc() - if(!desc) - desc = "Allows for the construction of \a '[item_name]' exosuit module." +/datum/design/science/mecha/generate_desc(template_name, template_desc) + return "Allows for the construction of \a '[template_name]' exosuit module." -/datum/design/item/mecha/tracking - name = "Exosuit Tracking Beacon" +/datum/design/science/mecha/tracking + design_name = "Exosuit Tracking Beacon" id = "mech_tracker" - time = 5 + work = (5 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 375) build_path = /obj/item/mecha_parts/mecha_tracking -/datum/design/item/mecha/hydraulic_clamp - name = "Hydraulic Clamp" +/datum/design/science/mecha/hydraulic_clamp + design_name = "Hydraulic Clamp" id = "hydraulic_clamp" build_path = /obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp -/datum/design/item/mecha/drill - name = "Drill" +/datum/design/science/mecha/drill + design_name = "Drill" id = "mech_drill" build_path = /obj/item/mecha_parts/mecha_equipment/tool/drill -/datum/design/item/mecha/extinguisher - name = "Extinguisher" +/datum/design/science/mecha/extinguisher + design_name = "Extinguisher" id = "extinguisher" build_path = /obj/item/mecha_parts/mecha_equipment/tool/extinguisher -/datum/design/item/mecha/cable_layer - name = "Cable Layer" +/datum/design/science/mecha/cable_layer + design_name = "Cable Layer" id = "mech_cable_layer" build_path = /obj/item/mecha_parts/mecha_equipment/tool/cable_layer materials = list(MAT_STEEL = 7500, MAT_PLASTIC = 1000) -/datum/design/item/mecha/flaregun - name = "Flare Launcher" +/datum/design/science/mecha/flaregun + design_name = "Flare Launcher" id = "mecha_flare_gun" build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flare materials = list(MAT_STEEL = 9375) -/datum/design/item/mecha/sleeper - name = "Sleeper" +/datum/design/science/mecha/sleeper + design_name = "Sleeper" id = "mech_sleeper" build_path = /obj/item/mecha_parts/mecha_equipment/tool/sleeper materials = list(MAT_STEEL = 3750, MAT_GLASS = 7500) -/datum/design/item/mecha/syringe_gun - name = "Syringe Gun" +/datum/design/science/mecha/syringe_gun + design_name = "Syringe Gun" id = "mech_syringe_gun" build_path = /obj/item/mecha_parts/mecha_equipment/tool/syringe_gun - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 2250, MAT_GLASS = 1500) -/datum/design/item/mecha/passenger - name = "Passenger Compartment" +/datum/design/science/mecha/passenger + design_name = "Passenger Compartment" id = "mech_passenger" build_path = /obj/item/mecha_parts/mecha_equipment/tool/passenger materials = list(MAT_STEEL = 3750, MAT_GLASS = 3750) -/datum/design/item/mecha/taser - name = "PBT \"Pacifier\" Mounted Taser" +/datum/design/science/mecha/taser + design_name = "PBT \"Pacifier\" Mounted Taser" id = "mech_taser" build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/taser -/datum/design/item/mecha/rigged_taser - name = "Jury-Rigged Taser" +/datum/design/science/mecha/rigged_taser + design_name = "Jury-Rigged Taser" id = "mech_taser-r" build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/taser/rigged -/datum/design/item/mecha/shocker - name = "Exosuit Electrifier" +/datum/design/science/mecha/shocker + design_name = "Exosuit Electrifier" desc = "A device to electrify the external portions of a mecha in order to increase its defensive capabilities." id = "mech_shocker" req_tech = list(TECH_COMBAT = 3, TECH_POWER = 6, TECH_MAGNET = 1) build_path = /obj/item/mecha_parts/mecha_equipment/shocker materials = list(MAT_STEEL = 3500, MAT_GOLD = 750, MAT_GLASS = 1000) -/datum/design/item/mecha/lmg - name = "Ultra AC 2" +/datum/design/science/mecha/lmg + design_name = "Ultra AC 2" id = "mech_lmg" build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg -/datum/design/item/mecha/rigged_lmg - name = "Jury-Rigged Machinegun" +/datum/design/science/mecha/rigged_lmg + design_name = "Jury-Rigged Machinegun" id = "mech_lmg-r" build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg/rigged -/datum/design/item/mecha/weapon +/datum/design/science/mecha/weapon + abstract_type = /datum/design/science/mecha/weapon req_tech = list(TECH_COMBAT = 3) materials = list(MAT_STEEL = 8000, MAT_GLASS = 2000) // *** Weapon modules -/datum/design/item/mecha/weapon/scattershot - name = "LBX AC 10 \"Scattershot\"" +/datum/design/science/mecha/weapon/scattershot + design_name = "LBX AC 10 \"Scattershot\"" id = "mech_scattershot" req_tech = list(TECH_COMBAT = 4) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot materials = list(MAT_STEEL = 8000, MAT_GLASS = 3000, MAT_PLASTIC = 2000, MAT_SILVER = 2500) -/datum/design/item/mecha/weapon/rigged_scattershot - name = "Jury-Rigged Shrapnel Cannon" +/datum/design/science/mecha/weapon/rigged_scattershot + design_name = "Jury-Rigged Shrapnel Cannon" id = "mech_scattershot-r" req_tech = list(TECH_COMBAT = 4) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot/rigged materials = list(MAT_STEEL = 7000, MAT_GLASS = 2000, MAT_PLASTIC = 2000, MAT_SILVER = 2000) -/datum/design/item/mecha/weapon/laser - name = "CH-PS \"Immolator\" Laser" +/datum/design/science/mecha/weapon/laser + design_name = "CH-PS \"Immolator\" Laser" id = "mech_laser" req_tech = list(TECH_COMBAT = 3, TECH_MAGNET = 3) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser materials = list(MAT_STEEL = 8000, MAT_GLASS = 3000, MAT_PLASTIC = 2000) -/datum/design/item/mecha/weapon/laser_rigged - name = "Jury-Rigged Welder-Laser" +/datum/design/science/mecha/weapon/laser_rigged + design_name = "Jury-Rigged Welder-Laser" desc = "Allows for the construction of a welder-laser assembly package for non-combat exosuits." id = "mech_laser_rigged" req_tech = list(TECH_COMBAT = 2, TECH_MAGNET = 2) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/riggedlaser -/datum/design/item/mecha/weapon/laser_heavy - name = "CH-LC \"Solaris\" Laser Cannon" +/datum/design/science/mecha/weapon/laser_heavy + design_name = "CH-LC \"Solaris\" Laser Cannon" id = "mech_laser_heavy" req_tech = list(TECH_COMBAT = 4, TECH_MAGNET = 4) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy materials = list(MAT_STEEL = 10000, MAT_GLASS = 3000, MAT_DIAMOND = 2000, MAT_OSMIUM = 5000, MAT_PLASTIC = 2000) -/datum/design/item/mecha/weapon/rigged_laser_heavy - name = "Jury-Rigged Emitter Cannon" +/datum/design/science/mecha/weapon/rigged_laser_heavy + design_name = "Jury-Rigged Emitter Cannon" id = "mech_laser_heavy-r" req_tech = list(TECH_COMBAT = 4, TECH_MAGNET = 4, TECH_PHORON = 3, TECH_ILLEGAL = 1) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy/rigged materials = list(MAT_STEEL = 8000, MAT_GLASS = 4000, MAT_DIAMOND = 1500, MAT_OSMIUM = 4000, MAT_PLASTIC = 2000) -/datum/design/item/mecha/weapon/laser_xray - name = "CH-XS \"Penetrator\" Laser" +/datum/design/science/mecha/weapon/laser_xray + design_name = "CH-XS \"Penetrator\" Laser" id = "mech_laser_xray" req_tech = list(TECH_MATERIAL = 3, TECH_COMBAT = 3, TECH_PHORON = 3, TECH_POWER = 4) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/xray materials = list(MAT_STEEL = 9000, MAT_GLASS = 3000, MAT_PHORON = 1000, MAT_SILVER = 1500, MAT_GOLD = 2500, MAT_PLASTIC = 2000) -/datum/design/item/mecha/weapon/rigged_laser_xray - name = "Jury-Rigged Xray Rifle" +/datum/design/science/mecha/weapon/rigged_laser_xray + design_name = "Jury-Rigged Xray Rifle" id = "mech_laser_xray-r" req_tech = list(TECH_MATERIAL = 3, TECH_COMBAT = 3, TECH_PHORON = 3, TECH_POWER = 4) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/xray/rigged materials = list(MAT_STEEL = 8500, MAT_GLASS = 2500, MAT_PHORON = 1000, MAT_SILVER = 1250, MAT_GOLD = 2000, MAT_PLASTIC = 2000) -/datum/design/item/mecha/weapon/phase - name = "NT-PE \"Scorpio\" Phase-Emitter" +/datum/design/science/mecha/weapon/phase + design_name = "NT-PE \"Scorpio\" Phase-Emitter" id = "mech_phase" req_tech = list(TECH_MATERIAL = 1, TECH_COMBAT = 2, TECH_MAGNET = 2) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/phase materials = list(MAT_STEEL = 6000, MAT_GLASS = 3000, MAT_PLASTIC = 3000) -/datum/design/item/mecha/weapon/ion - name = "MK-IV Ion Heavy Cannon" +/datum/design/science/mecha/weapon/ion + design_name = "MK-IV Ion Heavy Cannon" id = "mech_ion" req_tech = list(TECH_COMBAT = 4, TECH_MAGNET = 4) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/ion materials = list(MAT_STEEL = 15000, MAT_URANIUM = 2000, MAT_SILVER = 2000, MAT_OSMIUM = 4500, MAT_PLASTIC = 2000) -/datum/design/item/mecha/weapon/rigged_ion - name = "Jury-Rigged Ion Cannon" +/datum/design/science/mecha/weapon/rigged_ion + design_name = "Jury-Rigged Ion Cannon" id = "mech_ion-r" req_tech = list(TECH_COMBAT = 4, TECH_MAGNET = 4) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/ion/rigged materials = list(MAT_STEEL = 13000, MAT_URANIUM = 1000, MAT_SILVER = 1000, MAT_OSMIUM = 3000, MAT_PLASTIC = 2000) -/datum/design/item/mecha/weapon/sound_cannon - name = "H.O.N.K. Sound Cannon" +/datum/design/science/mecha/weapon/sound_cannon + design_name = "H.O.N.K. Sound Cannon" id = "mech_soundcannon" req_tech = list(TECH_COMBAT = 4, TECH_MAGNET = 4, TECH_ILLEGAL = 3) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/honker materials = list(MAT_STEEL = 13000, MAT_SILVER = 1000, MAT_OSMIUM = 3000, MAT_PLASTIC = 2000, MAT_BANANIUM = 4000) -/datum/design/item/mecha/weapon/whisper_blade - name = "Reticent Whisper Blade" +/datum/design/science/mecha/weapon/whisper_blade + design_name = "Reticent Whisper Blade" id = "mech_whisper" req_tech = list(TECH_COMBAT = 5, TECH_MAGNET = 4, TECH_ILLEGAL = 4) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/whisperblade materials = list(MAT_STEEL = 13000, MAT_GOLD = 1000, MAT_OSMIUM = 3000, MAT_PLASTEEL = 2000, MAT_SILENCIUM = 4000) -/datum/design/item/mecha/weapon/inferno_blade - name = "Reticent Inferno Blade" +/datum/design/science/mecha/weapon/inferno_blade + design_name = "Reticent Inferno Blade" id = "mech_inferno" req_tech = list(TECH_COMBAT = 5, TECH_MAGNET = 4, TECH_ILLEGAL = 4) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/infernoblade materials = list(MAT_STEEL = 13000, MAT_GOLD = 1000, MAT_LEAD = 3000, MAT_PLASTEEL = 2000, MAT_SILENCIUM = 4000) -/datum/design/item/mecha/weapon/grenade_launcher - name = "SGL-6 Grenade Launcher" +/datum/design/science/mecha/weapon/grenade_launcher + design_name = "SGL-6 Grenade Launcher" id = "mech_grenade_launcher" req_tech = list(TECH_COMBAT = 3) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/grenade materials = list(MAT_STEEL = 7000, MAT_GOLD = 2000, MAT_PLASTIC = 3000) -/datum/design/item/mecha/weapon/rigged_grenade_launcher - name = "Jury-Rigged Pneumatic Flashlauncher" +/datum/design/science/mecha/weapon/rigged_grenade_launcher + design_name = "Jury-Rigged Pneumatic Flashlauncher" id = "mech_grenade_launcher-hardsuit" req_tech = list(TECH_COMBAT = 3) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/grenade/rigged materials = list(MAT_STEEL = 5000, MAT_GOLD = 2000, MAT_PLASTIC = 2000) -/datum/design/item/mecha/weapon/clusterbang_launcher - name = "SOP-6 Grenade Launcher" +/datum/design/science/mecha/weapon/clusterbang_launcher + design_name = "SOP-6 Grenade Launcher" desc = "A weapon that violates the Geneva Convention at 6 rounds per minute." id = "clusterbang_launcher" req_tech = list(TECH_COMBAT= 5, TECH_MATERIAL = 5, TECH_ILLEGAL = 3) materials = list(MAT_STEEL = 15000, MAT_GOLD = 4500, MAT_URANIUM = 4500) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/grenade/clusterbang/limited -/datum/design/item/mecha/weapon/conc_grenade_launcher - name = "SGL-9 Grenade Launcher" +/datum/design/science/mecha/weapon/conc_grenade_launcher + design_name = "SGL-9 Grenade Launcher" id = "mech_grenade_launcher_conc" req_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 4, TECH_ILLEGAL = 1) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/grenade/concussion materials = list(MAT_STEEL = 9000, MAT_GOLD = 1000, MAT_OSMIUM = 1000, MAT_PLASTIC = 3000) -/datum/design/item/mecha/weapon/frag_grenade_launcher - name = "HEP-MI 6 Grenade Launcher" +/datum/design/science/mecha/weapon/frag_grenade_launcher + design_name = "HEP-MI 6 Grenade Launcher" id = "mech_grenade_launcher_frag" req_tech = list(TECH_COMBAT = 4, TECH_ENGINEERING = 2, TECH_MATERIAL = 3, TECH_ILLEGAL = 2) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/grenade/frag/mini materials = list(MAT_STEEL = 10000, MAT_GOLD = 2500, MAT_URANIUM = 3000, MAT_OSMIUM = 3000, MAT_PLASTIC = 3000) -/datum/design/item/mecha/weapon/banana_launcher - name = "WSS-2 Banana Peel Launcher" +/datum/design/science/mecha/weapon/banana_launcher + design_name = "WSS-2 Banana Peel Launcher" id = "mech_banana_launcher" req_tech = list(TECH_COMBAT = 3, TECH_ILLEGAL = 3) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/grenade/banana materials = list(MAT_STEEL = 7000, MAT_GOLD = 2000, MAT_OSMIUM = 1000, MAT_PLASTIC = 5000, MAT_BANANIUM = 4000) -/datum/design/item/mecha/weapon/mousetrap_launcher - name = "WSS-5 Mouse Trap Launcher" +/datum/design/science/mecha/weapon/mousetrap_launcher + design_name = "WSS-5 Mouse Trap Launcher" id = "mech_mousetrap_launcher" req_tech = list(TECH_COMBAT = 3, TECH_ILLEGAL = 3) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/grenade/mousetrap materials = list(MAT_STEEL = 7000, MAT_GOLD = 2000, MAT_OSMIUM = 1000, MAT_PLASTIC = 5000, MAT_BANANIUM = 4000) -/datum/design/item/mecha/weapon/flamer - name = "CR-3 Mark 8 Flamethrower" +/datum/design/science/mecha/weapon/flamer + design_name = "CR-3 Mark 8 Flamethrower" desc = "A weapon that violates the CCWC at two hundred gallons per minute." id = "mech_flamer_full" req_tech = list(TECH_MATERIAL = 4, TECH_COMBAT = 6, TECH_PHORON = 4, TECH_ILLEGAL = 4) materials = list(MAT_STEEL = 10000, MAT_GOLD = 2000, MAT_URANIUM = 3000, MAT_PHORON = 8000) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/flamer -/datum/design/item/mecha/weapon/flamer_rigged - name = "AA-CR-1 Mark 4 Flamethrower" +/datum/design/science/mecha/weapon/flamer_rigged + design_name = "AA-CR-1 Mark 4 Flamethrower" desc = "A weapon that accidentally violates the CCWC at one hundred gallons per minute." id = "mech_flamer_rigged" req_tech = list(TECH_MATERIAL = 3, TECH_COMBAT = 3, TECH_PHORON = 3, TECH_ILLEGAL = 2) materials = list(MAT_STEEL = 8000, MAT_GOLD = 1500, MAT_SILVER = 1500, MAT_URANIUM = 2000, MAT_PHORON = 6000) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/flamer/rigged -/datum/design/item/mecha/weapon/flame_mg - name = "DR-AC 3 Incendiary Rotary MG" +/datum/design/science/mecha/weapon/flame_mg + design_name = "DR-AC 3 Incendiary Rotary MG" desc = "A weapon that violates the CCWC at sixty rounds a minute." id = "mech_lmg_flamer" req_tech = list(TECH_MATERIAL = 4, TECH_COMBAT = 5, TECH_PHORON = 2, TECH_ILLEGAL = 1) @@ -689,191 +698,191 @@ build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/incendiary // *** Nonweapon modules -/datum/design/item/mecha/wormhole_gen - name = "Wormhole Generator" +/datum/design/science/mecha/wormhole_gen + design_name = "Wormhole Generator" desc = "An exosuit module that can generate small quasi-stable wormholes." id = "mech_wormhole_gen" req_tech = list(TECH_BLUESPACE = 3, TECH_MAGNET = 2) build_path = /obj/item/mecha_parts/mecha_equipment/wormhole_generator -/datum/design/item/mecha/teleporter - name = "Teleporter" +/datum/design/science/mecha/teleporter + design_name = "Teleporter" desc = "An exosuit module that allows teleportation to any position in view." id = "mech_teleporter" req_tech = list(TECH_BLUESPACE = 10, TECH_MAGNET = 5) build_path = /obj/item/mecha_parts/mecha_equipment/teleporter -/datum/design/item/mecha/rcd - name = "RCD" +/datum/design/science/mecha/rcd + design_name = "RCD" desc = "An exosuit-mounted rapid construction device." id = "mech_rcd" - time = 120 + work = (120 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 20000, MAT_PLASTIC = 10000, MAT_PHORON = 18750, MAT_SILVER = 15000, MAT_GOLD = 15000) req_tech = list(TECH_MATERIAL = 4, TECH_BLUESPACE = 3, TECH_MAGNET = 4, TECH_POWER = 4, TECH_ENGINEERING = 4) build_path = /obj/item/mecha_parts/mecha_equipment/tool/rcd -/datum/design/item/mecha/gravcatapult - name = "Gravitational Catapult" +/datum/design/science/mecha/gravcatapult + design_name = "Gravitational Catapult" desc = "An exosuit-mounted gravitational catapult." id = "mech_gravcatapult" req_tech = list(TECH_BLUESPACE = 2, TECH_MAGNET = 3, TECH_ENGINEERING = 3) build_path = /obj/item/mecha_parts/mecha_equipment/gravcatapult -/datum/design/item/mecha/repair_droid - name = "Repair Droid" +/datum/design/science/mecha/repair_droid + design_name = "Repair Droid" desc = "Automated repair droid, exosuits' best companion. BEEP BOOP" id = "mech_repair_droid" req_tech = list(TECH_MAGNET = 3, TECH_DATA = 3, TECH_ENGINEERING = 3) materials = list(MAT_STEEL = 7500, MAT_GOLD = 750, MAT_SILVER = 1500, MAT_GLASS = 3750) build_path = /obj/item/mecha_parts/mecha_equipment/repair_droid -/datum/design/item/mecha/shield_drone - name = "Shield Drone" +/datum/design/science/mecha/shield_drone + design_name = "Shield Drone" desc = "Manual shield drone. Deploys a large, familiar, and rectangular shield in one direction at a time." id = "mech_shield_droid" req_tech = list(TECH_PHORON = 3, TECH_MAGNET = 6, TECH_ILLEGAL = 4) materials = list(MAT_STEEL = 8000, MAT_GOLD = 2000, MAT_SILVER = 3000, MAT_PHORON = 5000, MAT_GLASS = 3750) build_path = /obj/item/mecha_parts/mecha_equipment/combat_shield -/datum/design/item/mecha/reticent_shield_drone - name = "Reticent Wall Projector" +/datum/design/science/mecha/reticent_shield_drone + design_name = "Reticent Wall Projector" desc = "A Le Rien specialty shield drone. Deploys a translucent rectangular shield in one direction." id = "mech_reticent_shield_droid" req_tech = list(TECH_PHORON = 3, TECH_MAGNET = 6, TECH_ILLEGAL = 4) materials = list(MAT_STEEL = 8000, MAT_OSMIUM = 4000, MAT_SILVER = 3000, MAT_SILENCIUM = 10000, MAT_GLASS = 3750) build_path = /obj/item/mecha_parts/mecha_equipment/combat_shield/reticent -/datum/design/item/mecha/crisis_drone - name = "Crisis Drone" +/datum/design/science/mecha/crisis_drone + design_name = "Crisis Drone" desc = "Deploys a small medical drone capable of patching small wounds in order to stabilize nearby patients." id = "mech_med_droid" req_tech = list(TECH_PHORON = 3, TECH_MAGNET = 6, TECH_BIO = 5, TECH_DATA = 4, TECH_ARCANE = 1) materials = list(MAT_STEEL = 8000, MAT_GOLD = 2000, MAT_SILVER = 3000, MAT_VERDANTIUM = 2500, MAT_GLASS = 3000) build_path = /obj/item/mecha_parts/mecha_equipment/crisis_drone -/datum/design/item/mecha/rad_drone - name = "Hazmat Drone" +/datum/design/science/mecha/rad_drone + design_name = "Hazmat Drone" desc = "Deploys a small hazmat drone capable of purging minor radiation damage in order to stabilize nearby patients." id = "mech_rad_droid" req_tech = list(TECH_PHORON = 4, TECH_MAGNET = 5, TECH_BIO = 6, TECH_DATA = 4, TECH_ARCANE = 1) materials = list(MAT_STEEL = 8000, MAT_GOLD = 2000, MAT_URANIUM = 3000, MAT_VERDANTIUM = 2500, MAT_GLASS = 3000) build_path = /obj/item/mecha_parts/mecha_equipment/crisis_drone/rad -/datum/design/item/mecha/medanalyzer - name = "Mounted Body Scanner" +/datum/design/science/mecha/medanalyzer + design_name = "Mounted Body Scanner" desc = "An advanced mech-mounted device that is not quite as powerful as a stationary body scanner, though still suitably powerful." id = "mech_med_analyzer" req_tech = list(TECH_PHORON = 4, TECH_MAGNET = 5, TECH_BIO = 5, TECH_DATA = 4) materials = list(MAT_PLASTEEL = 4500, MAT_GOLD = 2000, MAT_URANIUM = 3000, MAT_GLASS = 3000) build_path = /obj/item/mecha_parts/mecha_equipment/tool/powertool/medanalyzer -/datum/design/item/mecha/jetpack - name = "Ion Jetpack" +/datum/design/science/mecha/jetpack + design_name = "Ion Jetpack" desc = "Using directed ion bursts and cunning solar wind reflection technique, this device enables controlled space flight." id = "mech_jetpack" req_tech = list(TECH_ENGINEERING = 3, TECH_MAGNET = 4) //One less magnet than the actual got-damn teleporter. build_path = /obj/item/mecha_parts/mecha_equipment/tool/jetpack materials = list(MAT_STEEL = 7500, MAT_SILVER = 300, MAT_GLASS = 600) -/datum/design/item/mecha/phoron_generator +/datum/design/science/mecha/phoron_generator desc = "Phoron Reactor" id = "mech_phoron_generator" req_tech = list(TECH_PHORON = 2, TECH_POWER= 2, TECH_ENGINEERING = 2) build_path = /obj/item/mecha_parts/mecha_equipment/generator materials = list(MAT_STEEL = 7500, MAT_SILVER = 375, MAT_GLASS = 750) -/datum/design/item/mecha/energy_relay - name = "Energy Relay" +/datum/design/science/mecha/energy_relay + design_name = "Energy Relay" id = "mech_energy_relay" req_tech = list(TECH_MAGNET = 4, TECH_POWER = 3) materials = list(MAT_STEEL = 7500, MAT_GOLD = 1500, MAT_SILVER = 2250, MAT_GLASS = 1500) build_path = /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay -/datum/design/item/mecha/ccw_armor - name = "CCW Armor Booster" +/datum/design/science/mecha/ccw_armor + design_name = "CCW Armor Booster" desc = "Exosuit close-combat armor booster." id = "mech_ccw_armor" req_tech = list(TECH_MATERIAL = 5, TECH_COMBAT = 4) materials = list(MAT_STEEL = 11250, MAT_SILVER = 3750) build_path = /obj/item/mecha_parts/mecha_equipment/anticcw_armor_booster -/datum/design/item/mecha/proj_armor - name = "Ranged Armor Booster" +/datum/design/science/mecha/proj_armor + design_name = "Ranged Armor Booster" desc = "Exosuit projectile armor booster." id = "mech_proj_armor" req_tech = list(TECH_MATERIAL = 5, TECH_COMBAT = 5, TECH_ENGINEERING = 3) materials = list(MAT_STEEL = 15000, MAT_GOLD = 3750) build_path = /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster -/datum/design/item/mecha/diamond_drill - name = "Diamond Drill" +/datum/design/science/mecha/diamond_drill + design_name = "Diamond Drill" desc = "A diamond version of the exosuit drill. It's harder, better, faster, stronger." id = "mech_diamond_drill" req_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 3) materials = list(MAT_STEEL = 7500, MAT_DIAMOND = 4875) build_path = /obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill -/datum/design/item/mecha/ground_drill - name = "Surface Bore" +/datum/design/science/mecha/ground_drill + design_name = "Surface Bore" desc = "A heavy duty bore. Bigger, better, stronger than the core sampler, but not quite as good as a large drill." id = "mech_ground_drill" req_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 2, TECH_PHORON = 1) materials = list(MAT_STEEL = 7000, MAT_SILVER = 3000, MAT_PHORON = 2000) build_path = /obj/item/mecha_parts/mecha_equipment/tool/drill/bore -/datum/design/item/mecha/orescanner - name = "Ore Scanner" +/datum/design/science/mecha/orescanner + design_name = "Ore Scanner" desc = "A hefty device used to scan for subterranean veins of ore." id = "mech_ore_scanner" req_tech = list(TECH_MATERIAL = 2, TECH_MAGNET = 2, TECH_POWER = 2) materials = list(MAT_STEEL = 4000, MAT_GLASS = 1000) build_path = /obj/item/mecha_parts/mecha_equipment/tool/orescanner -/datum/design/item/mecha/advorescanner - name = "Advanced Ore Scanner" +/datum/design/science/mecha/advorescanner + design_name = "Advanced Ore Scanner" desc = "A hefty device used to scan for the exact volumes of subterranean veins of ore." id = "mech_ore_scanner_adv" req_tech = list(TECH_MATERIAL = 5, TECH_MAGNET = 4, TECH_POWER = 4, TECH_BLUESPACE = 2) materials = list(MAT_STEEL = 5000, MAT_OSMIUM = 3000, MAT_SILVER = 1000) build_path = /obj/item/mecha_parts/mecha_equipment/tool/orescanner/advanced -/datum/design/item/mecha/powerwrench - name = "hydraulic wrench" +/datum/design/science/mecha/powerwrench + design_name = "hydraulic wrench" desc = "A large, hydraulic wrench." id = "mech_wrench" req_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2, TECH_POWER = 2) materials = list(MAT_STEEL = 5000, MAT_PLASTIC = 2000, MAT_GLASS = 1250) build_path = /obj/item/mecha_parts/mecha_equipment/tool/powertool -/datum/design/item/mecha/powercrowbar - name = "hydraulic prybar" +/datum/design/science/mecha/powercrowbar + design_name = "hydraulic prybar" desc = "A large, hydraulic prybar." id = "mech_crowbar" req_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2, TECH_POWER = 2) materials = list(MAT_STEEL = 4000, MAT_OSMIUM = 3000, MAT_GLASS = 1000) build_path = /obj/item/mecha_parts/mecha_equipment/tool/powertool/prybar -/datum/design/item/mecha/generator_nuclear - name = "Nuclear Reactor" +/datum/design/science/mecha/generator_nuclear + design_name = "Nuclear Reactor" desc = "Exosuit-held nuclear reactor. Converts uranium and everyone's health to energy." id = "mech_generator_nuclear" req_tech = list(TECH_POWER= 3, TECH_ENGINEERING = 3, TECH_MATERIAL = 3) materials = list(MAT_STEEL = 7500, MAT_SILVER = 375, MAT_GLASS = 750) build_path = /obj/item/mecha_parts/mecha_equipment/generator/nuclear -/datum/design/item/mecha/speedboost_ripley - name = "Ripley Leg Actuator Overdrive" +/datum/design/science/mecha/speedboost_ripley + design_name = "Ripley Leg Actuator Overdrive" desc = "System enhancements and overdrives to make a mech's legs move faster." id = "mech_speedboost_ripley" req_tech = list(TECH_POWER = 5, TECH_MATERIAL = 4, TECH_ENGINEERING = 4) materials = list(MAT_STEEL = 10000, MAT_SILVER = 1000, MAT_GOLD = 1000) build_path = /obj/item/mecha_parts/mecha_equipment/speedboost -/datum/design/item/synthetic_flash - name = "Synthetic Flash" +/datum/design/science/synthetic_flash + design_name = "Synthetic Flash" id = "sflash" req_tech = list(TECH_MAGNET = 3, TECH_COMBAT = 2) - build_type = MECHFAB + lathe_type = LATHE_TYPE_MECHA materials = list(MAT_STEEL = 562, MAT_GLASS = 562) build_path = /obj/item/flash/synthetic category = list("Misc") @@ -882,94 +891,94 @@ * Printable Internal Components */ -/datum/design/item/mecha_component - name = "Mecha Actuator" +/datum/design/science/mecha_component + design_name = "Mecha Actuator" id = "mactuator" req_tech = list(TECH_ENGINEERING = 3, TECH_MATERIAL = 2) - build_type = MECHFAB + lathe_type = LATHE_TYPE_MECHA materials = list(MAT_STEEL = 5000, MAT_GLASS = 2500) build_path = /obj/item/mecha_parts/component/actuator category = list("Components") -/datum/design/item/mecha_component/actuator_high - name = "Mecha Actuator - High Speed" +/datum/design/science/mecha_component/actuator_high + design_name = "Mecha Actuator - High Speed" id = "mactuatorhigh" req_tech = list(TECH_ENGINEERING = 5, TECH_MATERIAL = 6) materials = list(MAT_STEEL = 7000, MAT_GLASS = 4000, MAT_GOLD = 10000) build_path = /obj/item/mecha_parts/component/actuator/hispeed -/datum/design/item/mecha_component/armor - name = "Mecha Plating" +/datum/design/science/mecha_component/armor + design_name = "Mecha Plating" id = "marmor" req_tech = list(TECH_ENGINEERING = 3, TECH_MATERIAL = 3) materials = list(MAT_STEEL = 10000, MAT_GLASS = 2000) build_path = /obj/item/mecha_parts/component/armor -/datum/design/item/mecha_component/armor/blast - name = "Mecha Plating - Blast Resistant" +/datum/design/science/mecha_component/armor/blast + design_name = "Mecha Plating - Blast Resistant" id = "marmorblast" req_tech = list(TECH_ENGINEERING = 5, TECH_MATERIAL = 4) materials = list(MAT_STEEL = 15000, MAT_GLASS = 500, MAT_PLASTEEL = 2000) build_path = /obj/item/mecha_parts/component/armor/mining -/datum/design/item/mecha_component/armor/lightweight - name = "Mecha Plating - Lightweight" +/datum/design/science/mecha_component/armor/lightweight + design_name = "Mecha Plating - Lightweight" id = "marmorlight" req_tech = list(TECH_ENGINEERING = 5, TECH_MATERIAL = 6) materials = list(MAT_STEEL = 7000, MAT_PLASTIC = 5000, MAT_GOLD = 2000) build_path = /obj/item/mecha_parts/component/armor/lightweight -/datum/design/item/mecha_component/armor/reinforced - name = "Mecha Plating - Reinforced" +/datum/design/science/mecha_component/armor/reinforced + design_name = "Mecha Plating - Reinforced" id = "marmorreinf" req_tech = list(TECH_ENGINEERING = 5, TECH_MATERIAL = 6, TECH_COMBAT = 5) materials = list(MAT_STEEL = 15000, MAT_PLASTEEL = 5000, MAT_URANIUM = 5000) build_path = /obj/item/mecha_parts/component/armor/reinforced -/datum/design/item/mecha_component/electrical - name = "Mecha Electrical Harness" +/datum/design/science/mecha_component/electrical + design_name = "Mecha Electrical Harness" id = "melectrical" req_tech = list(TECH_ENGINEERING = 3, TECH_POWER = 3) materials = list(MAT_STEEL = 5000, MAT_GLASS = 2000, MAT_PLASTIC = 1000) build_path = /obj/item/mecha_parts/component/electrical -/datum/design/item/mecha_component/electrical/high_current - name = "Mecha Electrical Harness - High Current" +/datum/design/science/mecha_component/electrical/high_current + design_name = "Mecha Electrical Harness - High Current" id = "melectricalhigh" req_tech = list(TECH_ENGINEERING = 5, TECH_POWER = 5, TECH_MATERIAL = 4) materials = list(MAT_STEEL = 3000, MAT_GLASS = 4000, MAT_PLASTIC = 5000, MAT_GOLD = 5000) build_path = /obj/item/mecha_parts/component/electrical -/datum/design/item/mecha_component/hull - name = "Mecha Hull" +/datum/design/science/mecha_component/hull + design_name = "Mecha Hull" id = "mhull" req_tech = list(TECH_ENGINEERING = 3, TECH_MATERIAL = 2) materials = list(MAT_STEEL = 7000, MAT_GLASS = 500) build_path = /obj/item/mecha_parts/component/hull -/datum/design/item/mecha_component/hull/durable - name = "Mecha Hull - Durable" +/datum/design/science/mecha_component/hull/durable + design_name = "Mecha Hull - Durable" id = "mhulldura" req_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 4) materials = list(MAT_STEEL = 7000, MAT_GLASS = 500, MAT_PLASTEEL = 10000) build_path = /obj/item/mecha_parts/component/hull/durable -/datum/design/item/mecha_component/hull/lightweight - name = "Mecha Hull - Lightweight" +/datum/design/science/mecha_component/hull/lightweight + design_name = "Mecha Hull - Lightweight" id = "mhulllight" req_tech = list(TECH_ENGINEERING = 5, TECH_MATERIAL = 5) materials = list(MAT_STEEL = 5000, MAT_GLASS = 500, MAT_PLASTIC = 3000) build_path = /obj/item/mecha_parts/component/hull/lightweight -/datum/design/item/mecha_component/gas - name = "Mecha Life-Support" +/datum/design/science/mecha_component/gas + design_name = "Mecha Life-Support" id = "mgas" req_tech = list(TECH_ENGINEERING = 3, TECH_MATERIAL = 2, TECH_BIO = 3) materials = list(MAT_STEEL = 2000, MAT_GLASS = 3000) build_path = /obj/item/mecha_parts/component/gas -/datum/design/item/mecha_component/gas/reinforced - name = "Mecha Life-Support - Reinforced" +/datum/design/science/mecha_component/gas/reinforced + design_name = "Mecha Life-Support - Reinforced" id = "mgasreinf" req_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 3, TECH_BIO = 5) materials = list(MAT_STEEL = 5000, MAT_GLASS = 3000, MAT_SILVER = 4000) @@ -979,21 +988,22 @@ * Non-Mech Vehicles */ -/datum/design/item/mechfab/vehicle - build_type = MECHFAB +/datum/design/science/mechfab/vehicle + abstract_type = /datum/design/science/mechfab/vehicle + lathe_type = LATHE_TYPE_MECHA category = list("Vehicle") req_tech = list(TECH_MATERIAL = 5, TECH_ENGINEERING = 6) -/datum/design/item/mechfab/vehicle/spacebike_chassis - name = "Spacebike Chassis" +/datum/design/science/mechfab/vehicle/spacebike_chassis + design_name = "Spacebike Chassis" desc = "A space-bike's un-assembled frame." id = "vehicle_chassis_spacebike" req_tech = list(TECH_MATERIAL = 5, TECH_ENGINEERING = 6, TECH_BLUESPACE = 3, TECH_PHORON = 3) materials = list(MAT_STEEL = 12000, MAT_SILVER = 3000, MAT_PHORON = 3000, MAT_OSMIUM = 1000) build_path = /obj/item/vehicle_assembly/spacebike -/datum/design/item/mechfab/vehicle/quadbike_chassis - name = "Quadbike Chassis" +/datum/design/science/mechfab/vehicle/quadbike_chassis + design_name = "Quadbike Chassis" desc = "A space-bike's un-assembled frame." id = "vehicle_chassis_quadbike" req_tech = list(TECH_MATERIAL = 5, TECH_ENGINEERING = 6, TECH_MAGNET = 3, TECH_POWER = 2) @@ -1001,11 +1011,11 @@ build_path = /obj/item/vehicle_assembly/quadbike /* -/datum/design/item/mechfab/uav/basic - name = "UAV - Recon Skimmer" +/datum/design/science/mechfab/uav/basic + design_name = "UAV - Recon Skimmer" id = "recon_skimmer" build_path = /obj/item/uav - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. req_tech = list(TECH_MATERIAL = 6, TECH_ENGINEERING = 5, TECH_PHORON = 3, TECH_MAGNET = 4, TECH_POWER = 6) materials = list(MAT_STEEL = 10000, MAT_GLASS = 6000, MAT_SILVER = 4000) */ @@ -1014,188 +1024,193 @@ ///Fighters/// ///--------/// +/datum/design/science/mechfab/fighter + abstract_type = /datum/design/science/mechfab/fighter ///Pinnace/// -/datum/design/item/mechfab/fighter/pinnace +/datum/design/science/mechfab/fighter/pinnace + abstract_type = /datum/design/science/mechfab/fighter/pinnace category = list("Pinnace") -/datum/design/item/mechfab/fighter/pinnace/chassis - name = "Pinnace Chassis" +/datum/design/science/mechfab/fighter/pinnace/chassis + design_name = "Pinnace Chassis" id = "pinnace_chassis" build_path = /obj/item/mecha_parts/fighter/chassis/pinnace - time = 30 + work = 3 * 30 materials = list(MAT_STEEL = 25000, MAT_GLASS = 10000, MAT_PLASTEEL = 10000) -/datum/design/item/mechfab/fighter/pinnace/core - name = "Pinnace Core" +/datum/design/science/mechfab/fighter/pinnace/core + design_name = "Pinnace Core" id = "pinnace_core" build_path = /obj/item/mecha_parts/fighter/part/pinnace_core - time = 60 + work = 3 * 60 materials = list(MAT_STEEL = 25000, MAT_GLASS = 7000, MAT_PLASTEEL = 7000) -/datum/design/item/mechfab/fighter/pinnace/cockpit - name = "Pinnace Cockpit" +/datum/design/science/mechfab/fighter/pinnace/cockpit + design_name = "Pinnace Cockpit" id = "pinnace_cockpit" build_path = /obj/item/mecha_parts/fighter/part/pinnace_cockpit - time = 15 + work = 3 * 15 materials = list(MAT_STEEL = 2500, MAT_PLASTEEL = 2500, MAT_GLASS = 7500, MAT_PLASTIC = 2500) -/datum/design/item/mechfab/fighter/pinnace/main_engine - name = "Pinnace Main Engine" +/datum/design/science/mechfab/fighter/pinnace/main_engine + design_name = "Pinnace Main Engine" id = "pinnace_main_engine" build_path = /obj/item/mecha_parts/fighter/part/pinnace_main_engine - time = 25 + work = 3 * 25 materials = list(MAT_STEEL = 15000, MAT_PLASTEEL = 5000) -/datum/design/item/mechfab/fighter/pinnace/left_engine - name = "Pinnace Left Engine" +/datum/design/science/mechfab/fighter/pinnace/left_engine + design_name = "Pinnace Left Engine" id = "pinnace_left_engine" build_path = /obj/item/mecha_parts/fighter/part/pinnace_left_engine - time = 25 + work = 3 * 25 materials = list(MAT_STEEL = 10000, MAT_PLASTEEL = 2500) -/datum/design/item/mechfab/fighter/pinnace/right_engine - name = "Pinnace Right Engine" +/datum/design/science/mechfab/fighter/pinnace/right_engine + design_name = "Pinnace Right Engine" id = "pinnace_right_engine" build_path = /obj/item/mecha_parts/fighter/part/pinnace_right_engine - time = 25 + work = 3 * 25 materials = list(MAT_STEEL = 10000, MAT_PLASTEEL = 2500) -/datum/design/item/mechfab/fighter/pinnace/left_wing - name = "Pinnace Left Wing" +/datum/design/science/mechfab/fighter/pinnace/left_wing + design_name = "Pinnace Left Wing" id = "pinnace_left_wing" build_path = /obj/item/mecha_parts/fighter/part/pinnace_left_wing - time = 20 + work = 3 * 20 materials = list(MAT_STEEL = 7000, MAT_PLASTIC = 3000, MAT_PLASTEEL = 5000) -/datum/design/item/mechfab/fighter/pinnace/right_wing - name = "Pinnace Right Wing" +/datum/design/science/mechfab/fighter/pinnace/right_wing + design_name = "Pinnace Right Wing" id = "pinnace_right_wing" build_path = /obj/item/mecha_parts/fighter/part/pinnace_right_wing - time = 20 + work = 3 * 20 materials = list(MAT_STEEL = 7000, MAT_PLASTIC = 3000, MAT_PLASTEEL = 5000) ///Baron/// -/datum/design/item/mechfab/fighter/baron +/datum/design/science/mechfab/fighter/baron + abstract_type = /datum/design/science/mechfab/fighter/baron category = list("Baron") -/datum/design/item/mechfab/fighter/baron/chassis - name = "Baron Chassis" +/datum/design/science/mechfab/fighter/baron/chassis + design_name = "Baron Chassis" id = "baron_chassis" build_path = /obj/item/mecha_parts/fighter/chassis/baron - time = 30 + work = 3 * 30 materials = list(MAT_STEEL = 37500, MAT_GLASS = 15000, MAT_PLASTEEL = 15000) -/datum/design/item/mechfab/fighter/baron/core - name = "Baron Core" +/datum/design/science/mechfab/fighter/baron/core + design_name = "Baron Core" id = "baron_core" build_path = /obj/item/mecha_parts/fighter/part/baron_core - time = 60 + work = 3 * 60 materials = list(MAT_STEEL = 37500, MAT_GLASS = 15000, MAT_PLASTEEL = 15000) -/datum/design/item/mechfab/fighter/baron/cockpit - name = "Baron Cockpit" +/datum/design/science/mechfab/fighter/baron/cockpit + design_name = "Baron Cockpit" id = "baron_cockpit" build_path = /obj/item/mecha_parts/fighter/part/baron_cockpit - time = 15 + work = 3 * 15 materials = list(MAT_STEEL = 5000, MAT_PLASTEEL = 5000, MAT_GLASS = 10000, MAT_PLASTIC = 5000) -/datum/design/item/mechfab/fighter/baron/main_engine - name = "Baron Main Engine" +/datum/design/science/mechfab/fighter/baron/main_engine + design_name = "Baron Main Engine" id = "baron_main_engine" build_path = /obj/item/mecha_parts/fighter/part/baron_main_engine - time = 25 + work = 3 * 25 materials = list(MAT_STEEL = 25000, MAT_PLASTEEL = 10000) -/datum/design/item/mechfab/fighter/baron/left_engine - name = "Baron Left Engine" +/datum/design/science/mechfab/fighter/baron/left_engine + design_name = "Baron Left Engine" id = "baron_left_engine" build_path = /obj/item/mecha_parts/fighter/part/baron_left_engine - time = 25 + work = 3 * 25 materials = list(MAT_STEEL = 20000, MAT_PLASTEEL = 5000) -/datum/design/item/mechfab/fighter/baron/right_engine - name = "Baron Right Engine" +/datum/design/science/mechfab/fighter/baron/right_engine + design_name = "Baron Right Engine" id = "baron_right_engine" build_path = /obj/item/mecha_parts/fighter/part/baron_right_engine - time = 25 + work = 3 * 25 materials = list(MAT_STEEL = 20000, MAT_PLASTEEL = 5000) -/datum/design/item/mechfab/fighter/baron/left_wing - name = "Baron Left Wing" +/datum/design/science/mechfab/fighter/baron/left_wing + design_name = "Baron Left Wing" id = "baron_left_wing" build_path = /obj/item/mecha_parts/fighter/part/baron_left_wing - time = 20 + work = 3 * 20 materials = list(MAT_STEEL = 15000, MAT_PLASTIC = 6000, MAT_PLASTEEL = 10000) -/datum/design/item/mechfab/fighter/baron/right_wing - name = "Baron Right Wing" +/datum/design/science/mechfab/fighter/baron/right_wing + design_name = "Baron Right Wing" id = "baron_right_wing" build_path = /obj/item/mecha_parts/fighter/part/baron_right_wing - time = 20 + work = 3 * 20 materials = list(MAT_STEEL = 15000, MAT_PLASTIC = 6000, MAT_PLASTEEL = 10000) ///Duke/// -/datum/design/item/mechfab/fighter/duke +/datum/design/science/mechfab/fighter/duke + abstract_type = /datum/design/science/mechfab/fighter/duke category = list("Duke") -/datum/design/item/mechfab/fighter/duke/chassis - name = "Duke Chassis" +/datum/design/science/mechfab/fighter/duke/chassis + design_name = "Duke Chassis" id = "duke_chassis" build_path = /obj/item/mecha_parts/fighter/chassis/duke - time = 30 + work = 3 * 30 materials = list(MAT_STEEL = 37500, MAT_GLASS = 15000, MAT_PLASTEEL = 20000) -/datum/design/item/mechfab/fighter/duke/core - name = "Duke Core" +/datum/design/science/mechfab/fighter/duke/core + design_name = "Duke Core" id = "duke_core" build_path = /obj/item/mecha_parts/fighter/part/duke_core - time = 60 + work = 3 * 60 materials = list(MAT_STEEL = 37500, MAT_GLASS = 10000, MAT_PLASTEEL = 20000) -/datum/design/item/mechfab/fighter/duke/cockpit - name = "Duke Cockpit" +/datum/design/science/mechfab/fighter/duke/cockpit + design_name = "Duke Cockpit" id = "duke_cockpit" build_path = /obj/item/mecha_parts/fighter/part/duke_cockpit - time = 15 + work = 3 * 15 materials = list(MAT_STEEL = 5000, MAT_GLASS = 2500, MAT_PLASTEEL = 5000, MAT_PLASTIC = 5000) -/datum/design/item/mechfab/fighter/duke/main_engine - name = "Duke Main Engine" +/datum/design/science/mechfab/fighter/duke/main_engine + design_name = "Duke Main Engine" id = "duke_main_engine" build_path = /obj/item/mecha_parts/fighter/part/duke_main_engine - time = 25 + work = 3 * 25 materials = list(MAT_STEEL = 25000, MAT_PLASTEEL = 15000) -/datum/design/item/mechfab/fighter/duke/left_engine - name = "Duke Left Engine" +/datum/design/science/mechfab/fighter/duke/left_engine + design_name = "Duke Left Engine" id = "duke_left_engine" build_path = /obj/item/mecha_parts/fighter/part/duke_left_engine - time = 25 + work = 3 * 25 materials = list(MAT_STEEL = 20000, MAT_PLASTEEL = 10000) -/datum/design/item/mechfab/fighter/duke/right_engine - name = "Duke Right Engine" +/datum/design/science/mechfab/fighter/duke/right_engine + design_name = "Duke Right Engine" id = "duke_right_engine" build_path = /obj/item/mecha_parts/fighter/part/duke_right_engine - time = 25 + work = 3 * 25 materials = list(MAT_STEEL = 20000, MAT_PLASTEEL = 10000) -/datum/design/item/mechfab/fighter/duke/left_wing - name = "Duke Left Wing" +/datum/design/science/mechfab/fighter/duke/left_wing + design_name = "Duke Left Wing" id = "duke_left_wing" build_path = /obj/item/mecha_parts/fighter/part/duke_left_wing - time = 20 + work = 3 * 20 materials = list(MAT_STEEL = 10000, MAT_PLASTIC = 5000, MAT_PLASTEEL = 20000) -/datum/design/item/mechfab/fighter/duke/right_wing - name = "Duke Right Wing" +/datum/design/science/mechfab/fighter/duke/right_wing + design_name = "Duke Right Wing" id = "duke_right_wing" build_path = /obj/item/mecha_parts/fighter/part/duke_right_wing - time = 20 + work = 3 * 20 materials = list(MAT_STEEL = 10000, MAT_PLASTIC = 5000, MAT_PLASTEEL = 20000) diff --git a/code/modules/research/designs/medical.dm b/code/modules/research/designs/medical.dm index 85195c01c45d..f35f3a50480d 100644 --- a/code/modules/research/designs/medical.dm +++ b/code/modules/research/designs/medical.dm @@ -1,328 +1,278 @@ -/datum/design/item/medical +/datum/design/science/medical + abstract_type = /datum/design/science/medical materials = list(MAT_STEEL = 30, MAT_GLASS = 20) -/datum/design/item/medical/AssembleDesignName() - ..() - name = "Medical equipment prototype ([item_name])" +/datum/design/science/medical/generate_name(template) + return "Medical equipment prototype ([..()])" // Surgical devices -/datum/design/item/medical/scalpel_laser1 - name = "Basic Laser Scalpel" +/datum/design/science/medical/scalpel_laser1 + design_name = "Basic Laser Scalpel" desc = "A scalpel augmented with a directed laser, for more precise cutting without blood entering the field. This one looks basic and could be improved." id = "scalpel_laser1" req_tech = list(TECH_BIO = 2, TECH_MATERIAL = 2, TECH_MAGNET = 2) materials = list(MAT_STEEL = 8000, MAT_GLASS = 5000) build_path = /obj/item/surgical/scalpel/laser1 - sort_string = "KAAAA" -/datum/design/item/medical/scalpel_laser2 - name = "Improved Laser Scalpel" +/datum/design/science/medical/scalpel_laser2 + design_name = "Improved Laser Scalpel" desc = "A scalpel augmented with a directed laser, for more precise cutting without blood entering the field. This one looks somewhat advanced." id = "scalpel_laser2" req_tech = list(TECH_BIO = 3, TECH_MATERIAL = 4, TECH_MAGNET = 4) materials = list(MAT_STEEL = 8000, MAT_GLASS = 5000, MAT_SILVER = 2500) build_path = /obj/item/surgical/scalpel/laser2 - sort_string = "KAAAB" -/datum/design/item/medical/scalpel_laser3 - name = "Advanced Laser Scalpel" +/datum/design/science/medical/scalpel_laser3 + design_name = "Advanced Laser Scalpel" desc = "A scalpel augmented with a directed laser, for more precise cutting without blood entering the field. This one looks to be the pinnacle of precision energy cutlery!" id = "scalpel_laser3" req_tech = list(TECH_BIO = 4, TECH_MATERIAL = 6, TECH_MAGNET = 5) materials = list(MAT_STEEL = 8000, MAT_GLASS = 5000, MAT_SILVER = 2000, MAT_GOLD = 1500) build_path = /obj/item/surgical/scalpel/laser3 - sort_string = "KAAAC" -/datum/design/item/medical/scalpel_manager - name = "Incision Management System" +/datum/design/science/medical/scalpel_manager + design_name = "Incision Management System" desc = "A true extension of the surgeon's body, this marvel instantly and completely prepares an incision allowing for the immediate commencement of therapeutic steps." id = "scalpel_manager" req_tech = list(TECH_BIO = 4, TECH_MATERIAL = 7, TECH_MAGNET = 5, TECH_DATA = 4) materials = list(MAT_STEEL = 8000, MAT_GLASS = 5000, MAT_SILVER = 1500, MAT_GOLD = 1500, MAT_DIAMOND = 750) build_path = /obj/item/surgical/scalpel/manager - sort_string = "KAAAD" -/datum/design/item/medical/saw_manager - name = "Energetic Bone Diverter" +/datum/design/science/medical/saw_manager + design_name = "Energetic Bone Diverter" desc = "A strange development following the I.M.S., this heavy tool can split and open, or close and shut, intentional holes in bones." id = "advanced_saw" req_tech = list(TECH_BIO = 4, TECH_MATERIAL = 7, TECH_MAGNET = 6, TECH_DATA = 5) materials = list (MAT_STEEL = 12500, MAT_PLASTIC = 800, MAT_SILVER = 1500, MAT_GOLD = 1500, MAT_OSMIUM = 1000) build_path = /obj/item/surgical/circular_saw/manager - sort_string = "KAAAE" -/datum/design/item/medical/organ_ripper - name = "Organ Ripper" +/datum/design/science/medical/organ_ripper + design_name = "Organ Ripper" desc = "A modern and horrifying take on an ancient practice, this tool is capable of rapidly removing an organ from a hopefully willing patient, without damaging it." id = "organ_ripper" req_tech = list(TECH_BIO = 3, TECH_MATERIAL = 5, TECH_MAGNET = 4, TECH_ILLEGAL = 3) materials = list (MAT_STEEL = 12500, MAT_PLASTIC = 8000, MAT_OSMIUM = 2500) build_path = /obj/item/surgical/scalpel/ripper - sort_string = "KAAAF" -/datum/design/item/medical/bone_clamp - name = "Bone Clamp" +/datum/design/science/medical/bone_clamp + design_name = "Bone Clamp" desc = "A miracle of modern science, this tool rapidly knits together bone, without the need for bone gel." id = "bone_clamp" req_tech = list(TECH_BIO = 4, TECH_MATERIAL = 5, TECH_MAGNET = 4, TECH_DATA = 4) materials = list (MAT_STEEL = 12500, MAT_GLASS = 7500, MAT_SILVER = 2500) build_path = /obj/item/surgical/bone_clamp - sort_string = "KAABA" -/datum/design/item/medical/switchtool - name = "Surgical Multi-tool" +/datum/design/science/medical/switchtool + design_name = "Surgical Multi-tool" desc = "A set of compact surgical instruments housed in a small handle, allowing surgical proccedures on the go." id = "surgery_switchtool" req_tech = list(TECH_BIO = 4, TECH_MATERIAL = 5, TECH_MAGNET = 4, TECH_DATA = 4) materials = list (MAT_STEEL = 12500, MAT_GLASS = 7500, MAT_SILVER = 2500) build_path = /obj/item/switchtool/surgery - sort_string = "KAABA" -/datum/design/item/medical/medical_analyzer - name = "health analyzer" +/datum/design/science/medical/medical_analyzer + design_name = "health analyzer" desc = "A hand-held body scanner able to distinguish vital signs of the subject." id = "medical_analyzer" req_tech = list(TECH_MAGNET = 2, TECH_BIO = 2) materials = list(MAT_STEEL = 500, MAT_GLASS = 500) build_path = /obj/item/healthanalyzer - sort_string = "KBAAA" -/datum/design/item/medical/improved_analyzer - name = "improved health analyzer" +/datum/design/science/medical/improved_analyzer + design_name = "improved health analyzer" desc = "A prototype version of the regular health analyzer, able to distinguish the location of more serious injuries as well as accurately determine radiation levels." id = "improved_analyzer" req_tech = list(TECH_MAGNET = 5, TECH_BIO = 6) materials = list(MAT_STEEL = 2000, MAT_GLASS = 1000, MAT_SILVER = 1000, MAT_GOLD = 1500) build_path = /obj/item/healthanalyzer/improved - sort_string = "KBAAB" -/datum/design/item/medical/advanced_analyzer - name = "advanced health analyzer" +/datum/design/science/medical/advanced_analyzer + design_name = "advanced health analyzer" desc = "A prototype version of the improved health analyzer, able to distinguish the location of more serious injuries as well as accurately determine radiation levels, and neurological analysis suites" id = "advanced_analyzer" req_tech = list(TECH_MAGNET = 6, TECH_BIO = 7, TECH_PHORON = 4) materials = list(MAT_STEEL = 2000, MAT_GLASS = 1000, MAT_SILVER = 1250, MAT_GOLD = 1750, MAT_URANIUM = 1000, MAT_PLASTIC = 500) build_path = /obj/item/healthanalyzer/advanced - sort_string = "KBAAC" -/datum/design/item/medical/phasic_analyzer - name = "phasic health analyzer" +/datum/design/science/medical/phasic_analyzer + design_name = "phasic health analyzer" desc = "A prototype version of the advanced health analyzer, able to distinguish the location of more serious injuries as well as accurately determine radiation levels, and neurological analysis suites. This analyzer even picks up chemicals in the patient's stomach." id = "phasic_analyzer" req_tech = list(TECH_MAGNET = 7, TECH_BIO = 8, TECH_BLUESPACE = 6, TECH_PHORON = 5) materials = list(MAT_STEEL = 2000, MAT_GLASS = 1000, MAT_SILVER = 1500, MAT_GOLD = 2000, MAT_URANIUM = 1250, MAT_DIAMOND = 750, MAT_PHORON = 500, MAT_PLASTIC = 1000, MAT_OSMIUM = 500) build_path = /obj/item/healthanalyzer/phasic - sort_string = "KBAAD" -/datum/design/item/medical/advanced_roller - name = "advanced roller bed" +/datum/design/science/medical/advanced_roller + design_name = "advanced roller bed" desc = "A more advanced version of the regular roller bed, with inbuilt surgical stabilisers and an improved folding system." id = "roller_bed" req_tech = list(TECH_BIO = 3, TECH_MATERIAL = 3, TECH_MAGNET = 3) materials = list(MAT_STEEL = 4000, MAT_GLASS = 2000, MAT_PHORON = 2000) build_path = /obj/item/roller/adv - sort_string = "KCAAA" - -/* - KV - ML3M stuff - KVA - gun - KVB - magazines - KVC - cells - KVCA - tier 0 - KVCB - tier 1 - KVCC - tier 2 - KVCD - tier 3 - KVCE - tier 4 - KVCO - tierless -*/ //General stuff -// /datum/design/item/medical/sleevemate -// name = "SleeveMate 3700" -// id = "sleevemate" -// req_tech = list(TECH_MATERIAL = 3, TECH_MAGNET = 2, TECH_BIO = 2) -// materials = list(MAT_STEEL = 4000, MAT_GLASS = 4000) -// build_path = /obj/item/sleevemate -// sort_string = "KCAVA" - -/datum/design/item/medical/protohypospray - name = "advanced hypospray" +/datum/design/science/medical/protohypospray + design_name = "advanced hypospray" desc = "This prototype hypospray is a sterile, air-needle autoinjector for rapid administration of drugs to patients." id = "protohypospray" req_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 3, TECH_POWER = 2, TECH_BIO = 4, TECH_ILLEGAL = 2) materials = list(MAT_STEEL = 500, MAT_GLASS = 1500, MAT_SILVER = 2000, MAT_GOLD = 1500, MAT_URANIUM = 1000) build_path = /obj/item/hypospray/advanced - sort_string = "KCAVB" + +/datum/design/science/medical/cell_based + abstract_type = /datum/design/science/medical/cell_based // ML-3M medigun and cells -/datum/design/item/medical/cell_based/AssembleDesignName() - ..() - name = "Cell-based medical prototype ([item_name])" +/datum/design/science/medical/cell_based/generate_name(template) + return "Cell-based medical prototype ([..()])" -/datum/design/item/medical/cell_based/cell_medigun_mag_advanced - name = "advanced medical cell magazine" +/datum/design/science/medical/cell_based/cell_medigun_mag_advanced + design_name = "advanced medical cell magazine" id = "cell_medigun_mag_advanced" req_tech = list(TECH_MATERIAL = 7, TECH_MAGNET = 6, TECH_POWER = 4, TECH_BIO = 7) materials = list(MAT_STEEL = 5000, MAT_PLASTIC = 10000, MAT_GLASS = 5000, MAT_SILVER = 1500, MAT_GOLD = 1500, MAT_DIAMOND = 5000) build_path = /obj/item/ammo_magazine/cell_mag/medical/advanced - sort_string = "KVAAA" -/datum/design/item/ml3m_cell/AssembleDesignName() - ..() - name = "Nanite cell prototype ([name])" +/datum/design/science/medigun_cell + abstract_type = /datum/design/science/medigun_cell + +/datum/design/science/medigun_cell/generate_name(template) + return "Nanite cell prototype ([..()])" //Tier 1 -/datum/design/item/ml3m_cell/toxin - name = "TOXIN" - id = "ml3m_cell_toxin" +/datum/design/science/medigun_cell/toxin + design_name = "TOXIN" + id = "medigun_cell_toxin" req_tech = list(TECH_MATERIAL = 3, TECH_MAGNET = 3, TECH_BIO = 4) materials = list(MAT_STEEL = 4500, MAT_GLASS = 4500, MAT_PLASTIC = 2250) build_path = /obj/item/ammo_casing/microbattery/medical/toxin - sort_string = "KVBAA" -/datum/design/item/ml3m_cell/omni - name = "OMNI" - id = "ml3m_cell_omni" +/datum/design/science/medigun_cell/omni + design_name = "OMNI" + id = "medigun_cell_omni" req_tech = list(TECH_MATERIAL = 3, TECH_MAGNET = 3, TECH_BIO = 4) materials = list(MAT_STEEL = 4500, MAT_GLASS = 4500, MAT_PLASTIC = 2250) build_path = /obj/item/ammo_casing/microbattery/medical/omni - sort_string = "KVBAB" -/datum/design/item/ml3m_cell/antirad - name = "ANTIRAD" - id = "ml3m_cell_antirad" +/datum/design/science/medigun_cell/antirad + design_name = "ANTIRAD" + id = "medigun_cell_antirad" req_tech = list(TECH_MATERIAL = 3, TECH_MAGNET = 3, TECH_BIO = 4) materials = list(MAT_STEEL = 4500, MAT_GLASS = 4500, MAT_PLASTIC = 2250) build_path = /obj/item/ammo_casing/microbattery/medical/antirad - sort_string = "KVBAC" //Tier 2 -/datum/design/item/ml3m_cell/brute2 - name = "BRUTE-II" - id = "ml3m_cell_brute2" +/datum/design/science/medigun_cell/brute2 + design_name = "BRUTE-II" + id = "medigun_cell_brute2" req_tech = list(TECH_MATERIAL = 5, TECH_MAGNET = 3, TECH_POWER = 2, TECH_BIO = 5) materials = list(MAT_STEEL = 4500, MAT_GLASS = 4500, MAT_PLASTIC = 2250, MAT_GOLD = 900) build_path = /obj/item/ammo_casing/microbattery/medical/brute2 - sort_string = "KVCBA" -/datum/design/item/ml3m_cell/burn2 - name = "BURN-II" - id = "ml3m_cell_burn2" +/datum/design/science/medigun_cell/burn2 + design_name = "BURN-II" + id = "medigun_cell_burn2" req_tech = list(TECH_MATERIAL = 5, TECH_MAGNET = 3, TECH_POWER = 2, TECH_BIO = 5) materials = list(MAT_STEEL = 4500, MAT_GLASS = 4500, MAT_PLASTIC = 2250, MAT_GOLD = 900) build_path = /obj/item/ammo_casing/microbattery/medical/burn2 - sort_string = "KVCBB" -/datum/design/item/ml3m_cell/stabilize2 - name = "STABILIZE-II" - id = "ml3m_cell_stabilize2" +/datum/design/science/medigun_cell/stabilize2 + design_name = "STABILIZE-II" + id = "medigun_cell_stabilize2" req_tech = list(TECH_MATERIAL = 5, TECH_MAGNET = 3, TECH_POWER = 2, TECH_BIO = 5) materials = list(MAT_STEEL = 4500, MAT_GLASS = 4500, MAT_PLASTIC = 2250, MAT_SILVER = 900) build_path = /obj/item/ammo_casing/microbattery/medical/stabilize2 - sort_string = "KVCBC" -/datum/design/item/ml3m_cell/omni2 - name = "OMNI-II" - id = "ml3m_cell_omni2" +/datum/design/science/medigun_cell/omni2 + design_name = "OMNI-II" + id = "medigun_cell_omni2" req_tech = list(TECH_MATERIAL = 5, TECH_MAGNET = 3, TECH_POWER = 2, TECH_BIO = 5) materials = list(MAT_STEEL = 4500, MAT_GLASS = 4500, MAT_PLASTIC = 2250, MAT_URANIUM = 900) build_path = /obj/item/ammo_casing/microbattery/medical/omni2 - sort_string = "KVCBD" //Tier 3 -/datum/design/item/ml3m_cell/toxin2 - name = "TOXIN-II" - id = "ml3m_cell_toxin2" +/datum/design/science/medigun_cell/toxin2 + design_name = "TOXIN-II" + id = "medigun_cell_toxin2" req_tech = list(TECH_MATERIAL = 6, TECH_MAGNET = 3, TECH_POWER = 3, TECH_BIO = 6) materials = list(MAT_STEEL = 4500, MAT_GLASS = 4500, MAT_PLASTIC = 2250, MAT_URANIUM = 900, MAT_SILVER = 900, MAT_DIAMOND = 500) build_path = /obj/item/ammo_casing/microbattery/medical/toxin2 - sort_string = "KVCCA" -/datum/design/item/ml3m_cell/haste - name = "HASTE" - id = "ml3m_cell_haste" +/datum/design/science/medigun_cell/haste + design_name = "HASTE" + id = "medigun_cell_haste" req_tech = list(TECH_MATERIAL = 6, TECH_MAGNET = 3, TECH_POWER = 3, TECH_BIO = 6) materials = list(MAT_STEEL = 4500, MAT_GLASS = 4500, MAT_PLASTIC = 2250, MAT_GOLD = 900, MAT_SILVER = 900, MAT_DIAMOND = 900) build_path = /obj/item/ammo_casing/microbattery/medical/haste - sort_string = "KVCCB" -/datum/design/item/ml3m_cell/resist - name = "RESIST" - id = "ml3m_cell_resist" +/datum/design/science/medigun_cell/resist + design_name = "RESIST" + id = "medigun_cell_resist" req_tech = list(TECH_MATERIAL = 6, TECH_MAGNET = 3, TECH_POWER = 3, TECH_BIO = 6) materials = list(MAT_STEEL = 4500, MAT_GLASS = 4500, MAT_PLASTIC = 2250, MAT_GOLD = 900, MAT_URANIUM = 900, MAT_DIAMOND = 900) build_path = /obj/item/ammo_casing/microbattery/medical/resist - sort_string = "KVCCC" -/datum/design/item/ml3m_cell/corpse_mend - name = "CORPSE MEND" - id = "ml3m_cell_corpse_mend" +/datum/design/science/medigun_cell/corpse_mend + design_name = "CORPSE MEND" + id = "medigun_cell_corpse_mend" req_tech = list(TECH_MATERIAL = 6, TECH_MAGNET = 3, TECH_POWER = 3, TECH_BIO = 6) materials = list(MAT_STEEL = 4500, MAT_GLASS = 4500, MAT_PLASTIC = 2250, MAT_PHORON = 3000, MAT_DIAMOND = 3000) build_path = /obj/item/ammo_casing/microbattery/medical/corpse_mend - sort_string = "KVCCD" //Tier 4 -/datum/design/item/ml3m_cell/brute3 - name = "BRUTE-III" - id = "ml3m_cell_brute3" +/datum/design/science/medigun_cell/brute3 + design_name = "BRUTE-III" + id = "medigun_cell_brute3" req_tech = list(TECH_MATERIAL = 7, TECH_MAGNET = 6, TECH_POWER = 5, TECH_BIO = 7, TECH_PRECURSOR = 2) materials = list(MAT_STEEL = 4500, MAT_GLASS = 4500, MAT_PLASTIC = 2250, MAT_DIAMOND = 500, MAT_VERDANTIUM = 900) build_path = /obj/item/ammo_casing/microbattery/medical/brute3 - sort_string = "KVCDA" -/datum/design/item/ml3m_cell/burn3 - name = "BURN-III" - id = "ml3m_cell_burn3" +/datum/design/science/medigun_cell/burn3 + design_name = "BURN-III" + id = "medigun_cell_burn3" req_tech = list(TECH_MATERIAL = 7, TECH_MAGNET = 6, TECH_POWER = 5, TECH_BIO = 7, TECH_PRECURSOR = 2) materials = list(MAT_STEEL = 4500, MAT_GLASS = 4500, MAT_PLASTIC = 2250, MAT_DIAMOND = 500, MAT_VERDANTIUM = 900) build_path = /obj/item/ammo_casing/microbattery/medical/burn3 - sort_string = "KVCDB" -/datum/design/item/ml3m_cell/toxin3 - name = "TOXIN-III" - id = "ml3m_cell_toxin3" +/datum/design/science/medigun_cell/toxin3 + design_name = "TOXIN-III" + id = "medigun_cell_toxin3" req_tech = list(TECH_MATERIAL = 7, TECH_MAGNET = 6, TECH_POWER = 5, TECH_BIO = 7, TECH_ARCANE = 2) materials = list(MAT_STEEL = 4500, MAT_GLASS = 4500, MAT_PLASTIC = 2250, MAT_DIAMOND = 500, MAT_VERDANTIUM = 900) build_path = /obj/item/ammo_casing/microbattery/medical/toxin3 - sort_string = "KVCDC" -/datum/design/item/ml3m_cell/omni3 - name = "OMNI-III" - id = "ml3m_cell_omni3" +/datum/design/science/medigun_cell/omni3 + design_name = "OMNI-III" + id = "medigun_cell_omni3" req_tech = list(TECH_MATERIAL = 7, TECH_MAGNET = 6, TECH_POWER = 5, TECH_BIO = 7, TECH_ARCANE = 2) materials = list(MAT_STEEL = 4500, MAT_GLASS = 4500, MAT_PLASTIC = 2250, MAT_DIAMOND = 500, MAT_VERDANTIUM = 900) build_path = /obj/item/ammo_casing/microbattery/medical/omni3 - sort_string = "KVCDD" //Tierless -/datum/design/item/ml3m_cell/shrink - name = "SHRINK" - id = "ml3m_cell_shrink" +/datum/design/science/medigun_cell/shrink + design_name = "SHRINK" + id = "medigun_cell_shrink" req_tech = list(TECH_MATERIAL = 5, TECH_MAGNET = 3, TECH_BLUESPACE = 3, TECH_BIO = 5, TECH_ILLEGAL = 5) materials = list(MAT_STEEL = 4500, MAT_GLASS = 4500, MAT_PLASTIC = 2250, MAT_URANIUM = 1800) build_path = /obj/item/ammo_casing/microbattery/medical/shrink - sort_string = "KVCOA" -/datum/design/item/ml3m_cell/grow - name = "GROW" - id = "ml3m_cell_grow" +/datum/design/science/medigun_cell/grow + design_name = "GROW" + id = "medigun_cell_grow" req_tech = list(TECH_MATERIAL = 5, TECH_MAGNET = 3, TECH_BLUESPACE = 3, TECH_BIO = 5, TECH_ILLEGAL = 5) materials = list(MAT_STEEL = 4500, MAT_GLASS = 4500, MAT_PLASTIC = 2250, MAT_URANIUM = 1800) build_path = /obj/item/ammo_casing/microbattery/medical/grow - sort_string = "KVCOB" -/datum/design/item/ml3m_cell/normalsize - name = "NORMALSIZE" - id = "ml3m_cell_normalsize" +/datum/design/science/medigun_cell/normalsize + design_name = "NORMALSIZE" + id = "medigun_cell_normalsize" req_tech = list(TECH_MATERIAL = 5, TECH_MAGNET = 3, TECH_BLUESPACE = 3, TECH_BIO = 5, TECH_ILLEGAL = 5) materials = list(MAT_STEEL = 4500, MAT_GLASS = 4500, MAT_PLASTIC = 2250, MAT_URANIUM = 1800) build_path = /obj/item/ammo_casing/microbattery/medical/normalsize - sort_string = "KVCOC" diff --git a/code/modules/research/designs/mining_toys.dm b/code/modules/research/designs/mining_toys.dm index 8df3567e230c..9e87ff5b1420 100644 --- a/code/modules/research/designs/mining_toys.dm +++ b/code/modules/research/designs/mining_toys.dm @@ -1,69 +1,62 @@ -/datum/design/item/mining/AssembleDesignName() - ..() - name = "Mining equipment design ([item_name])" +/datum/design/science/mining + abstract_type = /datum/design/science/mining + +/datum/design/science/mining/generate_name(template) + return "Mining eqiupment design ([..()])" // Mining digging devices -/datum/design/item/mining/drill +/datum/design/science/mining/drill id = "drill" req_tech = list(TECH_MATERIAL = 2, TECH_POWER = 3, TECH_ENGINEERING = 2) materials = list(MAT_STEEL = 6000, MAT_GLASS = 1000) //expensive, but no need for miners. build_path = /obj/item/pickaxe/drill - sort_string = "FAAAA" -/datum/design/item/mining/jackhammer +/datum/design/science/mining/jackhammer id = "jackhammer" req_tech = list(TECH_MATERIAL = 3, TECH_POWER = 2, TECH_ENGINEERING = 2) materials = list(MAT_STEEL = 2000, MAT_GLASS = 500, MAT_SILVER = 500) build_path = /obj/item/pickaxe/jackhammer - sort_string = "FAAAB" -/datum/design/item/mining/plasmacutter +/datum/design/science/mining/plasmacutter id = "plasmacutter" req_tech = list(TECH_MATERIAL = 4, TECH_PHORON = 3, TECH_ENGINEERING = 3) materials = list(MAT_STEEL = 1500, MAT_GLASS = 500, MAT_GOLD = 500, MAT_PHORON = 500) build_path = /obj/item/pickaxe/plasmacutter - sort_string = "FAAAC" -/datum/design/item/mining/pick_diamond +/datum/design/science/mining/pick_diamond id = "pick_diamond" req_tech = list(TECH_MATERIAL = 6) materials = list(MAT_DIAMOND = 3000) build_path = /obj/item/pickaxe/diamond - sort_string = "FAAAD" -/datum/design/item/mining/drill_diamond +/datum/design/science/mining/drill_diamond id = "drill_diamond" req_tech = list(TECH_MATERIAL = 6, TECH_POWER = 4, TECH_ENGINEERING = 4) materials = list(MAT_STEEL = 3000, MAT_GLASS = 1000, MAT_DIAMOND = 2000) build_path = /obj/item/pickaxe/diamonddrill - sort_string = "FAAAE" -/datum/design/item/mining/advbore +/datum/design/science/mining/advbore id = "adv_bore" req_tech = list(TECH_MATERIAL = 5, TECH_PHORON = 5, TECH_ENGINEERING = 4, TECH_POWER = 4) //phoron 5 needs materials to get materials = list(MAT_STEEL = 5000, MAT_GLASS = 2500, MAT_GOLD = 2500, MAT_PHORON = 2500) build_path = /obj/item/gun/magnetic/matfed/advanced - sort_string = "FAABA" -/datum/design/item/mining/vertibore +/datum/design/science/mining/vertibore id = "vertibore" req_tech = list(TECH_MATERIAL = 5, TECH_PHORON = 5, TECH_ENGINEERING = 6, TECH_POWER = 7) materials = list(MAT_STEEL = 10000, MAT_GLASS = 5000, MAT_GOLD = 5000, MAT_PHORON = 5000, MAT_DIAMOND = 100, MAT_URANIUM = 1000) build_path = /obj/item/vertibore - sort_string = "FAABB" // Mining other equipment -/datum/design/item/mining/mining_scanner +/datum/design/science/mining/mining_scanner id = "mining_scanner" req_tech = list(TECH_MAGNET = 1, TECH_ENGINEERING = 1) materials = list(MAT_STEEL = 150) build_path = /obj/item/mining_scanner - sort_string = "FAACA" -/datum/design/item/mining/mining_scanner_adv +/datum/design/science/mining/mining_scanner_adv id = "mining_scanner_adv" req_tech = list(TECH_MAGNET = 4, TECH_ENGINEERING = 4) materials = list(MAT_STEEL = 2000, MAT_GLASS = 1000) build_path = /obj/item/mining_scanner/advanced - sort_string = "FAACB" diff --git a/code/modules/research/designs/misc.dm b/code/modules/research/designs/misc.dm index 05fbcbce2907..3cd30e6edf9d 100644 --- a/code/modules/research/designs/misc.dm +++ b/code/modules/research/designs/misc.dm @@ -1,155 +1,136 @@ -// Everything that didn't fit elsewhere +/datum/design/science/general + abstract_type = /datum/design/science/general -/datum/design/item/general/AssembleDesignName() - ..() - name = "General purpose design ([item_name])" +/datum/design/science/general/generate_name(template) + return "General purpose design ([..()])" -/datum/design/item/general/communicator - name = "Communicator" +/datum/design/science/general/communicator + design_name = "Communicator" id = "communicator" req_tech = list(TECH_DATA = 2, TECH_MAGNET = 2) materials = list(MAT_STEEL = 500, MAT_GLASS = 500) build_path = /obj/item/communicator - sort_string = "TAAAA" -/datum/design/item/general/laserpointer - name = "laser pointer" +/datum/design/science/general/laserpointer + design_name = "laser pointer" desc = "Don't shine it in your eyes!" id = "laser_pointer" req_tech = list(TECH_MAGNET = 3) materials = list(MAT_STEEL = 100, MAT_GLASS = 50) build_path = /obj/item/laser_pointer - sort_string = "TAABA" -/datum/design/item/general/translator - name = "handheld translator" +/datum/design/science/general/translator + design_name = "handheld translator" id = "translator" req_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 3) materials = list(MAT_STEEL = 3000, MAT_GLASS = 3000) build_path = /obj/item/universal_translator - sort_string = "TAACA" -/datum/design/item/general/ear_translator - name = "earpiece translator" +/datum/design/science/general/ear_translator + design_name = "earpiece translator" id = "ear_translator" req_tech = list(TECH_DATA = 5, TECH_ENGINEERING = 5) //It's been hella miniaturized. materials = list(MAT_STEEL = 2000, MAT_GLASS = 2000, MAT_GOLD = 1000) build_path = /obj/item/universal_translator/ear - sort_string = "TAACB" -/datum/design/item/general/light_replacer - name = "Light replacer" +/datum/design/science/general/light_replacer + design_name = "Light replacer" desc = "A device to automatically replace lights. Refill with working lightbulbs." id = "light_replacer" req_tech = list(TECH_MAGNET = 3, TECH_MATERIAL = 4) materials = list(MAT_STEEL = 1500, MAT_SILVER = 150, MAT_GLASS = 3000) build_path = /obj/item/lightreplacer - sort_string = "TAADA" -/datum/design/item/illegal/AssembleDesignName() - ..() - name = "Nonstandard design ([item_name])" +/datum/design/science/illegal + abstract_type = /datum/design/science/illegal -/datum/design/item/illegal/binaryencrypt - name = "Binary encryption key" +/datum/design/science/illegal/generate_name(template) + return "Non-standard design ([..()])" + +/datum/design/science/illegal/binaryencrypt + design_name = "Binary encryption key" desc = "Allows for deciphering the binary channel on-the-fly." id = "binaryencrypt" req_tech = list(TECH_ILLEGAL = 2) materials = list(MAT_STEEL = 300, MAT_GLASS = 300) build_path = /obj/item/encryptionkey/binary - sort_string = "TBAAA" -/datum/design/item/illegal/chameleon - name = "Holographic equipment kit" +/datum/design/science/illegal/chameleon + design_name = "Holographic equipment kit" desc = "A kit of dangerous, high-tech equipment with changeable looks." id = "chameleon" req_tech = list(TECH_ILLEGAL = 2) materials = list(MAT_STEEL = 500) build_path = /obj/item/storage/box/syndie_kit/chameleon - sort_string = "TBAAB" -/datum/design/item/general/bluespace_jumpsuit - name = "Bluespace jumpsuit" +/datum/design/science/general/bluespace_jumpsuit + design_name = "Bluespace jumpsuit" id = "bsjumpsuit" req_tech = list(TECH_BLUESPACE = 2, TECH_MATERIAL = 3, TECH_POWER = 2) materials = list(MAT_STEEL = 4000, MAT_GLASS = 4000) build_path = /obj/item/clothing/under/bluespace - sort_string = "TAVAA" -/datum/design/item/general/sizegun - name = "Size gun" +/datum/design/science/general/sizegun + design_name = "Size gun" id = "sizegun" req_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3, TECH_POWER = 2) materials = list(MAT_STEEL = 3000, MAT_GLASS = 2000, MAT_URANIUM = 2000) build_path = /obj/item/gun/energy/sizegun - sort_string = "TAVAB" -/* -/datum/design/item/general/bodysnatcher - name = "Body Snatcher" - id = "bodysnatcher" - req_tech = list(TECH_MAGNET = 3, TECH_BIO = 3, TECH_ILLEGAL = 2) - materials = list(MAT_STEEL = 4000, MAT_GLASS = 4000) - build_path = /obj/item/bodysnatcher - sort_string = "TBVAA" -*/ -/datum/design/item/general/inducer_sci - name = "Inducer (Scientific)" + +/datum/design/science/general/inducer_sci + design_name = "Inducer (Scientific)" id = "inducersci" req_tech = list(TECH_BLUESPACE = 4, TECH_MATERIAL = 5, TECH_POWER = 6) materials = list(MAT_STEEL = 8000, MAT_GLASS = 2000, MAT_URANIUM = 4000, MAT_PHORON = 4000) build_path = /obj/item/inducer/sci - sort_string = "TAVAB" -/datum/design/item/general/inducer_eng - name = "Inducer (Industrial)" +/datum/design/science/general/inducer_eng + design_name = "Inducer (Industrial)" id = "inducerind" req_tech = list(TECH_BLUESPACE = 5, TECH_MATERIAL = 7, TECH_POWER = 7) materials = list(MAT_STEEL = 9000, MAT_GLASS = 3000, MAT_URANIUM = 5000, MAT_PHORON = 6000, MAT_DIAMOND = 1000) // Cit change until we have more of a need for titanium, MAT_TITANIUM = 2000) build_path = /obj/item/inducer/unloaded - sort_string = "TAVAC" -/datum/design/item/general/translator_all - name = "handheld omni-translator" +/datum/design/science/general/translator_all + design_name = "handheld omni-translator" id = "translator_all" req_tech = list(TECH_DATA = 5, TECH_ENGINEERING = 5) materials = list(MAT_STEEL = 3000, MAT_GLASS = 3000, MAT_GOLD = 500, MAT_SILVER = 500) build_path = /obj/item/universal_translator/adaptive - sort_string = "TAACC" -/datum/design/item/general/ear_translator_all - name = "earpiece omni-translator" +/datum/design/science/general/ear_translator_all + design_name = "earpiece omni-translator" id = "ear_translator_all" req_tech = list(TECH_DATA = 6, TECH_ENGINEERING = 6) //dude what hte fuck lmao materials = list(MAT_STEEL = 2000, MAT_GLASS = 2000, MAT_GOLD = 2000, MAT_SILVER = 2000) build_path = /obj/item/universal_translator/ear/adaptive - sort_string = "TAACD" -/datum/design/item/advmop - name = "Advanced Mop" +/datum/design/science/advmop + design_name = "Advanced Mop" desc = "An upgraded mop with a large internal capacity for holding water or other cleaning chemicals." id = "advmop" req_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 4, TECH_POWER = 3) materials = list(MAT_PLASTIC = 2500, MAT_STEEL = 500, MAT_COPPER = 200) build_path = /obj/item/mop/advanced -/datum/design/item/holosign - name = "Holographic Sign Projector" +/datum/design/science/holosign + design_name = "Holographic Sign Projector" desc = "A holograpic projector used to project various warning signs." id = "holosign" req_tech = list(TECH_ENGINEERING = 5, TECH_BLUESPACE = 4, TECH_POWER = 4) materials = list(MAT_STEEL = 2000, MAT_GLASS = 1000) build_path = /obj/item/holosign_creator -/datum/design/item/blutrash - name = "Trashbag of Holding" +/datum/design/science/blutrash + design_name = "Trashbag of Holding" desc = "An advanced trash bag with bluespace properties; capable of holding a plethora of garbage." id = "blutrash" req_tech = list(TECH_BLUESPACE = 5, TECH_MATERIAL = 6) materials = list(MAT_PLASTIC = 5000, MAT_GOLD = 1500, MAT_URANIUM = 250, MAT_PHORON = 1500) build_path = /obj/item/storage/bag/trash/bluespace -/datum/design/item/reagent_synth_chemistry - name = "Chemistry Synthesis Module" +/datum/design/science/reagent_synth_chemistry + design_name = "Chemistry Synthesis Module" desc = "A reagent synthesis module required for dispenser functionality" id = "ReagentSynth" req_tech = list(TECH_BLUESPACE = 5, TECH_MATERIAL = 6, TECH_BIO = 5) diff --git a/code/modules/research/designs/modular_computer.dm b/code/modules/research/designs/modular_computer.dm index 4fb8b2ce3cce..2b29f84d42b3 100644 --- a/code/modules/research/designs/modular_computer.dm +++ b/code/modules/research/designs/modular_computer.dm @@ -1,219 +1,197 @@ -// Modular computer components -/datum/design/item/modularcomponent/AssembleDesignName() - ..() - name = "Computer part design ([item_name])" +/datum/design/science/modularcomponent + abstract_type = /datum/design/science/modularcomponent -// Hard drives +/datum/design/science/modularcomponent/generate_name(template) + return "Computer part design ([..()])" -/datum/design/item/modularcomponent/disk/normal - name = "basic hard drive" +/datum/design/science/modularcomponent/disk + abstract_type = /datum/design/science/modularcomponent/disk + +/datum/design/science/modularcomponent/disk/normal + design_name = "basic hard drive" id = "hdd_basic" req_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1) materials = list(MAT_STEEL = 2000, MAT_GLASS = 100) build_path = /obj/item/computer_hardware/hard_drive/ - sort_string = "VAAAA" -/datum/design/item/modularcomponent/disk/advanced - name = "advanced hard drive" +/datum/design/science/modularcomponent/disk/advanced + design_name = "advanced hard drive" id = "hdd_advanced" materials = list(MAT_STEEL = 4000, MAT_GLASS = 200) build_path = /obj/item/computer_hardware/hard_drive/advanced - sort_string = "VAAAB" -/datum/design/item/modularcomponent/disk/super - name = "super hard drive" +/datum/design/science/modularcomponent/disk/super + design_name = "super hard drive" id = "hdd_super" req_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 3) materials = list(MAT_STEEL = 8000, MAT_GLASS = 400) build_path = /obj/item/computer_hardware/hard_drive/super - sort_string = "VAAAC" -/datum/design/item/modularcomponent/disk/cluster - name = "cluster hard drive" +/datum/design/science/modularcomponent/disk/cluster + design_name = "cluster hard drive" id = "hdd_cluster" req_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 4) materials = list(MAT_STEEL = 16000, MAT_GLASS = 800) build_path = /obj/item/computer_hardware/hard_drive/cluster - sort_string = "VAAAD" -/datum/design/item/modularcomponent/disk/small - name = "small hard drive" +/datum/design/science/modularcomponent/disk/small + design_name = "small hard drive" id = "hdd_small" req_tech = list(TECH_DATA = 2, TECH_ENGINEERING = 2) materials = list(MAT_STEEL = 4000, MAT_GLASS = 200) build_path = /obj/item/computer_hardware/hard_drive/small - sort_string = "VAAAE" -/datum/design/item/modularcomponent/disk/micro - name = "micro hard drive" +/datum/design/science/modularcomponent/disk/micro + design_name = "micro hard drive" id = "hdd_micro" req_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1) materials = list(MAT_STEEL = 2000, MAT_GLASS = 100) build_path = /obj/item/computer_hardware/hard_drive/micro - sort_string = "VAAAF" -// Network cards +/datum/design/science/modularcomponent/netcard + abstract_type = /datum/design/science/modularcomponent/netcard -/datum/design/item/modularcomponent/netcard/basic - name = "basic network card" +/datum/design/science/modularcomponent/netcard/basic + design_name = "basic network card" id = "netcard_basic" req_tech = list(TECH_DATA = 2, TECH_ENGINEERING = 1) materials = list(MAT_STEEL = 500, MAT_GLASS = 100) build_path = /obj/item/computer_hardware/network_card - sort_string = "VBAAA" -/datum/design/item/modularcomponent/netcard/advanced - name = "advanced network card" +/datum/design/science/modularcomponent/netcard/advanced + design_name = "advanced network card" id = "netcard_advanced" req_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 2) materials = list(MAT_STEEL = 1000, MAT_GLASS = 200) build_path = /obj/item/computer_hardware/network_card/advanced - sort_string = "VBAAB" -/datum/design/item/modularcomponent/netcard/wired - name = "wired network card" +/datum/design/science/modularcomponent/netcard/wired + design_name = "wired network card" id = "netcard_wired" req_tech = list(TECH_DATA = 5, TECH_ENGINEERING = 3) materials = list(MAT_STEEL = 5000, MAT_GLASS = 400) build_path = /obj/item/computer_hardware/network_card/wired - sort_string = "VBAAC" -// Batteries +/datum/design/science/modularcomponent/battery + abstract_type = /datum/design/science/modularcomponent/battery -/datum/design/item/modularcomponent/battery/normal - name = "standard battery module" +/datum/design/science/modularcomponent/battery/normal + design_name = "standard battery module" id = "bat_normal" req_tech = list(TECH_POWER = 1, TECH_ENGINEERING = 1) materials = list(MAT_STEEL = 2000) build_path = /obj/item/computer_hardware/battery_module - sort_string = "VCAAA" -/datum/design/item/modularcomponent/battery/advanced - name = "advanced battery module" +/datum/design/science/modularcomponent/battery/advanced + design_name = "advanced battery module" id = "bat_advanced" req_tech = list(TECH_POWER = 2, TECH_ENGINEERING = 2) materials = list(MAT_STEEL = 4000) build_path = /obj/item/computer_hardware/battery_module/advanced - sort_string = "VCAAB" -/datum/design/item/modularcomponent/battery/super - name = "super battery module" +/datum/design/science/modularcomponent/battery/super + design_name = "super battery module" id = "bat_super" req_tech = list(TECH_POWER = 3, TECH_ENGINEERING = 3) materials = list(MAT_STEEL = 8000) build_path = /obj/item/computer_hardware/battery_module/super - sort_string = "VCAAC" -/datum/design/item/modularcomponent/battery/ultra - name = "ultra battery module" +/datum/design/science/modularcomponent/battery/ultra + design_name = "ultra battery module" id = "bat_ultra" req_tech = list(TECH_POWER = 5, TECH_ENGINEERING = 4) materials = list(MAT_STEEL = 16000) build_path = /obj/item/computer_hardware/battery_module/ultra - sort_string = "VCAAD" -/datum/design/item/modularcomponent/battery/nano - name = "nano battery module" +/datum/design/science/modularcomponent/battery/nano + design_name = "nano battery module" id = "bat_nano" req_tech = list(TECH_POWER = 1, TECH_ENGINEERING = 1) materials = list(MAT_STEEL = 2000) build_path = /obj/item/computer_hardware/battery_module/nano - sort_string = "VCAAE" -/datum/design/item/modularcomponent/battery/micro - name = "micro battery module" +/datum/design/science/modularcomponent/battery/micro + design_name = "micro battery module" id = "bat_micro" req_tech = list(TECH_POWER = 2, TECH_ENGINEERING = 2) materials = list(MAT_STEEL = 4000) build_path = /obj/item/computer_hardware/battery_module/micro - sort_string = "VCAAF" -// Processor unit +/datum/design/science/modularcomponent/cpu + abstract_type = /datum/design/science/modularcomponent/cpu -/datum/design/item/modularcomponent/cpu/ - name = "computer processor unit" +/datum/design/science/modularcomponent/cpu/normal + design_name = "computer processor unit" id = "cpu_normal" req_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 2) materials = list(MAT_STEEL = 8000) build_path = /obj/item/computer_hardware/processor_unit - sort_string = "VDAAA" -/datum/design/item/modularcomponent/cpu/small - name = "computer microprocessor unit" +/datum/design/science/modularcomponent/cpu/small + design_name = "computer microprocessor unit" id = "cpu_small" req_tech = list(TECH_DATA = 2, TECH_ENGINEERING = 2) materials = list(MAT_STEEL = 4000) build_path = /obj/item/computer_hardware/processor_unit/small - sort_string = "VDAAB" -/datum/design/item/modularcomponent/cpu/photonic - name = "computer photonic processor unit" +/datum/design/science/modularcomponent/cpu/photonic + design_name = "computer photonic processor unit" id = "pcpu_normal" req_tech = list(TECH_DATA = 5, TECH_ENGINEERING = 4) materials = list(MAT_STEEL = 32000, glass = 8000) build_path = /obj/item/computer_hardware/processor_unit/photonic - sort_string = "VDAAC" -/datum/design/item/modularcomponent/cpu/photonic/small - name = "computer photonic microprocessor unit" +/datum/design/science/modularcomponent/cpu/photonic/small + design_name = "computer photonic microprocessor unit" id = "pcpu_small" req_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 3) materials = list(MAT_STEEL = 16000, glass = 4000) build_path = /obj/item/computer_hardware/processor_unit/photonic/small - sort_string = "VDAAD" - -// Other parts -/datum/design/item/modularcomponent/cardslot - name = "RFID card slot" +/datum/design/science/modularcomponent/cardslot + design_name = "RFID card slot" id = "cardslot" req_tech = list(TECH_DATA = 2) materials = list(MAT_STEEL = 3000) build_path = /obj/item/computer_hardware/card_slot - sort_string = "VEAAA" -/datum/design/item/modularcomponent/nanoprinter - name = "nano printer" +/datum/design/science/modularcomponent/nanoprinter + design_name = "nano printer" id = "nanoprinter" req_tech = list(TECH_DATA = 2, TECH_ENGINEERING = 2) materials = list(MAT_STEEL = 3000) build_path = /obj/item/computer_hardware/nano_printer - sort_string = "VEAAB" -/datum/design/item/modularcomponent/teslalink - name = "tesla link" +/datum/design/science/modularcomponent/teslalink + design_name = "tesla link" id = "teslalink" req_tech = list(TECH_DATA = 2, TECH_POWER = 3, TECH_ENGINEERING = 2) materials = list(MAT_STEEL = 10000) build_path = /obj/item/computer_hardware/tesla_link - sort_string = "VEAAC" -// Data crystals (USB flash drives) +/datum/design/science/modularcomponent/portabledrive + abstract_type = /datum/design/science/modularcomponent/portabledrive -/datum/design/item/modularcomponent/portabledrive/AssembleDesignName() - ..() - name = "Portable data drive design ([item_name])" +/datum/design/science/modularcomponent/portabledrive/generate_name(template) + return "Portable data drive design ([..()])" -/datum/design/item/modularcomponent/portabledrive/basic - name = "basic data crystal" +/datum/design/science/modularcomponent/portabledrive/basic + design_name = "basic data crystal" id = "portadrive_basic" req_tech = list(TECH_DATA = 1) materials = list(MAT_GLASS = 8000) build_path = /obj/item/computer_hardware/hard_drive/portable - sort_string = "VFAAA" -/datum/design/item/modularcomponent/portabledrive/advanced - name = "advanced data crystal" +/datum/design/science/modularcomponent/portabledrive/advanced + design_name = "advanced data crystal" id = "portadrive_advanced" req_tech = list(TECH_DATA = 2) materials = list(MAT_GLASS = 16000) build_path = /obj/item/computer_hardware/hard_drive/portable/advanced - sort_string = "VFAAB" -/datum/design/item/modularcomponent/portabledrive/super - name = "super data crystal" +/datum/design/science/modularcomponent/portabledrive/super + design_name = "super data crystal" id = "portadrive_super" req_tech = list(TECH_DATA = 4) materials = list(MAT_GLASS = 32000) build_path = /obj/item/computer_hardware/hard_drive/portable/super - sort_string = "VFAAC" diff --git a/code/modules/research/designs/pdas.dm b/code/modules/research/designs/pdas.dm index 97d44ef11906..eac6237fe1ec 100644 --- a/code/modules/research/designs/pdas.dm +++ b/code/modules/research/designs/pdas.dm @@ -1,100 +1,83 @@ // PDA -/datum/design/item/general/pda - name = "PDA" +/datum/design/science/general/pda + design_name = "PDA" desc = "Cheaper than whiny non-digital assistants." id = "pda" req_tech = list(TECH_ENGINEERING = 2, TECH_POWER = 3) materials = list(MAT_STEEL = 50, MAT_GLASS = 50) build_path = /obj/item/pda - sort_string = "WAAAA" // Cartridges -/datum/design/item/pda_cartridge +/datum/design/science/pda_cartridge + abstract_type = /datum/design/science/pda_cartridge req_tech = list(TECH_ENGINEERING = 2, TECH_POWER = 3) materials = list(MAT_STEEL = 50, MAT_GLASS = 50) -/datum/design/item/pda_cartridge/AssembleDesignName() - ..() - name = "PDA accessory ([item_name])" +/datum/design/science/pda_cartridge/generate_name(template) + return "PDA cartridge ([..()])" -/datum/design/item/pda_cartridge/cart_basic +/datum/design/science/pda_cartridge/cart_basic id = "cart_basic" build_path = /obj/item/cartridge - sort_string = "WBAAA" -/datum/design/item/pda_cartridge/engineering +/datum/design/science/pda_cartridge/engineering id = "cart_engineering" build_path = /obj/item/cartridge/engineering - sort_string = "WBAAB" -/datum/design/item/pda_cartridge/atmos +/datum/design/science/pda_cartridge/atmos id = "cart_atmos" build_path = /obj/item/cartridge/atmos - sort_string = "WBAAC" -/datum/design/item/pda_cartridge/medical +/datum/design/science/pda_cartridge/medical id = "cart_medical" build_path = /obj/item/cartridge/medical - sort_string = "WBAAD" -/datum/design/item/pda_cartridge/chemistry +/datum/design/science/pda_cartridge/chemistry id = "cart_chemistry" build_path = /obj/item/cartridge/chemistry - sort_string = "WBAAE" -/datum/design/item/pda_cartridge/security +/datum/design/science/pda_cartridge/security id = "cart_security" build_path = /obj/item/cartridge/security - sort_string = "WBAAF" -/datum/design/item/pda_cartridge/janitor +/datum/design/science/pda_cartridge/janitor id = "cart_janitor" build_path = /obj/item/cartridge/janitor - sort_string = "WBAAG" -/datum/design/item/pda_cartridge/science +/datum/design/science/pda_cartridge/science id = "cart_science" build_path = /obj/item/cartridge/signal/science - sort_string = "WBAAH" -/datum/design/item/pda_cartridge/quartermaster +/datum/design/science/pda_cartridge/quartermaster id = "cart_quartermaster" build_path = /obj/item/cartridge/quartermaster - sort_string = "WBAAI" -/datum/design/item/pda_cartridge/head +/datum/design/science/pda_cartridge/head id = "cart_head" build_path = /obj/item/cartridge/head - sort_string = "WBAAJ" -/datum/design/item/pda_cartridge/hop +/datum/design/science/pda_cartridge/hop id = "cart_hop" build_path = /obj/item/cartridge/hop - sort_string = "WBAAK" -/datum/design/item/pda_cartridge/hos +/datum/design/science/pda_cartridge/hos id = "cart_hos" build_path = /obj/item/cartridge/hos - sort_string = "WBAAL" -/datum/design/item/pda_cartridge/ce +/datum/design/science/pda_cartridge/ce id = "cart_ce" build_path = /obj/item/cartridge/ce - sort_string = "WBAAM" -/datum/design/item/pda_cartridge/cmo +/datum/design/science/pda_cartridge/cmo id = "cart_cmo" build_path = /obj/item/cartridge/cmo - sort_string = "WBAAN" -/datum/design/item/pda_cartridge/rd +/datum/design/science/pda_cartridge/rd id = "cart_rd" build_path = /obj/item/cartridge/rd - sort_string = "WBAAO" -/datum/design/item/pda_cartridge/captain +/datum/design/science/pda_cartridge/captain id = "cart_captain" build_path = /obj/item/cartridge/captain - sort_string = "WBAAP" diff --git a/code/modules/research/designs/power_cells.dm b/code/modules/research/designs/power_cells.dm index 9a34f568d805..95086a8dd42e 100644 --- a/code/modules/research/designs/power_cells.dm +++ b/code/modules/research/designs/power_cells.dm @@ -1,72 +1,68 @@ -/datum/design/item/powercell - build_type = PROTOLATHE | MECHFAB +/datum/design/science/powercell + abstract_type = /datum/design/science/powercell + lathe_type = LATHE_TYPE_PROTOLATHE | LATHE_TYPE_MECHA -/datum/design/item/powercell/AssembleDesignName() - name = "Power Cell Model ([item_name])" +/datum/design/science/powercell/generate_name(template) + return "Power Cell Model ([template])" -/datum/design/item/powercell/AssembleDesignDesc() +/datum/design/science/powercell/generate_desc(template_name, template_desc) if(build_path) var/obj/item/cell/C = build_path - desc = "Allows the construction of power cells that can hold [initial(C.maxcharge)] units of energy." + return "Allows the construction of power cells that can hold [initial(C.maxcharge)] units of energy." + return "ERROR" -/datum/design/item/powercell/Fabricate() +/datum/design/science/powercell/print(atom/where) var/obj/item/cell/C = ..() C.charge = 0 //shouldn't produce power out of thin air. C.update_icon() return C -/datum/design/item/powercell/basic - name = "basic" - build_type = PROTOLATHE | MECHFAB +/datum/design/science/powercell/basic + design_name = "basic" + lathe_type = LATHE_TYPE_PROTOLATHE | LATHE_TYPE_MECHA id = "basic_cell" req_tech = list(TECH_POWER = 1) materials = list(MAT_STEEL = 700, MAT_GLASS = 50) build_path = /obj/item/cell category = list("Misc") - sort_string = "BAAAA" -/datum/design/item/powercell/high - name = "high-capacity" - build_type = PROTOLATHE | MECHFAB +/datum/design/science/powercell/high + design_name = "high-capacity" + lathe_type = LATHE_TYPE_PROTOLATHE | LATHE_TYPE_MECHA id = "high_cell" req_tech = list(TECH_POWER = 2) materials = list(MAT_STEEL = 700, MAT_GLASS = 60) build_path = /obj/item/cell/high category = list("Misc") - sort_string = "BAAAB" -/datum/design/item/powercell/super - name = "super-capacity" +/datum/design/science/powercell/super + design_name = "super-capacity" id = "super_cell" req_tech = list(TECH_POWER = 3, TECH_MATERIAL = 2) materials = list(MAT_STEEL = 700, MAT_GLASS = 70) build_path = /obj/item/cell/super category = list("Misc") - sort_string = "BAAAC" -/datum/design/item/powercell/hyper - name = "hyper-capacity" +/datum/design/science/powercell/hyper + design_name = "hyper-capacity" id = "hyper_cell" req_tech = list(TECH_POWER = 5, TECH_MATERIAL = 4) materials = list(MAT_STEEL = 400, MAT_GOLD = 150, MAT_SILVER = 150, MAT_GLASS = 70) build_path = /obj/item/cell/hyper category = list("Misc") - sort_string = "BAAAD" -/datum/design/item/powercell/device - name = "device" - build_type = PROTOLATHE +/datum/design/science/powercell/device + design_name = "device" + lathe_type = LATHE_TYPE_PROTOLATHE id = "device" materials = list(MAT_STEEL = 350, MAT_GLASS = 25) build_path = /obj/item/cell/device category = list("Misc") - sort_string = "BAABA" -/datum/design/item/powercell/weapon - name = "weapon" - build_type = PROTOLATHE +/datum/design/science/powercell/weapon + design_name = "weapon" + lathe_type = LATHE_TYPE_PROTOLATHE id = "weapon" materials = list(MAT_STEEL = 700, MAT_GLASS = 50) build_path = /obj/item/cell/device/weapon category = list("Misc") - sort_string = "BAABB" diff --git a/code/modules/research/designs/powercells.dm b/code/modules/research/designs/powercells.dm deleted file mode 100644 index 4f8a10bd76ab..000000000000 --- a/code/modules/research/designs/powercells.dm +++ /dev/null @@ -1,71 +0,0 @@ -/datum/design/item/powercell - build_type = PROTOLATHE | MECHFAB - -/datum/design/item/powercell/AssembleDesignName() - name = "Power Cell Model ([item_name])" - -/datum/design/item/powercell/AssembleDesignDesc() - if(build_path) - var/obj/item/cell/C = build_path - desc = "Allows the construction of power cells that can hold [initial(C.maxcharge)] units of energy." - -/datum/design/item/powercell/Fabricate() - var/obj/item/cell/C = ..() - C.charge = 0 //shouldn't produce power out of thin air. - return C - -/datum/design/item/powercell/basic - name = "basic" - build_type = PROTOLATHE | MECHFAB - id = "basic_cell" - req_tech = list(TECH_POWER = 1) - materials = list(MAT_STEEL = 700, MAT_GLASS = 50) - build_path = /obj/item/cell - category = "Misc" - sort_string = "DAAAA" - -/datum/design/item/powercell/high - name = "high-capacity" - build_type = PROTOLATHE | MECHFAB - id = "high_cell" - req_tech = list(TECH_POWER = 2) - materials = list(MAT_STEEL = 700, MAT_GLASS = 60) - build_path = /obj/item/cell/high - category = "Misc" - sort_string = "DAAAB" - -/datum/design/item/powercell/super - name = "super-capacity" - id = "super_cell" - req_tech = list(TECH_POWER = 3, TECH_MATERIAL = 2) - materials = list(MAT_STEEL = 700, MAT_GLASS = 70) - build_path = /obj/item/cell/super - category = "Misc" - sort_string = "DAAAC" - -/datum/design/item/powercell/hyper - name = "hyper-capacity" - id = "hyper_cell" - req_tech = list(TECH_POWER = 5, TECH_MATERIAL = 4) - materials = list(MAT_STEEL = 400, MAT_GOLD = 150, MAT_SILVER = 150, MAT_GLASS = 70) - build_path = /obj/item/cell/hyper - category = "Misc" - sort_string = "DAAAD" - -/datum/design/item/powercell/device - name = "device" - build_type = PROTOLATHE - id = "device" - materials = list(MAT_STEEL = 350, MAT_GLASS = 25) - build_path = /obj/item/cell/device - category = "Misc" - sort_string = "DAABA" - -/datum/design/item/powercell/weapon - name = "weapon" - build_type = PROTOLATHE - id = "weapon" - materials = list(MAT_STEEL = 700, MAT_GLASS = 50) - build_path = /obj/item/cell/device/weapon - category = "Misc" - sort_string = "DAABB" diff --git a/code/modules/research/designs/precursor.dm b/code/modules/research/designs/precursor.dm index 71063dde64a3..f939ef397ff9 100644 --- a/code/modules/research/designs/precursor.dm +++ b/code/modules/research/designs/precursor.dm @@ -1,89 +1,68 @@ -//Anomaly +/datum/design/science/anomaly + abstract_type = /datum/design/science/anomaly -/datum/design/item/anomaly/AssembleDesignName() - ..() - name = "Anomalous prototype ([item_name])" +/datum/design/science/anomaly/generate_name(template) + return "Anomalous prototype ([..()])" -/datum/design/item/anomaly/AssembleDesignDesc() - if(!desc) - if(build_path) - var/obj/item/I = build_path - desc = initial(I.desc) - ..() - -/datum/design/item/anomaly/camotrap - name = "Chameleon Trap" +/datum/design/science/anomaly/camotrap + design_name = "Chameleon Trap" desc = "A self-miraging mechanical trap, capable of producing short bursts of electric current when triggered." id = "hunt_trap" materials = list(MAT_DURASTEEL = 3000, MAT_METALHYDROGEN = 1000, MAT_PHORON = 2000) req_tech = list(TECH_MATERIAL = 4, TECH_BLUESPACE = 3, TECH_MAGNET = 4, TECH_PHORON = 2, TECH_ARCANE = 2) build_path = /obj/item/beartrap/hunting - sort_string = "ZAAAA" - -// Precursor -/datum/design/item/precursor/AssembleDesignName() - ..() - name = "Alien prototype ([item_name])" +/datum/design/science/precursor + abstract_type = /datum/design/science/precursor -/datum/design/item/precursor/AssembleDesignDesc() - if(!desc) - if(build_path) - var/obj/item/I = build_path - desc = initial(I.desc) - ..() +/datum/design/science/precursor/generate_name(template) + return "Alien prototype ([..()])" -/datum/design/item/precursor/crowbar - name = "Hybrid Crowbar" +/datum/design/science/precursor/crowbar + design_name = "Hybrid Crowbar" desc = "A tool utilizing cutting edge modern technology, and ancient component designs." id = "hybridcrowbar" req_tech = list(TECH_ENGINEERING = 6, TECH_MATERIAL = 6, TECH_BLUESPACE = 3, TECH_PRECURSOR = 1) materials = list(MAT_PLASTEEL = 2000, MAT_VERDANTIUM = 3000, MAT_GOLD = 250, MAT_URANIUM = 2500) build_path = /obj/item/tool/crowbar/hybrid - sort_string = "ZBAAA" -/datum/design/item/precursor/wrench - name = "Hybrid Wrench" +/datum/design/science/precursor/wrench + design_name = "Hybrid Wrench" desc = "A tool utilizing cutting edge modern technology, and ancient component designs." id = "hybridwrench" req_tech = list(TECH_ENGINEERING = 6, TECH_MATERIAL = 5, TECH_BLUESPACE = 2, TECH_MAGNET = 3, TECH_PRECURSOR = 1) materials = list(MAT_PLASTEEL = 2000, MAT_VERDANTIUM = 3000, MAT_SILVER = 300, MAT_URANIUM = 2000) build_path = /obj/item/tool/wrench/hybrid - sort_string = "ZBAAB" -/datum/design/item/precursor/screwdriver - name = "Hybrid Screwdriver" +/datum/design/science/precursor/screwdriver + design_name = "Hybrid Screwdriver" desc = "A tool utilizing cutting edge modern technology, and ancient component designs." id = "hybridscrewdriver" req_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 5, TECH_BLUESPACE = 2, TECH_MAGNET = 3, TECH_PRECURSOR = 1) materials = list(MAT_PLASTEEL = 2000, MAT_VERDANTIUM = 3000, MAT_PLASTIC = 8000, MAT_DIAMOND = 2000) build_path = /obj/item/tool/screwdriver/hybrid - sort_string = "ZBAAC" -/datum/design/item/precursor/wirecutters - name = "Hybrid Wirecutters" +/datum/design/science/precursor/wirecutters + design_name = "Hybrid Wirecutters" desc = "A tool utilizing cutting edge modern technology, and ancient component designs." id = "hybridwirecutters" req_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 5, TECH_PHORON = 2, TECH_PRECURSOR = 1) materials = list(MAT_PLASTEEL = 2000, MAT_VERDANTIUM = 3000, MAT_PLASTIC = 8000, MAT_PHORON = 2750, MAT_DIAMOND = 2000) build_path = /obj/item/tool/wirecutters/hybrid - sort_string = "ZBAAD" -/datum/design/item/precursor/welder - name = "Hybrid Welding Tool" +/datum/design/science/precursor/welder + design_name = "Hybrid Welding Tool" desc = "A tool utilizing cutting edge modern technology, and ancient component designs." id = "hybridwelder" req_tech = list(TECH_ENGINEERING = 6, TECH_MATERIAL = 6, TECH_BLUESPACE = 3, TECH_PHORON = 3, TECH_MAGNET = 5, TECH_PRECURSOR = 1) materials = list(MAT_DURASTEEL = 2000, MAT_MORPHIUM = 3000, MAT_METALHYDROGEN = 4750, MAT_URANIUM = 6000) build_path = /obj/item/weldingtool/experimental/hybrid - sort_string = "ZBAAE" -/datum/design/item/precursor/janusmodule - name = "Blackbox Circuit Datamass" +/datum/design/science/precursor/janusmodule + design_name = "Blackbox Circuit Datamass" desc = "A design that seems to be in a constantly shifting superposition." id = "janus_module" materials = list(MAT_DURASTEEL = 3000, MAT_MORPHIUM = 2000, MAT_METALHYDROGEN = 6000, MAT_URANIUM = 6000, MAT_VERDANTIUM = 1500) req_tech = list(TECH_MATERIAL = 7, TECH_BLUESPACE = 5, TECH_MAGNET = 6, TECH_PHORON = 3, TECH_ARCANE = 1, TECH_PRECURSOR = 2) build_path = /obj/random/janusmodule - sort_string = "ZBBAA" diff --git a/code/modules/research/prosfab_designs.dm b/code/modules/research/designs/prosfab_designs.dm similarity index 60% rename from code/modules/research/prosfab_designs.dm rename to code/modules/research/designs/prosfab_designs.dm index 9a4eccbaf579..70959293a27b 100644 --- a/code/modules/research/prosfab_designs.dm +++ b/code/modules/research/designs/prosfab_designs.dm @@ -1,16 +1,18 @@ -/datum/design/item/prosfab - build_type = PROSFAB +/datum/design/science/prosfab + abstract_type = /datum/design/science/prosfab + lathe_type = LATHE_TYPE_PROSTHETICS category = list("Misc") req_tech = list(TECH_MATERIAL = 1) -/datum/design/item/prosfab/pros +/datum/design/science/prosfab/pros + abstract_type = /datum/design/science/prosfab/pros category = list("Prosthetics") // Make new external organs and make 'em robotish -/datum/design/item/prosfab/pros/Fabricate(var/newloc, var/fabricator) +/datum/design/science/prosfab/pros/legacy_print(atom/where, fabricator) if(istype(fabricator, /obj/machinery/mecha_part_fabricator/pros)) var/obj/machinery/mecha_part_fabricator/pros/prosfab = fabricator - var/obj/item/organ/O = new build_path(newloc) + var/obj/item/organ/O = new build_path(where) if(prosfab.manufacturer) var/datum/robolimb/manf = GLOB.all_robolimbs[prosfab.manufacturer] @@ -36,7 +38,7 @@ return ..() // Deep Magic for the torso since it needs to be a new mob -/datum/design/item/prosfab/pros/torso/Fabricate(var/newloc, var/fabricator) +/datum/design/science/prosfab/pros/torso/legacy_print(atom/where, fabricator) if(istype(fabricator, /obj/machinery/mecha_part_fabricator/pros)) var/obj/machinery/mecha_part_fabricator/pros/prosfab = fabricator var/newspecies = SPECIES_HUMAN @@ -52,7 +54,7 @@ else newspecies = prosfab.species - var/mob/living/carbon/human/H = new(newloc,newspecies) + var/mob/living/carbon/human/H = new(where,newspecies) H.set_stat(DEAD) H.gender = gender for(var/obj/item/organ/external/EO in H.organs) @@ -90,509 +92,522 @@ return H //////////////////// Prosthetics //////////////////// -/datum/design/item/prosfab/pros/torso - time = 35 +/datum/design/science/prosfab/pros/torso + abstract_type = /datum/design/science/prosfab/pros/torso + work = (35 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 30000, MAT_GLASS = 7500) // req_tech = list(TECH_ENGINEERING = 2, TECH_MATERIAL = 3, TECH_DATA = 3) //Saving the values just in case var/gender = MALE -/datum/design/item/prosfab/pros/torso/male - name = "FBP Torso (M)" +/datum/design/science/prosfab/pros/torso/male + design_name = "FBP Torso (M)" id = "pros_torso_m" build_path = /obj/item/organ/external/chest gender = MALE /obj/item/organ/external/chest/f //To satisfy CI. :| -/datum/design/item/prosfab/pros/torso/female - name = "FBP Torso (F)" +/datum/design/science/prosfab/pros/torso/female + design_name = "FBP Torso (F)" id = "pros_torso_f" build_path = /obj/item/organ/external/chest/f gender = FEMALE -/datum/design/item/prosfab/pros/head - name = "Prosthetic Head" +/datum/design/science/prosfab/pros/head + design_name = "Prosthetic Head" id = "pros_head" build_path = /obj/item/organ/external/head - time = 30 + work = (30 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 18750, MAT_GLASS = 3750) // req_tech = list(TECH_ENGINEERING = 2, TECH_MATERIAL = 3, TECH_DATA = 3) //Saving the values just in case -/datum/design/item/prosfab/pros/l_arm - name = "Prosthetic Left Arm" +/datum/design/science/prosfab/pros/l_arm + design_name = "Prosthetic Left Arm" id = "pros_l_arm" build_path = /obj/item/organ/external/arm - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 10125) -/datum/design/item/prosfab/pros/l_hand - name = "Prosthetic Left Hand" +/datum/design/science/prosfab/pros/l_hand + design_name = "Prosthetic Left Hand" id = "pros_l_hand" build_path = /obj/item/organ/external/hand - time = 15 + work = (15 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 3375) -/datum/design/item/prosfab/pros/r_arm - name = "Prosthetic Right Arm" +/datum/design/science/prosfab/pros/r_arm + design_name = "Prosthetic Right Arm" id = "pros_r_arm" build_path = /obj/item/organ/external/arm/right - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 10125) -/datum/design/item/prosfab/pros/r_hand - name = "Prosthetic Right Hand" +/datum/design/science/prosfab/pros/r_hand + design_name = "Prosthetic Right Hand" id = "pros_r_hand" build_path = /obj/item/organ/external/hand/right - time = 15 + work = (15 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 3375) -/datum/design/item/prosfab/pros/l_leg - name = "Prosthetic Left Leg" +/datum/design/science/prosfab/pros/l_leg + design_name = "Prosthetic Left Leg" id = "pros_l_leg" build_path = /obj/item/organ/external/leg - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 8437) -/datum/design/item/prosfab/pros/l_foot - name = "Prosthetic Left Foot" +/datum/design/science/prosfab/pros/l_foot + design_name = "Prosthetic Left Foot" id = "pros_l_foot" build_path = /obj/item/organ/external/foot - time = 15 + work = (15 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 2813) -/datum/design/item/prosfab/pros/r_leg - name = "Prosthetic Right Leg" +/datum/design/science/prosfab/pros/r_leg + design_name = "Prosthetic Right Leg" id = "pros_r_leg" build_path = /obj/item/organ/external/leg/right - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 8437) -/datum/design/item/prosfab/pros/r_foot - name = "Prosthetic Right Foot" +/datum/design/science/prosfab/pros/r_foot + design_name = "Prosthetic Right Foot" id = "pros_r_foot" build_path = /obj/item/organ/external/foot/right - time = 15 + work = (15 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 2813) -/datum/design/item/prosfab/pros/internal +/datum/design/science/prosfab/pros/internal + abstract_type = /datum/design/science/prosfab/pros/internal category = list("Prosthetics, Internal") -/datum/design/item/prosfab/pros/internal/cell - name = "Prosthetic Powercell" +/datum/design/science/prosfab/pros/internal/cell + design_name = "Prosthetic Powercell" id = "pros_cell" build_path = /obj/item/organ/internal/cell - time = 15 + work = (15 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 7500, MAT_GLASS = 3000) // req_tech = list(TECH_ENGINEERING = 2, TECH_MATERIAL = 2) -/datum/design/item/prosfab/pros/internal/eyes - name = "Prosthetic Eyes" +/datum/design/science/prosfab/pros/internal/eyes + design_name = "Prosthetic Eyes" id = "pros_eyes" build_path = /obj/item/organ/internal/eyes/robot - time = 15 + work = (15 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 5625, MAT_GLASS = 5625) // req_tech = list(TECH_ENGINEERING = 2, TECH_MATERIAL = 2) -/datum/design/item/prosfab/pros/internal/hydraulic - name = "Hydraulic Hub" +/datum/design/science/prosfab/pros/internal/hydraulic + design_name = "Hydraulic Hub" id = "pros_hydraulic" build_path = /obj/item/organ/internal/heart/machine - time = 15 + work = (15 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 7500, MAT_PLASTIC = 3000) -/datum/design/item/prosfab/pros/internal/reagcycler - name = "Reagent Cycler" +/datum/design/science/prosfab/pros/internal/reagcycler + design_name = "Reagent Cycler" id = "pros_reagcycler" build_path = /obj/item/organ/internal/stomach/machine - time = 15 + work = (15 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 7500, MAT_PLASTIC = 3000) -/datum/design/item/prosfab/pros/internal/heatsink - name = "Heatsink" +/datum/design/science/prosfab/pros/internal/heatsink + design_name = "Heatsink" id = "pros_heatsink" build_path = /obj/item/organ/internal/robotic/heatsink - time = 15 + work = (15 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 7500, MAT_PLASTIC = 3000) -/datum/design/item/prosfab/pros/internal/diagnostic - name = "Diagnostic Controller" +/datum/design/science/prosfab/pros/internal/diagnostic + design_name = "Diagnostic Controller" id = "pros_diagnostic" build_path = /obj/item/organ/internal/robotic/diagnostic - time = 15 + work = (15 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 7500, MAT_PLASTIC = 3000) -/datum/design/item/prosfab/pros/internal/heart - name = "Prosthetic Heart" +/datum/design/science/prosfab/pros/internal/heart + design_name = "Prosthetic Heart" id = "pros_heart" build_path = /obj/item/organ/internal/heart - time = 15 + work = (15 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 5625, MAT_GLASS = 1000) // req_tech = list(TECH_ENGINEERING = 2, TECH_MATERIAL = 2) -/datum/design/item/prosfab/pros/internal/lungs - name = "Prosthetic Lungs" +/datum/design/science/prosfab/pros/internal/lungs + design_name = "Prosthetic Lungs" id = "pros_lung" build_path = /obj/item/organ/internal/lungs - time = 15 + work = (15 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 5625, MAT_GLASS = 1000) // req_tech = list(TECH_ENGINEERING = 2, TECH_MATERIAL = 2) -/datum/design/item/prosfab/pros/internal/liver - name = "Prosthetic Liver" +/datum/design/science/prosfab/pros/internal/liver + design_name = "Prosthetic Liver" id = "pros_liver" build_path = /obj/item/organ/internal/liver - time = 15 + work = (15 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 5625, MAT_GLASS = 1000) // req_tech = list(TECH_ENGINEERING = 2, TECH_MATERIAL = 2) -/datum/design/item/prosfab/pros/internal/kidneys - name = "Prosthetic Kidneys" +/datum/design/science/prosfab/pros/internal/kidneys + design_name = "Prosthetic Kidneys" id = "pros_kidney" build_path = /obj/item/organ/internal/kidneys - time = 15 + work = (15 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 5625, MAT_GLASS = 1000) // req_tech = list(TECH_ENGINEERING = 2, TECH_MATERIAL = 2) -/datum/design/item/prosfab/pros/internal/spleen - name = "Prosthetic Spleen" +/datum/design/science/prosfab/pros/internal/spleen + design_name = "Prosthetic Spleen" id = "pros_spleen" build_path = /obj/item/organ/internal/spleen - time = 15 + work = (15 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 3000, MAT_GLASS = 750) // req_tech = list(TECH_ENGINEERING = 2, TECH_MATERIAL = 2) -/datum/design/item/prosfab/pros/internal/larynx - name = "Prosthetic Larynx" +/datum/design/science/prosfab/pros/internal/larynx + design_name = "Prosthetic Larynx" id = "pros_larynx" build_path = /obj/item/organ/internal/voicebox - time = 15 + work = (15 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 2000, MAT_GLASS = 750, MAT_PLASTIC = 500) -/datum/design/item/prosfab/pros/internal/backup_battery - name = "Synthetic Back-Up Battery" +/datum/design/science/prosfab/pros/internal/backup_battery + design_name = "Synthetic Back-Up Battery" id = "synth_backup_battery" build_path = /obj/item/fbp_backup_cell - time = 10 + work = (10 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 5000, MAT_GLASS = 1500) //////////////// Cybernetic Augments ////////////////// -/datum/design/item/prosfab/augment +/datum/design/science/prosfab/augment + abstract_type = /datum/design/science/prosfab/augment category = list("Augments") - build_type = PROSFAB - time = 20 + lathe_type = LATHE_TYPE_PROSTHETICS + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 3750, MAT_GLASS = 1750) -/datum/design/item/prosfab/augment/hand - name = "resonant analyzer" +/datum/design/science/prosfab/augment/hand + design_name = "resonant analyzer" id = "aug_hand" materials = list(MAT_STEEL = 1000, MAT_GLASS = 500, MAT_PLASTIC = 500) build_path = /obj/item/organ/internal/augment/armmounted/hand -/datum/design/item/prosfab/augment/shoulder - name = "rotary toolkit" +/datum/design/science/prosfab/augment/shoulder + design_name = "rotary toolkit" id = "aug_shoulder" req_tech = list(TECH_BIO = 3, TECH_MATERIAL = 4, TECH_ENGINEERING = 4, TECH_DATA = 3) materials = list(MAT_STEEL = 1500, MAT_GLASS = 500, MAT_PLASTIC = 1000) build_path = /obj/item/organ/internal/augment/armmounted/shoulder/multiple -/datum/design/item/prosfab/augment/arm - name = "implanted taser" +/datum/design/science/prosfab/augment/arm + design_name = "implanted taser" id = "aug_arm" req_tech = list(TECH_BIO = 4, TECH_COMBAT = 4, TECH_MATERIAL = 4) materials = list(MAT_STEEL = 1500, MAT_GLASS = 500, MAT_PLASTIC = 2000) build_path = /obj/item/organ/internal/augment/armmounted/taser -/datum/design/item/prosfab/augment/shoulder_med - name = "rotary medical kit" +/datum/design/science/prosfab/augment/shoulder_med + design_name = "rotary medical kit" id = "aug_shouldermed" req_tech = list(TECH_BIO = 5, TECH_MATERIAL = 4, TECH_DATA = 3) materials = list(MAT_STEEL = 1500, MAT_GLASS = 1000, MAT_PLASTIC = 1000) build_path = /obj/item/organ/internal/augment/armmounted/shoulder/multiple/medical -/datum/design/item/prosfab/augment/shoulder_combat - name = "muscular overclocker" +/datum/design/science/prosfab/augment/shoulder_combat + design_name = "muscular overclocker" id = "aug_shouldercombat" req_tech = list(TECH_BIO = 5, TECH_COMBAT = 5, TECH_MATERIAL = 4, TECH_ENGINEERING = 4) materials = list(MAT_STEEL = 2000, MAT_PLASTIC = 3000, MAT_SILVER = 1000, MAT_GOLD = 500) build_path = /obj/item/organ/internal/augment/armmounted/shoulder/surge -/datum/design/item/prosfab/augment/pelvis - name = "locomotive optimizer" +/datum/design/science/prosfab/augment/pelvis + design_name = "locomotive optimizer" id = "aug_pelvis" req_tech = list(TECH_BIO = 5, TECH_MATERIAL = 5, TECH_ENGINEERING = 5) materials = list(MAT_STEEL = 1500, MAT_PLASTIC = 2000, MAT_SILVER = 500, MAT_GOLD = 1000) build_path = /obj/item/organ/internal/augment/bioaugment/sprint_enhance -/datum/design/item/prosfab/augment/arm_laser - name = "implanted laser rifle" +/datum/design/science/prosfab/augment/arm_laser + design_name = "implanted laser rifle" id = "aug_armlaser" req_tech = list(TECH_BIO = 5, TECH_COMBAT = 5, TECH_MATERIAL = 5) materials = list(MAT_STEEL = 3000, MAT_GLASS = 1000, MAT_PLASTIC = 2000, MAT_GOLD = 2000) build_path = /obj/item/organ/internal/augment/armmounted -/datum/design/item/prosfab/augment/eyes - name = "thermolensing sunglasses" +/datum/design/science/prosfab/augment/eyes + design_name = "thermolensing sunglasses" id = "aug_eyes" req_tech = list(TECH_BIO = 6, TECH_ILLEGAL = 4, TECH_MATERIAL = 4, TECH_DATA = 5) materials = list(MAT_STEEL = 500, MAT_GLASS = 1000, MAT_PLASTIC = 1500, MAT_GOLD = 1000, MAT_DIAMOND = 2000) build_path = /obj/item/organ/internal/augment/bioaugment/thermalshades -/datum/design/item/prosfab/augment/hand_sword - name = "implanted energy blade" +/datum/design/science/prosfab/augment/hand_sword + design_name = "implanted energy blade" id = "aug_handsword" req_tech = list(TECH_BIO = 6, TECH_COMBAT = 6, TECH_ILLEGAL = 4, TECH_MATERIAL = 4) materials = list(MAT_STEEL = 1500, MAT_GLASS = 500, MAT_PLASTIC = 2000, MAT_GOLD = 2000, MAT_URANIUM = 1500, MAT_DIAMOND = 2500) build_path = /obj/item/organ/internal/augment/armmounted/hand/sword //////////////////// Cyborg Parts //////////////////// -/datum/design/item/prosfab/cyborg +/datum/design/science/prosfab/cyborg + abstract_type = /datum/design/science/prosfab/cyborg category = list("Cyborg Parts") - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 3750) -/datum/design/item/prosfab/cyborg/exoskeleton - name = "Robot Exoskeleton" +/datum/design/science/prosfab/cyborg/exoskeleton + design_name = "Robot Exoskeleton" id = "robot_exoskeleton" build_path = /obj/item/robot_parts/robot_suit - time = 50 + work = (50 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 37500) -/datum/design/item/prosfab/cyborg/torso - name = "Robot Torso" +/datum/design/science/prosfab/cyborg/torso + design_name = "Robot Torso" id = "robot_torso" build_path = /obj/item/robot_parts/chest - time = 35 + work = (35 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 30000) -/datum/design/item/prosfab/cyborg/head - name = "Robot Head" +/datum/design/science/prosfab/cyborg/head + design_name = "Robot Head" id = "robot_head" build_path = /obj/item/robot_parts/head - time = 35 + work = (35 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 18750) -/datum/design/item/prosfab/cyborg/l_arm - name = "Robot Left Arm" +/datum/design/science/prosfab/cyborg/l_arm + design_name = "Robot Left Arm" id = "robot_l_arm" build_path = /obj/item/robot_parts/l_arm - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 13500) -/datum/design/item/prosfab/cyborg/r_arm - name = "Robot Right Arm" +/datum/design/science/prosfab/cyborg/r_arm + design_name = "Robot Right Arm" id = "robot_r_arm" build_path = /obj/item/robot_parts/r_arm - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 13500) -/datum/design/item/prosfab/cyborg/l_leg - name = "Robot Left Leg" +/datum/design/science/prosfab/cyborg/l_leg + design_name = "Robot Left Leg" id = "robot_l_leg" build_path = /obj/item/robot_parts/l_leg - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 11250) -/datum/design/item/prosfab/cyborg/r_leg - name = "Robot Right Leg" +/datum/design/science/prosfab/cyborg/r_leg + design_name = "Robot Right Leg" id = "robot_r_leg" build_path = /obj/item/robot_parts/r_leg - time = 20 + work = (20 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 11250) //////////////////// Cyborg Internals //////////////////// -/datum/design/item/prosfab/cyborg/component +/datum/design/science/prosfab/cyborg/component + abstract_type = /datum/design/science/prosfab/cyborg/component category = list("Cyborg Internals") - build_type = PROSFAB - time = 12 + lathe_type = LATHE_TYPE_PROSTHETICS + work = (12 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 7500) -/datum/design/item/prosfab/cyborg/component/binary_communication_device - name = "Binary Communication Device" +/datum/design/science/prosfab/cyborg/component/binary_communication_device + design_name = "Binary Communication Device" id = "binary_communication_device" build_path = /obj/item/robot_parts/robot_component/binary_communication_device -/datum/design/item/prosfab/cyborg/component/radio - name = "Radio" +/datum/design/science/prosfab/cyborg/component/radio + design_name = "Radio" id = "radio" build_path = /obj/item/robot_parts/robot_component/radio -/datum/design/item/prosfab/cyborg/component/actuator - name = "Actuator" +/datum/design/science/prosfab/cyborg/component/actuator + design_name = "Actuator" id = "actuator" build_path = /obj/item/robot_parts/robot_component/actuator -/datum/design/item/prosfab/cyborg/component/diagnosis_unit - name = "Diagnosis Unit" +/datum/design/science/prosfab/cyborg/component/diagnosis_unit + design_name = "Diagnosis Unit" id = "diagnosis_unit" build_path = /obj/item/robot_parts/robot_component/diagnosis_unit -/datum/design/item/prosfab/cyborg/component/camera - name = "Camera" +/datum/design/science/prosfab/cyborg/component/camera + design_name = "Camera" id = "camera" build_path = /obj/item/robot_parts/robot_component/camera -/datum/design/item/prosfab/cyborg/component/armour - name = "Armour Plating (Robot)" +/datum/design/science/prosfab/cyborg/component/armour + design_name = "Armour Plating (Robot)" id = "armour" build_path = /obj/item/robot_parts/robot_component/armour -// /datum/design/item/prosfab/cyborg/component/armour_heavy -// name = "Armour Plating (Platform)" +// /datum/design/science/prosfab/cyborg/component/armour_heavy +// design_name = "Armour Plating (Platform)" // id = "platform_armour" // build_path = /obj/item/robot_parts/robot_component/armour_platform -/datum/design/item/prosfab/cyborg/component/ai_shell - name = "AI Remote Interface" +/datum/design/science/prosfab/cyborg/component/ai_shell + design_name = "AI Remote Interface" id = "mmi_ai_shell" build_path = /obj/item/mmi/inert/ai_remote //////////////////// Cyborg Modules //////////////////// -/datum/design/item/prosfab/robot_upgrade +/datum/design/science/prosfab/robot_upgrade + abstract_type = /datum/design/science/prosfab/robot_upgrade category = list("Cyborg Modules") - build_type = PROSFAB - time = 12 + lathe_type = LATHE_TYPE_PROSTHETICS + work = (12 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. materials = list(MAT_STEEL = 7500) -/datum/design/item/prosfab/robot_upgrade/rename - name = "Rename Module" +/datum/design/science/prosfab/robot_upgrade/rename + design_name = "Rename Module" desc = "Used to rename a cyborg." id = "borg_rename_s" build_path = /obj/item/borg/upgrade/rename -/datum/design/item/prosfab/robot_upgrade/reset - name = "Reset Module" +/datum/design/science/prosfab/robot_upgrade/reset + design_name = "Reset Module" desc = "Used to reset a cyborg's module. Destroys any other upgrades applied to the robot." id = "borg_reset_module" build_path = /obj/item/borg/upgrade/reset -/datum/design/item/prosfab/robot_upgrade/restart - name = "Emergency Restart Module" +/datum/design/science/prosfab/robot_upgrade/restart + design_name = "Emergency Restart Module" desc = "Used to force a restart of a disabled-but-repaired robot, bringing it back online." id = "borg_restart_module" materials = list(MAT_STEEL = 45000, MAT_GLASS = 3750) build_path = /obj/item/borg/upgrade/restart -/datum/design/item/prosfab/robot_upgrade/vtec - name = "VTEC Module" +/datum/design/science/prosfab/robot_upgrade/vtec + design_name = "VTEC Module" desc = "Used to kick in a robot's VTEC systems, increasing their speed." id = "borg_vtec_module" materials = list(MAT_STEEL = 60000, MAT_GLASS = 4500, MAT_GOLD = 3750) build_path = /obj/item/borg/upgrade/vtec -/datum/design/item/prosfab/robot_upgrade/tasercooler - name = "Rapid Taser Cooling Module" +/datum/design/science/prosfab/robot_upgrade/tasercooler + design_name = "Rapid Taser Cooling Module" desc = "Used to cool a mounted taser, increasing the potential current in it and thus its recharge rate." id = "borg_taser_module" materials = list(MAT_STEEL = 60000, MAT_GLASS = 4500, MAT_GOLD = 1500, MAT_DIAMOND = 375) build_path = /obj/item/borg/upgrade/tasercooler -/datum/design/item/prosfab/robot_upgrade/jetpack - name = "Jetpack Module" +/datum/design/science/prosfab/robot_upgrade/jetpack + design_name = "Jetpack Module" desc = "A carbon dioxide jetpack suitable for low-gravity mining operations." id = "borg_jetpack_module" materials = list(MAT_STEEL = 7500, MAT_PHORON = 11250, MAT_URANIUM = 15000) build_path = /obj/item/borg/upgrade/jetpack -/datum/design/item/prosfab/robot_upgrade/advhealth - name = "Advanced Health Analyzer Module" +/datum/design/science/prosfab/robot_upgrade/advhealth + design_name = "Advanced Health Analyzer Module" desc = "An advanced health analyzer suitable for diagnosing more serious injuries." id = "borg_advhealth_module" materials = list(MAT_STEEL = 10000, MAT_GLASS = 6500, MAT_DIAMOND = 350) build_path = /obj/item/borg/upgrade/advhealth -/datum/design/item/prosfab/robot_upgrade/syndicate - name = "Scrambled Equipment Module" +/datum/design/science/prosfab/robot_upgrade/syndicate + design_name = "Scrambled Equipment Module" desc = "Allows for the construction of lethal upgrades for cyborgs." id = "borg_syndicate_module" req_tech = list(TECH_COMBAT = 4, TECH_ILLEGAL = 3) materials = list(MAT_STEEL = 7500, MAT_GLASS = 11250, MAT_DIAMOND = 7500) build_path = /obj/item/borg/upgrade/syndicate -/datum/design/item/prosfab/robot_upgrade/language - name = "Language Module" +/datum/design/science/prosfab/robot_upgrade/language + design_name = "Language Module" desc = "Used to let cyborgs other than clerical or service speak a variety of languages." id = "borg_language_module" req_tech = list(TECH_DATA = 6, TECH_MATERIAL = 6) materials = list(MAT_STEEL = 25000, MAT_GLASS = 3000, MAT_GOLD = 350) build_path = /obj/item/borg/upgrade/language +/datum/design/science/prosfab/robot_upgrade/sizeshift + design_name = "Size Alteration Module" + id = "borg_sizeshift_module" + req_tech = list(TECH_BLUESPACE = 3, TECH_MATERIAL = 3, TECH_POWER = 2) + materials = list(MAT_STEEL = 4000, MAT_GLASS = 4000) + build_path = /obj/item/borg/upgrade/sizeshift + // Synthmorph Bags. -/datum/design/item/prosfab/synthmorphbag - name = "Synthmorph Storage Bag" +/datum/design/science/prosfab/synthmorphbag + design_name = "Synthmorph Storage Bag" desc = "Used to store or slowly defragment an FBP." id = "misc_synth_bag" materials = list(MAT_STEEL = 250, MAT_GLASS = 250, MAT_PLASTIC = 2000) build_path = /obj/item/bodybag/cryobag/robobag -/datum/design/item/prosfab/badge_nt - name = "NanoTrasen Tag" +/datum/design/science/prosfab/badge_nt + design_name = "NanoTrasen Tag" desc = "Used to identify an empty NanoTrasen FBP." id = "misc_synth_bag_tag_nt" materials = list(MAT_STEEL = 1000, MAT_GLASS = 500, MAT_PLASTIC = 1000) build_path = /obj/item/clothing/accessory/badge/corporate_tag -/datum/design/item/prosfab/badge_morph - name = "Morpheus Tag" +/datum/design/science/prosfab/badge_morph + design_name = "Morpheus Tag" desc = "Used to identify an empty Morpheus FBP." id = "misc_synth_bag_tag_morph" materials = list(MAT_STEEL = 1000, MAT_GLASS = 500, MAT_PLASTIC = 1000) build_path = /obj/item/clothing/accessory/badge/corporate_tag/morpheus -/datum/design/item/prosfab/badge_wardtaka - name = "Ward-Takahashi Tag" +/datum/design/science/prosfab/badge_wardtaka + design_name = "Ward-Takahashi Tag" desc = "Used to identify an empty Ward-Takahashi FBP." id = "misc_synth_bag_tag_wardtaka" materials = list(MAT_STEEL = 1000, MAT_GLASS = 500, MAT_PLASTIC = 1000) build_path = /obj/item/clothing/accessory/badge/corporate_tag/wardtaka -/datum/design/item/prosfab/badge_zenghu - name = "Zeng-Hu Tag" +/datum/design/science/prosfab/badge_zenghu + design_name = "Zeng-Hu Tag" desc = "Used to identify an empty Zeng-Hu FBP." id = "misc_synth_bag_tag_zenghu" materials = list(MAT_STEEL = 1000, MAT_GLASS = 500, MAT_PLASTIC = 1000) build_path = /obj/item/clothing/accessory/badge/corporate_tag/zenghu -/datum/design/item/prosfab/badge_gilthari - name = "Gilthari Tag" +/datum/design/science/prosfab/badge_gilthari + design_name = "Gilthari Tag" desc = "Used to identify an empty Gilthari FBP." id = "misc_synth_bag_tag_gilthari" materials = list(MAT_STEEL = 1000, MAT_GLASS = 500, MAT_GOLD = 1000) build_path = /obj/item/clothing/accessory/badge/corporate_tag/gilthari req_tech = list(TECH_MATERIAL = 4, TECH_ILLEGAL = 2, TECH_PHORON = 2) -/datum/design/item/prosfab/badge_veymed - name = "Vey-Medical Tag" +/datum/design/science/prosfab/badge_veymed + design_name = "Vey-Medical Tag" desc = "Used to identify an empty Vey-Medical FBP." id = "misc_synth_bag_tag_veymed" materials = list(MAT_STEEL = 1000, MAT_GLASS = 500, MAT_PLASTIC = 1000) build_path = /obj/item/clothing/accessory/badge/corporate_tag/veymed req_tech = list(TECH_MATERIAL = 3, TECH_ILLEGAL = 1, TECH_BIO = 4) -/datum/design/item/prosfab/badge_hephaestus - name = "Hephaestus Tag" +/datum/design/science/prosfab/badge_hephaestus + design_name = "Hephaestus Tag" desc = "Used to identify an empty Hephaestus FBP." id = "misc_synth_bag_tag_heph" materials = list(MAT_STEEL = 1000, MAT_GLASS = 500, MAT_PLASTIC = 1000) build_path = /obj/item/clothing/accessory/badge/corporate_tag/hephaestus -/datum/design/item/prosfab/badge_grayson - name = "Grayson Tag" +/datum/design/science/prosfab/badge_grayson + design_name = "Grayson Tag" desc = "Used to identify an empty Grayson FBP." id = "misc_synth_bag_tag_grayson" materials = list(MAT_STEEL = 1000, MAT_GLASS = 500, MAT_PLASTIC = 1000) build_path = /obj/item/clothing/accessory/badge/corporate_tag/grayson -/datum/design/item/prosfab/badge_xion - name = "Xion Tag" +/datum/design/science/prosfab/badge_xion + design_name = "Xion Tag" desc = "Used to identify an empty Xion FBP." id = "misc_synth_bag_tag_xion" materials = list(MAT_STEEL = 1000, MAT_GLASS = 500, MAT_PLASTIC = 1000) build_path = /obj/item/clothing/accessory/badge/corporate_tag/xion -/datum/design/item/prosfab/badge_bishop - name = "Bishop Tag" +/datum/design/science/prosfab/badge_bishop + design_name = "Bishop Tag" desc = "Used to identify an empty Bishop FBP." id = "misc_synth_bag_tag_bishop" materials = list(MAT_STEEL = 500, MAT_GLASS = 2000, MAT_PLASTIC = 500) diff --git a/code/modules/research/designs/rigs_vr.dm b/code/modules/research/designs/rigs_vr.dm new file mode 100644 index 000000000000..f306a1f33b67 --- /dev/null +++ b/code/modules/research/designs/rigs_vr.dm @@ -0,0 +1,88 @@ +/datum/design/science/hardsuit_module + abstract_type = /datum/design/science/hardsuit_module + req_tech = list(TECH_MATERIAL = 5, TECH_POWER = 5, TECH_MAGNET = 5) + materials = list(MAT_STEEL = 6000, MAT_GLASS = 6000, MAT_SILVER = 4000, MAT_URANIUM = 2000) + +/datum/design/science/hardsuit_module/generate_name(template) + return "hardsuit module prototype ([..()])" + +/datum/design/science/hardsuit_module/maneuvering_jets + design_name = "maneuvering jets" + id = "hardsuitmod_maneuveringjets" + build_path = /obj/item/hardsuit_module/maneuvering_jets + +/datum/design/science/hardsuit_module/sprinter + design_name = "sprinter" + id = "hardsuitmod_sprinter" + build_path = /obj/item/hardsuit_module/sprinter + +/datum/design/science/hardsuit_module/plasma_cutter + design_name = "plasma cutter" + id = "hardsuitmod_plasmacutter" + build_path = /obj/item/hardsuit_module/device/plasmacutter + +/datum/design/science/hardsuit_module/diamond_drill + design_name = "diamond drill" + id = "hardsuitmod_diamonddrill" + build_path = /obj/item/hardsuit_module/device/drill + +/datum/design/science/hardsuit_module/anomaly_scanner + design_name = "anomaly scanner" + id = "hardsuitmod_anomalyscanner" + build_path = /obj/item/hardsuit_module/device/anomaly_scanner + +/datum/design/science/hardsuit_module/orescanner + design_name = "ore scanner" + id = "hardsuitmod_orescanner" + build_path = /obj/item/hardsuit_module/device/orescanner + +/datum/design/science/hardsuit_module/orescanneradv + design_name = "adv. ore scanner" + id = "hardsuitmod_orescanneradv" + build_path = /obj/item/hardsuit_module/device/orescanner/advanced + +/datum/design/science/hardsuit_module/rescue_pharm + design_name = "rescue pharm" + id = "hardsuitmod_rescue_pharm" + build_path = /obj/item/hardsuit_module/rescue_pharm + +/datum/design/science/hardsuit_module/lasercannon + design_name = "laser cannon" + id = "hardsuitmod_lasercannon" + build_path = /obj/item/hardsuit_module/mounted + materials = list(MAT_STEEL = 6000, MAT_GLASS = 6000, MAT_SILVER = 4000, MAT_URANIUM = 2000, MAT_DIAMOND = 2000) + +/datum/design/science/hardsuit_module/egun + design_name = "energy gun" + id = "hardsuitmod_egun" + build_path = /obj/item/hardsuit_module/mounted/egun + materials = list(MAT_STEEL = 6000, MAT_GLASS = 6000, MAT_SILVER = 4000, MAT_URANIUM = 2000, MAT_DIAMOND = 1000) + +/datum/design/science/hardsuit_module/taser + design_name = "taser" + id = "hardsuitmod_taser" + build_path = /obj/item/hardsuit_module/mounted/taser + +/datum/design/science/hardsuit_module/armblade + design_name = "arm-mounted blade" + id = "hardsuitmod_armblade" + build_path = /obj/item/hardsuit_module/armblade + materials = list(MAT_STEEL = 8000, MAT_GLASS = 2000, MAT_SILVER = 2000, MAT_GOLD = 2000) + +/datum/design/science/hardsuit_module/rcd + design_name = "rcd" + id = "hardsuitmod_rcd" + build_path = /obj/item/hardsuit_module/device/rcd + materials = list(MAT_STEEL = 6000, MAT_GLASS = 6000, MAT_SILVER = 4000, MAT_URANIUM = 2000, MAT_DIAMOND = 2000) + +/datum/design/science/hardsuit_module/hardsuitwelder + design_name = "RIG arc-welder" + id = "hardsuitmod_welder" + build_path = /obj/item/hardsuit_module/device/rigwelder + materials = list(MAT_STEEL = 6000, MAT_GLASS = 4000, MAT_SILVER = 2000, MAT_GOLD = 4000) + +/datum/design/science/hardsuit_module/toolset + design_name = "RIG toolset" + id = "hardsuitmod_tools" + build_path = /obj/item/hardsuit_module/device/toolset + materials = list(MAT_STEEL = 8000, MAT_GLASS = 2000, MAT_SILVER = 2000, MAT_PLASTEEL = 1000) diff --git a/code/modules/research/designs/sort_string_readme.dm b/code/modules/research/designs/sort_string_readme.dm deleted file mode 100644 index 9f6f375eaaa0..000000000000 --- a/code/modules/research/designs/sort_string_readme.dm +++ /dev/null @@ -1,91 +0,0 @@ -/* - This is a guide to sort strings and categorization of designs. - Its really helpful and neat-looking when items are sorted properly in general R&D list and not just haphazardly. - - sort_string basically sorts items in alphabetic order, using sort_string itself as reference. - - - A - stock parts all always go first, and above everything else - AA - parts themselves - AAAA - matter bins - AAAB - micro manipulators - AAAC - capacitors - AAAD - scanners - AAAE - micro-lasers - AB - part replacer(s) - B - power cells - BAAA - regular power cells - BAAB - small power cells - C - Tech disks - D - GPS/beacons/locators/etc - DA - GPSs - DB - beacon/locator - DBAA - locator - DBAB - beacon - E - HUDs - F - Mining equipment - FA - drills - FB - scanners and such - G - Xenoarch equipment - H - Xenobiology equipment - HA - weapons - HB - other - I - Beakers - J - Biotech scanners and such - JAAA - mass spectrometers - JAAB - reagent scanners - JAAC - borg stuff - JAAD - plant stuff - K - Medical equipment - KA - surgery equipment - KAAA - scalpels/IMS - KAAB - bone clamp - KB - health analyzers - KC - misc - L - Implants - M - Weapons - MA - Ranged weapon - MAA - Energy ranged weapons - MAB - Ballistic ranged weapons - MABB - Ballistic ammo - MAC - Phase weapons - MAD - Other ranged weapons (darts/sprayer/fuelrod) - MADB - misc ammo - MB - Melee weapons - MC - grenade casings - N - Engineering equipment - NA - tools - NB - scanners - O, P - placeholders in case new category is needed - Q - Bags of Holding - R - Telecomms stock parts - S - AI-holders - SA - brain holders - SB - pAI - SC - intellicore - T - Misc stuff - TA - general - TB - illegal - U - Integrated circuits stuff - UA - printer - UB - upgrade disks - UC - tools - UD - holders - V - Modular computer parts - VA - hard drives - VB - network cards - VC - batteries - VD - cpus - VE - accessories without upgrades - VF - data crystals - W - PDA stuff - WA - PDA - WB - PDA cartridges - X, Y - more placeholders - Z - anomaly/precursor items - ZA - anomaly - ZB - precursor - ZBA - precursor tools - ZBB - precursor other - -*/ diff --git a/code/modules/research/designs/stock_parts.dm b/code/modules/research/designs/stock_parts.dm index 483b7d16952f..c65dc2c02ae0 100644 --- a/code/modules/research/designs/stock_parts.dm +++ b/code/modules/research/designs/stock_parts.dm @@ -2,220 +2,187 @@ Various Stock Parts */ -/datum/design/item/stock_part - build_type = PROTOLATHE - time = 3 //Sets an independent time for stock parts, currently one third normal print time. +/datum/design/science/stock_part + abstract_type = /datum/design/science/stock_part + lathe_type = LATHE_TYPE_PROTOLATHE + work = (3 * (1 / 3) * 10) // auto regexed to be old time divided by 3 in seconds. //Sets an independent time for stock parts, currently one third normal print time. -/datum/design/item/stock_part/AssembleDesignName() - ..() - name = "Component design ([item_name])" - -/datum/design/item/stock_part/AssembleDesignDesc() - if(!desc) - desc = "A stock part used in the construction of various devices." +/datum/design/science/stock_part/generate_name(template) + return "Component design ([..()])" // Matter Bins -/datum/design/item/stock_part/basic_matter_bin +/datum/design/science/stock_part/basic_matter_bin id = "basic_matter_bin" req_tech = list(TECH_MATERIAL = 1) materials = list(MAT_STEEL = 80) build_path = /obj/item/stock_parts/matter_bin - sort_string = "AAAAA" -/datum/design/item/stock_part/adv_matter_bin +/datum/design/science/stock_part/adv_matter_bin id = "adv_matter_bin" req_tech = list(TECH_MATERIAL = 3) materials = list(MAT_STEEL = 80) build_path = /obj/item/stock_parts/matter_bin/adv - sort_string = "AAAAB" -/datum/design/item/stock_part/super_matter_bin +/datum/design/science/stock_part/super_matter_bin id = "super_matter_bin" req_tech = list(TECH_MATERIAL = 5) materials = list(MAT_STEEL = 80) build_path = /obj/item/stock_parts/matter_bin/super - sort_string = "AAAAC" -/datum/design/item/stock_part/hyper_matter_bin +/datum/design/science/stock_part/hyper_matter_bin id = "hyper_matter_bin" req_tech = list(TECH_MATERIAL = 6, TECH_ARCANE = 2) materials = list(MAT_STEEL = 200, MAT_VERDANTIUM = 60, MAT_DURASTEEL = 75) build_path = /obj/item/stock_parts/matter_bin/hyper - sort_string = "AAAAD" -/datum/design/item/stock_part/omni_matter_bin +/datum/design/science/stock_part/omni_matter_bin id = "omni_matter_bin" req_tech = list(TECH_MATERIAL = 7, TECH_PRECURSOR = 2) materials = list(MAT_STEEL = 2000, MAT_PLASTEEL = 100, MAT_MORPHIUM = 100, MAT_DURASTEEL = 100) build_path = /obj/item/stock_parts/matter_bin/omni - sort_string = "AAAAE" // Micro-manipulators -/datum/design/item/stock_part/micro_mani +/datum/design/science/stock_part/micro_mani id = "micro_mani" req_tech = list(TECH_MATERIAL = 1, TECH_DATA = 1) materials = list(MAT_STEEL = 30) build_path = /obj/item/stock_parts/manipulator - sort_string = "AAABA" -/datum/design/item/stock_part/nano_mani +/datum/design/science/stock_part/nano_mani id = "nano_mani" req_tech = list(TECH_MATERIAL = 3, TECH_DATA = 2) materials = list(MAT_STEEL = 30) build_path = /obj/item/stock_parts/manipulator/nano - sort_string = "AAABB" -/datum/design/item/stock_part/pico_mani +/datum/design/science/stock_part/pico_mani id = "pico_mani" req_tech = list(TECH_MATERIAL = 5, TECH_DATA = 2) materials = list(MAT_STEEL = 30) build_path = /obj/item/stock_parts/manipulator/pico - sort_string = "AAABC" -/datum/design/item/stock_part/hyper_mani +/datum/design/science/stock_part/hyper_mani id = "hyper_mani" req_tech = list(TECH_MATERIAL = 6, TECH_DATA = 3, TECH_ARCANE = 2) materials = list(MAT_STEEL = 200, MAT_VERDANTIUM = 50, MAT_DURASTEEL = 50) build_path = /obj/item/stock_parts/manipulator/hyper - sort_string = "AAABD" -/datum/design/item/stock_part/omni_mani +/datum/design/science/stock_part/omni_mani id = "omni_mani" req_tech = list(TECH_MATERIAL = 7, TECH_DATA = 4, TECH_PRECURSOR = 2) materials = list(MAT_STEEL = 2000, MAT_PLASTEEL = 500, MAT_MORPHIUM = 100, MAT_DURASTEEL = 100) build_path = /obj/item/stock_parts/manipulator/omni - sort_string = "AAABE" // Capacitors -/datum/design/item/stock_part/basic_capacitor +/datum/design/science/stock_part/basic_capacitor id = "basic_capacitor" req_tech = list(TECH_POWER = 1) materials = list(MAT_STEEL = 50, MAT_GLASS = 50) build_path = /obj/item/stock_parts/capacitor - sort_string = "AAACA" -/datum/design/item/stock_part/adv_capacitor +/datum/design/science/stock_part/adv_capacitor id = "adv_capacitor" req_tech = list(TECH_POWER = 3) materials = list(MAT_STEEL = 50, MAT_GLASS = 50) build_path = /obj/item/stock_parts/capacitor/adv - sort_string = "AAACB" -/datum/design/item/stock_part/super_capacitor +/datum/design/science/stock_part/super_capacitor id = "super_capacitor" req_tech = list(TECH_POWER = 5, TECH_MATERIAL = 4) materials = list(MAT_STEEL = 50, MAT_GLASS = 50, MAT_GOLD = 20) build_path = /obj/item/stock_parts/capacitor/super - sort_string = "AAACC" -/datum/design/item/stock_part/hyper_capacitor +/datum/design/science/stock_part/hyper_capacitor id = "hyper_capacitor" req_tech = list(TECH_POWER = 6, TECH_MATERIAL = 5, TECH_BLUESPACE = 1, TECH_ARCANE = 1) materials = list(MAT_STEEL = 200, MAT_GLASS = 100, MAT_VERDANTIUM = 30, MAT_DURASTEEL = 25) build_path = /obj/item/stock_parts/capacitor/hyper - sort_string = "AAACD" -/datum/design/item/stock_part/omni_capacitor +/datum/design/science/stock_part/omni_capacitor id = "omni_capacitor" req_tech = list(TECH_POWER = 7, TECH_MATERIAL = 6, TECH_BLUESPACE = 3, TECH_PRECURSOR = 1) materials = list(MAT_STEEL = 2000, MAT_DIAMOND = 1000, MAT_GLASS = 1000, MAT_MORPHIUM = 100, MAT_DURASTEEL = 100) build_path = /obj/item/stock_parts/capacitor/omni - sort_string = "AAACE" // Sensors -/datum/design/item/stock_part/basic_sensor +/datum/design/science/stock_part/basic_sensor id = "basic_sensor" req_tech = list(TECH_MAGNET = 1) materials = list(MAT_STEEL = 50, MAT_GLASS = 20) build_path = /obj/item/stock_parts/scanning_module - sort_string = "AAADA" -/datum/design/item/stock_part/adv_sensor +/datum/design/science/stock_part/adv_sensor id = "adv_sensor" req_tech = list(TECH_MAGNET = 3) materials = list(MAT_STEEL = 50, MAT_GLASS = 20) build_path = /obj/item/stock_parts/scanning_module/adv - sort_string = "AAADB" -/datum/design/item/stock_part/phasic_sensor +/datum/design/science/stock_part/phasic_sensor id = "phasic_sensor" req_tech = list(TECH_MAGNET = 5, TECH_MATERIAL = 3) materials = list(MAT_STEEL = 50, MAT_GLASS = 20, MAT_SILVER = 10) build_path = /obj/item/stock_parts/scanning_module/phasic - sort_string = "AAADC" -/datum/design/item/stock_part/hyper_sensor +/datum/design/science/stock_part/hyper_sensor id = "hyper_sensor" req_tech = list(TECH_MAGNET = 6, TECH_MATERIAL = 4, TECH_ARCANE = 1) materials = list(MAT_STEEL = 50, MAT_GLASS = 20, MAT_SILVER = 50, MAT_VERDANTIUM = 40, MAT_DURASTEEL = 50) build_path = /obj/item/stock_parts/scanning_module/hyper - sort_string = "AAADD" -/datum/design/item/stock_part/omni_sensor +/datum/design/science/stock_part/omni_sensor id = "omni_sensor" req_tech = list(TECH_MAGNET = 7, TECH_MATERIAL = 5, TECH_PRECURSOR = 1) materials = list(MAT_STEEL = 1000, MAT_PLASTEEL = 500, MAT_GLASS = 750, MAT_SILVER = 500, MAT_MORPHIUM = 60, MAT_DURASTEEL = 100) build_path = /obj/item/stock_parts/scanning_module/omni - sort_string = "AAADE" // Micro-lasers -/datum/design/item/stock_part/basic_micro_laser +/datum/design/science/stock_part/basic_micro_laser id = "basic_micro_laser" req_tech = list(TECH_MAGNET = 1) materials = list(MAT_STEEL = 10, MAT_GLASS = 20) build_path = /obj/item/stock_parts/micro_laser - sort_string = "AAAEA" -/datum/design/item/stock_part/high_micro_laser +/datum/design/science/stock_part/high_micro_laser id = "high_micro_laser" req_tech = list(TECH_MAGNET = 3) materials = list(MAT_STEEL = 10, MAT_GLASS = 20) build_path = /obj/item/stock_parts/micro_laser/high - sort_string = "AAAEB" -/datum/design/item/stock_part/ultra_micro_laser +/datum/design/science/stock_part/ultra_micro_laser id = "ultra_micro_laser" req_tech = list(TECH_MAGNET = 5, TECH_MATERIAL = 5) materials = list(MAT_STEEL = 10, MAT_GLASS = 20, MAT_URANIUM = 10) build_path = /obj/item/stock_parts/micro_laser/ultra - sort_string = "AAAEC" -/datum/design/item/stock_part/hyper_micro_laser +/datum/design/science/stock_part/hyper_micro_laser id = "hyper_micro_laser" req_tech = list(TECH_MAGNET = 6, TECH_MATERIAL = 6, TECH_ARCANE = 2) materials = list(MAT_STEEL = 200, MAT_GLASS = 20, MAT_URANIUM = 30, MAT_VERDANTIUM = 50, MAT_DURASTEEL = 100) build_path = /obj/item/stock_parts/micro_laser/hyper - sort_string = "AAAED" -/datum/design/item/stock_part/omni_micro_laser +/datum/design/science/stock_part/omni_micro_laser id = "omni_micro_laser" req_tech = list(TECH_MAGNET = 7, TECH_MATERIAL = 7, TECH_PRECURSOR = 2) materials = list(MAT_STEEL = 2000, MAT_GLASS = 500, MAT_URANIUM = 2000, MAT_MORPHIUM = 50, MAT_DURASTEEL = 100) build_path = /obj/item/stock_parts/micro_laser/omni - sort_string = "AAAEE" // RPEDs -/datum/design/item/stock_part/RPED - name = "Rapid Part Exchange Device" +/datum/design/science/stock_part/RPED + design_name = "Rapid Part Exchange Device" desc = "Special mechanical module made to store, sort, and apply standard machine parts." id = "rped" req_tech = list(TECH_ENGINEERING = 3, TECH_MATERIAL = 3) - materials = list(MAT_STEEL = 15000, MAT_GLASS = 5000) build_path = /obj/item/storage/part_replacer - sort_string = "ABAAA" -/datum/design/item/stock_part/ARPED - name = "Advanced Rapid Part Exchange Device" +/datum/design/science/stock_part/ARPED + design_name = "Advanced Rapid Part Exchange Device" desc = "Special mechanical module made to store, sort, and apply standard machine parts. This one has a greatly upgraded storage capacity." id = "arped" req_tech = list(TECH_ENGINEERING = 5, TECH_MATERIAL = 5) - materials = list(MAT_STEEL = 30000, MAT_GLASS = 10000) build_path = /obj/item/storage/part_replacer/adv - sort_string = "ABAAB" diff --git a/code/modules/research/designs/subspace_parts.dm b/code/modules/research/designs/subspace_parts.dm index 28daad82a2f8..7cc60dd9ef56 100644 --- a/code/modules/research/designs/subspace_parts.dm +++ b/code/modules/research/designs/subspace_parts.dm @@ -1,54 +1,47 @@ -// Telecomm parts +/datum/design/science/stock_part/subspace + abstract_type = /datum/design/science/stock_part/subspace -/datum/design/item/stock_part/subspace/AssembleDesignName() - ..() - name = "Subspace component design ([item_name])" +/datum/design/science/stock_part/subspace/generate_name(template) + return "Subspace component design ([..()])" -/datum/design/item/stock_part/subspace/subspace_ansible +/datum/design/science/stock_part/subspace/subspace_ansible id = "s-ansible" req_tech = list(TECH_DATA = 3, TECH_MAGNET = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2) materials = list(MAT_STEEL = 80, MAT_SILVER = 20) build_path = /obj/item/stock_parts/subspace/ansible - sort_string = "RAAAA" -/datum/design/item/stock_part/subspace/hyperwave_filter +/datum/design/science/stock_part/subspace/hyperwave_filter id = "s-filter" req_tech = list(TECH_DATA = 3, TECH_MAGNET = 3) materials = list(MAT_STEEL = 40, MAT_SILVER = 10) build_path = /obj/item/stock_parts/subspace/sub_filter - sort_string = "RAAAB" -/datum/design/item/stock_part/subspace/subspace_amplifier +/datum/design/science/stock_part/subspace/subspace_amplifier id = "s-amplifier" req_tech = list(TECH_DATA = 3, TECH_MAGNET = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2) materials = list(MAT_STEEL = 10, MAT_GOLD = 30, MAT_URANIUM = 15) build_path = /obj/item/stock_parts/subspace/amplifier - sort_string = "RAAAC" -/datum/design/item/stock_part/subspace/subspace_treatment +/datum/design/science/stock_part/subspace/subspace_treatment id = "s-treatment" req_tech = list(TECH_DATA = 3, TECH_MAGNET = 2, TECH_MATERIAL = 4, TECH_BLUESPACE = 2) materials = list(MAT_STEEL = 10, MAT_SILVER = 20) build_path = /obj/item/stock_parts/subspace/treatment - sort_string = "RAAAD" -/datum/design/item/stock_part/subspace/subspace_analyzer +/datum/design/science/stock_part/subspace/subspace_analyzer id = "s-analyzer" req_tech = list(TECH_DATA = 3, TECH_MAGNET = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2) materials = list(MAT_STEEL = 10, MAT_GOLD = 15) build_path = /obj/item/stock_parts/subspace/analyzer - sort_string = "RAAAE" -/datum/design/item/stock_part/subspace/subspace_crystal +/datum/design/science/stock_part/subspace/subspace_crystal id = "s-crystal" req_tech = list(TECH_MAGNET = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2) materials = list(MAT_GLASS = 1000, MAT_SILVER = 20, MAT_GOLD = 20) build_path = /obj/item/stock_parts/subspace/crystal - sort_string = "RAAAF" -/datum/design/item/stock_part/subspace/subspace_transmitter +/datum/design/science/stock_part/subspace/subspace_transmitter id = "s-transmitter" req_tech = list(TECH_MAGNET = 5, TECH_MATERIAL = 5, TECH_BLUESPACE = 3) materials = list(MAT_GLASS = 100, MAT_SILVER = 10, MAT_URANIUM = 15) build_path = /obj/item/stock_parts/subspace/transmitter - sort_string = "RAAAG" diff --git a/code/modules/research/designs/tech_disks.dm b/code/modules/research/designs/tech_disks.dm index 399d898e6586..f3886cc56e78 100644 --- a/code/modules/research/designs/tech_disks.dm +++ b/code/modules/research/designs/tech_disks.dm @@ -1,21 +1,21 @@ -/datum/design/item/disk/AssembleDesignName() - ..() - name = "Data storage design ([name])" +/datum/design/science/disk + abstract_type = /datum/design/science/disk -/datum/design/item/disk/design_disk - name = "Design Storage Disk" +/datum/design/science/disk/generate_name(template) + return "Data storage design ([..()])" + +/datum/design/science/disk/design_disk + design_name = "Design Storage Disk" desc = "Produce additional disks for storing device designs." id = "design_disk" req_tech = list(TECH_DATA = 1) materials = list(MAT_STEEL = 30, MAT_GLASS = 10) build_path = /obj/item/disk/design_disk - sort_string = "CAAAA" -/datum/design/item/disk/tech_disk - name = "Technology Data Storage Disk" +/datum/design/science/disk/tech_disk + design_name = "Technology Data Storage Disk" desc = "Produce additional disks for storing technology data." id = "tech_disk" req_tech = list(TECH_DATA = 1) materials = list(MAT_STEEL = 30, MAT_GLASS = 10) build_path = /obj/item/disk/tech_disk - sort_string = "CAAAB" diff --git a/code/modules/research/teleport_vr.dm b/code/modules/research/designs/teleport_vr.dm similarity index 54% rename from code/modules/research/teleport_vr.dm rename to code/modules/research/designs/teleport_vr.dm index a4fc70d486b9..7cc95f8650a9 100644 --- a/code/modules/research/teleport_vr.dm +++ b/code/modules/research/designs/teleport_vr.dm @@ -1,25 +1,22 @@ -/* - P - teleporteing item stuff -*/ +/datum/design/science/teleport + abstract_type = /datum/design/science/teleport + -/datum/design/item/teleport/AssembleDesignName() - ..() - name = "Teleportation device prototype ([item_name])" +/datum/design/science/teleport/generate_name(template) + return "Teleportation device prototype ([..()])" -/datum/design/item/teleport/translocator - name = "Personal translocator" +/datum/design/science/teleport/translocator + design_name = "Personal translocator" id = "translocator" req_tech = list(TECH_MAGNET = 5, TECH_BLUESPACE = 5, TECH_ILLEGAL = 6) materials = list(MAT_STEEL = 4000, MAT_GLASS = 2000, MAT_URANIUM = 4000, MAT_DIAMOND = 2000) build_path = /obj/item/perfect_tele - sort_string = "PAAAA" /* -/datum/design/item/teleport/bluespace_crystal - name = "Artificial Bluespace Crystal" +/datum/design/science/teleport/bluespace_crystal + design_name = "Artificial Bluespace Crystal" id = "bluespace_crystal" req_tech = list(TECH_BLUESPACE = 3, TECH_PHORON = 4) materials = list(MAT_DIAMOND = 1500, MAT_PHORON = 1500) build_path = /obj/item/ore/bluespace_crystal/artificial - sort_string = "PAAAB" */ diff --git a/code/modules/research/designs/uncommented.dm b/code/modules/research/designs/uncommented.dm deleted file mode 100644 index d5de214a5ce7..000000000000 --- a/code/modules/research/designs/uncommented.dm +++ /dev/null @@ -1,69 +0,0 @@ - -/* Uncomment if someone makes these buildable -/datum/design/circuit/general_alert - name = "general alert console" - id = "general_alert" - build_path = /obj/item/circuitboard/general_alert - -// Removal of loyalty implants. Can't think of a way to add this to the config option. -/datum/design/item/implant/loyalty - name = "loyalty" - id = "implant_loyal" - req_tech = list(TECH_MATERIAL = 2, TECH_BIO = 3) - materials = list(MAT_STEEL = 7000, MAT_GLASS = 7000) - build_path = /obj/item/implantcase/loyalty" - -/datum/design/rust_core_control - name = "Circuit Design (RUST core controller)" - desc = "Allows for the construction of circuit boards used to build a core control console for the RUST fusion engine." - id = "rust_core_control" - req_tech = list("programming" = 4, "engineering" = 4) - build_type = IMPRINTER - materials = list(MAT_GLASS = 2000, "sacid" = 20) - build_path = "/obj/item/circuitboard/rust_core_control" - -datum/design/rust_fuel_control - name = "Circuit Design (RUST fuel controller)" - desc = "Allows for the construction of circuit boards used to build a fuel injector control console for the RUST fusion engine." - id = "rust_fuel_control" - req_tech = list("programming" = 4, "engineering" = 4) - build_type = IMPRINTER - materials = list(MAT_GLASS = 2000, "sacid" = 20) - build_path = "/obj/item/circuitboard/rust_fuel_control" - -datum/design/rust_fuel_port - name = "Internal circuitry (RUST fuel port)" - desc = "Allows for the construction of circuit boards used to build a fuel injection port for the RUST fusion engine." - id = "rust_fuel_port" - req_tech = list("engineering" = 4, "materials" = 5) - build_type = IMPRINTER - materials = list(MAT_GLASS = 2000, "sacid" = 20, MAT_URANIUM = 3000) - build_path = "/obj/item/module/rust_fuel_port" - -datum/design/rust_fuel_compressor - name = "Circuit Design (RUST fuel compressor)" - desc = "Allows for the construction of circuit boards used to build a fuel compressor of the RUST fusion engine." - id = "rust_fuel_compressor" - req_tech = list("materials" = 6, "phorontech" = 4) - build_type = IMPRINTER - materials = list(MAT_GLASS = 2000, "sacid" = 20, MAT_PHORON = 3000, MAT_DIAMOND = 1000) - build_path = "/obj/item/module/rust_fuel_compressor" - -datum/design/rust_core - name = "Internal circuitry (RUST tokamak core)" - desc = "The circuit board that for a RUST-pattern tokamak fusion core." - id = "pacman" - req_tech = list(bluespace = 3, phorontech = 4, magnets = 5, powerstorage = 6) - build_type = IMPRINTER - materials = list(MAT_GLASS = 2000, "sacid" = 20, MAT_PHORON = 3000, MAT_DIAMOND = 2000) - build_path = "/obj/item/circuitboard/rust_core" - -datum/design/rust_injector - name = "Internal circuitry (RUST tokamak core)" - desc = "The circuit board that for a RUST-pattern particle accelerator." - id = "pacman" - req_tech = list(powerstorage = 3, engineering = 4, phorontech = 4, materials = 6) - build_type = IMPRINTER - materials = list(MAT_GLASS = 2000, "sacid" = 20, MAT_PHORON = 3000, MAT_URANIUM = 2000) - build_path = "/obj/item/circuitboard/rust_core" -*/ diff --git a/code/modules/research/designs/weapons.dm b/code/modules/research/designs/weapons.dm index c7fd7c2b13fc..7811404687bb 100644 --- a/code/modules/research/designs/weapons.dm +++ b/code/modules/research/designs/weapons.dm @@ -1,961 +1,839 @@ -/datum/design/item/weapon/AssembleDesignName() - ..() - name = "Weapon prototype ([item_name])" +/datum/design/science/weapon + abstract_type = /datum/design/science/weapon -/datum/design/item/weapon/ammo/AssembleDesignName() - ..() - name = "Weapon ammo prototype ([item_name])" +/datum/design/science/weapon/generate_name(template) + return "Weapon prototype ([..()])" -/datum/design/item/weapon/AssembleDesignDesc() - if(!desc) - if(build_path) - var/obj/item/I = build_path - desc = initial(I.desc) - ..() +/datum/design/science/weapon/ammo + abstract_type = /datum/design/science/weapon/ammo -// Energy weapons +/datum/design/science/weapon/ammo/generate_name(template) + return "Weapon ammo ([..()])" -/datum/design/item/weapon/energy/AssembleDesignName() - ..() - name = "Energy weapon prototype ([item_name])" +/datum/design/science/weapon/energy + abstract_type = /datum/design/science/weapon/energy -/datum/design/item/weapon/energy/stunrevolver +/datum/design/science/weapon/energy/generate_name(template) + return "Energy weapon prototype ([..()])" + +/datum/design/science/weapon/energy/stunrevolver id = "stunrevolver" req_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3, TECH_POWER = 2) materials = list(MAT_STEEL = 4000) build_path = /obj/item/gun/energy/stunrevolver - sort_string = "MAAAA" -/datum/design/item/weapon/energy/nuclear_gun +/datum/design/science/weapon/energy/nuclear_gun id = "nuclear_gun" req_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 5, TECH_POWER = 3) materials = list(MAT_STEEL = 5000, MAT_GLASS = 1000, MAT_URANIUM = 500) build_path = /obj/item/gun/energy/gun/nuclear - sort_string = "MAAAB" -/datum/design/item/weapon/energy/phoronpistol +/datum/design/science/weapon/energy/phoronpistol id = "ppistol" req_tech = list(TECH_COMBAT = 5, TECH_PHORON = 4) materials = list(MAT_STEEL = 5000, MAT_GLASS = 1000, MAT_PHORON = 3000) build_path = /obj/item/gun/energy/toxgun - sort_string = "MAAAC" -/datum/design/item/weapon/energy/lasercannon +/datum/design/science/weapon/energy/lasercannon desc = "The lasing medium of this prototype is enclosed in a tube lined with uranium-235 and subjected to high neutron flux in a nuclear reactor core." id = "lasercannon" req_tech = list(TECH_COMBAT = 4, TECH_MATERIAL = 3, TECH_POWER = 3) materials = list(MAT_STEEL = 10000, MAT_GLASS = 1000, MAT_DIAMOND = 2000) build_path = /obj/item/gun/energy/lasercannon - sort_string = "MAAAD" -/datum/design/item/weapon/energy/decloner +/datum/design/science/weapon/energy/decloner id = "decloner" req_tech = list(TECH_COMBAT = 8, TECH_MATERIAL = 7, TECH_BIO = 5, TECH_POWER = 6) materials = list(MAT_GOLD = 5000,MAT_URANIUM = 10000) build_path = /obj/item/gun/energy/decloner - sort_string = "MAAAE" -/datum/design/item/weapon/energy/temp_gun +/datum/design/science/weapon/energy/temp_gun desc = "A gun that shoots high-powered glass-encased energy temperature bullets." id = "temp_gun" req_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 4, TECH_POWER = 3, TECH_MAGNET = 2) materials = list(MAT_STEEL = 5000, MAT_GLASS = 500, MAT_SILVER = 3000) build_path = /obj/item/gun/energy/temperature - sort_string = "MAAAF" -/datum/design/item/weapon/energy/flora_gun +/datum/design/science/weapon/energy/flora_gun id = "flora_gun" req_tech = list(TECH_MATERIAL = 2, TECH_BIO = 3, TECH_POWER = 3) materials = list(MAT_STEEL = 2000, MAT_GLASS = 500, MAT_URANIUM = 500) build_path = /obj/item/gun/energy/floragun - sort_string = "MAAAG" -// Ballistic weapons +/datum/design/science/weapon/ballistic + abstract_type = /datum/design/science/weapon/ballistic -/datum/design/item/weapon/ballistic/AssembleDesignName() - ..() - name = "Ballistic weapon prototype ([item_name])" +/datum/design/science/weapon/ballistic/generate_name(template) + return "Ballistic weapon prototype ([..()])" -/datum/design/item/weapon/ballistic/advanced_smg +/datum/design/science/weapon/ballistic/advanced_smg id = "smg" desc = "An advanced 9mm SMG with a reflective laser optic." req_tech = list(TECH_COMBAT = 4, TECH_MATERIAL = 3) materials = list(MAT_STEEL = 8000, MAT_SILVER = 2000, MAT_DIAMOND = 1000) build_path = /obj/item/gun/ballistic/automatic/advanced_smg - sort_string = "MABAA" -/datum/design/item/weapon/ballistic/p90 +/datum/design/science/weapon/ballistic/p90 id = "p90" desc = "The H90K is a compact, large capacity submachine gun produced by Hephaestus Industries. Despite its fierce reputation, it still manages to feel like a toy. Uses 9mm rounds." req_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 4) materials = list(MAT_STEEL = 5000, MAT_PLASTIC = 5000, MAT_URANIUM = 1000) build_path = /obj/item/gun/ballistic/automatic/p90 - sort_string = "MABAB" -// Ballistic ammo +/datum/design/science/weapon/ballistic/ammo + abstract_type = /datum/design/science/weapon/ballistic/ammo -/datum/design/item/weapon/ballistic/ammo/AssembleDesignName() - ..() - name = "Ballistic weapon ammo prototype ([name])" +/datum/design/science/weapon/ballistic/ammo/generate_name(template) + return "Ballistic weapon ammo ([..()])" -/datum/design/item/weapon/ballistic/ammo/ammo_9mmAdvanced - name = "9mm magazine" +/datum/design/science/weapon/ballistic/ammo/ammo_9mmAdvanced + design_name = "9mm magazine" id = "ammo_9mm" desc = "A 21 round magazine for an advanced 9mm SMG." req_tech = list(TECH_COMBAT = 4, TECH_MATERIAL = 3) materials = list(MAT_STEEL = 3750, MAT_SILVER = 100) // Requires silver for proprietary magazines! Or something. build_path = /obj/item/ammo_magazine/m9mmAdvanced - sort_string = "MABBA" -/datum/design/item/weapon/ballistic/ammo/techshell - name = "unloaded tech shell" +/datum/design/science/weapon/ballistic/ammo/techshell + design_name = "unloaded tech shell" desc = "A high-tech shotgun shell which can be loaded with materials to produce unique effects." id = "techshell" req_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3) materials = list(MAT_STEEL = 500, MAT_PHORON = 200) build_path = /obj/item/ammo_casing/a12g/techshell - sort_string = "MABBB" -/datum/design/item/weapon/ballistic/ammo/stunshell - name = "stun shell" +/datum/design/science/weapon/ballistic/ammo/stunshell + design_name = "stun shell" desc = "A stunning shell for a shotgun." id = "stunshell" req_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3) materials = list(MAT_STEEL = 360, MAT_GLASS = 720) build_path = /obj/item/ammo_casing/a12g/stunshell - sort_string = "MABBC" -/datum/design/item/weapon/ballistic/ammo/m57x28mmp90 - name = "H90K magazine" +/datum/design/science/weapon/ballistic/ammo/m57x28mmp90 + design_name = "H90K magazine" desc = "A large capacity top mounted magazine (5.7x28mm armor-piercing)." id = "m57x28mmp90" req_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 4) materials = list(MAT_STEEL = 2250, MAT_PLASTIC = 1500, MAT_COPPER = 1000) build_path = /obj/item/ammo_magazine/m57x28mmp90 - sort_string = "MABBD" -/datum/design/item/weapon/ballistic/ammo/m57x28mm/ntles - name = "5.7 top-mounted magazine" +/datum/design/science/weapon/ballistic/ammo/m57x28mm + abstract_type = /datum/design/science/weapon/ballistic/ammo/m57x28mm + +/datum/design/science/weapon/ballistic/ammo/m57x28mm/ntles + design_name = "5.7 top-mounted magazine" desc = "A standard capacity sidearm magazine (5.7x28mm)." id = "ntles" req_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 4) materials = list(MAT_STEEL = 1500, MAT_COPPER = 750) build_path = /obj/item/ammo_magazine/m57x28mm/ntles - sort_string = "MABCA" -/datum/design/item/weapon/ballistic/ammo/m57x28mm/ntles/ap - name = "5.7 top-mounted magazine (AP)" +/datum/design/science/weapon/ballistic/ammo/m57x28mm/ntles/ap + design_name = "5.7 top-mounted magazine (AP)" desc = "A standard capacity sidearm magazine (5.7x28mm armor-piercing)." id = "ntlesap" materials = list(MAT_STEEL = 1500, MAT_COPPER = 1000) build_path = /obj/item/ammo_magazine/m57x28mm/ntles/ap - sort_string = "MABCB" -/datum/design/item/weapon/ballistic/ammo/m57x28mm/ntles/hp - name = "5.7 top-mounted magazine (HP)" +/datum/design/science/weapon/ballistic/ammo/m57x28mm/ntles/hp + design_name = "5.7 top-mounted magazine (HP)" desc = "A standard capacity sidearm magazine (5.7x28mm hollow point)." id = "ntleshp" materials = list(MAT_STEEL = 1500, MAT_COPPER = 750) build_path = /obj/item/ammo_magazine/m57x28mm/ntles/hp - sort_string = "MABCC" -/datum/design/item/weapon/ballistic/ammo/m57x28mm/ntles/hunter - name = "5.7 top-mounted magazine (Hunter)" +/datum/design/science/weapon/ballistic/ammo/m57x28mm/ntles/hunter + design_name = "5.7 top-mounted magazine (Hunter)" desc = "A standard capacity sidearm magazine (5.7x28mm hunter)." id = "ntleshunter" materials = list(MAT_STEEL = 1500, MAT_COPPER = 500) build_path = /obj/item/ammo_magazine/m57x28mm/ntles/hunter - sort_string = "MABCD" -/datum/design/item/weapon/ballistic/ammo/m57x28mm/ntles/highcap - name = "5.7 highcap top-mounted magazine" +/datum/design/science/weapon/ballistic/ammo/m57x28mm/ntles/highcap + design_name = "5.7 highcap top-mounted magazine" desc = "A high capacity sidearm magazine (5.7x28mm)." id = "ntleshc" req_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 4) materials = list(MAT_STEEL = 2500, MAT_COPPER = 2000) build_path = /obj/item/ammo_magazine/m57x28mm/ntles/highcap - sort_string = "MABDA" -/datum/design/item/weapon/ballistic/ammo/m57x28mm/ntles/highcap/ap - name = "5.7 highcap top-mounted magazine (AP)" +/datum/design/science/weapon/ballistic/ammo/m57x28mm/ntles/highcap/ap + design_name = "5.7 highcap top-mounted magazine (AP)" desc = "A high capacity sidearm magazine (5.7x28mm armor-piercing)." id = "ntleshcap" materials = list(MAT_STEEL = 2500, MAT_COPPER = 2500) build_path = /obj/item/ammo_magazine/m57x28mm/ntles/highcap/ap - sort_string = "MABDB" -/datum/design/item/weapon/ballistic/ammo/m57x28mm/ntles/highcap/hp - name = "5.7 highcap top-mounted magazine (HP)" +/datum/design/science/weapon/ballistic/ammo/m57x28mm/ntles/highcap/hp + design_name = "5.7 highcap top-mounted magazine (HP)" desc = "A high capacity sidearm magazine (5.7x28mm hollow point)." id = "ntleshchp" materials = list(MAT_STEEL = 2500, MAT_COPPER = 2000) build_path = /obj/item/ammo_magazine/m57x28mm/ntles/highcap/hp - sort_string = "MABDC" -/datum/design/item/weapon/ballistic/ammo/m57x28mm/ntles/highcap/hunter - name = "5.7 highcap top-mounted magazine (Hunter)" +/datum/design/science/weapon/ballistic/ammo/m57x28mm/ntles/highcap/hunter + design_name = "5.7 highcap top-mounted magazine (Hunter)" desc = "A high capacity sidearm magazine (5.7x28mm hunter)." id = "ntleshchunter" materials = list(MAT_STEEL = 2500, MAT_COPPER = 1750) build_path = /obj/item/ammo_magazine/m57x28mm/ntles/highcap/hunter - sort_string = "MABDD" -/datum/design/item/weapon/ballistic/ammo/m57x28mm/fiveseven - name = "5.7 sidearm magazine" +/datum/design/science/weapon/ballistic/ammo/m57x28mm/fiveseven + design_name = "5.7 sidearm magazine" desc = "A standard capacity sidearm magazine (5.7x28mm)." id = "fiveseven" req_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 4) materials = list(MAT_STEEL = 1250, MAT_COPPER = 750) build_path = /obj/item/ammo_magazine/m57x28mm/fiveseven - sort_string = "MABEA" -/datum/design/item/weapon/ballistic/ammo/m57x28mm/fiveseven/ap - name = "5.7 sidearm magazine (AP)" +/datum/design/science/weapon/ballistic/ammo/m57x28mm/fiveseven/ap + design_name = "5.7 sidearm magazine (AP)" desc = "A standard capacity sidearm magazine (5.7x28mm armor-piercing)." id = "fivesevenap" materials = list(MAT_STEEL = 1250, MAT_COPPER = 1000) build_path = /obj/item/ammo_magazine/m57x28mm/fiveseven/ap - sort_string = "MABEB" -/datum/design/item/weapon/ballistic/ammo/m57x28mm/fiveseven/hp - name = "5.7 sidearm magazine (HP)" +/datum/design/science/weapon/ballistic/ammo/m57x28mm/fiveseven/hp + design_name = "5.7 sidearm magazine (HP)" desc = "A standard capacity sidearm magazine (5.7x28mm hollow point)." id = "fivesevenhp" materials = list(MAT_STEEL = 1250, MAT_COPPER = 750) build_path = /obj/item/ammo_magazine/m57x28mm/fiveseven/hp - sort_string = "MABEC" -/datum/design/item/weapon/ballistic/ammo/m57x28mm/fiveseven/hunter - name = "5.7 sidearm magazine (Hunter)" +/datum/design/science/weapon/ballistic/ammo/m57x28mm/fiveseven/hunter + design_name = "5.7 sidearm magazine (Hunter)" desc = "A standard capacity sidearm magazine (5.7x28mm hunter)." id = "fivesevenhunter" materials = list(MAT_STEEL = 1250, MAT_COPPER = 250) build_path = /obj/item/ammo_magazine/m57x28mm/fiveseven/hunter - sort_string = "MABED" -/datum/design/item/weapon/ballistic/ammo/m57x28mm/fiveseven/highcap - name = "5.7 sidearm high-cap magazine" +/datum/design/science/weapon/ballistic/ammo/m57x28mm/fiveseven/highcap + design_name = "5.7 sidearm high-cap magazine" desc = "A high capacity sidearm magazine (5.7x28mm)." id = "fivesevenhc" req_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 4) materials = list(MAT_STEEL = 2000, MAT_COPPER = 750) build_path = /obj/item/ammo_magazine/m57x28mm/fiveseven/highcap - sort_string = "MABFA" -/datum/design/item/weapon/ballistic/ammo/m57x28mm/fiveseven/highcap/ap - name = "5.7 sidearm high-cap magazine (AP)" +/datum/design/science/weapon/ballistic/ammo/m57x28mm/fiveseven/highcap/ap + design_name = "5.7 sidearm high-cap magazine (AP)" desc = "A high capacity sidearm magazine (5.7x28mm armor-piercing)." id = "fivesevenhcap" materials = list(MAT_STEEL = 2500, MAT_COPPER = 1000) build_path = /obj/item/ammo_magazine/m57x28mm/fiveseven/highcap/ap - sort_string = "MABFB" -/datum/design/item/weapon/ballistic/ammo/m57x28mm/fiveseven/highcap/hp - name = "5.7 sidearm high-cap magazine (HP)" +/datum/design/science/weapon/ballistic/ammo/m57x28mm/fiveseven/highcap/hp + design_name = "5.7 sidearm high-cap magazine (HP)" desc = "A high capacity sidearm magazine (5.7x28mm hollow point)." id = "fivesevenhchp" materials = list(MAT_STEEL = 2000, MAT_COPPER = 750) build_path = /obj/item/ammo_magazine/m57x28mm/fiveseven/highcap/hp - sort_string = "MABFC" -/datum/design/item/weapon/ballistic/ammo/m57x28mm/fiveseven/highcap/hunter - name = "5.7 sidearm high-cap magazine (Hunter)" +/datum/design/science/weapon/ballistic/ammo/m57x28mm/fiveseven/highcap/hunter + design_name = "5.7 sidearm high-cap magazine (Hunter)" desc = "A high capacity sidearm magazine (5.7x28mm hunter)." id = "fivesevenhchunter" materials = list(MAT_STEEL = 2000, MAT_COPPER = 500) build_path = /obj/item/ammo_magazine/m57x28mm/fiveseven/highcap/hunter - sort_string = "MABFD" -// Phase weapons +/datum/design/science/weapon/phase + abstract_type = /datum/design/science/weapon/phase -/datum/design/item/weapon/phase/AssembleDesignName() - ..() - name = "Phase weapon prototype ([item_name])" +/datum/design/science/weapon/phase/generate_name(template) + return "Phase weapon prototype ([..()])" -/datum/design/item/weapon/phase/phase_pistol +/datum/design/science/weapon/phase/phase_pistol id = "phasepistol" req_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 2, TECH_POWER = 2) materials = list(MAT_STEEL = 4000) build_path = /obj/item/gun/energy/phasegun/pistol - sort_string = "MACAA" -/datum/design/item/weapon/phase/phase_carbine +/datum/design/science/weapon/phase/phase_carbine id = "phasecarbine" req_tech = list(TECH_COMBAT = 4, TECH_MATERIAL = 2, TECH_POWER = 2) materials = list(MAT_STEEL = 6000, MAT_GLASS = 1500) build_path = /obj/item/gun/energy/phasegun - sort_string = "MACAB" -/datum/design/item/weapon/phase/phase_rifle +/datum/design/science/weapon/phase/phase_rifle id = "phaserifle" req_tech = list(TECH_COMBAT = 4, TECH_MATERIAL = 3, TECH_POWER = 3) materials = list(MAT_STEEL = 7000, MAT_GLASS = 2000, MAT_SILVER = 500) build_path = /obj/item/gun/energy/phasegun/rifle - sort_string = "MACAC" -/datum/design/item/weapon/phase/phase_cannon +/datum/design/science/weapon/phase/phase_cannon id = "phasecannon" req_tech = list(TECH_COMBAT = 4, TECH_MATERIAL = 4, TECH_POWER = 4) materials = list(MAT_STEEL = 10000, MAT_GLASS = 2000, MAT_SILVER = 1000, MAT_DIAMOND = 750) build_path = /obj/item/gun/energy/phasegun/cannon - sort_string = "MACAD" // Other weapons -/datum/design/item/weapon/rapidsyringe +/datum/design/science/weapon/rapidsyringe id = "rapidsyringe" req_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3, TECH_ENGINEERING = 3, TECH_BIO = 2) materials = list(MAT_STEEL = 5000, MAT_GLASS = 1000) build_path = /obj/item/gun/launcher/syringe/rapid - sort_string = "MADAA" -/datum/design/item/weapon/dartgun +/datum/design/science/weapon/dartgun desc = "A gun that fires small hollow chemical-payload darts." id = "dartgun_r" req_tech = list(TECH_COMBAT = 6, TECH_MATERIAL = 4, TECH_BIO = 4, TECH_MAGNET = 3, TECH_ILLEGAL = 1) materials = list(MAT_STEEL = 5000, MAT_GOLD = 5000, MAT_SILVER = 2500, MAT_GLASS = 750) build_path = /obj/item/gun/ballistic/dartgun/research - sort_string = "MADAB" -/datum/design/item/weapon/chemsprayer +/datum/design/science/weapon/chemsprayer desc = "An advanced chem spraying device." id = "chemsprayer" req_tech = list(TECH_MATERIAL = 3, TECH_ENGINEERING = 3, TECH_BIO = 2) materials = list(MAT_STEEL = 5000, MAT_GLASS = 1000) build_path = /obj/item/reagent_containers/spray/chemsprayer - sort_string = "MADAC" -/datum/design/item/weapon/fuelrod +/datum/design/science/weapon/fuelrod id = "fuelrod_gun" req_tech = list(TECH_COMBAT = 6, TECH_MATERIAL = 4, TECH_PHORON = 4, TECH_ILLEGAL = 5, TECH_MAGNET = 5) materials = list(MAT_STEEL = 10000, MAT_GLASS = 2000, MAT_GOLD = 500, MAT_SILVER = 500, MAT_URANIUM = 1000, MAT_PHORON = 3000, MAT_DIAMOND = 1000) build_path = /obj/item/gun/magnetic/fuelrod - sort_string = "MADAD" // Ammo for those -/datum/design/item/weapon/ammo/dartgunmag_small +/datum/design/science/weapon/ammo/dartgunmag_small id = "dartgun_mag_s" req_tech = list(TECH_COMBAT = 6, TECH_MATERIAL = 2, TECH_BIO = 2, TECH_MAGNET = 1, TECH_ILLEGAL = 1) materials = list(MAT_STEEL = 300, MAT_GOLD = 100, MAT_SILVER = 100, MAT_GLASS = 300) build_path = /obj/item/ammo_magazine/chemdart/small - sort_string = "MADBA" -/datum/design/item/weapon/ammo/dartgun_ammo_small +/datum/design/science/weapon/ammo/dartgun_ammo_small id = "dartgun_ammo_s" req_tech = list(TECH_COMBAT = 6, TECH_MATERIAL = 2, TECH_BIO = 2, TECH_MAGNET = 1, TECH_ILLEGAL = 1) materials = list(MAT_STEEL = 50, MAT_GOLD = 30, MAT_SILVER = 30, MAT_GLASS = 50) build_path = /obj/item/ammo_casing/chemdart/small - sort_string = "MADBB" -/datum/design/item/weapon/ammo/dartgunmag_med +/datum/design/science/weapon/ammo/dartgunmag_med id = "dartgun_mag_m" req_tech = list(TECH_COMBAT = 7, TECH_MATERIAL = 2, TECH_BIO = 2, TECH_MAGNET = 1, TECH_ILLEGAL = 1) materials = list(MAT_STEEL = 500, MAT_GOLD = 150, MAT_SILVER = 150, MAT_DIAMOND = 200, MAT_GLASS = 400) build_path = /obj/item/ammo_magazine/chemdart - sort_string = "MADBC" -/datum/design/item/weapon/ammo/dartgun_ammo_med +/datum/design/science/weapon/ammo/dartgun_ammo_med id = "dartgun_ammo_m" req_tech = list(TECH_COMBAT = 7, TECH_MATERIAL = 2, TECH_BIO = 2, TECH_MAGNET = 1, TECH_ILLEGAL = 1) materials = list(MAT_STEEL = 80, MAT_GOLD = 40, MAT_SILVER = 40, MAT_GLASS = 60) build_path = /obj/item/ammo_casing/chemdart - sort_string = "MADBD" -// Melee weapons +/datum/design/science/weapon/melee + abstract_type = /datum/design/science/weapon/melee -/datum/design/item/weapon/melee/AssembleDesignName() - ..() - name = "Melee weapon prototype ([item_name])" +/datum/design/science/weapon/melee/generate_name(template) + return "Melee weapon prototype ([..()])" -/datum/design/item/weapon/melee/esword - name = "Portable Energy Blade" +/datum/design/science/weapon/melee/esword + design_name = "Portable Energy Blade" id = "chargesword" req_tech = list(TECH_COMBAT = 6, TECH_MAGNET = 4, TECH_ENGINEERING = 5, TECH_ILLEGAL = 4, TECH_ARCANE = 1) materials = list(MAT_PLASTEEL = 3500, MAT_GLASS = 1000, MAT_LEAD = 2250, MAT_METALHYDROGEN = 500) build_path = /obj/item/melee/energy/sword/charge - sort_string = "MBAAA" -/datum/design/item/weapon/melee/eaxe - name = "Energy Axe" +/datum/design/science/weapon/melee/eaxe + design_name = "Energy Axe" id = "chargeaxe" req_tech = list(TECH_COMBAT = 6, TECH_MAGNET = 5, TECH_ENGINEERING = 4, TECH_ILLEGAL = 4) materials = list(MAT_PLASTEEL = 3500, MAT_OSMIUM = 2000, MAT_LEAD = 2000, MAT_METALHYDROGEN = 500) build_path = /obj/item/melee/energy/axe/charge - sort_string = "MBAAB" -// Grenade stuff -/datum/design/item/weapon/grenade/AssembleDesignName() - ..() - name = "Grenade casing prototype ([item_name])" +/datum/design/science/weapon/grenade + abstract_type = /datum/design/science/weapon/grenade -/datum/design/item/weapon/grenade/large_grenade +/datum/design/science/weapon/grenade/generate_name(template) + return "Grenade casing prototype ([..()])" + +/datum/design/science/weapon/grenade/large_grenade id = "large_Grenade" req_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 2) materials = list(MAT_STEEL = 3000) build_path = /obj/item/grenade/chem_grenade/large - sort_string = "MCAAA" - -/* - MAU - AP weapons - MAV - cell-loaded weapons - MAVA - weapon - MAVB - cartridge - MAVC - cells - MAVD - modular energy weps - MAVE - modular energy weapon modules -*/ - - -// Energy Weapons -//Commenting this weapon out pending further review. -/* -/datum/design/item/weapon/energy/protector - name = "\'Myrmidon\' code-locked e-gun" - desc = "The 'Myrmidon' is a common energy gun that cannot fired lethally on Code Green, requiring Code Blue or higher to unlock its deadly capabilities." - id = "protector" - req_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 3, TECH_MAGNET = 2) - materials = list(MAT_STEEL = 4000, MAT_GLASS = 2000, MAT_SILVER = 1000) - build_path = /obj/item/gun/energy/protector - sort_string = "MAAAH" -*/ - -/datum/design/item/weapon/energy/netgun - name = "\'Retiarius\' capture gun" +/datum/design/science/weapon/energy/netgun + design_name = "\'Retiarius\' capture gun" id = "netgun" req_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 5, TECH_MAGNET = 3) materials = list(MAT_STEEL = 6000, MAT_GLASS = 3000) build_path = /obj/item/gun/energy/netgun - sort_string = "MAAAI" -/datum/design/item/weapon/energy/sickshot +/datum/design/science/weapon/energy/sickshot desc = "The 'Discombobulator' is a 4-shot energy revolver that causes nausea and confusion." id = "sickshot" req_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3, TECH_MAGNET = 2) materials = list(MAT_STEEL = 3000, MAT_GLASS = 2000) build_path = /obj/item/gun/energy/sickshot - sort_string = "MAAAJ" - -// Misc weapons -/datum/design/item/weapon/pummeler +/datum/design/science/weapon/pummeler desc = "With the 'Pummeler', punt anyone you don't like out of the room!" id = "pummeler" req_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3, TECH_MAGNET = 5) materials = list(MAT_STEEL = 3000, MAT_GLASS = 3000, MAT_URANIUM = 1000) build_path = /obj/item/gun/energy/pummeler - sort_string = "MAAAK" -// Anti-particle stuff +/datum/design/science/weapon/particle + abstract_type = /datum/design/science/weapon/particle -/datum/design/item/weapon/particle/AssembleDesignName() - ..() - name = "Anti-particle weapon prototype ([item_name])" +/datum/design/science/weapon/particle/generate_name(template) + return "Anti-particle weapon prototype ([..()])" -/datum/design/item/weapon/particle/advparticle - name = "Advanced anti-particle rifle" +/datum/design/science/weapon/particle/advparticle + design_name = "Advanced anti-particle rifle" id = "advparticle" req_tech = list(TECH_COMBAT = 4, TECH_MATERIAL = 5, TECH_POWER = 3, TECH_MAGNET = 3) materials = list(MAT_STEEL = 5000, MAT_GLASS = 1000, MAT_GOLD = 1000, MAT_URANIUM = 750) build_path = /obj/item/gun/energy/particle/advanced - sort_string = "MAAUA" -/datum/design/item/weapon/particle/particlecannon - name = "Anti-particle cannon" +/datum/design/science/weapon/particle/particlecannon + design_name = "Anti-particle cannon" id = "particlecannon" req_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 5, TECH_POWER = 4, TECH_MAGNET = 4) materials = list(MAT_STEEL = 10000, MAT_GLASS = 1500, MAT_GOLD = 2000, MAT_URANIUM = 1000, MAT_DIAMOND = 2000) build_path = /obj/item/gun/energy/particle/cannon - sort_string = "MAAUB" -/datum/design/item/weapon/particle/pressureinterlock - name = "APP pressure interlock" +/datum/design/science/weapon/particle/pressureinterlock + design_name = "APP pressure interlock" id = "pressureinterlock" req_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 2) materials = list(MAT_STEEL = 1000, MAT_GLASS = 250) build_path = /obj/item/pressurelock - sort_string = "MAAUC" -// NSFW gun and cells -/datum/design/item/weapon/cell_based/AssembleDesignName() - ..() - name = "Cell-based weapon prototype ([item_name])" +/datum/design/science/weapon/cell_based + abstract_type = /datum/design/science/weapon/cell_based -/datum/design/item/weapon/cell_based/prototype_nsfw - name = "cell-loaded revolver" +/datum/design/science/weapon/cell_based/generate_name(template) + return "Cell-based weapon prototype ([..()])" + +/datum/design/science/weapon/cell_based/prototype_nsfw + design_name = "cell-loaded revolver" id = "nsfw_prototype" req_tech = list(TECH_MATERIAL = 6, TECH_MAGNET = 4, TECH_POWER = 4, TECH_COMBAT = 7) materials = list(MAT_STEEL = 10000, MAT_GLASS = 6000, MAT_PHORON = 8000, MAT_URANIUM = 4000) build_path = /obj/item/gun/ballistic/cell_loaded/combat/prototype - sort_string = "MAVAA" -/datum/design/item/weapon/cell_based/prototype_nsfw_mag - name = "combat cell magazine" +/datum/design/science/weapon/cell_based/prototype_nsfw_mag + design_name = "combat cell magazine" id = "nsfw_mag_prototype" req_tech = list(TECH_MATERIAL = 6, TECH_MAGNET = 4, TECH_POWER = 4, TECH_COMBAT = 7) materials = list(MAT_STEEL = 8000, MAT_GLASS = 4000, MAT_PHORON = 4000) build_path = /obj/item/ammo_magazine/cell_mag/combat/prototype - sort_string = "MAVBA" -/datum/design/item/nsfw_cell/AssembleDesignName() - ..() - name = "Microbattery prototype ([name])" +/datum/design/science/nsfw_cell + abstract_type = /datum/design/science/nsfw_cell + +/datum/design/science/nsfw_cell/generate_name(template) + return "Microbattery prototype ([..()])" -/datum/design/item/nsfw_cell/stun - name = "STUN" +/datum/design/science/nsfw_cell/stun + design_name = "STUN" id = "nsfw_cell_stun" req_tech = list(TECH_MATERIAL = 4, TECH_MAGNET = 2, TECH_POWER = 3, TECH_COMBAT = 3) materials = list(MAT_STEEL = 5000, MAT_GLASS = 5000) build_path = /obj/item/ammo_casing/microbattery/combat/stun - sort_string = "MAVCA" -/datum/design/item/nsfw_cell/lethal - name = "LETHAL" +/datum/design/science/nsfw_cell/lethal + design_name = "LETHAL" id = "nsfw_cell_lethal" req_tech = list(TECH_MATERIAL = 4, TECH_MAGNET = 3, TECH_POWER = 3, TECH_COMBAT = 5) materials = list(MAT_STEEL = 5000, MAT_GLASS = 5000, MAT_PHORON = 3000) build_path = /obj/item/ammo_casing/microbattery/combat/lethal - sort_string = "MAVCB" -/datum/design/item/nsfw_cell/net - name = "NET" +/datum/design/science/nsfw_cell/net + design_name = "NET" id = "nsfw_cell_net" req_tech = list(TECH_MATERIAL = 4, TECH_MAGNET = 3, TECH_POWER = 3, TECH_COMBAT = 4) materials = list(MAT_STEEL = 5000, MAT_GLASS = 5000, MAT_URANIUM = 3000) build_path = /obj/item/ammo_casing/microbattery/combat/net - sort_string = "MAVCC" -/datum/design/item/nsfw_cell/ion - name = "ION" +/datum/design/science/nsfw_cell/ion + design_name = "ION" id = "nsfw_cell_ion" req_tech = list(TECH_MATERIAL = 5, TECH_MAGNET = 3, TECH_POWER = 5, TECH_COMBAT = 5) materials = list(MAT_STEEL = 5000, MAT_GLASS = 5000, MAT_SILVER = 3000) build_path = /obj/item/ammo_casing/microbattery/combat/ion - sort_string = "MAVCD" -/datum/design/item/nsfw_cell/shotstun - name = "SCATTERSTUN" +/datum/design/science/nsfw_cell/shotstun + design_name = "SCATTERSTUN" id = "nsfw_cell_shotstun" req_tech = list(TECH_MATERIAL = 6, TECH_MAGNET = 3, TECH_POWER = 6, TECH_COMBAT = 6) materials = list(MAT_STEEL = 5000, MAT_GLASS = 5000, MAT_SILVER = 2000, MAT_GOLD = 2000) build_path = /obj/item/ammo_casing/microbattery/combat/shotstun - sort_string = "MAVCE" -/datum/design/item/nsfw_cell/xray - name = "XRAY" +/datum/design/science/nsfw_cell/xray + design_name = "XRAY" id = "nsfw_cell_xray" req_tech = list(TECH_MATERIAL = 6, TECH_MAGNET = 4, TECH_POWER = 5, TECH_COMBAT = 7) materials = list(MAT_STEEL = 5000, MAT_GLASS = 5000, MAT_SILVER = 1000, MAT_GOLD = 1000, MAT_URANIUM = 1000, MAT_PHORON = 1000) build_path = /obj/item/ammo_casing/microbattery/combat/xray - sort_string = "MAVCF" -/datum/design/item/nsfw_cell/stripper - name = "STRIPPER" +/datum/design/science/nsfw_cell/stripper + design_name = "STRIPPER" id = "nsfw_cell_stripper" req_tech = list(TECH_MATERIAL = 7, TECH_BIO = 4, TECH_POWER = 4, TECH_COMBAT = 4, TECH_ILLEGAL = 5) materials = list(MAT_STEEL = 5000, MAT_GLASS = 5000, MAT_URANIUM = 2000, MAT_PHORON = 2000, MAT_DIAMOND = 500) build_path = /obj/item/ammo_casing/microbattery/combat/stripper - sort_string = "MAVCG" +/datum/design/science/modweapon + abstract_type = /datum/design/science/modweapon -/datum/design/item/modweapon/AssembleDesignName() - ..() - name = "Modular weapon prototype ([name])" +/datum/design/science/modweapon/generate_name(template) + return "Modular weapon prototype ([..()])" -/datum/design/item/modweapon/basic - name = "modular energy pistol" +/datum/design/science/modweapon/basic + design_name = "modular energy pistol" id = "modpistol" req_tech = list(TECH_MATERIAL = 4, TECH_MAGNET = 3, TECH_POWER = 3, TECH_COMBAT = 3) materials = list(MAT_STEEL = 5000, MAT_GLASS = 5000, MAT_SILVER = 3000) build_path = /obj/item/gun/energy/modular/basic - sort_string = "MAVDA" /* -/datum/design/item/modweapon/adv - name = "advanced modular energy pistol" +/datum/design/science/modweapon/adv + design_name = "advanced modular energy pistol" id = "advmodpistol" req_tech = list(TECH_MATERIAL = 6, TECH_MAGNET = 5, TECH_POWER = 5, TECH_COMBAT = 5) materials = list(MAT_STEEL = 6000, MAT_GLASS = 6000, MAT_SILVER = 3000, MAT_GOLD = 2000, MAT_URANIUM = 3000) build_path = /obj/item/gun/energy/modular/advanced - sort_string = "MAVDB" */ -/datum/design/item/modweapon/carbine - name = "modular energy carbine" +/datum/design/science/modweapon/carbine + design_name = "modular energy carbine" id = "modcarbine" req_tech = list(TECH_MATERIAL = 6, TECH_MAGNET = 5, TECH_POWER = 5, TECH_COMBAT = 5) materials = list(MAT_STEEL = 8000, MAT_GLASS = 8000, MAT_URANIUM = 2000, MAT_GOLD = 4000, MAT_DIAMOND = 500) build_path = /obj/item/gun/energy/modular/carbine - sort_string = "MAVDC" -/datum/design/item/modweapon/rifle - name = "modular energy rifle" +/datum/design/science/modweapon/rifle + design_name = "modular energy rifle" id = "modrifle" req_tech = list(TECH_MATERIAL = 6, TECH_MAGNET = 5, TECH_POWER = 5, TECH_COMBAT = 5) materials = list(MAT_STEEL = 12000, MAT_GLASS = 12000, MAT_SILVER = 6000, MAT_GOLD = 6000, MAT_URANIUM = 4000, MAT_DIAMOND = 500) build_path = /obj/item/gun/energy/modular/rifle - sort_string = "MAVDD" -/datum/design/item/modweapon/tririfle - name = "tri-core modular energy rifle" +/datum/design/science/modweapon/tririfle + design_name = "tri-core modular energy rifle" id = "threemodrifle" req_tech = list(TECH_MATERIAL = 7, TECH_MAGNET = 5, TECH_POWER = 5, TECH_COMBAT = 5) materials = list(MAT_STEEL = 12000, MAT_GLASS = 12000, MAT_SILVER = 6000, MAT_GOLD = 6000, MAT_URANIUM = 4000, MAT_DIAMOND = 1500) build_path = /obj/item/gun/energy/modular/rifle/tribeam - sort_string = "MAVDE" /* -/datum/design/item/modweapon/compact - name = "compact modular energy pistol" +/datum/design/science/modweapon/compact + design_name = "compact modular energy pistol" id = "modcompact" req_tech = list(TECH_MATERIAL = 7, TECH_MAGNET = 6, TECH_POWER = 6, TECH_COMBAT = 5) materials = list(MAT_STEEL = 5000, MAT_GLASS = 5000, MAT_DIAMOND = 3000) build_path = /obj/item/gun/energy/modular/compact - sort_string = "MAVDF" -/datum/design/item/modweapon/scatter - name = "modular energy scattergun" +/datum/design/science/modweapon/scatter + design_name = "modular energy scattergun" id = "modscatter" req_tech = list(TECH_MATERIAL = 7, TECH_MAGNET = 6, TECH_POWER = 6, TECH_COMBAT = 5, TECH_ILLEGAL = 4) materials = list(MAT_STEEL = 12000, MAT_GLASS = 12000, MAT_SILVER = 6000, MAT_GOLD = 6000, MAT_URANIUM = 4000, MAT_DIAMOND = 2000) build_path = /obj/item/gun/energy/modular/rifle/scatter - sort_string = "MAVDG" -/datum/design/item/modweapon/cannon - name = "modular energy cannon" +/datum/design/science/modweapon/cannon + design_name = "modular energy cannon" id = "modcannon" req_tech = list(TECH_MATERIAL = 6, TECH_MAGNET = 6, TECH_POWER = 6, TECH_COMBAT = 6, TECH_ENGINEERING = 6) materials = list(MAT_STEEL = 12000, MAT_GLASS = 12000, MAT_SILVER = 6000, MAT_GOLD = 6000, MAT_URANIUM = 4000, MAT_DIAMOND = 4000) build_path = /obj/item/gun/energy/modular/cannon - sort_string = "MAVDH" */ -/datum/design/item/modweapon/nuclear - name = "modular AEG" +/datum/design/science/modweapon/nuclear + design_name = "modular AEG" id = "modAEG" req_tech = list(TECH_MATERIAL = 6, TECH_MAGNET = 6, TECH_POWER = 6, TECH_COMBAT = 6, TECH_ENGINEERING = 6, TECH_BLUESPACE = 4) materials = list(MAT_STEEL = 12000, MAT_GLASS = 12000, MAT_SILVER = 6000, MAT_LEAD = 20000, MAT_URANIUM = 20000, MAT_DIAMOND = 4000) build_path = /obj/item/gun/energy/modular/nuke - sort_string = "MAVDG" -/datum/design/item/modweaponnodule/AssembleDesignName() - ..() - name = "Modular weapon module design ([name])" +/datum/design/science/modweaponnodule + abstract_type = /datum/design/science/modweaponnodule -/datum/design/item/modweaponnodule/stunmedium - name = "stun medium" +/datum/design/science/modweaponnodule/generate_name(template) + return "Modular weapon module design ([..()])" + +/datum/design/science/modweaponnodule/stunmedium + design_name = "stun medium" id = "stunmedium" req_tech = list(TECH_MAGNET = 3, TECH_POWER = 3, TECH_COMBAT = 2) materials = list(MAT_STEEL = 8000, MAT_GLASS = 8000, MAT_GOLD = 4000) build_path = /obj/item/modularlaser/lasermedium/stun - sort_string = "MAVEA" -/datum/design/item/modweaponnodule/stunweak - name = "weak stun medium" +/datum/design/science/modweaponnodule/stunweak + design_name = "weak stun medium" id = "stunweak" req_tech = list(TECH_MAGNET = 1, TECH_POWER = 2, TECH_COMBAT = 1) materials = list(MAT_STEEL = 8000, MAT_GLASS = 8000) build_path = /obj/item/modularlaser/lasermedium/stun/weak - sort_string = "MAVEB" /* -/datum/design/item/modweaponnodule/netmedium - name = "net projector medium" +/datum/design/science/modweaponnodule/netmedium + design_name = "net projector medium" id = "netmedium" req_tech = list(TECH_MAGNET = 5, TECH_POWER = 5, TECH_COMBAT = 5) materials = list(MAT_STEEL = 8000, MAT_GLASS = 8000, MAT_GOLD = 4000, MAT_URANIUM = 2000) build_path = /obj/item/modularlaser/lasermedium/net - sort_string = "MAVEC" */ -/datum/design/item/modweaponnodule/electrode - name = "electrode projector tube" +/datum/design/science/modweaponnodule/electrode + design_name = "electrode projector tube" id = "electrodetube" req_tech = list(TECH_MAGNET = 2, TECH_POWER = 3, TECH_COMBAT = 2) materials = list(MAT_STEEL = 8000, MAT_GLASS = 8000) build_path = /obj/item/modularlaser/lasermedium/electrode - sort_string = "MAVED" -/datum/design/item/modweaponnodule/laser - name = "laser medium" +/datum/design/science/modweaponnodule/laser + design_name = "laser medium" id = "lasermedium" req_tech = list(TECH_MAGNET = 5, TECH_POWER = 5, TECH_COMBAT = 2) materials = list(MAT_STEEL = 8000, MAT_GLASS = 8000, MAT_URANIUM = 2000, MAT_SILVER = 4000) build_path = /obj/item/modularlaser/lasermedium/laser - sort_string = "MAVEE" -/datum/design/item/modweaponnodule/weaklaser - name = "low-power laser medium" +/datum/design/science/modweaponnodule/weaklaser + design_name = "low-power laser medium" id = "weaklaser" req_tech = list(TECH_MAGNET = 3, TECH_POWER = 3, TECH_COMBAT = 2) materials = list(MAT_STEEL = 8000, MAT_GLASS = 8000) build_path = /obj/item/modularlaser/lasermedium/laser/weak - sort_string = "MAVEF" /* -/datum/design/item/modweaponnodule/sniper - name = "laser sniper medium" +/datum/design/science/modweaponnodule/sniper + design_name = "laser sniper medium" id = "sniperlaser" req_tech = list(TECH_MAGNET = 5, TECH_POWER = 6, TECH_COMBAT = 4) materials = list(MAT_STEEL = 8000, MAT_GLASS = 8000, MAT_URANIUM = 2000, MAT_DIAMOND = 10) build_path = /obj/item/modularlaser/lasermedium/laser/sniper - sort_string = "MAVEG" -/datum/design/item/modweaponnodule/heavylaser - name = "heavy laser medium" +/datum/design/science/modweaponnodule/heavylaser + design_name = "heavy laser medium" id = "heavylasermedium" req_tech = list(TECH_MAGNET = 6, TECH_POWER = 6, TECH_COMBAT = 5, TECH_ILLEGAL = 2) materials = list(MAT_STEEL = 8000, MAT_GLASS = 8000, MAT_URANIUM = 2000, MAT_GOLD = 4000, MAT_DIAMOND = 500) build_path = /obj/item/modularlaser/lasermedium/laser/heavy - sort_string = "MAVEH" -/datum/design/item/modweaponnodule/cannonmedium - name = "cannon beam medium" +/datum/design/science/modweaponnodule/cannonmedium + design_name = "cannon beam medium" id = "cannonmedium" req_tech = list(TECH_MAGNET = 5, TECH_POWER = 5, TECH_COMBAT = 5, TECH_ILLEGAL = 5) materials = list(MAT_STEEL = 8000, MAT_GLASS = 8000, MAT_URANIUM = 2000, MAT_GOLD = 4000, MAT_DIAMOND = 500) build_path = /obj/item/modularlaser/lasermedium/laser/cannon - sort_string = "MAVEI" */ -/datum/design/item/modweaponnodule/xraser - name = "xraser medium" +/datum/design/science/modweaponnodule/xraser + design_name = "xraser medium" id = "xraser" req_tech = list(TECH_MAGNET = 5, TECH_POWER = 5, TECH_COMBAT = 5, TECH_ILLEGAL = 5) materials = list(MAT_STEEL = 8000, MAT_GLASS = 8000, MAT_URANIUM = 4000, MAT_GOLD = 4000, MAT_DIAMOND = 500) build_path = /obj/item/modularlaser/lasermedium/laser/xray - sort_string = "MAVEJ" -/datum/design/item/modweaponnodule/dig - name = "excavation beam medium" +/datum/design/science/modweaponnodule/dig + design_name = "excavation beam medium" id = "digbeam" req_tech = list(TECH_MAGNET = 3, TECH_POWER = 2) materials = list(MAT_STEEL = 8000, MAT_GLASS = 8000, MAT_PLASTEEL = 500) build_path = /obj/item/modularlaser/lasermedium/dig - sort_string = "MAVEK" -/datum/design/item/modweaponnodule/lightning - name = "lightning arc tube" +/datum/design/science/modweaponnodule/lightning + design_name = "lightning arc tube" id = "lightning" req_tech = list(TECH_MAGNET = 6, TECH_POWER = 7) materials = list(MAT_STEEL = 8000, MAT_GLASS = 8000, MAT_SILVER = 4000, MAT_GOLD = 4000) build_path = /obj/item/modularlaser/lasermedium/lightning - sort_string = "MAVEL" -/datum/design/item/modweaponnodule/hook - name = "graviton grapple tube" +/datum/design/science/modweaponnodule/hook + design_name = "graviton grapple tube" id = "hook" req_tech = list(TECH_ARCANE = 4, TECH_POWER = 2) materials =list(MAT_STEEL = 8000, MAT_GLASS = 8000, MAT_MORPHIUM = 4000, MAT_VERDANTIUM = 4000) build_path = /obj/item/modularlaser/lasermedium/hook - sort_string = "MAVEM" -/datum/design/item/modweaponnodule/phasemedium - name = "phase projector tube" +/datum/design/science/modweaponnodule/phasemedium + design_name = "phase projector tube" id = "phasemedium" req_tech = list(TECH_MAGNET = 3, TECH_POWER = 2) materials = list(MAT_STEEL = 8000, MAT_GLASS = 8000) build_path = /obj/item/modularlaser/lasermedium/phase - sort_string = "MAVEN" -/datum/design/item/modweaponnodule/basiclens - name = "basic lens" +/datum/design/science/modweaponnodule/basiclens + design_name = "basic lens" id = "basiclens" req_tech = list(TECH_MATERIAL = 3) materials = list(MAT_GLASS = 8000) build_path = /obj/item/modularlaser/lens/basic - sort_string = "MAVEO" -/datum/design/item/modweaponnodule/advlens - name = "advanced lens" +/datum/design/science/modweaponnodule/advlens + design_name = "advanced lens" id = "advlens" req_tech = list(TECH_MATERIAL = 6) materials = list(MAT_GLASS = 8000, MAT_SILVER = 3000) build_path = /obj/item/modularlaser/lens/advanced - sort_string = "MAVEQ" -/datum/design/item/modweaponnodule/superlens - name = "superior lens" +/datum/design/science/modweaponnodule/superlens + design_name = "superior lens" id = "superlens" req_tech = list(TECH_MATERIAL = 9) materials = list(MAT_GLASS = 8000, MAT_SILVER = 3000, MAT_DURASTEEL = 2000) build_path = /obj/item/modularlaser/lens/super - sort_string = "MAVER" /* -/datum/design/item/modweaponnodule/scatterlens - name = "scatter lens" +/datum/design/science/modweaponnodule/scatterlens + design_name = "scatter lens" id = "scatterlens" req_tech = list(TECH_MATERIAL = 6) materials = list(MAT_GLASS = 8000, MAT_SILVER = 3000) build_path = /obj/item/modularlaser/lens/scatter - sort_string = "MAVES" -/datum/design/item/modweaponnodule/advscatterlens - name = "advanced scatter lens" +/datum/design/science/modweaponnodule/advscatterlens + design_name = "advanced scatter lens" id = "advscatterlens" req_tech = list(TECH_MATERIAL = 9) materials = list(MAT_GLASS = 8000, MAT_SILVER = 3000, MAT_VERDANTIUM = 2000) build_path = /obj/item/modularlaser/lens/scatter/adv - sort_string = "MAVET" */ -/datum/design/item/modweaponnodule/basiccap - name = "basic capacitor" +/datum/design/science/modweaponnodule/basiccap + design_name = "basic capacitor" id = "basiccap" req_tech = list(TECH_POWER = 2) materials = list(MAT_STEEL = 1000, MAT_GLASS = 1000) build_path = /obj/item/modularlaser/capacitor/basic - sort_string = "MAVEV" -/datum/design/item/modweaponnodule/ecocap - name = "efficient capacitor" +/datum/design/science/modweaponnodule/ecocap + design_name = "efficient capacitor" id = "ecocap" req_tech = list(TECH_POWER = 4) materials = list(MAT_STEEL = 1000, MAT_GLASS = 1000, MAT_SILVER = 500) build_path = /obj/item/modularlaser/capacitor/eco - sort_string = "MAVEW" -/datum/design/item/modweaponnodule/supereco - name = "economical capacitor" +/datum/design/science/modweaponnodule/supereco + design_name = "economical capacitor" id = "superecocap" req_tech = list(TECH_POWER = 6) materials = list(MAT_STEEL = 1000, MAT_GLASS = 1000, MAT_SILVER = 500, MAT_GOLD = 500) build_path = /obj/item/modularlaser/capacitor/eco/super - sort_string = "MAVEX" /* -/datum/design/item/modweaponnodule/quickcap - name = "high throughput capactior" +/datum/design/science/modweaponnodule/quickcap + design_name = "high throughput capactior" id = "quickcap" req_tech = list(TECH_POWER = 8) materials = list(MAT_STEEL = 1000, MAT_GLASS = 1000, MAT_SILVER = 500, MAT_GOLD = 500) build_path = /obj/item/modularlaser/capacitor/speed - sort_string = "MAVEY" -/datum/design/item/modweaponnodule/advqcap - name = "very high throughput capactior" +/datum/design/science/modweaponnodule/advqcap + design_name = "very high throughput capactior" id = "advqcap" req_tech = list(TECH_POWER = 8) materials = list(MAT_STEEL = 1000, MAT_GLASS = 1000, MAT_SILVER = 500, MAT_GOLD = 500, MAT_VERDANTIUM = 300) build_path = /obj/item/modularlaser/capacitor/speed/advanced - sort_string = "MAVEZ" */ -/datum/design/item/modweaponnodule/basicac - name = "cooling system" +/datum/design/science/modweaponnodule/basicac + design_name = "cooling system" id = "basicac" req_tech = list(TECH_ENGINEERING = 2) materials = list(MAT_STEEL = 1000, MAT_GLASS = 1000) build_path = /obj/item/modularlaser/cooling/basic - sort_string = "MAVFA" -/datum/design/item/modweaponnodule/recoverac - name = "regenerative cooling system" +/datum/design/science/modweaponnodule/recoverac + design_name = "regenerative cooling system" id = "recoverac" req_tech = list(TECH_ENGINEERING = 4) materials = list(MAT_STEEL = 1000, MAT_GLASS = 1000, MAT_SILVER = 500, MAT_GOLD = 500) build_path = /obj/item/modularlaser/cooling/efficient - sort_string = "MAVFB" -/datum/design/item/modweaponnodule/fastac - name = "high-power regenerative cooling system" +/datum/design/science/modweaponnodule/fastac + design_name = "high-power regenerative cooling system" id = "fastac" req_tech = list(TECH_ENGINEERING = 7) materials = list(MAT_STEEL = 1000, MAT_GLASS = 1000, MAT_SILVER = 500, MAT_GOLD = 500, MAT_VERDANTIUM = 300) build_path = /obj/item/modularlaser/cooling/efficient/super - sort_string = "MAVFC" /* -/datum/design/item/modweaponnodule/superac - name = "supercharged cooling system" +/datum/design/science/modweaponnodule/superac + design_name = "supercharged cooling system" id = "superac" req_tech = list(TECH_ENGINEERING = 4) materials = list(MAT_STEEL = 1000, MAT_GLASS = 1000, MAT_SILVER = 500, MAT_GOLD = 500) build_path = /obj/item/modularlaser/cooling/speed - sort_string = "MAVFD" -/datum/design/item/modweaponnodule/bestac - name = "hypercharged cooling system" +/datum/design/science/modweaponnodule/bestac + design_name = "hypercharged cooling system" id = "hyperac" req_tech = list(TECH_ENGINEERING = 7) materials = list(MAT_STEEL = 1000, MAT_GLASS = 1000, MAT_SILVER = 500, MAT_GOLD = 500, MAT_VERDANTIUM = 300) build_path = /obj/item/modularlaser/cooling/speed/adv - sort_string = "MAVFE" */ -/datum/design/item/modweaponnodule/modcontrol - name = "controller" +/datum/design/science/modweaponnodule/modcontrol + design_name = "controller" id = "modcontrol" req_tech = list(TECH_DATA = 2) materials = list(MAT_STEEL = 1000, MAT_GLASS = 1000) build_path = /obj/item/modularlaser/controller/basic - sort_string = "MAVFF" /* -/datum/design/item/modweaponnodule/an94 - name = "AN-94 patterned fire controller" +/datum/design/science/modweaponnodule/an94 + design_name = "AN-94 patterned fire controller" id = "an94" req_tech = list(TECH_DATA = 5, TECH_COMBAT = 3) materials = list(MAT_STEEL = 1000, MAT_GLASS = 1000) build_path = /obj/item/modularlaser/controller/twoburst - sort_string = "MAVFG" */ -/datum/design/item/modweaponnodule/threecontrol - name = "burst FCU" +/datum/design/science/modweaponnodule/threecontrol + design_name = "burst FCU" id = "threecontrol" req_tech = list(TECH_DATA = 5, TECH_COMBAT = 3) materials = list(MAT_STEEL = 1000, MAT_GLASS = 1000, MAT_SILVER = 500, MAT_GOLD = 500) build_path = /obj/item/modularlaser/controller/threeburst - sort_string = "MAVFH" /* -/datum/design/item/modweaponnodule/fivecontrol - name = "quintburst FCU" +/datum/design/science/modweaponnodule/fivecontrol + design_name = "quintburst FCU" id = "fivecontrol" req_tech = list(TECH_DATA = 5, TECH_COMBAT = 4) materials = list(MAT_STEEL = 1000, MAT_GLASS = 1000, MAT_SILVER = 500, MAT_GOLD = 500) build_path = /obj/item/modularlaser/controller/fiveburst - sort_string = "MAVFI" */ -//Firing pins to shoot your guns with -/datum/design/item/pin/AssembleDesignName() - ..() - name = "Weapon firing pin ([item_name])" +/datum/design/science/pin + abstract_type = /datum/design/science/pin + +/datum/design/science/pin/generate_name(template) + return "Weapon firing pin ([..()])" -/datum/design/item/pin/test - name = "Testing range" +/datum/design/science/pin/test + design_name = "Testing range" id = "test_range_pin" req_tech = list(TECH_MATERIAL = 3, TECH_POWER = 2, TECH_COMBAT = 2) materials = list(MAT_STEEL = 1000) build_path = /obj/item/firing_pin/test_range - sort_string = "MAVGA" -/datum/design/item/pin/explorer - name = "Exploration" +/datum/design/science/pin/explorer + design_name = "Exploration" id = "explorer_pin" req_tech = list(TECH_MATERIAL = 3, TECH_POWER = 2, TECH_COMBAT = 2) materials = list(MAT_STEEL = 1000, MAT_GLASS = 500) build_path = /obj/item/firing_pin/explorer - sort_string = "MAVGC" diff --git a/code/modules/research/designs/xenoarch_toys.dm b/code/modules/research/designs/xenoarch_toys.dm index 7522d070761d..851db8356fe6 100644 --- a/code/modules/research/designs/xenoarch_toys.dm +++ b/code/modules/research/designs/xenoarch_toys.dm @@ -1,39 +1,35 @@ -/datum/design/item/xenoarch/AssembleDesignName() - ..() - name = "Xenoarcheology equipment design ([item_name])" +/datum/design/science/xenoarch + abstract_type = /datum/design/science/xenoarch -// Xenoarch tools +/datum/design/science/xenoarch/generate_name(template) + return "Xenoarcheology equipment design ([..()])" -/datum/design/item/xenoarch/ano_scanner - name = "Alden-Saraspova counter" +/datum/design/science/xenoarch/ano_scanner + design_name = "Alden-Saraspova counter" id = "ano_scanner" desc = "Aids in triangulation of exotic particles." req_tech = list(TECH_BLUESPACE = 3, TECH_MAGNET = 3) materials = list(MAT_STEEL = 10000, MAT_GLASS = 5000) build_path = /obj/item/ano_scanner - sort_string = "GAAAA" -/datum/design/item/xenoarch/depth_scanner +/datum/design/science/xenoarch/depth_scanner desc = "Used to check spatial depth and density of rock outcroppings." id = "depth_scanner" req_tech = list(TECH_MAGNET = 2, TECH_ENGINEERING = 2, TECH_BLUESPACE = 2) materials = list(MAT_STEEL = 1000, MAT_GLASS = 1000) build_path = /obj/item/depth_scanner - sort_string = "GAAAB" -/datum/design/item/xenoarch/xenoarch_multi_tool - name = "xenoarcheology multitool" +/datum/design/science/xenoarch/xenoarch_multi_tool + design_name = "xenoarcheology multitool" id = "xenoarch_multitool" req_tech = list(TECH_MAGNET = 3, TECH_ENGINEERING = 3, TECH_BLUESPACE = 3) build_path = /obj/item/xenoarch_multi_tool materials = list(MAT_STEEL = 2000, MAT_GLASS = 1000, MAT_URANIUM = 500, MAT_PHORON = 500) - sort_string = "GAAAC" -/datum/design/item/xenoarch/excavationdrill - name = "Excavation Drill" +/datum/design/science/xenoarch/excavationdrill + design_name = "Excavation Drill" id = "excavationdrill" req_tech = list(TECH_MATERIAL = 3, TECH_POWER = 2, TECH_ENGINEERING = 2, TECH_BLUESPACE = 3) - build_type = PROTOLATHE + lathe_type = LATHE_TYPE_PROTOLATHE materials = list(MAT_STEEL = 4000, MAT_GLASS = 4000) build_path = /obj/item/pickaxe/excavationdrill - sort_string = "GAAAD" diff --git a/code/modules/research/designs/xenobio_toys.dm b/code/modules/research/designs/xenobio_toys.dm index fe2743c94d0e..0c517fa548b8 100644 --- a/code/modules/research/designs/xenobio_toys.dm +++ b/code/modules/research/designs/xenobio_toys.dm @@ -1,48 +1,41 @@ -/datum/design/item/xenobio/AssembleDesignName() - ..() - name = "Xenobiology equipment design ([item_name])" +/datum/design/science/xenobio + abstract_type = /datum/design/science/xenobio -// Xenobio Weapons +/datum/design/science/xenobio/generate_name(template) + return "Xenobiology equipment design ([..()])" -/datum/design/item/xenobio/slimebaton +/datum/design/science/xenobio/slimebaton id = "slimebaton" req_tech = list(TECH_MATERIAL = 2, TECH_BIO = 2, TECH_POWER = 3, TECH_COMBAT = 3) materials = list(MAT_STEEL = 5000) build_path = /obj/item/melee/baton/slime - sort_string = "HAAAA" -/datum/design/item/xenobio/slimetaser +/datum/design/science/xenobio/slimetaser id = "slimetaser" req_tech = list(TECH_MATERIAL = 3, TECH_BIO = 3, TECH_POWER = 4, TECH_COMBAT = 4) materials = list(MAT_STEEL = 5000) build_path = /obj/item/gun/energy/taser/xeno - sort_string = "HAAAB" -// Other - -/datum/design/item/xenobio/slime_scanner - name = "slime scanner" +/datum/design/science/xenobio/slime_scanner + design_name = "slime scanner" desc = "A hand-held body scanner able to learn information about slimes." id = "slime_scanner" req_tech = list(TECH_MAGNET = 2, TECH_BIO = 2) materials = list(MAT_STEEL = 500, MAT_GLASS = 500) build_path = /obj/item/slime_scanner - sort_string = "HBAAA" -/datum/design/item/xenobio/gene_disk - name = "genetics disk" +/datum/design/science/xenobio/gene_disk + design_name = "genetics disk" desc = "A disk designed to retain humanoid genetic information." id = "gene_disk" req_tech = list(TECH_DATA = 3, TECH_BIO = 3) materials = list(MAT_STEEL = 300, MAT_GLASS = 300) build_path = /obj/item/disk/data - sort_string = "HAAHA" -/datum/design/item/xenobio/botany_disk - name = "flora data disk" +/datum/design/science/xenobio/botany_disk + design_name = "flora data disk" desc = "A small disk used for carrying data on plant genetics." id = "plant_disk" req_tech = list(TECH_DATA = 3, TECH_BIO = 3) materials = list(MAT_STEEL = 300, MAT_GLASS = 300) build_path = /obj/item/disk/botany - sort_string = "HAHAB" diff --git a/code/modules/research/circuitprinter.dm b/code/modules/research/machinery/circuitprinter.dm similarity index 81% rename from code/modules/research/circuitprinter.dm rename to code/modules/research/machinery/circuitprinter.dm index 04bac8ab1c06..1243c08294dd 100644 --- a/code/modules/research/circuitprinter.dm +++ b/code/modules/research/machinery/circuitprinter.dm @@ -18,7 +18,7 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid). var/mat_efficiency = 1 var/speed = 1 - materials = list( + stored_materials = list( MAT_STEEL = 0, MAT_GLASS = 0, MAT_PLASTEEL = 0, @@ -64,7 +64,7 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid). if(canBuild(D)) busy = 1 progress += speed - if(progress >= D.time) + if((progress * 20) >= D.work) build(D) progress = 0 removeFromQueue(1) @@ -106,20 +106,20 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid). /obj/machinery/r_n_d/circuit_imprinter/proc/TotalMaterials() var/t = 0 - for(var/f in materials) - t += materials[f] + for(var/f in stored_materials) + t += stored_materials[f] return t /obj/machinery/r_n_d/circuit_imprinter/dismantle() for(var/obj/I in component_parts) if(istype(I, /obj/item/reagent_containers/glass/beaker)) reagents.trans_to_obj(I, reagents.total_volume) - for(var/f in materials) - if(materials[f] >= SHEET_MATERIAL_AMOUNT) + for(var/f in stored_materials) + if(stored_materials[f] >= SHEET_MATERIAL_AMOUNT) var/path = getMaterialType(f) if(path) var/obj/item/stack/S = new path(loc) - S.amount = round(materials[f] / SHEET_MATERIAL_AMOUNT) + S.amount = round(stored_materials[f] / SHEET_MATERIAL_AMOUNT) ..() /obj/machinery/r_n_d/circuit_imprinter/attackby(var/obj/item/O as obj, var/mob/user as mob) @@ -156,7 +156,7 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid). return 1 var/obj/item/stack/material/S = O - if(!(S.material.name in materials)) + if(!(S.material.name in stored_materials)) to_chat(user, SPAN_WARNING("The [src] doesn't accept [S.material]!")) return @@ -164,17 +164,17 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid). var/sname = "[S.name]" var/amnt = S.perunit var/max_res_amount = max_material_storage - for(var/mat in materials) - max_res_amount -= materials[mat] + for(var/mat in stored_materials) + max_res_amount -= stored_materials[mat] - if(materials[S.material.name] + amnt <= max_res_amount) + if(stored_materials[S.material.name] + amnt <= max_res_amount) if(S && S.get_amount() >= 1) var/count = 0 add_overlay("fab-load-metal") spawn(10) cut_overlay("fab-load-metal") - while(materials[S.material.name] + amnt <= max_res_amount && S.get_amount() >= 1) - materials[S.material.name] += amnt + while(stored_materials[S.material.name] + amnt <= max_res_amount && S.get_amount() >= 1) + stored_materials[S.material.name] += amnt S.use(1) count++ to_chat(user, "You insert [count] [sname] into the fabricator.") @@ -195,22 +195,22 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid). /obj/machinery/r_n_d/circuit_imprinter/proc/canBuild(var/datum/design/D) for(var/M in D.materials) - if(materials[M] < (D.materials[M] * mat_efficiency)) + if(stored_materials[M] < (D.materials[M] * mat_efficiency)) return 0 - for(var/C in D.chemicals) - if(!reagents.has_reagent(C, D.chemicals[C] * mat_efficiency)) + for(var/C in D.reagents) + if(!reagents.has_reagent(C, D.reagents[C] * mat_efficiency)) return 0 return 1 /obj/machinery/r_n_d/circuit_imprinter/proc/getLackingMaterials(var/datum/design/D) var/ret = "" for(var/M in D.materials) - if(materials[M] < D.materials[M]) + if(stored_materials[M] < D.materials[M]) if(ret != "") ret += ", " - ret += "[D.materials[M] - materials[M]] [M]" - for(var/C in D.chemicals) - if(!reagents.has_reagent(C, D.chemicals[C])) + ret += "[D.materials[M] - stored_materials[M]] [M]" + for(var/C in D.reagents) + if(!reagents.has_reagent(C, D.reagents[C])) if(ret != "") ret += ", " ret += C @@ -223,14 +223,13 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid). power = max(active_power_usage, power) use_power(power) for(var/M in D.materials) - materials[M] = max(0, materials[M] - D.materials[M] * mat_efficiency) - for(var/C in D.chemicals) - reagents.remove_reagent(C, D.chemicals[C] * mat_efficiency) + stored_materials[M] = max(0, stored_materials[M] - D.materials[M] * mat_efficiency) + for(var/C in D.reagents) + reagents.remove_reagent(C, D.reagents[C] * mat_efficiency) if(D.build_path) - var/obj/new_item = D.Fabricate(src, src) - new_item.loc = loc - if(mat_efficiency != 1) // No matter out of nowhere - if(new_item.matter && new_item.matter.len > 0) - for(var/i in new_item.matter) - new_item.matter[i] = new_item.matter[i] * mat_efficiency + var/obj/new_item = D.legacy_print(drop_location(), src) + if(mat_efficiency != 1) // No materials out of nowhere + if(new_item.materials && new_item.materials.len > 0) + for(var/i in new_item.materials) + new_item.materials[i] = new_item.materials[i] * mat_efficiency diff --git a/code/modules/research/destructive_analyzer.dm b/code/modules/research/machinery/destructive_analyzer.dm similarity index 94% rename from code/modules/research/destructive_analyzer.dm rename to code/modules/research/machinery/destructive_analyzer.dm index 6894b1e2d2d2..f057153b371a 100644 --- a/code/modules/research/destructive_analyzer.dm +++ b/code/modules/research/machinery/destructive_analyzer.dm @@ -106,10 +106,10 @@ Note: Must be placed within 3 tiles of the R&D Console for(var/obj/item/B in replacer.contents) if(B.rped_rating() > lowest_rating) continue - if(lathe_to_fill && B.matter) // Sending salvaged materials to the lathe... - for(var/t in B.matter) - if(t in lathe_to_fill.materials) - lathe_to_fill.materials[t] += B.matter[t] * src.decon_mod + if(lathe_to_fill && B.materials) // Sending salvaged materials to the lathe... + for(var/t in B.materials) + if(t in lathe_to_fill.stored_materials) + lathe_to_fill.stored_materials[t] += B.materials[t] * src.decon_mod qdel(B) playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1) rped_recycler_ready = FALSE diff --git a/code/modules/research/protolathe.dm b/code/modules/research/machinery/protolathe.dm similarity index 75% rename from code/modules/research/protolathe.dm rename to code/modules/research/machinery/protolathe.dm index 6fdcfc9b68c8..b92627ebb7e2 100644 --- a/code/modules/research/protolathe.dm +++ b/code/modules/research/machinery/protolathe.dm @@ -17,7 +17,7 @@ var/mat_efficiency = 1 var/speed = 1 - materials = list(MAT_STEEL = 0, MAT_GLASS = 0, MAT_PLASTEEL = 0, MAT_PLASTIC = 0, MAT_GOLD = 0, MAT_SILVER = 0, MAT_COPPER = 0, MAT_OSMIUM = 0, MAT_LEAD = 0, MAT_PHORON = 0, MAT_URANIUM = 0, MAT_DIAMOND = 0, MAT_DURASTEEL = 0, MAT_VERDANTIUM = 0, MAT_MORPHIUM = 0, MAT_METALHYDROGEN = 0, MAT_SUPERMATTER = 0) + stored_materials = list(MAT_STEEL = 0, MAT_GLASS = 0, MAT_PLASTEEL = 0, MAT_PLASTIC = 0, MAT_GOLD = 0, MAT_SILVER = 0, MAT_COPPER = 0, MAT_OSMIUM = 0, MAT_LEAD = 0, MAT_PHORON = 0, MAT_URANIUM = 0, MAT_DIAMOND = 0, MAT_DURASTEEL = 0, MAT_VERDANTIUM = 0, MAT_MORPHIUM = 0, MAT_METALHYDROGEN = 0, MAT_SUPERMATTER = 0) hidden_materials = list(MAT_PLASTEEL, MAT_DURASTEEL, MAT_VERDANTIUM, MAT_MORPHIUM, MAT_METALHYDROGEN, MAT_SUPERMATTER) @@ -34,7 +34,7 @@ if(canBuild(D)) busy = 1 progress += speed - if(progress >= D.time) + if((progress * 20) >= D.work) build(D) progress = 0 removeFromQueue(1) @@ -47,8 +47,8 @@ /obj/machinery/r_n_d/protolathe/proc/TotalMaterials() //returns the total of all the stored materials. Makes code neater. var/t = 0 - for(var/f in materials) - t += materials[f] + for(var/f in stored_materials) + t += stored_materials[f] return t /obj/machinery/r_n_d/protolathe/RefreshParts() @@ -66,7 +66,7 @@ speed = T / 2 /obj/machinery/r_n_d/protolathe/dismantle() - for(var/f in materials) + for(var/f in stored_materials) eject_materials(f, -1) ..() @@ -115,7 +115,7 @@ return 1 var/obj/item/stack/material/S = O - if(!(S.material.name in materials)) + if(!(S.material.name in stored_materials)) to_chat(user, "The [src] doesn't accept [S.material]!") return @@ -123,17 +123,17 @@ var/sname = "[S.name]" var/amnt = S.perunit var/max_res_amount = max_material_storage - for(var/mat in materials) - max_res_amount -= materials[mat] + for(var/mat in stored_materials) + max_res_amount -= stored_materials[mat] - if(materials[S.material.name] + amnt <= max_res_amount) + if(stored_materials[S.material.name] + amnt <= max_res_amount) if(S && S.get_amount() >= 1) var/count = 0 add_overlay("fab-load-metal") spawn(10) cut_overlay("fab-load-metal") - while(materials[S.material.name] + amnt <= max_res_amount && S.get_amount() >= 1) - materials[S.material.name] += amnt + while(stored_materials[S.material.name] + amnt <= max_res_amount && S.get_amount() >= 1) + stored_materials[S.material.name] += amnt S.use(1) count++ to_chat(user, "You insert [count] [sname] into the fabricator.") @@ -160,22 +160,22 @@ /obj/machinery/r_n_d/protolathe/proc/canBuild(var/datum/design/D) for(var/M in D.materials) - if(materials[M] < (D.materials[M] * mat_efficiency)) + if(stored_materials[M] < (D.materials[M] * mat_efficiency)) return 0 - for(var/C in D.chemicals) - if(!reagents.has_reagent(C, D.chemicals[C] * mat_efficiency)) + for(var/C in D.reagents) + if(!reagents.has_reagent(C, D.reagents[C] * mat_efficiency)) return 0 return 1 /obj/machinery/r_n_d/protolathe/proc/getLackingMaterials(var/datum/design/D) var/ret = "" for(var/M in D.materials) - if(materials[M] < D.materials[M]) + if(stored_materials[M] < D.materials[M]) if(ret != "") ret += ", " - ret += "[D.materials[M] - materials[M]] [M]" - for(var/C in D.chemicals) - if(!reagents.has_reagent(C, D.chemicals[C])) + ret += "[D.materials[M] - stored_materials[M]] [M]" + for(var/C in D.reagents) + if(!reagents.has_reagent(C, D.reagents[C])) if(ret != "") ret += ", " ret += C @@ -188,16 +188,16 @@ power = max(active_power_usage, power) use_power(power) for(var/M in D.materials) - materials[M] = max(0, materials[M] - D.materials[M] * mat_efficiency) - for(var/C in D.chemicals) - reagents.remove_reagent(C, D.chemicals[C] * mat_efficiency) + stored_materials[M] = max(0, stored_materials[M] - D.materials[M] * mat_efficiency) + for(var/C in D.reagents) + reagents.remove_reagent(C, D.reagents[C] * mat_efficiency) if(D.build_path) - var/obj/new_item = D.Fabricate(drop_location(), src) - if(mat_efficiency != 1) // No matter out of nowhere - if(new_item.matter && new_item.matter.len > 0) - for(var/i in new_item.matter) - new_item.matter[i] = new_item.matter[i] * mat_efficiency + var/obj/new_item = D.legacy_print(drop_location(), src) + if(mat_efficiency != 1) // No materials out of nowhere + if(new_item.materials && new_item.materials.len > 0) + for(var/i in new_item.materials) + new_item.materials[i] = new_item.materials[i] * mat_efficiency /obj/machinery/r_n_d/protolathe/proc/eject_materials(var/material, var/amount) // 0 amount = 0 means ejecting a full stack; -1 means eject everything var/recursive = amount == -1 ? 1 : 0 @@ -216,11 +216,11 @@ var/obj/item/stack/material/S = new mattype(loc) if(amount <= 0) amount = S.max_amount - var/ejected = min(round(materials[material] / S.perunit), amount) + var/ejected = min(round(stored_materials[material] / S.perunit), amount) S.amount = min(ejected, amount) if(S.amount <= 0) qdel(S) return - materials[material] -= ejected * S.perunit - if(recursive && materials[material] >= S.perunit) + stored_materials[material] -= ejected * S.perunit + if(recursive && stored_materials[material] >= S.perunit) eject_materials(material, -1) diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/machinery/rdconsole.dm similarity index 100% rename from code/modules/research/rdconsole.dm rename to code/modules/research/machinery/rdconsole.dm diff --git a/code/modules/research/rdconsole_tgui.dm b/code/modules/research/machinery/rdconsole_tgui.dm similarity index 94% rename from code/modules/research/rdconsole_tgui.dm rename to code/modules/research/machinery/rdconsole_tgui.dm index 49740eb3bd35..41ebfe470352 100644 --- a/code/modules/research/rdconsole_tgui.dm +++ b/code/modules/research/machinery/rdconsole_tgui.dm @@ -67,8 +67,8 @@ ) var/list/materials = list() - for(var/M in linked_lathe.materials) - var/amount = linked_lathe.materials[M] + for(var/M in linked_lathe.stored_materials) + var/amount = linked_lathe.stored_materials[M] var/hidden_mat = FALSE for(var/HM in linked_lathe.hidden_materials) if(M == HM && amount == 0) @@ -115,8 +115,8 @@ ) var/list/materials = list() - for(var/M in linked_imprinter.materials) - var/amount = linked_imprinter.materials[M] + for(var/M in linked_imprinter.stored_materials) + var/amount = linked_imprinter.stored_materials[M] var/hidden_mat = FALSE for(var/HM in linked_imprinter.hidden_materials) if(M == HM && amount == 0) @@ -170,7 +170,7 @@ ) if(d_disk.blueprint) data["info"]["d_disk"]["name"] = d_disk.blueprint.name - data["info"]["d_disk"]["build_type"] = d_disk.blueprint.build_type + data["info"]["d_disk"]["build_type"] = d_disk.blueprint.lathe_type data["info"]["d_disk"]["materials"] = d_disk.blueprint.materials return data @@ -218,7 +218,7 @@ // For some reason, this is faster than direct access. var/list/known_designs = files.known_designs for(var/datum/design/D in known_designs) - if(!D.build_path || !(D.build_type & PROTOLATHE)) + if(!D.build_path || !(D.lathe_type & LATHE_TYPE_PROTOLATHE)) continue if(search && !findtext(D.name, search)) continue @@ -228,8 +228,8 @@ mat_list.Add("[D.materials[M] * P.mat_efficiency] [CallMaterialName(M)]") var/list/chem_list = list() - for(var/T in D.chemicals) - chem_list.Add("[D.chemicals[T] * P.mat_efficiency] [CallReagentName(T)]") + for(var/T in D.reagents) + chem_list.Add("[D.reagents[T] * P.mat_efficiency] [CallReagentName(T)]") data.Add(list(list( "name" = D.name, @@ -256,7 +256,7 @@ // For some reason, this is faster than direct access. var/list/known_designs = files.known_designs for(var/datum/design/D in known_designs) - if(!D.build_path || !(D.build_type & IMPRINTER)) + if(!D.build_path || !(D.lathe_type & LATHE_TYPE_CIRCUIT)) continue if(search && !findtext(D.name, search)) continue @@ -266,8 +266,8 @@ mat_list.Add("[D.materials[M] * P.mat_efficiency] [CallMaterialName(M)]") var/list/chem_list = list() - for(var/T in D.chemicals) - chem_list.Add("[D.chemicals[T] * P.mat_efficiency] [CallReagentName(T)]") + for(var/T in D.reagents) + chem_list.Add("[D.reagents[T] * P.mat_efficiency] [CallReagentName(T)]") data.Add(list(list( "name" = D.name, @@ -427,10 +427,10 @@ for(var/T in linked_destroy.loaded_item.origin_tech) files.UpdateTech(T, linked_destroy.loaded_item.origin_tech[T]) - if(linked_lathe && linked_destroy.loaded_item.matter) // Also sends salvaged materials to a linked protolathe, if any. - for(var/t in linked_destroy.loaded_item.matter) - if(t in linked_lathe.materials) - linked_lathe.materials[t] += min(linked_lathe.max_material_storage - linked_lathe.TotalMaterials(), linked_destroy.loaded_item.matter[t] * linked_destroy.decon_mod) + if(linked_lathe && linked_destroy.loaded_item.materials) // Also sends salvaged materials to a linked protolathe, if any. + for(var/t in linked_destroy.loaded_item.materials) + if(t in linked_lathe.stored_materials) + linked_lathe.stored_materials[t] += min(linked_lathe.max_material_storage - linked_lathe.TotalMaterials(), linked_destroy.loaded_item.materials[t] * linked_destroy.decon_mod) linked_destroy.loaded_item = null diff --git a/code/modules/research/rdmachines.dm b/code/modules/research/machinery/rdmachines.dm similarity index 85% rename from code/modules/research/rdmachines.dm rename to code/modules/research/machinery/rdmachines.dm index beb9366b7907..942d368d0d0b 100644 --- a/code/modules/research/rdmachines.dm +++ b/code/modules/research/machinery/rdmachines.dm @@ -11,7 +11,7 @@ var/busy = FALSE var/obj/machinery/computer/rdconsole/linked_console - var/list/materials = list() // Materials this machine can accept. + var/list/stored_materials = list() // Materials this machine can accept. var/list/hidden_materials = list() // Materials this machine will not display, unless it contains them. Must be in the materials list as well. /obj/machinery/r_n_d/attack_hand(mob/user, list/params) @@ -30,14 +30,14 @@ return null /obj/machinery/r_n_d/proc/eject(var/material, var/amount) - if(!(material in materials)) + if(!(material in stored_materials)) return var/obj/item/stack/material/sheetType = getMaterialType(material) var/perUnit = initial(sheetType.perunit) - var/eject = round(materials[material] / perUnit) + var/eject = round(stored_materials[material] / perUnit) eject = amount == -1 ? eject : min(eject, amount) if(eject < 1) return var/obj/item/stack/material/S = new sheetType(loc) S.amount = eject - materials[material] -= eject * perUnit + stored_materials[material] -= eject * perUnit diff --git a/code/modules/research/server.dm b/code/modules/research/machinery/server.dm similarity index 100% rename from code/modules/research/server.dm rename to code/modules/research/machinery/server.dm diff --git a/code/modules/research/prosfab_designs_vr.dm b/code/modules/research/prosfab_designs_vr.dm deleted file mode 100644 index dd93af2ec302..000000000000 --- a/code/modules/research/prosfab_designs_vr.dm +++ /dev/null @@ -1,8 +0,0 @@ -//Prosfab stuff for borgs and such - -/datum/design/item/prosfab/robot_upgrade/sizeshift - name = "Size Alteration Module" - id = "borg_sizeshift_module" - req_tech = list(TECH_BLUESPACE = 3, TECH_MATERIAL = 3, TECH_POWER = 2) - materials = list(MAT_STEEL = 4000, MAT_GLASS = 4000) - build_path = /obj/item/borg/upgrade/sizeshift diff --git a/code/modules/research/rd-readme.dm b/code/modules/research/rd-readme.dm deleted file mode 100644 index d041a24c175b..000000000000 --- a/code/modules/research/rd-readme.dm +++ /dev/null @@ -1,32 +0,0 @@ -/* -Research and Development System. (Designed specifically for the /tg/station 13 (Space Station 13) open source project) - -///////////////Overview/////////////////// -This system is a "tech tree" research and development system designed for SS13. It allows a "researcher" job (this document assumes -the "scientist" job is given this role) the tools necessary to research new and better technologies. In general, the system works -by breaking existing technology and using what you learn from to advance your knowledge of SCIENCE! As your knowledge progresses, -you can build newer (and better?) devices (which you can also, eventually, deconstruct to advance your knowledge). - -A brief overview is below. For more details, see the related files. - -////////////Game Use///////////// -The major research and development is performed using a combination of four machines: -- R&D Console: A computer console that allows you to manipulate the other devices that are linked to it and view/manipulate the -technologies you have researched so far. -- Protolathe: Used to make new hand-held devices and parts for larger devices. All metals and reagents as raw materials. -- Destructive Analyzer: You can put hand-held objects into it and it'll analyze them for technological advancements but it destroys -them in the process. Destroyed items will send their raw materials to a linked Protolathe (if any) -- Circuit Imprinter: Similar to the Protolathe, it allows for the construction of circuit boards. Uses glass and acid as the raw -materials. - -While researching you are dealing with two different types of information: Technology Paths and Device Designs. Technology Paths -are the "Tech Trees" of the game. You start out with a number of them at the game start and they are improved by using the -Destructive Analyzer. By themselves, they don't do a whole lot. However, they unlock Device Designs. This is the information used -by the circuit imprinter and the protolathe to produce objects. It also tracks the current reliability of that particular design. - -//EXISTING TECH -Each tech path should have at LEAST one item at every level (levels 1 - 20). This is to allow for a more fluid progression of the -researching. Existing tech (ie, anything you can find on the station or get from the quartermaster) shouldn't go higher then -level 5 or 7. Everything past that should be stuff you research. - -*/ diff --git a/code/modules/research/research.dm b/code/modules/research/research.dm index e977b59ae2fa..2ec41058e2b5 100644 --- a/code/modules/research/research.dm +++ b/code/modules/research/research.dm @@ -70,6 +70,11 @@ research holder datum. known_tech = null return ..() +/datum/research/proc/debug_max_out() + for(var/datum/tech/tech in known_tech) + tech.level = 40 + RefreshResearch() + /datum/research/techonly /datum/research/techonly/New() @@ -234,7 +239,7 @@ research holder datum. icon_state = "datadisk2" item_state = "card-id" w_class = ITEMSIZE_SMALL - matter = list(MAT_STEEL = 30, MAT_GLASS = 10) + materials = list(MAT_STEEL = 30, MAT_GLASS = 10) var/datum/tech/stored /obj/item/disk/tech_disk/Initialize(mapload) @@ -249,7 +254,7 @@ research holder datum. icon_state = "datadisk2" item_state = "card-id" w_class = ITEMSIZE_SMALL - matter = list(MAT_STEEL = 30, MAT_GLASS = 10) + materials = list(MAT_STEEL = 30, MAT_GLASS = 10) var/datum/design/blueprint /obj/item/disk/design_disk/Initialize(mapload) diff --git a/code/modules/research/rigs_vr.dm b/code/modules/research/rigs_vr.dm deleted file mode 100644 index 256ca74db662..000000000000 --- a/code/modules/research/rigs_vr.dm +++ /dev/null @@ -1,150 +0,0 @@ -/* - O - rigsuit stuff - OA - rigs themselves - OB - hardsuit modules - OBAA - general purpose - OBAB - mining - OBAC - medical - OBAD - sec/combat - OBAE - engineering/maintenance/cleaning -*/ - - -////// RIGSuit Stuff -/* -/datum/design/item/hardsuit - req_tech = list(TECH_MATERIAL = 5, TECH_POWER = 5, TECH_MAGNET = 5) - materials = list(MAT_STEEL = 6000, MAT_GLASS = 6000, MAT_SILVER = 6000, MAT_URANIUM = 4000) - -/datum/design/item/hardsuit/AssembleDesignName() - ..() - name = "hardsuit prototype ([name])" - -/datum/design/item/hardsuit/eva - name = "eva hardsuit (empty)" - id = "eva_hardsuit" - build_path = /obj/item/hardsuit/eva - sort_string = "OAAAA" - -/datum/design/item/hardsuit/mining - name = "industrial hardsuit (empty)" - id = "ind_hardsuit" - build_path = /obj/item/hardsuit/industrial - sort_string = "OAAAB" - -/datum/design/item/hardsuit/research - name = "ami hardsuit (empty)" - id = "ami_hardsuit" - build_path = /obj/item/hardsuit/hazmat - sort_string = "OAAAC" - -/datum/design/item/hardsuit/medical - name = "medical hardsuit (empty)" - id = "med_hardsuit" - build_path = /obj/item/hardsuit/medical - sort_string = "OAAAD" -*/ - -/datum/design/item/hardsuit_module - req_tech = list(TECH_MATERIAL = 5, TECH_POWER = 5, TECH_MAGNET = 5) - materials = list(MAT_STEEL = 6000, MAT_GLASS = 6000, MAT_SILVER = 4000, MAT_URANIUM = 2000) - -/datum/design/item/hardsuit_module/AssembleDesignName() - ..() - name = "hardsuit module prototype ([name])" - -/datum/design/item/hardsuit_module/maneuvering_jets - name = "maneuvering jets" - id = "rigmod_maneuveringjets" - build_path = /obj/item/hardsuit_module/maneuvering_jets - sort_string = "OBAAA" - -/datum/design/item/hardsuit_module/sprinter - name = "sprinter" - id = "rigmod_sprinter" - build_path = /obj/item/hardsuit_module/sprinter - sort_string = "OBAAB" - -/datum/design/item/hardsuit_module/plasma_cutter - name = "plasma cutter" - id = "rigmod_plasmacutter" - build_path = /obj/item/hardsuit_module/device/plasmacutter - sort_string = "OBABA" - -/datum/design/item/hardsuit_module/diamond_drill - name = "diamond drill" - id = "rigmod_diamonddrill" - build_path = /obj/item/hardsuit_module/device/drill - sort_string = "OBABB" - -/datum/design/item/hardsuit_module/anomaly_scanner - name = "anomaly scanner" - id = "rigmod_anomalyscanner" - build_path = /obj/item/hardsuit_module/device/anomaly_scanner - sort_string = "OBABC" - -/datum/design/item/hardsuit_module/orescanner - name = "ore scanner" - id = "rigmod_orescanner" - build_path = /obj/item/hardsuit_module/device/orescanner - sort_string = "OBABD" - -/datum/design/item/hardsuit_module/orescanneradv - name = "adv. ore scanner" - id = "rigmod_orescanneradv" - build_path = /obj/item/hardsuit_module/device/orescanner/advanced - sort_string = "OBABE" - -/datum/design/item/hardsuit_module/rescue_pharm - name = "rescue pharm" - id = "rigmod_rescue_pharm" - build_path = /obj/item/hardsuit_module/rescue_pharm - sort_string = "OBACA" - -/datum/design/item/hardsuit_module/lasercannon - name = "laser cannon" - id = "rigmod_lasercannon" - build_path = /obj/item/hardsuit_module/mounted - materials = list(MAT_STEEL = 6000, MAT_GLASS = 6000, MAT_SILVER = 4000, MAT_URANIUM = 2000, MAT_DIAMOND = 2000) - sort_string = "OBADA" - -/datum/design/item/hardsuit_module/egun - name = "energy gun" - id = "rigmod_egun" - build_path = /obj/item/hardsuit_module/mounted/egun - materials = list(MAT_STEEL = 6000, MAT_GLASS = 6000, MAT_SILVER = 4000, MAT_URANIUM = 2000, MAT_DIAMOND = 1000) - sort_string = "OBADB" - -/datum/design/item/hardsuit_module/taser - name = "taser" - id = "rigmod_taser" - build_path = /obj/item/hardsuit_module/mounted/taser - sort_string = "OBADC" - -/datum/design/item/hardsuit_module/armblade - name = "arm-mounted blade" - id = "rigmod_armblade" - build_path = /obj/item/hardsuit_module/armblade - sort_string = "OBADD" - materials = list(MAT_STEEL = 8000, MAT_GLASS = 2000, MAT_SILVER = 2000, MAT_GOLD = 2000) - -/datum/design/item/hardsuit_module/rcd - name = "rcd" - id = "rigmod_rcd" - build_path = /obj/item/hardsuit_module/device/rcd - materials = list(MAT_STEEL = 6000, MAT_GLASS = 6000, MAT_SILVER = 4000, MAT_URANIUM = 2000, MAT_DIAMOND = 2000) - sort_string = "OBAEA" - -/datum/design/item/hardsuit_module/rigwelder - name = "hardsuit arc-welder" - id = "rigmod_welder" - build_path = /obj/item/hardsuit_module/device/rigwelder - materials = list(MAT_STEEL = 6000, MAT_GLASS = 4000, MAT_SILVER = 2000, MAT_GOLD = 4000) - sort_string = "OBAEB" - -/datum/design/item/hardsuit_module/toolset - name = "hardsuit toolset" - id = "rigmod_tools" - build_path = /obj/item/hardsuit_module/device/toolset - materials = list(MAT_STEEL = 8000, MAT_GLASS = 2000, MAT_SILVER = 2000, MAT_PLASTEEL = 1000) - sort_string = "OBAEC" diff --git a/code/modules/resleeving/implant.dm b/code/modules/resleeving/implant.dm index d69eb440cc0d..8c7ea90d32ce 100644 --- a/code/modules/resleeving/implant.dm +++ b/code/modules/resleeving/implant.dm @@ -46,7 +46,7 @@ throw_speed = 1 throw_range = 5 w_class = ITEMSIZE_SMALL - matter = list(MAT_STEEL = 2000, MAT_GLASS = 2000) + materials = list(MAT_STEEL = 2000, MAT_GLASS = 2000) var/list/obj/item/implant/backup/imps = list() var/max_implants = 4 //Iconstates need to exist due to the update proc! diff --git a/code/modules/resleeving/mirror.dm b/code/modules/resleeving/mirror.dm index 7e30527c71e7..11e96ebbdae4 100644 --- a/code/modules/resleeving/mirror.dm +++ b/code/modules/resleeving/mirror.dm @@ -104,7 +104,7 @@ w_class = ITEMSIZE_SMALL throw_speed = 5 throw_range = 10 - matter = list(MAT_STEEL = 200) + materials = list(MAT_STEEL = 200) origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2) item_flags = ITEM_NOBLUDGEON @@ -119,7 +119,7 @@ w_class = ITEMSIZE_SMALL throw_speed = 5 throw_range = 10 - matter = list(MAT_STEEL = 200) + materials = list(MAT_STEEL = 200) origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2) item_flags = ITEM_NOBLUDGEON var/obj/item/implant/mirror/imp = null diff --git a/code/modules/resleeving/sleevecard.dm b/code/modules/resleeving/sleevecard.dm index c3cbb629423c..b6d75324ebaa 100644 --- a/code/modules/resleeving/sleevecard.dm +++ b/code/modules/resleeving/sleevecard.dm @@ -20,7 +20,7 @@ var/mob/living/silicon/infomorph/infomorph var/current_emotion = 1 - matter = list(MAT_STEEL = 4000, MAT_GLASS = 4000) + materials = list(MAT_STEEL = 4000, MAT_GLASS = 4000) /obj/item/sleevecard/relaymove(var/mob/user, var/direction) if(!CHECK_MOBILITY(user, MOBILITY_CAN_MOVE)) diff --git a/code/modules/species/protean/protean.dm b/code/modules/species/protean/protean.dm index 76f280089118..baf7390b1198 100644 --- a/code/modules/species/protean/protean.dm +++ b/code/modules/species/protean/protean.dm @@ -225,7 +225,7 @@ if(refactory && !(refactory.status & ORGAN_DEAD)) STATPANEL_DATA_LINE("- -- --- Refactory Metal Storage --- -- -") var/max = refactory.max_storage - for(var/material in refactory.materials) + for(var/material in refactory.stored_materials) var/amount = refactory.get_stored_material(material) STATPANEL_DATA_ENTRY("[capitalize(material)]", "[amount]/[max]") else diff --git a/code/modules/species/protean/protean_powers.dm b/code/modules/species/protean/protean_powers.dm index daac8ccccfcf..d128bb9e578e 100644 --- a/code/modules/species/protean/protean_powers.dm +++ b/code/modules/species/protean/protean_powers.dm @@ -158,7 +158,7 @@ if(!refactory.use_stored_material(MAT_STEEL,refactory.max_storage)) to_chat(src, "You need to be maxed out on normal metal to do this!") return - var/list/holder = refactory.materials + var/list/holder = refactory.stored_materials species.create_organs(src) var/obj/item/organ/external/torso = organs_by_name[BP_TORSO] torso.robotize() //synthetic wasn't defined here. @@ -171,7 +171,7 @@ if(!new_refactory) log_debug(SPAN_DEBUGWARNING("[src] protean-regen'd but lacked a refactory when done.")) else - new_refactory.materials = holder + new_refactory.stored_materials = holder to_chat(src, "Your refactoring is complete.") //Guarantees the message shows no matter how bad the timing. to_chat(blob, "Your refactoring is complete!") else diff --git a/code/modules/telesci/construction.dm b/code/modules/telesci/construction.dm index 856219d12e80..ea13640d570d 100644 --- a/code/modules/telesci/construction.dm +++ b/code/modules/telesci/construction.dm @@ -39,26 +39,16 @@ id = "telesci_console" req_tech = list(TECH_DATA = 3, TECH_BLUESPACE = 3, TECH_PHORON = 4) build_path = /obj/item/circuitboard/telesci_console - sort_string = "HAAEA" /datum/design/circuit/telesci_pad name = "Telepad" id = "telesci_pad" req_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 4, TECH_PHORON = 4, TECH_BLUESPACE = 5) build_path = /obj/item/circuitboard/telesci_pad - sort_string = "HAAEB" -/datum/design/circuit/quantum_pad - name = "Quantum Pad" - id = "quantum_pad" - req_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 4, TECH_PHORON = 4, TECH_BLUESPACE = 5, TECH_PRECURSOR = 1) - build_path = /obj/item/circuitboard/quantumpad - sort_string = "HAAC" - -/datum/design/item/bluespace_crystal +/datum/design/science/bluespace_crystal name = "Artificial Bluespace Crystal" id = "bluespace_crystal" req_tech = list(TECH_BLUESPACE = 3, TECH_PHORON = 4) materials = list(MAT_DIAMOND = 1500, MAT_PHORON = 1500) build_path = /obj/item/ore/bluespace_crystal/artificial - sort_string = "HAAED" diff --git a/code/modules/tgui/external.dm b/code/modules/tgui/external.dm index e333a7fe2889..bf193793263e 100644 --- a/code/modules/tgui/external.dm +++ b/code/modules/tgui/external.dm @@ -50,6 +50,23 @@ /datum/proc/ui_static_data(mob/user, datum/tgui/ui, datum/ui_state/state) return list() +/** + * public + * + * Forces an update to regular UI data. + * + * If no user is provided, every user will be updated. + * + * @params + * * user - (optional) the mob to update + * * ui - (optional) the /datum/tgui to update + */ +/datum/proc/update_ui_data(mob/user, datum/tgui/ui) + if(isnull(user)) + SStgui.update_uis(src) + else + SStgui.try_update_ui(user, src, ui) + /** * public * diff --git a/code/modules/tgui/module.dm b/code/modules/tgui/module.dm index 9626edc1a4cc..c10ae6bbf6a7 100644 --- a/code/modules/tgui/module.dm +++ b/code/modules/tgui/module.dm @@ -12,6 +12,9 @@ * * todo: there's no way to push custom data at the moment, which makes modules not too advantageous in certain cases. * + * todo: /datum/tgui_module/push_ui_data() should route to host automatically if host registers modules. + * todo: rework module registration system. /datum procs: register_ui_module(), unregister_ui_module() hooked to model del, for automatic inclusion in ui. + * * warning: the tgui module system is inherently not cheap to run. * you should not expect including too many modules to bode well for performance. * if you want fast modules, please, design your own modules, and minimize per-tick data sent. @@ -20,7 +23,9 @@ * if you're doing anything that will require more than a few modules (hello rigsuits/cyborgs/species), * do not use the module system as is. make your own synchronization and update system ontop. * - * /datum/tgui_module is just a wrapper. the $tgui and $src data keys are what powers a module. + * /datum/tgui_module is just one implementation of modules. + * the $tgui and $src data keys are actually what powers a module. + * you can make your own module system utilzing that, and hooking things like ui_module_route. */ /datum/tgui_module /// root datum - only one for the moment, sorry diff --git a/code/modules/tgui/modules/specific/lathe_control.dm b/code/modules/tgui/modules/specific/lathe_control.dm new file mode 100644 index 000000000000..4170eca12bc3 --- /dev/null +++ b/code/modules/tgui/modules/specific/lathe_control.dm @@ -0,0 +1,186 @@ +/** + * So why do we have discrete modules for lathe control? + * + * Because unfortunately, some lathes need to be able to be controlled from say, + * a R&D console. + * + * This is not great because we'll potentially have to duplicate code. + * So, we use a module to abstract it. + */ +/datum/tgui_module/lathe_control + tgui_id = "TGUILatheControl" + expected_type = /obj/machinery/lathe + var/design_update_queued = FALSE + +/datum/tgui_module/lathe_control/data(mob/user, ...) + . = ..() + var/obj/machinery/lathe/lathe = host + if(isnull(lathe)) + return + .["queueActive"] = lathe.queue_active + .["printing"] = lathe.printing + .["progress"] = lathe.progress + .["storesMaterials"] = !isnull(lathe.stored_materials) + .["storesReagents"] = !isnull(lathe.stored_reagents) + .["storesItems"] = !!length(lathe.items_max) + +/datum/tgui_module/lathe_control/static_data(mob/user, ...) + . = ..() + var/obj/machinery/lathe/lathe = host + if(isnull(lathe)) + return + .["latheName"] = lathe.name + .["dynamicButtons"] = lathe.ui_custom_options() + .["materialsContext"] = SSmaterials.tgui_materials_context() + .["speedMultiplier"] = lathe.speed_multiplier + .["efficiencyMultiplier"] = lathe.efficiency_multiplier + .["powerMultiplier"] = lathe.power_multiplier + .["designs"] = ui_design_data(lathe.design_holder.available_designs()) + .["materials"] = lathe.stored_materials?.ui_storage_data() || list() + .["reagents"] = lathe.stored_reagents?.tgui_reagent_contents() || list() + .["queue"] = ui_queue_data() + .["ingredients"] = isnull(lathe.stored_items)? list() : ui_ingredients_available(lathe.stored_items) + +/datum/tgui_module/lathe_control/ui_act(action, list/params, datum/tgui/ui) + . = ..() + if(.) + return + var/obj/machinery/lathe/lathe = host + switch(action) + if("enqueue") + var/id = params["id"] + var/amount = text2num(params["amount"]) + var/immediate = text2num(params["start"]) + var/list/material_parts = params["materials"] + var/list/item_parts = params["items"] + var/datum/design/D = SSresearch.fetch_design(id) + if(!lathe.has_design(D)) + return TRUE + lathe.enqueue(D, amount, material_parts, item_parts, immediate) + return TRUE + if("dequeue") + var/index = text2num(params["index"]) + var/datum/lathe_queue_entry/entry = SAFEINDEXACCESS(lathe.queue, index) + if(isnull(entry)) + return TRUE + lathe.queue.Cut(index, index + 1) + ui_queue_update() + return TRUE + if("clear") + if(!length(lathe.queue)) + return TRUE + lathe.queue.len = 0 + ui_queue_update() + return TRUE + if("modqueue") + var/index = text2num(params["index"]) + var/new_amount = text2num(params["amount"]) + var/datum/lathe_queue_entry/entry = SAFEINDEXACCESS(lathe.queue, index) + var/datum/design/D = SSresearch.fetch_design(entry.design_id) + if(isnull(entry)) + return + if(isnull(new_amount)) + return + entry.amount = clamp(new_amount, 0, length(D.ingredients)? 1 : (D.is_stack? lathe.queue_max_entry_stack : lathe.queue_max_entry)) + ui_queue_update() + return TRUE + if("start") + lathe.start_printing() + return TRUE + if("stop") + lathe.stop_printing() + return TRUE + if("ejectMaterial") + var/id = params["id"] + var/amt = params["amount"] + if(!amt || isnull(id)) + return + lathe.eject_sheets(id, amt) + ui_materials_update() + return TRUE + if("disposeReagent") + var/amount = text2num(params["amount"]) || INFINITY + lathe.reagents.remove_reagent(params["id"], amount) + ui_reagents_update() + return TRUE + if("ejectItem") + var/obj/item/I = locate(params["ref"]) in lathe.stored_items + if(isnull(I)) + return TRUE + lathe.eject_item(I) + return TRUE + if("custom") + if(lathe.ui_custom_act(usr, params["name"])) + ui_custom_update() + return TRUE + +/datum/tgui_module/lathe_control/ui_assets(mob/user) + . = ..() + . += get_asset_datum(/datum/asset/spritesheet/materials) + +/datum/tgui_module/lathe_control/proc/ui_design_data(datum/design/design) + var/list/datum/design/designs = islist(design)? design : list(design) + var/list/built = list() + var/list/collated = list() + if(!islist(designs)) + design = list(design) + for(var/datum/design/D as anything in designs) + built[D.id] = D.ui_data_list() + collated[D.category] = TRUE + var/list/flatten = list() + for(var/key in collated) + flatten += key + collated = flatten + return list( + "instances" = built, + "categories" = collated, + ) + +/datum/tgui_module/lathe_control/proc/ui_design_add(list/datum/design/designs) + if(design_update_queued) + return + addtimer(CALLBACK(src, PROC_REF(ui_design_update), 1), 0) + + design_update_queued = TRUE + +/datum/tgui_module/lathe_control/proc/ui_design_remove(list/datum/design/designs) + if(design_update_queued) + return + addtimer(CALLBACK(src, PROC_REF(ui_design_update), 1), 0) + design_update_queued = TRUE + +/** + * performs a full update of designs. + */ +/datum/tgui_module/lathe_control/proc/ui_design_update(queued) + if(queued && !design_update_queued) + return + design_update_queued = FALSE + var/obj/machinery/lathe/lathe = host + push_ui_data(data = list("designs" = ui_design_data(lathe.design_holder.available_designs()))) + +/datum/tgui_module/lathe_control/proc/ui_ingredients_update() + var/obj/machinery/lathe/lathe = host + push_ui_data(data = list("ingredients" = isnull(lathe.stored_items)? list() : ui_ingredients_available(lathe.stored_items))) + +/datum/tgui_module/lathe_control/proc/ui_materials_update() + var/obj/machinery/lathe/lathe = host + push_ui_data(data = list("materials" = lathe.stored_materials?.ui_storage_data() || list())) + +/datum/tgui_module/lathe_control/proc/ui_reagents_update() + var/obj/machinery/lathe/lathe = host + push_ui_data(data = list("reagents" = lathe.stored_reagents?.tgui_reagent_contents() || list())) + +/datum/tgui_module/lathe_control/proc/ui_queue_update() + push_ui_data(data = list("queue" = ui_queue_data())) + +/datum/tgui_module/lathe_control/proc/ui_queue_data() + var/obj/machinery/lathe/lathe = host + var/list/got = list() + for(var/datum/lathe_queue_entry/entry as anything in lathe.queue) + got[++got.len] = entry.ui_data() + return got + +/datum/tgui_module/lathe_control/proc/ui_custom_update() + var/obj/machinery/lathe/lathe = host + push_ui_data(data = list("dynamicButtons" = lathe.ui_custom_options())) diff --git a/code/modules/unit_tests/_unit_tests.dm b/code/modules/unit_tests/_unit_tests.dm index 7b835419853c..fbe4b2310cc7 100644 --- a/code/modules/unit_tests/_unit_tests.dm +++ b/code/modules/unit_tests/_unit_tests.dm @@ -110,7 +110,6 @@ // #include "reagent_mod_expose.dm" // #include "reagent_mod_procs.dm" // #include "reagent_recipe_collisions.dm" -#include "research_tests.dm" #include "resist.dm" // #include "say.dm" // #include "serving_tray.dm" diff --git a/code/modules/unit_tests/datum/_datum.dm b/code/modules/unit_tests/datum/_datum.dm index d9974a055692..80407ab6e712 100644 --- a/code/modules/unit_tests/datum/_datum.dm +++ b/code/modules/unit_tests/datum/_datum.dm @@ -1 +1,2 @@ #include "access.dm" +#include "design.dm" diff --git a/code/modules/unit_tests/datum/design.dm b/code/modules/unit_tests/datum/design.dm new file mode 100644 index 000000000000..e3f7f1eeb307 --- /dev/null +++ b/code/modules/unit_tests/datum/design.dm @@ -0,0 +1,16 @@ + +/datum/unit_test/design_uniqueness/Run() + var/list/lookup = list() + for(var/datum/design/path as anything in subtypesof(/datum/design)) + if(initial(path.abstract_type) == path) + continue + if(!initial(path.id)) + Fail("no id on [path].") + continue + if(lookup[initial(path.id)]) + Fail("collision on [initial(path.id)] between [path] and [lookup[initial(path.id)]:type]") + continue + var/datum/design/instance = new path + lookup[initial(path.id)] = instance + if(!length(instance.materials) && !length(instance.material_parts) && !length(instance.reagents) && !length(instance.ingredients) && !(instance.design_flags & DESIGN_IGNORE_RESOURCE_SANITY)) + Fail("[instance.id] ([path]) has no material costs and is not flagged as override.") diff --git a/code/modules/unit_tests/research_tests.dm b/code/modules/unit_tests/research_tests.dm deleted file mode 100644 index ad2be69c0b1a..000000000000 --- a/code/modules/unit_tests/research_tests.dm +++ /dev/null @@ -1,8 +0,0 @@ -/datum/unit_test/research_design_id_collision/Run() - var/list/datum/design/designs = instantiate_all_hardcoded_designs() - var/list/ids_seen = list() - for(var/datum/design/D as anything in designs) - if(ids_seen[D.id]) - TEST_FAIL("Duplicate on [D.id]: [D] - [D.type]") - continue - ids_seen[D.id] = TRUE diff --git a/code/modules/vore/eating/digest_act_vr.dm b/code/modules/vore/eating/digest_act_vr.dm index 2e77b0ffdce1..8ae90cb38844 100644 --- a/code/modules/vore/eating/digest_act_vr.dm +++ b/code/modules/vore/eating/digest_act_vr.dm @@ -71,13 +71,7 @@ id = null . = ..() -/obj/item/card/id/digest_act(var/atom/movable/item_storage = null) - desc = "A partially digested card that has seen better days. The damage appears to be only cosmetic, but the access codes need to be reprogrammed at the HoP office." - icon = 'icons/obj/card_vr.dmi' - icon_state = "[initial(icon_state)]_digested" - if(!(LAZYLEN(lost_access)) && LAZYLEN(access)) - lost_access = access //Do not forget what access we lose - access = list() // Then lose it +/obj/item/card/id/digest_act(atom/item_storage) return FALSE /obj/item/reagent_containers/food/digest_act(var/atom/movable/item_storage = null) diff --git a/code/modules/vore/fluffstuff/custom_guns.dm b/code/modules/vore/fluffstuff/custom_guns.dm index 62dc29bfa9e7..6984d9c6e1ac 100644 --- a/code/modules/vore/fluffstuff/custom_guns.dm +++ b/code/modules/vore/fluffstuff/custom_guns.dm @@ -109,7 +109,7 @@ w_class = ITEMSIZE_NORMAL damage_force = 10 origin_tech = list(TECH_COMBAT = 4, TECH_MAGNET = 2) - matter = list(MAT_STEEL = 2000) + materials = list(MAT_STEEL = 2000) projectile_type = /obj/projectile/beam/imperial /* CITADEL CHANGE - Removes Virgo Fluff // jertheace : Jeremiah 'Ace' Acacius @@ -584,7 +584,7 @@ END OF CITADEL CHANGES */ icon_state = "smg" origin_tech = list(TECH_COMBAT = 2) mag_type = MAGAZINE - matter = list(MAT_STEEL = 1800) + materials = list(MAT_STEEL = 1800) caliber = "9mm" ammo_type = /obj/item/ammo_casing/a9mm max_ammo = 30 @@ -670,7 +670,7 @@ END OF CITADEL CHANGES */ icon_state = "9x19p" origin_tech = list(TECH_COMBAT = 2) mag_type = MAGAZINE - matter = list(MAT_STEEL = 480) + materials = list(MAT_STEEL = 480) caliber = ".380" ammo_type = /obj/item/ammo_casing/a380 max_ammo = 8 @@ -693,7 +693,7 @@ END OF CITADEL CHANGES */ icon = 'icons/obj/ammo_vr.dmi' icon_state = "s357" caliber = ".44" - matter = list(MAT_STEEL = 1260) + materials = list(MAT_STEEL = 1260) ammo_type = /obj/item/ammo_casing/a44 max_ammo = 6 multiple_sprites = 1 diff --git a/code/modules/vore/fluffstuff/custom_items.dm b/code/modules/vore/fluffstuff/custom_items.dm index 7bfebfc2c4e2..1b5d343d20c8 100644 --- a/code/modules/vore/fluffstuff/custom_items.dm +++ b/code/modules/vore/fluffstuff/custom_items.dm @@ -542,7 +542,7 @@ damage_force = 5.0 throw_force = 7.0 w_class = ITEMSIZE_SMALL - matter = list(MAT_STEEL = 50) + materials = list(MAT_STEEL = 50) attack_verb = list("bludgeoned", "whacked", "disciplined", "thrashed") /obj/item/cane/fluff/tasald @@ -561,7 +561,7 @@ damage_force = 1.0 throw_force = 2.0 w_class = ITEMSIZE_SMALL - matter = list(MAT_STEEL = 50) + materials = list(MAT_STEEL = 50) attack_verb = list("sparkled", "whacked", "twinkled", "radiated", "dazzled", "zapped") hitsound = 'sound/weapons/sparkle.ogg' var/last_use = 0 diff --git a/code/modules/vore/fluffstuff/guns/cell_loaded/medigun_cells.dm b/code/modules/vore/fluffstuff/guns/cell_loaded/medigun_cells.dm index c3d4987af30d..389ba521281a 100644 --- a/code/modules/vore/fluffstuff/guns/cell_loaded/medigun_cells.dm +++ b/code/modules/vore/fluffstuff/guns/cell_loaded/medigun_cells.dm @@ -197,11 +197,11 @@ /obj/projectile/beam/medical_cell/haste/on_hit(var/mob/living/carbon/human/target) if(istype(target, /mob/living/carbon/human)) - target.add_modifier(/datum/modifier/ml3mhaste, 20 SECONDS) + target.add_modifier(/datum/modifier/medigunhaste, 20 SECONDS) else return 1 -/datum/modifier/ml3mhaste +/datum/modifier/medigunhaste name = "haste" desc = "You can move much faster!" mob_overlay_state = "haste" diff --git a/code/modules/xenoarcheaology/tools/tools.dm b/code/modules/xenoarcheaology/tools/tools.dm index 7e164ad221f4..34db36481cc1 100644 --- a/code/modules/xenoarcheaology/tools/tools.dm +++ b/code/modules/xenoarcheaology/tools/tools.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/xenoarchaeology.dmi' icon_state = "measuring" origin_tech = list(TECH_MATERIAL = 1) - matter = list(MAT_STEEL = 100) + materials = list(MAT_STEEL = 100) w_class = ITEMSIZE_SMALL /obj/item/storage/bag/fossils @@ -37,7 +37,7 @@ icon_state = "flashgun" item_state = "lampgreen" origin_tech = list(TECH_BLUESPACE = 3, TECH_MAGNET = 3, TECH_ARCANE = 1) - matter = list(MAT_STEEL = 10000, MAT_GLASS = 5000) + materials = list(MAT_STEEL = 10000, MAT_GLASS = 5000) w_class = ITEMSIZE_SMALL slot_flags = SLOT_BELT @@ -98,7 +98,7 @@ icon_state = "depth_scanner" item_state = "analyzer" origin_tech = list(TECH_MAGNET = 2, TECH_ENGINEERING = 2, TECH_BLUESPACE = 2) - matter = list(MAT_STEEL = 1000, MAT_GLASS = 1000) + materials = list(MAT_STEEL = 1000, MAT_GLASS = 1000) w_class = ITEMSIZE_SMALL slot_flags = SLOT_BELT var/list/positive_locations = list() @@ -232,7 +232,7 @@ icon_state = "pinoff" //pinonfar, pinonmedium, pinonclose, pinondirect, pinonnull item_state = "electronic" origin_tech = list(TECH_MAGNET = 3, TECH_ENGINEERING = 2, TECH_BLUESPACE = 3) - matter = list(MAT_STEEL = 1000, MAT_GLASS = 500) + materials = list(MAT_STEEL = 1000, MAT_GLASS = 500) var/frequency = PUB_FREQ var/scan_ticks = 0 var/obj/item/radio/target_radio @@ -334,7 +334,7 @@ item_state = "lampgreen" icon = 'icons/obj/xenoarchaeology.dmi' origin_tech = list(TECH_MAGNET = 3, TECH_ENGINEERING = 3, TECH_BLUESPACE = 2, TECH_ARCANE = 1) - matter = list(MAT_STEEL = 10000, MAT_GLASS = 5000) + materials = list(MAT_STEEL = 10000, MAT_GLASS = 5000) w_class = ITEMSIZE_SMALL slot_flags = SLOT_BELT var/mode = 1 //Start off scanning. 1 = scanning, 0 = measuring diff --git a/icons/README.md b/icons/README.md index 19456299265f..b44d08be8ecf 100644 --- a/icons/README.md +++ b/icons/README.md @@ -21,6 +21,7 @@ Yes, this currently includes all turfs, mobs, objs, and misc things. Sorry. We'l - /rank - "formal" "rank"-wear like flight suits, military/naval, etc - /gearsets - bundled sets, like voidsuits, cryosuits, etc - /items - general, non-module, non-clothing items placed in here + - /interface - used for stuff going into spritesheets for tgui, etc. if it's a HUD object, it should go in /screen instead. - /machinery - used for sprites for general, non-module machines. use subdirectories if more than one .dmi is needed, or for closely related machinery. - /mapping - used for sprites for in-map-editor objects that are invisible in game world - /helpers - mapping helpers like autopipe/autocable/baseturf replacers go here diff --git a/icons/interface/materials.dmi b/icons/interface/materials.dmi new file mode 100644 index 000000000000..8a119ebd5c10 Binary files /dev/null and b/icons/interface/materials.dmi differ diff --git a/icons/machinery/lathe/autolathe.dmi b/icons/machinery/lathe/autolathe.dmi new file mode 100644 index 000000000000..59bf1276a5f9 Binary files /dev/null and b/icons/machinery/lathe/autolathe.dmi differ diff --git a/icons/obj/machines/fabricators/autolathe.dmi b/icons/obj/machines/fabricators/autolathe.dmi deleted file mode 100644 index 84488e497b02..000000000000 Binary files a/icons/obj/machines/fabricators/autolathe.dmi and /dev/null differ diff --git a/maps/away_missions/140x140/zoo.dmm b/maps/away_missions/140x140/zoo.dmm index 6bb737ee1231..e9fb75860424 100644 --- a/maps/away_missions/140x140/zoo.dmm +++ b/maps/away_missions/140x140/zoo.dmm @@ -1905,9 +1905,8 @@ /turf/simulated/shuttle/floor/black, /area/awaymission/zoo/tradeship) "fI" = ( -/obj/machinery/autolathe{ +/obj/machinery/lathe/autolathe{ desc = "Your typical Autolathe. It appears to have much more options than your regular one, however..."; - hacked = 1; name = "Unlocked Autolathe" }, /turf/simulated/shuttle/floor/black, @@ -8263,7 +8262,7 @@ /turf/simulated/floor, /area/awaymission/zoo) "wf" = ( -/obj/machinery/autolathe, +/obj/machinery/lathe/autolathe, /turf/simulated/floor/tiled/dark, /area/awaymission/zoo) "wg" = ( diff --git a/maps/away_missions/archive/Academy.dmm b/maps/away_missions/archive/Academy.dmm index 67e99c5aa00a..0870df3706a5 100644 --- a/maps/away_missions/archive/Academy.dmm +++ b/maps/away_missions/archive/Academy.dmm @@ -487,7 +487,7 @@ /turf/simulated/floor/plating, /area/awaymission/academy/headmaster) "bS" = ( -/obj/machinery/autolathe, +/obj/machinery/lathe/autolathe, /obj/structure/cable{ icon_state = "0-2" }, diff --git a/maps/away_missions/archive/zresearchlabs.dmm b/maps/away_missions/archive/zresearchlabs.dmm index f837759dd81f..8dbdc7b12e11 100644 --- a/maps/away_missions/archive/zresearchlabs.dmm +++ b/maps/away_missions/archive/zresearchlabs.dmm @@ -290,7 +290,7 @@ pixel_x = -1; pixel_y = 7 }, -/obj/item/circuitboard/autolathe, +/obj/item/circuitboard/machine/lathe/autolathe, /turf/simulated/floor{ icon_state = "white" }, @@ -1324,7 +1324,7 @@ }, /area/awaymission/labs/militarydivision) "et" = ( -/obj/machinery/autolathe, +/obj/machinery/lathe/autolathe, /obj/machinery/light{ dir = 1 }, @@ -1569,7 +1569,7 @@ }, /area/awaymission/labs/researchdivision) "fd" = ( -/obj/machinery/autolathe, +/obj/machinery/lathe/autolathe, /turf/simulated/floor{ icon_state = "white" }, @@ -4437,7 +4437,7 @@ /turf/simulated/floor, /area/awaymission/labs/cargo) "mC" = ( -/obj/machinery/autolathe, +/obj/machinery/lathe/autolathe, /obj/effect/debris/cleanable/dirt, /obj/machinery/light{ dir = 1 diff --git a/maps/euthenia/levels/deck1.dmm b/maps/euthenia/levels/deck1.dmm index 8d6dde8ba541..09a205a43953 100644 --- a/maps/euthenia/levels/deck1.dmm +++ b/maps/euthenia/levels/deck1.dmm @@ -1460,9 +1460,7 @@ /obj/effect/floor_decal/corner_techfloor_grid{ dir = 5 }, -/obj/machinery/autolathe{ - hacked = 1 - }, +/obj/machinery/lathe/autolathe, /obj/effect/floor_decal/corner/blue{ dir = 10 }, @@ -6278,9 +6276,7 @@ dir = 5 }, /obj/effect/floor_decal/industrial/outline/blue, -/obj/machinery/autolathe{ - hacked = 1 - }, +/obj/machinery/lathe/autolathe, /turf/simulated/floor/tiled/dark, /area/security/armoury) "eye" = ( @@ -22041,9 +22037,7 @@ /area/medical/medbay) "qqA" = ( /obj/effect/floor_decal/corner/mauve/full, -/obj/machinery/autolathe{ - hacked = 1 - }, +/obj/machinery/lathe/autolathe, /obj/effect/floor_decal/industrial/warning, /obj/effect/floor_decal/corner/mauve{ dir = 4 @@ -31775,9 +31769,7 @@ /obj/effect/floor_decal/corner/red/border{ dir = 8 }, -/obj/machinery/autolathe{ - hacked = 1 - }, +/obj/machinery/lathe/autolathe, /turf/simulated/floor/tiled/dark, /area/tether/surfacebase/security/armory) "xSn" = ( diff --git a/maps/euthenia/levels/deck2.dmm b/maps/euthenia/levels/deck2.dmm index d1127231fca2..7f370d756842 100644 --- a/maps/euthenia/levels/deck2.dmm +++ b/maps/euthenia/levels/deck2.dmm @@ -12178,7 +12178,7 @@ /turf/simulated/floor/tiled/neutral, /area/space) "jLd" = ( -/obj/machinery/autolathe, +/obj/machinery/lathe/autolathe, /turf/simulated/floor/tiled/techmaint, /area/engineering/hallway) "jLf" = ( @@ -23618,9 +23618,7 @@ /turf/simulated/floor/plating, /area/space) "sCZ" = ( -/obj/machinery/autolathe{ - hacked = 1 - }, +/obj/machinery/lathe/autolathe, /obj/machinery/requests_console{ department = "Robotics"; departmentType = 2; diff --git a/maps/map_levels/140x140/talon/talon1.dmm b/maps/map_levels/140x140/talon/talon1.dmm index 08d474a75e1f..4fb2fe6c1eac 100644 --- a/maps/map_levels/140x140/talon/talon1.dmm +++ b/maps/map_levels/140x140/talon/talon1.dmm @@ -4,7 +4,7 @@ dir = 1; pixel_y = -25 }, -/obj/machinery/autolathe, +/obj/machinery/lathe/autolathe, /turf/simulated/floor/tiled/eris/steel/gray_perforated, /area/talon/deckone/workroom) "ac" = ( @@ -2353,7 +2353,7 @@ /area/talon/deckone/starboard_eng) "ux" = ( /obj/machinery/vending/engivend{ - products = list(/obj/item/geiger_counter=4,/obj/item/clothing/glasses/meson=2,/obj/item/multitool=4,/obj/item/cell/high=10,/obj/item/airlock_electronics=10,/obj/item/module/power_control=10,/obj/item/circuitboard/airalarm=10,/obj/item/circuitboard/firealarm=10,/obj/item/circuitboard/status_display=2,/obj/item/circuitboard/ai_status_display=2,/obj/item/circuitboard/newscaster=2,/obj/item/circuitboard/holopad=2,/obj/item/circuitboard/intercom=4,/obj/item/circuitboard/security/telescreen/entertainment=4,/obj/item/stock_parts/motor=2,/obj/item/stock_parts/spring=2,/obj/item/stock_parts/gear=2,/obj/item/circuitboard/atm,/obj/item/circuitboard/guestpass,/obj/item/circuitboard/keycard_auth,/obj/item/circuitboard/photocopier,/obj/item/circuitboard/fax,/obj/item/circuitboard/request,/obj/item/circuitboard/microwave,/obj/item/circuitboard/washing,/obj/item/circuitboard/scanner_console,/obj/item/circuitboard/sleeper_console,/obj/item/circuitboard/body_scanner,/obj/item/circuitboard/sleeper,/obj/item/circuitboard/dna_analyzer,/obj/item/circuitboard/partslathe); + products = list(/obj/item/geiger_counter=4,/obj/item/clothing/glasses/meson=2,/obj/item/multitool=4,/obj/item/cell/high=10,/obj/item/airlock_electronics=10,/obj/item/module/power_control=10,/obj/item/circuitboard/airalarm=10,/obj/item/circuitboard/firealarm=10,/obj/item/circuitboard/status_display=2,/obj/item/circuitboard/ai_status_display=2,/obj/item/circuitboard/newscaster=2,/obj/item/circuitboard/machine/holopad=2,/obj/item/circuitboard/intercom=4,/obj/item/circuitboard/security/telescreen/entertainment=4,/obj/item/stock_parts/motor=2,/obj/item/stock_parts/spring=2,/obj/item/stock_parts/gear=2,/obj/item/circuitboard/atm,/obj/item/circuitboard/guestpass,/obj/item/circuitboard/keycard_auth,/obj/item/circuitboard/photocopier,/obj/item/circuitboard/fax,/obj/item/circuitboard/request,/obj/item/circuitboard/microwave,/obj/item/circuitboard/washing,/obj/item/circuitboard/scanner_console,/obj/item/circuitboard/sleeper_console,/obj/item/circuitboard/body_scanner,/obj/item/circuitboard/sleeper,/obj/item/circuitboard/dna_analyzer); req_access = list(301); req_log_access = 301 }, diff --git a/maps/rift/levels/rift-03-underground1.dmm b/maps/rift/levels/rift-03-underground1.dmm index bc18f5df7229..ec3b4cf4593f 100644 --- a/maps/rift/levels/rift-03-underground1.dmm +++ b/maps/rift/levels/rift-03-underground1.dmm @@ -5938,7 +5938,7 @@ pixel_y = 1 }, /obj/item/circuitboard/rdconsole, -/obj/item/circuitboard/autolathe{ +/obj/item/circuitboard/machine/lathe/autolathe{ pixel_x = 1; pixel_y = -1 }, @@ -10848,7 +10848,6 @@ /obj/item/stock_parts/matter_bin, /obj/item/stock_parts/manipulator, /obj/item/stock_parts/console_screen, -/obj/item/circuitboard/partslathe, /obj/structure/table/rack/shelf/steel, /turf/simulated/floor/plating, /area/storage/tech) @@ -11086,7 +11085,7 @@ /turf/simulated/floor/tiled/dark, /area/tcommsat/chamber) "KJ" = ( -/obj/machinery/autolathe, +/obj/machinery/lathe/autolathe, /turf/simulated/floor/tiled/steel, /area/rift/station/fighter_bay/maintenance) "KK" = ( @@ -12762,7 +12761,7 @@ /obj/item/stock_parts/matter_bin, /obj/item/stock_parts/manipulator, /obj/item/stock_parts/console_screen, -/obj/item/circuitboard/autolathe, +/obj/item/circuitboard/machine/lathe/autolathe, /obj/structure/table/rack/shelf/steel, /turf/simulated/floor/plating, /area/storage/tech) diff --git a/maps/rift/levels/rift-04-surface1.dmm b/maps/rift/levels/rift-04-surface1.dmm index dd07851f0b5a..511c0b2c2868 100644 --- a/maps/rift/levels/rift-04-surface1.dmm +++ b/maps/rift/levels/rift-04-surface1.dmm @@ -11964,7 +11964,7 @@ /turf/simulated/wall/prepainted/medical, /area/medical/psych_ward) "hIz" = ( -/obj/machinery/autolathe, +/obj/machinery/lathe/autolathe, /obj/effect/floor_decal/rust, /turf/simulated/floor/plating, /area/maintenance/cargo) @@ -35488,7 +35488,7 @@ /area/maintenance/substation/medical) "vLK" = ( /obj/structure/closet/crate, -/obj/item/circuitboard/autolathe, +/obj/item/circuitboard/machine/lathe/autolathe, /turf/simulated/floor/plating, /area/maintenance/library) "vLP" = ( @@ -39486,7 +39486,7 @@ /obj/effect/floor_decal/corner/brown/border{ dir = 1 }, -/obj/machinery/autolathe, +/obj/machinery/lathe/autolathe, /obj/machinery/light{ dir = 1 }, diff --git a/maps/rift/levels/rift-05-surface2.dmm b/maps/rift/levels/rift-05-surface2.dmm index 625170727566..5dffb280473d 100644 --- a/maps/rift/levels/rift-05-surface2.dmm +++ b/maps/rift/levels/rift-05-surface2.dmm @@ -333,9 +333,7 @@ /turf/simulated/floor/tiled/steel, /area/rnd/research/researchdivision) "aok" = ( -/obj/machinery/autolathe{ - hacked = 1 - }, +/obj/machinery/lathe/autolathe, /turf/simulated/floor/tiled/dark, /area/security/armory/blue) "aos" = ( @@ -6812,7 +6810,7 @@ /obj/effect/floor_decal/corner/purple/border{ dir = 8 }, -/obj/machinery/autolathe, +/obj/machinery/lathe/autolathe, /turf/simulated/floor/tiled/steel, /area/assembly/robotics) "enB" = ( @@ -25025,7 +25023,7 @@ /obj/machinery/holoposter{ pixel_x = -32 }, -/obj/machinery/autolathe, +/obj/machinery/lathe/autolathe, /turf/simulated/floor/tiled/steel, /area/rnd/research) "pyL" = ( diff --git a/maps/rift/levels/rift-06-surface3.dmm b/maps/rift/levels/rift-06-surface3.dmm index 97a12889a544..36b384d3abdc 100644 --- a/maps/rift/levels/rift-06-surface3.dmm +++ b/maps/rift/levels/rift-06-surface3.dmm @@ -10270,9 +10270,7 @@ /turf/simulated/floor/tiled/dark, /area/bridge/office) "aCo" = ( -/obj/machinery/autolathe{ - hacked = 1 - }, +/obj/machinery/lathe/autolathe, /turf/simulated/floor/tiled/techfloor, /area/shuttle/excursion/cargo) "aCq" = ( diff --git a/maps/rift/levels/rift-11-orbital.dmm b/maps/rift/levels/rift-11-orbital.dmm index 6d2bfc7ddacd..a01cf1876c18 100644 --- a/maps/rift/levels/rift-11-orbital.dmm +++ b/maps/rift/levels/rift-11-orbital.dmm @@ -7665,9 +7665,8 @@ /turf/unsimulated/floor/dark, /area/centcom/specops) "Cb" = ( -/obj/machinery/autolathe{ +/obj/machinery/lathe/autolathe{ desc = "Your typical Autolathe. It appears to have much more options than your regular one, however..."; - hacked = 1; name = "Unlocked Autolathe" }, /obj/effect/floor_decal/industrial/outline/blue, diff --git a/maps/sectors/piratebase_192/levels/piratebase_192.dmm b/maps/sectors/piratebase_192/levels/piratebase_192.dmm index 0eeb4288a1af..c3d2ecd16b21 100644 --- a/maps/sectors/piratebase_192/levels/piratebase_192.dmm +++ b/maps/sectors/piratebase_192/levels/piratebase_192.dmm @@ -849,9 +849,7 @@ /turf/simulated/floor/tiled/steel_dirty/silver, /area/piratebase/mess) "ie" = ( -/obj/machinery/autolathe{ - hacked = 1 - }, +/obj/machinery/lathe/autolathe, /turf/simulated/floor/tiled/steel_dirty/dark, /area/piratebase/dock) "if" = ( diff --git a/maps/sectors/tradeport_140/levels/tradeport_140.dmm b/maps/sectors/tradeport_140/levels/tradeport_140.dmm index f62836efb22f..6470de130562 100644 --- a/maps/sectors/tradeport_140/levels/tradeport_140.dmm +++ b/maps/sectors/tradeport_140/levels/tradeport_140.dmm @@ -4232,9 +4232,8 @@ /turf/space, /area/space) "pL" = ( -/obj/machinery/autolathe{ +/obj/machinery/lathe/autolathe{ desc = "Your typical Autolathe. It appears to have much more options than your regular one, however..."; - hacked = 1; name = "Unlocked Autolathe" }, /obj/machinery/atmospherics/pipe/simple/hidden, @@ -10821,9 +10820,8 @@ /turf/simulated/shuttle/wall/voidcraft/hard_corner, /area/shuttle/trade_ship/general) "Pt" = ( -/obj/machinery/autolathe{ +/obj/machinery/lathe/autolathe{ desc = "Your typical Autolathe. It appears to have much more options than your regular one, however..."; - hacked = 1; name = "Unlocked Autolathe" }, /turf/simulated/floor/tiled/dark, diff --git a/maps/sectors/tradeport_192/levels/tradeport_192.dmm b/maps/sectors/tradeport_192/levels/tradeport_192.dmm index 625d90e4882d..9c8d0b4d9966 100644 --- a/maps/sectors/tradeport_192/levels/tradeport_192.dmm +++ b/maps/sectors/tradeport_192/levels/tradeport_192.dmm @@ -9447,9 +9447,8 @@ /turf/simulated/floor/plating, /area/tradeport/expansion) "Ks" = ( -/obj/machinery/autolathe{ +/obj/machinery/lathe/autolathe{ desc = "Your typical Autolathe. It appears to have much more options than your regular one, however..."; - hacked = 1; name = "Unlocked Autolathe" }, /obj/machinery/atmospherics/pipe/simple/hidden, @@ -9499,9 +9498,8 @@ /turf/simulated/floor/tiled/techfloor/grid, /area/tradeport/engineering) "KE" = ( -/obj/machinery/autolathe{ +/obj/machinery/lathe/autolathe{ desc = "Your typical Autolathe. It appears to have much more options than your regular one, however..."; - hacked = 1; name = "Unlocked Autolathe" }, /turf/simulated/floor/tiled/dark, diff --git a/maps/submaps/level_specific/class_h/AuxiliaryResearchFacility.dmm b/maps/submaps/level_specific/class_h/AuxiliaryResearchFacility.dmm index ed5dd97e1377..12a8cd0836a3 100644 --- a/maps/submaps/level_specific/class_h/AuxiliaryResearchFacility.dmm +++ b/maps/submaps/level_specific/class_h/AuxiliaryResearchFacility.dmm @@ -490,7 +490,7 @@ /turf/simulated/floor/tiled/white, /area/class_h/POIs/AuxiliaryResearchFacility) "kU" = ( -/obj/machinery/autolathe, +/obj/machinery/lathe/autolathe, /obj/effect/floor_decal/corner/purple/border{ dir = 10 }, diff --git a/maps/submaps/level_specific/class_p/HeadscientistHQ.dmm b/maps/submaps/level_specific/class_p/HeadscientistHQ.dmm index b3e9f3907d7f..a6d933095768 100644 --- a/maps/submaps/level_specific/class_p/HeadscientistHQ.dmm +++ b/maps/submaps/level_specific/class_p/HeadscientistHQ.dmm @@ -206,7 +206,7 @@ /turf/simulated/shuttle/floor/yellow, /area/submap/HeadscientistHQ) "ix" = ( -/obj/machinery/autolathe, +/obj/machinery/lathe/autolathe, /turf/simulated/shuttle/floor/purple/classp, /area/submap/HeadscientistHQ) "iy" = ( @@ -635,7 +635,7 @@ /turf/simulated/shuttle/floor/purple/classp, /area/submap/HeadscientistHQ) "Dm" = ( -/obj/machinery/partslathe, +/obj/machinery/lathe/autolathe, /turf/simulated/shuttle/floor/purple/classp, /area/submap/HeadscientistHQ) "Dn" = ( diff --git a/maps/templates/admin/dhael_centcom.dmm b/maps/templates/admin/dhael_centcom.dmm index 1eee3b6c6411..ae6823e2773d 100644 --- a/maps/templates/admin/dhael_centcom.dmm +++ b/maps/templates/admin/dhael_centcom.dmm @@ -1171,9 +1171,8 @@ }, /area/centcom/specops) "de" = ( -/obj/machinery/autolathe{ +/obj/machinery/lathe/autolathe{ desc = "Your typical Autolathe. It appears to have much more options than your regular one, however..."; - hacked = 1; name = "Unlocked Autolathe" }, /obj/effect/floor_decal/industrial/outline/blue, @@ -1442,9 +1441,8 @@ /turf/unsimulated/floor/steel, /area/centcom/control) "dI" = ( -/obj/machinery/autolathe{ +/obj/machinery/lathe/autolathe{ desc = "Your typical Autolathe. It appears to have much more options than your regular one, however..."; - hacked = 1; name = "Centcom Autolathe" }, /obj/effect/floor_decal/borderfloorwhite{ @@ -1546,9 +1544,8 @@ /turf/simulated/floor/tiled/white, /area/centcom/control) "dP" = ( -/obj/machinery/autolathe{ +/obj/machinery/lathe/autolathe{ desc = "Your typical Autolathe. It appears to have much more options than your regular one, however..."; - hacked = 1; name = "Centcom Autolathe" }, /obj/effect/floor_decal/industrial/warning{ @@ -13917,9 +13914,8 @@ /turf/unsimulated/floor/steel, /area/centcom/evac) "Tx" = ( -/obj/machinery/autolathe{ +/obj/machinery/lathe/autolathe{ desc = "Your typical Autolathe. It appears to have much more options than your regular one, however..."; - hacked = 1; name = "Unlocked Autolathe" }, /turf/unsimulated/floor{ diff --git a/maps/templates/admin/ert.dmm b/maps/templates/admin/ert.dmm index c8597658c1f9..4b98d531e7c0 100644 --- a/maps/templates/admin/ert.dmm +++ b/maps/templates/admin/ert.dmm @@ -895,9 +895,8 @@ /turf/simulated/floor/tiled/techfloor, /area/ship/ert/engineering) "hP" = ( -/obj/machinery/autolathe{ +/obj/machinery/lathe/autolathe{ desc = "Your typical Autolathe. It appears to have much more options than your regular one, however..."; - hacked = 1; name = "Unlocked Autolathe" }, /turf/simulated/floor/tiled/techfloor, diff --git a/maps/templates/admin/ert_base.dmm b/maps/templates/admin/ert_base.dmm index 7c01b7fb14db..a4e5aba3d53b 100644 --- a/maps/templates/admin/ert_base.dmm +++ b/maps/templates/admin/ert_base.dmm @@ -1705,9 +1705,8 @@ /turf/simulated/shuttle/floor/black, /area/shuttle/specops/centcom) "dB" = ( -/obj/machinery/autolathe{ +/obj/machinery/lathe/autolathe{ desc = "Your typical Autolathe. It appears to have much more options than your regular one, however..."; - hacked = 1; name = "Unlocked Autolathe" }, /turf/simulated/shuttle/floor/black, diff --git a/maps/templates/archive/tradeship.dmm b/maps/templates/archive/tradeship.dmm index 9b1d7bba5dd3..368bbece7de8 100644 --- a/maps/templates/archive/tradeship.dmm +++ b/maps/templates/archive/tradeship.dmm @@ -1354,9 +1354,8 @@ /turf/simulated/shuttle/floor/black, /area/shuttle/trade) "dm" = ( -/obj/machinery/autolathe{ +/obj/machinery/lathe/autolathe{ desc = "Your typical Autolathe. It appears to have much more options than your regular one, however..."; - hacked = 1; name = "Unlocked Autolathe" }, /turf/simulated/shuttle/floor/black, diff --git a/maps/templates/shelters/shelter_4.dmm b/maps/templates/shelters/shelter_4.dmm index e360db8303f6..954cb1d695f7 100644 --- a/maps/templates/shelters/shelter_4.dmm +++ b/maps/templates/shelters/shelter_4.dmm @@ -363,8 +363,7 @@ /turf/simulated/shuttle/wall/voidcraft/survival/hard_corner, /area/survivalpod) "K" = ( -/obj/machinery/autolathe{ - hacked = 1; +/obj/machinery/lathe/autolathe{ name = "military autolathe" }, /turf/simulated/shuttle/floor/voidcraft/dark, diff --git a/maps/templates/shuttles/overmaps/generic/cruiser.dmm b/maps/templates/shuttles/overmaps/generic/cruiser.dmm index ef08370d5370..c0e5f073257f 100644 --- a/maps/templates/shuttles/overmaps/generic/cruiser.dmm +++ b/maps/templates/shuttles/overmaps/generic/cruiser.dmm @@ -3965,9 +3965,6 @@ /obj/machinery/light{ dir = 1 }, -/obj/machinery/computer/id_restorer{ - pixel_y = 28 - }, /turf/simulated/floor/tiled/white, /area/mothership/resleeving) "iY" = ( @@ -5565,9 +5562,8 @@ /turf/simulated/floor/tiled/steel_grid, /area/mothership/rnd) "mn" = ( -/obj/machinery/autolathe{ +/obj/machinery/lathe/autolathe{ desc = "Your typical Autolathe. It appears to have much more options than your regular one, however..."; - hacked = 1; name = "Centcom Autolathe" }, /turf/simulated/floor/tiled/steel_grid, diff --git a/maps/templates/shuttles/overmaps/generic/curashuttle.dmm b/maps/templates/shuttles/overmaps/generic/curashuttle.dmm index 9c6c815ba80c..0188933d1856 100644 --- a/maps/templates/shuttles/overmaps/generic/curashuttle.dmm +++ b/maps/templates/shuttles/overmaps/generic/curashuttle.dmm @@ -1240,7 +1240,7 @@ /obj/machinery/atmospherics/pipe/simple/visible/red{ dir = 9 }, -/obj/machinery/autolathe, +/obj/machinery/lathe/autolathe, /turf/simulated/floor/tiled/techfloor/grid, /area/shuttle/curabitur/curashuttle/eng) "cx" = ( diff --git a/maps/templates/shuttles/overmaps/generic/mercship.dmm b/maps/templates/shuttles/overmaps/generic/mercship.dmm index 9728dbf34f51..2ed8b2cb54b4 100644 --- a/maps/templates/shuttles/overmaps/generic/mercship.dmm +++ b/maps/templates/shuttles/overmaps/generic/mercship.dmm @@ -267,8 +267,7 @@ /turf/simulated/floor/tiled/dark, /area/ship/mercenary/med) "aJ" = ( -/obj/machinery/autolathe{ - hacked = 1; +/obj/machinery/lathe/autolathe{ name = "unlocked autolathe" }, /obj/effect/floor_decal/borderfloorblack{ @@ -2920,8 +2919,7 @@ /turf/simulated/floor/tiled/white, /area/ship/mercenary/fighter) "fX" = ( -/obj/machinery/autolathe{ - hacked = 1; +/obj/machinery/lathe/autolathe{ name = "unlocked autolathe" }, /obj/effect/floor_decal/borderfloorblack{ diff --git a/maps/templates/shuttles/overmaps/generic/screebarge.dmm b/maps/templates/shuttles/overmaps/generic/screebarge.dmm index 49f28c93b9eb..fde4851e5478 100644 --- a/maps/templates/shuttles/overmaps/generic/screebarge.dmm +++ b/maps/templates/shuttles/overmaps/generic/screebarge.dmm @@ -222,7 +222,7 @@ /turf/simulated/floor/reinforced, /area/shuttle/screebarge/fore) "aE" = ( -/obj/machinery/autolathe, +/obj/machinery/lathe/autolathe, /turf/simulated/floor/reinforced, /area/shuttle/screebarge/fore) "aF" = ( diff --git a/maps/templates/shuttles/overmaps/generic/shelter_6.dmm b/maps/templates/shuttles/overmaps/generic/shelter_6.dmm index 49a1a80e4ab2..68c69a4f658f 100644 --- a/maps/templates/shuttles/overmaps/generic/shelter_6.dmm +++ b/maps/templates/shuttles/overmaps/generic/shelter_6.dmm @@ -451,12 +451,7 @@ /turf/simulated/floor/reinforced, /area/shuttle/tabiranth) "au" = ( -/obj/machinery/autolathe{ - desc = "Your typical Autolathe. It appears to have much more options than your regular one, however..."; - hacked = 1; - mat_efficiency = 0.5; - name = "Centcom Autolathe" - }, +/obj/machinery/lathe/autolathe, /turf/simulated/floor/bluegrid, /area/shuttle/tabiranth) "av" = ( diff --git a/maps/templates/shuttles/overmaps/generic/vespa.dmm b/maps/templates/shuttles/overmaps/generic/vespa.dmm index 29a6f0194ec4..10e9e26a5b5a 100644 --- a/maps/templates/shuttles/overmaps/generic/vespa.dmm +++ b/maps/templates/shuttles/overmaps/generic/vespa.dmm @@ -7349,8 +7349,7 @@ /obj/effect/floor_decal/corner/purple/border{ dir = 5 }, -/obj/machinery/autolathe{ - hacked = 1; +/obj/machinery/lathe/autolathe{ name = "unlocked autolathe" }, /turf/simulated/floor/tiled/techfloor, @@ -8067,7 +8066,7 @@ /turf/simulated/floor/tiled/techfloor, /area/ship/expe/engineeringequipment) "rz" = ( -/obj/machinery/autolathe, +/obj/machinery/lathe/autolathe, /obj/effect/floor_decal/borderfloorblack, /obj/effect/floor_decal/corner/yellow/border, /turf/simulated/floor/tiled/techfloor, diff --git a/maps/tether/levels/station1.dmm b/maps/tether/levels/station1.dmm index 0f5e1c0d693b..128d52ebe0ab 100644 --- a/maps/tether/levels/station1.dmm +++ b/maps/tether/levels/station1.dmm @@ -11344,10 +11344,6 @@ /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 1 }, -/obj/machinery/computer/id_restorer{ - dir = 1; - pixel_y = -32 - }, /obj/effect/floor_decal/corner/lightgrey/border, /turf/simulated/floor/tiled, /area/hallway/station/atrium) @@ -25196,7 +25192,7 @@ /turf/simulated/floor/tiled/white, /area/shuttle/medivac/general) "wZd" = ( -/obj/machinery/autolathe, +/obj/machinery/lathe/autolathe, /turf/simulated/floor/tiled, /area/security/checkpoint/science) "xdE" = ( diff --git a/maps/tether/levels/station2.dmm b/maps/tether/levels/station2.dmm index 43c1966b3707..f96d53f0fd87 100644 --- a/maps/tether/levels/station2.dmm +++ b/maps/tether/levels/station2.dmm @@ -2000,7 +2000,6 @@ /obj/item/stock_parts/matter_bin, /obj/item/stock_parts/manipulator, /obj/item/stock_parts/console_screen, -/obj/item/circuitboard/partslathe, /turf/simulated/floor/plating, /area/storage/tech) "akN" = ( @@ -2022,7 +2021,7 @@ /obj/item/stock_parts/manipulator, /obj/structure/table/rack/steel, /obj/item/stock_parts/console_screen, -/obj/item/circuitboard/autolathe, +/obj/item/circuitboard/machine/lathe/autolathe, /turf/simulated/floor/plating, /area/storage/tech) "akP" = ( @@ -2559,7 +2558,7 @@ pixel_y = 1 }, /obj/item/circuitboard/rdconsole, -/obj/item/circuitboard/autolathe{ +/obj/item/circuitboard/machine/lathe/autolathe{ pixel_x = 1; pixel_y = -1 }, @@ -24209,7 +24208,7 @@ /obj/effect/floor_decal/corner/brown/border{ dir = 1 }, -/obj/machinery/autolathe, +/obj/machinery/lathe/autolathe, /turf/simulated/floor/tiled, /area/quartermaster/office) "vbN" = ( diff --git a/maps/tether/levels/surface2.dmm b/maps/tether/levels/surface2.dmm index 28bf2f04f8b7..bfc7ab6006af 100644 --- a/maps/tether/levels/surface2.dmm +++ b/maps/tether/levels/surface2.dmm @@ -7259,9 +7259,7 @@ /obj/effect/floor_decal/corner/red/border{ dir = 8 }, -/obj/machinery/autolathe{ - hacked = 1 - }, +/obj/machinery/lathe/autolathe, /turf/simulated/floor/tiled/dark, /area/tether/surfacebase/security/armory) "alC" = ( diff --git a/maps/tether/levels/surface3.dmm b/maps/tether/levels/surface3.dmm index ab6517371d60..407ce590c801 100644 --- a/maps/tether/levels/surface3.dmm +++ b/maps/tether/levels/surface3.dmm @@ -13135,10 +13135,6 @@ /obj/effect/floor_decal/corner/blue/bordercorner2{ dir = 8 }, -/obj/machinery/computer/id_restorer{ - dir = 4; - pixel_x = -30 - }, /turf/simulated/floor/tiled, /area/tether/surfacebase/surface_three_hall) "axc" = ( @@ -38377,9 +38373,7 @@ layer = 3.3; pixel_y = 26 }, -/obj/machinery/autolathe{ - hacked = 1 - }, +/obj/machinery/lathe/autolathe, /turf/simulated/floor/tiled, /area/rnd/research) "nnK" = ( @@ -38486,10 +38480,7 @@ /obj/effect/floor_decal/corner/mauve/bordercorner2{ dir = 10 }, -/obj/machinery/autolathe{ - dir = 1; - hacked = 1 - }, +/obj/machinery/lathe/autolathe, /turf/simulated/floor/tiled/steel_grid, /area/rnd/robotics) "nyy" = ( diff --git a/maps/triumph/levels/deck1.dmm b/maps/triumph/levels/deck1.dmm index 45ea8973eab3..fee105498893 100644 --- a/maps/triumph/levels/deck1.dmm +++ b/maps/triumph/levels/deck1.dmm @@ -7397,8 +7397,7 @@ /obj/item/stock_parts/matter_bin, /obj/item/stock_parts/manipulator, /obj/item/stock_parts/console_screen, -/obj/item/circuitboard/autolathe, -/obj/item/circuitboard/partslathe, +/obj/item/circuitboard/machine/lathe/autolathe, /turf/simulated/floor, /area/storage/tech) "Bm" = ( @@ -10838,6 +10837,12 @@ /obj/item/storage/bag/circuits/basic, /turf/simulated/floor, /area/storage/tech) +"Nq" = ( +/obj/machinery/alarm{ + pixel_y = 22 + }, +/turf/simulated/floor/plating, +/area/maintenance/engineering) "Nr" = ( /obj/structure/cable{ icon_state = "1-2" @@ -10936,7 +10941,7 @@ dir = 10 }, /obj/structure/cable/green, -/obj/machinery/autolathe, +/obj/machinery/lathe/autolathe, /turf/simulated/floor/tiled/techmaint, /area/engineering/storage) "NG" = ( @@ -13612,7 +13617,7 @@ pixel_x = 1; pixel_y = 3 }, -/obj/item/circuitboard/autolathe, +/obj/item/circuitboard/machine/lathe/autolathe, /obj/item/circuitboard/scan_consolenew{ pixel_x = 6; pixel_y = -3 @@ -29055,7 +29060,7 @@ qw em em em -Yb +Nq qb dv ID diff --git a/maps/triumph/levels/deck2.dmm b/maps/triumph/levels/deck2.dmm index cd45262ef016..1fbb8bfcc785 100644 --- a/maps/triumph/levels/deck2.dmm +++ b/maps/triumph/levels/deck2.dmm @@ -1104,7 +1104,7 @@ /obj/machinery/camera/network/outside{ dir = 5 }, -/turf/space, +/turf/simulated/floor/airless/ceiling, /area/space) "dD" = ( /turf/simulated/floor/plating, @@ -7210,6 +7210,9 @@ /obj/machinery/atmospherics/component/unary/vent_pump/on, /turf/simulated/floor/plating, /area/vacant/vacant_office) +"vi" = ( +/turf/space/basic, +/area/space) "vj" = ( /obj/machinery/power/solar_control, /obj/structure/cable/yellow{ @@ -11294,6 +11297,10 @@ }, /turf/simulated/floor/tiled/freezer, /area/crew_quarters/freezer) +"Ia" = ( +/obj/structure/lattice, +/turf/space/basic, +/area/space) "Ib" = ( /obj/structure/bed/chair/comfy/black{ dir = 1 @@ -12554,6 +12561,10 @@ }, /turf/simulated/floor/plating, /area/maintenance/dormitory) +"Mh" = ( +/obj/structure/lattice, +/turf/simulated/floor/airless/ceiling, +/area/space) "Mi" = ( /obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{ dir = 5 @@ -16519,7 +16530,7 @@ /obj/structure/extinguisher_cabinet{ pixel_y = -31 }, -/obj/machinery/autolathe, +/obj/machinery/lathe/autolathe, /turf/simulated/floor/tiled, /area/quartermaster/office) "XM" = ( @@ -16873,6 +16884,11 @@ /obj/effect/floor_decal/steeldecal/steel_decals_central6, /turf/simulated/floor/wood, /area/crew_quarters/recreation_area_hallway) +"YP" = ( +/obj/structure/lattice, +/obj/structure/grille, +/turf/simulated/floor/airless/ceiling, +/area/space) "YQ" = ( /obj/machinery/atmospherics/component/unary/vent_pump/on, /turf/simulated/floor/tiled/white, @@ -16952,6 +16968,10 @@ }, /turf/simulated/floor/wood, /area/crew_quarters/fitness) +"YZ" = ( +/obj/machinery/camera/network/outside, +/turf/simulated/floor/airless/ceiling, +/area/space) "Za" = ( /obj/effect/floor_decal/techfloor{ dir = 9 @@ -20327,9 +20347,9 @@ ii ii ii ii -ii -Ed -ii +vi +vi +vi vl vl vl @@ -20469,9 +20489,9 @@ ii ii ii ii -ii -rC -ii +vi +vi +vi vl eb ht @@ -20611,9 +20631,9 @@ ii ii ii ii -ii -rC -ii +vi +vi +vi vl eD qh @@ -20753,9 +20773,9 @@ ii ii ii ii -ii -rC -ii +vi +vi +vi vl fw qx @@ -20895,9 +20915,9 @@ ii ii ii ii -ii -Ed -ii +vi +vi +vi vl fQ qE @@ -21353,10 +21373,10 @@ qb qb NK Nm -Ed -Ed -rC -ii +Mh +Mh +YP +qu ii ii ii @@ -21495,11 +21515,11 @@ NR qb hJ Nm -ii -ii -rC -ii -ii +qu +qu +YP +qu +qu ii ii ii @@ -21603,11 +21623,11 @@ ii ii ii ii -ii -ii -rC -Ed -Ed +qu +qu +qu +qu +qu nJ ya xV @@ -21637,11 +21657,11 @@ It PS yK eH -ii -ii -rC -ii -ii +qu +qu +YP +qu +qu ii ii ii @@ -21745,11 +21765,11 @@ ii ii ii ii -ii -ii -rC -ii -ii +qu +qu +qu +qu +qu vl Ye fl @@ -21779,11 +21799,11 @@ JX tJ Zf eH -AU -ii -rC -ii -ii +YZ +qu +YP +qu +qu ii ii ii @@ -21887,11 +21907,11 @@ ii ii ii ii -ii -ii -Ed -ii -cB +qu +qu +qu +qu +qu vl iW ip @@ -21921,11 +21941,11 @@ Dm JU wR eH -ii -ii -rC -ii -ii +qu +qu +YP +qu +qu ii ii ii @@ -22029,11 +22049,11 @@ ii ii ii ii -ii -ii -rC -ii -ii +qu +qu +qu +qu +qu nJ ya op @@ -22063,11 +22083,11 @@ Dm JX fd eH -ii -ii -rC -ii -ii +qu +qu +YP +qu +qu ii ii ii @@ -22172,10 +22192,10 @@ ii ii ii ii -ii -rC -ii -ii +qu +qu +qu +qu vl kb Nh @@ -22205,10 +22225,10 @@ Dm oE rF tA -Ed -Ed -rC -ii +Mh +Mh +YP +qu ii ii ii @@ -22314,10 +22334,10 @@ ii ii ii ii -ii -rC -ii -ii +qu +qu +qu +qu vl Ye oF @@ -22347,10 +22367,10 @@ Dm Qe rF tA -ii -ii -rC -ii +qu +qu +YP +qu ii ii ii @@ -22456,10 +22476,10 @@ ii ii ii ii -ii -rC -ii -ii +qu +qu +qu +qu vl Fc Rr @@ -22489,10 +22509,10 @@ RW RW Yo tA -ii -ii -rC -ii +qu +qu +YP +qu ii ii ii @@ -22598,10 +22618,10 @@ ii ii ii ii -ii -Ed -ii -ii +qu +qu +qu +qu vl lE qE @@ -22631,10 +22651,10 @@ od oE gC tA -ii -ii -rC -ii +qu +qu +YP +qu ii ii ii @@ -22740,10 +22760,10 @@ ii ii ii ii -ii -rC -ii -ii +qu +qu +qu +qu nJ ns vF @@ -22773,10 +22793,10 @@ Ki gI gC tA -ii -ii -rC -ii +qu +qu +YP +qu ii ii ii @@ -22882,10 +22902,10 @@ cs ii ii ii -ii -Ed -ii -ii +qu +qu +qu +qu vl ns vR @@ -22915,10 +22935,10 @@ Ki iM gC tA -ii -ii -rC -ii +qu +qu +YP +qu ii ii ii @@ -23024,10 +23044,10 @@ ii ii ii ii -ii -Ed -ii -ii +qu +qu +qu +qu vl pm xF @@ -23057,10 +23077,10 @@ Ki Mg gC tA -ii -ii -Ed -ii +qu +qu +Mh +qu ii ii ii @@ -23166,10 +23186,10 @@ ii ii ii ii -ii -Ed -ii -ii +qu +qu +qu +qu vl pq op @@ -23199,10 +23219,10 @@ Ki UJ gC tA -ii -ii -Ed -ii +qu +qu +Mh +qu ii ii ii @@ -23308,10 +23328,10 @@ HK HK Rx ii -ii -Ed -Ed -Ed +qu +qu +qu +qu vl ge LC @@ -23341,10 +23361,10 @@ Ki HW gC tA -Ed -Ed -Ed -rC +Mh +Mh +Mh +YP rC rC Ed @@ -23450,10 +23470,10 @@ gn sX Rx ii -ii -Ed -ii -ii +qu +qu +qu +qu vl ns Nh @@ -23483,10 +23503,10 @@ Ki eI gC tA -ii -ii -Ed -ii +qu +qu +Mh +qu ii ii Ed @@ -23592,10 +23612,10 @@ Ht TI Rx ii -ii -Ed -ii -ii +qu +qu +qu +qu vl ns ip @@ -23625,10 +23645,10 @@ oZ RW Yo tA -ii -ii -Ed -ii +qu +qu +Mh +qu ii ii Ed @@ -29259,9 +29279,9 @@ ii ii ii Ed -ii -Ed -ii +qu +Mh +qu Ux wl kk @@ -29269,7 +29289,7 @@ Uv kk TH kz -ii +qu Rj be xk @@ -29309,21 +29329,21 @@ yb ai Mn tA -ii -ii -ii -ii -ii -Ed -ii +qu +qu +qu +qu +qu +Mh +qu dC -ii -ii -ii -Ed -ii -ii -ii +qu +qu +vi +Ia +vi +vi +vi ii ii rC @@ -29401,9 +29421,9 @@ Ed Ed Ed Ed -Ed -Ed -Ed +Mh +Mh +Mh FS UF XJ @@ -29411,7 +29431,7 @@ sA XJ QZ fS -Ed +Mh Rj tB Rj @@ -30016,7 +30036,7 @@ yb yb yb yb -oE +Qe gC cp ii @@ -31266,9 +31286,9 @@ ii ii ii ii -ii -ii -ii +qu +qu +qu Rj aC mQ @@ -31288,9 +31308,9 @@ zk gW gC tA -ii -ii -ii +qu +qu +qu ii ii ii @@ -31408,9 +31428,9 @@ Ed rC rC Ed -Ed -ii -ii +qu +qu +qu Rj tV mQ @@ -31430,9 +31450,9 @@ zk nj fg tA -ii -ii -ii +qu +qu +qu ii ii ii @@ -31549,10 +31569,10 @@ ii ii ii ii -ii Ed -ii -ii +qu +qu +qu Rj aC mQ @@ -31572,9 +31592,9 @@ zk qH gC tA -ii -ii -Ed +qu +qu +qu Ed rC rC @@ -31691,10 +31711,10 @@ ii ii ii ii -ii rC -Ed -Ed +qu +qu +qu Rj aC mQ @@ -31714,10 +31734,10 @@ zk oE gC tA -ii -ii -rC -ii +qu +qu +qu +Ed ii ii ii @@ -31833,10 +31853,10 @@ ii ii ii ii -ii rC -ii -ii +qu +qu +qu Rj aC Gy @@ -31856,8 +31876,9 @@ zk oE gC tA -ii -ii +qu +qu +qu rC ii ii @@ -31890,7 +31911,6 @@ ii ii ii ii -ii cs ii ii @@ -31975,10 +31995,10 @@ ii ii ii ii -ii rC -ii -ii +qu +qu +qu Rj VW VZ @@ -31998,8 +32018,9 @@ sl sl jR tA -ii -ii +qu +qu +qu rC ii ii @@ -32057,7 +32078,6 @@ ii ii ii ii -ii "} (105,1,1) = {" ii @@ -32117,10 +32137,10 @@ ii ii ii ii -ii rC -ii -cB +qu +qu +qu Rj Iy Dt @@ -32140,8 +32160,9 @@ CU iM LH tA -ii -ii +qu +qu +qu rC ii ii @@ -32199,7 +32220,6 @@ ii ii ii ii -ii "} (106,1,1) = {" ii @@ -32259,10 +32279,10 @@ ii ii ii ii -ii rC -ii -ii +qu +qu +qu Rj Iy Dt @@ -32282,8 +32302,9 @@ mz ai LH tA -ii -ii +qu +qu +qu rC ii ii @@ -32341,7 +32362,6 @@ ii ii ii ii -ii "} (107,1,1) = {" ii @@ -32401,10 +32421,10 @@ ii ii ii ii -ii rC -ii -ii +qu +qu +qu Rj kF Dt @@ -32424,13 +32444,13 @@ CU ai Ip tA -ii -ii +qu +qu +qu rC ii ii ii -ii cs ii ii @@ -32543,10 +32563,10 @@ ii ii ii ii -ii rC -ii -ii +qu +qu +qu Rj dD Dt @@ -32566,10 +32586,10 @@ CU ai ai tA -Ed -Ed -Ed -ii +qu +qu +qu +rC ii ii ii @@ -32685,10 +32705,10 @@ ii cs ii ii -ii -rC -Ed Ed +qu +qu +qu Rj dD Dt @@ -32708,10 +32728,10 @@ CU CU ex tA -ii -ii -Ed -ii +qu +qu +qu +rC ii ii ii @@ -32827,8 +32847,8 @@ ii ii ii ii -ii -rC +Ed +Ed ii ii Rj @@ -32853,7 +32873,7 @@ tA ii ii Ed -ii +Ed ii ii ii diff --git a/maps/triumph/levels/deck3.dmm b/maps/triumph/levels/deck3.dmm index 9a0133bed2ba..8a96fef650f3 100644 --- a/maps/triumph/levels/deck3.dmm +++ b/maps/triumph/levels/deck3.dmm @@ -2878,6 +2878,10 @@ }, /turf/simulated/floor/tiled, /area/medical/surgery) +"czd" = ( +/obj/structure/lattice, +/turf/simulated/floor/airless/ceiling, +/area/space) "czx" = ( /obj/machinery/computer/crew{ dir = 4 @@ -6822,6 +6826,10 @@ /obj/landmark/spawnpoint/job/psychiatrist, /turf/simulated/floor/carpet/sblucarpet, /area/medical/psych/psych_1) +"fSH" = ( +/obj/structure/lattice, +/turf/space/basic, +/area/space) "fSY" = ( /obj/machinery/suspension_gen, /obj/machinery/light{ @@ -11964,6 +11972,9 @@ }, /turf/simulated/floor/tiled/white, /area/medical/surgeryprep) +"kpL" = ( +/turf/space/basic, +/area/space) "kqo" = ( /obj/machinery/atmospherics/pipe/simple/hidden/supply{ dir = 5 @@ -12575,6 +12586,12 @@ "kPx" = ( /turf/simulated/floor/tiled, /area/medical/medbay3) +"kPN" = ( +/obj/machinery/camera/network/outside{ + dir = 5 + }, +/turf/simulated/floor/airless/ceiling, +/area/space) "kPU" = ( /obj/structure/bed/chair/office/dark, /obj/effect/floor_decal/borderfloorwhite, @@ -15372,9 +15389,7 @@ /turf/simulated/wall/r_wall, /area/maintenance/medbay/aft) "nhH" = ( -/obj/machinery/autolathe{ - hacked = 1 - }, +/obj/machinery/lathe/autolathe, /obj/machinery/requests_console{ department = "Robotics"; departmentType = 2; @@ -18387,9 +18402,7 @@ name = "Station Intercom (General)"; pixel_y = 26 }, -/obj/machinery/autolathe{ - hacked = 1 - }, +/obj/machinery/lathe/autolathe, /turf/simulated/floor/tiled, /area/rnd/reception_desk) "pzB" = ( @@ -31019,10 +31032,10 @@ gVh gVh gVh gVh -oCz -oCz -oCz -oCz +oHo +oHo +oHo +oHo bdR pYD gVh @@ -31159,12 +31172,12 @@ bdR gVh gVh gVh -oCz -oCz -oCz -oCz -oCz -oCz +oHo +oHo +oHo +oHo +oHo +oHo gVh pYD gVh @@ -31305,8 +31318,8 @@ oHo oHo oHo oHo -oCz -oCz +oHo +oHo gVh bdR gVh @@ -31447,7 +31460,7 @@ unF avV wOy oHo -oCz +oHo eLn iBC bdR @@ -31589,7 +31602,7 @@ cOK qYA wRJ oHo -oCz +oHo gVh gVh bdR @@ -31731,7 +31744,7 @@ bUe iRW mDs oHo -oCz +oHo gVh gVh pYD @@ -38976,7 +38989,7 @@ sCe sCe sCe sCe -gVh +kpL pYD gVh gVh @@ -39260,7 +39273,7 @@ sCe sCe sCe sCe -gVh +fSH pYD gVh gVh @@ -39402,7 +39415,7 @@ wDA sCe sCe sCe -gVh +kpL pYD gVh gVh @@ -39544,7 +39557,7 @@ sCe sCe sCe sCe -gVh +kpL pYD gVh gVh @@ -39686,7 +39699,7 @@ sCe sCe sCe sCe -gVh +kpL pYD gVh gVh @@ -39828,7 +39841,7 @@ sCe sCe sCe sCe -bdR +fSH pYD gVh gVh @@ -39970,7 +39983,7 @@ sCe sCe sCe sCe -gVh +kpL pYD gVh gVh @@ -40112,7 +40125,7 @@ sCe sCe sCe sCe -gVh +kpL pYD gVh gVh @@ -40254,7 +40267,7 @@ sCe sCe sCe sCe -gVh +kpL pYD gVh gVh @@ -40396,7 +40409,7 @@ sCe sCe sCe sCe -gVh +fSH pYD gVh gVh @@ -40534,11 +40547,11 @@ xND ilf xND lUU +sCe +sCe +sCe +sCe gVh -gVh -gVh -bdR -bdR pYD gVh gVh @@ -40676,10 +40689,10 @@ tSA xwQ tSA lUU -dlt -gVh -gVh -bdR +wDA +sCe +sCe +sCe gVh pYD gVh @@ -40822,7 +40835,7 @@ bdR bdR bdR bdR -gVh +bdR bdR gVh gVh @@ -46741,11 +46754,11 @@ bdR gVh eLn ioO -gVh -bdR -gVh -bdR -gVh +sCe +czd +sCe +czd +sCe ioO hKW mhy @@ -46753,11 +46766,11 @@ geq cuU qoo ioO -gVh -gVh -gVh -gVh -gVh +sCe +sCe +sCe +sCe +sCe ioO eLn gVh @@ -46883,11 +46896,11 @@ bdR bdR iBC pYD -bdR -bdR -gVh -bdR -gVh +czd +czd +sCe +czd +sCe ioO fhO mhy @@ -46895,11 +46908,11 @@ xOu cuU oqY ioO -dlt -gVh -gVh -gVh -gVh +wDA +sCe +sCe +sCe +sCe gVh iBC gVh @@ -47027,9 +47040,9 @@ bdR gVh gVh bdR -gVh -bdR -gVh +sCe +czd +sCe ioO gAR gAR @@ -47037,9 +47050,9 @@ gAR gAR gAR ioO -bdR -bdR -bdR +czd +czd +czd pYD pYD pYD @@ -47171,15 +47184,15 @@ gVh bdR gVh bdR -gVh -sHK -gVh -gVh -gVh -gVh -gVh -gVh -gVh +sCe +kPN +sCe +sCe +sCe +sCe +sCe +sCe +sCe bdR gVh gVh @@ -47314,14 +47327,14 @@ bdR gVh bdR gVh -gVh -gVh -gVh -gVh -gVh -gVh -gVh -gVh +sCe +sCe +sCe +sCe +sCe +sCe +sCe +kpL bdR gVh gVh @@ -47454,16 +47467,16 @@ bdR pYD bdR bdR -pYD -pYD -pYD -pYD -pYD -pYD -pYD -pYD -pYD -pYD +fSH +kpL +kpL +sCe +sCe +sCe +sCe +sCe +kpL +fSH bdR bdR bdR @@ -47596,7 +47609,7 @@ gVh gVh gVh gVh -gVh +bdR bdR gVh gVh @@ -47604,8 +47617,8 @@ gVh gVh gVh bdR -gVh -gVh +bdR +bdR bdR gVh gVh diff --git a/maps/triumph/levels/deck4.dmm b/maps/triumph/levels/deck4.dmm index 52f0e79cc095..ffde4d85dd17 100644 --- a/maps/triumph/levels/deck4.dmm +++ b/maps/triumph/levels/deck4.dmm @@ -2700,6 +2700,9 @@ }, /turf/simulated/floor/tiled/dark, /area/hallway/secondary/civilian_hallway_mid) +"ccp" = ( +/turf/simulated/floor/airless/ceiling, +/area/space) "ccu" = ( /obj/machinery/camera/network/civilian{ dir = 8 @@ -4152,9 +4155,7 @@ dir = 5 }, /obj/effect/floor_decal/industrial/outline/blue, -/obj/machinery/autolathe{ - hacked = 1 - }, +/obj/machinery/lathe/autolathe, /turf/simulated/floor/tiled/dark, /area/security/armoury) "dpQ" = ( @@ -24689,9 +24690,7 @@ /turf/simulated/floor/tiled/dark, /area/security/armoury) "rGT" = ( -/obj/machinery/autolathe{ - hacked = 1 - }, +/obj/machinery/lathe/autolathe, /obj/effect/floor_decal/industrial/warning, /turf/simulated/floor/plating, /area/shuttle/excursion/cargo) @@ -38166,6 +38165,9 @@ dqm vgx xLf oRJ +ccp +ccp +ccp pkc nIK nIK @@ -38202,9 +38204,6 @@ nIK nIK nIK nIK -nIK -nIK -nIK "} (30,1,1) = {" nIK @@ -38308,6 +38307,9 @@ lbX xFn xOh oRJ +ccp +ccp +ccp pkc nIK nIK @@ -38344,9 +38346,6 @@ nIK nIK nIK nIK -nIK -nIK -nIK "} (31,1,1) = {" nIK @@ -38450,11 +38449,11 @@ tzb vgG xRX oRJ +ccp +ccp +ccp +pkc pkc -nIK -nIK -nIK -nIK nIK nIK nIK diff --git a/maps/triumph/levels/flagship.dmm b/maps/triumph/levels/flagship.dmm index 557a60818b64..86dc1018d75e 100644 --- a/maps/triumph/levels/flagship.dmm +++ b/maps/triumph/levels/flagship.dmm @@ -1920,9 +1920,8 @@ }, /area/centcom/specops) "de" = ( -/obj/machinery/autolathe{ +/obj/machinery/lathe/autolathe{ desc = "Your typical Autolathe. It appears to have much more options than your regular one, however..."; - hacked = 1; name = "Unlocked Autolathe" }, /obj/effect/floor_decal/industrial/outline/blue, @@ -2168,9 +2167,8 @@ /turf/unsimulated/floor/steel, /area/centcom/control) "dI" = ( -/obj/machinery/autolathe{ +/obj/machinery/lathe/autolathe{ desc = "Your typical Autolathe. It appears to have much more options than your regular one, however..."; - hacked = 1; name = "Centcom Autolathe" }, /obj/effect/floor_decal/borderfloorwhite{ @@ -2272,9 +2270,8 @@ /turf/simulated/floor/tiled/white, /area/centcom/control) "dP" = ( -/obj/machinery/autolathe{ +/obj/machinery/lathe/autolathe{ desc = "Your typical Autolathe. It appears to have much more options than your regular one, however..."; - hacked = 1; name = "Centcom Autolathe" }, /obj/effect/floor_decal/industrial/warning{ diff --git a/nano/templates/partslathe.tmpl b/nano/templates/partslathe.tmpl deleted file mode 100644 index 3616ee727280..000000000000 --- a/nano/templates/partslathe.tmpl +++ /dev/null @@ -1,77 +0,0 @@ - -{{if data.error }} -
Missing Materials: {{:data.error}}

-{{/if}} - -

Materials

-
- {{for data.materials }} -
-
{{:value.display.toTitleCase()}}
-
{{:helper.displayBar(value.percent, 0, 100, - (value.percent < 25) ? 'bad' : (value.percent < 50) ? 'average' : 'good', - value.qty + "/" + value.max )}}
-
{{:helper.link("Eject", 'eject', {'ejectMaterial' : value.name })}}
-
- {{/for}} -
- -{{if data.copyBoard }} -

Circuit Reader

-
-
-
Loaded Circuit
-
{{:data.copyBoard.toTitleCase()}} 
-
{{:helper.link("Eject", 'eject', {'ejectBoard' : 1})}}
-
- {{if !data.copyBoardReqComponents || data.copyBoardReqComponents.length == 0 }} -
Board has no required components.
- {{else}} - {{for data.copyBoardReqComponents }} -
-
{{:value.qty}}x
-
{{:value.name.toTitleCase()}}
-
- {{/for}} -
{{:helper.link("Build All", 'wrench', {'queueBoard' : 1})}}
- {{/if}} -
-{{/if}} - - -

Recipies

-{{for data.recipies}} -
- {{:helper.link(value.name.toTitleCase(), 'plus', {'queue' : value.type})}} -
-{{/for}} - -{{if data.building }} -

Currently Building

-
-
Currently Building:
-
{{:data.building.toTitleCase()}}
-
-
-
{{:helper.displayBar(data.buildPercent, 0, 100, 'good')}}
-
-{{/if}} - -

Queue

-
- {{if data.queue.length == 0}} -
Queue Empty
- {{else}} - {{for data.queue}} -
-
#{{:index+1}} {{:value.toTitleCase()}}
- {{if index > 0 || !data.building}} -
{{:helper.link("Cancel", 'close', {'cancel' : index+1})}}
- {{/if}} -
- {{/for}} - {{/if}} -
diff --git a/tgui/docs/component-reference.md b/tgui/docs/component-reference.md index 5c924254997f..714fa608ff80 100644 --- a/tgui/docs/component-reference.md +++ b/tgui/docs/component-reference.md @@ -47,6 +47,7 @@ Make sure to add new items to this list if you document new components. - [`RoundGauge`](#roundgauge) - [`Section`](#section) - [`Slider`](#slider) + - [`Sprite`](#sprite) - [`Stack`](#stack) - [`Stack.Item`](#stackitem) - [`Table`](#table) @@ -932,6 +933,18 @@ the input, or successfully enter a number. - `onDrag: (e, value) => void` - An event, which fires about every 500ms when you drag the input up and down, on release and on manual editing. +### `Sprite` + +A way to render a spritesheet icon. + +**Props:** + +- See inherited props: [Box](#box) +- `sheet: string` - name of spritesheet (the asset entry, e.g. "sheetmaterials") +- `sizeKey: string` - the size key to use, e.g. "32x32" usually +- `prefix?: string` - the prefix of the sprite, e.g. "stack". sometimes, there's no prefix. +- `sprite: string` - the name of the sprite in the spritesheet, e.g. "metal" + ### `Stack` A higher-level component, that is based on [Flex](#flex). The main difference diff --git a/tgui/packages/tgui/backend.ts b/tgui/packages/tgui/backend.ts index 478ce0e4f26a..17266a340b99 100644 --- a/tgui/packages/tgui/backend.ts +++ b/tgui/packages/tgui/backend.ts @@ -449,6 +449,8 @@ export type ModuleBackend = { data: TData; act: actFunctionType; backend: Backend<{}>; + // / module id if is currently embedded module, null otherwise + moduleID: string | null; } /** @@ -475,6 +477,7 @@ export const useModule = (context): ModuleBackend(context): ModuleBackend { ...rest } = props; return ( - -
-
- -
- {buttons && ( -
- {buttons} + +
+
+
+
- )} + {buttons && ( +
+ {buttons} +
+ )} +
{open && ( - +
{children} - +
)}
); diff --git a/tgui/packages/tgui/components/Sprite.tsx b/tgui/packages/tgui/components/Sprite.tsx new file mode 100644 index 000000000000..01d8e4617b6f --- /dev/null +++ b/tgui/packages/tgui/components/Sprite.tsx @@ -0,0 +1,27 @@ +/** + * @file + * @license MIT + */ + +import { BooleanLike, classes } from "common/react"; +import { Box, BoxProps } from "./Box"; + +interface SpriteProps extends BoxProps { + sheet: string; + sizeKey: string; + prefix?: string; + sprite: string; + fill?: BooleanLike; +} + +export const Sprite = (props: SpriteProps) => { + return ( + + ); +}; diff --git a/tgui/packages/tgui/interfaces/Autolathe.js b/tgui/packages/tgui/interfaces/Autolathe.js deleted file mode 100644 index 2ce97b628d30..000000000000 --- a/tgui/packages/tgui/interfaces/Autolathe.js +++ /dev/null @@ -1,117 +0,0 @@ -import { flow } from 'common/fp'; -import { filter, sortBy } from 'common/collections'; -import { useBackend, useLocalState } from "../backend"; -import { Box, Button, Flex, Input, Section, Dropdown } from "../components"; -import { Window } from "../layouts"; -import { Materials } from "./ExosuitFabricator"; -import { createSearch, toTitleCase } from 'common/string'; - -const canBeMade = (recipe, materials, mult = 1) => { - if (recipe.requirements === null) { - return true; - } - - let recipeRequiredMaterials = Object.keys(recipe.requirements); - - for (let mat_id of recipeRequiredMaterials) { - let material = materials.find(val => val.name === mat_id); - if (!material) { - continue; // yes, if we cannot find the material, we just ignore it :V - } - if (material.amount < (recipe.requirements[mat_id] * mult)) { - return false; - } - } - - return true; -}; - -export const Autolathe = (props, context) => { - const { act, data } = useBackend(context); - const { - recipes, - busy, - materials, - categories, - } = data; - - const [category, setCategory] = useLocalState(context, "category", 0); - - const [ - searchText, - setSearchText, - ] = useLocalState(context, "search_text", ""); - - const testSearch = createSearch(searchText, recipe => recipe.name); - - const recipesToShow = flow([ - filter(recipe => recipe.category === categories[category]), - searchText && filter(testSearch), - sortBy(recipe => recipe.name.toLowerCase()), - ])(recipes); - - return ( - - -
- -
-
setCategory(categories.indexOf(val))} /> - }> - setSearchText(v)} - mb={1} /> - {recipesToShow.map(recipe => ( - - - - {!recipe.is_stack && ( - - - - - ) || null} - - - {recipe.requirements && ( - Object - .keys(recipe.requirements) - .map(mat => toTitleCase(mat) + ": " + recipe.requirements[mat]) - .join(", ") - ) || ( - - No resources required. - - )} - - - ))} -
-
-
- ); -}; diff --git a/tgui/packages/tgui/interfaces/ComponentPrinter.tsx b/tgui/packages/tgui/interfaces/ComponentPrinter.tsx deleted file mode 100644 index c4334af047b0..000000000000 --- a/tgui/packages/tgui/interfaces/ComponentPrinter.tsx +++ /dev/null @@ -1,171 +0,0 @@ -import { createSearch } from 'common/string'; -import { useBackend, useLocalState } from '../backend'; -import { Material, MaterialAmount, MaterialFormatting, Materials, MATERIAL_KEYS } from './common/Materials'; -import { Window } from '../layouts'; -import { Box, Button, Input, Section, Stack, Tabs } from '../components'; - -const CATEGORY_ALL = "All"; - -const searchFor = searchText => createSearch( - searchText, - ([_, thing]) => thing.name + thing.description, -); - -const getCategory = (category: string[]) => { - return category[0] === "Circuitry" ? category[1] : category[0]; -}; - -type Design = { - name: string, - description: string, - materials: Record, - categories: string[], -} - -type ComponentPrinterData = { - designs: Record, - materials: Material[], -}; - -const canProduce = ( - designMaterials: Design["materials"], - storedMaterials: Material[], -) => { - for (const material of storedMaterials) { - const amountNeeded = designMaterials[material.name]; - - if (amountNeeded && amountNeeded > material.amount) { - return false; - } - } - - return true; -}; - -const MaterialCost = (props: { - materials: Design["materials"], -}) => { - return ( - - {Object.entries(props.materials) - .map(([material, amount]) => { - return ( - - - - ); - })} - - ); -}; - -export const ComponentPrinter = (props, context) => { - const { act, data } = useBackend(context); - - const [currentCategory, setCurrentCategory] = useLocalState(context, "category", CATEGORY_ALL); - const [searchText, setSearchText] = useLocalState(context, "searchText", ""); - - return ( - - - - -
- { - act("remove_mat", { - ref: ref, - amount: amount, - }); - }} - /> -
-
- - - -
- - {Object.values(data.designs) - .reduce((categories, design) => { - const category = getCategory(design.categories); - if (categories.indexOf(category) === -1) { - return [category, ...categories]; - } else { - return categories; - } - }, [CATEGORY_ALL]).sort().map(category => { - return ( - setCurrentCategory(category)} - selected={category === currentCategory} - fluid - > - {category} - - ); - })} - -
-
- - -
- - - setSearchText(value)} /> - - - {Object.entries(data.designs) - .filter(([_, design]) => currentCategory === CATEGORY_ALL - || design.categories.indexOf(currentCategory) !== -1) - .filter(searchFor(searchText)) - .map(([designId, design]) => { - return ( - -
{ - act("print", { - designId, - }); - }} - disabled={ - !canProduce(design.materials, data.materials) - } - px={1.5} - > - Print - - )}> - - {design.description} - - -
-
- ); - })} -
-
-
-
-
-
-
-
- ); -}; diff --git a/tgui/packages/tgui/interfaces/ExosuitFabricator.js b/tgui/packages/tgui/interfaces/ExosuitFabricator.js index 0377c700c86f..ecce139d5f5a 100644 --- a/tgui/packages/tgui/interfaces/ExosuitFabricator.js +++ b/tgui/packages/tgui/interfaces/ExosuitFabricator.js @@ -8,25 +8,25 @@ import { createSearch, toTitleCase } from 'common/string'; import { toFixed } from 'common/math'; const MATERIAL_KEYS = { - "steel": "sheet-metal_3", - "glass": "sheet-glass_3", - "silver": "sheet-silver_3", - "graphite": "sheet-puck_3", - "plasteel": "sheet-plasteel_3", - "durasteel": "sheet-durasteel_3", - "verdantium": "sheet-wavy_3", - "morphium": "sheet-wavy_3", - "mhydrogen": "sheet-mythril_3", - "gold": "sheet-gold_3", - "diamond": "sheet-diamond", - "supermatter": "sheet-super_3", - "osmium": "sheet-silver_3", - "phoron": "sheet-phoron_3", - "uranium": "sheet-uranium_3", - "titanium": "sheet-titanium_3", - "lead": "sheet-adamantine_3", - "platinum": "sheet-adamantine_3", - "plastic": "sheet-plastic_3", + "steel": "stack-metal", + "glass": "stack-glass", + "silver": "stack-silver", + "graphite": "stack-puck", + "plasteel": "stack-plasteel", + "durasteel": "stack-durasteel", + "verdantium": "stack-wavy", + "morphium": "stack-wavy", + "mhydrogen": "stack-mythril", + "gold": "stack-gold", + "diamond": "stack-diamond", + "supermatter": "stack-super", + "osmium": "stack-silver", + "phoron": "stack-phoron", + "uranium": "stack-uranium", + "titanium": "stack-titanium", + "lead": "stack-adamantine", + "platinum": "stack-adamantine", + "plastic": "stack-plastic", }; const COLOR_NONE = 0; diff --git a/tgui/packages/tgui/interfaces/JoinMenu.tsx b/tgui/packages/tgui/interfaces/JoinMenu.tsx index 86d76ac428c7..c15ddc2b95b2 100644 --- a/tgui/packages/tgui/interfaces/JoinMenu.tsx +++ b/tgui/packages/tgui/interfaces/JoinMenu.tsx @@ -138,11 +138,11 @@ const JoinFaction = (props: JoinFactionProps, context) => { ordered.map((depName) => { const jobs: JoinableJob[] = props.departments[depName]; return ( - + { jobs.map((job) => { return ( - {(job.slots === -1)? 'Unlimited' : `${job.slots} left`} { - const { act, data } = useBackend(context); - const { - panelOpen, - copyBoard, - copyBoardReqComponents, - queue, - building, - buildPercent, - error, - recipies, - } = data; - return ( - - - {error && Missing Materials: {error} - || null} -
- -
- {building && ( -
- - - {toTitleCase(building)} - - - - - -
- ) || null} - {copyBoard && ( -
- - act("ejectBoard")}> - Eject - - }> - {toTitleCase(copyBoard)} - - - {copyBoardReqComponents && copyBoardReqComponents.length && ( - - {(copyBoardReqComponents.map(comp => ( - - {comp.qty} x {toTitleCase(comp.name)} - - )))} - - - ) || ( - - Board has no required components. - - )} -
- )} -
- {queue.length && queue.map((item, i) => ( - - #{i + 1}: {toTitleCase(item)} - {(i > 0 || !building) - && - || null} - - )) || ( - Queue Empty - )} -
-
- {recipies.length && recipies.map(recipe => ( - - - - ))} -
-
-
- ); -}; diff --git a/tgui/packages/tgui/interfaces/common/Design.tsx b/tgui/packages/tgui/interfaces/common/Design.tsx new file mode 100644 index 000000000000..7ed139c98a32 --- /dev/null +++ b/tgui/packages/tgui/interfaces/common/Design.tsx @@ -0,0 +1,29 @@ +/** + * @file + * @license MIT + */ +import { IngredientsNeeded } from "./Ingredients"; + +/** + * The Design interface. This is a class to facilitate the definition of static functions. + */ +export abstract class Design { + name: string; + desc: string; + category: string; + materials: Record | null; + material_parts: Record | null; + reagents: Record | null; + ingredients: IngredientsNeeded | null; + resultItem: DesignItem; + id: string; + work: number; +} + +export interface DesignItem { + name?: string; + desc?: string; + iconSheet?: string; + iconPath?: string; // direct access if sheet not provided, if sheet provided we use the spritesheet +} + diff --git a/tgui/packages/tgui/interfaces/common/Ingredients.tsx b/tgui/packages/tgui/interfaces/common/Ingredients.tsx new file mode 100644 index 000000000000..2d49377b53cd --- /dev/null +++ b/tgui/packages/tgui/interfaces/common/Ingredients.tsx @@ -0,0 +1,81 @@ +/** + * @file + * @license MIT + */ + +import { BooleanLike } from "common/react"; +import { Section } from "../../components"; + +type IngredientRef = string; +type IngredientPath = string; +type MaterialID = string; +type ReagentID = string + +export interface IngredientsAvailable { + materials: Record; // id to sheets + materialLookup: Record; // id to name + reagents: Record; // id to units + reagentLookup: Record; // id to name + stacks: Record; // type to amount + stackLookup: Record; // name lookup + items: IngredientItem[]; // structs + massItems: Record; // type to amount + massItemLookup: Record; // type to name +} + +export interface IngredientItem { + ref: IngredientRef; + name: string; + path: IngredientPath; +} + +export type IngredientsNeeded = IngredientNeed[]; + +export type IngredientsSelected = any[]; + +export type IngredientType = "material" | "reagent" | "item" | "stack"; + +export interface IngredientNeed { + type: IngredientType; + amt: number; + allow: any; + name: string; +} + +interface IngredientsDisplayProps { + ingredients: IngredientsAvailable; + lazy: BooleanLike; + title?: string; + vertical: boolean; +} + +export const IngredientsDisplay = (props: IngredientsDisplayProps, context) => { + // Just here to make ESlint not complain about unused variables + let { ingredients, lazy, vertical } = props; + // End + return ( +
+ Unimplemented +
+ ); +}; + +interface IngredientsProps { + need: IngredientsNeeded; + available: IngredientsAvailable; + selection: BooleanLike; + selected?: IngredientsSelected; + vertical: boolean; + select: (number, string) => void; // called with (index, data). +} + +export const Ingredients = (props: IngredientsProps, context) => { + // Just here to make ESlint not complain about unused variables + let { need, available, selection, selected, vertical, select } = props; + // End + return ( +
+ Unimplemented +
+ ); +}; diff --git a/tgui/packages/tgui/interfaces/common/Materials.tsx b/tgui/packages/tgui/interfaces/common/Materials.tsx index 5501b18d6629..52c58ed37956 100644 --- a/tgui/packages/tgui/interfaces/common/Materials.tsx +++ b/tgui/packages/tgui/interfaces/common/Materials.tsx @@ -1,153 +1,133 @@ +/** + * @file + * @license MIT + */ import { BooleanLike } from 'common/react'; -import { Box, Button, NumberInput, Flex } from '../../components'; -import { classes } from 'common/react'; -import { formatMoney, formatSiUnit } from '../../format'; -import { useSharedState } from '../../backend'; -import { BoxProps } from '../../components/Box'; +import { Box, Button, NumberInput, Section, Icon, Stack, Tooltip } from '../../components'; +import { formatSiUnit } from '../../format'; +import { useLocalState, useSharedState } from '../../backend'; +import { SectionProps } from '../../components/Section'; +import { InfernoNode } from 'inferno'; +import { toFixed } from 'common/math'; +import { Sprite } from '../../components/Sprite'; +import { toTitleCase } from 'common/string'; -export const MATERIAL_KEYS = { - "iron": "sheet-metal_3", - "glass": "sheet-glass_3", - "silver": "sheet-silver_3", - "gold": "sheet-gold_3", - "diamond": "sheet-diamond", - "plasma": "sheet-plasma_3", - "uranium": "sheet-uranium", - "bananium": "sheet-bananium", - "titanium": "sheet-titanium_3", - "bluespace crystal": "polycrystal", - "plastic": "sheet-plastic_3", -} as const; +// the space is intentional +export const MATERIAL_STORAGE_UNIT_NAME = " cm³"; +// spritesheet name +export const MATERIAL_SPRITESHEET_NAME = "sheetmaterials"; +// spritesheet icon size key to use +export const MATERIAL_SPRITESHEET_SIZEKEY = "32x32"; +// full spritesheet part of the .css class to use +export const MATERIAL_SPRITESHEET_CSS = `${MATERIAL_SPRITESHEET_NAME}${MATERIAL_SPRITESHEET_SIZEKEY}`; -export type Material = { - name: keyof typeof MATERIAL_KEYS; - ref: string; - amount: number; - sheets: number; - removable: BooleanLike; -}; +export interface MaterialsContext { + materials: Record; + sheetAmount: number; +} -interface MaterialIconProps extends BoxProps { - material: keyof typeof MATERIAL_KEYS; +export interface FullMaterialsContext { + materials: Record; + sheetAmount: number; + } + +export interface Material { + name: string; + id: string; + sheetAmount: number; + iconKey: string; } -export const MaterialIcon = (props: MaterialIconProps) => { - const { material, ...rest } = props; +export interface DetailedMaterial extends Material { - return (); -}; +} -const EjectMaterial = (props: { - material: Material, - onEject: (amount: number) => void, -}, context) => { - const { - name, - removable, - sheets, - } = props.material; - const [removeMaterials, setRemoveMaterials] = useSharedState( - context, 'remove_mats_' + name, 1); - if (removeMaterials > 1 && sheets < removeMaterials) { - setRemoveMaterials(sheets || 1); - } - return ( - <> - { - const newVal = parseInt(val, 10); - if (Number.isInteger(newVal)) { - setRemoveMaterials(newVal); - } - }} /> -