diff --git a/citadel.dme b/citadel.dme index 22c7c3faa7e..d1ddd494c36 100644 --- a/citadel.dme +++ b/citadel.dme @@ -319,6 +319,7 @@ #include "code\__DEFINES\overmaps\misc.dm" #include "code\__DEFINES\overmaps\overmap.dm" #include "code\__DEFINES\power\balancing.dm" +#include "code\__DEFINES\power\cell.dm" #include "code\__DEFINES\power\power.dm" #include "code\__DEFINES\preferences\data_keys_character.dm" #include "code\__DEFINES\preferences\data_keys_global.dm" @@ -583,6 +584,7 @@ #include "code\controllers\repository\material_traits.dm" #include "code\controllers\repository\materials.dm" #include "code\controllers\repository\poster_designs.dm" +#include "code\controllers\repository\power_cells.dm" #include "code\controllers\repository\roles.dm" #include "code\controllers\repository\structs.dm" #include "code\controllers\subsystem\ai_holders.dm" @@ -1533,6 +1535,7 @@ #include "code\game\machinery\supply_display.dm" #include "code\game\machinery\supplybeacon.dm" #include "code\game\machinery\syndicatebeacon.dm" +#include "code\game\machinery\thermoregulator.dm" #include "code\game\machinery\transportpod.dm" #include "code\game\machinery\turnstile.dm" #include "code\game\machinery\vitals_monitor.dm" @@ -1868,8 +1871,8 @@ #include "code\game\objects\items\devices\radio\encryptionkey.dm" #include "code\game\objects\items\devices\radio\headset.dm" #include "code\game\objects\items\devices\radio\intercom.dm" -#include "code\game\objects\items\devices\radio\jammer.dm" #include "code\game\objects\items\devices\radio\radio.dm" +#include "code\game\objects\items\devices\radio\radio_jammer.dm" #include "code\game\objects\items\devices\tape_recorder\cassette_tape.dm" #include "code\game\objects\items\devices\tape_recorder\tape_iterator.dm" #include "code\game\objects\items\devices\tape_recorder\tape_recorder.dm" @@ -3785,6 +3788,7 @@ #include "code\modules\mining\tools\shelters.dm" #include "code\modules\mining\tools\vertibore.dm" #include "code\modules\mining\tools\kinetic\kinetic_accelerator.dm" +#include "code\modules\mining\tools\kinetic\kinetic_capacitor.dm" #include "code\modules\mining\tools\kinetic\kinetic_crusher.dm" #include "code\modules\mining\tools\kinetic\kinetic_gauntlets-combo.dm" #include "code\modules\mining\tools\kinetic\kinetic_gauntlets.dm" @@ -4120,6 +4124,7 @@ #include "code\modules\mob\living\silicon\robot\mobility.dm" #include "code\modules\mob\living\silicon\robot\photos.dm" #include "code\modules\mob\living\silicon\robot\robot-movement.dm" +#include "code\modules\mob\living\silicon\robot\robot-power.dm" #include "code\modules\mob\living\silicon\robot\robot.dm" #include "code\modules\mob\living\silicon\robot\robot_animation_vr.dm" #include "code\modules\mob\living\silicon\robot\robot_damage.dm" @@ -4660,7 +4665,6 @@ #include "code\modules\power\cable.dm" #include "code\modules\power\cable_ender.dm" #include "code\modules\power\cable_heavyduty.dm" -#include "code\modules\power\cell.dm" #include "code\modules\power\crypto_miner.dm" #include "code\modules\power\fractal_reactor.dm" #include "code\modules\power\generator.dm" @@ -4679,8 +4683,14 @@ #include "code\modules\power\antimatter\shielding.dm" #include "code\modules\power\apc\apc-ai.dm" #include "code\modules\power\apc\apc.dm" -#include "code\modules\power\cells\device_cells.dm" -#include "code\modules\power\cells\power_cells.dm" +#include "code\modules\power\cells\cell-misc.dm" +#include "code\modules\power\cells\cell.dm" +#include "code\modules\power\cells\power_cell.dm" +#include "code\modules\power\cells\types\basic.dm" +#include "code\modules\power\cells\types\infinite.dm" +#include "code\modules\power\cells\types\microfission.dm" +#include "code\modules\power\cells\types\regen.dm" +#include "code\modules\power\cells\types\special\slime_core.dm" #include "code\modules\power\engines\rust\_setup.dm" #include "code\modules\power\engines\rust\fusion_circuits.dm" #include "code\modules\power\engines\rust\fusion_reactions.dm" @@ -4906,7 +4916,10 @@ #include "code\modules\projectiles\guns\gun_component\particle_array.dm" #include "code\modules\projectiles\guns\gun_component\power_unit.dm" #include "code\modules\projectiles\guns\gun_component\focusing_lens\divide_by.dm" +#include "code\modules\projectiles\guns\gun_component\particle_array\discharge_beam.dm" +#include "code\modules\projectiles\guns\gun_component\particle_array\discharge_bolt.dm" #include "code\modules\projectiles\guns\gun_component\particle_array\particle_beam.dm" +#include "code\modules\projectiles\guns\gun_component\particle_array\particle_bolt.dm" #include "code\modules\projectiles\projectile\helpers.dm" #include "code\modules\projectiles\projectile\projectile-alter.dm" #include "code\modules\projectiles\projectile\projectile-hitscan_visuals.dm" @@ -5090,7 +5103,6 @@ #include "code\modules\research\designs\misc.dm" #include "code\modules\research\designs\modular_computer.dm" #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\rigs_vr.dm" #include "code\modules\research\designs\stock_parts.dm" @@ -5719,14 +5731,20 @@ #include "code\modules\vehicles\sealed\mecha\subtypes\working\ripley\geiger-construction.dm" #include "code\modules\vehicles\sealed\mecha\subtypes\working\ripley\geiger.dm" #include "code\modules\vehicles_legacy\bike.dm" -#include "code\modules\vehicles_legacy\cargo_train.dm" #include "code\modules\vehicles_legacy\construction.dm" -#include "code\modules\vehicles_legacy\quad.dm" -#include "code\modules\vehicles_legacy\rover_vr.dm" -#include "code\modules\vehicles_legacy\Securitrain_vr.dm" #include "code\modules\vehicles_legacy\skateboard.dm" -#include "code\modules\vehicles_legacy\train.dm" #include "code\modules\vehicles_legacy\vehicle.dm" +#include "code\modules\vehicles_legacy\train\train-engine.dm" +#include "code\modules\vehicles_legacy\train\train-trolley.dm" +#include "code\modules\vehicles_legacy\train\train.dm" +#include "code\modules\vehicles_legacy\train\quadbike\quadbike-trolley.dm" +#include "code\modules\vehicles_legacy\train\quadbike\quadbike.dm" +#include "code\modules\vehicles_legacy\train\rover\rover-engine.dm" +#include "code\modules\vehicles_legacy\train\rover\rover-trolley.dm" +#include "code\modules\vehicles_legacy\train\rover\rover.dm" +#include "code\modules\vehicles_legacy\train\securitrain\securitrain-engine.dm" +#include "code\modules\vehicles_legacy\train\securitrain\securitrain-trolley.dm" +#include "code\modules\vehicles_legacy\train\securitrain\securitrain.dm" #include "code\modules\ventcrawl\ventcrawl.dm" #include "code\modules\ventcrawl\ventcrawl_atmospherics.dm" #include "code\modules\ventcrawl\ventcrawl_multiz.dm" diff --git a/code/__DEFINES/ai/ai_holder.dm b/code/__DEFINES/ai/ai_holder.dm index a1f0ed01e4e..396e425afc7 100644 --- a/code/__DEFINES/ai/ai_holder.dm +++ b/code/__DEFINES/ai/ai_holder.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// //* Ticking diff --git a/code/__DEFINES/ai/debug.dm b/code/__DEFINES/ai/debug.dm index cbcdf22724e..ac9dc6eb343 100644 --- a/code/__DEFINES/ai/debug.dm +++ b/code/__DEFINES/ai/debug.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /// Enable debugging mode. This enables the AI debug interface, but will generally cause a decent bit of overhead/lag. // #define AI_DEBUGGING diff --git a/code/__DEFINES/bound_proc.dm b/code/__DEFINES/bound_proc.dm index 7fdeb35bca5..b2dc6f67f5e 100644 --- a/code/__DEFINES/bound_proc.dm +++ b/code/__DEFINES/bound_proc.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /// much like callback syntax, #define BOUND_PROC new /datum/bound_proc diff --git a/code/__DEFINES/controllers/spatial_grids.dm b/code/__DEFINES/controllers/spatial_grids.dm index 1f048e243a9..79efcdd59a7 100644 --- a/code/__DEFINES/controllers/spatial_grids.dm +++ b/code/__DEFINES/controllers/spatial_grids.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /** * macro to make sure a /type/path is in a spatial grid diff --git a/code/__DEFINES/datums/beam.dm b/code/__DEFINES/datums/beam.dm index d2db074844f..ba1be533ca2 100644 --- a/code/__DEFINES/datums/beam.dm +++ b/code/__DEFINES/datums/beam.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /// use single, transform matrix'd line #define BEAM_VISUAL_STRETCH "stretch" diff --git a/code/__DEFINES/dcs/signals/datums/signals_beam.dm b/code/__DEFINES/dcs/signals/datums/signals_beam.dm index fe3bcc74f71..dd0e646a168 100644 --- a/code/__DEFINES/dcs/signals/datums/signals_beam.dm +++ b/code/__DEFINES/dcs/signals/datums/signals_beam.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /// called on beam redraw #define COMSIG_BEAM_REDRAW "beam_redraw" diff --git a/code/__DEFINES/dcs/signals/signals_atom/signals_atom-throwing.dm b/code/__DEFINES/dcs/signals/signals_atom/signals_atom-throwing.dm index 1243ac896e0..75ea4d87a07 100644 --- a/code/__DEFINES/dcs/signals/signals_atom/signals_atom-throwing.dm +++ b/code/__DEFINES/dcs/signals/signals_atom/signals_atom-throwing.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /// from /atom/movable/proc/_throw_do_hit: (impactor, thrownthing) #define COMSIG_ATOM_THROW_IMPACTED "throw_impacted" diff --git a/code/__DEFINES/dcs/signals/signals_atom/signals_atom-tool_system.dm b/code/__DEFINES/dcs/signals/signals_atom/signals_atom-tool_system.dm index 3bb7af39fc4..18f2d075bfb 100644 --- a/code/__DEFINES/dcs/signals/signals_atom/signals_atom-tool_system.dm +++ b/code/__DEFINES/dcs/signals/signals_atom/signals_atom-tool_system.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /// from base of _tool_act: (I, user, function, flags, hint) where I = item, e_args = clickchain data, function = tool behaviour, flags = tool operation flags, hint = set by dynamic tool system /// return CLICKCHAIN_COMPONENT_SIGNAL_HANDLED to abort normal tool_act handling. diff --git a/code/__DEFINES/dcs/signals/signals_mob/signals_mob-perspective.dm b/code/__DEFINES/dcs/signals/signals_mob/signals_mob-perspective.dm index 971e9b9a00d..0ed2ac91e2e 100644 --- a/code/__DEFINES/dcs/signals/signals_mob/signals_mob-perspective.dm +++ b/code/__DEFINES/dcs/signals/signals_mob/signals_mob-perspective.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /// emitted by reset_perspective, but only if the perspective needed switching: (perspective) #define COMSIG_MOB_RESET_PERSPECTIVE "reset_perspective" diff --git a/code/__DEFINES/economy/category.dm b/code/__DEFINES/economy/category.dm index 1b2c8a1b37d..9361835ffa6 100644 --- a/code/__DEFINES/economy/category.dm +++ b/code/__DEFINES/economy/category.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// //* economic_category_obj *// diff --git a/code/__DEFINES/economy/currency.dm b/code/__DEFINES/economy/currency.dm index 16d619e03e5..e0bb92b7f2b 100644 --- a/code/__DEFINES/economy/currency.dm +++ b/code/__DEFINES/economy/currency.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /// currency name singular #define CURRENCY_NAME_SINGULAR "thaler" diff --git a/code/__DEFINES/economy/worth.dm b/code/__DEFINES/economy/worth.dm index ea5806f0de3..f6bd60606c1 100644 --- a/code/__DEFINES/economy/worth.dm +++ b/code/__DEFINES/economy/worth.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// //* op flags for /atom/proc/worth *// diff --git a/code/__DEFINES/inventory/procs.dm b/code/__DEFINES/inventory/procs.dm index 8e246783737..aaa806b58a4 100644 --- a/code/__DEFINES/inventory/procs.dm +++ b/code/__DEFINES/inventory/procs.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// //* Inventory Operation Flags *// diff --git a/code/__DEFINES/inventory/storage.dm b/code/__DEFINES/inventory/storage.dm index 763ae099df2..3e701885518 100644 --- a/code/__DEFINES/inventory/storage.dm +++ b/code/__DEFINES/inventory/storage.dm @@ -9,7 +9,7 @@ #define VOLUMETRIC_STORAGE_BOX_BORDER_SIZE 2 /// Minimum pixels an item must have in volumetric scaled storage UI /// This must not be smaller than BOX_BORDER_SIZE * 2. -#define VOLUMETRIC_STORAGE_MINIMUM_PIXELS_PER_ITEM 6 +#define VOLUMETRIC_STORAGE_MINIMUM_PIXELS_PER_ITEM 12 /// Maximum number of objects that will be allowed to be displayed using the volumetric display system. Arbitrary number to prevent server lockups. #define VOLUMETRIC_STORAGE_MAX_ITEMS 128 /// How much padding to give between items @@ -18,6 +18,10 @@ #define VOLUMETRIC_STORAGE_EDGE_PADDING 0 /// Standard pixel width ratio for volumetric storage; 1 volume converts into this many pixels. #define VOLUMETRIC_STORAGE_STANDARD_PIXEL_RATIO 8 +/// Used if a UI would be very, very small; this is the max we can inflate the calculation to. +#define VOLUMETRIC_STORAGE_INFLATED_PIXEL_RATIO 16 +/// If volumetric storage is below this, inflate the pixel ratio up to this +#define VOLUMETRIC_STORAGE_INFLATE_TO_TILES 3.5 //* Storage access *// @@ -66,8 +70,8 @@ //* Volumetrics - Default Item Volumes *// -#define WEIGHT_VOLUME_TINY 1 -#define WEIGHT_VOLUME_SMALL 2 +#define WEIGHT_VOLUME_TINY 0.5 +#define WEIGHT_VOLUME_SMALL 1 #define WEIGHT_VOLUME_NORMAL 4 #define WEIGHT_VOLUME_BULKY 8 #define WEIGHT_VOLUME_HUGE 16 @@ -85,7 +89,23 @@ GLOBAL_REAL_LIST(w_class_to_volume) = list( //* Volumetrics - Storage Volumes *// #define STORAGE_VOLUME_BOX (WEIGHT_VOLUME_SMALL * 7) +#define STORAGE_VOLUME_BOX_2X (WEIGHT_VOLUME_SMALL * 14) #define STORAGE_VOLUME_BACKPACK (WEIGHT_VOLUME_NORMAL * 7) #define STORAGE_VOLUME_DUFFLEBAG (WEIGHT_VOLUME_NORMAL * 9) //* Volumetrics - Item Volumes *// + +// 2x capacity to pack small items for now, unfortunately +#define ITEM_VOLUME_BOX (WEIGHT_VOLUME_NORMAL * 1) +// for some bigger boxes +#define ITEM_VOLUME_BOX_AND_HALF (WEIGHT_VOLUME_NORMAL * 1.5) + +#define ITEM_VOLUME_SMALL_CELL (WEIGHT_VOLUME_NORMAL / 4) +#define ITEM_VOLUME_WEAPON_CELL (WEIGHT_VOLUME_NORMAL / 2) +#define ITEM_VOLUME_MEDIUM_CELL (WEIGHT_VOLUME_NORMAL * 1) +#define ITEM_VOLUME_LARGE_CELL (WEIGHT_VOLUME_NORMAL * 2) + +#define ITEM_VOLUME_PISTOL_MAG (WEIGHT_VOLUME_NORMAL / 4) +#define ITEM_VOLUME_RIFLE_MAG (WEIGHT_VOLUME_NORMAL / 2) + +#define ITEM_VOLUME_AMMO_CASING (WEIGHT_VOLUME_TINY / 2) diff --git a/code/__DEFINES/materials/parts.dm b/code/__DEFINES/materials/parts.dm index 52231c09386..77221216dac 100644 --- a/code/__DEFINES/materials/parts.dm +++ b/code/__DEFINES/materials/parts.dm @@ -9,6 +9,7 @@ //* material id enums for lookups during materials init of an entity *// /// material ID to pass to Initialize() procs for "erase the default material of this slot" +/// * currently unimplemented. #define MATERIAL_ID_ERASE "___ERASE___" //* material_parts var - defaults *// diff --git a/code/__DEFINES/mobs/biology.dm b/code/__DEFINES/mobs/biology.dm index 1ee7d2a9c50..0e01f4e2d9f 100644 --- a/code/__DEFINES/mobs/biology.dm +++ b/code/__DEFINES/mobs/biology.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// //* biology flags diff --git a/code/__DEFINES/mobs/rendering.dm b/code/__DEFINES/mobs/rendering.dm index 06cbbbba8b9..377060f8b71 100644 --- a/code/__DEFINES/mobs/rendering.dm +++ b/code/__DEFINES/mobs/rendering.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// //* human overlay enums for standing_overlays #define HUMAN_OVERLAY_BODY "body" diff --git a/code/__DEFINES/power/balancing.dm b/code/__DEFINES/power/balancing.dm index 7cf8428e116..c02ebf4d8e0 100644 --- a/code/__DEFINES/power/balancing.dm +++ b/code/__DEFINES/power/balancing.dm @@ -2,6 +2,8 @@ //* Cells +#define CELLRATE_DEFAULT 0.5 + /** * current calculations * cellrate 0.5 = 0.5 kj/unit @@ -18,6 +20,31 @@ /// 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) +/// Divisible by 1, 2, 3. +#define POWER_CELL_CAPACITY_BASE 1200 + +/// base +/// * this is a default; power cell datums can override this +#define POWER_CELL_MULTIPLIER_SMALL 2 +/// vs small is 100% space-efficient +/// * this is a default; power cell datums can override this +#define POWER_CELL_MULTIPLIER_WEAPON 4 +/// vs weapon is 125% space-efficient +/// * this is a default; power cell datums can override this +#define POWER_CELL_MULTIPLIER_MEDIUM 10 +/// vs medium is 150% space-efficient +/// * this is a default; power cell datums can override this +#define POWER_CELL_MULTIPLIER_LARGE 30 + +/// * only provided for completeness; many cell types have more capacity than this. +#define POWER_CELL_CAPACITY_SMALL (POWER_CELL_CAPACITY_BASE * POWER_CELL_MULTIPLIER_SMALL) +/// * only provided for completeness; many cell types have more capacity than this. +#define POWER_CELL_CAPACITY_MEDIUM (POWER_CELL_CAPACITY_BASE * POWER_CELL_MULTIPLIER_MEDIUM) +/// * only provided for completeness; many cell types have more capacity than this. +#define POWER_CELL_CAPACITY_LARGE (POWER_CELL_CAPACITY_BASE * POWER_CELL_MULTIPLIER_LARGE) +/// * only provided for completeness; many cell types have more capacity than this. +#define POWER_CELL_CAPACITY_WEAPON (POWER_CELL_CAPACITY_BASE * POWER_CELL_MULTIPLIER_WEAPON) + //* Computers /// Idle usage of a mid-range control computer in watts diff --git a/code/__DEFINES/power/cell.dm b/code/__DEFINES/power/cell.dm new file mode 100644 index 00000000000..5145a517fd4 --- /dev/null +++ b/code/__DEFINES/power/cell.dm @@ -0,0 +1,137 @@ +//* This file is explicitly licensed under the MIT license. *// +//* Copyright (c) 2024 Citadel Station Developers *// + +//* /obj/item/cell/var/cell_type *// + +/// handheld devices +#define CELL_TYPE_SMALL (1<<0) +/// medium size devices like inducers, bulky handheld equipment, etc +#define CELL_TYPE_MEDIUM (1<<1) +/// mecha, apcs, large drills, etc +#define CELL_TYPE_LARGE (1<<2) +/// energy weapons that don't use special cells / specific other types +#define CELL_TYPE_WEAPON (1<<3) + +DECLARE_BITFIELD(cell_type, list( + BITFIELD_NAMED("Small", CELL_TYPE_SMALL), + BITFIELD_NAMED("Medium", CELL_TYPE_MEDIUM), + BITFIELD_NAMED("Large", CELL_TYPE_LARGE), + BITFIELD_NAMED("Weapon", CELL_TYPE_WEAPON), +)) +ASSIGN_BITFIELD(cell_type, /obj/item/cell, cell_type) +ASSIGN_BITFIELD(cell_type, /datum/object_system/cell_slot, cell_type) +ASSIGN_BITFIELD(cell_type, /obj/machinery/recharger, cell_accept) +ASSIGN_BITFIELD(cell_type, /obj/machinery/cell_charger, cell_accept) +ASSIGN_BITFIELD(cell_type, /obj/machinery/power/apc, cell_accept) +ASSIGN_BITFIELD(cell_type, /obj/machinery/space_heater, cell_accept) +ASSIGN_BITFIELD(cell_type, /obj/item/flashlight, cell_accept) +ASSIGN_BITFIELD(cell_type, /obj/item/melee/transforming/energy, cell_accept) +ASSIGN_BITFIELD(cell_type, /obj/item/melee/baton, cell_accept) +ASSIGN_BITFIELD(cell_type, /obj/item/inducer, cell_accept) +ASSIGN_BITFIELD(cell_type, /mob/living/silicon/robot, cell_accept) + +/// generate /small, /medium, /large, and /weapon cells for a power cell datum and typepath combo +/// * only works for standard cells with standard graphics. +#define POWER_CELL_GENERATE_TYPES(DATUM_TYPEPATH, CELL_TYPEPATH, PROTOTYPE_ID) \ +/obj/item/cell##CELL_TYPEPATH/small { \ + prototype_id = "cell-" + ##PROTOTYPE_ID + "-small"; \ + name = "small power cell (" + ##DATUM_TYPEPATH::cell_name + ")"; \ + desc = "A small power cell used in handheld electronics. " + ##DATUM_TYPEPATH::cell_desc; \ + icon = 'icons/items/power/cells/small.dmi'; \ + icon_state = "cell"; \ + base_icon_state = "cell"; \ + charge = /obj/item/cell::max_charge * ##DATUM_TYPEPATH::typegen_capacity_multiplier_small * ##DATUM_TYPEPATH::typegen_capacity_multiplier; \ + max_charge = /obj/item/cell::max_charge * ##DATUM_TYPEPATH::typegen_capacity_multiplier_small * ##DATUM_TYPEPATH::typegen_capacity_multiplier; \ + stripe_color = ##DATUM_TYPEPATH::typegen_visual_stripe_color; \ + indicator_color = ##DATUM_TYPEPATH::typegen_visual_indicator_color; \ + typegen_active = TRUE; \ + typegen_material_multiplier = ##DATUM_TYPEPATH::typegen_material_multiply * ##DATUM_TYPEPATH::typegen_material_multiply_small; \ + cell_datum = ##DATUM_TYPEPATH; \ + rendering_system = TRUE; \ + indicator_count = 4; \ + worth_intrinsic = ##DATUM_TYPEPATH::typegen_worth_base_small; \ + w_class = ##DATUM_TYPEPATH::typegen_w_class_small; \ + weight_volume = ##DATUM_TYPEPATH::typegen_w_volume_small; \ + cell_type = CELL_TYPE_SMALL; \ + suit_storage_class = SUIT_STORAGE_CLASS_SOFTWEAR | SUIT_STORAGE_CLASS_ARMOR | SUIT_STORAGE_CLASS_HARDWEAR; \ + slot_flags = SLOT_POCKET; \ +} \ +/obj/item/cell##CELL_TYPEPATH/small/empty { \ + charge = 0; \ +} \ +/obj/item/cell##CELL_TYPEPATH/medium { \ + prototype_id = "cell-" + ##PROTOTYPE_ID + "-medium"; \ + name = "medium power cell (" + ##DATUM_TYPEPATH::cell_name + ")"; \ + desc = "A decently sized cell used in many pieces of modern equipment. " + ##DATUM_TYPEPATH::cell_desc; \ + icon = 'icons/items/power/cells/medium.dmi'; \ + icon_state = "cell"; \ + base_icon_state = "cell"; \ + charge = /obj/item/cell::max_charge * ##DATUM_TYPEPATH::typegen_capacity_multiplier_medium * ##DATUM_TYPEPATH::typegen_capacity_multiplier; \ + max_charge = /obj/item/cell::max_charge * ##DATUM_TYPEPATH::typegen_capacity_multiplier_medium * ##DATUM_TYPEPATH::typegen_capacity_multiplier; \ + stripe_color = ##DATUM_TYPEPATH::typegen_visual_stripe_color; \ + indicator_color = ##DATUM_TYPEPATH::typegen_visual_indicator_color; \ + typegen_active = TRUE; \ + typegen_material_multiplier = ##DATUM_TYPEPATH::typegen_material_multiply * ##DATUM_TYPEPATH::typegen_material_multiply_medium; \ + cell_datum = ##DATUM_TYPEPATH; \ + rendering_system = TRUE; \ + indicator_count = 4; \ + worth_intrinsic = ##DATUM_TYPEPATH::typegen_worth_base_medium; \ + w_class = ##DATUM_TYPEPATH::typegen_w_class_medium; \ + weight_volume = ##DATUM_TYPEPATH::typegen_w_volume_medium; \ + cell_type = CELL_TYPE_MEDIUM; \ + suit_storage_class = SUIT_STORAGE_CLASS_ARMOR | SUIT_STORAGE_CLASS_HARDWEAR; \ +} \ +/obj/item/cell##CELL_TYPEPATH/medium/empty { \ + charge = 0; \ +} \ +/obj/item/cell##CELL_TYPEPATH/large { \ + prototype_id = "cell-" + ##PROTOTYPE_ID + "-large"; \ + name = "large power cell (" + ##DATUM_TYPEPATH::cell_name + ")"; \ + desc = "A bulky power cell used in industrial equipment and power supply systems. " + ##DATUM_TYPEPATH::cell_desc; \ + icon = 'icons/items/power/cells/large.dmi'; \ + icon_state = "cell"; \ + base_icon_state = "cell"; \ + charge = /obj/item/cell::max_charge * ##DATUM_TYPEPATH::typegen_capacity_multiplier_large * ##DATUM_TYPEPATH::typegen_capacity_multiplier; \ + max_charge = /obj/item/cell::max_charge * ##DATUM_TYPEPATH::typegen_capacity_multiplier_large * ##DATUM_TYPEPATH::typegen_capacity_multiplier; \ + stripe_color = ##DATUM_TYPEPATH::typegen_visual_stripe_color; \ + indicator_color = ##DATUM_TYPEPATH::typegen_visual_indicator_color; \ + typegen_active = TRUE; \ + typegen_material_multiplier = ##DATUM_TYPEPATH::typegen_material_multiply * ##DATUM_TYPEPATH::typegen_material_multiply_large; \ + cell_datum = ##DATUM_TYPEPATH; \ + rendering_system = TRUE; \ + indicator_count = 4; \ + worth_intrinsic = ##DATUM_TYPEPATH::typegen_worth_base_large; \ + w_class = ##DATUM_TYPEPATH::typegen_w_class_large; \ + weight_volume = ##DATUM_TYPEPATH::typegen_w_volume_large; \ + cell_type = CELL_TYPE_LARGE; \ + suit_storage_class = SUIT_STORAGE_CLASS_HARDWEAR; \ +} \ +/obj/item/cell##CELL_TYPEPATH/large/empty { \ + charge = 0; \ +} \ +/obj/item/cell##CELL_TYPEPATH/weapon { \ + prototype_id = "cell-" + ##PROTOTYPE_ID + "-weapon"; \ + name = "weapon power cell (" + ##DATUM_TYPEPATH::cell_name + ")"; \ + desc = "A power cell accepted by many kinds of handheld weaponry. " + ##DATUM_TYPEPATH::cell_desc; \ + icon = 'icons/items/power/cells/weapon.dmi'; \ + icon_state = "cell"; \ + base_icon_state = "cell"; \ + charge = /obj/item/cell::max_charge * ##DATUM_TYPEPATH::typegen_capacity_multiplier_weapon * ##DATUM_TYPEPATH::typegen_capacity_multiplier; \ + max_charge = /obj/item/cell::max_charge * ##DATUM_TYPEPATH::typegen_capacity_multiplier_weapon * ##DATUM_TYPEPATH::typegen_capacity_multiplier; \ + stripe_color = ##DATUM_TYPEPATH::typegen_visual_stripe_color; \ + indicator_color = ##DATUM_TYPEPATH::typegen_visual_indicator_color; \ + typegen_active = TRUE; \ + typegen_material_multiplier = ##DATUM_TYPEPATH::typegen_material_multiply * ##DATUM_TYPEPATH::typegen_material_multiply_weapon; \ + cell_datum = ##DATUM_TYPEPATH; \ + rendering_system = TRUE; \ + indicator_count = 4; \ + worth_intrinsic = ##DATUM_TYPEPATH::typegen_worth_base_weapon; \ + w_class = ##DATUM_TYPEPATH::typegen_w_class_weapon; \ + weight_volume = ##DATUM_TYPEPATH::typegen_w_volume_weapon; \ + cell_type = CELL_TYPE_WEAPON; \ + suit_storage_class = SUIT_STORAGE_CLASS_SOFTWEAR | SUIT_STORAGE_CLASS_ARMOR; \ + slot_flags = SLOT_POCKET; \ +} \ +/obj/item/cell##CELL_TYPEPATH/weapon/empty { \ + charge = 0; \ +} diff --git a/code/__DEFINES/power/power.dm b/code/__DEFINES/power/power.dm index cc8e4bb4ca3..132965ea491 100644 --- a/code/__DEFINES/power/power.dm +++ b/code/__DEFINES/power/power.dm @@ -147,7 +147,8 @@ * #define SMESMAXOUTPUT 250000 */ -/* cells */ +//* Cells *// + // Cells practically use their own power systems // "Use power from cell" for **handheld/portable devices**, semantically, should always use cell units and not a "real unit" // This way we can tweak balance with just cellrate. @@ -175,6 +176,18 @@ #define DYNAMIC_CELL_UNITS_TO_KWM(U) (((U) * GLOB.cellrate) / (60)) #define DYNAMIC_CELL_UNITS_TO_WM(U) (((U) * GLOB.cellrate) / (60 / 1000)) +//* Cells - Static; These use CELLRATE_DEFAULT *// + +#define STATIC_KW_TO_CELL_UNITS(KW, DT) ((KW) * (DT) / CELLRATE_DEFAULT) +#define STATIC_W_TO_CELL_UNITS(W, DT) (((W) * 0.001) * (DT) / CELLRATE_DEFAULT) +#define STATIC_J_TO_CELL_UNITS(J) (((J) * 0.001) / CELLRATE_DEFAULT) +#define STATIC_KJ_TO_CELL_UNITS(KJ) ((KJ) / CELLRATE_DEFAULT) + +#define STATIC_CELL_UNITS_TO_KW(U, DT) ((U) * CELLRATE_DEFAULT / (DT)) +#define STATIC_CELL_UNITS_TO_W(U, DT) ((U) * CELL_RATE_DEFAULT / (DT) * 1000) +#define STATIC_CELL_UNITS_TO_J(U) ((U) * CELL_RATE_DEFAULT * 1000) +#define STATIC_CELL_UNITS_TO_KJ(U) ((U) * CELL_RATE_DEFAULT) + /** * LEGACY ENUMS * diff --git a/code/__DEFINES/radiation/simulation.dm b/code/__DEFINES/radiation/simulation.dm index 8cade0aea76..a95001033eb 100644 --- a/code/__DEFINES/radiation/simulation.dm +++ b/code/__DEFINES/radiation/simulation.dm @@ -32,6 +32,8 @@ #define RAD_FALLOFF_ENGINE_SINGULARITY 0.5 /// materials #define RAD_FALLOFF_MATERIALS 0.5 +/// breached microfission cell +#define RAD_FALLOFF_CELL_MICROFISSION 0.5 //! Pulse - Z Falloff //* Keep in mind that these are low because things are usually really far away and the point of Z rad is to hit most things. @@ -53,6 +55,10 @@ #define RAD_INTENSITY_STANDALONE_DEFIB 100 /// standalone shockpaddles - fail tick #define RAD_INTENSITY_STANDALONE_DEFIB_FAIL 150 +/// minimum intensity of a breached microfission cell +#define RAD_INTENSITY_CELL_MICROFISSION_LEAK_MINIMUM 75 +/// maximum intensity of a breached microfission cell +#define RAD_INTENSITY_CELL_MICROFISSION_LEAK_MAXIMUM 350 //? machines /// gravity generator grav per tick while charging/discharging diff --git a/code/__DEFINES/rendering/atom_huds.dm b/code/__DEFINES/rendering/atom_huds.dm index ce9da44c77c..cc66011db53 100644 --- a/code/__DEFINES/rendering/atom_huds.dm +++ b/code/__DEFINES/rendering/atom_huds.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// //* sources diff --git a/code/__DEFINES/supply.dm b/code/__DEFINES/supply.dm index 5d432310a7e..78fefa933ac 100644 --- a/code/__DEFINES/supply.dm +++ b/code/__DEFINES/supply.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// //* Supply Packs - Flags *// diff --git a/code/__DEFINES/tools/functionality.dm b/code/__DEFINES/tools/functionality.dm index a3c33e90bc7..8dacadafeac 100644 --- a/code/__DEFINES/tools/functionality.dm +++ b/code/__DEFINES/tools/functionality.dm @@ -19,11 +19,14 @@ #define TOOL_SCALPEL "scalpel" #define TOOL_SAW "saw" //* Glassworking -#define TOOL_BLOW "blowing_rod" -#define TOOL_GLASS_CUT "glasskit" -#define TOOL_BONESET "bonesetter" +#define TOOL_BLOW "blowing-rod" +#define TOOL_GLASS_CUT "glass-kit" +#define TOOL_BONESET "bone-setter" -GLOBAL_REAL_VAR(all_tool_functions) = list( +/** + * Hardcoded tool behaviors. + */ +GLOBAL_REAL_VAR(tool_behaviors_hardcoded) = list( // engineering TOOL_CROWBAR, TOOL_MULTITOOL, @@ -48,6 +51,17 @@ GLOBAL_REAL_VAR(all_tool_functions) = list( TOOL_BONESET, ) +/** + * Remaps for tool behavior names. + */ +GLOBAL_REAL_LIST(tool_behavior_name_remaps) = list() + +/** + * Gets the human-friendly name of a tool behavior. + */ +/proc/tool_behavior_name(behavior) + return global.tool_behavior_name_remaps[behavior] || behavior + /// Yes, this is a real global. No, you shouldn't touch this for no reason. /// Add tools to this when they get states in the default icon file for: /// - neutral (no append) diff --git a/code/__HELPERS/datastructs/bitfields.dm b/code/__HELPERS/datastructs/bitfields.dm index 476f8f66633..491208286be 100644 --- a/code/__HELPERS/datastructs/bitfields.dm +++ b/code/__HELPERS/datastructs/bitfields.dm @@ -84,7 +84,9 @@ GLOBAL_LIST(bitfields_by_var) for(var/datum/bitfield/bitfield as anything in GLOB.bitfields_by_var[var_name]) for(var/match in bitfield.paths) if(ispath(path, match)) - return bitfield + var/list/var_maybe = bitfield.paths[match] + if(islist(var_maybe) ? (var_name in var_maybe) : (var_name == var_maybe)) + return bitfield /** * Bitfield datums used to reflect bitfield values in the game's code. diff --git a/code/__HELPERS/game/combat/arc.dm b/code/__HELPERS/game/combat/arc.dm index e51718e2f66..6f3b76c27c6 100644 --- a/code/__HELPERS/game/combat/arc.dm +++ b/code/__HELPERS/game/combat/arc.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /** * Checks if an attacking atom is within the defensive arc of a defending atom. diff --git a/code/__HELPERS/icons/render.dm b/code/__HELPERS/icons/render.dm index 4fe3457f17b..d117ad5bb30 100644 --- a/code/__HELPERS/icons/render.dm +++ b/code/__HELPERS/icons/render.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /proc/render_compound_icon_with_client(target, client/C) var/icon/generated diff --git a/code/__HELPERS/math/fractions.dm b/code/__HELPERS/math/fractions.dm index f6228cca1d2..283e18112b8 100644 --- a/code/__HELPERS/math/fractions.dm +++ b/code/__HELPERS/math/fractions.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /** * checks if n / d is a terminating decimal diff --git a/code/controllers/repository/power_cells.dm b/code/controllers/repository/power_cells.dm new file mode 100644 index 00000000000..de5a33e5458 --- /dev/null +++ b/code/controllers/repository/power_cells.dm @@ -0,0 +1,6 @@ +//* This file is explicitly licensed under the MIT license. *// +//* Copyright (c) 2025 Citadel Station Developers *// + +REPOSITORY_DEF(power_cells) + name = "Repository - Power Cells" + expected_type = /datum/prototype/power_cell diff --git a/code/controllers/subsystem/garbage.dm b/code/controllers/subsystem/garbage.dm index 0314666ef9c..8f321c55330 100644 --- a/code/controllers/subsystem/garbage.dm +++ b/code/controllers/subsystem/garbage.dm @@ -217,13 +217,10 @@ SUBSYSTEM_DEF(garbage) var/type = D.type var/datum/qdel_item/I = items[type] - var/message = "## TESTING: GC: -- [ref(D)] | [type] was unable to be GC'd --" - message = "[message] (ref count of [refcount(D)])" - log_world(message) - // -- CITADEL EDIT: more aggressive GC tracing -- do var/list/trace_data = D.gc_trace_data() + trace_data["gc-stage"] = "check-failed" trace_data["type"] = "[type]" trace_data["refcount"] = refcount(D) log_world("GC-TRACE: [json_encode(trace_data)]") @@ -290,6 +287,7 @@ SUBSYSTEM_DEF(garbage) var/maybe_trace_data do var/list/trace_data = D.gc_trace_data() + trace_data["gc-stage"] = "hard-deleting" trace_data["type"] = "[type]" // this *should* be at 2 here, one in the handlequeue proc, // and one here. any extras are dangling references. diff --git a/code/controllers/subsystem/grids.dm b/code/controllers/subsystem/grids.dm index 8fb76a36ae8..00fa4442da9 100644 --- a/code/controllers/subsystem/grids.dm +++ b/code/controllers/subsystem/grids.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /** * The movement manager for turf movements diff --git a/code/controllers/subsystem/persistence/prototype_lookup.dm b/code/controllers/subsystem/persistence/prototype_lookup.dm index 18c9511f6ae..880e433c1e6 100644 --- a/code/controllers/subsystem/persistence/prototype_lookup.dm +++ b/code/controllers/subsystem/persistence/prototype_lookup.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/controller/subsystem/persistence/proc/build_prototype_id_lookup() var/list/constructing = list() diff --git a/code/controllers/subsystem/processing/processing.dm b/code/controllers/subsystem/processing/processing.dm index 1b98510c602..c890b4a67e3 100644 --- a/code/controllers/subsystem/processing/processing.dm +++ b/code/controllers/subsystem/processing/processing.dm @@ -28,6 +28,13 @@ SUBSYSTEM_DEF(processing) var/datum/thing = current_run[current_run.len] current_run.len-- if(QDELETED(thing)) + log_world("GC-TRACE: Deleted entity found in [src] - [thing ? thing.type : "-- null value --"]") + if(thing) + var/list/trace = thing.gc_trace_data() + trace["type"] = thing.type + trace["refcount"] = refcount(thing) + log_world("GC-TRACE: From [src], [thing.type] had trace: [json_encode(trace)]") + stack_trace("deleted entity found in [src]; check logs.") processing -= thing else if(thing.process(dt) == PROCESS_KILL) // fully stop so that a future START_PROCESSING will work diff --git a/code/controllers/subsystem/processing/projectiles.dm b/code/controllers/subsystem/processing/projectiles.dm index adaf3945de0..bfbd8d5221e 100644 --- a/code/controllers/subsystem/processing/projectiles.dm +++ b/code/controllers/subsystem/processing/projectiles.dm @@ -1,9 +1,9 @@ PROCESSING_SUBSYSTEM_DEF(projectiles) name = "Projectiles" - wait = 0.25 // scale up to 40 fps + wait = 0.5 stat_tag = "PP" priority = FIRE_PRIORITY_PROJECTILES - subsystem_flags = SS_NO_INIT + subsystem_flags = SS_NO_INIT | SS_KEEP_TIMING /// global projectile speed multiplier var/global_projectile_speed_multiplier = 1 diff --git a/code/datums/beam.dm b/code/datums/beam.dm index 7fdef7d2807..b00a92fd730 100644 --- a/code/datums/beam.dm +++ b/code/datums/beam.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /** * creates a segmenting beam diff --git a/code/datums/bound_proc.dm b/code/datums/bound_proc.dm index b46d429240e..4ce3c769086 100644 --- a/code/datums/bound_proc.dm +++ b/code/datums/bound_proc.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /** * Lightweight variant of a callback. diff --git a/code/datums/components/atoms/radiation_listener.dm b/code/datums/components/atoms/radiation_listener.dm index 8410d9dd17d..3206bd44c23 100644 --- a/code/datums/components/atoms/radiation_listener.dm +++ b/code/datums/components/atoms/radiation_listener.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/component/radiation_listener diff --git a/code/datums/components/crafting/crafting.dm b/code/datums/components/crafting/crafting.dm index 94e9c10444a..dd5ab1e6774 100644 --- a/code/datums/components/crafting/crafting.dm +++ b/code/datums/components/crafting/crafting.dm @@ -127,7 +127,7 @@ /datum/component/personal_crafting/proc/get_surroundings(atom/a) . = list() - .["tool_behaviour"] = list() + .["tool_behavior"] = list() .["other"] = list() .["instances"] = list() for(var/obj/item/I in get_environment(a)) @@ -140,8 +140,8 @@ if(istype(I, /obj/item/stack)) var/obj/item/stack/S = I .["other"][I.type] += S.amount - else if(I.tool_behaviour) - .["tool_behaviour"] += I.tool_behaviour + else if(I.tool_behavior) + .["tool_behavior"] += I.tool_behavior .["other"][I.type] += 1 else if(istype(I, /obj/item/reagent_containers)) @@ -158,18 +158,18 @@ return TRUE var/list/possible_tools = list() var/list/present_qualities = list() - present_qualities |= contents["tool_behaviour"] + present_qualities |= contents["tool_behavior"] for(var/obj/item/I in a.contents) if(istype(I, /obj/item/storage)) for(var/obj/item/SI in I.contents) possible_tools += SI.type - if(SI.tool_behaviour) - present_qualities.Add(SI.tool_behaviour) + if(SI.tool_behavior) + present_qualities.Add(SI.tool_behavior) possible_tools += I.type - if(I.tool_behaviour) - present_qualities.Add(I.tool_behaviour) + if(I.tool_behavior) + present_qualities.Add(I.tool_behavior) possible_tools |= contents["other"] diff --git a/code/datums/components/movable/spatial_grid.dm b/code/datums/components/movable/spatial_grid.dm index 23fba4bb625..3d8c112c753 100644 --- a/code/datums/components/movable/spatial_grid.dm +++ b/code/datums/components/movable/spatial_grid.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /** * registers a /movable in a spatial grid diff --git a/code/datums/components/turfs/reservation_border.dm b/code/datums/components/turfs/reservation_border.dm index bf029aac9b3..7fc401473fd 100644 --- a/code/datums/components/turfs/reservation_border.dm +++ b/code/datums/components/turfs/reservation_border.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /** * transition border but for turf reservations diff --git a/code/datums/outfits/outfit.dm b/code/datums/outfits/outfit.dm index e38b4ae66f5..00502a6b534 100644 --- a/code/datums/outfits/outfit.dm +++ b/code/datums/outfits/outfit.dm @@ -314,8 +314,8 @@ suit = /obj/item/clothing/suit/armor/combat/imperial back = /obj/item/storage/backpack/satchel belt = /obj/item/storage/belt/security/tactical/bandolier - l_pocket = /obj/item/cell/device/weapon - r_pocket = /obj/item/cell/device/weapon + l_pocket = /obj/item/cell/basic/tier_3/weapon + r_pocket = /obj/item/cell/basic/tier_3/weapon r_hand = /obj/item/melee/transforming/energy/sword/imperial l_hand = /obj/item/shield/transforming/energy/imperial suit_store = /obj/item/gun/projectile/energy/imperial @@ -330,8 +330,8 @@ mask = /obj/item/clothing/mask/gas/imperial suit = /obj/item/clothing/suit/armor/combat/imperial/centurion belt = /obj/item/storage/belt/security/tactical/bandolier - l_pocket = /obj/item/cell/device/weapon - r_pocket = /obj/item/cell/device/weapon + l_pocket = /obj/item/cell/basic/tier_3/weapon + r_pocket = /obj/item/cell/basic/tier_3/weapon r_hand = /obj/item/melee/transforming/energy/sword/imperial l_hand = /obj/item/shield/transforming/energy/imperial suit_store = /obj/item/gun/projectile/energy/imperial diff --git a/code/datums/recipe/crafting_recipes/recipes_misc.dm b/code/datums/recipe/crafting_recipes/recipes_misc.dm index 77ad8ebf09d..826864a8021 100644 --- a/code/datums/recipe/crafting_recipes/recipes_misc.dm +++ b/code/datums/recipe/crafting_recipes/recipes_misc.dm @@ -225,7 +225,7 @@ /datum/crafting_recipe/goldenbox name = "Gold Plated Toolbox" result = /obj/item/storage/toolbox/gold_fake - tools = list(/obj/item/cell/high, + tools = list(/obj/item/cell, /obj/item/reagent_containers/glass/beaker) reqs = list(/obj/item/stack/material/cardboard = 1, //so we dont null items in crafting /obj/item/stack/cable_coil = 10, @@ -276,7 +276,7 @@ /datum/crafting_recipe/brass_driver name = "Brass Screwdriver" - tools = list(/obj/item/cell/high, + tools = list(/obj/item/cell, /obj/item/reagent_containers/glass/beaker) result = /obj/item/tool/screwdriver/brass reqs = list(/obj/item/tool/screwdriver = 1, @@ -291,7 +291,7 @@ /datum/crafting_recipe/brass_welder name = "Brass Welding Tool" - tools = list(/obj/item/cell/high, + tools = list(/obj/item/cell, /obj/item/reagent_containers/glass/beaker) result = /obj/item/weldingtool/brass reqs = list(/obj/item/weldingtool = 1, @@ -306,7 +306,7 @@ /datum/crafting_recipe/clockwelder name = "Replica Clockwork Welding Tool" - tools = list(/obj/item/cell/high, + tools = list(/obj/item/cell, /obj/item/reagent_containers/glass/beaker) result = /obj/item/weldingtool/experimental/brass reqs = list(/obj/item/weldingtool/experimental = 1, @@ -321,7 +321,7 @@ /datum/crafting_recipe/brass_wirecutters name = "Brass Wirecutters" - tools = list(/obj/item/cell/high, + tools = list(/obj/item/cell, /obj/item/reagent_containers/glass/beaker) result = /obj/item/tool/wirecutters/brass reqs = list(/obj/item/tool/wirecutters = 1, @@ -336,7 +336,7 @@ /datum/crafting_recipe/brass_crowbar name = "Brass Crowbar" - tools = list(/obj/item/cell/high, + tools = list(/obj/item/cell, /obj/item/reagent_containers/glass/beaker) result = /obj/item/tool/crowbar/brass reqs = list(/obj/item/tool/crowbar = 1, @@ -351,7 +351,7 @@ /datum/crafting_recipe/brass_wrench name = "Brass Wrench" - tools = list(/obj/item/cell/high, + tools = list(/obj/item/cell, /obj/item/reagent_containers/glass/beaker) result = /obj/item/tool/wrench/brass reqs = list(/obj/item/tool/wrench = 1, diff --git a/code/datums/recipe/crafting_recipes/recipes_robot.dm b/code/datums/recipe/crafting_recipes/recipes_robot.dm index 6d06e1ea883..ca285c5b49d 100644 --- a/code/datums/recipe/crafting_recipes/recipes_robot.dm +++ b/code/datums/recipe/crafting_recipes/recipes_robot.dm @@ -78,15 +78,15 @@ category = CAT_ROBOT */ -/datum/crafting_recipe/aitater - name = "intelliTater" - result = /obj/item/aicard/aitater - time = 30 - tools = list(TOOL_WIRECUTTER) - reqs = list(/obj/item/aicard = 1, - /obj/item/cell/potato = 1, - /obj/item/stack/cable_coil = 5) - category = CAT_ROBOT +// /datum/crafting_recipe/aitater +// name = "intelliTater" +// result = /obj/item/aicard/aitater +// time = 30 +// tools = list(TOOL_WIRECUTTER) +// reqs = list(/obj/item/aicard = 1, +// /obj/item/cell/potato = 1, +// /obj/item/stack/cable_coil = 5) +// category = CAT_ROBOT /datum/crafting_recipe/aispook name = "intelliLantern" diff --git a/code/datums/recipe/stack_recipes/frame.dm b/code/datums/recipe/stack_recipes/frame.dm index 8924dbe469b..cfa259426cb 100644 --- a/code/datums/recipe/stack_recipes/frame.dm +++ b/code/datums/recipe/stack_recipes/frame.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/stack_recipe/frame var/frame_id diff --git a/code/datums/shieldcall.dm b/code/datums/shieldcall.dm index cca4bf594b5..54bc675fe70 100644 --- a/code/datums/shieldcall.dm +++ b/code/datums/shieldcall.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// GLOBAL_LIST_EMPTY(cached_shieldcall_datums) diff --git a/code/datums/uplink/ammunition.dm b/code/datums/uplink/ammunition.dm index 2b668ef3ece..021176e6800 100644 --- a/code/datums/uplink/ammunition.dm +++ b/code/datums/uplink/ammunition.dm @@ -124,22 +124,18 @@ path = /obj/item/storage/box/flashshells item_cost = 10 // Discount due to it being LTL. -/datum/uplink_item/item/ammo/cell - name = "weapon cell" - path = /obj/item/cell/device/weapon +/datum/uplink_item/item/ammo/weapon_cell + name = "weapon power cell" + path = /obj/item/cell/basic/tier_4/weapon -/datum/uplink_item/item/ammo/highcell - name = "High capacity cell" - path = /obj/item/cell/high - item_cost = 15 +/datum/uplink_item/item/ammo/small + name = "small power cell" + path = /obj/item/cell/basic/tier_4/small -/datum/uplink_item/item/ammo/supercell - name = "Super capacity cell" - path = /obj/item/cell/super - item_cost = 30 -/* Cell type not present on Cit -/datum/uplink_item/item/ammo/voidcell - name = "Void cell" - path = /obj/item/cell/device/recharge/alien/hybrid - item_cost = DEFAULT_TELECRYSTAL_AMOUNT * 1.5 -*/ +/datum/uplink_item/item/ammo/medium_cell + name = "medium power cell" + path = /obj/item/cell/basic/tier_4/medium + +/datum/uplink_item/item/ammo/large_cell + name = "large power cell" + path = /obj/item/cell/basic/tier_4/large diff --git a/code/game/atoms/atom-construction.dm b/code/game/atoms/atom-construction.dm index 94d85815a35..dd1f214ccad 100644 --- a/code/game/atoms/atom-construction.dm +++ b/code/game/atoms/atom-construction.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// //* Deconstruction *// diff --git a/code/game/atoms/atom-damage.dm b/code/game/atoms/atom-damage.dm index e1e2bf04d09..0eb6e1fd669 100644 --- a/code/game/atoms/atom-damage.dm +++ b/code/game/atoms/atom-damage.dm @@ -166,12 +166,15 @@ * * amount - how much * * gradual - burst or gradual? if you want to play a sound or something, you usually want to check this. * * do_not_break - skip calling atom_break + * + * @return amount damaged */ /atom/proc/damage_integrity(amount, gradual, do_not_break) SHOULD_CALL_PARENT(TRUE) SHOULD_NOT_SLEEP(TRUE) var/was_working = integrity > integrity_failure - integrity = max(0, integrity - amount) + . = min(integrity, amount) + integrity -= . if(was_working && integrity <= integrity_failure && !do_not_break) atom_break() if(integrity <= 0) diff --git a/code/game/atoms/atom-examine.dm b/code/game/atoms/atom-examine.dm index 8ba068ab7e0..3c57977a0fc 100644 --- a/code/game/atoms/atom-examine.dm +++ b/code/game/atoms/atom-examine.dm @@ -66,7 +66,7 @@ . += SPAN_TINYNOTICE("For more information, click here.") //This feels VERY HACKY but eh its PROBABLY fine // todo: i'm crying i hate this better software context menus whennnnnnnnnn if(length(context_menu_query(new /datum/event_args/actor(user)))) - . += SPAN_NOTICE("Ctrl-Shift click on this entity to show additional options.") + . += SPAN_NOTICE("Ctrl-shift-click on this entity to show additional options.") if(integrity_flags & INTEGRITY_INDESTRUCTIBLE) . += SPAN_NOTICE("It doesn't look like it can be damaged through common means.") /* diff --git a/code/game/atoms/atom-materials.dm b/code/game/atoms/atom-materials.dm index db588579f3c..537d845fb12 100644 --- a/code/game/atoms/atom-materials.dm +++ b/code/game/atoms/atom-materials.dm @@ -5,7 +5,9 @@ * get raw materials remaining in us as list (not reagents) * used from everything from economy to lathe recycling * - * for things like stacks, this is amount per sheet. + * * For stacks, this is amount per sheet. + * * This does not include the materials of our contents. For example, ammo magazines don't + * count the bullets left in them. * * @params * * respect_multiplier - respect material_multiplier which is often used to modify atom materials when efficiency is higher in lathes. diff --git a/code/game/atoms/atom-tool_system.dm b/code/game/atoms/atom-tool_system.dm index bd3ee8644ad..e2a1135d350 100644 --- a/code/game/atoms/atom-tool_system.dm +++ b/code/game/atoms/atom-tool_system.dm @@ -78,7 +78,7 @@ var/list/possibilities = dynamic_tool_query(provided_item, e_args) if(!length(possibilities) || (provided_item.tool_locked == TOOL_LOCKING_STATIC)) // no dynamic tool functionality, or dynamic functionality disabled, route normally. - function = provided_item.tool_behaviour() + function = provided_item.tool_behavior() if(!function) return NONE return _tool_act(provided_item, e_args, function, TOOL_OP_REAL) @@ -97,7 +97,7 @@ possibilities -= i if(!length(possibilities)) // none can be used, just go to static tool act if possible - function = provided_item.tool_behaviour() + function = provided_item.tool_behavior() if(!function) return NONE return _tool_act(provided_item, e_args, function, TOOL_OP_REAL) diff --git a/code/game/atoms/buckling.dm b/code/game/atoms/buckling.dm index e0ad74732dd..ce562908526 100644 --- a/code/game/atoms/buckling.dm +++ b/code/game/atoms/buckling.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /atom/movable/MouseDroppedOn(atom/dropping, mob/user, proximity, params) if(drag_drop_buckle_interaction(dropping, user)) diff --git a/code/game/atoms/movable/movable-throw.dm b/code/game/atoms/movable/movable-throw.dm index 742afd66cd8..704f1919931 100644 --- a/code/game/atoms/movable/movable-throw.dm +++ b/code/game/atoms/movable/movable-throw.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// //! Welcome to unoptimized hell. Enjoy your comsigs. diff --git a/code/game/backend/world/world_faction.dm b/code/game/backend/world/world_faction.dm index 0455747bfac..d67debd0a5e 100644 --- a/code/game/backend/world/world_faction.dm +++ b/code/game/backend/world/world_faction.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /** * a faction in the in-game universe diff --git a/code/game/backend/world/world_location.dm b/code/game/backend/world/world_location.dm index 1cb6ef2cae0..919d6b52a13 100644 --- a/code/game/backend/world/world_location.dm +++ b/code/game/backend/world/world_location.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /** * a locale in the world diff --git a/code/game/content/factions/corporations/nanotrasen/guns/nt_expedition-antimaterial.dm b/code/game/content/factions/corporations/nanotrasen/guns/nt_expedition-antimaterial.dm index 8681928c55c..4d3bdab56d3 100644 --- a/code/game/content/factions/corporations/nanotrasen/guns/nt_expedition-antimaterial.dm +++ b/code/game/content/factions/corporations/nanotrasen/guns/nt_expedition-antimaterial.dm @@ -52,6 +52,7 @@ ammo_caliber = /datum/ammo_caliber/nt_expedition/antimaterial ammo_max = 5 ammo_preload = /obj/item/ammo_casing/nt_expedition/antimaterial + weight_volume = ITEM_VOLUME_RIFLE_MAG magazine_type = MAGAZINE_TYPE_NORMAL /obj/item/ammo_magazine/nt_expedition/antimaterial/update_icon(updates) diff --git a/code/game/content/factions/corporations/nanotrasen/guns/nt_expedition-heavy_rifle.dm b/code/game/content/factions/corporations/nanotrasen/guns/nt_expedition-heavy_rifle.dm index d8e9c36dae3..039adea334e 100644 --- a/code/game/content/factions/corporations/nanotrasen/guns/nt_expedition-heavy_rifle.dm +++ b/code/game/content/factions/corporations/nanotrasen/guns/nt_expedition-heavy_rifle.dm @@ -47,6 +47,7 @@ icon_state = "stripper" base_icon_state = "stripper" ammo_max = 6 + weight_volume = ITEM_VOLUME_PISTOL_MAG magazine_type = MAGAZINE_TYPE_CLIP /obj/item/ammo_magazine/nt_expedition/heavy_rifle/stripper_clip/update_icon(updates) @@ -68,6 +69,7 @@ name = "ammo magazine (NT-7.5-LR)" icon_state = "mag-basic-0" base_icon_state = "mag-basic" + weight_volume = ITEM_VOLUME_RIFLE_MAG magazine_type = MAGAZINE_TYPE_NORMAL ammo_max = 16 diff --git a/code/game/content/factions/corporations/nanotrasen/guns/nt_expedition-heavy_sidearm.dm b/code/game/content/factions/corporations/nanotrasen/guns/nt_expedition-heavy_sidearm.dm index 55b33bd8ad0..01bdbdce297 100644 --- a/code/game/content/factions/corporations/nanotrasen/guns/nt_expedition-heavy_sidearm.dm +++ b/code/game/content/factions/corporations/nanotrasen/guns/nt_expedition-heavy_sidearm.dm @@ -57,6 +57,7 @@ icon_state = "speedloader" base_icon_state = "speedloader" magazine_type = MAGAZINE_TYPE_SPEEDLOADER + weight_volume = ITEM_VOLUME_PISTOL_MAG ammo_max = 6 /obj/item/ammo_magazine/nt_expedition/heavy_sidearm/speedloader/update_icon(updates) @@ -80,6 +81,7 @@ base_icon_state = "magazine" rendering_static_overlay = "magazine-stripe" magazine_type = MAGAZINE_TYPE_NORMAL + weight_volume = ITEM_VOLUME_PISTOL_MAG ammo_max = 10 GENERATE_DESIGN_FOR_AUTOLATHE(/obj/item/ammo_magazine/nt_expedition/heavy_sidearm/smg, /nt_expedition_ammo/heavy_sidearm/smg, "nt-ammo-9mmLR-smg"); @@ -87,6 +89,7 @@ GENERATE_DESIGN_FOR_AUTOLATHE(/obj/item/ammo_magazine/nt_expedition/heavy_sidear name = "smg magazine (NT-9-LR)" icon_state = "smg-1" base_icon_state = "smg" + weight_volume = ITEM_VOLUME_RIFLE_MAG rendering_static_overlay = "smg-stripe" magazine_type = MAGAZINE_TYPE_NORMAL ammo_max = 20 diff --git a/code/game/content/factions/corporations/nanotrasen/guns/nt_expedition-light_rifle.dm b/code/game/content/factions/corporations/nanotrasen/guns/nt_expedition-light_rifle.dm index a7354532290..f17f400edae 100644 --- a/code/game/content/factions/corporations/nanotrasen/guns/nt_expedition-light_rifle.dm +++ b/code/game/content/factions/corporations/nanotrasen/guns/nt_expedition-light_rifle.dm @@ -41,6 +41,7 @@ icon = 'icons/content/factions/corporations/nanotrasen/items/guns/expeditionary/rifle-light-ammo.dmi' icon_state = "magazine" base_icon_state = "magazine" + weight_volume = ITEM_VOLUME_PISTOL_MAG rendering_system = GUN_RENDERING_DISABLED ammo_caliber = /datum/ammo_caliber/nt_expedition/light_rifle ammo_preload = /obj/item/ammo_casing/nt_expedition/light_rifle @@ -86,6 +87,7 @@ name = "ammo magazine (NT-7.5)" icon_state = "rifle-1" base_icon_state = "rifle" + weight_volume = ITEM_VOLUME_RIFLE_MAG rendering_system = GUN_RENDERING_STATES rendering_count = 1 rendering_static_overlay = "rifle-stripe" diff --git a/code/game/content/factions/corporations/nanotrasen/guns/nt_expedition-light_sidearm.dm b/code/game/content/factions/corporations/nanotrasen/guns/nt_expedition-light_sidearm.dm index 2ef7d100abf..fec3e853b0d 100644 --- a/code/game/content/factions/corporations/nanotrasen/guns/nt_expedition-light_sidearm.dm +++ b/code/game/content/factions/corporations/nanotrasen/guns/nt_expedition-light_sidearm.dm @@ -96,6 +96,7 @@ icon_state = "pistol-5" base_icon_state = "pistol" rendering_system = GUN_RENDERING_STATES + weight_volume = ITEM_VOLUME_PISTOL_MAG rendering_count = 5 rendering_static_overlay = "pistol-stripe" ammo_max = 14 @@ -105,6 +106,7 @@ GENERATE_DESIGN_FOR_AUTOLATHE(/obj/item/ammo_magazine/nt_expedition/light_sidear name = "smg magazine (NT-9)" icon_state = "smg-1" base_icon_state = "smg" + weight_volume = ITEM_VOLUME_RIFLE_MAG rendering_system = GUN_RENDERING_STATES rendering_count = 1 rendering_static_overlay = "smg-stripe" diff --git a/code/game/content/factions/corporations/nanotrasen/guns/nt_isd.dm b/code/game/content/factions/corporations/nanotrasen/guns/nt_isd.dm index c3fae3a4224..e93c1851bf9 100644 --- a/code/game/content/factions/corporations/nanotrasen/guns/nt_isd.dm +++ b/code/game/content/factions/corporations/nanotrasen/guns/nt_isd.dm @@ -32,19 +32,19 @@ /datum/firemode/energy/nt_isd/sidearm/stun name = "disrupt" render_color = "#ffff00" - charge_cost = 2400 / 8 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 12 projectile_type = /obj/projectile/nt_isd/electrode /datum/firemode/energy/nt_isd/sidearm/disable name = "disable" render_color = "#77ffff" - charge_cost = 2400 / 20 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 20 projectile_type = /obj/projectile/nt_isd/disable /datum/firemode/energy/nt_isd/sidearm/lethal name = "kill" render_color = "#ff0000" - charge_cost = 2400 / 12 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 16 projectile_type = /obj/projectile/nt_isd/laser/sidearm considered_lethal = TRUE @@ -104,20 +104,20 @@ /datum/firemode/energy/nt_isd/carbine/disable name = "disable" render_color = "#77ffff" - charge_cost = 2400 / 20 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 20 projectile_type = /obj/projectile/nt_isd/disable /datum/firemode/energy/nt_isd/carbine/shock name = "shock" render_color = "#ffff00" - charge_cost = 2400 / 10 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 12 projectile_type = /obj/projectile/nt_isd/shock considered_lethal = TRUE /datum/firemode/energy/nt_isd/carbine/kill name = "kill" render_color = "#ff0000" - charge_cost = 2400 / 12 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 16 projectile_type = /obj/projectile/nt_isd/laser/rifle considered_lethal = TRUE cycle_cooldown = 0.45 SECONDS @@ -168,7 +168,7 @@ /datum/firemode/energy/nt_isd/lance/kill name = "kill" render_color = "#00ff00" - charge_cost = 2400 / 15 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 16 projectile_type = /obj/projectile/nt_isd/laser/lance /obj/item/gun/projectile/energy/nt_isd/lance @@ -211,13 +211,13 @@ name = "disable" render_color = "#77ffff" projectile_type = /obj/projectile/nt_isd/disable - charge_cost = 2400 / 20 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 20 /datum/firemode/energy/nt_isd/multiphase/kill name = "kill" render_color = "#ff0000" projectile_type = /obj/projectile/nt_isd/laser/multiphase - charge_cost = 2400 / 12 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 16 considered_lethal = TRUE cycle_cooldown = 0.6 SECONDS @@ -226,7 +226,7 @@ name = "ion" render_color = "#45a3aa" projectile_type = /obj/projectile/nt_isd/ion - charge_cost = 2400 / 6 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 8 considered_lethal = TRUE cycle_cooldown = 0.8 SECONDS diff --git a/code/game/content/factions/corporations/nanotrasen/guns/nt_pmd.dm b/code/game/content/factions/corporations/nanotrasen/guns/nt_pmd.dm index 87ca6c21c2e..b9c43dad65e 100644 --- a/code/game/content/factions/corporations/nanotrasen/guns/nt_pmd.dm +++ b/code/game/content/factions/corporations/nanotrasen/guns/nt_pmd.dm @@ -9,7 +9,7 @@ /datum/firemode/energy/nt_pmd/service_revolver/normal name = "normal" projectile_type = /obj/projectile/bullet/pistol/medium/silver - charge_cost = 2400 / 8 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 20 /datum/firemode/energy/nt_pmd/service_revolver/normal/make_radial_appearance() return image(/obj/item/gun/projectile/energy/nt_pmd/service_revolver::icon, "service-normal") @@ -18,7 +18,7 @@ name = "shatter" projectile_type = /obj/projectile/bullet/pellet/shotgun/silvershot cycle_cooldown = 1.5 SECONDS - charge_cost = 2400 / 5 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 10 /datum/firemode/energy/nt_pmd/service_revolver/shatter/make_radial_appearance() return image(/obj/item/gun/projectile/energy/nt_pmd/service_revolver::icon, "service-shatter") @@ -27,7 +27,7 @@ name = "spin" projectile_type = /obj/projectile/bullet/pistol/spin cycle_cooldown = 0.1 SECONDS - charge_cost = 2400 / 80 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 120 /datum/firemode/energy/nt_pmd/service_revolver/spin/make_radial_appearance() return image(/obj/item/gun/projectile/energy/nt_pmd/service_revolver::icon, "service-spin") @@ -36,7 +36,7 @@ name = "pierce" projectile_type = /obj/projectile/bullet/rifle/a762/ap/silver cycle_cooldown = 1.5 SECONDS - charge_cost = 2400 / 5 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 14 /datum/firemode/energy/nt_pmd/service_revolver/pierce/make_radial_appearance() return image(/obj/item/gun/projectile/energy/nt_pmd/service_revolver::icon, "service-pierce") @@ -45,7 +45,7 @@ name = "charge" projectile_type = /obj/projectile/bullet/burstbullet/service cycle_cooldown = 2 SECONDS - charge_cost = 2400 / 4 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 8 /datum/firemode/energy/nt_pmd/service_revolver/charge/make_radial_appearance() return image(/obj/item/gun/projectile/energy/nt_pmd/service_revolver::icon, "service-charge") @@ -60,7 +60,7 @@ slot_flags = SLOT_BELT w_class = WEIGHT_CLASS_NORMAL origin_tech = null - cell_type = /obj/item/cell/device/weapon/recharge/captain + cell_type = /obj/item/cell/regen/weapon legacy_battery_lock = 1 one_handed_penalty = 0 safety_state = GUN_SAFETY_OFF diff --git a/code/game/content/factions/corporations/nanotrasen/guns/nt_protomag-magazine.dm b/code/game/content/factions/corporations/nanotrasen/guns/nt_protomag-magazine.dm index 7d77ea2a50a..e4571766cc6 100644 --- a/code/game/content/factions/corporations/nanotrasen/guns/nt_protomag-magazine.dm +++ b/code/game/content/factions/corporations/nanotrasen/guns/nt_protomag-magazine.dm @@ -24,7 +24,7 @@ rendering_count = 1 w_class = WEIGHT_CLASS_NORMAL // no boxes - weight_volume = WEIGHT_VOLUME_TINY + weight_volume = ITEM_VOLUME_PISTOL_MAG slot_flags = SLOT_POCKET //* Rifle Magazines *// @@ -41,7 +41,7 @@ rendering_segment_x_offset = -2 w_class = WEIGHT_CLASS_NORMAL // no boxes - weight_volume = WEIGHT_VOLUME_SMALL + weight_volume = ITEM_VOLUME_RIFLE_MAG slot_flags = SLOT_POCKET //* Typegen *// diff --git a/code/game/content/factions/corporations/nanotrasen/guns/nt_protomag.dm b/code/game/content/factions/corporations/nanotrasen/guns/nt_protomag.dm index a5b42ec7fc3..f653b603ae9 100644 --- a/code/game/content/factions/corporations/nanotrasen/guns/nt_protomag.dm +++ b/code/game/content/factions/corporations/nanotrasen/guns/nt_protomag.dm @@ -19,6 +19,11 @@ caliber = /datum/ammo_caliber/nt_protomag chamber_simulation = FALSE modular_system = TRUE + // you need spot for the ammo box and for the charge cost so ammo economy wise + // giving it 3 mags per battery is fine as this effective gives it 2/3 ammo economy + // compared to a normal rifle + base_charge_cost = POWER_CELL_CAPACITY_WEAPON * \ + (1 / (/obj/item/ammo_magazine/nt_protomag/rifle::ammo_max * 2)) var/legacy_discharged_fire_sound @@ -58,8 +63,6 @@ render_battery_overlay = MAGNETIC_RENDER_BATTERY_IN magazine_restrict = /obj/item/ammo_magazine/nt_protomag/sidearm fire_sound = /datum/soundbyte/guns/magnetic/magnetic_1/pistol - // todo: boost this again maybe when weapon cells aren't tiny - base_charge_cost = /obj/item/cell/device/weapon::maxcharge * (1 / (/obj/item/ammo_magazine/nt_protomag/sidearm::ammo_max * 2)) modular_component_slots = list( GUN_COMPONENT_ACTIVE_COOLER = 1, @@ -108,8 +111,6 @@ GENERATE_DESIGN_FOR_NT_PROTOLATHE(/obj/item/gun/projectile/ballistic/magnetic/nt render_battery_overlay = MAGNETIC_RENDER_BATTERY_IN magazine_restrict = /obj/item/ammo_magazine/nt_protomag/rifle fire_sound = /datum/soundbyte/guns/magnetic/magnetic_1/rifle - // todo: boost this again maybe when weapon cells aren't tiny - base_charge_cost = /obj/item/cell/device/weapon::maxcharge * (1 / (/obj/item/ammo_magazine/nt_protomag/rifle::ammo_max * 2)) modular_component_slots = list( GUN_COMPONENT_ACTIVE_COOLER = 1, diff --git a/code/game/content/factions/corporations/nanotrasen/guns/nt_pulse.dm b/code/game/content/factions/corporations/nanotrasen/guns/nt_pulse.dm index 57d86643768..b184e104bb7 100644 --- a/code/game/content/factions/corporations/nanotrasen/guns/nt_pulse.dm +++ b/code/game/content/factions/corporations/nanotrasen/guns/nt_pulse.dm @@ -25,15 +25,14 @@ /datum/firemode/energy/nt_pulse/rifle/laser name = "laser" render_key = "kill" - // todo: function of defines for weapon cell standard capacities - charge_cost = 80 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 48 projectile_type = /obj/projectile/beam /datum/firemode/energy/nt_pulse/rifle/pulse name = "pulse" render_key = "destroy" // todo: function of defines for weapon cell standard capacities - charge_cost = 160 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 24 projectile_type = /obj/projectile/beam/pulse /obj/item/gun/projectile/energy/nt_pulse/rifle @@ -77,14 +76,14 @@ name = "laser" render_key = "kill" // todo: function of defines for weapon cell standard capacities - charge_cost = 120 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 32 projectile_type = /obj/projectile/beam /datum/firemode/energy/nt_pulse/carbine/pulse name = "pulse" render_key = "destroy" // todo: function of defines for weapon cell standard capacities - charge_cost = 240 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 16 projectile_type = /obj/projectile/beam/pulse /obj/item/gun/projectile/energy/nt_pulse/carbine @@ -121,8 +120,8 @@ /obj/projectile/beam/pulse name = "pulse" fire_sound = 'sound/weapons/gauss_shoot.ogg' - damage_force = 60 - damage_tier = 6 + damage_force = 50 + damage_tier = 6.5 light_color = "#0066FF" tracer_icon = 'icons/content/factions/corporations/nanotrasen/items/guns/nt_pulse-projectile.dmi' diff --git a/code/game/content/factions/corporations/nanotrasen/nanotrasen-supply/engineering.dm b/code/game/content/factions/corporations/nanotrasen/nanotrasen-supply/engineering.dm index 1a47403cce6..5f8aad069e9 100644 --- a/code/game/content/factions/corporations/nanotrasen/nanotrasen-supply/engineering.dm +++ b/code/game/content/factions/corporations/nanotrasen/nanotrasen-supply/engineering.dm @@ -20,8 +20,9 @@ contains = list( /obj/item/storage/toolbox/electrical = 2, /obj/item/clothing/gloves/yellow = 2, - /obj/item/cell = 2, - /obj/item/cell/high = 2, + /obj/item/cell/basic/tier_3/small = 2, + /obj/item/cell/basic/tier_3/medium = 2, + /obj/item/cell/basic/tier_3/large = 2, ) worth = 300 container_type = /obj/structure/closet/crate/engineering/electrical diff --git a/code/game/content/factions/corporations/nanotrasen/nanotrasen-supply/miscellaneous.dm b/code/game/content/factions/corporations/nanotrasen/nanotrasen-supply/miscellaneous.dm index 8dfa460c2b3..dcf8b493371 100644 --- a/code/game/content/factions/corporations/nanotrasen/nanotrasen-supply/miscellaneous.dm +++ b/code/game/content/factions/corporations/nanotrasen/nanotrasen-supply/miscellaneous.dm @@ -172,7 +172,7 @@ name = "Belt-miner gear crate" contains = list( /obj/item/gun/projectile/energy/particle = 2, - /obj/item/cell/device/weapon = 2, + /obj/item/cell/basic/tier_2/weapon = 2, /obj/item/storage/firstaid/regular = 1, /obj/item/gps = 2, /obj/item/storage/box/traumainjectors = 1, diff --git a/code/game/content/factions/corporations/nanotrasen/nanotrasen-supply/munitions.dm b/code/game/content/factions/corporations/nanotrasen/nanotrasen-supply/munitions.dm index a3a75b34add..7563a5583db 100644 --- a/code/game/content/factions/corporations/nanotrasen/nanotrasen-supply/munitions.dm +++ b/code/game/content/factions/corporations/nanotrasen/nanotrasen-supply/munitions.dm @@ -182,7 +182,7 @@ /datum/supply_pack/nanotrasen/munitions/pcellammo name = "Ammunition - Power cell" contains = list( - /obj/item/cell/device/weapon = 3, + /obj/item/cell/basic/tier_3/weapon = 3, ) container_access = list() diff --git a/code/game/content/factions/corporations/nanotrasen/nanotrasen-supply/robotics.dm b/code/game/content/factions/corporations/nanotrasen/nanotrasen-supply/robotics.dm index d91dc46a41e..f7c0da29e9a 100644 --- a/code/game/content/factions/corporations/nanotrasen/nanotrasen-supply/robotics.dm +++ b/code/game/content/factions/corporations/nanotrasen/nanotrasen-supply/robotics.dm @@ -15,7 +15,8 @@ /obj/item/assembly/prox_sensor = 3, /obj/item/storage/toolbox/electrical, /obj/item/flash = 4, - /obj/item/cell/high = 2, + /obj/item/cell/basic/tier_3/medium = 2, + /obj/item/cell/basic/tier_3/large = 2, ) worth = 250 // literally only because of the flashes; nerf flashes when? diff --git a/code/game/gamemodes/changeling/powers/bioelectrogenesis.dm b/code/game/gamemodes/changeling/powers/bioelectrogenesis.dm index 1f435ea0459..b2ef01a4ec4 100644 --- a/code/game/gamemodes/changeling/powers/bioelectrogenesis.dm +++ b/code/game/gamemodes/changeling/powers/bioelectrogenesis.dm @@ -79,8 +79,8 @@ if(siemens) while(i) cell.charge += 100 * siemens //This should be a nice compromise between recharging guns and other batteries. - if(cell.charge > cell.maxcharge) - cell.charge = cell.maxcharge + if(cell.charge > cell.max_charge) + cell.charge = cell.max_charge break if(siemens) var/T = get_turf(src) @@ -188,8 +188,8 @@ if(siemens) while(i) cell.charge += 100 * siemens //This should be a nice compromise between recharging guns and other batteries. - if(cell.charge > cell.maxcharge) - cell.charge = cell.maxcharge + if(cell.charge > cell.max_charge) + cell.charge = cell.max_charge break //No point making sparks if the cell's full. // if(!Adjacent(T)) // break diff --git a/code/game/gamemodes/events/power_failure.dm b/code/game/gamemodes/events/power_failure.dm index 4712718eef1..40e5085bba0 100644 --- a/code/game/gamemodes/events/power_failure.dm +++ b/code/game/gamemodes/events/power_failure.dm @@ -31,7 +31,7 @@ command_announcement.Announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg') for(var/obj/machinery/power/apc/C in GLOB.apcs) if(C.cell && (C.z in (LEGACY_MAP_DATUM).station_levels)) - C.cell.charge = C.cell.maxcharge + C.cell.charge = C.cell.max_charge for(var/obj/machinery/power/smes/S in GLOB.machines) var/area/current_area = get_area(S) if((current_area.type in skipped_areas) || isNotStationLevel(S.z)) diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm index 66288431999..bf5b155350a 100644 --- a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm +++ b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm @@ -190,8 +190,8 @@ if(temp_apc) temp_apc.emp_act(3) // Such power surges are not good for APC electronics if(temp_apc.cell) - temp_apc.cell.maxcharge -= between(0, (temp_apc.cell.maxcharge/2) + 500, temp_apc.cell.maxcharge) - if(temp_apc.cell.maxcharge < 100) // That's it, you busted the APC cell completely. Break the APC and completely destroy the cell. + temp_apc.cell.max_charge -= between(0, (temp_apc.cell.max_charge/2) + 500, temp_apc.cell.max_charge) + if(temp_apc.cell.max_charge < 100) // That's it, you busted the APC cell completely. Break the APC and completely destroy the cell. qdel(temp_apc.cell) temp_apc.set_broken() diff --git a/code/game/gamemodes/newobjective.dm b/code/game/gamemodes/newobjective.dm deleted file mode 100644 index 3943e4601ca..00000000000 --- a/code/game/gamemodes/newobjective.dm +++ /dev/null @@ -1,1493 +0,0 @@ -#define FRAME_PROBABILITY 3 -#define THEFT_PROBABILITY 55 -#define KILL_PROBABILITY 37 -#define PROTECT_PROBABILITY 5 - -#define LENIENT 0 -#define NORMAL 1 -#define HARD 2 -#define IMPOSSIBLE 3 - - -/proc/GenerateTheft(var/job,var/datum/mind/traitor) - var/list/datum/objective/objectives = list() - - for(var/o in typesof(/datum/objective/steal)) - if(o != /datum/objective/steal) //Make sure not to get a blank steal objective. - var/datum/objective/target = new o(null,job) - objectives += target - objectives[target] = target.weight - return objectives - -/proc/GenerateAssassinate(var/job,var/datum/mind/traitor) - var/list/datum/objective/assassinate/missions = list() - - for(var/datum/mind/target in SSticker.minds) - if((target != traitor) && istype(target.current, /mob/living/carbon/human)) - if(target && target.current) - var/datum/objective/target_obj = new /datum/objective/assassinate(null,job,target) - missions += target_obj - missions[target_obj] = target_obj.weight - return missions - -/proc/GenerateFrame(var/job,var/datum/mind/traitor) - var/list/datum/objective/frame/missions = list() - - for(var/datum/mind/target in SSticker.minds) - if((target != traitor) && istype(target.current, /mob/living/carbon/human)) - if(target && target.current) - var/datum/objective/target_obj = new /datum/objective/frame(null,job,target) - missions += target_obj - missions[target_obj] = target_obj.weight - return missions - -/proc/GenerateProtection(var/job,var/datum/mind/traitor) - var/list/datum/objective/frame/missions = list() - - for(var/datum/mind/target in SSticker.minds) - if((target != traitor) && istype(target.current, /mob/living/carbon/human)) - if(target && target.current) - var/datum/objective/target_obj = new /datum/objective/protection(null,job,target) - missions += target_obj - missions[target_obj] = target_obj.weight - return missions - - -/proc/SelectObjectives(var/job,var/datum/mind/traitor,var/hijack = 0) - var/list/chosenobjectives = list() - var/list/theftobjectives = GenerateTheft(job,traitor) //Separated all the objective types so they can be picked independantly of each other. - var/list/killobjectives = GenerateAssassinate(job,traitor) - var/list/frameobjectives = GenerateFrame(job,traitor) - var/list/protectobjectives = GenerateProtection(job,traitor) - var/total_weight - var/conflict - - var/steal_weight = THEFT_PROBABILITY - var/frame_weight = FRAME_PROBABILITY - var/kill_weight = KILL_PROBABILITY - var/protect_weight = PROTECT_PROBABILITY - var/target_weight = 50 - -///////////////////////////////////////////////////////////// -//HANDLE ASSIGNING OBJECTIVES BASED OFF OF PREVIOUS SUCCESS// -///////////////////////////////////////////////////////////// - - var/savefile/info = new("data/player_saves/[copytext(traitor.key, 1, 2)]/[traitor.key]/traitor.sav") - var/list/infos - info >> infos - if(istype(infos)) - var/total_attempts = infos["Total"] - var/total_overall_success = infos["Success"] - var/success_ratio = total_overall_success/total_attempts - var/steal_success = infos["Steal"] - var/kill_success = infos["Kill"] - var/frame_success = infos["Frame"] - var/protect_success = infos["Protect"] - - var/list/ordered_success = list(steal_success, kill_success, frame_success, protect_success) - - var/difficulty = pick(LENIENT, LENIENT, NORMAL, NORMAL, NORMAL, HARD, HARD, IMPOSSIBLE) - //Highest to lowest in terms of success rate, and resulting weight for later computation - var/success_weights = list(1, 1, 1, 1) - switch(difficulty) - if(LENIENT) - success_weights = list(1.5, 1, 0.75, 0.5) - target_weight = success_ratio*100 - if(NORMAL) - target_weight = success_ratio*150 - if(HARD) - success_weights = list(0.66, 0.8, 1, 1.25) - target_weight = success_ratio*200 - if(IMPOSSIBLE) //YOU SHALL NOT PASS - success_weights = list(0.5, 0.75, 1.2, 2) - target_weight = success_ratio*300 - - for(var/i = 1, i <= 4, i++) - //Iterate through the success rates, and determine the weights to chose based on the highest to - // the lowest to multiply it by the proper success ratio. - var/weight = max(ordered_success) - ordered_success -= weight - if(weight == steal_success) - steal_weight *= steal_success*success_weights[i] - else if(weight == frame_success) - frame_weight *= frame_success*success_weights[i] - else if(weight == protect_success) - protect_weight *= protect_success*success_weights[i] - else if(weight == kill_success) - kill_weight *= kill_success*success_weights[i] - - var/total_weights = kill_weight + protect_weight + frame_weight + steal_weight - frame_weight = round(frame_weight/total_weights) - kill_weight = round(kill_weight/total_weights) - steal_weight = round(steal_weight/total_weights) - //Protect is whatever is left over. - - var/steal_range = steal_weight - var/frame_range = frame_weight + steal_range - var/kill_range = kill_weight + frame_range - //Protect is whatever is left over. - - while(total_weight < target_weight) - var/selectobj = rand(1,100) //Randomly determine the type of objective to be given. - if(!length(killobjectives) || !length(protectobjectives)|| !length(frameobjectives)) //If any of these lists are empty, just give them theft objectives. - var/datum/objective/objective = pickweight(theftobjectives) - chosenobjectives += objective - total_weight += objective.points - theftobjectives -= objective - else switch(selectobj) - if(1 to steal_range) - if(!theftobjectives.len) - continue - var/datum/objective/objective = pickweight(theftobjectives) - for(1 to 10) - if(objective.points + total_weight <= 100 || !theftobjectives.len) - break - theftobjectives -= objective - objective = pickweight(theftobjectives) - if(!objective && !theftobjectives.len) - continue - chosenobjectives += objective - total_weight += objective.points - theftobjectives -= objective - if(steal_range + 1 to frame_range) //Framing Objectives (3% chance) - if(!frameobjectives.len) - continue - var/datum/objective/objective = pickweight(frameobjectives) - for(1 to 10) - if(objective.points + total_weight <= 100 || !frameobjectives.len) - break - frameobjectives -= objective - objective = pickweight(frameobjectives) - if(!objective && !frameobjectives.len) - continue - for(var/datum/objective/protection/conflicttest in chosenobjectives) //Check to make sure we aren't telling them to Assassinate somebody they need to Protect. - if(conflicttest.target == objective.target) - conflict = 1 - break - for(var/datum/objective/assassinate/conflicttest in chosenobjectives) //Check to make sure we aren't telling them to Protect somebody they need to Assassinate. - if(conflicttest.target == objective.target) - conflict = 1 - break - if(!conflict) - chosenobjectives += objective - total_weight += objective.points - frameobjectives -= objective - conflict = 0 - if(frame_range + 1 to kill_range) - if(!killobjectives.len) - continue - var/datum/objective/assassinate/objective = pickweight(killobjectives) - to_chat(world, objective) - for(1 to 10) - if(objective.points + total_weight <= 100 || !killobjectives.len) - break - killobjectives -= objective - objective = pickweight(killobjectives) - if(!objective && !killobjectives.len) - continue - for(var/datum/objective/protection/conflicttest in chosenobjectives) //Check to make sure we aren't telling them to Assassinate somebody they need to Protect. - if(conflicttest.target == objective.target) - conflict = 1 - break - for(var/datum/objective/frame/conflicttest in chosenobjectives) //Check to make sure we aren't telling them to Protect somebody they need to Assassinate. - if(conflicttest.target == objective.target) - conflict = 1 - break - if(!conflict) - chosenobjectives += objective - total_weight += objective.points - killobjectives -= objective - conflict = 0 - if(kill_range + 1 to 100) //Protection Objectives (5% chance) - if(!protectobjectives.len) - continue - var/datum/objective/protection/objective = pickweight(protectobjectives) - for(1 to 10) - if(objective.points + total_weight <= 100 || !protectobjectives.len) - break - protectobjectives -= objective - objective = pickweight(protectobjectives) - if(!objective || !protectobjectives.len) - continue - for(var/datum/objective/assassinate/conflicttest in chosenobjectives) //Check to make sure we aren't telling them to Protect somebody they need to Assassinate. - if(conflicttest.target == objective.target) - conflict = 1 - break - for(var/datum/objective/frame/conflicttest in chosenobjectives) //Check to make sure we aren't telling them to Protect somebody they need to Assassinate. - if(conflicttest.target == objective.target) - conflict = 1 - break - if(!conflict) - chosenobjectives += objective - total_weight += objective.points - protectobjectives -= objective - conflict = 0 - - if(!locate(/datum/objective/hijack) in chosenobjectives && !locate(/datum/objective/escape) in chosenobjectives) - if(hijack) - chosenobjectives += new /datum/objective/hijack(null,job) - else - chosenobjectives += new /datum/objective/escape(null,job) - return chosenobjectives - -datum - objective - var/datum/mind/owner - var/datum/mind/target - var/explanation_text = "text not set" - var/job - var/points = INFINITY //If this isn't set to something else, the objective is bugged and should be ignored - var/weight = INFINITY - - New(var/text,var/joba) - if(text) - src.explanation_text = text - job=joba - weight = get_weight(job) - points = get_points(job) - - proc/check_completion() - return 1 - proc/get_points(var/job) - return INFINITY - proc/get_weight(var/job) - return INFINITY - proc/find_target_by_role(role, role_type=0)//Option sets either to check assigned role or special role. Default to assigned. - for(var/datum/mind/possible_target in SSticker.minds) - if((possible_target != owner) && ishuman(possible_target.current) && ((role_type ? possible_target.special_role : possible_target.assigned_role) == role) ) - target = possible_target - break - - - frame - New(var/text,var/joba,var/datum/mind/targeta) - target = targeta - job = joba - weight = get_points(job) - explanation_text = "Frame [target.current.real_name], the [target.assigned_role] for a crime and make sure they are arrested and brought back to the CentCom station alive. We'll handle the rest from there." - - check_completion() - if(!SSemergencyshuttle.returned()) - return 0 - if(target.current.stat == 2) - return 0 - var/turf/location = get_turf(target.current.loc) - if(!location) - return 0 - if(!target.current:handcuffed && !istype(location, /turf/simulated/shuttle/floor4)) - return 0 - - if(location in locate(/area/shuttle/escape/centcom)) - return 1 - - return 0 - - get_points() - if(target) - var/difficulty = GetRank(target.assigned_role) + 1 - switch(GetRank(job)) - if(4) - return 20*difficulty - if(3) - return 30*difficulty - if(2) - return 40*difficulty - if(1) - return 55*difficulty - if(0) - return 60*difficulty - else - return INFINITY - - get_weight() - if(target) - return 1 - return 0 - - - protection - New(var/text,var/joba,var/datum/mind/targeta) - target = targeta - job = joba - weight = get_points(job) - explanation_text = "[target.current.real_name], the [target.assigned_role] is a [pick("relative of a","friend of a","") + pick("high ranking","important","well-liked")] mercenary [pick("Leader","Officer","Agent","sympathiser")]. Make sure they get off the station safely, while minimizing intervention." - - check_completion() - if(!SSemergencyshuttle.returned()) - return 0 - - if(target.current.stat == 2) - return 0 - - var/turf/location = get_turf(target.current.loc) - if(!location) - return 0 - - if(location in locate(/area/shuttle/escape/centcom)) - return 1 - - return 0 - - get_points() - if(target) - return 30 - else - return INFINITY - - get_weight() - if(target) - return 1 - return 0 - - find_target_by_role(role, role_type=0) - ..(role, role_type) - if(target && target.current) - explanation_text = "Protect [target.current.real_name], the [target.role_alt_title ? target.role_alt_title : (!role_type ? target.assigned_role : target.special_role)]." - else - explanation_text = "Free Objective" - return target - - - assassinate - - New(var/text,var/joba,var/datum/mind/targeta) - target = targeta - job = joba - weight = get_points(job) - explanation_text = "Assassinate [target.current.real_name], the [target.role_alt_title ? target.role_alt_title : target.assigned_role]." - - check_completion() - if(target && target.current) - if(target.current.stat == 2 || istype(get_area(target.current), /area/tdome) || issilicon(target.current) || isbrain(target.current)) - return 1 - else - return 0 - else - return 1 - get_points() - if(target) - var/difficulty = GetRank(target.assigned_role) + 1 - switch(GetRank(job)) - if(4) - return 20*difficulty - if(3) - return 30*difficulty - if(2) - return 40*difficulty - if(1) - return 55*difficulty - if(0) - return 60*difficulty - else - return 0 - - get_weight() - if(target) - return 1 - return 0 - - find_target_by_role(var/role) - for(var/datum/mind/possible_target in SSticker.minds) - if((possible_target != owner) && istype(possible_target.current, /mob/living/carbon/human) && (possible_target.assigned_role == role)) - target = possible_target - break - - if(target && target.current) - explanation_text = "Assassinate [target.current.real_name], the [target.role_alt_title ? target.role_alt_title : target.assigned_role]." - else - explanation_text = "Free Objective" - - return target - - - proc/find_target() - var/list/possible_targets = list() - - for(var/datum/mind/possible_target in SSticker.minds) - if((possible_target != owner) && istype(possible_target.current, /mob/living/carbon/human)) - possible_targets += possible_target - - if(possible_targets.len > 0) - target = pick(possible_targets) - - if(target && target.current) - explanation_text = "Assassinate [target.current.real_name], the [target.role_alt_title ? target.role_alt_title : target.assigned_role]." - else - explanation_text = "Free Objective" - - return target - - - capture - var/separation_time = 0 - var/almost_complete = 0 - - New(var/text,var/joba,var/datum/mind/targeta) - target = targeta - job = joba - explanation_text = "Capture [target.current.real_name], the [target.assigned_role]." - - check_completion() - if(target && target.current) - if(target.current.stat == 2) - if(config_legacy.require_heads_alive) return 0 - else - if(!target.current.handcuffed) - return 0 - else if(config_legacy.require_heads_alive) return 0 - return 1 - - find_target_by_role(var/role) - for(var/datum/mind/possible_target in SSticker.minds) - if((possible_target != owner) && istype(possible_target.current, /mob/living/carbon/human) && (possible_target.assigned_role == role)) - target = possible_target - break - - if(target && target.current) - explanation_text = "Capture [target.current.real_name], the [target.assigned_role]." - else - explanation_text = "Free Objective" - - return target - - get_points() - if(target) - var/difficulty = GetRank(target.assigned_role) + 1 - switch(GetRank(job)) - if(4) - return 20*difficulty - if(3) - return 30*difficulty - if(2) - return 40*difficulty - if(1) - return 55*difficulty - if(0) - return 60*difficulty - else - return INFINITY - - get_weight() - if(target) - return 1 - return 0 - - - hijack - explanation_text = "Hijack the emergency shuttle by escaping alone." - - check_completion() - if(!SSemergencyshuttle.returned()) - return 0 - - if(!owner.current || owner.current.stat == 2) - return 0 - var/turf/location = get_turf(owner.current.loc) - - if(location in locate(/area/shuttle/escape/centcom)) - for(var/mob/living/player in locate(/area/shuttle/escape/centcom)) - if (player.mind && (player.mind != owner)) - if (player.stat != 2) //they're not dead - return 0 - return 1 - - return 0 - get_points(var/job) - switch(GetRank(job)) - if(0) - return 75 - if(1) - return 65 - if(2) - return 65 - if(3) - return 50 - if(4) - return 35 - - get_weight(var/job) - return 1 - - escape - explanation_text = "Escape on the shuttle alive, without being arrested." - - check_completion() - if(!SSemergencyshuttle.returned()) - return 0 - - if(!owner.current || owner.current.stat ==2) - return 0 - - var/turf/location = get_turf(owner.current.loc) - if(!location) - return 0 - - if(owner.current:handcuffed || istype(location, /turf/simulated/shuttle/floor4)) - return 0 - - if(location in locate(/area/shuttle/escape/centcom)) - return 1 - - return 0 - get_points() - return INFINITY - - get_weight(var/job) - return 1 - - - survive - explanation_text = "Stay alive." - - check_completion() - if(!owner.current || owner.current.stat == 2) - return 0 - - return 1 - get_points() - return INFINITY - - get_weight(var/job) - return 1 - - - steal - var/obj/item/steal_target - - check_completion() - if(steal_target) - if(owner.current.check_contents_for(steal_target)) - return 1 - else - return 0 - - - captainslaser - steal_target = /obj/item/gun/projectile/energy/captain - explanation_text = "Steal the Facility Director's antique laser gun." - weight = 20 - - get_points(var/job) - switch(GetRank(job)) - if(0) - return 60 - if(1) - return 50 - if(2) - return 40 - if(3) - return 30 - if(4) - return 20 - - get_weight(var/job) - if(GetRank(job) == 4) - return 10 - else - return 20 - - - plasmatank - steal_target = /obj/item/tank/plasma - explanation_text = "Steal a small plasma tank." - weight = 20 - - get_points(var/job) - if((job in science_positions) || (job in command_positions)) - return 20 - return 40 - - get_weight(var/job) - return 20 - - check_completion() - var/list/all_items = owner.current.get_contents() - for(var/obj/item/I in all_items) - if(!istype(I, steal_target)) continue//If it's not actually that item. - if(I:air_contents:phoron) return 1 //If they got one with plasma - return 0 - - - /*Removing this as an objective. Not necessary to have two theft objectives in the same room. - steal/captainssuit - steal_target = /obj/item/clothing/under/rank/captain - explanation_text = "Steal a captain's rank jumpsuit" - weight = 50 - - get_points(var/job) - switch(GetRank(job)) - if(0) - return 75 - if(1) - return 60 - if(2) - return 50 - if(3) - return 30 - if(4) - return INFINITY - */ - - - handtele - steal_target = /obj/item/hand_tele - explanation_text = "Steal a hand teleporter." - weight = 20 - - get_points(var/job) - switch(GetRank(job)) - if(0) - return 75 - if(1) - return 60 - if(2) - return 50 - if(3) - return 30 - if(4) - return 20 - - get_weight(var/job) - if(GetRank(job) == 4) - return 10 - else - return 20 - - - RCD - steal_target = /obj/item/rcd - explanation_text = "Steal a rapid construction device." - weight = 20 - - get_points(var/job) - switch(GetRank(job)) - if(0) - return 75 - if(1) - return 60 - if(2) - return 50 - if(3) - return 30 - if(4) - return 20 - - get_weight(var/job) - if(GetRank(job) == 4) - return 10 - else - return 20 - - - /*burger - steal_target = /obj/item/reagent_containers/food/snacks/human/burger - explanation_text = "Steal a burger made out of human organs, this will be presented as proof of Nanotrasen's chronic lack of standards." - weight = 60 - - get_points(var/job) - switch(GetRank(job)) - if(0) - return 80 - if(1) - return 65 - if(2) - return 55 - if(3) - return 40 - if(4) - return 25*/ - - - jetpack - steal_target = /obj/item/tank/jetpack/oxygen - explanation_text = "Steal a blue oxygen jetpack." - weight = 20 - - get_points(var/job) - switch(GetRank(job)) - if(0) - return 75 - if(1) - return 60 - if(2) - return 50 - if(3) - return 30 - if(4) - return 20 - - get_weight(var/job) - if(GetRank(job) == 4) - return 10 - else - return 20 - - - /*magboots - steal_target = /obj/item/clothing/shoes/magboots - explanation_text = "Steal a pair of \"Nanotrasen\" brand magboots." - weight = 20 - - get_points(var/job) - switch(GetRank(job)) - if(0) - return 75 - if(1) - return 60 - if(2) - return 50 - if(3) - return 30 - if(4) - return 20 - - get_weight(var/job) - if(GetRank(job) == 4) - return 10 - else - return 20*/ - - - blueprints - steal_target = /obj/item/blueprints - explanation_text = "Steal the station's blueprints." - weight = 20 - - get_points(var/job) - switch(GetRank(job)) - if(0) - return 75 - if(1) - return 60 - if(2) - return 50 - if(3) - return 30 - if(4) - return 20 - - get_weight(var/job) - if(GetRank(job) == 4) - return 10 - else - return 20 - - - voidsuit - steal_target = /obj/item/clothing/suit/space/nasavoid - explanation_text = "Steal a voidsuit." - weight = 20 - - get_points(var/job) - switch(GetRank(job)) - if(0) - return 75 - if(1) - return 60 - if(2) - return 50 - if(3) - return 30 - if(4) - return 20 - - get_weight(var/job) - return 20 - - - nuke_disk - steal_target = /obj/item/disk/nuclear - explanation_text = "Steal the station's nuclear authentication disk." - weight = 20 - - get_points(var/job) - switch(GetRank(job)) - if(0) - return 90 - if(1) - return 80 - if(2) - return 70 - if(3) - return 40 - if(4) - return 25 - - get_weight(var/job) - if(GetRank(job) == 4) - return 10 - else - return 20 - - nuke_gun - steal_target = /obj/item/gun/projectile/energy/gun/nuclear - explanation_text = "Steal a nuclear powered gun." - weight = 20 - - get_points(var/job) - switch(GetRank(job)) - if(0) - return 90 - if(1) - return 85 - if(2) - return 80 - if(3) - return 75 - if(4) - return 75 - - get_weight(var/job) - return 2 - - diamond_drill - steal_target = /obj/item/pickaxe/diamonddrill - explanation_text = "Steal a diamond drill." - weight = 20 - - get_points(var/job) - switch(GetRank(job)) - if(0) - return 90 - if(1) - return 85 - if(2) - return 70 - if(3) - return 75 - if(4) - return 75 - - get_weight(var/job) - return 2 - - boh - steal_target = /obj/item/storage/backpack/holding - explanation_text = "Steal a \"bag of holding.\"" - weight = 20 - - get_points(var/job) - switch(GetRank(job)) - if(0) - return 90 - if(1) - return 85 - if(2) - return 80 - if(3) - return 75 - if(4) - return 75 - - get_weight(var/job) - return 2 - - hyper_cell - steal_target = /obj/item/cell/hyper - explanation_text = "Steal a hyper capacity power cell." - weight = 20 - - get_points(var/job) - switch(GetRank(job)) - if(0) - return 90 - if(1) - return 85 - if(2) - return 80 - if(3) - return 75 - if(4) - return 75 - - get_weight(var/job) - return 2 - - lucy - steal_target = /obj/item/stack/sheet/diamond - explanation_text = "Steal 10 diamonds." - weight = 20 - - get_points(var/job) - switch(GetRank(job)) - if(0) - return 90 - if(1) - return 85 - if(2) - return 80 - if(3) - return 75 - if(4) - return 75 - - get_weight(var/job) - return 2 - - check_completion() - var/target_amount = 10 - var/found_amount = 0.0//Always starts as zero. - for(var/obj/item/I in owner.current.get_contents()) - if(!istype(I, steal_target)) - continue//If it's not actually that item. - var/obj/item/stack/sheet/diamond/D = I - found_amount += D.get_amount() - return found_amount>=target_amount - - gold - steal_target = /obj/item/stack/sheet/gold - explanation_text = "Steal 50 gold bars." - weight = 20 - - get_points(var/job) - switch(GetRank(job)) - if(0) - return 90 - if(1) - return 85 - if(2) - return 80 - if(3) - return 75 - if(4) - return 70 - - get_weight(var/job) - return 2 - - check_completion() - var/target_amount = 50 - var/found_amount = 0.0//Always starts as zero. - for(var/obj/item/I in owner.current.get_contents()) - if(!istype(I, steal_target)) - continue//If it's not actually that item. - var/obj/item/stack/sheet/gold/G = I - found_amount += G.get_amount() - return found_amount>=target_amount - - uranium - steal_target = /obj/item/stack/sheet/uranium - explanation_text = "Steal 25 uranium bars." - weight = 20 - - get_points(var/job) - switch(GetRank(job)) - if(0) - return 90 - if(1) - return 85 - if(2) - return 80 - if(3) - return 75 - if(4) - return 70 - - get_weight(var/job) - return 2 - - check_completion() - var/target_amount = 25 - var/found_amount = 0.0//Always starts as zero. - for(var/obj/item/I in owner.current.get_contents()) - if(!istype(I, steal_target)) - continue//If it's not actually that item. - var/obj/item/stack/sheet/uranium/U = I - found_amount += U.get_amount() - return found_amount>=target_amount - - - /*Needs some work before it can be put in the game to differentiate ship implanters from syndicate implanters. - steal/implanter - steal_target = /obj/item/implanter - explanation_text = "Steal an implanter" - weight = 50 - - get_points(var/job) - switch(GetRank(job)) - if(0) - return 75 - if(1) - return 60 - if(2) - return 50 - if(3) - return 30 - if(4) - return INFINITY - */ - cyborg - steal_target = /obj/item/robot_parts/robot_suit - explanation_text = "Steal a completed robot shell (no brain)" - weight = 30 - - get_points(var/job) - switch(GetRank(job)) - if(0) - return 75 - if(1) - return 60 - if(2) - return 50 - if(3) - return 30 - if(4) - return 20 - - check_completion() - if(steal_target) - for(var/obj/item/robot_parts/robot_suit/objective in owner.current.get_contents()) - if(istype(objective,/obj/item/robot_parts/robot_suit) && objective.check_completion()) - return 1 - return 0 - - get_weight(var/job) - return 20 - AI - steal_target = /obj/structure/AIcore - explanation_text = "Steal a finished AI, either by intelliCore or stealing the whole construct." - weight = 50 - - get_points(var/job) - switch(GetRank(job)) - if(0) - return 75 - if(1) - return 60 - if(2) - return 50 - if(3) - return 30 - if(4) - return 20 - - get_weight(var/job) - return 15 - - check_completion() - if(steal_target) - for(var/obj/item/aicard/C in owner.current.get_contents()) - for(var/mob/living/silicon/ai/M in C) - if(istype(M, /mob/living/silicon/ai) && M.stat != 2) - return 1 - for(var/mob/living/silicon/ai/M in world) - if(istype(M.loc, /turf)) - if(istype(get_area(M), /area/shuttle/escape)) - return 1 - for(var/obj/structure/AIcore/M in world) - if(istype(M.loc, /turf) && M.state == 4) - if(istype(get_area(M), /area/shuttle/escape)) - return 1 - return 0 - - drugs - steal_target = /datum/reagent/space_drugs - explanation_text = "Steal some space drugs." - weight = 40 - - get_points(var/job) - switch(GetRank(job)) - if(0) - return 75 - if(1) - return 60 - if(2) - return 50 - if(3) - return 30 - if(4) - return 20 - - check_completion() - if(steal_target) - if(owner.current.check_contents_for_reagent(steal_target)) - return 1 - else - return 0 - - get_weight(var/job) - return 20 - - - pacid - steal_target = /datum/reagent/pacid - explanation_text = "Steal some polytrinic acid." - weight = 40 - - get_points(var/job) - switch(GetRank(job)) - if(0) - return 75 - if(1) - return 60 - if(2) - return 50 - if(3) - return 30 - if(4) - return 20 - - check_completion() - if(steal_target) - if(owner.current.check_contents_for_reagent(steal_target)) - return 1 - else - return 0 - - get_weight(var/job) - return 20 - - - reagent - weight = 20 - var/target_name - New(var/text,var/joba) - ..() - var/list/items = list("Sulphuric acid", "Polytrinic acid", "Space Lube", "Unstable mutagen",\ - "Leporazine", "Cryptobiolin", "Lexorin ",\ - "Kelotane", "Dexalin", "Tricordrazine") - target_name = pick(items) - switch(target_name) - if("Sulphuric acid") - steal_target = /datum/reagent/acid - if("Polytrinic acid") - steal_target = /datum/reagent/pacid - if("Space Lube") - steal_target = /datum/reagent/lube - if("Unstable mutagen") - steal_target = /datum/reagent/mutagen - if("Leporazine") - steal_target = /datum/reagent/leporazine - if("Cryptobiolin") - steal_target =/datum/reagent/cryptobiolin - if("Lexorin") - steal_target = /datum/reagent/lexorin - if("Kelotane") - steal_target = /datum/reagent/kelotane - if("Dexalin") - steal_target = /datum/reagent/dexalin - if("Tricordrazine") - steal_target = /datum/reagent/tricordrazine - - explanation_text = "Steal a container filled with [target_name]." - - get_points(var/job) - switch(GetRank(job)) - if(0) - return 75 - if(1) - return 60 - if(2) - return 50 - if(3) - return 30 - if(4) - return 20 - - check_completion() - if(steal_target) - if(owner.current.check_contents_for_reagent(steal_target)) - return 1 - else - return 0 - - get_weight(var/job) - return 20 - - cash //must be in credits - atm and coins don't count - var/steal_amount = 2000 - explanation_text = "Beg, borrow or steal 2000 credits." - weight = 20 - - New(var/text,var/joba) - ..(text,joba) - steal_amount = 1250 + rand(0,3750) - explanation_text = "Beg, borrow or steal [steal_amount] credits." - - get_points(var/job) - return 10 + 25 * round(steal_amount / 5000) - - check_completion() - var/held_credits = 0 - for(var/obj/item/spacecash/M in owner.current.get_contents()) - held_credits += M.worth - if(held_credits >= steal_amount) - return 1 - return 0 - - get_weight(var/job) - return 20 - - - nuclear - explanation_text = "Destroy the station with a nuclear device." - - - block - explanation_text = "Do not allow any humans to escape on the shuttle alive." - - - check_completion() - if(!istype(owner.current, /mob/living/silicon)) - return 0 - if(!SSemergencyshuttle.returned()) - return 0 - if(!owner.current) - return 0 - var/area/shuttle = locate(/area/shuttle/escape/centcom) - var/protected_mobs[] = list(/mob/living/silicon/ai, /mob/living/silicon/pai, /mob/living/silicon/robot) - for(var/mob/living/player in world) - if(player.type in protected_mobs) continue - if (player.mind) - if (player.stat != 2) - if (get_turf(player) in shuttle) - return 0 - return 1 - - decapitate - New(var/text,var/joba,var/datum/mind/targeta) - target = targeta - job = joba - explanation_text = "Remove and recover the head of [target.current.real_name], the [target.assigned_role]." - proc/find_target() - ..() - if(target && target.current) - var/datum/gender/T = GLOB.gender_datums[target.current.get_visible_gender()] - explanation_text = "[target.current.real_name], the [target.role_alt_title ? target.role_alt_title : target.assigned_role], has defied us for the last time. Make an example of [T.him], and bring us [T.his] severed head." - else - explanation_text = "Free Objective" - return target - - - find_target_by_role(role, role_type=0) - ..(role, role_type) - if(target && target.current) - var/datum/gender/T = GLOB.gender_datums[target.current.get_visible_gender()] - explanation_text = "[target.current.real_name], the [target.role_alt_title ? target.role_alt_title : (!role_type ? target.assigned_role : target.special_role)], has defied us for the last time. Make an example of [T.him], and bring us [T.his] severed head." - else - explanation_text = "Free Objective" - return target - - - check_completion() - if(target && target.current) - if(!owner.current||owner.current.stat==2)//If you're otherwise dead. - return 0 - var/list/all_items = owner.current.get_contents() - for(var/obj/item/organ/head/mmi in all_items) - if(mmi.brainmob&&mmi.brainmob.mind==target) - return 1 - return 0 - else - return 1 - - absorb - var/target_amount - proc/gen_amount_goal(var/lowbound = 4, var/highbound = 6) - target_amount = rand (lowbound,highbound) - if (SSticker) - var/n_p = 1 //autowin - if (SSticker.current_state == GAME_STATE_SETTING_UP) - for(var/mob/new_player/P in world) - if(P.client && P.ready && P.mind!=owner) - n_p ++ - else if (SSticker.current_state == GAME_STATE_PLAYING) - for(var/mob/living/carbon/human/P in world) - if(P.client && !(P.mind in SSticker.mode.changelings) && P.mind!=owner) - n_p ++ - target_amount = min(target_amount, n_p) - - explanation_text = "Absorb [target_amount] compatible genomes." - return target_amount - - check_completion() - if(owner && owner.current && owner.current.changeling && owner.current.changeling.absorbed_dna && ((owner.current.changeling.absorbed_dna.len - 1) >= target_amount)) - return 1 - else - return 0 - - meme_attune - var/target_amount - proc/gen_amount_goal(var/lowbound = 4, var/highbound = 6) - target_amount = rand (lowbound,highbound) - - explanation_text = "Attune [target_amount] humanoid brains." - return target_amount - - check_completion() - if(owner && owner.current && istype(owner.current,/mob/living/parasite/meme) && (owner.current:indoctrinated.len >= target_amount)) - return 1 - else - return 0 - - download - var/target_amount - proc/gen_amount_goal() - target_amount = rand(10,20) - explanation_text = "Download [target_amount] research levels." - return target_amount - - - check_completion() - if(!ishuman(owner.current)) - return 0 - if(!owner.current || owner.current.stat == 2) - return 0 - - var/current_amount - var/obj/item/hardsuit/S - if(istype(owner.current,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = owner.current - S = H.back - if(!S || !istype(S) || !S.stored_research.len) - return 0 - else - for(var/datum/tech/current_data in S.stored_research) - if(current_data.level>1) current_amount+=(current_data.level-1) - if(current_amount" if(charging) var/obj/item/cell/C = charging.get_cell() if(C) - . += "Current charge: [C.charge] / [C.maxcharge]" + . += "Current charge: [C.charge] / [C.max_charge]" /obj/machinery/recharger/using_item_on(obj/item/using, datum/event_args/actor/clickchain/clickchain, clickchain_flags) . = ..() @@ -51,6 +86,10 @@ if(E.self_recharge) to_chat(clickchain.performer, "\The [E] has no recharge port.") return + else if(istype(G, /obj/item/cell)) + if(!object_cell_slot_accepts(G)) + to_chat(clickchain.performer, SPAN_WARNING("\The [src] isn't fitted for that type of cell.")) + return else if(istype(G, /obj/item/modular_computer)) var/obj/item/modular_computer/C = G if(!C.battery_module) @@ -238,9 +277,9 @@ plane = TURF_PLANE layer = ABOVE_TURF_LAYER base_power_draw = 30000 - allowed_devices = list(/obj/item/gun/projectile/energy, /obj/item/gun/projectile/magnetic, /obj/item/melee/baton, /obj/item/flashlight, /obj/item/cell/device, /obj/item/ammo_casing/microbattery, /obj/item/ammo_magazine/microbattery, /obj/item/gun/projectile/ballistic/microbattery) icon_state_charged = "wrecharger2" icon_state_charging = "wrecharger1" icon_state_idle = "wrecharger0" portable = 0 circuit = /obj/item/circuitboard/recharger/wrecharger + cell_accept = CELL_TYPE_SMALL | CELL_TYPE_WEAPON diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index 2ae659f2408..95ea4ec7fd9 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -84,7 +84,7 @@ if(R.module) R.module.respawn_consumable(R, DYNAMIC_W_TO_CELL_UNITS(charging_power, 1) / 250) //consumables are magical, apparently if(R.cell && !R.cell.fully_charged()) - var/diff = min(R.cell.maxcharge - R.cell.charge, DYNAMIC_W_TO_CELL_UNITS(charging_power, 1)) // Capped by charging_power / tick + var/diff = min(R.cell.max_charge - R.cell.charge, DYNAMIC_W_TO_CELL_UNITS(charging_power, 1)) // Capped by charging_power / tick var/charge_used = cell.use(diff) R.cell.give(charge_used) @@ -129,7 +129,7 @@ storedmod.damage = 0 var/obj/item/cell/rigcell = wornrig.get_cell() if(rigcell) - var/diff = min(rigcell.maxcharge - rigcell.charge, DYNAMIC_W_TO_CELL_UNITS(charging_power, 1)) // Capped by charging_power / tick + var/diff = min(rigcell.max_charge - rigcell.charge, DYNAMIC_W_TO_CELL_UNITS(charging_power, 1)) // Capped by charging_power / tick var/charge_used = cell.use(diff) rigcell.give(charge_used) diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index 0a987fb6d33..e10f718fd43 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -6,18 +6,21 @@ anchored = FALSE density = TRUE - var/obj/item/cell/cell - var/cell_type = /obj/item/cell/high + var/cell_type = /obj/item/cell/basic/tier_1/medium + var/cell_accept = CELL_TYPE_MEDIUM | CELL_TYPE_LARGE + var/on = FALSE var/set_temperature = T0C + 20 //K var/heating_power = 40000 /obj/machinery/space_heater/Initialize(mapload, newdir) + init_cell_slot_easy_machine(cell_type, cell_accept) . = ..() - if(cell_type) - cell = new cell_type(src) update_icon() +/obj/machinery/space_heater/object_cell_slot_mutable(mob/user, datum/object_system/cell_slot/slot, silent, datum/event_args/actor/actor) + return panel_open && ..() + /obj/machinery/space_heater/update_icon() cut_overlays() . = ..() @@ -33,37 +36,15 @@ . = ..() . += "The heater is [on ? "on" : "off"] and the hatch is [panel_open ? "open" : "closed"]." if(panel_open) - . += "The power cell is [cell ? "installed" : "missing"]." + . += "The power cell is [obj_cell_slot?.cell ? "installed" : "missing"]." else - . += "The charge meter reads [cell ? round(cell.percent(),1) : 0]%" + . += "The charge meter reads [obj_cell_slot?.cell ? round(obj_cell_slot.cell.percent(),1) : 0]%" /obj/machinery/space_heater/powered() - return !!cell?.charge - -/obj/machinery/space_heater/emp_act(severity) - if(machine_stat & (BROKEN|NOPOWER)) - ..(severity) - return - if(cell) - cell.emp_act(severity) - ..(severity) + return obj_cell_slot?.cell?.charge /obj/machinery/space_heater/attackby(obj/item/I, mob/user) - if(istype(I, /obj/item/cell)) - if(panel_open) - if(cell) - to_chat(user, "There is already a power cell inside.") - return - if(!user.attempt_insert_item_for_installation(I, src)) - return - cell = I - I.add_fingerprint(usr) - user.visible_message("[user] inserts a power cell into [src].", "You insert the power cell into [src].") - power_change() - else - to_chat(user, "The hatch must be open to insert a power cell.") - return - else if(I.is_screwdriver()) + if(I.is_screwdriver()) panel_open = !panel_open playsound(src, I.tool_sound, 50, 1) user.visible_message("[user] [panel_open ? "opens" : "closes"] the hatch on the [src].", "You [panel_open ? "open" : "close"] the hatch on the [src].") @@ -73,7 +54,6 @@ user.unset_machine() else ..() - return /obj/machinery/space_heater/attack_hand(mob/user, datum/event_args/actor/clickchain/e_args) interact(user) @@ -83,12 +63,12 @@ var/dat dat = "Power cell: " - if(cell) + if(obj_cell_slot?.cell) dat += "Installed
" else dat += "Removed
" - dat += "Power Level: [cell ? round(cell.percent(),1) : 0]%

" + dat += "Power Level: [obj_cell_slot?.cell ? round(obj_cell_slot.cell.percent(),1) : 0]%

" dat += "Set Temperature: " @@ -121,22 +101,24 @@ set_temperature = clamp(set_temperature + value, T0C, T0C + 90) if("cellremove") - if(panel_open && cell && !usr.get_active_held_item()) - usr.visible_message("\The [usr] removes \the [cell] from \the [src].", "You remove \the [cell] from \the [src].") - cell.update_icon() - usr.put_in_hands(cell) - cell.add_fingerprint(usr) - cell = null + if(panel_open && obj_cell_slot?.cell) + usr.visible_message( + "\The [usr] removes \the [obj_cell_slot.cell] from \the [src].", + "You remove \the [obj_cell_slot.cell] from \the [src].", + ) + var/obj/item/cell/removed = obj_cell_slot.remove_cell() + usr.put_in_hands_or_drop(removed) + removed.add_fingerprint(usr) power_change() if("cellinstall") - if(panel_open && !cell) + if(panel_open && obj_cell_slot && !obj_cell_slot?.cell) var/obj/item/cell/C = usr.get_active_held_item() if(istype(C)) if(!usr.attempt_insert_item_for_installation(C, src)) return - cell = C + obj_cell_slot.insert_cell(C) C.add_fingerprint(usr) power_change() usr.visible_message("[usr] inserts \the [C] into \the [src].", "You insert \the [C] into \the [src].") @@ -148,7 +130,7 @@ /obj/machinery/space_heater/process(delta_time) if(on) - if(cell && cell.charge) + if(obj_cell_slot?.cell?.charge) var/datum/gas_mixture/env = loc.return_air() if(env && abs(env.temperature - set_temperature) > 0.1) var/transfer_moles = 0.25 * env.total_moles @@ -160,7 +142,7 @@ heat_transfer = min(heat_transfer, heating_power) //limit by the power rating of the heater removed.adjust_thermal_energy(heat_transfer) - cell.use(DYNAMIC_W_TO_CELL_UNITS(heat_transfer * SPACE_HEATER_CHEAT_FACTOR, 1)) + obj_cell_slot.cell.use(DYNAMIC_W_TO_CELL_UNITS(heat_transfer * SPACE_HEATER_CHEAT_FACTOR, 1)) else //cooling air heat_transfer = abs(heat_transfer) @@ -171,173 +153,10 @@ heat_transfer = removed.adjust_thermal_energy(-heat_transfer) //get the actual heat transfer var/power_used = abs(heat_transfer)/cop - cell.use(DYNAMIC_W_TO_CELL_UNITS(power_used * SPACE_HEATER_CHEAT_FACTOR, 1)) + obj_cell_slot.cell.use(DYNAMIC_W_TO_CELL_UNITS(power_used * SPACE_HEATER_CHEAT_FACTOR, 1)) env.merge(removed) else on = 0 power_change() update_icon() - -#define MODE_IDLE 0 -#define MODE_HEATING 1 -#define MODE_COOLING 2 - -/obj/machinery/power/thermoregulator - name = "thermal regulator" - desc = "A massive machine that can either add or remove thermal energy from the surrounding environment. Must be secured onto a powered wire node to function." - icon = 'icons/obj/machines/thermoregulator_vr.dmi' - icon_state = "lasergen" - density = 1 - anchored = 0 - - worth_intrinsic = 500 - - use_power = USE_POWER_OFF //is powered directly from cables - active_power_usage = 150 KILOWATTS //BIG POWER - idle_power_usage = 500 - - circuit = /obj/item/circuitboard/thermoregulator - - var/on = 0 - var/target_temp = T20C - var/mode = MODE_IDLE - -/obj/machinery/power/thermoregulator/examine(mob/user, dist) - . = ..() - . += "There is a small display that reads [target_temp]K." - -/obj/machinery/power/thermoregulator/attackby(obj/item/I, mob/user) - if(I.is_screwdriver()) - if(default_deconstruction_screwdriver(user,I)) - return - if(I.is_crowbar()) - if(default_deconstruction_crowbar(user,I)) - return - if(I.is_wrench()) - anchored = !anchored - visible_message("\The [src] has been [anchored ? "bolted to the floor" : "unbolted from the floor"] by [user].") - playsound(src, I.tool_sound, 75, 1) - if(anchored) - connect_to_network() - else - disconnect_from_network() - turn_off() - return - if(istype(I, /obj/item/multitool)) - var/new_temp = input("Input a new target temperature, in degrees C.","Target Temperature", 20) as num - if(!Adjacent(user) || user.incapacitated()) - return - new_temp = convert_c2k(new_temp) - target_temp = max(new_temp, TCMB) - return - ..() - -/obj/machinery/power/thermoregulator/attack_hand(mob/user, datum/event_args/actor/clickchain/e_args) - add_fingerprint(user) - interact(user) - -/obj/machinery/power/thermoregulator/interact(mob/user) - if(!anchored) - return - on = !on - user.visible_message("[user] [on ? "activates" : "deactivates"] \the [src].","You [on ? "activate" : "deactivate"] \the [src].") - if(!on) - change_mode(MODE_IDLE) - update_icon() - -/obj/machinery/power/thermoregulator/process() - if(!on) - return - if(!powernet) - turn_off() - return - - if((draw_power(idle_power_usage * 0.001) * 1000) < idle_power_usage) - visible_message("\The [src] shuts down.") - turn_off() - return - - var/datum/gas_mixture/env = loc.return_air() - if(!env || abs(env.temperature - target_temp) < 1) - change_mode(MODE_IDLE) - return - - var/datum/gas_mixture/removed = env.remove_ratio(0.99) - if(!removed) - change_mode(MODE_IDLE) - return - - var/heat_transfer = removed.get_thermal_energy_change(target_temp) - var/power_avail - if(heat_transfer == 0) //just in case - change_mode(MODE_IDLE) - else if(heat_transfer > 0) - change_mode(MODE_HEATING) - power_avail = draw_power(min(heat_transfer, active_power_usage) * 0.001) * 1000 - removed.adjust_thermal_energy(min(power_avail * THERMOREGULATOR_CHEAT_FACTOR, heat_transfer)) - else - change_mode(MODE_COOLING) - heat_transfer = abs(heat_transfer) - var/cop = removed.temperature / TN60C - var/actual_heat_transfer = heat_transfer - heat_transfer = min(heat_transfer, active_power_usage * cop) - power_avail = draw_power((heat_transfer/cop) * 0.001) * 1000 - removed.adjust_thermal_energy(-min(power_avail * THERMOREGULATOR_CHEAT_FACTOR * cop, actual_heat_transfer)) - env.merge(removed) - -/obj/machinery/power/thermoregulator/update_icon() - cut_overlays() - . = ..() - var/list/overlays_to_add = list() - if(on) - overlays_to_add += "lasergen-on" - switch(mode) - if(MODE_HEATING) - overlays_to_add += "lasergen-heat" - if(MODE_COOLING) - overlays_to_add += "lasergen-cool" - add_overlay(overlays_to_add) - -/obj/machinery/power/thermoregulator/proc/turn_off() - on = 0 - change_mode(MODE_IDLE) - update_icon() - -/obj/machinery/power/thermoregulator/proc/change_mode(new_mode = MODE_IDLE) - if(mode == new_mode) - return - mode = new_mode - update_icon() - -/obj/machinery/power/thermoregulator/emp_act(severity) - if(!on) - on = 1 - target_temp += rand(0, 1000) - update_icon() - ..(severity) - -/obj/machinery/power/thermoregulator/overload(var/obj/machinery/power/source) - if(!anchored || !powernet) - return - // 1.5 MW - var/power_avail = draw_power(1500) - var/datum/gas_mixture/env = loc.return_air() - if(env) - var/datum/gas_mixture/removed = env.remove_ratio(0.99) - if(removed) - // OH BOY! - removed.adjust_thermal_energy(power_avail * 1000 * THERMOREGULATOR_CHEAT_FACTOR) - env.merge(removed) - var/turf/T = get_turf(src) - new /obj/effect/debris/cleanable/liquid_fuel(T, 5) - T.assume_gas(GAS_ID_VOLATILE_FUEL, 5, T20C) - T.hotspot_expose(700,400) - var/datum/effect_system/spark_spread/s = new - s.set_up(5, 0, T) - s.start() - visible_message("\The [src] bursts into flame!") - -#undef MODE_IDLE -#undef MODE_HEATING -#undef MODE_COOLING diff --git a/code/game/machinery/thermoregulator.dm b/code/game/machinery/thermoregulator.dm new file mode 100644 index 00000000000..09511510aa2 --- /dev/null +++ b/code/game/machinery/thermoregulator.dm @@ -0,0 +1,163 @@ + +#define MODE_IDLE 0 +#define MODE_HEATING 1 +#define MODE_COOLING 2 + +/obj/machinery/power/thermoregulator + name = "thermal regulator" + desc = "A massive machine that can either add or remove thermal energy from the surrounding environment. Must be secured onto a powered wire node to function." + icon = 'icons/obj/machines/thermoregulator_vr.dmi' + icon_state = "lasergen" + density = 1 + anchored = 0 + + worth_intrinsic = 500 + + use_power = USE_POWER_OFF //is powered directly from cables + active_power_usage = 150 KILOWATTS //BIG POWER + idle_power_usage = 500 + + circuit = /obj/item/circuitboard/thermoregulator + + var/on = 0 + var/target_temp = T20C + var/mode = MODE_IDLE + +/obj/machinery/power/thermoregulator/examine(mob/user, dist) + . = ..() + . += "There is a small display that reads [target_temp]K." + +/obj/machinery/power/thermoregulator/attackby(obj/item/I, mob/user) + if(I.is_screwdriver()) + if(default_deconstruction_screwdriver(user,I)) + return + if(I.is_crowbar()) + if(default_deconstruction_crowbar(user,I)) + return + if(I.is_wrench()) + anchored = !anchored + visible_message("\The [src] has been [anchored ? "bolted to the floor" : "unbolted from the floor"] by [user].") + playsound(src, I.tool_sound, 75, 1) + if(anchored) + connect_to_network() + else + disconnect_from_network() + turn_off() + return + if(istype(I, /obj/item/multitool)) + var/new_temp = input("Input a new target temperature, in degrees C.","Target Temperature", 20) as num + if(!Adjacent(user) || user.incapacitated()) + return + new_temp = convert_c2k(new_temp) + target_temp = max(new_temp, TCMB) + return + ..() + +/obj/machinery/power/thermoregulator/attack_hand(mob/user, datum/event_args/actor/clickchain/e_args) + add_fingerprint(user) + interact(user) + +/obj/machinery/power/thermoregulator/interact(mob/user) + if(!anchored) + return + on = !on + user.visible_message("[user] [on ? "activates" : "deactivates"] \the [src].","You [on ? "activate" : "deactivate"] \the [src].") + if(!on) + change_mode(MODE_IDLE) + update_icon() + +/obj/machinery/power/thermoregulator/process() + if(!on) + return + if(!powernet) + turn_off() + return + + if((draw_power(idle_power_usage * 0.001) * 1000) < idle_power_usage) + visible_message("\The [src] shuts down.") + turn_off() + return + + var/datum/gas_mixture/env = loc.return_air() + if(!env || abs(env.temperature - target_temp) < 1) + change_mode(MODE_IDLE) + return + + var/datum/gas_mixture/removed = env.remove_ratio(0.99) + if(!removed) + change_mode(MODE_IDLE) + return + + var/heat_transfer = removed.get_thermal_energy_change(target_temp) + var/power_avail + if(heat_transfer == 0) //just in case + change_mode(MODE_IDLE) + else if(heat_transfer > 0) + change_mode(MODE_HEATING) + power_avail = draw_power(min(heat_transfer, active_power_usage) * 0.001) * 1000 + removed.adjust_thermal_energy(min(power_avail * THERMOREGULATOR_CHEAT_FACTOR, heat_transfer)) + else + change_mode(MODE_COOLING) + heat_transfer = abs(heat_transfer) + var/cop = removed.temperature / TN60C + var/actual_heat_transfer = heat_transfer + heat_transfer = min(heat_transfer, active_power_usage * cop) + power_avail = draw_power((heat_transfer/cop) * 0.001) * 1000 + removed.adjust_thermal_energy(-min(power_avail * THERMOREGULATOR_CHEAT_FACTOR * cop, actual_heat_transfer)) + env.merge(removed) + +/obj/machinery/power/thermoregulator/update_icon() + cut_overlays() + . = ..() + var/list/overlays_to_add = list() + if(on) + overlays_to_add += "lasergen-on" + switch(mode) + if(MODE_HEATING) + overlays_to_add += "lasergen-heat" + if(MODE_COOLING) + overlays_to_add += "lasergen-cool" + add_overlay(overlays_to_add) + +/obj/machinery/power/thermoregulator/proc/turn_off() + on = 0 + change_mode(MODE_IDLE) + update_icon() + +/obj/machinery/power/thermoregulator/proc/change_mode(new_mode = MODE_IDLE) + if(mode == new_mode) + return + mode = new_mode + update_icon() + +/obj/machinery/power/thermoregulator/emp_act(severity) + if(!on) + on = 1 + target_temp += rand(0, 1000) + update_icon() + ..(severity) + +/obj/machinery/power/thermoregulator/overload(var/obj/machinery/power/source) + if(!anchored || !powernet) + return + // 1.5 MW + var/power_avail = draw_power(1500) + var/datum/gas_mixture/env = loc.return_air() + if(env) + var/datum/gas_mixture/removed = env.remove_ratio(0.99) + if(removed) + // OH BOY! + removed.adjust_thermal_energy(power_avail * 1000 * THERMOREGULATOR_CHEAT_FACTOR) + env.merge(removed) + var/turf/T = get_turf(src) + new /obj/effect/debris/cleanable/liquid_fuel(T, 5) + T.assume_gas(GAS_ID_VOLATILE_FUEL, 5, T20C) + T.hotspot_expose(700,400) + var/datum/effect_system/spark_spread/s = new + s.set_up(5, 0, T) + s.start() + visible_message("\The [src] bursts into flame!") + +#undef MODE_IDLE +#undef MODE_HEATING +#undef MODE_COOLING diff --git a/code/game/machinery/vending/engineering.dm b/code/game/machinery/vending/engineering.dm index 6d99a69ca9b..2ebf1ad2609 100644 --- a/code/game/machinery/vending/engineering.dm +++ b/code/game/machinery/vending/engineering.dm @@ -40,7 +40,10 @@ /obj/item/geiger_counter = 4, /obj/item/clothing/glasses/meson = 2, /obj/item/multitool = 4, - /obj/item/cell/high = 10, + /obj/item/cell/basic/tier_2/small = 15, + /obj/item/cell/basic/tier_2/medium = 15, + /obj/item/cell/basic/tier_2/large = 15, + /obj/item/cell/basic/tier_2/weapon = 5, /obj/item/airlock_electronics = 10, /obj/item/module/power_control = 10, /obj/item/circuitboard/airalarm = 10, @@ -70,7 +73,7 @@ /obj/item/clothing/glasses/omnihud/eng = 6, ) contraband = list( - /obj/item/cell/potato = 3, + // /obj/item/cell/potato = 3, ) premium = list( /obj/item/storage/belt/utility = 3, @@ -100,7 +103,10 @@ /obj/item/tool/wrench = 12, /obj/item/t_scanner = 12, /obj/item/stack/cable_coil/heavyduty = 8, - /obj/item/cell = 8, + /obj/item/cell/basic/tier_2/small = 8, + /obj/item/cell/basic/tier_2/medium = 8, + /obj/item/cell/basic/tier_2/large = 8, + /obj/item/cell/basic/tier_2/weapon = 8, /obj/item/weldingtool = 8, /obj/item/clothing/head/welding = 8, /obj/item/light/tube = 10, diff --git a/code/game/machinery/vending/research.dm b/code/game/machinery/vending/research.dm index 62f3b995785..3569686e012 100644 --- a/code/game/machinery/vending/research.dm +++ b/code/game/machinery/vending/research.dm @@ -26,7 +26,9 @@ /obj/item/clothing/under/rank/roboticist = 4, /obj/item/stack/cable_coil = 4, /obj/item/flash = 4, - /obj/item/cell/high = 12, + /obj/item/cell/basic/tier_3/small = 12, + /obj/item/cell/basic/tier_3/medium = 12, + /obj/item/cell/basic/tier_3/large = 12, /obj/item/assembly/prox_sensor = 3, /obj/item/assembly/signaler = 3, /obj/item/healthanalyzer = 3, diff --git a/code/game/machinery/vitals_monitor.dm b/code/game/machinery/vitals_monitor.dm index cc02115fcb6..0f2da1191f8 100644 --- a/code/game/machinery/vitals_monitor.dm +++ b/code/game/machinery/vitals_monitor.dm @@ -5,7 +5,6 @@ origin_tech = list(TECH_DATA = 3, TECH_BIO = 4, TECH_ENGINEERING = 2) req_components = list( /obj/item/stock_parts/console_screen = 1, - /obj/item/cell/high = 1 ) /obj/machinery/vitals_monitor diff --git a/code/game/objects/item-tool_system-legacy.dm b/code/game/objects/item-tool_system-legacy.dm index 089f7f539b0..c87c77fd9ac 100644 --- a/code/game/objects/item-tool_system-legacy.dm +++ b/code/game/objects/item-tool_system-legacy.dm @@ -8,19 +8,19 @@ * Assorted tool procs, so any item can emulate any tool, if coded */ /obj/item/proc/is_screwdriver() - return tool_behaviour() == TOOL_SCREWDRIVER + return tool_behavior() == TOOL_SCREWDRIVER /obj/item/proc/is_wrench() - return tool_behaviour() == TOOL_WRENCH + return tool_behavior() == TOOL_WRENCH /obj/item/proc/is_crowbar() - return tool_behaviour() == TOOL_CROWBAR + return tool_behavior() == TOOL_CROWBAR /obj/item/proc/is_wirecutter() - return tool_behaviour() == TOOL_WIRECUTTER + return tool_behavior() == TOOL_WIRECUTTER /obj/item/proc/is_multitool() - return tool_behaviour() == TOOL_MULTITOOL + return tool_behavior() == TOOL_MULTITOOL /obj/item/proc/is_welder() - return tool_behaviour() == TOOL_WELDER + return tool_behavior() == TOOL_WELDER diff --git a/code/game/objects/item-tool_system.dm b/code/game/objects/item-tool_system.dm index bb17c23e2ea..dc21aa547b5 100644 --- a/code/game/objects/item-tool_system.dm +++ b/code/game/objects/item-tool_system.dm @@ -6,19 +6,19 @@ * with arbitrary tool speeds and qualities, while allowing the item to hook usages. * * ! Warning: Unlike other things, the standard API for this only promises to return specific types - * ! of values; not to obey original variables like tool_behaviour and tool_override. + * ! of values; not to obey original variables like tool_behavior and tool_override. * ! This is a necessary drawback of optimizaiton. */ /obj/item /// static tool behavior - var/tool_behaviour + var/tool_behavior /// static tool quality var/tool_quality = TOOL_QUALITY_DEFAULT /// tool speed - multiplies delay (e.g. 0.5 for twixe as fast). also the default for dynamic tools. var/tool_speed = TOOL_SPEED_DEFAULT - /// dynamic tool locking - if set, dynamic tool behaviour (including confirmation radials) are entirely disregarded to use this item as a normal tool with whatever tool_behaviour() returns. + /// dynamic tool locking - if set, dynamic tool behaviour (including confirmation radials) are entirely disregarded to use this item as a normal tool with whatever tool_behavior() returns. var/tool_locked = TOOL_LOCKING_AUTO - /// the sound to play (compatible with getsfx()) when we are used as a tool, if the function is the same as tool_behaviour. + /// the sound to play (compatible with getsfx()) when we are used as a tool, if the function is the same as tool_behavior. var/tool_sound /// override for dynamic tool support - varedit only, and not always supported. VAR_PRIVATE/list/tool_override @@ -40,8 +40,8 @@ RETURN_TYPE(/list) . = list() // if normal tool behavior - if(tool_behaviour) - .[tool_behaviour] = tool_quality + if(tool_behavior) + .[tool_behavior] = tool_quality // if overriding, overwrite if(tool_override) . |= tool_override @@ -66,7 +66,7 @@ ASSERT(function) if(tool_override && tool_override[function]) return tool_quality_transform(tool_override[function], e_args, target, flags, usage) - return (function == tool_behaviour)? tool_quality_transform(tool_quality, e_args, target, flags, usage) : null + return (function == tool_behavior)? tool_quality_transform(tool_quality, e_args, target, flags, usage) : null /** * transforms tool quality according to a user's skill @@ -107,8 +107,8 @@ * * some dynamic tools will return the locked-in behaviour if locking is enabled */ -/obj/item/proc/tool_behaviour() - return tool_behaviour +/obj/item/proc/tool_behavior() + return tool_behavior /** * gets the quality of this tool @@ -121,7 +121,7 @@ * - flags - tool operation flags * - usage - what we're being used for */ -/obj/item/proc/tool_quality(function = tool_behaviour(), datum/event_args/actor/clickchain/e_args, atom/target, flags, usage) +/obj/item/proc/tool_quality(function = tool_behavior(), datum/event_args/actor/clickchain/e_args, atom/target, flags, usage) // this is just a wrapper, the only difference is function is automatically provided. return tool_check(function, e_args, target, flags, usage) diff --git a/code/game/objects/items/circuitboards/machinery/mining_drill.dm b/code/game/objects/items/circuitboards/machinery/mining_drill.dm index bde84a5fbfb..d561d2112a0 100644 --- a/code/game/objects/items/circuitboards/machinery/mining_drill.dm +++ b/code/game/objects/items/circuitboards/machinery/mining_drill.dm @@ -20,6 +20,6 @@ board_type = new /datum/frame/frame_types/machine origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1) req_components = list( - /obj/item/stock_parts/manipulator = 1 - ) + /obj/item/stock_parts/manipulator = 1, + ) diff --git a/code/game/objects/items/circuitboards/machinery/recharge_station.dm b/code/game/objects/items/circuitboards/machinery/recharge_station.dm index 28b7a0c2834..5f0076dd5b9 100644 --- a/code/game/objects/items/circuitboards/machinery/recharge_station.dm +++ b/code/game/objects/items/circuitboards/machinery/recharge_station.dm @@ -14,5 +14,5 @@ /obj/item/stock_parts/manipulator = 2, ) def_components = list( - /obj/item/cell = /obj/item/cell/super + /obj/item/cell = /obj/item/cell/basic/tier_1/large, ) diff --git a/code/game/objects/items/defib/defib_kit.dm b/code/game/objects/items/defib/defib_kit.dm index 5e279ac659a..207aedaf1e9 100644 --- a/code/game/objects/items/defib/defib_kit.dm +++ b/code/game/objects/items/defib/defib_kit.dm @@ -1,5 +1,4 @@ // todo: rework defibs -// todo: object cell system //backpack item /obj/item/defib_kit @@ -18,32 +17,32 @@ worth_intrinsic = 300 var/obj/item/shockpaddles/linked/paddles - var/obj/item/cell/bcell = null + + var/cell_type + var/cell_accept = CELL_TYPE_SMALL | CELL_TYPE_WEAPON | CELL_TYPE_MEDIUM /obj/item/defib_kit/Initialize(mapload) //starts without a cell for rnd + init_cell_slot_easy_tool(cell_type, cell_accept) . = ..() if(ispath(paddles)) paddles = new paddles(src, src) else paddles = new(src, src) - - if(ispath(bcell)) - bcell = new bcell(src) update_icon() /obj/item/defib_kit/Destroy() - . = ..() QDEL_NULL(paddles) - QDEL_NULL(bcell) + return ..() /obj/item/defib_kit/loaded //starts with a cell - bcell = /obj/item/cell/apc + cell_type = /obj/item/cell/basic/tier_1/medium /obj/item/defib_kit/update_icon() cut_overlays() . = ..() var/list/new_overlays = list() + var/obj/item/cell/bcell = get_cell() if(paddles && paddles.loc == src) //in case paddles got destroyed somehow. new_overlays += "[initial(icon_state)]-paddles" if(bcell && paddles) @@ -75,26 +74,6 @@ if(W == paddles) reattach_paddles(user) return CLICKCHAIN_DO_NOT_PROPAGATE - else if(istype(W, /obj/item/cell)) - if(bcell) - to_chat(user, "\the [src] already has a cell.") - return CLICKCHAIN_DO_NOT_PROPAGATE - else - if(!user.attempt_insert_item_for_installation(W, src)) - return CLICKCHAIN_DO_NOT_PROPAGATE - bcell = W - to_chat(user, "You install a cell in \the [src].") - update_icon() - return CLICKCHAIN_DO_NOT_PROPAGATE - - else if(W.is_screwdriver()) - if(bcell) - bcell.update_icon() - bcell.forceMove(get_turf(src.loc)) - bcell = null - to_chat(user, "You remove the cell from \the [src].") - update_icon() - return CLICKCHAIN_DO_NOT_PROPAGATE else return ..() @@ -102,7 +81,6 @@ if(paddles) . = paddles.emag_act(user) update_icon() - return //Paddle stuff @@ -167,8 +145,7 @@ worth_intrinsic = 500 /obj/item/defib_kit/compact/loaded - bcell = /obj/item/cell/high - + cell_type = /obj/item/cell/basic/tier_1/medium /obj/item/defib_kit/compact/combat name = "combat defibrillator" @@ -176,4 +153,4 @@ paddles = /obj/item/shockpaddles/linked/combat /obj/item/defib_kit/compact/combat/loaded - bcell = /obj/item/cell/high + cell_type = /obj/item/cell/basic/tier_2/medium diff --git a/code/game/objects/items/defib/shockpaddles.dm b/code/game/objects/items/defib/shockpaddles.dm index 6de40615254..fd3c238e5a8 100644 --- a/code/game/objects/items/defib/shockpaddles.dm +++ b/code/game/objects/items/defib/shockpaddles.dm @@ -369,10 +369,12 @@ return ITEM_RELOCATED_BY_DROPPED /obj/item/shockpaddles/linked/check_charge(var/charge_amt) - return (base_unit.bcell && base_unit.bcell.check_charge(charge_amt)) + var/obj/item/cell/bcell = base_unit.get_cell() + return (bcell && bcell.check_charge(charge_amt)) /obj/item/shockpaddles/linked/checked_use(var/charge_amt) - return (base_unit.bcell && base_unit.bcell.checked_use(charge_amt)) + var/obj/item/cell/bcell = base_unit.get_cell() + return (bcell && bcell.checked_use(charge_amt)) /obj/item/shockpaddles/linked/make_announcement(var/message, var/msg_class) base_unit.audible_message("\The [base_unit] [message]", "\The [base_unit] vibrates slightly.") diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm index 8993a0a1df7..c1a08b56725 100644 --- a/code/game/objects/items/devices/flash.dm +++ b/code/game/objects/items/devices/flash.dm @@ -29,11 +29,11 @@ var/base_icon = "flash" - var/obj/item/cell/power_supply //What type of power cell this uses var/charge_cost = 30 //How much energy is needed to flash. var/use_external_power = FALSE // Do we use charge from an external source? - var/cell_type = /obj/item/cell/device + var/cell_type = /obj/item/cell/basic/tier_1 + var/cell_accept = CELL_TYPE_SMALL //? damage var/stagger_strength = 1.5 @@ -41,7 +41,7 @@ /obj/item/flash/Initialize(mapload) . = ..() - power_supply = new cell_type(src) + init_cell_slot_easy_tool(cell_type, cell_accept) /obj/item/flash/attackby(var/obj/item/W, var/mob/user) if(W.is_screwdriver() && broken) @@ -64,7 +64,7 @@ /obj/item/flash/update_icon() . = ..() - var/obj/item/cell/battery = power_supply + var/obj/item/cell/battery = obj_cell_slot?.cell if(use_external_power) battery = get_external_power_supply() @@ -74,9 +74,6 @@ else icon_state = "[base_icon]" -/obj/item/flash/get_cell(inducer) - return power_supply - /obj/item/flash/proc/get_external_power_supply() if(isrobot(src.loc)) var/mob/living/silicon/robot/R = src.loc @@ -101,6 +98,7 @@ /obj/item/flash/proc/flash_recharge() //Every ten seconds the flash doesn't get used, the times_used variable goes down by one, making the flash less likely to burn out, // as well as being able to flash more before reaching max_flashes cap. + var/obj/item/cell/power_supply = obj_cell_slot?.cell for(var/i=0, i < max_flashes, i++) if(last_used + 10 SECONDS > world.time) break @@ -124,7 +122,7 @@ /obj/item/flash/proc/check_capacitor(var/mob/user) //spamming the flash before it's fully charged (60 seconds) increases the chance of it breaking //It will never break on the first use. - var/obj/item/cell/battery = power_supply + var/obj/item/cell/battery = obj_cell_slot?.cell if(use_external_power) battery = get_external_power_supply() diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 57203d20195..353e1820b71 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -19,8 +19,9 @@ /// Range of light when on, can be negative. var/flashlight_range = 4 - var/obj/item/cell/cell - var/cell_type = /obj/item/cell/device + var/cell_type = /obj/item/cell/basic/tier_1/small + var/cell_accept = CELL_TYPE_SMALL | CELL_TYPE_WEAPON + var/list/brightness_levels var/brightness_level = "medium" var/power_usage @@ -30,11 +31,11 @@ var/spawn_dir /obj/item/flashlight/Initialize(mapload) + init_cell_slot_easy_tool(cell_type, cell_accept) set_flashlight() . = ..() - if(power_use && cell_type) - cell = new cell_type(src) + if(power_use) brightness_levels = list("low" = 0.25, "medium" = 0.5, "high" = 1) power_usage = brightness_levels[brightness_level] else @@ -44,10 +45,10 @@ /obj/item/flashlight/Destroy() STOP_PROCESSING(SSobj, src) - QDEL_NULL(cell) return ..() /obj/item/flashlight/process(delta_time) + var/obj/item/cell/cell = obj_cell_slot?.cell if(!on || !cell) return PROCESS_KILL @@ -60,9 +61,6 @@ update_appearance() return PROCESS_KILL -/obj/item/flashlight/get_cell(inducer) - return cell - /obj/item/flashlight/verb/toggle() set name = "Toggle Flashlight Brightness" set category = VERB_CATEGORY_OBJECT @@ -102,23 +100,25 @@ /obj/item/flashlight/examine(mob/user, dist) . = ..() + var/obj/item/cell/cell = obj_cell_slot?.cell if(power_use && brightness_level) . += "\The [src] is set to [brightness_level]. " if(cell) . += "\The [src] has a \the [cell] attached. " - if(cell.charge <= cell.maxcharge*0.25) + if(cell.charge <= cell.max_charge*0.25) . += "It appears to have a low amount of power remaining." - else if(cell.charge > cell.maxcharge*0.25 && cell.charge <= cell.maxcharge*0.5) + else if(cell.charge > cell.max_charge*0.25 && cell.charge <= cell.max_charge*0.5) . += "It appears to have an average amount of power remaining." - else if(cell.charge > cell.maxcharge*0.5 && cell.charge <= cell.maxcharge*0.75) + else if(cell.charge > cell.max_charge*0.5 && cell.charge <= cell.max_charge*0.75) . += "It appears to have an above average amount of power remaining." - else if(cell.charge > cell.maxcharge*0.75 && cell.charge <= cell.maxcharge) + else if(cell.charge > cell.max_charge*0.75 && cell.charge <= cell.max_charge) . += "It appears to have a high amount of power remaining." /obj/item/flashlight/AltClick(mob/user) attack_self(user) /obj/item/flashlight/attack_self(mob/user, datum/event_args/actor/actor) + var/obj/item/cell/cell = obj_cell_slot?.cell if(power_use) if(!isturf(user.loc)) to_chat(user, "You cannot turn the light on while in this [user.loc].") //To prevent some lighting anomalities. @@ -197,39 +197,6 @@ return CLICKCHAIN_DO_NOT_PROPAGATE return ..() -/obj/item/flashlight/attack_hand(mob/user, datum/event_args/actor/clickchain/e_args) - if(user.get_inactive_held_item() == src) - if(cell) - cell.update_appearance() - user.put_in_hands(cell) - cell = null - to_chat(user, SPAN_NOTICE("You remove the cell from the [src].")) - playsound(src, 'sound/machines/button.ogg', 30, TRUE, 0) - on = FALSE - update_appearance() - return - ..() - else - return ..() - -/obj/item/flashlight/attackby(obj/item/W, mob/user as mob) - if(power_use) - if(istype(W, /obj/item/cell)) - if(istype(W, /obj/item/cell/device)) - if(!cell) - if(!user.attempt_insert_item_for_installation(W, src)) - return - cell = W - to_chat(user, SPAN_NOTICE("You install a cell in \the [src].")) - playsound(src, 'sound/machines/button.ogg', 30, 1, 0) - update_appearance() - else - to_chat(user, SPAN_NOTICE("\The [src] already has a cell.")) - else - to_chat(user, SPAN_NOTICE("\The [src] cannot use that type of cell.")) - else - ..() - /obj/item/flashlight/pen name = "penlight" desc = "A pen-sized light, used by medical staff." diff --git a/code/game/objects/items/devices/geiger.dm b/code/game/objects/items/devices/geiger.dm index 48e605185a9..7c9eed791be 100644 --- a/code/game/objects/items/devices/geiger.dm +++ b/code/game/objects/items/devices/geiger.dm @@ -179,7 +179,7 @@ to_chat(user, SPAN_NOTICE("[icon2html(src, user)] Target is free of radioactive contamination.")) /obj/item/geiger_counter/attackby(obj/item/I, mob/user, params) - if(I.tool_behaviour == TOOL_SCREWDRIVER && (obj_flags & OBJ_EMAGGED)) + if(I.tool_behavior == TOOL_SCREWDRIVER && (obj_flags & OBJ_EMAGGED)) if(scanning) to_chat(user, SPAN_WARNING("Turn off [src] before you perform this action!")) return FALSE diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm index b0fba11e10f..9ed20cccd14 100755 --- a/code/game/objects/items/devices/multitool.dm +++ b/code/game/objects/items/devices/multitool.dm @@ -32,7 +32,7 @@ var/colorable = 1 var/color_overlay = null tool_speed = 1 - tool_behaviour = TOOL_MULTITOOL + tool_behavior = TOOL_MULTITOOL tool_sound = 'sound/weapons/empty.ogg' /obj/item/multitool/Initialize(mapload) diff --git a/code/game/objects/items/devices/radio/jammer.dm b/code/game/objects/items/devices/radio/radio_jammer.dm similarity index 70% rename from code/game/objects/items/devices/radio/jammer.dm rename to code/game/objects/items/devices/radio/radio_jammer.dm index 41a43f2355c..137cb6eca7d 100644 --- a/code/game/objects/items/devices/radio/jammer.dm +++ b/code/game/objects/items/devices/radio/radio_jammer.dm @@ -24,25 +24,24 @@ var/global/list/active_radio_jammers = list() var/on = 0 var/jam_range = 7 - var/obj/item/cell/device/weapon/power_source + + var/cell_type = /obj/item/cell/basic/tier_1/small + var/cell_accept = CELL_TYPE_SMALL + var/tick_cost = 5 // For the ERPs. origin_tech = list(TECH_ILLEGAL = 7, TECH_BLUESPACE = 5) //Such technology! Subspace jamming! /obj/item/radio_jammer/Initialize(mapload) + init_cell_slot_easy_tool(cell_type, cell_accept) . = ..() - power_source = new(src) update_icon() // So it starts with the full overlay. /obj/item/radio_jammer/Destroy() if(on) turn_off() - QDEL_NULL(power_source) return ..() -/obj/item/radio_jammer/get_cell(inducer) - return power_source - /obj/item/radio_jammer/proc/turn_off(mob/user) if(user) to_chat(user,"\The [src] deactivates.") @@ -60,25 +59,15 @@ var/global/list/active_radio_jammers = list() update_icon() /obj/item/radio_jammer/process(delta_time) - if(!power_source || !power_source.check_charge(tick_cost)) + if(!obj_cell_slot?.cell?.check_charge(tick_cost)) var/mob/living/notify if(isliving(loc)) notify = loc turn_off(notify) else - power_source.use(tick_cost) + obj_cell_slot.cell.use(tick_cost) update_icon() - -/obj/item/radio_jammer/attack_hand(mob/user, datum/event_args/actor/clickchain/e_args) - if(user.get_inactive_held_item() == src && power_source) - to_chat(user,"You eject \the [power_source] from \the [src].") - user.put_in_hands(power_source) - power_source = null - turn_off() - else - return ..() - /obj/item/radio_jammer/attack_self(mob/user, datum/event_args/actor/actor) . = ..() if(.) @@ -86,20 +75,11 @@ var/global/list/active_radio_jammers = list() if(on) turn_off(user) else - if(power_source) + if(obj_cell_slot?.cell) turn_on(user) else to_chat(user,"\The [src] has no power source!") -/obj/item/radio_jammer/attackby(obj/W, mob/user) - if(istype(W,/obj/item/cell/device/weapon) && !power_source) - if(!user.attempt_insert_item_for_installation(power_source, src)) - return - power_source = W - power_source.update_icon() //Why doesn't a cell do this already? :| - update_icon() - to_chat(user,"You insert \the [power_source] into \the [src].") - /obj/item/radio_jammer/update_icon() cut_overlays() . = ..() @@ -109,8 +89,8 @@ var/global/list/active_radio_jammers = list() icon_state = initial(icon_state) var/overlay_percent = 0 - if(power_source) - overlay_percent = between(0, round( power_source.percent() , 25), 100) + if(obj_cell_slot?.cell) + overlay_percent = between(0, round( obj_cell_slot.cell.percent() , 25), 100) else overlay_percent = 0 diff --git a/code/game/objects/items/devices/suit_cooling.dm b/code/game/objects/items/devices/suit_cooling.dm index 14e10ce3d1d..b0cfa655876 100644 --- a/code/game/objects/items/devices/suit_cooling.dm +++ b/code/game/objects/items/devices/suit_cooling.dm @@ -17,32 +17,32 @@ materials_base = list(MAT_STEEL = 15000, MAT_GLASS = 3500) origin_tech = list(TECH_MAGNET = 2, TECH_MATERIAL = 2) + var/cell_type = /obj/item/cell/basic/tier_1/medium + var/cell_accept = CELL_TYPE_MEDIUM | CELL_TYPE_SMALL | CELL_TYPE_WEAPON + var/cell_locked = FALSE + var/on = 0 //is it turned on? var/cover_open = 0 //is the cover open? - var/obj/item/cell/cell = /obj/item/cell/high var/max_cooling = 15 // in degrees per second - probably don't need to mess with heat capacity here var/charge_consumption = 3 // charge per second at max_cooling var/thermostat = T20C //TODO: make it heat up the surroundings when not in space -/obj/item/suit_cooling_unit/empty - cell = null +/obj/item/suit_cooling_unit/Initialize(mapload) + var/datum/object_system/cell_slot/slot = init_cell_slot(cell_type, cell_accept) + slot.remove_yank_offhand = TRUE + slot.remove_yank_context = TRUE + return ..() + +/obj/item/suit_cooling_unit/object_cell_slot_mutable(mob/user, datum/object_system/cell_slot/slot) + return cover_open && !cell_locked /obj/item/suit_cooling_unit/ui_action_click(datum/action/action, datum/event_args/actor/actor) toggle(usr) -/obj/item/suit_cooling_unit/Initialize(mapload) - . = ..() - if(ispath(cell)) - cell = new cell(src) - -/obj/item/suit_cooling_unit/Destroy() - QDEL_NULL(cell) - return ..() - /obj/item/suit_cooling_unit/process() - if (!on || !cell) + if (!on || !obj_cell_slot?.cell) return PROCESS_KILL if (!ismob(loc)) @@ -72,9 +72,9 @@ H.bodytemperature -= temp_adj*efficiency - cell.use(charge_usage) + obj_cell_slot.cell.use(charge_usage) - if(cell.charge <= 0) + if(obj_cell_slot.cell.charge <= 0) turn_off(1) /obj/item/suit_cooling_unit/proc/get_environment_temperature() @@ -109,9 +109,9 @@ return 1 /obj/item/suit_cooling_unit/proc/turn_on() - if(!cell) + if(!obj_cell_slot?.cell) return - if(cell.charge <= 0) + if(obj_cell_slot.cell.charge <= 0) return on = 1 @@ -128,20 +128,6 @@ . = ..() if(.) return - if(cover_open && cell) - if(ishuman(user)) - user.put_in_hands(cell) - else - cell.loc = get_turf(loc) - - cell.add_fingerprint(user) - cell.update_icon() - - to_chat(user, "You remove \the [src.cell].") - src.cell = null - updateicon() - return - toggle(user) /obj/item/suit_cooling_unit/proc/toggle(var/mob/user) @@ -162,24 +148,11 @@ playsound(src, W.tool_sound, 50, 1) updateicon() return - - if (istype(W, /obj/item/cell)) - if(cover_open) - if(cell) - to_chat(user, "There is a [cell] already installed here.") - else - if(!user.attempt_insert_item_for_installation(W, src)) - return - cell = W - to_chat(user, "You insert the [cell].") - updateicon() - return - return ..() /obj/item/suit_cooling_unit/proc/updateicon() if (cover_open) - if (cell) + if (obj_cell_slot?.cell) icon_state = "suitcooler1" else icon_state = "suitcooler2" @@ -200,32 +173,23 @@ . += "It is switched off." if (cover_open) - if(cell) - . += "The panel is open, exposing the [cell]." + if(obj_cell_slot?.cell) + . += "The panel is open, exposing the [obj_cell_slot.cell]." else . += "The panel is open." - if (cell) - . += "The charge meter reads [round(cell.percent())]%." + if (obj_cell_slot?.cell) + . += "The charge meter reads [round(obj_cell_slot.cell.percent())]%." else . += "It doesn't have a power cell installed." +/obj/item/suit_cooling_unit/empty + cell_type = null + /obj/item/suit_cooling_unit/emergency icon_state = "esuitcooler" - cell = /obj/item/cell w_class = WEIGHT_CLASS_NORMAL + cell_locked = TRUE /obj/item/suit_cooling_unit/emergency/updateicon() return - -/obj/item/suit_cooling_unit/emergency/get_cell(inducer) - if(on) - return null // Don't let recharging happen while we're on - return cell - -/obj/item/suit_cooling_unit/emergency/attackby(obj/item/W as obj, mob/user as mob) - if (W.is_screwdriver()) - to_chat(user, "This model has the cell permanently installed!") - return - - return ..() diff --git a/code/game/objects/items/inducer.dm b/code/game/objects/items/inducer.dm index 2b665ca5bc4..0d0ed227bb8 100644 --- a/code/game/objects/items/inducer.dm +++ b/code/game/objects/items/inducer.dm @@ -17,7 +17,8 @@ /// transfer amount per second var/transfer_rate = 1000 /// type of cell to spawn - var/cell_type = /obj/item/cell/high + var/cell_type = /obj/item/cell/basic/tier_1/medium + var/cell_accept = CELL_TYPE_MEDIUM | CELL_TYPE_SMALL | CELL_TYPE_WEAPON /// panel open? var/opened = FALSE /// currently inducing? @@ -33,7 +34,7 @@ /obj/item/inducer/Initialize(mapload) . = ..() - var/datum/object_system/cell_slot/cell_slot = init_cell_slot(cell_type) + var/datum/object_system/cell_slot/cell_slot = init_cell_slot(cell_type, cell_accept) cell_slot.receive_emp = TRUE cell_slot.receive_inducer = TRUE cell_slot.remove_yank_offhand = TRUE @@ -44,7 +45,7 @@ /obj/item/inducer/examine(mob/user, dist) . = ..() if(!isnull(obj_cell_slot.cell)) - . += "
Its display shows: [round(obj_cell_slot.cell.charge)] / [obj_cell_slot.cell.maxcharge]." + . += "
Its display shows: [round(obj_cell_slot.cell.charge)] / [obj_cell_slot.cell.max_charge]." else . += "
Its display is dark." if(opened) @@ -183,7 +184,7 @@ icon_state = "inducer-syndi" item_state = "inducer-syndi" transfer_rate = 2000 - cell_type = /obj/item/cell/super + cell_type = /obj/item/cell/basic/tier_3/medium inducer_flags = NONE /* @@ -217,7 +218,7 @@ var/obj/item/cell/C = get_cell(TRUE) if(C) things_to_induce += C - if(C.charge >= C.maxcharge) + if(C.charge >= C.max_charge) return INDUCER_SCAN_FULL /** @@ -234,7 +235,7 @@ . = ..() var/obj/item/cell/C = get_cell() if(C) - var/use = clamp(C.maxcharge - C.charge, 0, amount) + var/use = clamp(C.max_charge - C.charge, 0, amount) C.give(use) return use else diff --git a/code/game/objects/items/melee/types/transforming.dm b/code/game/objects/items/melee/types/transforming.dm index 711ea21aff4..052429c42f9 100644 --- a/code/game/objects/items/melee/types/transforming.dm +++ b/code/game/objects/items/melee/types/transforming.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /** * single-toggle weapons diff --git a/code/game/objects/items/melee/types/transforming/energy.dm b/code/game/objects/items/melee/types/transforming/energy.dm index 187697c3a04..f0534a659e3 100644 --- a/code/game/objects/items/melee/types/transforming/energy.dm +++ b/code/game/objects/items/melee/types/transforming/energy.dm @@ -17,14 +17,21 @@ // If it uses energy. var/use_cell = FALSE var/hitcost = 120 - var/obj/item/cell/bcell = null - var/cell_type = /obj/item/cell/device + + var/cell_type = /obj/item/cell/basic/tier_1/weapon + var/cell_accept = CELL_TYPE_SMALL | CELL_TYPE_WEAPON passive_parry = /datum/passive_parry/melee/energy activation_sound = 'sound/weapons/saberon.ogg' deactivation_sound = 'sound/weapons/saberoff.ogg' +/obj/item/melee/transforming/energy/Initialize(mapload) + . = ..() + if(. == INITIALIZE_HINT_QDEL) + return + init_cell_slot_easy_tool(cell_type, cell_accept) + /obj/item/melee/transforming/energy/examine(mob/user, dist) . = ..() if(colorable) @@ -39,6 +46,7 @@ set_light(0) /obj/item/melee/transforming/energy/proc/use_charge(var/cost) + var/obj/item/cell/bcell = obj_cell_slot?.cell if(active) if(bcell) if(bcell.checked_use(cost)) @@ -49,6 +57,7 @@ /obj/item/melee/transforming/energy/examine(mob/user, dist) . = ..() + var/obj/item/cell/bcell = obj_cell_slot?.cell if(use_cell) if(bcell) . += "The blade is [round(bcell.percent())]% charged." @@ -56,6 +65,7 @@ . += "The blade does not have a power source installed." /obj/item/melee/transforming/energy/toggle(datum/event_args/actor/actor, silent) + var/obj/item/cell/bcell = obj_cell_slot?.cell if(use_cell) if((!bcell || bcell.charge < hitcost) && !active) if(!silent) @@ -81,29 +91,8 @@ rainbow = FALSE to_chat(user, "You manipulate the color controller in [src].") update_icon() - if(use_cell) - if(istype(W, cell_type)) - if(!bcell) - if(!user.attempt_insert_item_for_installation(W, src)) - return - bcell = W - to_chat(user, "You install a cell in [src].") - update_icon() - else - to_chat(user, "[src] already has a cell.") - else if(W.is_screwdriver() && bcell) - bcell.update_icon() - bcell.forceMove(get_turf(loc)) - bcell = null - to_chat(user, "You remove the cell from \the [src].") - set_activation(FALSE) - update_icon() - return return ..() -/obj/item/melee/transforming/energy/get_cell(inducer) - return bcell - /obj/item/melee/transforming/energy/build_active_overlay() var/image/creating = ..() if(rainbow) diff --git a/code/game/objects/items/melee/types/transforming/energy/axe.dm b/code/game/objects/items/melee/types/transforming/energy/axe.dm index 33309837cfd..37421920567 100644 --- a/code/game/objects/items/melee/types/transforming/energy/axe.dm +++ b/code/game/objects/items/melee/types/transforming/energy/axe.dm @@ -43,6 +43,5 @@ use_cell = TRUE hitcost = 120 -/obj/item/melee/transforming/energy/axe/charge/loaded/Initialize(mapload) - . = ..() - bcell = new/obj/item/cell/device/weapon(src) +/obj/item/melee/transforming/energy/axe/charge/loaded + cell_type = /obj/item/cell/basic/tier_1/weapon diff --git a/code/game/objects/items/melee/types/transforming/energy/saber.dm b/code/game/objects/items/melee/types/transforming/energy/saber.dm index 5803103e8ec..32b983bdf7b 100644 --- a/code/game/objects/items/melee/types/transforming/energy/saber.dm +++ b/code/game/objects/items/melee/types/transforming/energy/saber.dm @@ -111,9 +111,8 @@ use_cell = TRUE hitcost = 75 -/obj/item/melee/transforming/energy/sword/charge/loaded/Initialize(mapload) - . = ..() - bcell = new/obj/item/cell/device/weapon(src) +/obj/item/melee/transforming/energy/sword/charge/loaded + cell_type = /obj/item/cell/basic/tier_1/weapon /obj/item/melee/transforming/energy/sword/charge/attackby(obj/item/W, mob/living/user, params) if(istype(W, /obj/item/melee/transforming/energy/sword/charge)) diff --git a/code/game/objects/items/robot/gripper.dm b/code/game/objects/items/robot/gripper.dm index 8af962db4d3..688aa5c48c1 100644 --- a/code/game/objects/items/robot/gripper.dm +++ b/code/game/objects/items/robot/gripper.dm @@ -256,7 +256,7 @@ desc = "A complex grasping tool used for working with circuitry." can_hold = list( - /obj/item/cell/device, + /obj/item/cell, /obj/item/electronic_assembly, /obj/item/assembly/electronic_assembly, /obj/item/clothing/under/circuitry, diff --git a/code/game/objects/items/shield/shield.dm b/code/game/objects/items/shield/shield.dm index c55b07df859..82873871912 100644 --- a/code/game/objects/items/shield/shield.dm +++ b/code/game/objects/items/shield/shield.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/passive_parry/shield parry_arc = 155 diff --git a/code/game/objects/items/shield/types/transforming.dm b/code/game/objects/items/shield/types/transforming.dm index 375cc2ee4cf..af7c8bb083d 100644 --- a/code/game/objects/items/shield/types/transforming.dm +++ b/code/game/objects/items/shield/types/transforming.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /** * toggleable shields, like energy combat shields and telescoping shields diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index 9a24314b68d..f87287643d1 100644 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -59,7 +59,25 @@ /obj/item/tool/wrench, /obj/item/multitool, /obj/item/flashlight, - /obj/item/cell/device, + // TODO: PLEASE FOR THE LOVE OF GOD REFACTOR FUCKING BELTS ALREADY + /obj/item/cell/basic/tier_1/weapon, + /obj/item/cell/basic/tier_2/weapon, + /obj/item/cell/basic/tier_3/weapon, + /obj/item/cell/basic/tier_4/weapon, + /obj/item/cell/basic/tier_5/weapon, + /obj/item/cell/regen/weapon, + /obj/item/cell/regen/fractal/weapon, + /obj/item/cell/infinite/weapon, + /obj/item/cell/microfission/weapon, + /obj/item/cell/basic/tier_1/small, + /obj/item/cell/basic/tier_2/small, + /obj/item/cell/basic/tier_3/small, + /obj/item/cell/basic/tier_4/small, + /obj/item/cell/basic/tier_5/small, + /obj/item/cell/regen/small, + /obj/item/cell/regen/fractal/small, + /obj/item/cell/infinite/small, + /obj/item/cell/microfission/small, /obj/item/stack/cable_coil, /obj/item/t_scanner, /obj/item/atmos_analyzer, @@ -146,7 +164,25 @@ /obj/item/clothing/glasses, /obj/item/tool/crowbar, /obj/item/flashlight, - /obj/item/cell/device, + // TODO: PLEASE FOR THE LOVE OF GOD REFACTOR FUCKING BELTS ALREADY + /obj/item/cell/basic/tier_1/weapon, + /obj/item/cell/basic/tier_2/weapon, + /obj/item/cell/basic/tier_3/weapon, + /obj/item/cell/basic/tier_4/weapon, + /obj/item/cell/basic/tier_5/weapon, + /obj/item/cell/regen/weapon, + /obj/item/cell/regen/fractal/weapon, + /obj/item/cell/infinite/weapon, + /obj/item/cell/microfission/weapon, + /obj/item/cell/basic/tier_1/small, + /obj/item/cell/basic/tier_2/small, + /obj/item/cell/basic/tier_3/small, + /obj/item/cell/basic/tier_4/small, + /obj/item/cell/basic/tier_5/small, + /obj/item/cell/regen/small, + /obj/item/cell/regen/fractal/small, + /obj/item/cell/infinite/small, + /obj/item/cell/microfission/small, /obj/item/extinguisher/mini, /obj/item/switchtool/surgery, /obj/item/storage/quickdraw/syringe_case @@ -168,7 +204,25 @@ /obj/item/barrier_tape_roll, /obj/item/clothing/glasses, /obj/item/flashlight, - /obj/item/cell/device, + // TODO: PLEASE FOR THE LOVE OF GOD REFACTOR FUCKING BELTS ALREADY + /obj/item/cell/basic/tier_1/weapon, + /obj/item/cell/basic/tier_2/weapon, + /obj/item/cell/basic/tier_3/weapon, + /obj/item/cell/basic/tier_4/weapon, + /obj/item/cell/basic/tier_5/weapon, + /obj/item/cell/regen/weapon, + /obj/item/cell/regen/fractal/weapon, + /obj/item/cell/infinite/weapon, + /obj/item/cell/microfission/weapon, + /obj/item/cell/basic/tier_1/small, + /obj/item/cell/basic/tier_2/small, + /obj/item/cell/basic/tier_3/small, + /obj/item/cell/basic/tier_4/small, + /obj/item/cell/basic/tier_5/small, + /obj/item/cell/regen/small, + /obj/item/cell/regen/fractal/small, + /obj/item/cell/infinite/small, + /obj/item/cell/microfission/small, /obj/item/reagent_containers/spray/luminol, /obj/item/sample, /obj/item/forensics/sample_kit/powder, @@ -220,8 +274,25 @@ /obj/item/t_scanner, /obj/item/atmos_analyzer, /obj/item/flashlight, - /obj/item/cell/device, - /obj/item/cell/device/weapon, + // TODO: PLEASE FOR THE LOVE OF GOD REFACTOR FUCKING BELTS ALREADY + /obj/item/cell/basic/tier_1/weapon, + /obj/item/cell/basic/tier_2/weapon, + /obj/item/cell/basic/tier_3/weapon, + /obj/item/cell/basic/tier_4/weapon, + /obj/item/cell/basic/tier_5/weapon, + /obj/item/cell/regen/weapon, + /obj/item/cell/regen/fractal/weapon, + /obj/item/cell/infinite/weapon, + /obj/item/cell/microfission/weapon, + /obj/item/cell/basic/tier_1/small, + /obj/item/cell/basic/tier_2/small, + /obj/item/cell/basic/tier_3/small, + /obj/item/cell/basic/tier_4/small, + /obj/item/cell/basic/tier_5/small, + /obj/item/cell/regen/small, + /obj/item/cell/regen/fractal/small, + /obj/item/cell/infinite/small, + /obj/item/cell/microfission/small, /obj/item/material/butterfly, /obj/item/material/knife, /obj/item/melee/transforming/energy/sword, @@ -317,7 +388,25 @@ /obj/item/clothing/glasses, /obj/item/tool/crowbar, /obj/item/flashlight, - /obj/item/cell/device, + // TODO: PLEASE FOR THE LOVE OF GOD REFACTOR FUCKING BELTS ALREADY + /obj/item/cell/basic/tier_1/weapon, + /obj/item/cell/basic/tier_2/weapon, + /obj/item/cell/basic/tier_3/weapon, + /obj/item/cell/basic/tier_4/weapon, + /obj/item/cell/basic/tier_5/weapon, + /obj/item/cell/regen/weapon, + /obj/item/cell/regen/fractal/weapon, + /obj/item/cell/infinite/weapon, + /obj/item/cell/microfission/weapon, + /obj/item/cell/basic/tier_1/small, + /obj/item/cell/basic/tier_2/small, + /obj/item/cell/basic/tier_3/small, + /obj/item/cell/basic/tier_4/small, + /obj/item/cell/basic/tier_5/small, + /obj/item/cell/regen/small, + /obj/item/cell/regen/fractal/small, + /obj/item/cell/infinite/small, + /obj/item/cell/microfission/small, /obj/item/extinguisher/mini, /obj/item/surgical ) @@ -376,7 +465,25 @@ insertion_whitelist = list( /obj/item/clothing/glasses, /obj/item/flashlight, - /obj/item/cell/device, + // TODO: PLEASE FOR THE LOVE OF GOD REFACTOR FUCKING BELTS ALREADY + /obj/item/cell/basic/tier_1/weapon, + /obj/item/cell/basic/tier_2/weapon, + /obj/item/cell/basic/tier_3/weapon, + /obj/item/cell/basic/tier_4/weapon, + /obj/item/cell/basic/tier_5/weapon, + /obj/item/cell/regen/weapon, + /obj/item/cell/regen/fractal/weapon, + /obj/item/cell/infinite/weapon, + /obj/item/cell/microfission/weapon, + /obj/item/cell/basic/tier_1/small, + /obj/item/cell/basic/tier_2/small, + /obj/item/cell/basic/tier_3/small, + /obj/item/cell/basic/tier_4/small, + /obj/item/cell/basic/tier_5/small, + /obj/item/cell/regen/small, + /obj/item/cell/regen/fractal/small, + /obj/item/cell/infinite/small, + /obj/item/cell/microfission/small, /obj/item/grenade, /obj/item/pda, /obj/item/radio/headset, @@ -405,7 +512,25 @@ /obj/item/gps, /obj/item/measuring_tape, /obj/item/flashlight, - /obj/item/cell/device, + // TODO: PLEASE FOR THE LOVE OF GOD REFACTOR FUCKING BELTS ALREADY + /obj/item/cell/basic/tier_1/weapon, + /obj/item/cell/basic/tier_2/weapon, + /obj/item/cell/basic/tier_3/weapon, + /obj/item/cell/basic/tier_4/weapon, + /obj/item/cell/basic/tier_5/weapon, + /obj/item/cell/regen/weapon, + /obj/item/cell/regen/fractal/weapon, + /obj/item/cell/infinite/weapon, + /obj/item/cell/microfission/weapon, + /obj/item/cell/basic/tier_1/small, + /obj/item/cell/basic/tier_2/small, + /obj/item/cell/basic/tier_3/small, + /obj/item/cell/basic/tier_4/small, + /obj/item/cell/basic/tier_5/small, + /obj/item/cell/regen/small, + /obj/item/cell/regen/fractal/small, + /obj/item/cell/infinite/small, + /obj/item/cell/microfission/small, /obj/item/pickaxe, /obj/item/depth_scanner, /obj/item/camera, diff --git a/code/game/objects/items/storage/belt/security.dm b/code/game/objects/items/storage/belt/security.dm index 412b516be96..401fa4e3583 100644 --- a/code/game/objects/items/storage/belt/security.dm +++ b/code/game/objects/items/storage/belt/security.dm @@ -14,7 +14,25 @@ /obj/item/ammo_casing/a10g, /obj/item/ammo_casing/a12g, /obj/item/ammo_magazine, - /obj/item/cell/device, + // TODO: PLEASE FOR THE LOVE OF GOD REFACTOR FUCKING BELTS ALREADY + /obj/item/cell/basic/tier_1/weapon, + /obj/item/cell/basic/tier_2/weapon, + /obj/item/cell/basic/tier_3/weapon, + /obj/item/cell/basic/tier_4/weapon, + /obj/item/cell/basic/tier_5/weapon, + /obj/item/cell/regen/weapon, + /obj/item/cell/regen/fractal/weapon, + /obj/item/cell/infinite/weapon, + /obj/item/cell/microfission/weapon, + /obj/item/cell/basic/tier_1/small, + /obj/item/cell/basic/tier_2/small, + /obj/item/cell/basic/tier_3/small, + /obj/item/cell/basic/tier_4/small, + /obj/item/cell/basic/tier_5/small, + /obj/item/cell/regen/small, + /obj/item/cell/regen/fractal/small, + /obj/item/cell/infinite/small, + /obj/item/cell/microfission/small, /obj/item/melee/baton, /obj/item/gun/projectile/energy/taser, /obj/item/gun/projectile/energy/stunrevolver, @@ -44,6 +62,6 @@ /obj/item/flash, /obj/item/gun/projectile/energy/nt_isd/sidearm/with_light, /obj/item/melee/baton, - /obj/item/cell/device/weapon, + /obj/item/cell/basic/tier_2/weapon, /obj/item/reagent_containers/spray/pepper, ) diff --git a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm index 91015ee9893..e7854ca22e1 100644 --- a/code/game/objects/items/storage/boxes.dm +++ b/code/game/objects/items/storage/boxes.dm @@ -26,6 +26,7 @@ item_state = "syringe_kit" max_single_weight_class = WEIGHT_CLASS_SMALL max_combined_volume = STORAGE_VOLUME_BOX + weight_volume = ITEM_VOLUME_BOX drop_sound = 'sound/items/drop/cardboardbox.ogg' pickup_sound = 'sound/items/pickup/cardboardbox.ogg' worth_intrinsic = 25 diff --git a/code/game/objects/items/storage/lockbox.dm b/code/game/objects/items/storage/lockbox.dm index fff36d2238d..a0b9120e22b 100644 --- a/code/game/objects/items/storage/lockbox.dm +++ b/code/game/objects/items/storage/lockbox.dm @@ -196,7 +196,7 @@ /obj/item/clothing/under/rank/trek/medsci/ds9 = 1, /obj/item/clothing/suit/storage/trek/ds9 = 1, /obj/item/gun/projectile/energy/retro = 4, - /obj/item/cell/device/weapon = 8, + /obj/item/cell/basic/tier_2/weapon = 8, ) /obj/item/storage/lockbox/axhs diff --git a/code/game/objects/items/storage/medical/hypokit.dm b/code/game/objects/items/storage/medical/hypokit.dm index 90dd1d6b389..4ca9af08568 100644 --- a/code/game/objects/items/storage/medical/hypokit.dm +++ b/code/game/objects/items/storage/medical/hypokit.dm @@ -6,6 +6,7 @@ icon_state = "normal" slot_flags = SLOT_BELT max_combined_volume = STORAGE_VOLUME_BOX + weight_volume = ITEM_VOLUME_BOX insertion_whitelist = list( /obj/item/reagent_containers/glass/hypovial, /obj/item/hypospray, @@ -52,8 +53,8 @@ name = "combat hypospray kit" icon_state = "tactical" vial_path = /obj/item/reagent_containers/glass/hypovial/large - max_combined_volume = STORAGE_VOLUME_BOX * 2 - weight_volume = WEIGHT_VOLUME_NORMAL * 1.5 + max_combined_volume = STORAGE_VOLUME_BOX_2X + weight_volume = ITEM_VOLUME_BOX_AND_HALF /obj/item/storage/hypokit/combat/full hypospray_path = /obj/item/hypospray/combat @@ -83,8 +84,8 @@ icon_state = "briefcase" inhand_state = "normal" vial_path = /obj/item/reagent_containers/glass/hypovial/large - max_combined_volume = STORAGE_VOLUME_BOX * 2 - weight_volume = WEIGHT_VOLUME_NORMAL * 1.5 + max_combined_volume = STORAGE_VOLUME_BOX_2X + weight_volume = ITEM_VOLUME_BOX_AND_HALF /obj/item/storage/hypokit/advanced/full hypospray_path = /obj/item/hypospray/advanced diff --git a/code/game/objects/items/tools/crowbar.dm b/code/game/objects/items/tools/crowbar.dm index de6a99a89e2..956275bac90 100644 --- a/code/game/objects/items/tools/crowbar.dm +++ b/code/game/objects/items/tools/crowbar.dm @@ -9,7 +9,7 @@ icon_state = "crowbar" item_state = "crowbar" slot_flags = SLOT_BELT - tool_behaviour = TOOL_CROWBAR + tool_behavior = TOOL_CROWBAR damage_force = 6 throw_force = 7 pry = 1 diff --git a/code/game/objects/items/tools/screwdriver.dm b/code/game/objects/items/tools/screwdriver.dm index bec5d3eab7c..90c94353ddc 100644 --- a/code/game/objects/items/tools/screwdriver.dm +++ b/code/game/objects/items/tools/screwdriver.dm @@ -8,7 +8,7 @@ icon_state = "screwdriver" item_state = "screwdriver" slot_flags = SLOT_BELT | SLOT_EARS - tool_behaviour = TOOL_SCREWDRIVER + tool_behavior = TOOL_SCREWDRIVER damage_force = 6 w_class = WEIGHT_CLASS_TINY throw_force = 5 diff --git a/code/game/objects/items/tools/switchtool.dm b/code/game/objects/items/tools/switchtool.dm index 9c675ad33e5..31eefc66502 100644 --- a/code/game/objects/items/tools/switchtool.dm +++ b/code/game/objects/items/tools/switchtool.dm @@ -261,8 +261,8 @@ .[i] = tool_quality //? tool redirection -/obj/item/switchtool/tool_behaviour() - return deployed?.tool_behaviour() +/obj/item/switchtool/tool_behavior() + return deployed?.tool_behavior() //? tool redirection /obj/item/switchtool/tool_feedback_start(function, flags, mob/user, atom/target, time, cost, usage) diff --git a/code/game/objects/items/tools/weldingtool.dm b/code/game/objects/items/tools/weldingtool.dm index 16668bd51e1..0a516a6ec0a 100644 --- a/code/game/objects/items/tools/weldingtool.dm +++ b/code/game/objects/items/tools/weldingtool.dm @@ -8,7 +8,7 @@ icon_state = "welder" item_state = "welder" slot_flags = SLOT_BELT - tool_behaviour = TOOL_WELDER + tool_behavior = TOOL_WELDER suit_storage_class = SUIT_STORAGE_CLASS_SOFTWEAR | SUIT_STORAGE_CLASS_HARDWEAR //Amount of OUCH when it's thrown @@ -585,41 +585,42 @@ max_fuel = 0 //We'll handle the consumption later. item_state = "ewelder" worth_intrinsic = 70 - var/obj/item/cell/power_supply //What type of power cell this uses var/charge_cost = 24 //The rough equivalent of 1 unit of fuel, based on us wanting 10 welds per battery - var/cell_type = /obj/item/cell/device var/use_external_power = 0 //If in a borg or hardsuit, this needs to = 1 flame_color = "#00CCFF" // Blue-ish, to set it apart from the gas flames. acti_sound = /datum/soundbyte/sparks deac_sound = /datum/soundbyte/sparks -/obj/item/weldingtool/electric/unloaded - cell_type = null + var/cell_type = /obj/item/cell/basic/tier_1/small + var/cell_accept = CELL_TYPE_SMALL | CELL_TYPE_WEAPON /obj/item/weldingtool/electric/Initialize(mapload) + init_cell_slot_easy_tool(cell_type, cell_accept) . = ..() - if(cell_type == null) - update_icon() - else if(cell_type) - power_supply = new cell_type(src) - else - power_supply = new /obj/item/cell/device(src) update_icon() -/obj/item/weldingtool/electric/get_cell(inducer) - return power_supply +/obj/item/weldingtool/electric/object_cell_slot_inserted(obj/item/cell/cell, datum/object_system/cell_slot/slot) + . = ..() + update_icon() + +/obj/item/weldingtool/electric/object_cell_slot_removed(obj/item/cell/cell, datum/object_system/cell_slot/slot) + . = ..() + update_icon() + setWelding(FALSE) /obj/item/weldingtool/electric/examine(mob/user, dist) . = ..() if(get_dist(src, user) > 1) return else // The << need to stay, for some reason no they dont + var/obj/item/cell/power_supply = obj_cell_slot.cell if(power_supply) . += "[icon2html(thing = src, target = world)] The [src] has [get_fuel()] charge left." else . += "[icon2html(thing = src, target = world)] The [src] has no power cell!" /obj/item/weldingtool/electric/get_fuel() + var/obj/item/cell/power_supply = get_cell() if(use_external_power) var/obj/item/cell/external = get_external_power_supply() if(external) @@ -630,15 +631,17 @@ return 0 /obj/item/weldingtool/electric/get_max_fuel() + var/obj/item/cell/power_supply = get_cell() if(use_external_power) var/obj/item/cell/external = get_external_power_supply() if(external) - return external.maxcharge + return external.max_charge else if(power_supply) - return power_supply.maxcharge + return power_supply.max_charge return 0 /obj/item/weldingtool/electric/remove_fuel(var/amount = 1, var/mob/M = null) + var/obj/item/cell/power_supply = get_cell() if(!welding) return 0 if(get_fuel() >= amount) @@ -657,36 +660,6 @@ update_icon() return 0 -/obj/item/weldingtool/electric/attack_hand(mob/user, datum/event_args/actor/clickchain/e_args) - if(user.get_inactive_held_item() == src) - if(power_supply) - power_supply.update_icon() - user.put_in_hands(power_supply) - power_supply = null - to_chat(user, "You remove the cell from the [src].") - setWelding(0) - update_icon() - return - ..() - else - return ..() - -/obj/item/weldingtool/electric/attackby(obj/item/W, mob/user as mob) - if(istype(W, /obj/item/cell)) - if(istype(W, /obj/item/cell/device)) - if(!power_supply) - if(!user.attempt_insert_item_for_installation(W, src)) - return - power_supply = W - to_chat(user, "You install a cell in \the [src].") - update_icon() - else - to_chat(user, "\The [src] already has a cell.") - else - to_chat(user, "\The [src] cannot use that type of cell.") - else - ..() - /obj/item/weldingtool/electric/proc/get_external_power_supply() if(isrobot(src.loc)) var/mob/living/silicon/robot/R = src.loc @@ -701,13 +674,15 @@ return suit.cell return null +/obj/item/weldingtool/electric/unloaded + cell_type = null + /obj/item/weldingtool/electric/mounted use_external_power = 1 /obj/item/weldingtool/electric/mounted/cyborg tool_speed = 0.5 - /obj/item/weldingtool/electric/mounted/RIGset name = "arc welder" tool_speed = 0.7 // Let's see if this works with RIGs diff --git a/code/game/objects/items/tools/wirecutters.dm b/code/game/objects/items/tools/wirecutters.dm index 1d6b6197363..f9c55234ac4 100644 --- a/code/game/objects/items/tools/wirecutters.dm +++ b/code/game/objects/items/tools/wirecutters.dm @@ -8,7 +8,7 @@ icon_state = "cutters" item_state = "cutters" slot_flags = SLOT_BELT - tool_behaviour = TOOL_WIRECUTTER + tool_behavior = TOOL_WIRECUTTER damage_force = 6 throw_speed = 2 throw_range = 9 diff --git a/code/game/objects/items/tools/wrench.dm b/code/game/objects/items/tools/wrench.dm index d39f0ffc5ea..9afc9432436 100644 --- a/code/game/objects/items/tools/wrench.dm +++ b/code/game/objects/items/tools/wrench.dm @@ -8,7 +8,7 @@ icon_state = "wrench" item_state = "wrench" slot_flags = SLOT_BELT - tool_behaviour = TOOL_WRENCH + tool_behavior = TOOL_WRENCH damage_force = 6 throw_force = 7 w_class = WEIGHT_CLASS_SMALL diff --git a/code/game/objects/items/uav.dm b/code/game/objects/items/uav.dm index a8f7bfeba6a..5bb2d5ac793 100644 --- a/code/game/objects/items/uav.dm +++ b/code/game/objects/items/uav.dm @@ -45,7 +45,7 @@ var/no_masters_time = 0 /obj/item/uav/loaded - cell_type = /obj/item/cell/high + cell_type = /obj/item/cell/basic/tier_3/large /obj/item/uav/Initialize(mapload) . = ..() @@ -115,7 +115,7 @@ cell.forceMove(get_turf(src)) cell = null - else if(istype(I, /obj/item/cell) && !cell) + else if(istype(I, /obj/item/cell/medium) && !cell) if(do_after(user, 3 SECONDS, src)) to_chat(user, SPAN_NOTICE("You insert [I] into [nickname].")) playsound(src, 'sound/items/deconstruct.ogg', 50, 1) @@ -262,7 +262,7 @@ return FALSE /obj/item/uav/proc/get_status_string() - return "[nickname] - [get_x(src)],[get_y(src)],[get_z(src)] - I:[health]/[initial(health)] - C:[cell ? "[cell.charge]/[cell.maxcharge]" : "Not Installed"]" + return "[nickname] - [get_x(src)],[get_y(src)],[get_z(src)] - I:[health]/[initial(health)] - C:[cell ? "[cell.charge]/[cell.max_charge]" : "Not Installed"]" /obj/item/uav/proc/add_master(var/mob/living/M) LAZYDISTINCTADD(masters, WEAKREF(M)) diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index af17c5bcdec..0d9fc774f48 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -278,23 +278,16 @@ name = "electric rapid construction device" desc = "A device used to rapidly build and deconstruct. It runs directly off of electricity, no matter cartridges needed." icon_state = "electric_rcd" - var/obj/item/cell/cell = null - var/make_cell = TRUE // If false, initialize() won't spawn a cell for this. + + var/cell_type = /obj/item/cell/basic/tier_1/medium + var/cell_accept = CELL_TYPE_SMALL | CELL_TYPE_WEAPON | CELL_TYPE_MEDIUM + var/electric_cost_coefficient = 83.33 // Higher numbers make it less efficient. 86.3... means it should match the standard RCD capacity on a 10k cell. /obj/item/rcd/electric/Initialize(mapload) - if(make_cell) - cell = new /obj/item/cell/high(src) + init_cell_slot_easy_tool(cell_type, cell_accept) return ..() -/obj/item/rcd/electric/Destroy() - if(cell) - QDEL_NULL(cell) - return ..() - -/obj/item/rcd/electric/get_cell(inducer) - return cell - /obj/item/rcd/electric/can_afford(amount) // This makes it so borgs won't drain their last sliver of charge by mistake, as a bonus. var/obj/item/cell/cell = get_cell() if(cell) @@ -317,12 +310,11 @@ return "It lacks a source of power, and cannot function." - // 'Mounted' RCDs, used for borgs/RIGs/Mechas, all of which use their cells to drive the RCD. /obj/item/rcd/electric/mounted name = "mounted electric rapid construction device" desc = "A device used to rapidly build and deconstruct. It runs directly off of electricity from an external power source." - make_cell = FALSE + cell_type = null /obj/item/rcd/electric/mounted/get_cell(inducer) return get_external_power_supply() diff --git a/code/game/objects/items/weapons/implants/implantcircuits.dm b/code/game/objects/items/weapons/implants/implantcircuits.dm index 6792d6f928a..9a203be3a83 100644 --- a/code/game/objects/items/weapons/implants/implantcircuits.dm +++ b/code/game/objects/items/weapons/implants/implantcircuits.dm @@ -38,7 +38,7 @@ return IC.examine(user) /obj/item/implant/integrated_circuit/attackby(var/obj/item/O, var/mob/user) - if(O.is_crowbar() || istype(O, /obj/item/integrated_electronics) || istype(O, /obj/item/integrated_circuit) || O.is_screwdriver() || istype(O, /obj/item/cell/device) ) + if(O.is_crowbar() || istype(O, /obj/item/integrated_electronics) || istype(O, /obj/item/integrated_circuit) || O.is_screwdriver() || istype(O, /obj/item/cell) ) IC.attackby(O, user) else ..() diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index 1af03f085ce..323e3c69fa3 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -20,16 +20,17 @@ /// Starting cell type var/cell_type + var/cell_accept = CELL_TYPE_SMALL | CELL_TYPE_WEAPON /// Shock stun power - var/stun_power = 60 + var/stun_power = 45 /// Electrocute act flags var/stun_electrocute_flags = ELECTROCUTE_ACT_FLAG_DO_NOT_STUN /// Sound for the stun var/stun_sound = 'sound/weapons/Egloves.ogg' /// Charge cost per hit in cell units - var/charge_cost = 240 + var/charge_cost = POWER_CELL_CAPACITY_WEAPON / 16 /// Are we on? var/active = FALSE @@ -41,13 +42,7 @@ /obj/item/melee/baton/Initialize(mapload) . = ..() - var/datum/object_system/cell_slot/cell_slot = init_cell_slot(cell_type) - cell_slot.legacy_use_device_cells = TRUE - cell_slot.remove_yank_context = TRUE - cell_slot.remove_yank_offhand = TRUE - cell_slot.receive_inducer = TRUE - cell_slot.primary = TRUE - cell_slot.receive_emp = TRUE + init_cell_slot_easy_tool(cell_type, cell_accept) update_icon() /obj/item/melee/baton/object_cell_slot_mutable(mob/user, datum/object_system/cell_slot/slot) @@ -235,11 +230,11 @@ . += SPAN_NOTICE("[src] does not have a power source installed.") /obj/item/melee/baton/loaded - cell_type = /obj/item/cell/device/weapon + cell_type = /obj/item/cell/basic/tier_1/weapon //secborg stun baton module /obj/item/melee/baton/robot - charge_cost = 500 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 10 legacy_use_external_power = TRUE //Makeshift stun baton. Replacement for stun gloves. @@ -251,13 +246,10 @@ damage_force = 3 throw_force = 5 stun_power = 60 //same force as a stunbaton, but uses way more charge. - charge_cost = 2500 + charge_cost = 4000 attack_verb = list("poked") slot_flags = SLOT_BACK - -/obj/item/melee/baton/cattleprod/Initialize(mapload) - . = ..() - obj_cell_slot.legacy_use_device_cells = FALSE + cell_accept = CELL_TYPE_MEDIUM | CELL_TYPE_SMALL | CELL_TYPE_WEAPON /obj/item/melee/baton/cattleprod/attackby(obj/item/W, mob/user) if(istype(W, /obj/item/bluespace_crystal)) @@ -279,7 +271,7 @@ damage_force = 3 throw_force = 5 stun_power = 60 //same force as a stunbaton, but uses way more charge. - charge_cost = 2500 + charge_cost = 4000 attack_verb = list("poked") slot_flags = null @@ -338,7 +330,7 @@ throw_force = 2 stun_power = 120 stun_electrocute_flags = NONE - charge_cost = 1150 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 2 stun_sound = 'sound/effects/lightningshock.ogg' /obj/item/melee/baton/loaded/mini/object_cell_slot_mutable(mob/user, datum/object_system/cell_slot/slot) @@ -376,7 +368,7 @@ damage_tier = 3 // :trol: - cell_type = /obj/item/cell/infinite + cell_type = /obj/item/cell/infinite/weapon /obj/item/melee/baton/electrostaff/Initialize(mapload) . = ..() diff --git a/code/game/objects/items/weapons/tanks/tank_types/shipment.dm b/code/game/objects/items/weapons/tanks/tank_types/shipment.dm index 1fe6669021a..56a8f0ba435 100644 --- a/code/game/objects/items/weapons/tanks/tank_types/shipment.dm +++ b/code/game/objects/items/weapons/tanks/tank_types/shipment.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /** * Used for supply shipments diff --git a/code/game/objects/obj-construction.dm b/code/game/objects/obj-construction.dm index 6b1ec1001e8..8e52690c644 100644 --- a/code/game/objects/obj-construction.dm +++ b/code/game/objects/obj-construction.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// //* Deconstruction *// diff --git a/code/game/objects/obj-interaction.dm b/code/game/objects/obj-interaction.dm index 554dae1c242..d3aa6a80a27 100644 --- a/code/game/objects/obj-interaction.dm +++ b/code/game/objects/obj-interaction.dm @@ -1,17 +1,19 @@ //* This file is explicitly licensed under the MIT license. *// //* Copyright (c) 2025 Citadel Station Developers *// +//* Interaction *// + /obj/using_item_on(obj/item/using, datum/event_args/actor/clickchain/clickchain, clickchain_flags) - if(istype(using, /obj/item/cell) && !isnull(obj_cell_slot) && isnull(obj_cell_slot.cell) && obj_cell_slot.interaction_active(clickchain.performer)) - if(!clickchain.performer.transfer_item_to_loc(using, src)) - clickchain.chat_feedback(SPAN_WARNING("[using] is stuck to your hand!"), target = src) - return CLICKCHAIN_DO_NOT_PROPAGATE + if(istype(using, /obj/item/cell) && obj_cell_slot?.insert_via_usage && isnull(obj_cell_slot.cell) && obj_cell_slot.interaction_active(clickchain.performer)) if(!obj_cell_slot.accepts_cell(using)) clickchain.chat_feedback( SPAN_WARNING("[src] does not accept [using]."), target = src, ) return CLICKCHAIN_DO_NOT_PROPAGATE + if(!clickchain.performer.transfer_item_to_loc(using, src)) + clickchain.chat_feedback(SPAN_WARNING("[using] is stuck to your hand!"), target = src) + return CLICKCHAIN_DO_NOT_PROPAGATE clickchain.visible_dual_feedback( target = src, range_hard = obj_cell_slot.remove_is_discrete? 0 : MESSAGE_RANGE_CONSTRUCTION, @@ -19,8 +21,9 @@ audible_hard = SPAN_NOTICE("You hear something being slotted in."), visible_self = SPAN_NOTICE("You insert [using] into [src]."), ) - obj_cell_slot.insert_cell(using) + obj_cell_slot.user_insert_cell(using, actor = clickchain) clickchain.performer.trigger_aiming(TARGET_CAN_CLICK) + log_construction(clickchain, src, "inserted cell [obj_cell_slot.cell] ([obj_cell_slot.cell.type])") return CLICKCHAIN_DO_NOT_PROPAGATE | CLICKCHAIN_DID_SOMETHING if(!isnull(obj_storage) && using.allow_auto_storage_insert(clickchain, obj_storage) && obj_storage?.auto_handle_interacted_insertion(using, clickchain)) clickchain.performer.trigger_aiming(TARGET_CAN_CLICK) @@ -40,5 +43,171 @@ visible_self = SPAN_NOTICE("You remove the cell from [src]."), ) log_construction(clickchain, src, "removed cell [obj_cell_slot.cell] ([obj_cell_slot.cell.type])") - clickchain.performer.put_in_hands_or_drop(obj_cell_slot.remove_cell(clickchain.performer)) + clickchain.performer.put_in_hands_or_drop(obj_cell_slot.user_remove_cell(clickchain.performer, actor = clickchain)) return CLICKCHAIN_DID_SOMETHING + +/obj/tool_act(obj/item/I, datum/event_args/actor/clickchain/e_args, function, flags, hint) + . = ..() + if(. & CLICKCHAIN_FLAGS_INTERACT_ABORT) + return + if(obj_cell_slot?.remove_tool_behavior == function) + if(!obj_cell_slot.interaction_active(e_args.performer)) + return TRUE + if(!CHECK_MOBILITY(e_args.performer, MOBILITY_CAN_USE)) + e_args.initiator.action_feedback(SPAN_WARNING("You can't do that right now!"), src) + return TRUE + if(isnull(obj_cell_slot.cell)) + e_args.initiator.action_feedback(SPAN_WARNING("[src] doesn't have a cell installed.")) + return TRUE + if(!I.tool_check(obj_cell_slot.remove_tool_behavior, e_args, src, NONE, NONE)) + e_args.chat_feedback( + SPAN_WARNING("You need to be holding some kind of [tool_behavior_name(obj_cell_slot.remove_tool_behavior)] in your active hand to remove [src]'s cell."), + target = src, + ) + return TRUE + if(!use_tool(obj_cell_slot.remove_tool_behavior, I, e_args, NONE, obj_cell_slot.remove_tool_time)) + return TRUE + e_args.visible_feedback( + target = src, + range = obj_cell_slot.remove_is_discrete? 0 : MESSAGE_RANGE_CONSTRUCTION, + visible = SPAN_NOTICE("[e_args.performer] removes the cell from [src]."), + audible = SPAN_NOTICE("You hear fasteners falling out and something being removed."), + otherwise_self = SPAN_NOTICE("You remove the cell from [src]."), + ) + log_construction(e_args, src, "removed cell [obj_cell_slot.cell] ([obj_cell_slot.cell.type])") + var/obj/item/cell/removed = obj_cell_slot.user_remove_cell(src, actor = e_args) + if(e_args.performer.Reachability(src)) + e_args.performer.put_in_hands_or_drop(removed) + else + removed.forceMove(drop_location()) + return TRUE + +//* Context *// + +/obj/context_menu_query(datum/event_args/actor/e_args) + . = ..() + if(obj_cell_slot) + if(obj_cell_slot.cell) + if((obj_cell_slot.remove_yank_context || obj_cell_slot.remove_tool_context) && obj_cell_slot.interaction_active(e_args.performer)) + var/image/rendered = image(obj_cell_slot.cell) + .["obj_cell_slot-remove"] = create_context_menu_tuple("remove cell", rendered, mobility = MOBILITY_CAN_USE, defaultable = TRUE) + else + if(obj_cell_slot.insert_via_context && obj_cell_slot.interaction_active(e_args.performer)) + // TODO: proper image + var/image/rendered = image(src) + .["obj_cell_slot-insert"] = create_context_menu_tuple("insert cell", rendered, mobility = MOBILITY_CAN_USE, defaultable = TRUE) + if(obj_storage?.allow_open_via_context_click) + var/image/rendered = image(src) + .["obj_storage"] = create_context_menu_tuple("open storage", rendered, mobility = MOBILITY_CAN_STORAGE, defaultable = TRUE) + if(obj_rotation_flags & OBJ_ROTATION_ENABLED) + if(obj_rotation_flags & OBJ_ROTATION_BIDIRECTIONAL) + var/image/rendered = image(src) // todo: sprite + .["rotate_cw"] = create_context_menu_tuple( + "Rotate Clockwise", + rendered, + 1, + MOBILITY_CAN_USE, + !!(obj_rotation_flags & OBJ_ROTATION_DEFAULTING), + ) + rendered = image(src) // todo: sprite + .["rotate_ccw"] = create_context_menu_tuple( + "Rotate Counterclockwise", + rendered, + 1, + MOBILITY_CAN_USE, + !!(obj_rotation_flags & OBJ_ROTATION_DEFAULTING), + ) + else + var/image/rendered = image(src) // todo: sprite + .["rotate_[obj_rotation_flags & OBJ_ROTATION_CCW? "ccw" : "cw"]"] = create_context_menu_tuple( + "Rotate [obj_rotation_flags & OBJ_ROTATION_CCW? "Counterclockwise" : "Clockwise"]", + rendered, + 1, + MOBILITY_CAN_USE, + !!(obj_rotation_flags & OBJ_ROTATION_DEFAULTING), + ) + +/obj/context_menu_act(datum/event_args/actor/e_args, key) + switch(key) + if("obj_cell_slot-insert") + var/reachability = e_args.performer.Reachability(src) + if(!reachability) + return TRUE + if(!obj_cell_slot.interaction_active(e_args.performer)) + return TRUE + if(!CHECK_MOBILITY(e_args.performer, MOBILITY_CAN_USE)) + e_args.initiator.action_feedback(SPAN_WARNING("You can't do that right now!"), src) + return TRUE + if(obj_cell_slot.cell) + e_args.initiator.action_feedback(SPAN_WARNING("[src] already has a cell installed.")) + return TRUE + var/obj/item/cell/cell = e_args.performer.get_active_held_item() + if(!istype(cell)) + e_args.chat_feedback( + SPAN_WARNING("You must be holding a cell in your active hand to insert it into [src]."), + target = src, + ) + return TRUE + if(!e_args.performer.transfer_item_to_loc(cell, src)) + e_args.chat_feedback( + SPAN_WARNING("[cell] is stuck to your hand!"), + target = src, + ) + return TRUE + obj_cell_slot.user_insert_cell(cell, actor = e_args) + e_args.visible_feedback( + target = src, + range = obj_cell_slot.remove_is_discrete? 0 : MESSAGE_RANGE_CONSTRUCTION, + visible = SPAN_NOTICE("[e_args.performer] inserts [cell] into [src]."), + audible = SPAN_NOTICE("You hear something clicking into place and fasteners being secured."), + otherwise_self = SPAN_NOTICE("You remove insert [cell] into [src]."), + ) + log_construction(e_args, src, "inserted cell [obj_cell_slot.cell] ([obj_cell_slot.cell.type])") + return TRUE + if("obj_cell_slot-remove") + var/reachability = e_args.performer.Reachability(src) + if(!reachability) + return TRUE + if(!obj_cell_slot.interaction_active(e_args.performer)) + return TRUE + if(!CHECK_MOBILITY(e_args.performer, MOBILITY_CAN_USE)) + e_args.initiator.action_feedback(SPAN_WARNING("You can't do that right now!"), src) + return TRUE + if(isnull(obj_cell_slot.cell)) + e_args.initiator.action_feedback(SPAN_WARNING("[src] doesn't have a cell installed.")) + return TRUE + if(obj_cell_slot.remove_tool_behavior) + var/obj/item/held = e_args.performer.get_active_held_item() + if(!held?.tool_check(obj_cell_slot.remove_tool_behavior, e_args, src, NONE, NONE)) + e_args.chat_feedback( + SPAN_WARNING("You need to be holding some kind of [tool_behavior_name(obj_cell_slot.remove_tool_behavior)] in your active hand to remove [src]'s cell."), + target = src, + ) + return TRUE + if(!use_tool(obj_cell_slot.remove_tool_behavior, held, e_args, NONE, obj_cell_slot.remove_tool_time)) + return TRUE + e_args.visible_feedback( + target = src, + range = obj_cell_slot.remove_is_discrete? 0 : MESSAGE_RANGE_CONSTRUCTION, + visible = SPAN_NOTICE("[e_args.performer] removes the cell from [src]."), + audible = SPAN_NOTICE("You hear fasteners falling out and something being removed."), + otherwise_self = SPAN_NOTICE("You remove the cell from [src]."), + ) + log_construction(e_args, src, "removed cell [obj_cell_slot.cell] ([obj_cell_slot.cell.type])") + var/obj/item/cell/removed = obj_cell_slot.user_remove_cell(src, actor = e_args) + if(reachability == REACH_PHYSICAL) + e_args.performer.put_in_hands_or_drop(removed) + else + removed.forceMove(drop_location()) + return TRUE + if("obj_storage") + var/reachability = e_args.performer.Reachability(src) + if(!reachability) + return TRUE + obj_storage?.auto_handle_interacted_open(e_args) + return TRUE + if("rotate_cw", "rotate_ccw") + var/clockwise = key == "rotate_cw" + handle_rotation(e_args, clockwise) + return TRUE + return ..() diff --git a/code/game/objects/obj.dm b/code/game/objects/obj.dm index 757beac2f07..4f3ced0a35a 100644 --- a/code/game/objects/obj.dm +++ b/code/game/objects/obj.dm @@ -119,8 +119,8 @@ /// ! This is what determines what constraints are used by the material parts system. /// * Use null if something doesn't use material parts system, or if something uses the abstraction API to implement material parts themselves. /// * This var should never be changed from a list to a normal value or vice versa at runtime, again, like material_parts - /// * as it is closely linked to material_parts - var/list/material_constraints = null + /// as it is closely linked to material_parts + var/tmp/list/material_constraints = null /// material costs - lets us track the costs of what we're made of. /// this is either a lazy key-value list of material keys to cost in cm3, /// or a single number. @@ -129,10 +129,11 @@ /// * This may use typepath keys at compile time, but is immediately converted to material IDs on boot. /// * This should still be set even if you are implementing material_parts yourself! // todo: abstraction API for this when we need it. - var/list/material_costs + var/tmp/list/material_costs /// material part considered primary. - var/material_primary + var/tmp/material_primary /// make the actual materials multiplied by this amount. used by lathes to prevent duping with efficiency upgrades. + /// * checked in get_materials(). var/material_multiplier = 1 //* Persistence *// @@ -225,24 +226,24 @@ . = ..() // cache base materials if it's not modified if(!isnull(materials_base) && !(obj_flags & OBJ_MATERIALS_MODIFIED)) - if(has_typelist(materials_base)) - materials_base = get_typelist(materials_base) + if(has_typelist(NAMEOF(src, materials_base))) + materials_base = get_typelist(NAMEOF(src, materials_base)) else // preprocess materials_base = SSmaterials.preprocess_kv_keys_to_ids(materials_base) materials_base = typelist(NAMEOF(src, materials_base), materials_base) // cache material costs if it's not modified if(islist(material_costs)) - if(has_typelist(material_costs)) - material_costs = get_typelist(material_costs) + if(has_typelist(NAMEOF(src, material_costs))) + material_costs = get_typelist(NAMEOF(src, material_costs)) else // preprocess material_costs = SSmaterials.preprocess_kv_keys_to_ids(material_costs) material_costs = typelist(NAMEOF(src, material_costs), material_costs) // cache material constraints if it's not modified if(islist(material_constraints)) - if(has_typelist(material_constraints)) - material_constraints = get_typelist(material_constraints) + if(has_typelist(NAMEOF(src, material_constraints))) + material_constraints = get_typelist(NAMEOF(src, material_constraints)) else material_constraints = typelist(NAMEOF(src, material_constraints), material_constraints) @@ -666,84 +667,6 @@ return "#ffffff" return coloration -//* Context *// - -/obj/context_menu_query(datum/event_args/actor/e_args) - . = ..() - if(!isnull(obj_cell_slot?.cell) && obj_cell_slot.remove_yank_context && obj_cell_slot.interaction_active(e_args.performer)) - var/image/rendered = image(obj_cell_slot.cell) - .["obj_cell_slot"] = create_context_menu_tuple("remove cell", rendered, mobility = MOBILITY_CAN_USE, defaultable = TRUE) - if(obj_storage?.allow_open_via_context_click) - var/image/rendered = image(src) - .["obj_storage"] = create_context_menu_tuple("open storage", rendered, mobility = MOBILITY_CAN_STORAGE, defaultable = TRUE) - if(obj_rotation_flags & OBJ_ROTATION_ENABLED) - if(obj_rotation_flags & OBJ_ROTATION_BIDIRECTIONAL) - var/image/rendered = image(src) // todo: sprite - .["rotate_cw"] = create_context_menu_tuple( - "Rotate Clockwise", - rendered, - 1, - MOBILITY_CAN_USE, - !!(obj_rotation_flags & OBJ_ROTATION_DEFAULTING), - ) - rendered = image(src) // todo: sprite - .["rotate_ccw"] = create_context_menu_tuple( - "Rotate Counterclockwise", - rendered, - 1, - MOBILITY_CAN_USE, - !!(obj_rotation_flags & OBJ_ROTATION_DEFAULTING), - ) - else - var/image/rendered = image(src) // todo: sprite - .["rotate_[obj_rotation_flags & OBJ_ROTATION_CCW? "ccw" : "cw"]"] = create_context_menu_tuple( - "Rotate [obj_rotation_flags & OBJ_ROTATION_CCW? "Counterclockwise" : "Clockwise"]", - rendered, - 1, - MOBILITY_CAN_USE, - !!(obj_rotation_flags & OBJ_ROTATION_DEFAULTING), - ) - -/obj/context_menu_act(datum/event_args/actor/e_args, key) - switch(key) - if("obj_cell_slot") - var/reachability = e_args.performer.Reachability(src) - if(!reachability) - return TRUE - if(!CHECK_MOBILITY(e_args.performer, MOBILITY_CAN_USE)) - e_args.initiator.action_feedback(SPAN_WARNING("You can't do that right now!"), src) - return TRUE - if(isnull(obj_cell_slot.cell)) - e_args.initiator.action_feedback(SPAN_WARNING("[src] doesn't have a cell installed.")) - return TRUE - if(!obj_cell_slot.interaction_active(e_args.performer)) - return TRUE - e_args.visible_feedback( - target = src, - range = obj_cell_slot.remove_is_discrete? 0 : MESSAGE_RANGE_CONSTRUCTION, - visible = SPAN_NOTICE("[e_args.performer] removes the cell from [src]."), - audible = SPAN_NOTICE("You hear fasteners falling out and something being removed."), - otherwise_self = SPAN_NOTICE("You remove the cell from [src]."), - ) - log_construction(e_args, src, "removed cell [obj_cell_slot.cell] ([obj_cell_slot.cell.type])") - var/obj/item/cell/removed = obj_cell_slot.remove_cell(src) - if(reachability == REACH_PHYSICAL) - e_args.performer.put_in_hands_or_drop(removed) - else - removed.forceMove(drop_location()) - return TRUE - if("obj_storage") - var/reachability = e_args.performer.Reachability(src) - if(!reachability) - return TRUE - obj_storage?.auto_handle_interacted_open(e_args) - return TRUE - if("rotate_cw", "rotate_ccw") - var/clockwise = key == "rotate_cw" - handle_rotation(e_args, clockwise) - return TRUE - return ..() - //* EMP *// /obj/emp_act(severity) diff --git a/code/game/objects/random/maintenance.dm b/code/game/objects/random/maintenance.dm index ba46933ca03..2779cda1d29 100644 --- a/code/game/objects/random/maintenance.dm +++ b/code/game/objects/random/maintenance.dm @@ -37,10 +37,18 @@ something, make sure it's not in one of the other lists.*/ prob(1);/obj/item/flashlight/glowstick/red, prob(1);/obj/item/flashlight/glowstick/yellow, prob(1);/obj/item/flashlight/pen, - prob(4);/obj/item/cell, - prob(4);/obj/item/cell/device, - prob(3);/obj/item/cell/high, - prob(2);/obj/item/cell/super, + prob(4);/obj/item/cell/basic/tier_1/weapon, + prob(2);/obj/item/cell/basic/tier_1/small, + prob(3);/obj/item/cell/basic/tier_1/medium, + prob(2);/obj/item/cell/basic/tier_1/large, + prob(4);/obj/item/cell/basic/tier_2/weapon, + prob(2);/obj/item/cell/basic/tier_2/small, + prob(3);/obj/item/cell/basic/tier_2/medium, + prob(2);/obj/item/cell/basic/tier_2/large, + prob(4);/obj/item/cell/basic/tier_3/weapon, + prob(2);/obj/item/cell/basic/tier_3/small, + prob(3);/obj/item/cell/basic/tier_3/medium, + prob(2);/obj/item/cell/basic/tier_3/large, prob(5);/obj/random/cigarettes, prob(3);/obj/item/clothing/mask/gas, prob(2);/obj/item/clothing/mask/gas/half, @@ -120,7 +128,7 @@ something, make sure it's not in one of the other lists.*/ return pick(prob(320);/obj/random/maintenance/clean, prob(2);/obj/item/flashlight/maglight, prob(2);/obj/item/flash, - prob(1);/obj/item/cell/device/weapon, + prob(1);/obj/item/cell/basic/tier_1/weapon, prob(1);/obj/item/clothing/mask/gas/swat, prob(1);/obj/item/clothing/mask/gas/syndicate, prob(2);/obj/item/clothing/mask/balaclava, @@ -256,7 +264,7 @@ something, make sure it's not in one of the other lists.*/ prob(3);/obj/item/plant_analyzer, prob(1);/obj/item/flash/synthetic, prob(2);/obj/item/bucket_sensor, - prob(1);/obj/item/cell/device/weapon, + prob(1);/obj/item/cell/basic/tier_1/weapon, prob(5);/obj/item/storage/backpack/toxins, prob(5);/obj/item/storage/backpack/satchel/tox, prob(5);/obj/item/storage/backpack/messenger/tox, diff --git a/code/game/objects/random/mapping.dm b/code/game/objects/random/mapping.dm index d23d084412f..e76317adb34 100644 --- a/code/game/objects/random/mapping.dm +++ b/code/game/objects/random/mapping.dm @@ -236,8 +236,8 @@ prob(2);list( /obj/item/melee/baton/cattleprod, /obj/item/melee/baton/cattleprod, - /obj/item/cell/high, - /obj/item/cell/high, + /obj/item/cell/basic/tier_1/medium, + /obj/item/cell/basic/tier_1/medium, /obj/structure/closet/crate ), prob(2);list( @@ -570,7 +570,7 @@ /obj/item/module/power_control, /obj/item/stack/cable_coil, /obj/item/frame2/apc, - /obj/item/cell/high, + /obj/item/cell/basic/tier_1/large, /obj/structure/closet/crate/corporate/focalpoint //FOCAL APC ), prob(5);list( @@ -808,16 +808,16 @@ prob(2);list( /obj/random/energy, /obj/random/energy, - /obj/item/cell/device/weapon, - /obj/item/cell/device/weapon, - /obj/item/cell/device/weapon, - /obj/item/cell/device/weapon, + /obj/item/cell/basic/tier_1/weapon, + /obj/item/cell/basic/tier_1/weapon, + /obj/item/cell/basic/tier_1/weapon, + /obj/item/cell/basic/tier_1/weapon, /obj/random/energy, /obj/random/energy, - /obj/item/cell/device/weapon, - /obj/item/cell/device/weapon, - /obj/item/cell/device/weapon, - /obj/item/cell/device/weapon, + /obj/item/cell/basic/tier_1/weapon, + /obj/item/cell/basic/tier_1/weapon, + /obj/item/cell/basic/tier_1/weapon, + /obj/item/cell/basic/tier_1/weapon, /obj/structure/closet/crate/large/secure/corporate/heph //HEPH ENERGY ), prob(2);list( diff --git a/code/game/objects/random/misc.dm b/code/game/objects/random/misc.dm index 97dc86d8cd5..678799a589f 100644 --- a/code/game/objects/random/misc.dm +++ b/code/game/objects/random/misc.dm @@ -98,11 +98,12 @@ icon_state = "cell" /obj/random/powercell/item_to_spawn() - return pick(prob(40);/obj/item/cell, - prob(25);/obj/item/cell/device, - prob(25);/obj/item/cell/high, - prob(9);/obj/item/cell/super, - prob(1);/obj/item/cell/hyper) + // TODO: just make power cell loot packs ughh + return pick(prob(40);/obj/item/cell/basic/tier_1/medium, + prob(25);/obj/item/cell/basic/tier_2/weapon, + prob(25);/obj/item/cell/basic/tier_2/medium, + prob(9);/obj/item/cell/basic/tier_3/large, + prob(1);/obj/item/cell/basic/tier_4/large) /obj/random/bomb_supply @@ -907,7 +908,7 @@ prob(3);/obj/item/ammo_magazine/a44/speedloader, prob(3);/obj/item/ammo_magazine/a7_62mm, prob(3);/obj/item/ammo_magazine/a5_56mm, - prob(3);/obj/item/cell/device/weapon, + prob(3);/obj/item/cell/basic/tier_2/weapon, prob(2);/obj/item/ammo_magazine/a44, prob(2);/obj/item/ammo_magazine/a357/speedloader, prob(2);/obj/item/ammo_magazine/a7_62mm, diff --git a/code/game/objects/structures/crates_lockers/closets/malfunction.dm b/code/game/objects/structures/crates_lockers/closets/malfunction.dm index e3d83c9a828..fec69be6e9e 100644 --- a/code/game/objects/structures/crates_lockers/closets/malfunction.dm +++ b/code/game/objects/structures/crates_lockers/closets/malfunction.dm @@ -10,5 +10,6 @@ /obj/item/clothing/head/helmet/space/void, /obj/item/clothing/suit/space/void, /obj/item/tool/crowbar, - /obj/item/cell, - /obj/item/multitool) + /obj/item/cell/basic/tier_2/medium, + /obj/item/multitool, + ) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/explorer.dm b/code/game/objects/structures/crates_lockers/closets/secure/explorer.dm index ce4ce245aa8..61a250ad848 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/explorer.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/explorer.dm @@ -17,7 +17,8 @@ /obj/item/gps/explorer, /obj/item/storage/box/flare, /obj/item/geiger_counter, - /obj/item/cell/device, + /obj/item/cell/basic/tier_2/small, + /obj/item/cell/basic/tier_2/weapon, /obj/item/radio, /obj/item/stack/marker_beacon/thirty, /obj/item/storage/box/survival_knife, @@ -104,7 +105,8 @@ /obj/item/storage/box/flare, /obj/item/gun/projectile/ballistic/shotgun/flare/explo, /obj/item/storage/box/flashshells, - /obj/item/cell/device, + /obj/item/cell/basic/tier_2/small, + /obj/item/cell/basic/tier_2/weapon, /obj/item/radio, /obj/item/gps/explorer, /obj/item/cataloguer/compact, @@ -139,7 +141,8 @@ /obj/item/storage/box/flare, /obj/item/storage/box/explorerkeys, /obj/item/geiger_counter, - /obj/item/cell/device, + /obj/item/cell/basic/tier_2/small, + /obj/item/cell/basic/tier_2/weapon, /obj/item/radio, /obj/item/stack/marker_beacon/thirty, /obj/item/storage/box/survival_knife, diff --git a/code/game/objects/structures/crates_lockers/closets/secure/guncabinet.dm b/code/game/objects/structures/crates_lockers/closets/secure/guncabinet.dm index fa559ab4bc5..1686ff099ef 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/guncabinet.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/guncabinet.dm @@ -84,7 +84,7 @@ starts_with = list( /obj/item/gun/projectile/energy/phasegun = 2, - /obj/item/cell/device/weapon = 2, + /obj/item/cell/basic/tier_1/weapon = 2, /obj/item/clothing/accessory/permit/gun/planetside) /obj/structure/closet/secure_closet/guncabinet/robotics diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm index bf30b90cf11..9fd52352256 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -202,7 +202,7 @@ /obj/item/reagent_containers/spray/pepper, /obj/item/melee/baton/loaded, /obj/item/gun/projectile/energy/gun, - /obj/item/cell/device/weapon, + /obj/item/cell/basic/tier_2/weapon, /obj/item/storage/box/holobadge, /obj/item/clothing/head/beret/sec/corporate/warden, /obj/item/clothing/suit/storage/hooded/wintercoat/security, @@ -250,7 +250,7 @@ /obj/item/clothing/head/soft/sec/corp, /obj/item/clothing/under/rank/security/corp, /obj/item/gun/projectile/energy/secutor, - /obj/item/cell/device/weapon, + /obj/item/cell/basic/tier_2/weapon, /obj/item/gps/security, /obj/item/clothing/under/bodysuit/bodysuitsec, /obj/item/clothing/suit/storage/hooded/wintercoat/security, @@ -401,7 +401,7 @@ GLOBAL_LIST_BOILERPLATE(all_brig_closets, /obj/structure/closet/secure_closet/br /obj/item/flashlight/flare, /obj/item/clothing/accessory/storage/black_vest, /obj/item/gun/projectile/energy/secutor, - /obj/item/cell/device/weapon, + /obj/item/cell/basic/tier_2/weapon, /obj/item/flashlight/maglight, /obj/item/clothing/head/soft/nanotrasen, /obj/item/clothing/head/beret/nanotrasen, @@ -450,7 +450,7 @@ GLOBAL_LIST_BOILERPLATE(all_brig_closets, /obj/structure/closet/secure_closet/br /obj/item/flash, /obj/item/melee/baton/loaded, /obj/item/gun/projectile/energy/gun, - /obj/item/cell/device/weapon, + /obj/item/cell/basic/tier_2/weapon, /obj/item/clothing/accessory/holster/waist, /obj/item/melee/telebaton, /obj/item/clothing/head/beret/sec/corporate/hos, @@ -492,7 +492,7 @@ GLOBAL_LIST_BOILERPLATE(all_brig_closets, /obj/structure/closet/secure_closet/br /obj/item/reagent_containers/spray/pepper, /obj/item/melee/baton/loaded, /obj/item/gun/projectile/energy/gun, - /obj/item/cell/device/weapon, + /obj/item/cell/basic/tier_2/weapon, /obj/item/storage/box/holobadge, /obj/item/clothing/head/beret/sec/corporate/warden, /obj/item/flashlight/maglight, diff --git a/code/game/objects/structures/crates_lockers/closets/syndicate.dm b/code/game/objects/structures/crates_lockers/closets/syndicate.dm index 8dc8e34b857..c713d90aa24 100644 --- a/code/game/objects/structures/crates_lockers/closets/syndicate.dm +++ b/code/game/objects/structures/crates_lockers/closets/syndicate.dm @@ -13,7 +13,8 @@ /obj/item/clothing/head/helmet/space/void/merc, /obj/item/clothing/suit/space/void/merc, /obj/item/tool/crowbar/red, - /obj/item/cell/high, + /obj/item/cell/basic/tier_4/medium, + /obj/item/cell/basic/tier_4/weapon, /obj/item/card/id/syndicate, /obj/item/multitool, /obj/item/shield/transforming/energy, diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index 5a00fe85d13..c06d3ef6da3 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -567,7 +567,8 @@ /obj/item/stack/material/plasteel = 10, /obj/item/stack/material/steel/full_stack = 5, /obj/fiftyspawner/glass = 4, - /obj/item/cell/high = 4, + /obj/item/cell/basic/tier_1/medium = 4, + /obj/item/cell/basic/tier_1/large = 4, /obj/item/stack/cable_coil = 2, /obj/item/flash/synthetic = 8, /obj/item/healthanalyzer = 4, diff --git a/code/game/objects/structures/loot_piles.dm b/code/game/objects/structures/loot_piles.dm index 741009ab4a9..d447a055440 100644 --- a/code/game/objects/structures/loot_piles.dm +++ b/code/game/objects/structures/loot_piles.dm @@ -144,8 +144,8 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh /obj/item/flashlight/glowstick/red, /obj/item/flashlight/glowstick/yellow, /obj/item/flashlight/pen, - /obj/item/cell, - /obj/item/cell/device, + /obj/item/cell/basic/tier_1/weapon, + /obj/item/cell/basic/tier_1/medium, /obj/item/clothing/mask/gas, /obj/item/clothing/mask/gas/half, /obj/item/clothing/mask/breath, @@ -370,9 +370,10 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh /obj/item/frame, /obj/item/broken_device/random, /obj/item/borg/upgrade/restart, - /obj/item/cell, - /obj/item/cell/high, - /obj/item/cell/device, + /obj/item/cell/basic/tier_2/weapon, + /obj/item/cell/basic/tier_2/medium, + /obj/item/cell/basic/tier_2/small, + /obj/item/cell/basic/tier_2/large, /obj/item/circuitboard/broken, /obj/item/circuitboard/arcade, /obj/item/circuitboard/machine/lathe/autolathe, @@ -414,8 +415,9 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh ) uncommon_loot = list( - /obj/item/cell/super, - /obj/item/cell/device/weapon, + /obj/item/cell/basic/tier_3/medium, + /obj/item/cell/basic/tier_3/weapon, + /obj/item/cell/basic/tier_3/large, /obj/item/circuitboard/security, /obj/item/circuitboard/crew, /obj/item/aiModule/reset, @@ -446,7 +448,7 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh ) very_rare_loot = list( - /obj/item/cell/hyper, + /obj/item/cell/basic/tier_4/medium, /obj/item/aiModule/freeform, /obj/item/aiModule/asimov, /obj/item/aiModule/paladin, @@ -509,7 +511,7 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh // May contain powercells or alien weaponry. /obj/structure/loot_pile/surface/alien/security uncommon_loot = list( - /obj/item/cell/device/weapon/recharge/alien, + /obj/item/cell/regen/fractal/weapon, /obj/item/clothing/suit/armor/alien, /obj/item/clothing/head/helmet/alien ) @@ -539,7 +541,7 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh /obj/item/surgical/retractor/alien, /obj/item/surgical/scalpel/alien, /obj/item/surgical/surgicaldrill/alien, - /obj/item/cell/device/weapon/recharge/alien, + /obj/item/cell/regen/fractal/weapon, /obj/item/clothing/suit/armor/alien, /obj/item/clothing/head/helmet/alien, /obj/item/gun/projectile/energy/alien @@ -1110,12 +1112,14 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh /obj/item/stack/material/steel{amount = 25}, /obj/item/stack/material/glass{amount = 10}, /obj/item/stack/material/plasteel{amount = 5}, - /obj/item/cell, + /obj/item/cell/basic/tier_3/large, + /obj/item/cell/basic/tier_2/large, + /obj/item/cell/basic/tier_4/medium, /obj/item/material/shard ) uncommon_loot = list( - /obj/item/cell/high, + /obj/item/cell/basic/tier_2/medium, /obj/item/robot_parts/robot_component/actuator, /obj/item/robot_parts/robot_component/armour, /obj/item/robot_parts/robot_component/binary_communication_device, @@ -1125,7 +1129,7 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh ) rare_loot = list( - /obj/item/cell/super, + /obj/item/cell/basic/tier_3/medium, /obj/item/borg/upgrade/restart, /obj/item/borg/upgrade/jetpack, /obj/item/borg/upgrade/tasercooler, diff --git a/code/game/objects/structures/props/alien_props.dm b/code/game/objects/structures/props/alien_props.dm index 15ec33c15b2..33fa251c444 100644 --- a/code/game/objects/structures/props/alien_props.dm +++ b/code/game/objects/structures/props/alien_props.dm @@ -74,6 +74,19 @@ ) value = CATALOGUER_REWARD_MEDIUM +/datum/category_item/catalogue/anomalous/precursor_a/alien_void_cell + name = "Precursor Alpha Object - Void Cell" + desc = "This is a very enigmatic and small machine. It is able to output a direct electrical current \ + from itself to another device or machine that it is connected to. Its shape has a similar form as \ + a battery cell, which might imply that the species who created these had a desire for some form of \ + a modular power supply.\ +

\ + These appear to be limited in throughput, only able to put out so much energy at a time. It is unknown \ + if this was intentional, or was a design constraint that the creators of this object had to work around. \ + Regardless, it will likely function inside of various devices which run off of conventional power cells.\ +

\ + Scanning similar objects may yield more information." + value = CATALOGUER_REWARD_EASY /datum/category_item/catalogue/anomalous/precursor_a/alien_void_core name = "Precursor Alpha Object - Void Core" diff --git a/code/game/objects/structures/trash_pile.dm b/code/game/objects/structures/trash_pile.dm index 58f005af01f..d068607a24d 100644 --- a/code/game/objects/structures/trash_pile.dm +++ b/code/game/objects/structures/trash_pile.dm @@ -145,8 +145,10 @@ prob(4);/obj/item/clothing/suit/storage/hazardvest, prob(4);/obj/item/clothing/under/color/grey, prob(4);/obj/item/caution, - prob(4);/obj/item/cell, - prob(4);/obj/item/cell/device, + prob(4);/obj/item/cell/basic/tier_1/small, + prob(4);/obj/item/cell/basic/tier_1/weapon, + prob(4);/obj/item/cell/basic/tier_1/medium, + prob(4);/obj/item/cell/basic/tier_1/large, prob(4);/obj/item/reagent_containers/food/snacks/liquid, prob(4);/obj/item/spacecash/c1, prob(4);/obj/item/storage/backpack/satchel, @@ -168,7 +170,7 @@ prob(3);/obj/item/radio/headset, prob(3);/obj/item/camera_assembly, prob(3);/obj/item/clothing/head/cone, - prob(3);/obj/item/cell/high, + prob(3);/obj/item/cell/basic/tier_2/medium, prob(3);/obj/item/spacecash/c10, prob(3);/obj/item/spacecash/c20, prob(3);/obj/item/storage/backpack/dufflebag, @@ -188,7 +190,9 @@ prob(2);/obj/item/flashlight/glowstick, prob(2);/obj/item/flashlight/glowstick/blue, prob(2);/obj/item/card/emag_broken, - prob(2);/obj/item/cell/super, + prob(2);/obj/item/cell/basic/tier_3/small, + prob(2);/obj/item/cell/basic/tier_3/medium, + prob(2);/obj/item/cell/basic/tier_2/large, prob(2);/obj/item/poster, prob(2);/obj/item/reagent_containers/glass/rag, prob(2);/obj/item/storage/box/sinpockets, @@ -248,7 +252,7 @@ // prob(1);/obj/item/sleevemate, // prob(1);/obj/item/bodysnatcher, prob(1);/obj/item/beartrap, - prob(1);/obj/item/cell/hyper/empty, + prob(1);/obj/item/cell/basic/tier_4/medium, prob(1);/obj/item/disk/nifsoft/compliance, prob(1);/obj/item/material/knife/tacknife, prob(1);/obj/item/clothing/accessory/storage/brown_vest, diff --git a/code/game/objects/systems/cell_slot.dm b/code/game/objects/systems/cell_slot.dm index 6c8aad67998..a05c580e85c 100644 --- a/code/game/objects/systems/cell_slot.dm +++ b/code/game/objects/systems/cell_slot.dm @@ -5,21 +5,19 @@ * cell slot */ /datum/object_system/cell_slot + //* State *// /// held cell var/obj/item/cell/cell - /// reserved - cell type accepted enum, for when we do large/medium/small/etc cells later. - var/cell_type - /// considered primary? if so, we get returned on get_cell() - var/primary = TRUE + //* Config - Interaction *// - /// allow inducer? - var/receive_inducer = FALSE - /// allow EMPs to hit? - var/receive_emp = FALSE - /// allow explosions to hit cell? - // todo: currently unused; probably kill this eventually - var/recieve_explosion = FALSE + /// allow insertion via context menu + var/insert_via_context = FALSE + /// allow insertion via click + var/insert_via_usage = FALSE + /// insertion time + // TODO: impl + var/insert_time = 0 /// allow quick removal by clicking with hand? var/remove_yank_offhand = FALSE @@ -28,19 +26,45 @@ /// allow quick removal by using in hand? var/remove_yank_inhand = FALSE /// no-tool time for removal, if any + // TODO: impl var/remove_yank_time = 0 - /// tool behavior for removal, if any + /// tool behavior for removal, if any var/remove_tool_behavior = null /// tool time for removal, if any var/remove_tool_time = 0 + /// allow remove hooks in tool act + var/remove_tool_usage = FALSE + /// allow remove hooks in context menu for tooled removal + var/remove_tool_context = FALSE /// removal / insertion is discrete or loud var/remove_is_discrete = TRUE - /// legacy - // todo: kill this - var/legacy_use_device_cells = FALSE + //* Config - Defense *// + /// allow EMPs to hit? + var/receive_emp = FALSE + /// allow explosions to hit cell? + // todo: currently unused + var/recieve_explosion = FALSE + + //* Config - Integration *// + /// allow inducer? + var/receive_inducer = FALSE + /// considered primary? if so, we get returned on get_cell() + var/primary = TRUE + + //* Config - Cell Accept *// + /// cell types accepted + var/cell_type = NONE + + //* Config - Sound *// + var/insert_sound = 'sound/weapons/guns/interaction/pistol_magin.ogg' + var/insert_sound_vol = 55 + var/insert_sound_vary = FALSE + var/remove_sound = 'sound/weapons/empty.ogg' + var/remove_sound_vol = 55 + var/remove_sound_vary = FALSE /datum/object_system/cell_slot/Destroy() QDEL_NULL(cell) @@ -50,7 +74,8 @@ * returns TRUE if slot accepts this type of cell */ /datum/object_system/cell_slot/proc/accepts_cell(obj/item/cell/cell) - return legacy_use_device_cells? istype(cell, /obj/item/cell/device) : TRUE + . = cell.cell_type & cell_type + . = parent.object_cell_slot_accepts(cell, src, ., null, null) // TODO: user_remove_cell && user_insert_cell // TODO: play sound please & visible message @@ -82,14 +107,17 @@ /** * replaces the existing cell with the inserted cell, dropping the old cell + * @return TRUE success, FALSE otherwise */ /datum/object_system/cell_slot/proc/insert_cell(obj/item/cell/cell) - if(!isnull(cell)) - . = remove_cell(parent.drop_location()) + if(!isnull(src.cell)) + remove_cell(parent.drop_location()) + ASSERT(!src.cell) src.cell = cell if(cell.loc != parent) cell.forceMove(parent) parent.object_cell_slot_inserted(cell, src) + return TRUE /** * returns TRUE if the cell slot is mutable @@ -103,48 +131,158 @@ /datum/object_system/cell_slot/proc/has_cell() return !isnull(cell) +//* Interaction Wrappers *// + +/datum/object_system/cell_slot/proc/user_insert_cell(obj/item/cell/cell, mob/user, silent, datum/event_args/actor/actor) + . = insert_cell(cell) + if(!.) + return + on_user_insert_cell(cell, user, silent, actor) + +/datum/object_system/cell_slot/proc/user_remove_cell(atom/newloc, mob/user, silent, datum/event_args/actor/actor) as /obj/item/cell + . = remove_cell(newloc) + if(!.) + return + on_user_remove_cell(., user, silent, actor) + +/datum/object_system/cell_slot/proc/on_user_insert_cell(obj/item/cell, mob/user, silent, datum/event_args/actor/actor) + if(!silent) + if(insert_sound) + playsound(parent, insert_sound, insert_sound_vol, insert_sound_vary) + +/datum/object_system/cell_slot/proc/on_user_remove_cell(obj/item/cell, mob/user, silent, datum/event_args/actor/actor) + if(!silent) + if(remove_sound) + playsound(parent, remove_sound, remove_sound_vol, remove_sound_vary) + //? Hooks /** * hook called on cell slot removal + * + * @params + * * cell - the cell + * * slot - the cell slot + * * silent - (optional) don't emit messages / sounds + * * actor - (optional) who's doing it */ -/obj/proc/object_cell_slot_removed(obj/item/cell/cell, datum/object_system/cell_slot/slot) +/obj/proc/object_cell_slot_removed(obj/item/cell/cell, datum/object_system/cell_slot/slot, silent, datum/event_args/actor/actor) return /** * hook called on cell slot insertion + * + * @params + * * cell - the cell + * * slot - the cell slot + * * silent - (optional) don't emit messages / sounds + * * actor - (optional) who's doing it */ -/obj/proc/object_cell_slot_inserted(obj/item/cell/cell, datum/object_system/cell_slot/slot) +/obj/proc/object_cell_slot_inserted(obj/item/cell/cell, datum/object_system/cell_slot/slot, silent, datum/event_args/actor/actor) return /** * hook called to check if cell slot removal behavior is active + * + * @params + * * cell - the cell + * * slot - the cell slot + * * silent - (optional) don't emit messages / sounds + * * actor - (optional) who's doing it + * + * @return truthy/falsy value (not necessarily 0 / 1) */ -/obj/proc/object_cell_slot_mutable(mob/user, datum/object_system/cell_slot/slot) +/obj/proc/object_cell_slot_mutable(mob/user, datum/object_system/cell_slot/slot, silent, datum/event_args/actor/actor) return TRUE +/** + * @params + * * cell - the cell + * * slot - (optional) the cell slot + * * slot_opinion - (optional) what default checks returned + * * silent - (optional) don't emit messages / sounds + * * actor - (optional) who's doing it + * + * @return truthy/falsy value (not necessarily 0 / 1) + */ +/obj/proc/object_cell_slot_accepts(obj/item/cell/cell, datum/object_system/cell_slot/slot, slot_opinion, silent, datum/event_args/actor/actor) + return slot_opinion + //? Lazy wrappers for init -/obj/proc/init_cell_slot(initial_cell_path) +/** + * Creates a cell slot + * + * * This proc will error if it cannot detect a cell type, nor a preload to detect it from. + * * Also sets the cell slot as primary. + * + * @params + * * preload_path - (optional) cell typepath to start with + * * cell_type - (optional) CELL_TYPE_* bitfield, of cell types to accept; defaults to preload_path's type if it exists and this isn't provided. + */ +/obj/proc/init_cell_slot(preload_path, cell_type) RETURN_TYPE(/datum/object_system/cell_slot) ASSERT(isnull(obj_cell_slot)) obj_cell_slot = new(src) - if(initial_cell_path) - // The first cell intentionally doesn't call wrappers. - obj_cell_slot.cell = new initial_cell_path + if(preload_path) + obj_cell_slot.cell = new preload_path + if(isnull(cell_type)) + cell_type = obj_cell_slot.cell_type + else if(isnull(cell_type)) + stack_trace("failed to provide a cell type accept bitfield, and didn't provide a preload path to autodetect from") + obj_cell_slot.cell_type = cell_type + obj_cell_slot.primary = TRUE return obj_cell_slot -/obj/proc/init_cell_slot_easy_tool(initial_cell_path, offhand_removal = TRUE, inhand_removal = FALSE) - RETURN_TYPE(/datum/object_system/cell_slot) - if(isnull(init_cell_slot(initial_cell_path))) +/** + * Wrapper for lazily initializing a cell slot for tools. + * * Also sets the cell slot as primary. + */ +/obj/proc/init_cell_slot_easy_tool(preload_path, cell_type = CELL_TYPE_SMALL | CELL_TYPE_MEDIUM, offhand_removal = TRUE, inhand_removal = FALSE) as /datum/object_system/cell_slot + if(isnull(init_cell_slot(preload_path, cell_type))) return + obj_cell_slot.insert_via_context = TRUE + obj_cell_slot.insert_via_usage = TRUE if(offhand_removal) obj_cell_slot.remove_yank_offhand = TRUE if(inhand_removal) obj_cell_slot.remove_yank_inhand = FALSE obj_cell_slot.remove_yank_context = TRUE obj_cell_slot.remove_yank_time = 0 - obj_cell_slot.legacy_use_device_cells = TRUE + return obj_cell_slot + +/** + * Wrapper for lazily initializing a cell slot for machines. + * * Also sets the cell slot as primary. + * + * @params + * * skip_interactions - do not automatically handle interactions + * * require_remove_tool - tool behavior required for removal; defaults to none (context menu works) + * * require_context_menu - require context menu interaction even if we require a tool behavior. + * useful to not collide with other tool behaviors. + */ +/obj/proc/init_cell_slot_easy_machine( + preload_path, + cell_type = CELL_TYPE_SMALL | CELL_TYPE_WEAPON | CELL_TYPE_MEDIUM, + skip_interactions, + require_remove_tool, + require_context_menu, +) as /datum/object_system/cell_slot + if(isnull(init_cell_slot(preload_path, cell_type))) + return + if(!skip_interactions) + // insertion + if(!require_context_menu) + obj_cell_slot.insert_via_usage = TRUE + obj_cell_slot.insert_via_context = TRUE + // removal + if(require_remove_tool) + obj_cell_slot.remove_tool_behavior = require_remove_tool + if(!require_context_menu) + obj_cell_slot.remove_tool_usage = TRUE + obj_cell_slot.remove_tool_context = TRUE + else + obj_cell_slot.remove_yank_context = TRUE return obj_cell_slot //? Wrappers for cell.dm functions diff --git a/code/game/objects/systems/storage/storage-screen_object.dm b/code/game/objects/systems/storage/storage-screen_object.dm index fe6495fb31b..6edb28e0096 100644 --- a/code/game/objects/systems/storage/storage-screen_object.dm +++ b/code/game/objects/systems/storage/storage-screen_object.dm @@ -85,6 +85,7 @@ INITIALIZE_IMMEDIATE(/atom/movable/screen/storage/item) /** * we are centered. + * * this includes the border, but not the padding. */ /atom/movable/screen/storage/item/volumetric/proc/set_pixel_width(width) overlays.len = 0 diff --git a/code/game/objects/systems/storage/storage-ui.dm b/code/game/objects/systems/storage/storage-ui.dm index a06a3a0dd64..0c2c121ab2a 100644 --- a/code/game/objects/systems/storage/storage-ui.dm +++ b/code/game/objects/systems/storage/storage-ui.dm @@ -158,81 +158,114 @@ return create_ui_slot_mode(user) . = list() + //? resolve items + + // resolve indirection + var/atom/indirection = real_contents_loc() + //? resolve view and rendering // todo: clientless support is awful here // resolve view var/list/decoded_view = decode_view_size(user.client?.view || world.view) var/view_x = decoded_view[1] - // setup initial width - var/rendering_width = STORAGE_UI_TILES_FOR_SCREEN_VIEW_X(view_x) - var/rendering_width_in_pixels = rendering_width * 32 - // effective max scales up if we're overrunning + // setup initial width limits + var/rendering_width_limit = STORAGE_UI_TILES_FOR_SCREEN_VIEW_X(view_x) + var/rendering_width_px_limit = rendering_width_limit * 32 + + // here's the tricky part + // we don't know our max (need to know how many items in one row which we don't) + // or our min (ditto) + // and during the row-forming ops we can actually end up adding more space as needed + // so: + + // we keep a running current-width + var/rendering_width_px = 0 + // we scale up effective max volume if we're overpacked var/effective_max_volume = max(max_combined_volume, cached_combined_volume) - // scale down width to volume - rendering_width_in_pixels = min(rendering_width_in_pixels, effective_max_volume * VOLUMETRIC_STORAGE_STANDARD_PIXEL_RATIO) + // we have some dynamic tuning for how many pixels things use + var/effective_pixel_volume_ratio = VOLUMETRIC_STORAGE_STANDARD_PIXEL_RATIO + // we compute how much pixels we ideally will need to display everything + var/ideal_width_px = effective_pixel_volume_ratio * effective_max_volume + // if too low, + if(ideal_width_px < (VOLUMETRIC_STORAGE_INFLATE_TO_TILES * WORLD_ICON_SIZE)) + // expand our horizons + effective_pixel_volume_ratio = (VOLUMETRIC_STORAGE_INFLATE_TO_TILES * WORLD_ICON_SIZE) / effective_max_volume + ideal_width_px = effective_pixel_volume_ratio * effective_max_volume - //? resolve items + // -- prepare for iteration -- - // resolve indirection - var/atom/indirection = real_contents_loc() + // volume accounted for. + // when we render things smaller than minimum pixels per item, we effectively 'overrun'. + // this results in things looking full when they're not. + // so, we track how much actual volume we rendered + var/volume_accounted_for = 0 - //? prepare iteration - - // max x used in all rows, including padding. - var/maximum_used_width = 0 - // current consumed x of row - var/iteration_used_width = 0 - // current consumed item padding of row - var/iteration_used_padding = 0 + // currently used inner-width; + // * this includes boxes and padding alike + var/iteration_width = 0 // current row var/current_row = 1 - // safety + // safety var var/safety = VOLUMETRIC_STORAGE_MAX_ITEMS - // iterate and render - for(var/obj/item/item in indirection) + + // -- iterate -- + + for(var/obj/item/item as anything in indirection) + var/item_volume = item.get_weight_volume() // check safety - safety-- - if(safety <= 0) + if(--safety <= 0) to_chat(user, SPAN_WARNING("Some items in this storage have been truncated for performance reasons.")) break - - // check row - if(iteration_used_width >= rendering_width_in_pixels) + var/item_width_px = max(VOLUMETRIC_STORAGE_MINIMUM_PIXELS_PER_ITEM, item_volume * effective_pixel_volume_ratio) + var/space_left_px = rendering_width_px_limit - iteration_width + // check row; only wrap around when we're out of px-limit, or, if + // the current item would be unacceptably squashed by being stuffed in. + if(space_left_px < (item_width_px * 0.75)) // check if we're out of rows if(current_row >= STORAGE_UI_MAX_ROWS) to_chat(user, SPAN_WARNING("Some items in this storage have been truncated for performance reasons.")) break + // do final row stuff + if(iteration_width > 0) + // subtract last item padding if any items were rendered + iteration_width -= VOLUMETRIC_STORAGE_ITEM_PADDING + iteration_width += VOLUMETRIC_STORAGE_EDGE_PADDING + rendering_width_px = max(rendering_width_px, iteration_width) // make another row - current_row++ - // register to maximum used width - // we add the edge padding for both edges, but remove the last item's padding. - maximum_used_width = max(maximum_used_width, iteration_used_width + iteration_used_padding + VOLUMETRIC_STORAGE_EDGE_PADDING * 2 - VOLUMETRIC_STORAGE_ITEM_PADDING) - // reset vars - iteration_used_padding = 0 - iteration_used_width = 0 + ++current_row + iteration_width = 0 // render the item var/atom/movable/screen/storage/item/volumetric/renderer = new(null, item) - // scale it as necessary, to nearest multiple of 2 - var/used_pixels = max(VOLUMETRIC_STORAGE_MINIMUM_PIXELS_PER_ITEM, CEILING(rendering_width_in_pixels * (item.get_weight_volume() / effective_max_volume), 2)) - // emit to renderer - renderer.set_pixel_width(used_pixels) - // set screen loc - renderer.screen_loc = "LEFT+[STORAGE_UI_START_TILE_X]:[STORAGE_UI_START_PIXEL_X + (iteration_used_width + iteration_used_padding + VOLUMETRIC_STORAGE_EDGE_PADDING) + (used_pixels - VOLUMETRIC_STORAGE_BOX_ICON_SIZE) * 0.5],\ - BOTTOM+[STORAGE_UI_START_TILE_Y + current_row - 1]:[STORAGE_UI_START_PIXEL_Y]" // add to emitted screen list . += renderer + // scale it as necessary, to nearest multiple of 2 + var/used_pixels = max(VOLUMETRIC_STORAGE_MINIMUM_PIXELS_PER_ITEM, CEILING(ideal_width_px * (item_volume / effective_max_volume), 2)) + renderer.set_pixel_width(used_pixels) + // set screen loc + renderer.screen_loc = "LEFT+[STORAGE_UI_START_TILE_X]:[STORAGE_UI_START_PIXEL_X + VOLUMETRIC_STORAGE_EDGE_PADDING + iteration_width + (used_pixels - VOLUMETRIC_STORAGE_BOX_ICON_SIZE) * 0.5],\ + BOTTOM+[STORAGE_UI_START_TILE_Y + current_row - 1]:[STORAGE_UI_START_PIXEL_Y]" // add to iteration tracking - iteration_used_width += used_pixels - iteration_used_padding += VOLUMETRIC_STORAGE_ITEM_PADDING - // register to maximum used width - // we add the edge padding for both edges, but remove the last item's padding. - maximum_used_width = max(maximum_used_width, iteration_used_width + iteration_used_padding + VOLUMETRIC_STORAGE_EDGE_PADDING * 2 - VOLUMETRIC_STORAGE_ITEM_PADDING) + iteration_width += used_pixels + VOLUMETRIC_STORAGE_ITEM_PADDING + volume_accounted_for += item_volume + + // if we only used one row.. + if(current_row == 1) + // expand it if we still have room left to take into account the unused space. + if(volume_accounted_for < effective_max_volume) + iteration_width = min(rendering_width_px_limit, iteration_width + (effective_max_volume - volume_accounted_for) * effective_pixel_volume_ratio + VOLUMETRIC_STORAGE_ITEM_PADDING) + // do final row stuff + if(iteration_width > 0) + // subtract last item padding if any items were rendered + iteration_width -= VOLUMETRIC_STORAGE_ITEM_PADDING + iteration_width += VOLUMETRIC_STORAGE_EDGE_PADDING + rendering_width_px = max(rendering_width_px, iteration_width) + + // -- render -- // now that everything's set up, we can render everything based on the solved sizes. - // middle size; we also keep in account padding so there's a smooth expansion instead of a sudden expansion at the end. - var/middle_width = max(maximum_used_width, rendering_width_in_pixels + iteration_used_padding) + var/middle_width = rendering_width_px + VOLUMETRIC_STORAGE_EDGE_PADDING * 2 // i hate byond i hate byond i hate byond i hate byond; this is because things break if we don't extend by 2 pixels // at a time for left/right as we use a dumb transform matrix and screen loc to shift, instead of a scale and shift matrix middle_width = CEILING(middle_width, 2) diff --git a/code/game/rendering/atom_huds/atom_hud.dm b/code/game/rendering/atom_huds/atom_hud.dm index 3afd5ffe95f..c9d6abec0fc 100644 --- a/code/game/rendering/atom_huds/atom_hud.dm +++ b/code/game/rendering/atom_huds/atom_hud.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// GLOBAL_LIST_INIT(atom_huds, initialize_atom_huds()) diff --git a/code/game/rendering/atom_huds/atom_hud_provider.dm b/code/game/rendering/atom_huds/atom_hud_provider.dm index 6fa6334b69c..c62ceff181f 100644 --- a/code/game/rendering/atom_huds/atom_hud_provider.dm +++ b/code/game/rendering/atom_huds/atom_hud_provider.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// GLOBAL_LIST_INIT(atom_hud_providers, initialize_atom_hud_providers()) diff --git a/code/game/rendering/legacy/rigmech.dm b/code/game/rendering/legacy/rigmech.dm index e982009cb7c..9718331a5e0 100644 --- a/code/game/rendering/legacy/rigmech.dm +++ b/code/game/rendering/legacy/rigmech.dm @@ -79,7 +79,7 @@ var/obj/item/cell/rigcell = owner_rig.cell var/obj/item/tank/rigtank = owner_rig.air_supply - var/charge_percentage = rigcell ? rigcell.charge / rigcell.maxcharge : 0 + var/charge_percentage = rigcell ? rigcell.charge / rigcell.max_charge : 0 var/air_percentage = rigtank ? clamp(rigtank.air_contents.total_moles / 17.4693, 0, 1) : 0 var/air_on = owner_rig.wearer?.internal ? 1 : 0 @@ -129,7 +129,7 @@ var/obj/item/cell/mechcell = owner_mech.cell var/obj/machinery/portable_atmospherics/canister/mechtank = owner_mech.internal_tank - var/charge_percentage = mechcell ? mechcell.charge / mechcell.maxcharge : 0 + var/charge_percentage = mechcell ? mechcell.charge / mechcell.max_charge : 0 var/air_percentage = mechtank ? clamp(mechtank.air_contents.total_moles / 1863.47, 0, 1) : 0 var/health_percentage = owner_mech.percent_integrity() var/air_on = owner_mech.use_internal_tank diff --git a/code/game/turfs/turf-construction.dm b/code/game/turfs/turf-construction.dm index d98289771d8..459c6691131 100644 --- a/code/game/turfs/turf-construction.dm +++ b/code/game/turfs/turf-construction.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// //* Deconstruction *// diff --git a/code/modules/admin/view_variables/debug_variables.dm b/code/modules/admin/view_variables/debug_variables.dm index 26fa6603da7..133dfff0884 100644 --- a/code/modules/admin/view_variables/debug_variables.dm +++ b/code/modules/admin/view_variables/debug_variables.dm @@ -71,7 +71,7 @@ else item = "[VV_HTML_ENCODE(name)] = /list ([L.len])" - else if (istype(D) && (maybe_bitfield = fetch_bitfield(D.type, name))) + else if (istype(D) && isnum(value) && (maybe_bitfield = fetch_bitfield(D.type, name))) var/list/flags = list() for(var/i in 1 to maybe_bitfield.get_declared_count()) var/bit = maybe_bitfield.bits[i] diff --git a/code/modules/atmospherics/machinery/portable/powered.dm b/code/modules/atmospherics/machinery/portable/powered.dm index f84ae88b01d..bbf236098aa 100644 --- a/code/modules/atmospherics/machinery/portable/powered.dm +++ b/code/modules/atmospherics/machinery/portable/powered.dm @@ -10,20 +10,39 @@ var/efficiency_multiplier = 1 var/last_power_draw_legacy = 0 - var/obj/item/cell/cell + var/use_cell = TRUE var/removeable_cell = TRUE + var/cell_type = /obj/item/cell/basic/tier_1/medium + var/cell_accept = CELL_TYPE_MEDIUM | CELL_TYPE_SMALL | CELL_TYPE_WEAPON | CELL_TYPE_LARGE + /obj/machinery/portable_atmospherics/powered/Initialize(mapload) . = ..() + if(use_cell) + init_cell_slot_easy_machine(cell_type, cell_accept) if(isnull(power_setting)) power_setting = power_maximum +/obj/machinery/portable_atmospherics/powered/object_cell_slot_mutable(mob/user, datum/object_system/cell_slot/slot, silent, datum/event_args/actor/actor) + return removeable_cell && ..() + +/obj/machinery/portable_atmospherics/powered/object_cell_slot_removed(obj/item/cell/cell, datum/object_system/cell_slot/slot) + . = ..() + power_change() + update_static_data() + +/obj/machinery/portable_atmospherics/powered/object_cell_slot_inserted(obj/item/cell/cell, datum/object_system/cell_slot/slot) + . = ..() + power_change() + update_static_data() + /obj/machinery/portable_atmospherics/powered/process(delta_time) ..() power_current = 0 /obj/machinery/portable_atmospherics/powered/powered() + var/obj/item/cell/cell = obj_cell_slot?.cell if(use_power) //using area power return ..() if(cell && cell.charge) @@ -32,51 +51,22 @@ /obj/machinery/portable_atmospherics/powered/ui_static_data(mob/user, datum/tgui/ui) . = ..() + var/obj/item/cell/cell = obj_cell_slot?.cell .["useCharge"] = TRUE - .["maxCharge"] = isnull(cell)? 0 : cell.maxcharge + .["maxCharge"] = isnull(cell)? 0 : cell.max_charge .["powerRating"] = power_maximum .["useCell"] = use_cell /obj/machinery/portable_atmospherics/powered/ui_data(mob/user, datum/tgui/ui) . = ..() + var/obj/item/cell/cell = obj_cell_slot?.cell .["charge"] = isnull(cell)? 0 : cell.charge if(atmos_portable_ui_flags & (ATMOS_PORTABLE_UI_SEE_POWER | ATMOS_PORTABLE_UI_SET_POWER)) .["powerCurrent"] = power_current .["hasCell"] = !isnull(cell) -/obj/machinery/portable_atmospherics/powered/attackby(obj/item/I, mob/living/user, list/params, clickchain_flags, damage_multiplier) - if(use_cell && istype(I, /obj/item/cell)) - if(cell) - to_chat(user, "There is already a power cell installed.") - return - if(!user.attempt_insert_item_for_installation(I, src)) - return - - var/obj/item/cell/C = I - - C.add_fingerprint(user) - cell = C - user.visible_message("[user] opens the panel on [src] and inserts [C].", "You open the panel on [src] and insert [C].") - power_change() - update_static_data() - return - - if(I.is_screwdriver() && removeable_cell) - if(!cell) - to_chat(user, "There is no power cell installed.") - return - - user.visible_message("[user] opens the panel on [src] and removes [cell].", "You open the panel on [src] and remove [cell].") - playsound(src, I.tool_sound, 50, 1) - cell.add_fingerprint(user) - cell.forceMove(drop_location()) - cell = null - power_change() - update_static_data() - return - ..() - /obj/machinery/portable_atmospherics/powered/use_power(amount, chan, dt) + var/obj/item/cell/cell = obj_cell_slot?.cell if(!use_cell) return ..() else if(!cell) diff --git a/code/modules/atmospherics/machinery/portable/pump.dm b/code/modules/atmospherics/machinery/portable/pump.dm index f08169ed3f7..da3f8244c28 100644 --- a/code/modules/atmospherics/machinery/portable/pump.dm +++ b/code/modules/atmospherics/machinery/portable/pump.dm @@ -20,15 +20,12 @@ /obj/machinery/portable_atmospherics/powered/pump/filled start_pressure = 90 * ONE_ATMOSPHERE -/obj/machinery/portable_atmospherics/powered/pump/Initialize(mapload) - . = ..() - cell = new/obj/item/cell/apc(src) - /obj/machinery/portable_atmospherics/powered/pump/update_icon() cut_overlays() . = ..() var/list/overlays_to_add = list() + var/obj/item/cell/cell = obj_cell_slot?.cell if(on && cell && cell.charge) icon_state = "psiphon:1" else @@ -61,6 +58,7 @@ ..() var/power_draw = -1 + var/obj/item/cell/cell = obj_cell_slot?.cell if(on && cell && cell.charge) var/datum/gas_mixture/environment if(holding) @@ -131,9 +129,10 @@ data["max_pressure"] = round(pressuremax) + var/obj/item/cell/cell = obj_cell_slot?.cell data["powerDraw"] = round(last_power_draw_legacy) data["cellCharge"] = cell ? cell.charge : 0 - data["cellMaxCharge"] = cell ? cell.maxcharge : 1 + data["cellMaxCharge"] = cell ? cell.max_charge : 1 if(holding) data["holding"] = list() @@ -198,11 +197,8 @@ /obj/machinery/portable_atmospherics/powered/pump/huge/Initialize(mapload) . = ..() - cell = null - id = gid gid++ - name = "[name] (ID [id])" /obj/machinery/portable_atmospherics/powered/pump/huge/update_icon() diff --git a/code/modules/atmospherics/machinery/portable/scrubber.dm b/code/modules/atmospherics/machinery/portable/scrubber.dm index 9600c7c3137..b3f6c6789ce 100644 --- a/code/modules/atmospherics/machinery/portable/scrubber.dm +++ b/code/modules/atmospherics/machinery/portable/scrubber.dm @@ -21,10 +21,6 @@ /// minimum moles to scrub per tick (if enough power) even if flow is not enough var/scrub_mole_boost = 50 -/obj/machinery/portable_atmospherics/powered/scrubber/Initialize(mapload) - . = ..() - cell = new /obj/item/cell/apc(src) - //! LEGACY BELOW /obj/machinery/portable_atmospherics/powered/scrubber/emp_act(severity) @@ -40,6 +36,7 @@ /obj/machinery/portable_atmospherics/powered/scrubber/update_icon_state() . = ..() + var/obj/item/cell/cell = obj_cell_slot?.cell if(on && cell && cell.charge) icon_state = "pscrubber:1" else @@ -96,6 +93,7 @@ /obj/machinery/portable_atmospherics/powered/scrubber/process(delta_time) ..() + var/obj/item/cell/cell = obj_cell_slot?.cell if(on && (cell?.charge || !use_cell)) var/datum/gas_mixture/scrubbing = isnull(holding)? loc.return_air() : holding.air_contents var/old_mols = scrubbing.total_moles @@ -130,11 +128,8 @@ /obj/machinery/portable_atmospherics/powered/scrubber/huge/Initialize(mapload) . = ..() - cell = null - id = gid gid++ - name = "[name] (ID [id])" /obj/machinery/portable_atmospherics/powered/scrubber/huge/update_icon() diff --git a/code/modules/awaymissions/loot_vr.dm b/code/modules/awaymissions/loot_vr.dm index ce8b675c1f8..8598297ccda 100644 --- a/code/modules/awaymissions/loot_vr.dm +++ b/code/modules/awaymissions/loot_vr.dm @@ -325,9 +325,6 @@ else if(prob(50)) new /obj/item/storage/toolbox/electrical(C) - if(prob(25)) - new /obj/item/cell(C) - if("coffin") new /obj/structure/closet/coffin(src.loc) if(prob(33)) diff --git a/code/modules/bodysets/organic/akula.dm b/code/modules/bodysets/organic/akula.dm index 5502069cb1c..51b54dd55da 100644 --- a/code/modules/bodysets/organic/akula.dm +++ b/code/modules/bodysets/organic/akula.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/sprite_accessory/tail/bodyset/akula name = "akula tail" diff --git a/code/modules/bodysets/organic/apidean.dm b/code/modules/bodysets/organic/apidean.dm index dbb72dcdb82..c1699d0f13a 100644 --- a/code/modules/bodysets/organic/apidean.dm +++ b/code/modules/bodysets/organic/apidean.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/sprite_accessory/tail/bodyset/apidean name = "apidean tail" diff --git a/code/modules/bodysets/organic/krisitik.dm b/code/modules/bodysets/organic/krisitik.dm index 2732f48d9fd..27a083d0c2d 100644 --- a/code/modules/bodysets/organic/krisitik.dm +++ b/code/modules/bodysets/organic/krisitik.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/sprite_accessory/tail/bodyset/krisitik name = "krisitik tail" diff --git a/code/modules/bodysets/organic/monkey.dm b/code/modules/bodysets/organic/monkey.dm index 0ce6dd0dc75..76a3ffeb266 100644 --- a/code/modules/bodysets/organic/monkey.dm +++ b/code/modules/bodysets/organic/monkey.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/sprite_accessory/tail/bodyset/monkey abstract_type = /datum/sprite_accessory/tail/bodyset/monkey diff --git a/code/modules/bodysets/organic/moth.dm b/code/modules/bodysets/organic/moth.dm index 11a895fa634..c8068ad8bfb 100644 --- a/code/modules/bodysets/organic/moth.dm +++ b/code/modules/bodysets/organic/moth.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/sprite_accessory/wing/bodyset/moth name = "moth wings" diff --git a/code/modules/bodysets/organic/naramadi.dm b/code/modules/bodysets/organic/naramadi.dm index cfdee0fe16f..71ee0ffbc9a 100644 --- a/code/modules/bodysets/organic/naramadi.dm +++ b/code/modules/bodysets/organic/naramadi.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/sprite_accessory/tail/bodyset/naramadi name = "naramadi tail" diff --git a/code/modules/bodysets/organic/nevrean.dm b/code/modules/bodysets/organic/nevrean.dm index 1618a60cf25..8d2588e7895 100644 --- a/code/modules/bodysets/organic/nevrean.dm +++ b/code/modules/bodysets/organic/nevrean.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/sprite_accessory/tail/bodyset/nevrean name = "nevrean tail" diff --git a/code/modules/bodysets/organic/rapala.dm b/code/modules/bodysets/organic/rapala.dm index df41456b9f7..0be559fc3f2 100644 --- a/code/modules/bodysets/organic/rapala.dm +++ b/code/modules/bodysets/organic/rapala.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/sprite_accessory/tail/bodyset/rapala name = "rapala tail" diff --git a/code/modules/bodysets/organic/shadekin.dm b/code/modules/bodysets/organic/shadekin.dm index 3203e71c3f3..83003597313 100644 --- a/code/modules/bodysets/organic/shadekin.dm +++ b/code/modules/bodysets/organic/shadekin.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/sprite_accessory/tail/bodyset/shadekin name = "shadekin tail" diff --git a/code/modules/bodysets/organic/tajaran.dm b/code/modules/bodysets/organic/tajaran.dm index 82551aa0463..224fadb61fd 100644 --- a/code/modules/bodysets/organic/tajaran.dm +++ b/code/modules/bodysets/organic/tajaran.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/sprite_accessory/tail/bodyset/tajaran name = "tajaran tail" diff --git a/code/modules/bodysets/organic/teshari.dm b/code/modules/bodysets/organic/teshari.dm index 4879075fd10..53c12c5bd5e 100644 --- a/code/modules/bodysets/organic/teshari.dm +++ b/code/modules/bodysets/organic/teshari.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/sprite_accessory/tail/bodyset/teshari name = "teshari tail" diff --git a/code/modules/bodysets/organic/unathi.dm b/code/modules/bodysets/organic/unathi.dm index a6376f58ca0..c23214f8485 100644 --- a/code/modules/bodysets/organic/unathi.dm +++ b/code/modules/bodysets/organic/unathi.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/sprite_accessory/tail/bodyset/unathi name = "unathi tail" diff --git a/code/modules/bodysets/organic/vasilissan.dm b/code/modules/bodysets/organic/vasilissan.dm index eac8eb089e9..5de6f77566b 100644 --- a/code/modules/bodysets/organic/vasilissan.dm +++ b/code/modules/bodysets/organic/vasilissan.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/sprite_accessory/tail/bodyset/vasilissan name = "vasilissan tail" diff --git a/code/modules/bodysets/organic/vulpkanin.dm b/code/modules/bodysets/organic/vulpkanin.dm index a7dce7edd7c..01a146e9247 100644 --- a/code/modules/bodysets/organic/vulpkanin.dm +++ b/code/modules/bodysets/organic/vulpkanin.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/sprite_accessory/tail/bodyset/vulpkanin name = "vulpkanin tail" diff --git a/code/modules/bodysets/organic/xenohybrid.dm b/code/modules/bodysets/organic/xenohybrid.dm index f7e63211c01..22d748659f6 100644 --- a/code/modules/bodysets/organic/xenohybrid.dm +++ b/code/modules/bodysets/organic/xenohybrid.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/sprite_accessory/tail/bodyset/xenohybrid name = "xenohybrid tail" diff --git a/code/modules/bodysets/organic/xenomorph.dm b/code/modules/bodysets/organic/xenomorph.dm index a545b5d7cb0..ece8a91747f 100644 --- a/code/modules/bodysets/organic/xenomorph.dm +++ b/code/modules/bodysets/organic/xenomorph.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/sprite_accessory/tail/bodyset/xenomorph abstract_type = /datum/sprite_accessory/tail/bodyset/xenomorph diff --git a/code/modules/bodysets/organic/zorren_flatlander.dm b/code/modules/bodysets/organic/zorren_flatlander.dm index 6a8149cbce3..612cfb8c7a5 100644 --- a/code/modules/bodysets/organic/zorren_flatlander.dm +++ b/code/modules/bodysets/organic/zorren_flatlander.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/sprite_accessory/tail/bodyset/zorren_flatlander name = "zorren_flatlander tail" diff --git a/code/modules/bodysets/organic/zorren_highlander.dm b/code/modules/bodysets/organic/zorren_highlander.dm index 5edd304a2a1..d153285af30 100644 --- a/code/modules/bodysets/organic/zorren_highlander.dm +++ b/code/modules/bodysets/organic/zorren_highlander.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/sprite_accessory/tail/bodyset/zorren_highlander name = "zorren_highlander tail" diff --git a/code/modules/bodysets/sprite_accessories.dm b/code/modules/bodysets/sprite_accessories.dm index b582c9a545b..f5ffefdd3c1 100644 --- a/code/modules/bodysets/sprite_accessories.dm +++ b/code/modules/bodysets/sprite_accessories.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/sprite_accessory/hair/bodyset abstract_type = /datum/sprite_accessory/hair/bodyset diff --git a/code/modules/bodysets/synthetic/eggnerd.dm b/code/modules/bodysets/synthetic/eggnerd.dm index c98ff619393..5e51e011166 100644 --- a/code/modules/bodysets/synthetic/eggnerd.dm +++ b/code/modules/bodysets/synthetic/eggnerd.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/sprite_accessory/tail/bodyset/eggnerd name = "eggnerd synthetic tail" diff --git a/code/modules/bodysets/synthetic/eggnerd_red.dm b/code/modules/bodysets/synthetic/eggnerd_red.dm index dc33d369a0b..235ae8b1498 100644 --- a/code/modules/bodysets/synthetic/eggnerd_red.dm +++ b/code/modules/bodysets/synthetic/eggnerd_red.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/sprite_accessory/tail/bodyset/eggnerd_red name = "eggnerd (red) synthetic tail" diff --git a/code/modules/bodysets/synthetic/oss_akula.dm b/code/modules/bodysets/synthetic/oss_akula.dm index e3ab5bee704..b665bc07aab 100644 --- a/code/modules/bodysets/synthetic/oss_akula.dm +++ b/code/modules/bodysets/synthetic/oss_akula.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/sprite_accessory/tail/bodyset/oss_akula name = "OSS synthetic akula tail" diff --git a/code/modules/bodysets/synthetic/oss_lizard.dm b/code/modules/bodysets/synthetic/oss_lizard.dm index 47eb81ee9c9..b1b273c33ed 100644 --- a/code/modules/bodysets/synthetic/oss_lizard.dm +++ b/code/modules/bodysets/synthetic/oss_lizard.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/sprite_accessory/tail/bodyset/oss_lizard name = "OSS synthetic lizard tail" diff --git a/code/modules/bodysets/synthetic/oss_naramadi.dm b/code/modules/bodysets/synthetic/oss_naramadi.dm index a35e29042bf..7a304e4479e 100644 --- a/code/modules/bodysets/synthetic/oss_naramadi.dm +++ b/code/modules/bodysets/synthetic/oss_naramadi.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/sprite_accessory/tail/bodyset/oss_naramadi name = "OSS synthetic naramadi tail" diff --git a/code/modules/bodysets/synthetic/oss_nevrean.dm b/code/modules/bodysets/synthetic/oss_nevrean.dm index 108beb0f007..f2a58db3f69 100644 --- a/code/modules/bodysets/synthetic/oss_nevrean.dm +++ b/code/modules/bodysets/synthetic/oss_nevrean.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/sprite_accessory/tail/bodyset/oss_nevrean name = "OSS synthetic nevrean tail" diff --git a/code/modules/bodysets/synthetic/oss_spider.dm b/code/modules/bodysets/synthetic/oss_spider.dm index 3ef5d1fdb36..9dbaecc33d9 100644 --- a/code/modules/bodysets/synthetic/oss_spider.dm +++ b/code/modules/bodysets/synthetic/oss_spider.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/sprite_accessory/tail/bodyset/oss_spider name = "OSS synthetic spider tail" diff --git a/code/modules/bodysets/synthetic/oss_tajaran.dm b/code/modules/bodysets/synthetic/oss_tajaran.dm index 3b120230211..5368387ba93 100644 --- a/code/modules/bodysets/synthetic/oss_tajaran.dm +++ b/code/modules/bodysets/synthetic/oss_tajaran.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/sprite_accessory/tail/bodyset/oss_tajaran name = "OSS synthetic tajaran tail" diff --git a/code/modules/bodysets/synthetic/oss_vulpkanin.dm b/code/modules/bodysets/synthetic/oss_vulpkanin.dm index 4387887c58b..45fb9c8a3ca 100644 --- a/code/modules/bodysets/synthetic/oss_vulpkanin.dm +++ b/code/modules/bodysets/synthetic/oss_vulpkanin.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/sprite_accessory/tail/bodyset/oss_vulpkanin name = "OSS synthetic vulpkanin tail" diff --git a/code/modules/client/client-admin.dm b/code/modules/client/client-admin.dm index ac5d759e3e8..79ca71b9555 100644 --- a/code/modules/client/client-admin.dm +++ b/code/modules/client/client-admin.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// //* Stealthmin *// diff --git a/code/modules/client/game_preferences/entries/game.dm b/code/modules/client/game_preferences/entries/game.dm index 174b674a13e..9f193fe41e5 100644 --- a/code/modules/client/game_preferences/entries/game.dm +++ b/code/modules/client/game_preferences/entries/game.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/game_preference_entry/dropdown/hud_style name = "HUD Style" diff --git a/code/modules/client/game_preferences/entries/graphics.dm b/code/modules/client/game_preferences/entries/graphics.dm index 356f51b3d7e..491cdc28c9d 100644 --- a/code/modules/client/game_preferences/entries/graphics.dm +++ b/code/modules/client/game_preferences/entries/graphics.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/game_preference_entry/toggle/parallax name = "Parallax Enabled" diff --git a/code/modules/client/game_preferences/game_preference_entry.dm b/code/modules/client/game_preferences/game_preference_entry.dm index 7636d51782e..b0ba636e75c 100644 --- a/code/modules/client/game_preferences/game_preference_entry.dm +++ b/code/modules/client/game_preferences/game_preference_entry.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/game_preference_entry abstract_type = /datum/game_preference_entry diff --git a/code/modules/client/game_preferences/game_preference_middleware.dm b/code/modules/client/game_preferences/game_preference_middleware.dm index b7a210287cf..04b430aae28 100644 --- a/code/modules/client/game_preferences/game_preference_middleware.dm +++ b/code/modules/client/game_preferences/game_preference_middleware.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /// key value id = middleware instance GLOBAL_LIST_INIT(game_preference_middleware, init_game_preference_middleware()) diff --git a/code/modules/client/game_preferences/game_preference_toggle.dm b/code/modules/client/game_preferences/game_preference_toggle.dm index 7ded7e6b3ad..1bda05deea6 100644 --- a/code/modules/client/game_preferences/game_preference_toggle.dm +++ b/code/modules/client/game_preferences/game_preference_toggle.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/game_preference_toggle abstract_type = /datum/game_preference_toggle diff --git a/code/modules/client/game_preferences/middleware/keybindings.dm b/code/modules/client/game_preferences/middleware/keybindings.dm index afc337d1604..bd404805f78 100644 --- a/code/modules/client/game_preferences/middleware/keybindings.dm +++ b/code/modules/client/game_preferences/middleware/keybindings.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/game_preference_middleware/keybindings name = "Keybindings" diff --git a/code/modules/client/game_preferences/middleware/toggles.dm b/code/modules/client/game_preferences/middleware/toggles.dm index 1e5d402fc65..964db058d2a 100644 --- a/code/modules/client/game_preferences/middleware/toggles.dm +++ b/code/modules/client/game_preferences/middleware/toggles.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/game_preference_middleware/toggles name = "Toggles" diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index 0f5b3a04c08..60395ca9b92 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -461,7 +461,7 @@ fire_sound = 'sound/weapons/Gunshot1.ogg' projectile_type = /obj/projectile/chameleon charge_meter = 0 - charge_cost = 48 //uses next to no power, since it's just holograms + charge_cost = POWER_CELL_CAPACITY_WEAPON / 160 legacy_battery_lock = 1 var/obj/projectile/copy_projectile diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index a96f7388bb7..d22e4a9c244 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -442,7 +442,6 @@ armor_type = /datum/armor/station/heavy encumbrance = ITEM_ENCUMBRANCE_ARMOR_HEAVY weight = ITEM_WEIGHT_ARMOR_HEAVY - max_combined_volume = WEIGHT_VOLUME_SMALL * 4 /obj/item/clothing/suit/storage/vest/heavy/officer name = "officer heavy armor vest" diff --git a/code/modules/frames/frame_step.dm b/code/modules/frames/frame_step.dm index 5b40f8dc3cb..1432eb75cfe 100644 --- a/code/modules/frames/frame_step.dm +++ b/code/modules/frames/frame_step.dm @@ -35,6 +35,7 @@ /// * /datum/prototype/material path /// * /obj/item/stack path /// * /obj/item path + /// * TOOL_BEHAVIOR function var/request /// * stacks: amount /// * items: amount; if 0, we just apply the item to it @@ -110,7 +111,7 @@ else if(ispath(request, /obj/item)) request_type = FRAME_REQUEST_TYPE_ITEM else if(istext(request)) - if(request in global.all_tool_functions) + if(request in global.tool_behaviors_hardcoded) request_type = FRAME_REQUEST_TYPE_TOOL detected = TRUE else if(!detected) diff --git a/code/modules/hardsuits/_rig.dm b/code/modules/hardsuits/_rig.dm index 3b34366eb16..231990cbb3d 100644 --- a/code/modules/hardsuits/_rig.dm +++ b/code/modules/hardsuits/_rig.dm @@ -65,18 +65,14 @@ var/helm_type = /obj/item/clothing/head/helmet/space/hardsuit var/boot_type = /obj/item/clothing/shoes/magboots/hardsuit var/glove_type = /obj/item/clothing/gloves/gauntlets/hardsuit - var/cell_type = /obj/item/cell/high var/air_type = /obj/item/tank/oxygen - var/unremovable_cell = FALSE - //Component/device holders. var/obj/item/tank/air_supply // Air tank, if any. var/obj/item/clothing/shoes/boots = null // Deployable boots, if any. var/obj/item/clothing/suit/space/hardsuit/chest // Deployable chestpiece, if any. var/obj/item/clothing/head/helmet/space/hardsuit/helmet = null // Deployable helmet, if any. var/obj/item/clothing/gloves/gauntlets/hardsuit/gloves = null // Deployable gauntlets, if any. - var/obj/item/cell/cell // Power supply, if any. var/obj/item/hardsuit_module/selected_module = null // Primary system (used with middle-click) var/obj/item/hardsuit_module/vision/visor // Kinda shitty to have a var for a module, but saves time. var/obj/item/hardsuit_module/voice/speech // As above. @@ -158,6 +154,13 @@ /// set to prevent us from spawning starts_with var/storage_empty = FALSE + var/cell_type = /obj/item/cell/basic/tier_1/large + var/cell_accept = CELL_TYPE_MEDIUM | CELL_TYPE_SMALL | CELL_TYPE_WEAPON | CELL_TYPE_LARGE + + // TODO: obj cell slot + var/obj/item/cell/cell // Power supply, if any. + var/unremovable_cell = FALSE + /obj/item/hardsuit/get_cell(inducer) return cell @@ -743,8 +746,8 @@ data["chest"] = (chest ? "[chest.name]" : "None.") data["charge"] = cell ? round(cell.charge,1) : 0 - data["maxcharge"] = cell ? cell.maxcharge : 0 - data["chargestatus"] = cell ? FLOOR((cell.charge/cell.maxcharge)*50, 1) : 0 + data["max_charge"] = cell ? cell.max_charge : 0 + data["chargestatus"] = cell ? FLOOR((cell.charge/cell.max_charge)*50, 1) : 0 data["emagged"] = subverted data["coverlock"] = locked diff --git a/code/modules/hardsuits/modules/computer.dm b/code/modules/hardsuits/modules/computer.dm index 867a505fcb5..3098a7dd812 100644 --- a/code/modules/hardsuits/modules/computer.dm +++ b/code/modules/hardsuits/modules/computer.dm @@ -450,7 +450,7 @@ // Attempts to drain up to 12.5*cell-capacity kW, determines this value from remaining cell capacity to ensure we don't drain too much. // 1Ws/(12.5*CELLRATE) = 40s to charge - var/to_drain = min(12.5 * holder.cell.maxcharge, holder.cell.maxcharge - holder.cell.charge) + var/to_drain = min(12.5 * holder.cell.max_charge, holder.cell.max_charge - holder.cell.charge) var/target_drained = interfaced_with.drain_energy(src, DYNAMIC_CELL_UNITS_TO_KJ(to_drain)) if(target_drained <= 0) to_chat(H, "Your power sink flashes a red light; there is no power left in [interfaced_with].") diff --git a/code/modules/hardsuits/modules/modules.dm b/code/modules/hardsuits/modules/modules.dm index 89137dfe29d..34374fefe4a 100644 --- a/code/modules/hardsuits/modules/modules.dm +++ b/code/modules/hardsuits/modules/modules.dm @@ -251,7 +251,7 @@ . = list() if(!C.statpanel_tab("Hardsuit Modules", needed)) return - var/cell_status = R.cell ? "[R.cell.charge]/[R.cell.maxcharge]" : "ERROR" + var/cell_status = R.cell ? "[R.cell.charge]/[R.cell.max_charge]" : "ERROR" INJECT_STATPANEL_DATA_ENTRY(., "Suit charge", cell_status) for(var/obj/item/hardsuit_module/module in R.installed_modules) for(var/stat_hardsuit_module/SRM in module.stat_modules) diff --git a/code/modules/hardsuits/rig_attackby.dm b/code/modules/hardsuits/rig_attackby.dm index 511acb450f5..e9abba2471b 100644 --- a/code/modules/hardsuits/rig_attackby.dm +++ b/code/modules/hardsuits/rig_attackby.dm @@ -89,6 +89,10 @@ return 1 else if(!cell && istype(W,/obj/item/cell)) + var/obj/item/cell/casted_cell = W + if(!(casted_cell.cell_type & cell_accept)) + to_chat(user, SPAN_WARNING("[W] doesn't fit in [src]'s cell slot.")) + return if(!user.attempt_insert_item_for_installation(W, src)) return to_chat(user, "You jack \the [W] into \the [src]'s battery mount.") diff --git a/code/modules/hardsuits/suits/light.dm b/code/modules/hardsuits/suits/light.dm index da9ab38de36..2c956ef58c8 100644 --- a/code/modules/hardsuits/suits/light.dm +++ b/code/modules/hardsuits/suits/light.dm @@ -97,7 +97,7 @@ chest_type = /obj/item/clothing/suit/space/hardsuit/light/ninja glove_type = /obj/item/clothing/gloves/gauntlets/hardsuit/light/ninja boot_type = /obj/item/clothing/shoes/magboots/hardsuit/light/ninja - cell_type = /obj/item/cell/hyper + cell_type = /obj/item/cell/basic/tier_4/large req_access = list(ACCESS_FACTION_SYNDICATE) diff --git a/code/modules/hardsuits/suits/species/vox.dm b/code/modules/hardsuits/suits/species/vox.dm index 86702f1b13f..d7609793839 100644 --- a/code/modules/hardsuits/suits/species/vox.dm +++ b/code/modules/hardsuits/suits/species/vox.dm @@ -45,7 +45,7 @@ suit_type = "dense alien" emp_protection = 40 //change this to 30 if too high. req_access = list(ACCESS_FACTION_SYNDICATE) - cell_type = /obj/item/cell/hyper + cell_type = /obj/item/cell/basic/tier_4/large initial_modules = list( /obj/item/hardsuit_module/mounted/energy_blade, /obj/item/hardsuit_module/sprinter, @@ -61,7 +61,7 @@ icon_state = "voxstealth_rig" emp_protection = 40 //change this to 30 if too high. req_access = list(ACCESS_FACTION_SYNDICATE) - cell_type = /obj/item/cell/hyper + cell_type = /obj/item/cell/basic/tier_4/large initial_modules = list( /obj/item/hardsuit_module/stealth_field, /obj/item/hardsuit_module/electrowarfare_suite, diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index be4ac341f9e..5ac6428f443 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -180,8 +180,8 @@ var/obj/item/cell/potato/pocell = new /obj/item/cell/potato(get_turf(user)) if(src.loc == user && istype(user,/mob/living/carbon/human)) user.put_in_hands(pocell) - pocell.maxcharge = src.potency * 200 //fellas, have you ever actually tried to reach 200 potency? Let them have this if they can manage it. - pocell.charge = pocell.maxcharge + pocell.max_charge = src.potency * 200 //fellas, have you ever actually tried to reach 200 potency? Let them have this if they can manage it. + pocell.charge = pocell.max_charge qdel(src) return else if(W.is_sharp()) diff --git a/code/modules/integrated_electronics/core/assemblies.dm b/code/modules/integrated_electronics/core/assemblies.dm index 8c14ce4faf4..1949c5443a5 100644 --- a/code/modules/integrated_electronics/core/assemblies.dm +++ b/code/modules/integrated_electronics/core/assemblies.dm @@ -17,8 +17,7 @@ var/max_components = IC_COMPONENTS_BASE var/max_complexity = IC_COMPLEXITY_BASE var/opened = FALSE - /// Internal cell which most circuits need to work. - var/obj/item/cell/device/battery = null + /// Set every tick, to display how much power is being drawn in total. var/net_power = 0 /// Can it be charged in a recharger? @@ -54,8 +53,11 @@ /// Cost set to default during init if unset. var/cost = 0 + var/cell_type = /obj/item/cell/basic/tier_1/small + var/cell_accept = CELL_TYPE_SMALL + /obj/item/electronic_assembly/Initialize(mapload) - battery = new(src) + init_cell_slot_easy_tool(cell_type, cell_accept) src.max_components = round(max_components) src.max_complexity = round(max_complexity) if(!cost) @@ -73,7 +75,6 @@ return ..() /obj/item/electronic_assembly/Destroy() - battery = null // It will be qdel'd by ..() if still in our contents STOP_PROCESSING(SSobj, src) collw = null for(var/obj/item/integrated_circuit/circuit in assembly_components) @@ -151,9 +152,6 @@ /obj/item/electronic_assembly/proc/check_interactivity(mob/user) return ui_status(user, GLOB.physical_state) == UI_INTERACTIVE -/obj/item/electronic_assembly/get_cell(inducer) - return battery - // TGUI /obj/item/electronic_assembly/ui_state() return GLOB.physical_state @@ -165,6 +163,7 @@ ui.open() /obj/item/electronic_assembly/ui_data(mob/user, datum/tgui/ui) + var/obj/item/cell/battery = get_cell() var/list/data = ..() var/total_parts = 0 @@ -180,7 +179,7 @@ data["max_complexity"] = max_complexity data["battery_charge"] = round(battery?.charge, 0.1) - data["battery_max"] = round(battery?.maxcharge, 0.1) + data["battery_max"] = round(battery?.max_charge, 0.1) data["net_power"] = DYNAMIC_CELL_UNITS_TO_W(net_power, 1) data["circuit_props"] = ui_circuit_props // This works because lists are always passed by reference in BYOND, so modifying unremovable_circuits @@ -218,11 +217,12 @@ return TRUE if("remove_cell") + if(!obj_cell_slot?.cell) + return TRUE var/turf/T = get_turf(src) - battery.forceMove(T) + var/obj/item/cell/removed = obj_cell_slot.remove_cell(T) playsound(T, 'sound/items/Crowbar.ogg', 50, TRUE) - to_chat(usr, SPAN_NOTICE("You pull \the [battery] out of \the [src]'s power supplier.")) - battery = null + to_chat(usr, SPAN_NOTICE("You pull \the [removed] out of \the [src]'s power supplier.")) return TRUE // Circuit actions @@ -446,18 +446,6 @@ else I.forceMove(drop_location()) - else if(I.is_crowbar()) - if(!opened) - return FALSE - if(!battery) - to_chat(usr, SPAN_WARNING("There's no power cell to remove from \the [src].")) - return FALSE - battery.forceMove(get_turf(src)) - playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1) - to_chat(user, SPAN_NOTICE("You pull \the [battery] out of \the [src]'s power supplier.")) - battery = null - return TRUE - else if(I.is_screwdriver()) if(panel_locked) to_chat(user, SPAN_NOTICE("The screws are hidden.")) @@ -481,26 +469,6 @@ update_icon() return TRUE - else if(istype(I, /obj/item/cell/device)) - if(!opened) - to_chat(user, SPAN_WARNING("\The [src] isn't opened, so you can't put anything inside. Try using a crowbar.")) - for(var/obj/item/integrated_circuit/input/S in assembly_components) - S.attackby_react(I,user,user.a_intent) - return FALSE - if(battery) - to_chat(user, SPAN_WARNING("\The [src] already has \a [battery] inside. Remove it first if you want to replace it.")) - for(var/obj/item/integrated_circuit/input/S in assembly_components) - S.attackby_react(I,user,user.a_intent) - return FALSE - var/obj/item/cell/device/cell = I - if(!user.attempt_insert_item_for_installation(cell, src)) - return - battery = cell - // TBI diag_hud_set_circuitstat() //update diagnostic hud - playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1) - to_chat(user, SPAN_NOTICE("You slot \the [cell] inside \the [src]'s power supplier.")) - ui_interact(user) - return TRUE else if(istype(I, /obj/item/integrated_electronics/analyzer)) if(!opened) to_chat(usr, SPAN_WARNING("You need to open the [src] to analyze the contents!")) @@ -541,6 +509,7 @@ // Returns true if power was successfully drawn. /obj/item/electronic_assembly/proc/draw_power(amount) + var/obj/item/cell/battery = get_cell() if(battery) var/lost = battery.use(DYNAMIC_W_TO_CELL_UNITS(amount, 1)) net_power -= lost @@ -549,6 +518,7 @@ // Ditto for giving. /obj/item/electronic_assembly/proc/give_power(amount) + var/obj/item/cell/battery = get_cell() if(battery) var/gained = battery.give(DYNAMIC_W_TO_CELL_UNITS(amount, 1)) net_power += gained @@ -557,6 +527,7 @@ // Returns true if power was successfully drawn. /obj/item/electronic_assembly/proc/draw_power_kw(amount) + var/obj/item/cell/battery = get_cell() if(battery) var/lost = battery.use(DYNAMIC_KW_TO_CELL_UNITS(amount, 1)) net_power -= lost @@ -565,6 +536,7 @@ // Ditto for giving. /obj/item/electronic_assembly/proc/give_power_kw(amount) + var/obj/item/cell/battery = get_cell() if(battery) var/gained = battery.give(DYNAMIC_KW_TO_CELL_UNITS(amount, 1)) net_power += gained diff --git a/code/modules/integrated_electronics/core/integrated_circuit.dm b/code/modules/integrated_electronics/core/integrated_circuit.dm index b61459270a3..dfb1a5a5788 100644 --- a/code/modules/integrated_electronics/core/integrated_circuit.dm +++ b/code/modules/integrated_electronics/core/integrated_circuit.dm @@ -403,7 +403,7 @@ a creative player the means to solve many problems. Circuits are held inside an if(exclude_components && assembly) if(target in assembly.assembly_components) return FALSE - if(target == assembly.battery) + if(target == assembly.obj_cell_slot?.cell) return FALSE if(!exclude_outside && target.Adjacent(acting_object) && isturf(target.loc)) return TRUE diff --git a/code/modules/integrated_electronics/core/pins.dm b/code/modules/integrated_electronics/core/pins.dm index d31834b6241..9968b5284b0 100644 --- a/code/modules/integrated_electronics/core/pins.dm +++ b/code/modules/integrated_electronics/core/pins.dm @@ -118,7 +118,7 @@ list[]( /* TBI Screw multitools, they're all over the place. /datum/integrated_io/proc/handle_wire(datum/integrated_io/linked_pin, obj/item/tool, action, mob/living/user) - if(tool.tool_behaviour == TOOL_MULTITOOL) + if(tool.tool_behavior == TOOL_MULTITOOL) switch(action) if("wire") tool.wire(src, user) diff --git a/code/modules/integrated_electronics/core/printer.dm b/code/modules/integrated_electronics/core/printer.dm index 96c1995c3b7..ab397d2cec7 100644 --- a/code/modules/integrated_electronics/core/printer.dm +++ b/code/modules/integrated_electronics/core/printer.dm @@ -125,7 +125,7 @@ if(!EA.opened) to_chat(user, SPAN_WARNING("You can't reach [EA]'s components to remove them!")) return - if(EA.battery) + if(EA.obj_cell_slot?.cell) to_chat(user, SPAN_WARNING("Remove [EA]'s power cell first!")) return var/inc = 0 diff --git a/code/modules/integrated_electronics/passive/power.dm b/code/modules/integrated_electronics/passive/power.dm index 196423ba1cd..b3a9f50bd96 100644 --- a/code/modules/integrated_electronics/passive/power.dm +++ b/code/modules/integrated_electronics/passive/power.dm @@ -40,8 +40,8 @@ var/is_charge=0 /obj/item/integrated_circuit/passive/power/starter/make_energy() - if(assembly.battery) - if(assembly.battery.charge) + if(assembly.obj_cell_slot?.cell) + if(assembly.obj_cell_slot.cell.charge) if(!is_charge) activate_pin(1) is_charge=1 @@ -139,9 +139,10 @@ push_data() /obj/item/integrated_circuit/passive/power/chemical_cell/make_energy() + var/obj/item/cell/battery = assembly.get_cell() if(assembly) for(var/I in fuel) - if(DYNAMIC_CELL_UNITS_TO_W(assembly.battery.maxcharge - assembly.battery.charge, 1) > fuel[I]) + if(DYNAMIC_CELL_UNITS_TO_W(battery.max_charge - battery.charge, 1) > fuel[I]) var/power = 1 if(reagents.remove_reagent(I, 1)) assembly.give_power(fuel[I]*power) @@ -209,13 +210,14 @@ IO.disconnect_from_network() /obj/item/integrated_circuit/passive/power/powernet/make_energy() - if(assembly && assembly.anchored && assembly.battery) + var/obj/item/cell/battery = get_cell() + if(assembly && assembly.anchored && battery) var/should_act = get_pin_data(IC_INPUT, 1) // Even if this is false, we still need to update the output pins with powernet information. var/drawing = get_pin_data(IC_INPUT, 2) if(should_act) // We're gonna give or take from the net. if(drawing) - var/to_transfer = min(throughput, DYNAMIC_CELL_UNITS_TO_KW(assembly.battery.amount_missing(), 1)) // So we don't need to draw 10kW if the cell needs much less. + var/to_transfer = min(throughput, DYNAMIC_CELL_UNITS_TO_KW(battery.amount_missing(), 1)) // So we don't need to draw 10kW if the cell needs much less. var/amount = IO.draw_power(to_transfer) assembly.give_power_kw(amount) else diff --git a/code/modules/integrated_electronics/subtypes/input.dm b/code/modules/integrated_electronics/subtypes/input.dm index 50d20cec6b5..8688d14426a 100644 --- a/code/modules/integrated_electronics/subtypes/input.dm +++ b/code/modules/integrated_electronics/subtypes/input.dm @@ -1314,6 +1314,7 @@ GLOBAL_DATUM_INIT(circuit_translation_context, /datum/translation_context/simple power_draw_per_use = 1 /obj/item/integrated_circuit/input/internalbm/do_work(ord) + var/obj/item/cell/battery = get_cell() if(ord == 1) set_pin_data(IC_OUTPUT, 1, null) set_pin_data(IC_OUTPUT, 2, null) @@ -1322,11 +1323,11 @@ GLOBAL_DATUM_INIT(circuit_translation_context, /datum/translation_context/simple set_pin_data(IC_OUTPUT, 5, null) if(assembly) set_pin_data(IC_OUTPUT, 4, WEAKREF(assembly)) - if(assembly.battery) - set_pin_data(IC_OUTPUT, 1, assembly.battery.charge) - set_pin_data(IC_OUTPUT, 2, assembly.battery.maxcharge) - set_pin_data(IC_OUTPUT, 3, 100*assembly.battery.charge/assembly.battery.maxcharge) - set_pin_data(IC_OUTPUT, 5, WEAKREF(assembly.battery)) + if(battery) + set_pin_data(IC_OUTPUT, 1, battery.charge) + set_pin_data(IC_OUTPUT, 2, battery.max_charge) + set_pin_data(IC_OUTPUT, 3, 100*battery.charge/battery.max_charge) + set_pin_data(IC_OUTPUT, 5, WEAKREF(battery)) push_data() activate_pin(2) @@ -1373,7 +1374,7 @@ GLOBAL_DATUM_INIT(circuit_translation_context, /datum/translation_context/simple if(A.Adjacent(B) || (AM in view(A))) push_data() set_pin_data(IC_OUTPUT, 1, cell.charge) - set_pin_data(IC_OUTPUT, 2, cell.maxcharge) + set_pin_data(IC_OUTPUT, 2, cell.max_charge) set_pin_data(IC_OUTPUT, 3, cell.percent()) push_data() activate_pin(2) diff --git a/code/modules/integrated_electronics/subtypes/power.dm b/code/modules/integrated_electronics/subtypes/power.dm index da1add01b9f..db6c15920d0 100644 --- a/code/modules/integrated_electronics/subtypes/power.dm +++ b/code/modules/integrated_electronics/subtypes/power.dm @@ -71,7 +71,7 @@ AM.update_icon() set_pin_data(IC_OUTPUT, 1, cell.charge) - set_pin_data(IC_OUTPUT, 2, cell.maxcharge) + set_pin_data(IC_OUTPUT, 2, cell.max_charge) set_pin_data(IC_OUTPUT, 3, cell.percent()) activate_pin(2) push_data() diff --git a/code/modules/keybindings/keybind/item.dm b/code/modules/keybindings/keybind/item.dm index 14fe180cca9..f27de42bba7 100644 --- a/code/modules/keybindings/keybind/item.dm +++ b/code/modules/keybindings/keybind/item.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /datum/keybinding/item weight = WEIGHT_ITEM diff --git a/code/modules/loadout/loadout_utility.dm b/code/modules/loadout/loadout_utility.dm index b15f94bc4b6..207e4817a10 100644 --- a/code/modules/loadout/loadout_utility.dm +++ b/code/modules/loadout/loadout_utility.dm @@ -101,7 +101,7 @@ /datum/loadout_entry/utility/battery name = "Device Cell" - path = /obj/item/cell/device + path = /obj/item/cell/basic/tier_1/small /datum/loadout_entry/utility/implant slot = "implant" diff --git a/code/modules/mapping/dmm_suite/dmm_context.dm b/code/modules/mapping/dmm_suite/dmm_context.dm index 8dd2ac351f7..e840fc57548 100644 --- a/code/modules/mapping/dmm_suite/dmm_context.dm +++ b/code/modules/mapping/dmm_suite/dmm_context.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /proc/create_dmm_context( mangling_id, diff --git a/code/modules/mapping/map_helpers/_map_helpers.dm b/code/modules/mapping/map_helpers/_map_helpers.dm index 347d1a76c1e..91891c25f92 100644 --- a/code/modules/mapping/map_helpers/_map_helpers.dm +++ b/code/modules/mapping/map_helpers/_map_helpers.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /** * an entity placed on a map as a marker to do something diff --git a/code/modules/mapping/map_helpers/access_helper/access_helper.dm b/code/modules/mapping/map_helpers/access_helper/access_helper.dm index 0e8f452d65e..d942693ae25 100644 --- a/code/modules/mapping/map_helpers/access_helper/access_helper.dm +++ b/code/modules/mapping/map_helpers/access_helper/access_helper.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /obj/map_helper/access_helper icon = 'icons/mapping/helpers/access_helpers.dmi' diff --git a/code/modules/mapping/map_helpers/access_helper/airlock.dm b/code/modules/mapping/map_helpers/access_helper/airlock.dm index 1036d978233..ea865206e53 100644 --- a/code/modules/mapping/map_helpers/access_helper/airlock.dm +++ b/code/modules/mapping/map_helpers/access_helper/airlock.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /obj/map_helper/access_helper/airlock diff --git a/code/modules/mapping/map_helpers/gear_marker.dm b/code/modules/mapping/map_helpers/gear_marker.dm index 25522ac4736..d16ab0d6158 100644 --- a/code/modules/mapping/map_helpers/gear_marker.dm +++ b/code/modules/mapping/map_helpers/gear_marker.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /** * denotes somewhere to place starting gear, barotrauma style diff --git a/code/modules/mapping/map_helpers/role_marker.dm b/code/modules/mapping/map_helpers/role_marker.dm index eaee898bb3d..bb353010acc 100644 --- a/code/modules/mapping/map_helpers/role_marker.dm +++ b/code/modules/mapping/map_helpers/role_marker.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /** * denotes a potential role spawn diff --git a/code/modules/mapping/map_injection/map_injection.dm b/code/modules/mapping/map_injection/map_injection.dm index e32428bae11..7ced3b52138 100644 --- a/code/modules/mapping/map_injection/map_injection.dm +++ b/code/modules/mapping/map_injection/map_injection.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /** * something assigned to modify a map before atom initialization happens diff --git a/code/modules/mapping/map_injection/starting_gear.dm b/code/modules/mapping/map_injection/starting_gear.dm index 0ce32b366e5..591fb081a35 100644 --- a/code/modules/mapping/map_injection/starting_gear.dm +++ b/code/modules/mapping/map_injection/starting_gear.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /** * collates starting gear datums for efficiency diff --git a/code/modules/maps/overmap/space/talon/talon.dm b/code/modules/maps/overmap/space/talon/talon.dm index 9da809b69ea..7594486aaef 100644 --- a/code/modules/maps/overmap/space/talon/talon.dm +++ b/code/modules/maps/overmap/space/talon/talon.dm @@ -175,10 +175,6 @@ CREATE_WALL_MOUNTING_TYPES_SHIFTED(/obj/machinery/power/apc/talon, 28) req_one_access = list(ACCESS_FACTION_TALON) alarms_hidden = 1 -CREATE_WALL_MOUNTING_TYPES_SHIFTED(/obj/machinery/power/apc/talon/hyper, 28) -/obj/machinery/power/apc/talon/hyper - cell_type = /obj/item/cell/hyper - CREATE_WALL_MOUNTING_TYPES_SHIFTED(/obj/machinery/air_alarm/talon, 26) /obj/machinery/air_alarm/talon req_access = list() diff --git a/code/modules/mining/drilling/drill.dm b/code/modules/mining/drilling/drill.dm index aeab1ba8b4d..cae81d54ed4 100644 --- a/code/modules/mining/drilling/drill.dm +++ b/code/modules/mining/drilling/drill.dm @@ -54,7 +54,7 @@ new /obj/item/stock_parts/matter_bin(src), new /obj/item/stock_parts/capacitor(src), new /obj/item/stock_parts/micro_laser(src), - new /obj/item/cell/high(src) + new /obj/item/cell/basic/tier_1/large(src) ) RefreshParts() diff --git a/code/modules/mining/machinery/sheet_silo.dm b/code/modules/mining/machinery/sheet_silo.dm index 23f212235f8..0943b7bf0ec 100644 --- a/code/modules/mining/machinery/sheet_silo.dm +++ b/code/modules/mining/machinery/sheet_silo.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /** * persistence allowed storage system diff --git a/code/modules/mining/machinery/sheet_silo_loader.dm b/code/modules/mining/machinery/sheet_silo_loader.dm index d5d21ca63f7..06edc9ad0ab 100644 --- a/code/modules/mining/machinery/sheet_silo_loader.dm +++ b/code/modules/mining/machinery/sheet_silo_loader.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /** * auto-loads sheets into sheet silos diff --git a/code/modules/mining/tools/kinetic/kinetic_accelerator.dm b/code/modules/mining/tools/kinetic/kinetic_accelerator.dm index 7f466416d23..8dd9469c99c 100644 --- a/code/modules/mining/tools/kinetic/kinetic_accelerator.dm +++ b/code/modules/mining/tools/kinetic/kinetic_accelerator.dm @@ -20,13 +20,13 @@ icon = 'icons/obj/gun/energy.dmi' icon_state = "kineticgun" item_state = "kineticgun" - cell_type = /obj/item/cell/device/weapon/empproof + cell_type = /obj/item/cell/kinetic_capacitor clothing_flags = NONE charge_meter = FALSE suit_storage_class = SUIT_STORAGE_CLASS_SOFTWEAR projectile_type = /obj/projectile/kinetic - charge_cost = 1200 + charge_cost = /obj/item/cell/kinetic_capacitor::max_charge legacy_battery_lock = TRUE fire_sound = 'sound/weapons/kenetic_accel.ogg' render_use_legacy_by_default = FALSE @@ -63,15 +63,6 @@ . = ..() attempt_reload() -/* -/obj/item/gun/projectile/energy/kinetic_accelerator/premiumka - name = "premium accelerator" - desc = "A premium kinetic accelerator fitted with an extended barrel and increased pressure tank." - icon_state = "premiumgun" - item_state = "premiumgun" - projectile_type = /obj/projectile/kinetic/premium -*/ - /obj/item/gun/projectile/energy/kinetic_accelerator/examine(mob/user, dist) . = ..() if(max_mod_capacity) @@ -189,7 +180,7 @@ return /obj/item/gun/projectile/energy/kinetic_accelerator/proc/reload() - obj_cell_slot.cell.give(obj_cell_slot.cell.maxcharge) + obj_cell_slot.cell.give(obj_cell_slot.cell.max_charge) // process_chamber() // if(!suppressed) playsound(src, 'sound/weapons/kenetic_reload.ogg', 60, 1) diff --git a/code/modules/mining/tools/kinetic/kinetic_capacitor.dm b/code/modules/mining/tools/kinetic/kinetic_capacitor.dm new file mode 100644 index 00000000000..76b05d0cb83 --- /dev/null +++ b/code/modules/mining/tools/kinetic/kinetic_capacitor.dm @@ -0,0 +1,6 @@ +//* This file is explicitly licensed under the MIT license. *// +//* Copyright (c) 2024 Citadel Station Developers *// + +/obj/item/cell/kinetic_capacitor + max_charge = 2400 + emp_proof = TRUE diff --git a/code/modules/mining/tools/kinetic/kinetic_crusher.dm b/code/modules/mining/tools/kinetic/kinetic_crusher.dm index 06b28410bf3..2da347d84f2 100644 --- a/code/modules/mining/tools/kinetic/kinetic_crusher.dm +++ b/code/modules/mining/tools/kinetic/kinetic_crusher.dm @@ -92,7 +92,7 @@ /* /obj/item/kinetic_crusher/attackby(obj/item/I, mob/living/user) - if(I.tool_behaviour == TOOL_CROWBAR) + if(I.tool_behavior == TOOL_CROWBAR) if(LAZYLEN(trophies)) to_chat(user, "You remove [src]'s trophies.") I.play_tool_sound(src) diff --git a/code/modules/mining/tools/kinetic/kinetic_gauntlets.dm b/code/modules/mining/tools/kinetic/kinetic_gauntlets.dm index 82e4744ff7c..e8f26d33e58 100644 --- a/code/modules/mining/tools/kinetic/kinetic_gauntlets.dm +++ b/code/modules/mining/tools/kinetic/kinetic_gauntlets.dm @@ -11,7 +11,7 @@ base_icon_state = "normal" w_class = WEIGHT_CLASS_NORMAL - weight_volume = WEIGHT_VOLUME_SMALL + weight_volume = WEIGHT_VOLUME_NORMAL slot_flags = SLOT_GLOVES worn_render_flags = WORN_RENDER_SLOT_ONE_FOR_ALL diff --git a/code/modules/mining/tools/vertibore.dm b/code/modules/mining/tools/vertibore.dm index 692b1ed1d89..8002832b0ae 100644 --- a/code/modules/mining/tools/vertibore.dm +++ b/code/modules/mining/tools/vertibore.dm @@ -7,7 +7,9 @@ icon_state = "vertibore" item_state = "vertibore" - var/obj/item/cell/cell //loaded cell + var/cell_type + var/cell_accept = CELL_TYPE_SMALL | CELL_TYPE_WEAPON | CELL_TYPE_MEDIUM + var/power_cost = 1000 //10 shots off a highcap var/load_type = /obj/item/stack/material var/mat_storage = 0 // How much material is stored inside? Input in multiples of 2000 as per auto/protolathe. @@ -16,35 +18,18 @@ var/ammo_material = MAT_PHORON var/loading = FALSE +/obj/item/vertibore/Initialize(mapload) + . = ..() + init_cell_slot_easy_tool(cell_type, cell_accept) + /obj/item/vertibore/examine(mob/user, dist) . = ..() + var/obj/item/cell/cell = get_cell() . += "The shaft excavator has [mat_storage]cm^3 of phoron inside, and can hold a maximum of [max_mat_storage]." if(cell) - . += "The installed [cell.name] has a charge level of [round((cell.charge/cell.maxcharge)*100)]%." + . += "The installed [cell.name] has a charge level of [round((cell.charge/cell.max_charge)*100)]%." /obj/item/vertibore/attackby(var/obj/item/thing, var/mob/user) - if(istype(thing, /obj/item/cell)) - if(cell) - to_chat(user, "\The [src] already has \a [cell] installed.") - return - if(!user.attempt_insert_item_for_installation(thing, src)) - return - cell = thing - playsound(loc, 'sound/machines/click.ogg', 10, 1) - user.visible_message("\The [user] slots \the [cell] into \the [src].") - update_icon() - return - if(thing.is_screwdriver()) - if(!cell) - to_chat(user, "\The [src] has no cell installed.") - return - cell.forceMove(get_turf(src)) - user.put_in_hands(cell) - user.visible_message("\The [user] unscrews \the [cell.name] from \the [src].") - playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) - cell = null - update_icon() - return if(istype(thing, load_type)) loading = TRUE var/obj/item/stack/material/M = thing @@ -76,6 +61,7 @@ if(mat_cost > mat_storage) to_chat(user, "The [src] shudders, the phoron feeding mechanism attempting to move things that aren't there.") return + var/obj/item/cell/cell = get_cell() if(power_cost > cell.charge) to_chat(user, "The [src] flashes a warning light, it doesn't have enough charge to dig.") return @@ -84,7 +70,8 @@ LEGACY_EX_ACT(T, 1, null) /obj/item/vertibore/update_icon() - var/list/overlays_to_add = list() + cut_overlays() + var/obj/item/cell/cell = get_cell() if(cell) - overlays_to_add += image(icon, "[icon_state]_cell") - ..() + add_overlay("[icon_state]_cell") + return ..() diff --git a/code/modules/mob/living/bot/SLed209bot.dm b/code/modules/mob/living/bot/SLed209bot.dm index 95d5e127517..5ac357305b4 100644 --- a/code/modules/mob/living/bot/SLed209bot.dm +++ b/code/modules/mob/living/bot/SLed209bot.dm @@ -162,6 +162,7 @@ to_chat(user, "Taser gun attached.") if(9) + // TODO: have them run off cells after lol if(istype(W, /obj/item/cell)) if(!user.attempt_consume_item_for_construction(W)) return diff --git a/code/modules/mob/living/bot/ed209bot.dm b/code/modules/mob/living/bot/ed209bot.dm index e97b0a4ac23..6cbb5744ab0 100644 --- a/code/modules/mob/living/bot/ed209bot.dm +++ b/code/modules/mob/living/bot/ed209bot.dm @@ -209,6 +209,7 @@ to_chat(user, "Taser gun attached.") if(9) + // TODO: have them run off cells after lol if(istype(W, /obj/item/cell)) if(!user.attempt_consume_item_for_construction(W)) return diff --git a/code/modules/mob/living/bot/edCLNbot.dm b/code/modules/mob/living/bot/edCLNbot.dm index 1dd7c7ed523..790519c5c66 100644 --- a/code/modules/mob/living/bot/edCLNbot.dm +++ b/code/modules/mob/living/bot/edCLNbot.dm @@ -216,6 +216,7 @@ to_chat(user, "Mop attached.") if(8) + // TODO: have them run off cells after lol if(istype(W, /obj/item/cell)) if(!user.attempt_insert_item_for_installation(W, src)) return diff --git a/code/modules/mob/living/carbon/damage_procs.dm b/code/modules/mob/living/carbon/damage_procs.dm index 0e20bc446db..e66bd1d9fe2 100644 --- a/code/modules/mob/living/carbon/damage_procs.dm +++ b/code/modules/mob/living/carbon/damage_procs.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// //* Damage *// diff --git a/code/modules/mob/living/carbon/human/defense.dm b/code/modules/mob/living/carbon/human/defense.dm index 1423907bab7..05a9425caad 100644 --- a/code/modules/mob/living/carbon/human/defense.dm +++ b/code/modules/mob/living/carbon/human/defense.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /mob/living/carbon/human/run_armorcalls(list/shieldcall_args, fake_attack, filter_zone) ..() // perform default /mob level diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index ab3d5090392..c983972408e 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -98,7 +98,7 @@ var/obj/item/hardsuit/suit = back var/cell_status = "ERROR" if(suit.cell) - cell_status = "[suit.cell.charge]/[suit.cell.maxcharge]" + cell_status = "[suit.cell.charge]/[suit.cell.max_charge]" INJECT_STATPANEL_DATA_ENTRY(., "Suit charge", "[cell_status]") if(mind) diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index d4a8b928a1e..eb659cb169b 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /mob/living/carbon/forced_metabolism(seconds) . = ..() diff --git a/code/modules/mob/living/carbon/rendering.dm b/code/modules/mob/living/carbon/rendering.dm index 8d55cde0c4a..7a5fa5fcc41 100644 --- a/code/modules/mob/living/carbon/rendering.dm +++ b/code/modules/mob/living/carbon/rendering.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /** * flatten all keyed overlays diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index e8499477906..bc8e0ebe4d3 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -268,7 +268,7 @@ var/list/ai_verbs_default = list( else if(!R.cell || R.cell.charge <= 0) robot_status = "DEPOWERED" //Name, Health, Battery, Module, Area, and Status! Everything an AI wants to know about its borgies! - INJECT_STATPANEL_DATA_LINE(., "[R.name] | S.Integrity: [R.health]% | Cell: [R.cell ? "[R.cell.charge]/[R.cell.maxcharge]" : "Empty"] | \ + INJECT_STATPANEL_DATA_LINE(., "[R.name] | S.Integrity: [R.health]% | Cell: [R.cell ? "[R.cell.charge]/[R.cell.max_charge]" : "Empty"] | \ Module: [R.modtype] | Loc: [get_area_name(R, TRUE)] | Status: [robot_status]") INJECT_STATPANEL_DATA_LINE(., "AI shell beacons detected: [LAZYLEN(GLOB.available_ai_shells)]") //Count of total AI shells else diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_modules_vr.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_modules_vr.dm index 81abce76306..cdc72b9f6d2 100644 --- a/code/modules/mob/living/silicon/robot/dogborg/dog_modules_vr.dm +++ b/code/modules/mob/living/silicon/robot/dogborg/dog_modules_vr.dm @@ -247,7 +247,7 @@ to_chat(user, "You finish off [target], and gain some charge!") var/mob/living/silicon/robot/R = user var/obj/item/cell/C = target - R.cell.charge += C.maxcharge / 3 + R.cell.charge += C.max_charge / 3 water.use_charge(5) qdel(target) return @@ -313,17 +313,6 @@ enabled = FALSE icon_state = "scrub0" -/obj/item/gun/projectile/energy/taser/mounted/cyborg/ertgun //Not a taser, but it's being used as a base so it takes energy and actually works. - name = "disabler" - desc = "A small and nonlethal gun produced by NT.." - icon = 'icons/mob/dogborg_vr.dmi' - icon_state = "projgun" - fire_sound = 'sound/weapons/eLuger.ogg' - projectile_type = /obj/projectile/beam/disable - charge_cost = 240 //Normal cost of a taser. It used to be 1000, but after some testing it was found that it would sap a borg's battery to quick - recharge_time = 10 //Takes ten ticks to recharge a shot, so don't waste them all! - //cell_type = null //Same cell as a taser until edits are made. - /obj/item/dogborg/swordtail name = "sword tail" icon = 'icons/mob/dogborg_vr.dmi' diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index 7e1e5b43107..71aa85f860b 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -103,7 +103,7 @@ serial_number = rand(0,999) //They are unable to be upgraded, so let's give them a bit of a better battery. - cell.maxcharge = 10000 + cell.max_charge = 10000 cell.charge = 10000 // NO BRAIN. diff --git a/code/modules/mob/living/silicon/robot/drone/drone_console.dm b/code/modules/mob/living/silicon/robot/drone/drone_console.dm index fb36ee2389b..10ec0d6a8a2 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_console.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_console.dm @@ -45,7 +45,7 @@ "name" = D.real_name, "active" = D.stat != 2, "charge" = D.cell.charge, - "maxCharge" = D.cell.maxcharge, + "maxCharge" = D.cell.max_charge, "loc" = "[get_area(D)]", "ref" = "\ref[D]", ))) diff --git a/code/modules/mob/living/silicon/robot/drone/matrix_hive.dm b/code/modules/mob/living/silicon/robot/drone/matrix_hive.dm index c1b8a4663d0..8564c0fe17e 100644 --- a/code/modules/mob/living/silicon/robot/drone/matrix_hive.dm +++ b/code/modules/mob/living/silicon/robot/drone/matrix_hive.dm @@ -79,7 +79,7 @@ var/global/list/drone_matrices = list() D.movement_base_speed += 1 D.update_movespeed_base() if(MTX_UPG_CELL) - D.cell.maxcharge *= 1.5 + D.cell.max_charge = D.cell.max_charge * 1.5 if(MTX_UPG_HEALTH) D.maxHealth += 15 if(MTX_UPG_MOP) diff --git a/code/modules/mob/living/silicon/robot/drone/swarm_items.dm b/code/modules/mob/living/silicon/robot/drone/swarm_items.dm index 39aab5bd892..eea300ffdab 100644 --- a/code/modules/mob/living/silicon/robot/drone/swarm_items.dm +++ b/code/modules/mob/living/silicon/robot/drone/swarm_items.dm @@ -147,14 +147,13 @@ item_state = "xray" origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 3, TECH_MAGNET = 2) projectile_type = /obj/projectile/beam/shock - charge_cost = 175 self_recharge = TRUE use_external_power = TRUE firemodes = list( - list(mode_name="kill", projectile_type=/obj/projectile/beam/gamma, charge_cost = 300), - list(mode_name="deter", projectile_type=/obj/projectile/beam/shock, charge_cost = 175), + list(mode_name="kill", projectile_type=/obj/projectile/beam/gamma, charge_cost = POWER_CELL_CAPACITY_WEAPON / 8), + list(mode_name="deter", projectile_type=/obj/projectile/beam/shock, charge_cost = POWER_CELL_CAPACITY_WEAPON / 16), ) /obj/item/gun/projectile/energy/xray/swarm/Initialize(mapload) diff --git a/code/modules/mob/living/silicon/robot/examine.dm b/code/modules/mob/living/silicon/robot/examine.dm index 343af486d9f..694d8db64c6 100644 --- a/code/modules/mob/living/silicon/robot/examine.dm +++ b/code/modules/mob/living/silicon/robot/examine.dm @@ -1,5 +1,5 @@ /mob/living/silicon/robot/examine(mob/user, dist) - . = list("This is [icon2html(src, user)] \a [src], a [src.module.name] unit!") + . = list("This is [icon2html(src, user)] \a [src][src.module && ", a [src.module.name] unit"]!") if(desc) . += "[desc]" diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index 26d0982af59..c728866c497 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -185,7 +185,7 @@ if (src.cells) if (src.cell) - var/cellcharge = src.cell.charge/src.cell.maxcharge + var/cellcharge = src.cell.charge/src.cell.max_charge switch(cellcharge) if(0.75 to INFINITY) src.cells.icon_state = "charge4" diff --git a/code/modules/mob/living/silicon/robot/robot-power.dm b/code/modules/mob/living/silicon/robot/robot-power.dm new file mode 100644 index 00000000000..eb452e4bd03 --- /dev/null +++ b/code/modules/mob/living/silicon/robot/robot-power.dm @@ -0,0 +1,5 @@ +//* This file is explicitly licensed under the MIT license. *// +//* Copyright (c) 2025 Citadel Station Developers *// + +/mob/living/silicon/robot/proc/accepts_cell(obj/item/cell/cell, datum/event_args/actor/actor, silent) + return cell.cell_type ? (cell.cell_type & cell_accept) : cell_accept_nonstandard diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 4446df89d36..19af1576803 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -105,7 +105,6 @@ var/obj/item/radio/borg/radio = null var/obj/item/communicator/integrated/communicator = null var/mob/living/silicon/ai/connected_ai = null - var/obj/item/cell/cell = null var/obj/machinery/camera/camera = null var/cell_emp_mult = 2 @@ -171,6 +170,16 @@ var/sitting = FALSE var/bellyup = FALSE + //* Power *// + /// our power cell + var/obj/item/cell/cell + /// starting cell type + var/cell_type = /obj/item/cell/basic/tier_1/large + var/cell_accept = CELL_TYPE_LARGE | CELL_TYPE_MEDIUM | CELL_TYPE_SMALL | CELL_TYPE_WEAPON + /// accept cells with no CELL_TYPE field + /// * for shit like gunsword + var/cell_accept_nonstandard = TRUE + //* Movement *// /// Base movement speed in tiles / second var/movement_base_speed = 4 @@ -222,9 +231,7 @@ C.wrapped = new C.external_type if(!cell) - cell = new /obj/item/cell/high(src) - cell.maxcharge = 15000 - cell.charge = 15000 + cell = new cell_type(src) . = ..() @@ -518,7 +525,7 @@ INJECT_STATPANEL_DATA_LINE(., "") if(cell) INJECT_STATPANEL_DATA_LINE(., "Charge Left: [round(cell.percent())]%") - INJECT_STATPANEL_DATA_LINE(., "Cell Rating: [round(cell.maxcharge)]") // Round just in case we somehow get crazy values + INJECT_STATPANEL_DATA_LINE(., "Cell Rating: [round(cell.max_charge)]") // Round just in case we somehow get crazy values INJECT_STATPANEL_DATA_LINE(., "Power Cell Load: [round(used_power_this_tick)]W") else INJECT_STATPANEL_DATA_LINE(., "No Cell Inserted!") @@ -681,12 +688,13 @@ else if (istype(W, /obj/item/cell) && opened) // trying to put a cell inside var/datum/robot_component/C = components["power cell"] + // TODO: check cell accept if(wiresexposed) to_chat(user, "Close the panel first.") else if(cell) to_chat(user, "There is a power cell already installed.") - else if(W.w_class != WEIGHT_CLASS_NORMAL) - to_chat(user, "\The [W] is too [W.w_class < WEIGHT_CLASS_NORMAL ? "small" : "large"] to fit here.") + else if(!accepts_cell(W, new /datum/event_args/actor(user))) + to_chat(user, "\The [W] doesn't fit in [src]'s battery compartment.") else if(!user.attempt_insert_item_for_installation(W, src)) return diff --git a/code/modules/mob/living/silicon/robot/robot_modules/station/security.dm b/code/modules/mob/living/silicon/robot/robot_modules/station/security.dm index 17b52f276c0..0a69cceab68 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules/station/security.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules/station/security.dm @@ -58,7 +58,7 @@ else if(F.times_used) F.times_used-- var/obj/item/gun/projectile/energy/taser/mounted/cyborg/T = locate() in src.modules - if(T.obj_cell_slot.cell.charge < T.obj_cell_slot.cell.maxcharge) + if(T.obj_cell_slot.cell.charge < T.obj_cell_slot.cell.max_charge) T.obj_cell_slot.cell.give(T.charge_cost * amount) T.update_icon() else @@ -137,7 +137,7 @@ else if(F.times_used) F.times_used-- var/obj/item/gun/projectile/energy/taser/mounted/cyborg/T = locate() in src.modules - if(T.obj_cell_slot.cell.charge < T.obj_cell_slot.cell.maxcharge) + if(T.obj_cell_slot.cell.charge < T.obj_cell_slot.cell.max_charge) T.obj_cell_slot.cell.give(T.charge_cost * amount) T.update_icon() else @@ -166,7 +166,7 @@ /obj/item/dogborg/jaws/big, /obj/item/melee/baton/robot, /obj/item/barrier_tape_roll/police, - /obj/item/gun/projectile/energy/taser/mounted/cyborg/ertgun, + /obj/item/gun/projectile/energy/taser/mounted/cyborg, /obj/item/dogborg/swordtail ) diff --git a/code/modules/mob/living/silicon/robot/subtypes/gravekeeper.dm b/code/modules/mob/living/silicon/robot/subtypes/gravekeeper.dm index e10d1039fd5..49131ab4149 100644 --- a/code/modules/mob/living/silicon/robot/subtypes/gravekeeper.dm +++ b/code/modules/mob/living/silicon/robot/subtypes/gravekeeper.dm @@ -28,9 +28,5 @@ updatename("Gravekeeper") - if(!cell) - cell = new /obj/item/cell/high(src) // 15k cell, as recharging stations are a lot more rare on the Surface. - - laws = new /datum/ai_laws/gravekeeper() playsound(loc, 'sound/mecha/nominalsyndi.ogg', 75, 0) diff --git a/code/modules/mob/living/silicon/robot/subtypes/lost_drone.dm b/code/modules/mob/living/silicon/robot/subtypes/lost_drone.dm index faa65999cd1..7ebfe3f244e 100644 --- a/code/modules/mob/living/silicon/robot/subtypes/lost_drone.dm +++ b/code/modules/mob/living/silicon/robot/subtypes/lost_drone.dm @@ -27,10 +27,6 @@ init_id() updatename("Lost") - - if(!cell) - cell = new /obj/item/cell/high(src) // 15k cell, as recharging stations are a lot more rare on the Surface. - playsound(loc, 'sound/mecha/nominalsyndi.ogg', 75, 0) /mob/living/silicon/robot/lost/speech_bubble_appearance() diff --git a/code/modules/mob/living/silicon/robot/subtypes/lost_drone_vr.dm b/code/modules/mob/living/silicon/robot/subtypes/lost_drone_vr.dm index 7779786d55a..220e81b68ef 100644 --- a/code/modules/mob/living/silicon/robot/subtypes/lost_drone_vr.dm +++ b/code/modules/mob/living/silicon/robot/subtypes/lost_drone_vr.dm @@ -27,10 +27,6 @@ init_id() updatename("Stray") - - if(!cell) - cell = new /obj/item/cell/high(src) // 15k cell, as recharging stations are a lot more rare on the Surface. - playsound(loc, 'sound/mecha/nominalsyndi.ogg', 75, 0) /mob/living/silicon/robot/stray/speech_bubble_appearance() diff --git a/code/modules/mob/living/silicon/robot/subtypes/syndicate.dm b/code/modules/mob/living/silicon/robot/subtypes/syndicate.dm index f227ad97b0a..f5f7f385fb8 100644 --- a/code/modules/mob/living/silicon/robot/subtypes/syndicate.dm +++ b/code/modules/mob/living/silicon/robot/subtypes/syndicate.dm @@ -28,10 +28,6 @@ init_id() updatename("Syndicate") - - if(!cell) - cell = new /obj/item/cell/high(src) // 15k cell, because Antag. - laws = new /datum/ai_laws/syndicate_override() radio.keyslot = new /obj/item/encryptionkey/syndicate(radio) diff --git a/code/modules/mob/living/silicon/robot/syndicate.dm b/code/modules/mob/living/silicon/robot/syndicate.dm index 4c3a1dc1b56..a2789fe5204 100644 --- a/code/modules/mob/living/silicon/robot/syndicate.dm +++ b/code/modules/mob/living/silicon/robot/syndicate.dm @@ -6,13 +6,6 @@ lawchannel = "State" idcard_type = /obj/item/card/id/syndicate -/mob/living/silicon/robot/syndicate/Initialize(mapload) - if(!cell) - cell = new /obj/item/cell(src) - cell.maxcharge = 25000 - cell.charge = 25000 - . = ..() - /mob/living/silicon/robot/syndicate/init() aiCamera = new/obj/item/camera/siliconcam/robot_camera(src) diff --git a/code/modules/mob/living/silicon/silicon-damage.dm b/code/modules/mob/living/silicon/silicon-damage.dm index c55f4a2707e..f866dcd29aa 100644 --- a/code/modules/mob/living/silicon/silicon-damage.dm +++ b/code/modules/mob/living/silicon/silicon-damage.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// //* Damage Instance Handling *// diff --git a/code/modules/mob/living/simple_mob/damage_procs.dm b/code/modules/mob/living/simple_mob/damage_procs.dm index 49ef0459d6d..589f5bbf015 100644 --- a/code/modules/mob/living/simple_mob/damage_procs.dm +++ b/code/modules/mob/living/simple_mob/damage_procs.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// //* Damage *// diff --git a/code/modules/mob/mob-damage.dm b/code/modules/mob/mob-damage.dm index f797f95b870..fac32521424 100644 --- a/code/modules/mob/mob-damage.dm +++ b/code/modules/mob/mob-damage.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// //* Damage Instance Handling *// diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 30bdccb6672..b0633846c72 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -112,7 +112,7 @@ // cyborgs produced by Robotize get an automatic power cell O.cell = new(O) - O.cell.maxcharge = 15000 + O.cell.max_charge = 15000 O.cell.charge = 15000 diff --git a/code/modules/modular_computers/computers/modular_computer/power.dm b/code/modules/modular_computers/computers/modular_computer/power.dm index 1673e1293a0..7f2a4eee671 100644 --- a/code/modules/modular_computers/computers/modular_computer/power.dm +++ b/code/modules/modular_computers/computers/modular_computer/power.dm @@ -28,7 +28,7 @@ return FALSE // At this point, we know that APC can power us for this tick. Check if we also need to charge our battery, and then actually use the power. - if(battery_module && (battery_module.battery.charge < battery_module.battery.maxcharge) && (power_usage > 0)) + if(battery_module && (battery_module.battery.charge < battery_module.battery.max_charge) && (power_usage > 0)) power_usage += tesla_link.passive_charging_rate battery_module.battery.give(DYNAMIC_W_TO_CELL_UNITS(tesla_link.passive_charging_rate, 1)) diff --git a/code/modules/modular_computers/file_system/programs/generic/uav.dm b/code/modules/modular_computers/file_system/programs/generic/uav.dm index 2945b38f6de..24d677b679c 100644 --- a/code/modules/modular_computers/file_system/programs/generic/uav.dm +++ b/code/modules/modular_computers/file_system/programs/generic/uav.dm @@ -12,258 +12,3 @@ size = 12 available_on_ntnet = 1 //requires_ntnet = 1 -<<<<<<< HEAD -======= - -/datum/nano_module/uav - name = "UAV Control program" - var/obj/item/uav/current_uav = null //The UAV we're watching - var/signal_strength = 0 //Our last signal strength report (cached for a few seconds) - var/signal_test_counter = 0 //How long until next signal strength check - var/list/viewers //Who's viewing a UAV through us - var/adhoc_range = 30 //How far we can operate on a UAV without NTnet - -/datum/nano_module/uav/Destroy() - if(LAZYLEN(viewers)) - for(var/datum/weakref/W in viewers) - var/M = W.resolve() - if(M) - unlook(M) - . = ..() - -/datum/nano_module/uav/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, state = default_state) - var/list/data = host.initial_nano_data() - - if(current_uav) - if(QDELETED(current_uav)) - set_current(null) - else if(signal_test_counter-- <= 0) - signal_strength = get_signal_to(current_uav) - if(!signal_strength) - set_current(null) - else // Don't reset counter until we find a UAV that's actually in range we can stay connected to - signal_test_counter = 20 - - data["current_uav"] = null - if(current_uav) - data["current_uav"] = list("status" = current_uav.get_status_string(), "power" = current_uav.state == 1 ? 1 : null) - data["signal_strength"] = signal_strength ? signal_strength >= 2 ? "High" : "Low" : "None" - data["in_use"] = LAZYLEN(viewers) - - var/list/paired_map = list() - var/obj/item/modular_computer/mc_host = nano_host() - if(istype(mc_host)) - for(var/puav in mc_host.paired_uavs) - var/datum/weakref/wr = puav - var/obj/item/uav/U = wr.resolve() - paired_map[++paired_map.len] = list("name" = "[U ? U.nickname : "!!Missing!!"]", "uavref" = "\ref[U]") - - data["paired_uavs"] = paired_map - - ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) - if (!ui) - ui = new(user, src, ui_key, "mod_uav.tmpl", "UAV Control", 600, 500, state = state) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) - -/datum/nano_module/uav/Topic(var/href, var/href_list = list(), var/datum/topic_state/state) - if((. = ..())) - return - state = state || DefaultTopicState() || global.default_state - if(CanUseTopic(usr, state, href_list) == UI_INTERACTIVE) - CouldUseTopic(usr) - return OnTopic(usr, href_list, state) - CouldNotUseTopic(usr) - return TRUE - -/datum/nano_module/uav/proc/OnTopic(var/mob/user, var/list/href_list) - if(href_list["switch_uav"]) - var/obj/item/uav/U = locate(href_list["switch_uav"]) //This is a \ref to the UAV itself - if(!istype(U)) - to_chat(usr,"Something is blocking the connection to that UAV. In-person investigation is required.") - return PREFERENCES_NOACTION - - if(!get_signal_to(U)) - to_chat(usr,"The screen freezes for a moment, before returning to the UAV selection menu. It's not able to connect to that UAV.") - return PREFERENCES_NOACTION - - set_current(U) - return PREFERENCES_REFRESH - - if(href_list["del_uav"]) - var/refstring = href_list["del_uav"] //This is a \ref to the UAV itself - var/obj/item/modular_computer/mc_host = nano_host() - //This is so we can really scrape up any weakrefs that can't resolve - for(var/datum/weakref/wr in mc_host.paired_uavs) - if(wr.reference == refstring) - if(WEAKREF(current_uav) == wr) - set_current(null) - LAZYREMOVE(mc_host.paired_uavs, wr) - - else if(href_list["view_uav"]) - if(!current_uav) - return PREFERENCES_NOACTION - - if(current_uav.check_eye(user) < 0) - to_chat(usr,SPAN_WARNING("The screen freezes for a moment, before returning to the UAV selection menu. It's not able to connect to that UAV.")) - else - viewing_uav(user) ? unlook(user) : look(user) - return PREFERENCES_NOACTION - - else if(href_list["power_uav"]) - if(!current_uav) - return PREFERENCES_NOACTION - else if(current_uav.toggle_power()) - //Clean up viewers faster - if(LAZYLEN(viewers)) - for(var/datum/weakref/W in viewers) - var/M = W.resolve() - if(M) - unlook(M) - return PREFERENCES_REFRESH - -/datum/nano_module/uav/proc/DefaultTopicState() - return global.default_state - -/datum/nano_module/uav/proc/CouldNotUseTopic(mob/user) - . = ..() - unlook(user) - -/datum/nano_module/uav/proc/CouldUseTopic(mob/user) - . = ..() - if(viewing_uav(user)) - look(user) - -/datum/nano_module/uav/proc/set_current(var/obj/item/uav/U) - if(current_uav == U) - return - - signal_strength = 0 - current_uav = U - - if(LAZYLEN(viewers)) - for(var/datum/weakref/W in viewers) - var/M = W.resolve() - if(M) - if(current_uav) - to_chat(M, "You're disconnected from the UAV's camera!") - unlook(M) - else - look(M) - -//// -//// Finding signal strength between us and the UAV -//// -/datum/nano_module/uav/proc/get_signal_to(var/atom/movable/AM) - // Following roughly the ntnet signal levels - // 0 is none - // 1 is weak - // 2 is strong - var/obj/item/modular_computer/host = nano_host() //Better not add this to anything other than modular computers. - if(!istype(host)) - return - var/our_signal = host.get_ntnet_status() //1 low, 2 good, 3 wired, 0 none - var/their_z = get_z(AM) - - //If we have no NTnet connection don't bother getting theirs - if(!our_signal) - if(get_z(host) == their_z && (get_dist(host, AM) < adhoc_range)) - return 1 //We can connect (with weak signal) in same z without ntnet, within 30 turfs - else - return 0 - - var/list/zlevels_in_range = (LEGACY_MAP_DATUM).get_map_levels(their_z, FALSE) - var/list/zlevels_in_long_range = (LEGACY_MAP_DATUM).get_map_levels(their_z, TRUE) - zlevels_in_range - var/their_signal = 0 - for(var/relay in ntnet_global.relays) - var/obj/machinery/ntnet_relay/R = relay - if(!R.operable()) - continue - if(R.z == their_z) - their_signal = 2 - break - if(R.z in zlevels_in_range) - their_signal = 2 - break - if(R.z in zlevels_in_long_range) - their_signal = 1 - break - - if(!their_signal) //They have no NTnet at all - if(get_z(host) == their_z && (get_dist(host, AM) < adhoc_range)) - return 1 //We can connect (with weak signal) in same z without ntnet, within 30 turfs - else - return 0 - else - return max(our_signal, their_signal) - -//// -//// UAV viewer handling -//// -/datum/nano_module/uav/proc/viewing_uav(mob/user) - return (WEAKREF(user) in viewers) - -/datum/nano_module/uav/proc/look(var/mob/user) - if(issilicon(user)) //Too complicated for me to want to mess with at the moment - to_chat(user, "Regulations prevent you from controlling several corporeal forms at the same time!") - return - - if(!current_uav) - return - - user.set_machine(nano_host()) - user.reset_view(current_uav) - current_uav.add_master(user) - LAZYDISTINCTADD(viewers, WEAKREF(user)) - -/datum/nano_module/uav/proc/unlook(var/mob/user) - user.unset_machine() - user.reset_view() - if(current_uav) - current_uav.remove_master(user) - LAZYREMOVE(viewers, WEAKREF(user)) - -/datum/nano_module/uav/check_eye(var/mob/user) - if(get_dist(user, nano_host()) > 1 || user.blinded || !current_uav) - unlook(user) - return -1 - - var/viewflag = current_uav.check_eye(user) - if (viewflag < 0) //camera doesn't work - unlook(user) - return -1 - - return viewflag - -//// -//// Relaying movements to the UAV -//// -/datum/nano_module/uav/relaymove(var/mob/user, direction) - if(current_uav) - return current_uav.relaymove(user, direction, signal_strength) - -//// -//// The effects when looking through a UAV -//// -/datum/nano_module/uav/apply_visual(var/mob/M) - if(!M.client) - return - if(WEAKREF(M) in viewers) - M.overlay_fullscreen("fishbed",/atom/movable/screen/fullscreen/fishbed) - M.overlay_fullscreen("scanlines",/atom/movable/screen/fullscreen/scanline) - - if(signal_strength <= 1) - M.overlay_fullscreen("whitenoise",/atom/movable/screen/fullscreen/noise) - else - M.clear_fullscreen("whitenoise", 0) - else - remove_visual(M) - -/datum/nano_module/uav/remove_visual(mob/M) - if(!M.client) - return - M.clear_fullscreen("fishbed",0) - M.clear_fullscreen("scanlines",0) - M.clear_fullscreen("whitenoise",0) ->>>>>>> 787c6065a7ab2843080de41ea1d62e0322e8dd9c diff --git a/code/modules/modular_computers/hardware/battery_module.dm b/code/modules/modular_computers/hardware/battery_module.dm index d5e05355036..aa741880954 100644 --- a/code/modules/modular_computers/hardware/battery_module.dm +++ b/code/modules/modular_computers/hardware/battery_module.dm @@ -8,7 +8,7 @@ malfunction_probability = 1 origin_tech = list(TECH_POWER = 1, TECH_ENGINEERING = 1) var/battery_rating = 750 - var/obj/item/cell/battery = /obj/item/cell + var/obj/item/cell/battery = /obj/item/cell/basic/tier_1/small /obj/item/computer_hardware/battery_module/advanced name = "advanced battery" @@ -55,17 +55,17 @@ icon_state = "battery_lambda" hardware_size = 1 battery_rating = 30000 - battery = /obj/item/cell/infinite + battery = /obj/item/cell/infinite/small /obj/item/computer_hardware/battery_module/diagnostics(var/mob/user) ..() - to_chat(user, "Internal battery charge: [battery.charge]/[battery.maxcharge] CU") + to_chat(user, "Internal battery charge: [battery.charge]/[battery.max_charge] CU") /obj/item/computer_hardware/battery_module/Initialize(mapload) if(ispath(battery)) battery = new battery if(battery) - battery.maxcharge = battery_rating + battery.max_charge = battery_rating battery.charge = 0 return ..() @@ -76,4 +76,4 @@ /obj/item/computer_hardware/battery_module/proc/charge_to_full() if(battery)//nolonger checks for a valid path, instead checks if battery is set. - battery.charge = battery.maxcharge + battery.charge = battery.max_charge diff --git a/code/modules/overmap/map/area.dm b/code/modules/overmap/map/area.dm index f24ab225d98..c7d345c169c 100644 --- a/code/modules/overmap/map/area.dm +++ b/code/modules/overmap/map/area.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /** * this is only on the turfs inside the overmap, diff --git a/code/modules/overmap/map/overmap_template.dm b/code/modules/overmap/map/overmap_template.dm index 62fe8789c6c..508138842f0 100644 --- a/code/modules/overmap/map/overmap_template.dm +++ b/code/modules/overmap/map/overmap_template.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /** * a template used to construct an overmap diff --git a/code/modules/overmap/map/overmap_template_layer.dm b/code/modules/overmap/map/overmap_template_layer.dm index 17ed788b15b..4a0ded54fbe 100644 --- a/code/modules/overmap/map/overmap_template_layer.dm +++ b/code/modules/overmap/map/overmap_template_layer.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /** * generation layers diff --git a/code/modules/overmap/map/template_layers/legacy_events.dm b/code/modules/overmap/map/template_layers/legacy_events.dm index b113ccadf03..c6e1991862f 100644 --- a/code/modules/overmap/map/template_layers/legacy_events.dm +++ b/code/modules/overmap/map/template_layers/legacy_events.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /** * legacy seeded events diff --git a/code/modules/power/apc/apc.dm b/code/modules/power/apc/apc.dm index 755da039e59..dbdeb775829 100644 --- a/code/modules/power/apc/apc.dm +++ b/code/modules/power/apc/apc.dm @@ -49,31 +49,33 @@ GLOBAL_LIST_EMPTY(apcs) #define NIGHTSHIFT_NEVER 2 #define NIGHTSHIFT_ALWAYS 3 -//NOTE: STUFF STOLEN FROM AIRLOCK.DM thx -//Critical// CREATE_WALL_MOUNTING_TYPES_SHIFTED(/obj/machinery/power/apc/critical, 22) /obj/machinery/power/apc/critical is_critical = 1 -/// High capacity cell APCs -CREATE_WALL_MOUNTING_TYPES_SHIFTED(/obj/machinery/power/apc/high, 22) -/obj/machinery/power/apc/high - cell_type = /obj/item/cell/high +CREATE_WALL_MOUNTING_TYPES_SHIFTED(/obj/machinery/power/apc/large_cell, 22) +/obj/machinery/power/apc/large_cell + cell_type = /obj/item/cell/basic/tier_1/large -/// Super capacity cell APCS -CREATE_WALL_MOUNTING_TYPES_SHIFTED(/obj/machinery/power/apc/super, 22) -/obj/machinery/power/apc/super - cell_type = /obj/item/cell/super +CREATE_WALL_MOUNTING_TYPES_SHIFTED(/obj/machinery/power/apc/large_cell/tier_2, 22) +/obj/machinery/power/apc/large_cell/tier_2 + cell_type = /obj/item/cell/basic/tier_2/large -/// Critical APCs with super cells -CREATE_WALL_MOUNTING_TYPES_SHIFTED(/obj/machinery/power/apc/super/critical, 22) -/obj/machinery/power/apc/super/critical +CREATE_WALL_MOUNTING_TYPES_SHIFTED(/obj/machinery/power/apc/large_cell/tier_2/critical, 22) +/obj/machinery/power/apc/large_cell/tier_2/critical is_critical = 1 -/// APCS with hyper cells. How lewd -CREATE_WALL_MOUNTING_TYPES_SHIFTED(/obj/machinery/power/apc/hyper, 22) -/obj/machinery/power/apc/hyper - cell_type = /obj/item/cell/hyper +CREATE_WALL_MOUNTING_TYPES_SHIFTED(/obj/machinery/power/apc/large_cell/tier_3, 22) +/obj/machinery/power/apc/large_cell/tier_3 + cell_type = /obj/item/cell/basic/tier_3/large + +CREATE_WALL_MOUNTING_TYPES_SHIFTED(/obj/machinery/power/apc/large_cell/tier_4, 22) +/obj/machinery/power/apc/large_cell/tier_4 + cell_type = /obj/item/cell/basic/tier_4/large + +CREATE_WALL_MOUNTING_TYPES_SHIFTED(/obj/machinery/power/apc/large_cell/tier_5, 22) +/obj/machinery/power/apc/large_cell/tier_5 + cell_type = /obj/item/cell/basic/tier_5/large /// APCs with alarms hidden. Use these for POI's and offmap stuff so engineers dont get notified that shitty_ruins4 is running out of power -Bloop CREATE_WALL_MOUNTING_TYPES_SHIFTED(/obj/machinery/power/apc/alarms_hidden, 22) @@ -130,10 +132,17 @@ CREATE_WALL_MOUNTING_TYPES_SHIFTED(/obj/machinery/power/apc, 22) var/area/area var/areastring = null + var/obj/item/cell/cell + /// starting path + var/cell_type = /obj/item/cell/basic/tier_1/medium + var/cell_accept = CELL_TYPE_LARGE | CELL_TYPE_MEDIUM | CELL_TYPE_SMALL | CELL_TYPE_WEAPON + /// accept cells with no CELL_TYPE field + /// * for shit like gunsword + var/cell_accept_nonstandard = TRUE + var/chargelevel = 0.0005 // Cap for how fast APC cells charge, as a percentage-per-tick (0.01 means cellcharge is capped to 1% per second) var/start_charge = 90 // initial cell charge % - var/cell_type = /obj/item/cell/apc var/opened = 0 //0=closed, 1=opened, 2=cover removed var/shorted = 0 var/grid_check = FALSE @@ -251,20 +260,18 @@ CREATE_WALL_MOUNTING_TYPES_SHIFTED(/obj/machinery/power/apc, 22) area.power_equip = 0 area.power_environ = 0 area.power_change() - qdel(wires) - wires = null - qdel(terminal) - terminal = null - if(cell) - cell.forceMove(loc) - cell = null + QDEL_NULL(wires) + QDEL_NULL(terminal) + QDEL_NULL(cell) // Malf AI, removes the APC from AI's hacked APCs list. if((hacker) && (hacker.hacked_apcs) && (src in hacker.hacked_apcs)) hacker.hacked_apcs -= src - return ..() +/obj/machinery/power/apc/object_cell_slot_accepts(obj/item/cell/cell, datum/object_system/cell_slot/slot, slot_opinion, silent, datum/event_args/actor/actor) + return cell.cell_type ? (cell.cell_type & cell_accept) : cell_accept_nonstandard + /obj/machinery/power/apc/get_cell(inducer) return cell @@ -310,7 +317,7 @@ CREATE_WALL_MOUNTING_TYPES_SHIFTED(/obj/machinery/power/apc, 22) // is starting with a power cell installed, create it and set its charge level if(cell_type) src.cell = new cell_type(src) - cell.charge = start_charge * cell.maxcharge / 100.0 // (convert percentage to actual value) + cell.charge = start_charge * cell.max_charge / 100.0 // (convert percentage to actual value) var/area/A = src.loc.loc @@ -570,6 +577,10 @@ CREATE_WALL_MOUNTING_TYPES_SHIFTED(/obj/machinery/power/apc, 22) if(cell) to_chat(user,"The [src.name] already has a power cell installed.") return + var/obj/item/cell/casted_cell = W + if(!object_cell_slot_accepts(casted_cell)) + to_chat(usr, SPAN_WARNING("[casted_cell] won't fit in [src]'s cell slot.")) + return if (machine_stat & MAINT) to_chat(user,"You need to install the wiring and electronics first.") return @@ -1167,7 +1178,7 @@ CREATE_WALL_MOUNTING_TYPES_SHIFTED(/obj/machinery/power/apc, 22) if(src.attempt_charging()) if(excess > 0) // check to make sure we have enough to charge // Max charge is capped to % per second constant - var/ch = min(DYNAMIC_KW_TO_CELL_UNITS(excess, 1), cell.maxcharge * chargelevel, cell.maxcharge - cell.charge) + var/ch = min(DYNAMIC_KW_TO_CELL_UNITS(excess, 1), cell.max_charge * chargelevel, cell.max_charge - cell.charge) var/charged = draw_power(DYNAMIC_CELL_UNITS_TO_KW(ch, 1)) // Removes the power we're taking from the grid cell.give(DYNAMIC_KW_TO_CELL_UNITS(charged, 1)) // actually recharge the cell lastused_charging = charged * 1000 @@ -1184,7 +1195,7 @@ CREATE_WALL_MOUNTING_TYPES_SHIFTED(/obj/machinery/power/apc, 22) if(chargemode) if(!charging) - var/charge_tick = cell.maxcharge * chargelevel + var/charge_tick = cell.max_charge * chargelevel charge_tick = DYNAMIC_CELL_UNITS_TO_KW(charge_tick, 1) if(excess > charge_tick) chargecount++ diff --git a/code/modules/power/batteryrack.dm b/code/modules/power/batteryrack.dm index aa1e51a81dc..d222c8a081e 100644 --- a/code/modules/power/batteryrack.dm +++ b/code/modules/power/batteryrack.dm @@ -33,7 +33,7 @@ var/C = 0 for(var/obj/item/cell/PC in component_parts) - C += PC.maxcharge + C += PC.max_charge cells_amount++ capacity = KJ_TO_KWM(DYNAMIC_CELL_UNITS_TO_KJ(C)) diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm deleted file mode 100644 index 3e71873e0b8..00000000000 --- a/code/modules/power/cell.dm +++ /dev/null @@ -1,265 +0,0 @@ -// the power cell -// charge from 0 to 100% -// fits in APC to provide backup power - -/obj/item/cell - name = "power cell" - desc = "A rechargable electrochemical power cell." - icon = 'icons/obj/power.dmi' - icon_state = "cell" - item_state = "cell" - origin_tech = list(TECH_POWER = 1) - damage_force = 5.0 - throw_force = 5.0 - throw_speed = 3 - throw_range = 5 - w_class = WEIGHT_CLASS_NORMAL - suit_storage_class = SUIT_STORAGE_CLASS_SOFTWEAR | SUIT_STORAGE_CLASS_HARDWEAR - /// Are we EMP immune? - var/emp_proof = FALSE - var/charge - var/maxcharge = 1000 - var/rigged = 0 // true if rigged to explode - var/minor_fault = 0 //If not 100% reliable, it will build up faults. - var/self_recharge = FALSE // If true, the cell will recharge itself. - 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 - var/rating = 1 - materials_base = list(MAT_STEEL = 700, MAT_GLASS = 50) - - // Overlay stuff. - var/overlay_half_state = "cell-o1" // Overlay used when not fully charged but not empty. - var/overlay_full_state = "cell-o2" // Overlay used when fully charged. - var/last_overlay_state = null // Used to optimize update_icon() calls. - -/obj/item/cell/Initialize(mapload) - . = ..() - if(isnull(charge)) - charge = maxcharge - update_icon() - if(self_recharge) - START_PROCESSING(SSobj, src) - -/obj/item/cell/Destroy() - if(self_recharge) - STOP_PROCESSING(SSobj, src) - return ..() - -/obj/item/cell/get_rating() - return rating - -/obj/item/cell/get_cell(inducer) - return src - -/obj/item/cell/process(delta_time) - if(self_recharge) - if(world.time >= last_use + charge_delay) - give(charge_amount) - else - return PROCESS_KILL - -/obj/item/cell/drain_energy(datum/actor, amount, flags) - if(charge <= 0) - return 0 - return use(DYNAMIC_KJ_TO_CELL_UNITS(amount)) * GLOB.cellrate - -/obj/item/cell/can_drain_energy(datum/actor, flags) - return TRUE - -#define OVERLAY_FULL 2 -#define OVERLAY_PARTIAL 1 -#define OVERLAY_EMPTY 0 - -/obj/item/cell/update_icon() - var/new_overlay = null // The overlay that is needed. - // If it's different than the current overlay, then it'll get changed. - // Otherwise nothing happens, to save on CPU. - - if(charge < 0.01) // Empty. - new_overlay = OVERLAY_EMPTY - if(last_overlay_state != new_overlay) - cut_overlays() - - else if(charge/maxcharge >= 0.995) // Full - new_overlay = OVERLAY_FULL - if(last_overlay_state != new_overlay) - cut_overlay(overlay_half_state) - add_overlay(overlay_full_state) - - - else // Inbetween. - new_overlay = OVERLAY_PARTIAL - if(last_overlay_state != new_overlay) - cut_overlay(overlay_full_state) - add_overlay(overlay_half_state) - - last_overlay_state = new_overlay - -#undef OVERLAY_FULL -#undef OVERLAY_PARTIAL -#undef OVERLAY_EMPTY - -/obj/item/cell/proc/percent() // return % charge of cell - if(!maxcharge) - return 0 - return 100.0*charge/maxcharge - -/obj/item/cell/proc/fully_charged() - return (charge == maxcharge) - -// checks if the power cell is able to provide the specified amount of charge -/obj/item/cell/proc/check_charge(var/amount) - return (charge >= amount) - -// Returns how much charge is missing from the cell, useful to make sure not overdraw from the grid when recharging. -/obj/item/cell/proc/amount_missing() - return max(maxcharge - charge, 0) - -// use power from a cell, returns the amount actually used -/obj/item/cell/proc/use(var/amount) - if(rigged && amount > 0) - explode() - return 0 - var/used = min(charge, amount) - charge -= used - last_use = world.time - update_icon() - return used - -// Checks if the specified amount can be provided. If it can, it removes the amount -// from the cell and returns 1. Otherwise does nothing and returns 0. -/obj/item/cell/proc/checked_use(amount, reserve) - if(!check_charge(amount + reserve)) - return 0 - use(amount) - return 1 - -// recharge the cell -/obj/item/cell/proc/give(var/amount) - if(rigged && amount > 0) - explode() - return FALSE - var/amount_used = min(maxcharge-charge,amount) - charge += amount_used - update_icon() - if(loc) - loc.update_icon() - return amount_used - - -/obj/item/cell/examine(mob/user, dist) - . = ..() - if(get_dist(src, user) <= 1) - . += " It has a power rating of [maxcharge].\nThe charge meter reads [round(src.percent() )]%." - if(maxcharge < 30000) - . += "[desc]\nThe manufacturer's label states this cell has a power rating of [maxcharge], and that you should not swallow it.\nThe charge meter reads [round(src.percent() )]%." - else - . += "This power cell has an exciting chrome finish, as it is an uber-capacity cell type! It has a power rating of [maxcharge]!\nThe charge meter reads [round(src.percent() )]%." - -/obj/item/cell/attackby(obj/item/W, mob/user) - ..() - if(istype(W, /obj/item/reagent_containers/syringe)) - var/obj/item/reagent_containers/syringe/S = W - - to_chat(user, "You inject the solution into the power cell.") - - if(S.reagents.has_reagent("phoron", 5)) - - rigged = 1 - - log_admin("LOG: [user.name] ([user.ckey]) injected a power cell with phoron, rigging it to explode.") - message_admins("LOG: [user.name] ([user.ckey]) injected a power cell with phoron, rigging it to explode.") - - S.reagents.clear_reagents() - -/obj/item/cell/proc/explode() - var/turf/T = get_turf(src.loc) -/* - * 1000-cell explosion(T, -1, 0, 1, 1) - * 2500-cell explosion(T, -1, 0, 1, 1) - * 10000-cell explosion(T, -1, 1, 3, 3) - * 15000-cell explosion(T, -1, 2, 4, 4) - * */ - if (charge==0) - return - var/devastation_range = -1 //round(charge/11000) - var/heavy_impact_range = round(sqrt(charge)/60) - var/light_impact_range = round(sqrt(charge)/30) - var/flash_range = light_impact_range - if (light_impact_range==0) - rigged = 0 - corrupt() - return - //explosion(T, 0, 1, 2, 2) - - log_admin("LOG: Rigged power cell explosion, last touched by [fingerprintslast]") - message_admins("LOG: Rigged power cell explosion, last touched by [fingerprintslast]") - - explosion(T, devastation_range, heavy_impact_range, light_impact_range, flash_range) - - qdel(src) - -/obj/item/cell/proc/corrupt() - charge /= 2 - maxcharge /= 2 - if (prob(10)) - rigged = 1 //broken batteries are dangerous - -/obj/item/cell/emp_act(severity) - . = ..() - if(emp_proof) - return - //remove this once emp changes on dev are merged in - if(isrobot(loc)) - var/mob/living/silicon/robot/R = loc - severity *= R.cell_emp_mult - - charge -= charge / (severity + 1) - if (charge < 0) - charge = 0 - - update_icon() - -/obj/item/cell/legacy_ex_act(severity) - - switch(severity) - if(1.0) - qdel(src) - return - if(2.0) - if (prob(50)) - qdel(src) - return - if (prob(50)) - corrupt() - if(3.0) - if (prob(25)) - qdel(src) - return - if (prob(25)) - corrupt() - return - -/obj/item/cell/proc/get_electrocute_damage() - //1kW = 5 - //10kW = 24 - //100kW = 45 - //250kW = 53 - //1MW = 66 - //10MW = 88 - //100MW = 110 - //1GW = 132 - if(charge >= 1000) - var/damage = log(1.1,charge) - damage = damage - (log(1.1,damage)*1.5) - return round(damage) - else - return 0 - -//* Setters *// - -/obj/item/cell/proc/set_charge(amount, update) - charge = clamp(amount, 0, maxcharge) - if(update) - update_icon() diff --git a/code/modules/power/cells/cell-misc.dm b/code/modules/power/cells/cell-misc.dm new file mode 100644 index 00000000000..bcbbf56d52a --- /dev/null +++ b/code/modules/power/cells/cell-misc.dm @@ -0,0 +1,63 @@ +/obj/item/cell/potato + name = "potato battery" + desc = "A rechargable starch based power cell." + origin_tech = list(TECH_POWER = 1) + icon = 'icons/obj/power.dmi' //'icons/obj/harvest.dmi' + icon_state = "potato_cell" //"potato_battery" + charge = 100 + max_charge = 300 + cell_type = CELL_TYPE_LARGE | CELL_TYPE_MEDIUM | CELL_TYPE_SMALL | CELL_TYPE_WEAPON + +// todo: this isn't even a fucking cell get it out of here +//Not actually a cell, but if people look for it, they'll probably look near other cells +/obj/item/fbp_backup_cell + name = "backup battery" + desc = "A small one-time-use chemical battery for synthetic crew when they are low on power in emergency situations." + icon = 'icons/obj/power.dmi' + icon_state = "fbp_cell" + w_class = WEIGHT_CLASS_SMALL + var/amount = 100 + var/used = FALSE + +/obj/item/fbp_backup_cell/Initialize(mapload) + . = ..() + add_overlay("[icon_state]1") + +/obj/item/fbp_backup_cell/using_as_item(atom/target, datum/event_args/actor/clickchain/clickchain, clickchain_flags) + var/mob/user = clickchain.performer + if(!used && ishuman(target)) + var/mob/living/carbon/human/H = target + if(H.isSynthetic() || fast_is_species_type(H, /datum/species/shapeshifter/holosphere)) + if(H.nutrition <= amount) + use(user,H) + else + to_chat(user,"The difference in potential is too great. [user == target ? "You have" : "[H] has"] too much charge to use such a small battery.") + else if(target == user) + to_chat(user,"You lick the cell, and your tongue tingles slightly.") + else + to_chat(user,"This cell is meant for use on humanoid synthetics only.") + return CLICKCHAIN_DO_NOT_PROPAGATE + return ..() + +/obj/item/fbp_backup_cell/proc/use(mob/living/user, mob/living/target) + if(used) + return + used = TRUE + desc += " This one has already been used." + cut_overlays() + target.nutrition += amount + user.custom_emote(message = "connects \the [src] to [user == target ? "their" : "[target]'s"] charging port, expending it.") + +/obj/item/cell/emergency_light + 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." + charge = 120 + max_charge = 120 //Emergency lights use 0.2 W per tick, meaning ~10 minutes of emergency power from a cell + materials_base = list(MAT_GLASS = 20) + w_class = WEIGHT_CLASS_TINY + +/obj/item/cell/emergency_light/Initialize(mapload) + . = ..() + var/area/A = get_area(src) + if(!A.lightswitch || !A.light_power) + charge = 0 //For naturally depowered areas, we start with no power diff --git a/code/modules/power/cells/cell.dm b/code/modules/power/cells/cell.dm new file mode 100644 index 00000000000..e22752ee272 --- /dev/null +++ b/code/modules/power/cells/cell.dm @@ -0,0 +1,313 @@ +/** + * Just a supertype for power cell designs + */ +/datum/prototype/design/generated/power_cell + abstract_type = /datum/prototype/design/generated/power_cell + category = DESIGN_CATEGORY_POWER + +/** + * Power storage cells + */ +/obj/item/cell + name = "power cell" + desc = "A rechargable electrochemical power cell." + icon = 'icons/obj/power.dmi' + icon_state = "cell" + item_state = "cell" + origin_tech = list(TECH_POWER = 1) + damage_force = 5.0 + throw_force = 5.0 + throw_speed = 3 + throw_range = 5 + w_class = WEIGHT_CLASS_NORMAL + suit_storage_class = SUIT_STORAGE_CLASS_SOFTWEAR | SUIT_STORAGE_CLASS_HARDWEAR + + armor_type = /datum/armor/object/light + integrity = 200 + integrity_max = 200 + integrity_failure = 100 + + /** + * Materials base is intentionally nulled by default on /cell. + * + * This will invoke type generation. If this is set by a mapper or varedit, it will ignore + * typegen. + */ + materials_base = null + + //* -- Set by type generation -- *// + + /// should we run typegen from the power cell datum we're provided? + /// * This is statically set by the power cell type generation defines. + /// * This should never be modified after Initialize() runs. + var/tmp/typegen_active = FALSE + var/tmp/typegen_material_multiplier = 1 + + //* Behavior *// + /// Power cell prototype. Fetched at init. + /// * This is nullable! If this is null, we don't perform typegen. + var/datum/prototype/power_cell/cell_datum + /// what cell types we are + var/cell_type = NONE + + //* Charge *// + /// current charge + var/charge + /// maximum charge + /// * also used as a base for type generation + var/max_charge = POWER_CELL_CAPACITY_BASE + /// last time power was drawn from us + var/last_use + + //* Rendering *// + /// perform default rendering + var/rendering_system = FALSE + /// total states; 0 to disable auto render + var/indicator_count + /// our indicator color + var/indicator_color = "#00aa00" + /// our stripe color; null for no stripe + var/stripe_color + + //* Self Recharge *// + /// do we self recharge? + var/self_recharge = FALSE + /// cell units to give, per second, if self-recharging + var/self_recharge_amount = 50 + /// how long to wait until after the last use to start recharging + var/self_recharge_delay = 0 SECONDS + + //* legacy below *// + /// Are we EMP immune? + var/emp_proof = FALSE + var/rigged = 0 // true if rigged to explode + var/rating = 1 + +/obj/item/cell/Initialize(mapload) + cell_datum = RSpower_cells.fetch_local_or_throw(cell_datum) + if(typegen_active) + // Typegen is active, run type generation stuff. + // This will trample all map edits. If you're editing a map, you shouldn't be editing power cells. + // Or if you are, you should null out their cell datum. + if(isnull(materials_base) && cell_datum.typegen_materials_base) + if(has_typelist(NAMEOF(src, materials_base))) + materials_base = get_typelist(NAMEOF(src, materials_base)) + else + // This will **trample** the materials_base check in /obj initialization, so we have to the + // entire cycle. + var/list/generating_materials = cell_datum.typegen_materials_base.Copy() + if(typegen_material_multiplier != 1) + for(var/key in generating_materials) + generating_materials[key] *= typegen_material_multiplier + for(var/key in cell_datum.typegen_materials_base_adjust) + generating_materials[key] += cell_datum.typegen_materials_base_adjust[key] + generating_materials = SSmaterials.preprocess_kv_keys_to_ids(generating_materials) + materials_base = typelist(NAMEOF(src, materials_base), generating_materials) + . = ..() + if(isnull(charge)) + charge = max_charge + update_icon() + if(self_recharge) + START_PROCESSING(SSobj, src) + +/obj/item/cell/Destroy() + if(datum_flags & DF_ISPROCESSING) + STOP_PROCESSING(SSobj, src) + return ..() + +/obj/item/cell/get_worth(flags) + . = ..() + if(typegen_active) + . *= cell_datum?.typegen_worth_multiplier + +/obj/item/cell/get_rating() + return rating + +/obj/item/cell/get_cell(inducer) + return src + +/obj/item/cell/drain_energy(datum/actor, amount, flags) + if(charge <= 0) + return 0 + return use(DYNAMIC_KJ_TO_CELL_UNITS(amount)) * GLOB.cellrate + +/obj/item/cell/can_drain_energy(datum/actor, flags) + return TRUE + +/obj/item/cell/examine(mob/user, dist) + . = ..() + if(get_dist(src, user) <= 1) + . += "It has a power rating of [max_charge].\nThe charge meter reads [round(src.percent() )]%." + +/obj/item/cell/attackby(obj/item/W, mob/user) + ..() + if(istype(W, /obj/item/reagent_containers/syringe)) + var/obj/item/reagent_containers/syringe/S = W + to_chat(user, "You inject the solution into the power cell.") + if(S.reagents.has_reagent("phoron", 5)) + rigged = 1 + log_admin("LOG: [user.name] ([user.ckey]) injected a power cell with phoron, rigging it to explode.") + message_admins("LOG: [user.name] ([user.ckey]) injected a power cell with phoron, rigging it to explode.") + S.reagents.clear_reagents() + +/obj/item/cell/proc/explode() + var/turf/T = get_turf(src.loc) +/* + * 1000-cell explosion(T, -1, 0, 1, 1) + * 2500-cell explosion(T, -1, 0, 1, 1) + * 10000-cell explosion(T, -1, 1, 3, 3) + * 15000-cell explosion(T, -1, 2, 4, 4) + * */ + if (charge==0) + return + var/devastation_range = 0 + var/heavy_impact_range = round(sqrt(charge) / 60) + var/light_impact_range = round(sqrt(charge) / 30) + var/flash_range = light_impact_range + if (light_impact_range==0) + rigged = 0 + corrupt() + return + log_admin("LOG: Rigged power cell explosion, last touched by [fingerprintslast]") + message_admins("LOG: Rigged power cell explosion, last touched by [fingerprintslast]") + explosion(T, devastation_range, heavy_impact_range, light_impact_range, flash_range) + qdel(src) + +/obj/item/cell/proc/corrupt() + charge /= 2 + max_charge /= 2 + if (prob(10)) + rigged = 1 //broken batteries are dangerous + +/obj/item/cell/emp_act(severity) + . = ..() + if(emp_proof) + return + //remove this once emp changes on dev are merged in + if(isrobot(loc)) + var/mob/living/silicon/robot/R = loc + severity *= R.cell_emp_mult + use(charge / (severity + 1)) + update_icon() + +/obj/item/cell/legacy_ex_act(severity) + switch(severity) + if(1.0) + qdel(src) + return + if(2.0) + if (prob(50)) + qdel(src) + return + if (prob(50)) + corrupt() + if(3.0) + if (prob(25)) + qdel(src) + return + if (prob(25)) + corrupt() + +/obj/item/cell/proc/get_electrocute_damage() + //1kW = 5 + //10kW = 24 + //100kW = 45 + //250kW = 53 + //1MW = 66 + //10MW = 88 + //100MW = 110 + //1GW = 132 + if(charge >= 1000) + var/damage = log(1.1,charge) + damage = damage - (log(1.1,damage)*1.5) + return round(damage) + else + return 0 + +//* Main *// + +/obj/item/cell/proc/give(amount, force) + // LEGACY - explosion? + if(rigged && amount > 0) + explode() + return FALSE + // END + if(force) + . = amount + else + . = clamp(amount, 0, max_charge - charge) + charge += . + if(.) + update_icon() + // :3 for guns to update, someone find a better solution later + loc?.update_icon() + +/obj/item/cell/proc/amount_missing() + . = max(0, max_charge - charge) + +/obj/item/cell/proc/fully_charged() + return check_charge(max_charge) + +/obj/item/cell/proc/check_charge(amount) + return charge >= amount + +/obj/item/cell/proc/checked_use(amount, reserve) + if(!check_charge(amount + reserve)) + return 0 + return use(amount) + +/obj/item/cell/proc/use(amount) + // LEGACY - explosion? + if(rigged && amount > 0) + explode() + return 0 + // END + . = min(charge, amount) + charge -= . + last_use = world.time + update_icon() + +//* Calculations *// + +/** + * Returns percent remaining, [0, 100] + */ +/obj/item/cell/proc/percent() + return max_charge ? (100 * charge / max_charge) : 0 + +/** + * Returns ratio remaining, [0, 1] + */ +/obj/item/cell/proc/ratio() + return max_charge ? (charge / max_charge) : 0 + +//* Processing *// + +/obj/item/cell/process(delta_time) + if(!self_recharge) + return PROCESS_KILL + if(world.time < last_use + self_recharge_delay) + return + give(self_recharge_amount * delta_time) + +//* Rendering *// + +/obj/item/cell/update_icon() + if(rendering_system) + cut_overlays() + if(stripe_color) + var/image/stripe = image(icon, "cell-stripe") + stripe.color = stripe_color + add_overlay(stripe) + if(indicator_count) + var/image/indicator = image(icon, "cell-[charge <= 1? "empty" : "[ceil(charge / max_charge * 5)]"]") + indicator.color = indicator_color + add_overlay(indicator) + return ..() + +//* Setters *// + +/obj/item/cell/proc/set_charge(amount, update) + charge = clamp(amount, 0, max_charge) + if(update) + update_icon() diff --git a/code/modules/power/cells/device_cells.dm b/code/modules/power/cells/device_cells.dm deleted file mode 100644 index 51c67e60899..00000000000 --- a/code/modules/power/cells/device_cells.dm +++ /dev/null @@ -1,77 +0,0 @@ -//currently only used by energy-type guns, that may change in the future. -/obj/item/cell/device - name = "device power cell" - desc = "A small power cell designed to power handheld devices." - icon_state = "dcell" - item_state = "egg6" - w_class = WEIGHT_CLASS_SMALL - damage_force = 0 - throw_speed = 5 - throw_range = 7 - maxcharge = 480 - charge_amount = 5 - materials_base = list("metal" = 350, MAT_GLASS = 50) - preserve_item = 1 - - worth_intrinsic = 25 - -/obj/item/cell/device/empty - charge = 0 - -/obj/item/cell/device/weapon - name = "weapon power cell" - desc = "A small power cell designed to power handheld weaponry." - icon_state = "wcell" - maxcharge = 2400 - charge_amount = 20 - - worth_intrinsic = 50 - -/obj/item/cell/device/weapon/empty - charge = 0 - -/obj/item/cell/device/weapon/empproof - emp_proof = TRUE - -/obj/item/cell/device/weapon/recharge - name = "self-charging weapon power cell" - desc = "A small power cell designed to power handheld weaponry. This one recharges itself." -// icon_state = "wcell" //TODO: Different sprite - self_recharge = TRUE - charge_amount = 120 - charge_delay = 75 - -/obj/item/cell/device/weapon/recharge/captain - charge_amount = 160 //Recharges a lot more quickly... - charge_delay = 100 //... but it takes a while to get started - -/obj/item/cell/device/weapon/recharge/sniper - charge_amount = 600 - charge_delay = 100 - -/datum/category_item/catalogue/anomalous/precursor_a/alien_void_cell - name = "Precursor Alpha Object - Void Cell" - desc = "This is a very enigmatic and small machine. It is able to output a direct electrical current \ - from itself to another device or machine that it is connected to. Its shape has a similar form as \ - a battery cell, which might imply that the species who created these had a desire for some form of \ - a modular power supply.\ -

\ - These appear to be limited in throughput, only able to put out so much energy at a time. It is unknown \ - if this was intentional, or was a design constraint that the creators of this object had to work around. \ - Regardless, it will likely function inside of various devices which run off of conventional power cells.\ -

\ - Scanning similar objects may yield more information." - value = CATALOGUER_REWARD_EASY - -/obj/item/cell/device/weapon/recharge/alien - name = "void cell" - desc = "An alien technology that produces energy seemingly out of nowhere. Its small, cylinderal shape means it might be able to be used with human technology, perhaps?" - catalogue_data = list(/datum/category_item/catalogue/anomalous/precursor_a/alien_void_cell) - icon = 'icons/obj/abductor.dmi' - icon_state = "cell" - charge_amount = 120 // 5%. - charge_delay = 50 // Every five seconds, bit faster than the default. - origin_tech = list(TECH_POWER = 8, TECH_ENGINEERING = 6) - -/obj/item/cell/device/weapon/recharge/alien/update_icon() - return // No overlays please. diff --git a/code/modules/power/cells/power_cell.dm b/code/modules/power/cells/power_cell.dm new file mode 100644 index 00000000000..966ea78cf48 --- /dev/null +++ b/code/modules/power/cells/power_cell.dm @@ -0,0 +1,144 @@ +//* This file is explicitly licensed under the MIT license. *// +//* Copyright (c) 2024 Citadel Station Developers *// + +/** + * A prototype that stores core tuning for power cells. + * + * ## Are you fucking insane? + * + * * Yes. + * + * ## Why? + * + * * Power cells being persisteed with all their data can end really badly if an + * admin fucks up their VV-fu. + * Using prototypes allows for managed storage of things like names, descs, + * and other fluff data. + * + * ## What does / doesn't this do? + * + * * This **does not** encapsulate behavior. Power cells themselves do that. + * This is just a template for common tuning parameters. + */ +/datum/prototype/power_cell + //* Descriptors *// + // TODO: make sure these all apply if the prototype updates + + /// our cell name + /// + /// * used for type generation + var/cell_name = "unknown" + /// our cell description append. + /// + /// * used for type generation + var/cell_desc = "Some unknown technology, probably. What is this?" + + //* Capacity - Type Generation *// + // TODO: make sure these all apply if the prototype updates + + /// * automatically set via define / typegen + var/typegen_capacity_multiplier = 1 + /// * automatically set via define / typegen + /// * compounded with [typegen_capacity_multiplier] + var/typegen_capacity_multiplier_small = 1 * POWER_CELL_MULTIPLIER_SMALL + /// * automatically set via define / typegen + /// * compounded with [typegen_capacity_multiplier] + var/typegen_capacity_multiplier_medium = 1 * POWER_CELL_MULTIPLIER_MEDIUM + /// * automatically set via define / typegen + /// * compounded with [typegen_capacity_multiplier] + var/typegen_capacity_multiplier_large = 1 * POWER_CELL_MULTIPLIER_LARGE + /// * automatically set via define / typegen + /// * compounded with [typegen_capacity_multiplier] + var/typegen_capacity_multiplier_weapon = 1 * POWER_CELL_MULTIPLIER_WEAPON + + //* Materials - Type Generation *// + // TODO: make sure these all apply if the prototype updates + + /// * automatically set via define / typegen + var/typegen_material_multiply = 1 + /// * automatically set via define / typegen + /// * compounded with [typegen_material_multiply] + var/typegen_material_multiply_small = 1 + /// * automatically set via define / typegen + /// * compounded with [typegen_material_multiply] + var/typegen_material_multiply_medium = 7.5 + /// * automatically set via define / typegen + /// * compounded with [typegen_material_multiply] + var/typegen_material_multiply_large = 15 + /// * automatically set via define / typegen + /// * compounded with [typegen_material_multiply] + var/typegen_material_multiply_weapon = 2.5 + + /// sets base materials; negative values are allowed + /// * this is keyed as ids, not instances, of materials! materials are + /// resolved at init time. + /// * this is applied before typegen material multiply + var/list/typegen_materials_base + /// added to the base materials; negative values are allowed + /// * this is keyed as ids, not instances, of materials! materials are + /// resolved at init time. + /// * this is applied after typegen material multiply + var/list/typegen_materials_base_adjust + + //* Size - Type Generation *// + // TODO: make sure these all apply if the prototype updates + + var/typegen_w_class_small = WEIGHT_CLASS_SMALL + var/typegen_w_class_weapon = WEIGHT_CLASS_SMALL + var/typegen_w_class_medium = WEIGHT_CLASS_NORMAL + var/typegen_w_class_large = WEIGHT_CLASS_BULKY + + var/typegen_w_volume_small = ITEM_VOLUME_SMALL_CELL + var/typegen_w_volume_weapon = ITEM_VOLUME_WEAPON_CELL + var/typegen_w_volume_medium = ITEM_VOLUME_MEDIUM_CELL + var/typegen_w_volume_large = ITEM_VOLUME_LARGE_CELL + + //* Visuals - Type Generation *// + // TODO: make sure this applies if the prototype updates + + /// color of the cell's stripe + var/typegen_visual_stripe_color + /// color of the cell's indicator + var/typegen_visual_indicator_color = "#00e5ff" + + //* Worth / Materials *// + + // TODO: make sure these all apply if the prototype updates + var/typegen_worth_base_small = 10 + var/typegen_worth_base_medium = 30 + var/typegen_worth_base_large = 40 + var/typegen_worth_base_weapon = 75 + /// worth multiplier + /// + /// * set to null to say "we have no worth / are invaluable" (useful for infinite cells) + /// * null behaves like 0 right now but might not later + var/typegen_worth_multiplier = 1 + + //* Misc *// + + /// for subtypes that have reactions, as a tuning variable + /// + /// known integrations: + /// * used for base regen speed in cell units on regen cells + /// * used for reaction rate on microfission (cell units used per tick to regen) + var/c_reaction_multiplier = 1 + /// for subtypes that have reactions, as a tuning variable + /// + /// known integrations: + /// * used for base regen speed in cell units on regen cells + /// * used for reaction rate on microfission (cell units used per tick to regen) + var/c_reaction_adjust = 0 + /// for subtypes that have reactions, as a tuning variable + /// + /// known integrations: + /// * used for percent regen speed on regen cells + /// * used for total cell units over lifetime (fuel) on microfission + var/c_fuel_multiplier = 1 + /// for subtypes that have reactions, as a tuning variable + /// + /// known integrations: + /// * used for percent regen speed on regen cells + /// * used for total cell units over lifetime (fuel) on microfission + var/c_fuel_adjust = 0 + +// TODO: serializable diff --git a/code/modules/power/cells/power_cells.dm b/code/modules/power/cells/power_cells.dm deleted file mode 100644 index 16726d60055..00000000000 --- a/code/modules/power/cells/power_cells.dm +++ /dev/null @@ -1,146 +0,0 @@ -/obj/item/cell/crap - name = "\improper rechargable AA battery" - desc = "You can't top the plasma top." //TOTALLY TRADEMARK INFRINGEMENT - origin_tech = list(TECH_POWER = 0) - maxcharge = 500 - materials_base = list(MAT_STEEL = 700, MAT_GLASS = 40) - -/obj/item/cell/crap/empty - charge = 0 - -/obj/item/cell/secborg - name = "security borg rechargable D battery" - origin_tech = list(TECH_POWER = 0) - maxcharge = 600 //600 max charge / 100 charge per shot = six shots - materials_base = list(MAT_STEEL = 700, MAT_GLASS = 40) - -/obj/item/cell/secborg/empty - charge = 0 - -/obj/item/cell/apc - name = "heavy-duty power cell" - origin_tech = list(TECH_POWER = 1) - maxcharge = 5000 - materials_base = 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 - materials_base = list(MAT_STEEL = 700, MAT_GLASS = 60) - rating = 2 - -/obj/item/cell/high/empty - charge = 0 - -/obj/item/cell/super - name = "super-capacity power cell" - origin_tech = list(TECH_POWER = 5) - icon_state = "scell" - maxcharge = 20000 - materials_base = list(MAT_STEEL = 700, MAT_GLASS = 70) - rating = 3 - -/obj/item/cell/super/empty - charge = 0 - -/obj/item/cell/hyper - name = "hyper-capacity power cell" - origin_tech = list(TECH_POWER = 6) - icon_state = "hpcell" - maxcharge = 30000 - materials_base = list(MAT_STEEL = 700, MAT_GLASS = 80) - rating = 4 - -/obj/item/cell/hyper/empty - charge = 0 - -/obj/item/cell/infinite - name = "infinite-capacity power cell!" - icon_state = "icell" - origin_tech = null - maxcharge = 30000 //determines how badly mobs get shocked - materials_base = list(MAT_STEEL = 700, MAT_GLASS = 80) - rating = 6 - -/obj/item/cell/infinite/check_charge() - return 1 - -/obj/item/cell/infinite/use() - return 1 - -/obj/item/cell/potato - name = "potato battery" - desc = "A rechargable starch based power cell." - origin_tech = list(TECH_POWER = 1) - icon = 'icons/obj/power.dmi' //'icons/obj/harvest.dmi' - icon_state = "potato_cell" //"potato_battery" - charge = 100 - maxcharge = 300 - minor_fault = 1 - -/obj/item/cell/slime - name = "charged slime core" - desc = "A yellow slime core infused with phoron, it crackles with power." - origin_tech = list(TECH_POWER = 4, TECH_BIO = 5) - icon = 'icons/mob/slimes.dmi' //'icons/obj/harvest.dmi' - icon_state = "yellow slime extract" //"potato_battery" - description_info = "This 'cell' holds a max charge of 10k and self recharges over time." - maxcharge = 10000 - materials_base = null - rating = 5 - self_recharge = TRUE - charge_amount = 750 - -//Not actually a cell, but if people look for it, they'll probably look near other cells -/obj/item/fbp_backup_cell - name = "backup battery" - desc = "A small one-time-use chemical battery for synthetic crew when they are low on power in emergency situations." - icon = 'icons/obj/power.dmi' - icon_state = "fbp_cell" - w_class = WEIGHT_CLASS_SMALL - var/amount = 100 - var/used = FALSE - -/obj/item/fbp_backup_cell/Initialize(mapload) - . = ..() - add_overlay("[icon_state]1") - -/obj/item/fbp_backup_cell/using_as_item(atom/target, datum/event_args/actor/clickchain/clickchain, clickchain_flags) - var/mob/user = clickchain.performer - if(!used && ishuman(target)) - var/mob/living/carbon/human/H = target - if(H.isSynthetic() || fast_is_species_type(H, /datum/species/shapeshifter/holosphere)) - if(H.nutrition <= amount) - use(user,H) - else - to_chat(user,"The difference in potential is too great. [user == target ? "You have" : "[H] has"] too much charge to use such a small battery.") - else if(target == user) - to_chat(user,"You lick the cell, and your tongue tingles slightly.") - else - to_chat(user,"This cell is meant for use on humanoid synthetics only.") - return CLICKCHAIN_DO_NOT_PROPAGATE - return ..() - -/obj/item/fbp_backup_cell/proc/use(mob/living/user, mob/living/target) - if(used) - return - used = TRUE - desc += " This one has already been used." - cut_overlays() - target.nutrition += amount - user.custom_emote(message = "connects \the [src] to [user == target ? "their" : "[target]'s"] charging port, expending it.") - -/obj/item/cell/emergency_light - 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 - materials_base = list(MAT_GLASS = 20) - w_class = WEIGHT_CLASS_TINY - -/obj/item/cell/emergency_light/Initialize(mapload) - . = ..() - var/area/A = get_area(src) - if(!A.lightswitch || !A.light_power) - charge = 0 //For naturally depowered areas, we start with no power diff --git a/code/modules/power/cells/types/basic.dm b/code/modules/power/cells/types/basic.dm new file mode 100644 index 00000000000..829ee3fb783 --- /dev/null +++ b/code/modules/power/cells/types/basic.dm @@ -0,0 +1,126 @@ +//* This file is explicitly licensed under the MIT license. *// +//* Copyright (c) 2024 Citadel Station Developers *// + +/datum/prototype/power_cell/basic + abstract_type = /datum/prototype/power_cell/basic + typegen_capacity_multiplier = /datum/prototype/power_cell::typegen_capacity_multiplier * 1.0 + +/datum/prototype/design/generated/power_cell/basic + abstract_type = /datum/prototype/design/generated/power_cell/basic + +POWER_CELL_GENERATE_TYPES(/datum/prototype/power_cell/basic/tier_1, /basic/tier_1, "basic-t1") + +/datum/prototype/power_cell/basic/tier_1 + id = "basic-t1" + cell_name = "basic" + cell_desc = "Tier 1: This one is a standard design, and performs about what you expect for a power cell." + typegen_capacity_multiplier = /datum/prototype/power_cell/basic::typegen_capacity_multiplier * 1.0 + typegen_materials_base = list( + /datum/prototype/material/steel::id = 200, + /datum/prototype/material/glass::id = 75, + ) + typegen_visual_stripe_color = "#adfff3" + +/datum/prototype/design/generated/power_cell/basic/tier_1 + abstract_type = /datum/prototype/design/generated/power_cell/basic/tier_1 +GENERATE_DESIGN_FOR_NT_AUTOLATHE(/obj/item/cell/basic/tier_1/small, /power_cell/basic/tier_1/small, "powercell-basic-tier_1-small") +GENERATE_DESIGN_FOR_NT_AUTOLATHE(/obj/item/cell/basic/tier_1/medium, /power_cell/basic/tier_1/medium, "powercell-basic-tier_1-medium") +GENERATE_DESIGN_FOR_NT_AUTOLATHE(/obj/item/cell/basic/tier_1/large, /power_cell/basic/tier_1/large, "powercell-basic-tier_1-large") +GENERATE_DESIGN_FOR_NT_AUTOLATHE(/obj/item/cell/basic/tier_1/weapon, /power_cell/basic/tier_1/weapon, "powercell-basic-tier_1-weapon") + +POWER_CELL_GENERATE_TYPES(/datum/prototype/power_cell/basic/tier_2, /basic/tier_2, "basic-t2") +/datum/prototype/power_cell/basic/tier_2 + id = "basic-t2" + cell_name = "improved" + cell_desc = "Tier 2: This one utilizes more advanced materials in its electrolytes, allowing it to store a sizeable chunk more power than a basic cell." + typegen_capacity_multiplier = /datum/prototype/power_cell/basic::typegen_capacity_multiplier * 1.25 + typegen_materials_base = list( + /datum/prototype/material/steel::id = 250, + /datum/prototype/material/glass::id = 125, + /datum/prototype/material/copper::id = 50, + /datum/prototype/material/gold::id = 75, + /datum/prototype/material/silver::id = 75, + ) + typegen_visual_stripe_color = "#005a75" + +/datum/prototype/design/generated/power_cell/basic/tier_2 + abstract_type = /datum/prototype/design/generated/power_cell/basic/tier_2 +GENERATE_DESIGN_FOR_NT_AUTOLATHE(/obj/item/cell/basic/tier_2/small, /power_cell/basic/tier_2/small, "powercell-basic-tier_2-small") +GENERATE_DESIGN_FOR_NT_AUTOLATHE(/obj/item/cell/basic/tier_2/medium, /power_cell/basic/tier_2/medium, "powercell-basic-tier_2-medium") +GENERATE_DESIGN_FOR_NT_AUTOLATHE(/obj/item/cell/basic/tier_2/large, /power_cell/basic/tier_2/large, "powercell-basic-tier_2-large") +GENERATE_DESIGN_FOR_NT_AUTOLATHE(/obj/item/cell/basic/tier_2/weapon, /power_cell/basic/tier_2/weapon, "powercell-basic-tier_2-weapon") + +POWER_CELL_GENERATE_TYPES(/datum/prototype/power_cell/basic/tier_3, /basic/tier_3, "basic-t3") +/datum/prototype/power_cell/basic/tier_3 + id = "basic-t3" + cell_name = "advanced" + cell_desc = "Tier 3: This one is even more overtuned than an upgraded cell, utilizing novel crystalline lattices to improve energy densities." + typegen_capacity_multiplier = /datum/prototype/power_cell/basic::typegen_capacity_multiplier * 1.5 + typegen_materials_base = list( + /datum/prototype/material/steel::id = 175, + /datum/prototype/material/glass::id = 100, + /datum/prototype/material/copper::id = 100, + /datum/prototype/material/gold::id = 100, + /datum/prototype/material/silver::id = 100, + /datum/prototype/material/diamond::id = 250, + /datum/prototype/material/durasteel::id = 100, + /datum/prototype/material/verdantium::id = 450, + ) + typegen_visual_stripe_color = "#003fc6" + +/datum/prototype/design/generated/power_cell/basic/tier_3 + abstract_type = /datum/prototype/design/generated/power_cell/basic/tier_3 +GENERATE_DESIGN_FOR_NT_PROTOLATHE(/obj/item/cell/basic/tier_3/small, /power_cell/basic/tier_3/small, "powercell-basic-tier_3-small") +GENERATE_DESIGN_FOR_NT_PROTOLATHE(/obj/item/cell/basic/tier_3/medium, /power_cell/basic/tier_3/medium, "powercell-basic-tier_3-medium") +GENERATE_DESIGN_FOR_NT_PROTOLATHE(/obj/item/cell/basic/tier_3/large, /power_cell/basic/tier_3/large, "powercell-basic-tier_3-large") +GENERATE_DESIGN_FOR_NT_PROTOLATHE(/obj/item/cell/basic/tier_3/weapon, /power_cell/basic/tier_3/weapon, "powercell-basic-tier_3-weapon") + +POWER_CELL_GENERATE_TYPES(/datum/prototype/power_cell/basic/tier_4, /basic/tier_4, "basic-t4") +/datum/prototype/power_cell/basic/tier_4 + id = "basic-t4" + cell_name = "superdense" + cell_desc = "Tier 4: An ultradense power cell made from special, low-resistance alloys." + typegen_capacity_multiplier = /datum/prototype/power_cell/basic::typegen_capacity_multiplier * 1.75 + typegen_materials_base = list( + /datum/prototype/material/steel::id = 200, + /datum/prototype/material/glass::id = 200, + /datum/prototype/material/copper::id = 200, + /datum/prototype/material/gold::id = 500, + /datum/prototype/material/silver::id = 250, + /datum/prototype/material/verdantium::id = 50, + /datum/prototype/material/morphium::id = 300, + /datum/prototype/material/valhollide::id = 350, + ) + typegen_visual_stripe_color = "#7451ff" + +/datum/prototype/design/generated/power_cell/basic/tier_4 + abstract_type = /datum/prototype/design/generated/power_cell/basic/tier_4 +GENERATE_DESIGN_FOR_NT_PROTOLATHE(/obj/item/cell/basic/tier_4/small, /power_cell/basic/tier_4/small, "powercell-basic-tier_4-small") +GENERATE_DESIGN_FOR_NT_PROTOLATHE(/obj/item/cell/basic/tier_4/medium, /power_cell/basic/tier_4/medium, "powercell-basic-tier_4-medium") +GENERATE_DESIGN_FOR_NT_PROTOLATHE(/obj/item/cell/basic/tier_4/large, /power_cell/basic/tier_4/large, "powercell-basic-tier_4-large") +GENERATE_DESIGN_FOR_NT_PROTOLATHE(/obj/item/cell/basic/tier_4/weapon, /power_cell/basic/tier_4/weapon, "powercell-basic-tier_4-weapon") + +POWER_CELL_GENERATE_TYPES(/datum/prototype/power_cell/basic/tier_5, /basic/tier_5, "basic-t5") +/datum/prototype/power_cell/basic/tier_5 + id = "basic-t5" + cell_name = "ultratech" + cell_desc = "Tier 5: This indecipherable cell crams unbelievable amounts of energy \ + into a storage matrix fabricated out of exotic materials." + typegen_capacity_multiplier = /datum/prototype/power_cell/basic::typegen_capacity_multiplier * 2.25 + typegen_materials_base = list( + /datum/prototype/material/steel::id = 175, + /datum/prototype/material/glass::id = 350, + /datum/prototype/material/lead::id = 750, + /datum/prototype/material/silver::id = 750, + /datum/prototype/material/verdantium::id = 250, + /datum/prototype/material/valhollide::id = 750, + /datum/prototype/material/supermatter::id = 350, + ) + typegen_visual_stripe_color = "#ff81fd" + +/datum/prototype/design/generated/power_cell/basic/tier_5 + abstract_type = /datum/prototype/design/generated/power_cell/basic/tier_5 +GENERATE_DESIGN_FOR_NT_PROTOLATHE(/obj/item/cell/basic/tier_5/small, /power_cell/basic/tier_5/small, "powercell-basic-tier_5-small") +GENERATE_DESIGN_FOR_NT_PROTOLATHE(/obj/item/cell/basic/tier_5/medium, /power_cell/basic/tier_5/medium, "powercell-basic-tier_5-medium") +GENERATE_DESIGN_FOR_NT_PROTOLATHE(/obj/item/cell/basic/tier_5/large, /power_cell/basic/tier_5/large, "powercell-basic-tier_5-large") +GENERATE_DESIGN_FOR_NT_PROTOLATHE(/obj/item/cell/basic/tier_5/weapon, /power_cell/basic/tier_5/weapon, "powercell-basic-tier_5-weapon") diff --git a/code/modules/power/cells/types/infinite.dm b/code/modules/power/cells/types/infinite.dm new file mode 100644 index 00000000000..d6726c7219f --- /dev/null +++ b/code/modules/power/cells/types/infinite.dm @@ -0,0 +1,26 @@ +//* This file is explicitly licensed under the MIT license. *// +//* Copyright (c) 2024 Citadel Station Developers *// + +POWER_CELL_GENERATE_TYPES(/datum/prototype/power_cell/infinite, /infinite, "infinite") +/datum/prototype/power_cell/infinite + id = "infinite" + cell_name = "fractal" + cell_desc = "This one is unlike anything you've seen before, boasting a seemingly limitless energy output." + + typegen_visual_stripe_color = "#ffff00" + typegen_worth_multiplier = null + +/obj/item/cell/infinite/use(amount) + return amount + +/obj/item/cell/infinite/give(amount, force) + return 0 + +/obj/item/cell/infinite/check_charge(amount) + return TRUE + +/obj/item/cell/infinite/amount_missing() + return 0 + +/obj/item/cell/infinite/fully_charged() + return TRUE diff --git a/code/modules/power/cells/types/microfission.dm b/code/modules/power/cells/types/microfission.dm new file mode 100644 index 00000000000..1fac988d387 --- /dev/null +++ b/code/modules/power/cells/types/microfission.dm @@ -0,0 +1,172 @@ +//* This file is explicitly licensed under the MIT license. *// +//* Copyright (c) 2024 Citadel Station Developers *// + +// ---- lore note ---- +// the justification for why this is a thing is [i don't care] +// go refluff it if you want this is a generic "makes radiation to make power" idea +// i literally dgaf what is written here so if you wanna bikeshed over it bikeshed +// yourself outside of my PR lol +POWER_CELL_GENERATE_TYPES(/datum/prototype/power_cell/microfission, /microfission, "microfission") +/datum/prototype/power_cell/microfission + id = "microfission" + cell_name = "microfission" + cell_desc = "This one contains highly enriched nuclear material, which is constantly used to recharge the cell with an induced process." + + typegen_visual_stripe_color = "#007700" + typegen_capacity_multiplier = 3 / 4 + typegen_materials_base = list( + /datum/prototype/material/steel::id = 350, + /datum/prototype/material/glass::id = 150, + /datum/prototype/material/copper::id = 75, + /datum/prototype/material/gold::id = 75, + /datum/prototype/material/lead::id = 300, + /datum/prototype/material/silver::id = 150, + /datum/prototype/material/uranium::id = 200, + ) + +/datum/prototype/design/generated/power_cell/microfission + abstract_type = /datum/prototype/design/generated/power_cell/microfission +GENERATE_DESIGN_FOR_NT_PROTOLATHE(/obj/item/cell/microfission/small, /power_cell/microfission/small, "powercell-microfission-small") +GENERATE_DESIGN_FOR_NT_PROTOLATHE(/obj/item/cell/microfission/medium, /power_cell/microfission/medium, "powercell-microfission-medium") +GENERATE_DESIGN_FOR_NT_PROTOLATHE(/obj/item/cell/microfission/large, /power_cell/microfission/large, "powercell-microfission-large") +GENERATE_DESIGN_FOR_NT_PROTOLATHE(/obj/item/cell/microfission/weapon, /power_cell/microfission/weapon, "powercell-microfission-weapon") + +/** + * COBALT-60: DROP AND RUN + */ +/obj/item/cell/microfission + integrity = 200 + integrity_max = 200 + integrity_failure = 0.66 * 200 + + /// are we leaking? + var/leaking = FALSE + /// radiation power at minimum charge rate (or when not charging) + var/leaking_strength_min = RAD_INTENSITY_CELL_MICROFISSION_LEAK_MINIMUM + /// radiation power at maximum charge rate + var/leaking_strength_max = RAD_INTENSITY_CELL_MICROFISSION_LEAK_MAXIMUM + /// radiation power falloff + var/leaking_falloff = RAD_FALLOFF_CELL_MICROFISSION + + /// additional cell units able to be recharged + /// * cached computation + var/tmp/c_regen_left + /// original [regen_left] + /// * cached computation + /// * modulated by `c_fuel_*` on cell datums + var/tmp/c_regen_initial + /// * cached computation + var/tmp/c_regen_min_per_second + /// * cached computation + var/tmp/c_regen_max_per_second + + /// if set, hard-sets additional cell units to be recharged; overrides [regen_as_multiplier] + /// * modulated by `c_fuel_*` on cell datums + var/regen_as_static + /// if set, sets cell units to be recharged to be a multiplier of our maxcharge + /// * modulated by `c_fuel_*` on cell datums + var/regen_as_multiplier = 20 * (4 / 3) + /// minimum recharge per second + /// * modulated by `c_reaction_*` on cell datums + var/regen_min_per_second = STATIC_KW_TO_CELL_UNITS(2.5, 1) + /// maximum recharge per second + /// * modulated by `c_reaction_*` on cell datums + var/regen_max_per_second = STATIC_KW_TO_CELL_UNITS(25, 1) + /// at what % of [regen_initial] we start to have regen drop + var/regen_drop_start = 2 / 3 + /// at what % of [regen_initial] we fall to minimum regen + var/regen_drop_end = 1 / 10 + +/obj/item/cell/microfission/Initialize(mapload) + . = ..() + // TODO: automated way to update when prototypes change? + if(cell_datum) + c_regen_left = c_regen_initial = (isnull(regen_as_static) ? (regen_as_multiplier * max_charge) : regen_as_static) \ + * cell_datum.c_fuel_adjust + cell_datum.c_fuel_multiplier + c_regen_min_per_second = max(0, regen_min_per_second * cell_datum.c_reaction_multiplier + cell_datum.c_reaction_adjust) + c_regen_max_per_second = max(0, regen_max_per_second * cell_datum.c_reaction_multiplier + cell_datum.c_reaction_adjust) + else + c_regen_left = c_regen_initial = (isnull(regen_as_static) ? (regen_as_multiplier * max_charge) : regen_as_static) + c_regen_min_per_second = regen_min_per_second + c_regen_max_per_second = regen_max_per_second + + START_PROCESSING(SSobj, src) + +/obj/item/cell/microfission/Destroy() + STOP_PROCESSING(SSobj, src) + return ..() + +/obj/item/cell/microfission/use(amount) + . = ..() + // wake if needed + if(!(datum_flags & DF_ISPROCESSING)) + START_PROCESSING(SSobj, src) + +/obj/item/cell/microfission/set_charge(amount, update) + ..() + if(charge < max_charge) + // wake if needed + if(!(datum_flags & DF_ISPROCESSING)) + START_PROCESSING(SSobj, src) + +/obj/item/cell/microfission/process(delta_time) + ..() + var/reaction_ratio = 0 + if(charge >= max_charge) + // don't charge + if(!leaking) + return PROCESS_KILL + else + // calc charge rate + if(c_regen_left < c_regen_initial * regen_drop_end) + reaction_ratio = 0 + else if(c_regen_left > c_regen_initial * regen_drop_start) + reaction_ratio = 1 + else + // the part of the ratio that is bottom and high end can be ignored + var/nonaffecting_portion = c_regen_initial * (1 - (regen_drop_start + regen_drop_end)) + // subtract the bottom end of the bar that would already fall to minimum rate + reaction_ratio = (c_regen_left - (c_regen_initial * regen_drop_end)) / (nonaffecting_portion) + + var/effective_charge_units = LERP(c_regen_min_per_second, c_regen_max_per_second, reaction_ratio) + if(effective_charge_units) + // just to be nice, allow overcharging. + give(effective_charge_units, TRUE) + else if(!leaking) + return PROCESS_KILL + if(leaking) + SSradiation.radiation_pulse( + src, + LERP(leaking_strength_min, leaking_strength_min, reaction_ratio), + leaking_falloff, + TRUE, + FALSE, + ) + +/obj/item/cell/microfission/atom_break() + ..() + set_leaking(TRUE) + +/obj/item/cell/microfission/atom_fix() + ..() + set_leaking(FALSE) + +/obj/item/cell/microfission/proc/set_leaking(new_leaking) + leaking = new_leaking + do + var/turf/our_turf = get_turf(src) + log_game("MISC: Microfission cell at [COORD(our_turf)] leaking set to [new_leaking][inv_inside ? ", carried by [key_name(inv_inside.owner)]" : ""]") + while(FALSE) + if(leaking) + add_filter("microfission-cell-leak", 10, outline_filter(2, "#14ff71")) + var/animating_filter = get_filter("microfission-cell-leak") + animate(animating_filter, alpha = 75, time = 15, loop = -1) + animate(alpha = 25, time = 25) + else + remove_filter("microfission-cell-leak") + update_icon() + +/obj/item/cell/microfission/update_icon() + . = ..() + if(leaking) + add_overlay("[base_icon_state]-crack") diff --git a/code/modules/power/cells/types/regen.dm b/code/modules/power/cells/types/regen.dm new file mode 100644 index 00000000000..e41d2176b3d --- /dev/null +++ b/code/modules/power/cells/types/regen.dm @@ -0,0 +1,56 @@ +//* This file is explicitly licensed under the MIT license. *// +//* Copyright (c) 2024 Citadel Station Developers *// + +POWER_CELL_GENERATE_TYPES(/datum/prototype/power_cell/regen, /regen, "regen") +/datum/prototype/power_cell/regen + id = "regen" + cell_name = "void" + cell_desc = "This one is unlike anything you've seen before, able to generate energy seemingly out of nowhere." + typegen_visual_stripe_color = "#aa00aa" + + // boost for larger cells + c_fuel_adjust = 100 / ((6 MINUTES) / (1 SECONDS)) * 0.01 + // static regen rate + c_reaction_adjust = 30 + +POWER_CELL_GENERATE_TYPES(/datum/prototype/power_cell/regen/fractal, /regen/fractal, "regen-fractal") +/datum/prototype/power_cell/regen/fractal + id = "fractal" + cell_name = "fractal" + cell_desc = "You can't even begin to comprehend what this is, other than the fact it's out of this world and \ + making energy out of nowhere." + typegen_visual_stripe_color = "#c79aff" + + // boost for larger cells + c_fuel_adjust = 100 / ((3 MINUTES) / (1 SECONDS)) * 0.01 + // static regen rate + c_reaction_adjust = 60 + +/obj/item/cell/regen + // in cell units + // * multiplied by `c_reaction_multiplier` + // * adjusted by `c_reaction_adjust` + var/base_regen_static = 0 + // in % of the cell's capacity + // * multiplied by `c_fuel_multplier` + // * adjusted by `c_fuel_adjust` + var/base_regen_ratio = 0 + +/obj/item/cell/regen/Initialize() + . = ..() + // TODO: automated way to update when prototypes change? + var/c_base_regen_static = cell_datum ? \ + base_regen_static * cell_datum.c_reaction_multiplier + cell_datum.c_reaction_adjust : \ + base_regen_static + var/c_base_regen_ratio = cell_datum ? \ + base_regen_ratio * cell_datum.c_fuel_multiplier + cell_datum.c_fuel_adjust : \ + base_regen_ratio + self_recharge = TRUE + self_recharge_amount = c_base_regen_static + c_base_regen_ratio * max_charge + START_PROCESSING(SSobj, src) + +/obj/item/cell/regen/fractal + // TODO: relore this, the generic precursor shit is boring. + catalogue_data = list( + /datum/category_item/catalogue/anomalous/precursor_a/alien_void_cell, + ) diff --git a/code/modules/power/cells/types/special/slime_core.dm b/code/modules/power/cells/types/special/slime_core.dm new file mode 100644 index 00000000000..099e6a5eef9 --- /dev/null +++ b/code/modules/power/cells/types/special/slime_core.dm @@ -0,0 +1,120 @@ +//* This file is explicitly licensed under the MIT license. *// +//* Copyright (c) 2024 Citadel Station Developers *// + +/obj/item/cell/slime_core + name = "charged slime core" + desc = "A chunk of charged slime lattice, pulsing with energy. Is this even ethical?" + icon = 'icons/items/power/cells/special/slime_core.dmi' + icon_state = "core" + rendering_system = FALSE + rating = 5 + self_recharge = TRUE + + var/join_type + var/join_result + var/split_result + +/obj/item/cell/slime_core/using_item_on(obj/item/using, datum/event_args/actor/clickchain/clickchain, clickchain_flags) + . = ..() + if(. & CLICKCHAIN_FLAGS_INTERACT_ABORT) + return + if(istype(using, join_type) && join_result) + var/obj/item/cell/joining = using + // TODO: sound + // TODO: log + var/obj/item/cell/joined = new join_result + joining.transfer_fingerprints_to(joined) + src.transfer_fingerprints_to(joined) + joined.set_integrity(joined.integrity_max * ((src.integrity + joining.integrity) + (src.integrity_max + joining.integrity_max))) + joined.set_charge(joined.max_charge * ((src.charge + joining.charge) / (src.max_charge + joining.max_charge))) + clickchain.chat_feedback(SPAN_NOTICE("You squeeze both [src]\s together, forming a [joined]."), target = src) + qdel(using) + qdel(src) + // TODO: check telekinesis + clickchain.performer.put_in_hands_or_drop(joined) + return CLICKCHAIN_DO_NOT_PROPAGATE | CLICKCHAIN_DID_SOMETHING + +/obj/item/cell/slime_core/on_attack_hand(datum/event_args/actor/clickchain/clickchain, clickchain_flags) + . = ..() + if(. & CLICKCHAIN_FLAGS_INTERACT_ABORT) + return + // TODO: allow context menu version + if(split_result && clickchain.performer.is_holding_inactive(src)) + // TODO: sound + // TODO: log + var/obj/item/cell/split1 = new split_result + var/obj/item/cell/split2 = new split_result + transfer_fingerprints_to(split1) + transfer_fingerprints_to(split2) + var/split_integrity = split1.integrity_max * (integrity / integrity_max) + split1.set_integrity(split_integrity) + split2.set_integrity(split_integrity) + var/split_charge = split1.max_charge * (charge / max_charge) + split1.set_charge(split_charge) + split2.set_charge(split_charge) + clickchain.chat_feedback(SPAN_NOTICE("You squeeze through [src]'s middle, splitting it into two [split1]\s."), target = src) + qdel(src) + // TODO: check telekinesis + clickchain.performer.put_in_hands_or_drop(split1) + clickchain.performer.put_in_hands_or_drop(split2) + return CLICKCHAIN_DO_NOT_PROPAGATE | CLICKCHAIN_DID_SOMETHING + +/obj/item/cell/slime_core/eighth + name = "charged slime sliver" + desc = /obj/item/cell/slime_core::desc + " This one seems to be one-eighth of a full core, and can be combined with another eight to form a fourth-core." + icon_state = "core-eighth" + + join_type = /obj/item/cell/slime_core/eighth + join_result = /obj/item/cell/slime_core/fourth + split_result = null + + max_charge = POWER_CELL_CAPACITY_SMALL * (5 / 6) + self_recharge_amount = POWER_CELL_CAPACITY_SMALL * (5 / 6) / ((4 MINUTES) / (1 SECONDS)) + cell_type = CELL_TYPE_SMALL + w_class = WEIGHT_CLASS_SMALL + weight_volume = ITEM_VOLUME_SMALL_CELL / 2 + +/obj/item/cell/slime_core/fourth + name = "charged slime fragment" + desc = /obj/item/cell/slime_core::desc + " This one seems to be one-fourth of a full core, and can be combined with another fourth to form a half-core." + icon_state = "core-fourth" + + join_type = /obj/item/cell/slime_core/fourth + join_result = /obj/item/cell/slime_core/half + split_result = /obj/item/cell/slime_core/eighth + + max_charge = POWER_CELL_CAPACITY_WEAPON * (5 / 6) + self_recharge_amount = POWER_CELL_CAPACITY_WEAPON * (5 / 6) / ((4 MINUTES) / (1 SECONDS)) + cell_type = CELL_TYPE_WEAPON + w_class = WEIGHT_CLASS_SMALL + weight_volume = ITEM_VOLUME_WEAPON_CELL / 2 + +/obj/item/cell/slime_core/half + name = "charged slime globule" + desc = /obj/item/cell/slime_core::desc + " This one seems to be one-half of a full core, and can be combined with another half to reform the full core." + icon_state = "core-half" + + join_type = /obj/item/cell/slime_core/half + join_result = /obj/item/cell/slime_core/whole + split_result = /obj/item/cell/slime_core/fourth + + max_charge = POWER_CELL_CAPACITY_MEDIUM * (5 / 6) + self_recharge_amount = POWER_CELL_CAPACITY_MEDIUM * (5 / 6) / ((4 MINUTES) / (1 SECONDS)) + cell_type = CELL_TYPE_MEDIUM + w_class = WEIGHT_CLASS_NORMAL + weight_volume = ITEM_VOLUME_MEDIUM_CELL / 2 + +/obj/item/cell/slime_core/whole + name = "charged slime core" + desc = /obj/item/cell/slime_core::desc + " This one seems to be a full core, and can be split apart into two halves." + icon_state = "core" + + join_type = null + join_result = null + split_result = /obj/item/cell/slime_core/half + + max_charge = POWER_CELL_CAPACITY_LARGE * (5 / 6) + self_recharge_amount = POWER_CELL_CAPACITY_LARGE * (5 / 6) / ((4 MINUTES) / (1 SECONDS)) + cell_type = CELL_TYPE_LARGE + w_class = WEIGHT_CLASS_NORMAL + weight_volume = ITEM_VOLUME_LARGE_CELL / 2 diff --git a/code/modules/power/lighting/lighting.dm b/code/modules/power/lighting/lighting.dm index 00881e3edc4..60913a6243f 100644 --- a/code/modules/power/lighting/lighting.dm +++ b/code/modules/power/lighting/lighting.dm @@ -669,7 +669,7 @@ var/global/list/light_type_cache = list() if(LIGHT_BROKEN) . += "[desc] The [fitting] has been smashed." if(cell) - to_chat(user, "Its backup power charge meter reads [round((cell.charge / cell.maxcharge) * 100, 0.1)]%.") + to_chat(user, "Its backup power charge meter reads [round((cell.charge / cell.max_charge) * 100, 0.1)]%.") /obj/machinery/light/proc/get_fitting_name() var/obj/item/light/L = light_type @@ -838,7 +838,7 @@ var/global/list/light_type_cache = list() status = LIGHT_BURNED return FALSE cell.use(pwr) - set_light(brightness_range * bulb_emergency_brightness_mul, max(bulb_emergency_pow_min, bulb_emergency_pow_mul * (cell.charge / cell.maxcharge)), bulb_emergency_colour) + set_light(brightness_range * bulb_emergency_brightness_mul, max(bulb_emergency_pow_min, bulb_emergency_pow_mul * (cell.charge / cell.max_charge)), bulb_emergency_colour) return TRUE @@ -989,9 +989,9 @@ var/global/list/light_type_cache = list() if(has_power()) emergency_mode = FALSE update(FALSE) - if(cell.charge == cell.maxcharge) + if(cell.charge == cell.max_charge) return PROCESS_KILL - cell.charge = min(cell.maxcharge, cell.charge + LIGHT_EMERGENCY_POWER_USE*2) //Recharge emergency power automatically while not using it + cell.charge = min(cell.max_charge, cell.charge + LIGHT_EMERGENCY_POWER_USE*2) //Recharge emergency power automatically while not using it if(emergency_mode && !use_emergency_power(LIGHT_EMERGENCY_POWER_USE)) update(FALSE) //Disables emergency mode and sets the color to normal diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index e23b5e969a3..ec13273d7a6 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -577,6 +577,7 @@ // Void Core, power source for Abductor ships and bases. // Provides a lot of power, but tends to explode when mistreated. +// todo: rewrite this shit /obj/machinery/power/rtg/abductor name = "Void Core" icon_state = "core-nocell" @@ -587,7 +588,7 @@ buckle_allowed = FALSE pixel_y = 7 var/going_kaboom = FALSE // Is it about to explode? - var/obj/item/cell/device/weapon/recharge/alien + var/obj/item/cell/regen/fractal/large/alien var/icon_base = "core" var/state_change = TRUE @@ -629,7 +630,7 @@ /obj/machinery/power/rtg/abductor/attackby(obj/item/I, mob/user, params) state_change = TRUE //Can't tell if parent did something - if(istype(I, /obj/item/cell/device/weapon/recharge/alien) && !alien) + if(istype(I, /obj/item/cell/regen/fractal/large) && !alien) if(!user.attempt_insert_item_for_installation(I, src)) return alien = I @@ -675,6 +676,7 @@ /obj/machinery/power/rtg/abductor/built/Initialize(mapload) . = ..() + QDEL_NULL(alien) alien = new(src) RefreshParts() @@ -689,5 +691,6 @@ /obj/machinery/power/rtg/abductor/hybrid/built/Initialize(mapload) . = ..() - alien = new /obj/item/cell/device/weapon/recharge/alien(src) + QDEL_NULL(alien) + alien = new /obj/item/cell/regen/fractal/large(src) RefreshParts() diff --git a/code/modules/projectiles/ammunition/ammo_casing.dm b/code/modules/projectiles/ammunition/ammo_casing.dm index df7fc774d46..99ce49d8cd6 100644 --- a/code/modules/projectiles/ammunition/ammo_casing.dm +++ b/code/modules/projectiles/ammunition/ammo_casing.dm @@ -9,6 +9,7 @@ w_class = WEIGHT_CLASS_TINY drop_sound = 'sound/items/drop/ring.ogg' pickup_sound = 'sound/items/pickup/ring.ogg' + weight_volume = ITEM_VOLUME_AMMO_CASING //* Casing *// /// casing flags - see __DEFINES/projectiles/ammo_casing.dm diff --git a/code/modules/projectiles/guns/gun.dm b/code/modules/projectiles/guns/gun.dm index 4830fbeb45f..b986f328a34 100644 --- a/code/modules/projectiles/guns/gun.dm +++ b/code/modules/projectiles/guns/gun.dm @@ -213,9 +213,9 @@ /// do we use a cell slot? var/cell_system = FALSE /// cell type to start with - var/cell_type = /obj/item/cell/device/weapon - /// -_- - var/cell_system_legacy_use_device = TRUE + var/cell_type = /obj/item/cell/basic/tier_1/weapon + /// cell types accepted + var/cell_accept = CELL_TYPE_WEAPON //* Rendering *// @@ -303,10 +303,8 @@ //* cell system *// if(cell_system) - var/datum/object_system/cell_slot/slot = init_cell_slot(cell_type) - slot.legacy_use_device_cells = cell_system_legacy_use_device - slot.remove_yank_offhand = TRUE - slot.remove_yank_context = TRUE + init_cell_slot_easy_tool(cell_type, cell_accept) + obj_cell_slot?.receive_inducer = FALSE //* modular components *// if(islist(modular_component_slots)) @@ -379,7 +377,7 @@ if(!obj_cell_slot.cell) . += "Its cell slot is empty." else - . += "Its cell is at [round(obj_cell_slot.cell.charge / obj_cell_slot.cell.maxcharge * 100, 1)]% charge." + . += "Its cell is at [round(obj_cell_slot.cell.charge / obj_cell_slot.cell.max_charge * 100, 1)]% charge." for(var/obj/item/gun_attachment/attachment as anything in attachments) . += "It has [attachment] installed on its [attachment.attachment_slot].[attachment.can_detach ? "" : " It doesn't look like it can be removed."]" for(var/obj/item/gun_component/component as anything in modular_components) diff --git a/code/modules/projectiles/guns/gun/launcher/vox.dm b/code/modules/projectiles/guns/gun/launcher/vox.dm index 04c8fb0bc73..3743cadc691 100644 --- a/code/modules/projectiles/guns/gun/launcher/vox.dm +++ b/code/modules/projectiles/guns/gun/launcher/vox.dm @@ -64,7 +64,7 @@ heavy = TRUE charge_cost = 300 projectile_type = /obj/projectile/beam/stun/darkmatter - cell_type = /obj/item/cell/device/weapon/recharge + cell_type = /obj/item/cell/regen/weapon legacy_battery_lock = 1 accuracy = 30 @@ -141,7 +141,7 @@ item_state = "noise" w_class = WEIGHT_CLASS_HUGE heavy = TRUE - cell_type = /obj/item/cell/device/weapon/recharge + cell_type = /obj/item/cell/regen/weapon legacy_battery_lock = 1 charge_cost = 400 diff --git a/code/modules/projectiles/guns/gun/projectile/ballistic/magnetic.dm b/code/modules/projectiles/guns/gun/projectile/ballistic/magnetic.dm index bb9658af17b..df8d995bb9c 100644 --- a/code/modules/projectiles/guns/gun/projectile/ballistic/magnetic.dm +++ b/code/modules/projectiles/guns/gun/projectile/ballistic/magnetic.dm @@ -3,8 +3,8 @@ /obj/item/gun/projectile/ballistic/magnetic cell_system = TRUE - cell_system_legacy_use_device = TRUE - cell_type = /obj/item/cell/device/weapon + cell_accept = CELL_TYPE_WEAPON + cell_type = /obj/item/cell/basic/tier_1/weapon modular_component_slots = list( GUN_COMPONENT_ACCELERATION_COIL = 1, @@ -14,7 +14,7 @@ ) /// base power draw per shot in cell units - var/base_charge_cost = /obj/item/cell/device/weapon::maxcharge * (1 / 24) + var/base_charge_cost = /obj/item/cell/basic/tier_1/weapon::max_charge * (1 / 24) /// Render battery state. /// diff --git a/code/modules/projectiles/guns/gun/projectile/energy-modular.dm b/code/modules/projectiles/guns/gun/projectile/energy-modular.dm index fc6dd2b11d1..6710d93eb9f 100644 --- a/code/modules/projectiles/guns/gun/projectile/energy-modular.dm +++ b/code/modules/projectiles/guns/gun/projectile/energy-modular.dm @@ -5,6 +5,7 @@ ..() // auto switch if(component == modular_particle_array_active) + modular_particle_array_active = null auto_set_particle_array(null) /obj/item/gun/projectile/energy/on_modular_component_install(obj/item/gun_component/component, datum/event_args/actor/actor, silent) diff --git a/code/modules/projectiles/guns/gun/projectile/energy.dm b/code/modules/projectiles/guns/gun/projectile/energy.dm index 5ddef2e4a1a..a543b469fb5 100644 --- a/code/modules/projectiles/guns/gun/projectile/energy.dm +++ b/code/modules/projectiles/guns/gun/projectile/energy.dm @@ -16,7 +16,8 @@ dispersion = list(0) cell_system = TRUE - cell_type = /obj/item/cell/device/weapon + cell_type = /obj/item/cell/basic/tier_1/weapon + cell_accept = CELL_TYPE_WEAPON | CELL_TYPE_SMALL firemodes = /datum/firemode/energy //* Modular System *// @@ -57,7 +58,7 @@ //! LEGACY BELOW !// // todo: do not use this var, use firemodes - var/charge_cost = 240 //How much energy is needed to fire. + var/charge_cost = POWER_CELL_CAPACITY_WEAPON / 20 projectile_type = /obj/projectile/beam/practice @@ -65,6 +66,7 @@ var/charge_meter = 1 //if set, the icon state will be chosen based on the current charge //self-recharging + // TODO: torch this and use cells that self-charge instead var/self_recharge = 0 //if set, the weapon will recharge itself var/use_external_power = 0 //if set, the weapon will look for an external power source to draw from, otherwise it recharges magically var/use_organic_power = 0 // If set, the weapon will draw from nutrition or blood. @@ -77,7 +79,8 @@ /obj/item/gun/projectile/energy/Initialize(mapload) if(self_recharge) cell_system = TRUE - cell_type = cell_type || /obj/item/cell/device/weapon + cell_type ||= /obj/item/cell/basic/tier_1/weapon + legacy_battery_lock = TRUE START_PROCESSING(SSobj, src) . = ..() // todo: this isn't necessarily needed @@ -104,14 +107,14 @@ /obj/item/gun/projectile/energy/process(delta_time) if(self_recharge) //Every [recharge_time] ticks, recharge a shot for the battery if(world.time > last_fire + charge_delay) //Doesn't work if you've fired recently - if(!obj_cell_slot.cell || obj_cell_slot.cell.charge >= obj_cell_slot.cell.maxcharge) + if(!obj_cell_slot.cell || obj_cell_slot.cell.charge >= obj_cell_slot.cell.max_charge) return 0 // check if we actually need to recharge charge_tick++ if(charge_tick < recharge_time) return 0 charge_tick = 0 - var/rechargeamt = obj_cell_slot.cell.maxcharge*0.2 + var/rechargeamt = obj_cell_slot.cell.max_charge*0.2 if(use_external_power) var/obj/item/cell/external = get_external_power_supply() @@ -258,11 +261,11 @@ if(!estimated_cost) return 1 if(rounded) - var/full_shots = floor(cell.maxcharge / estimated_cost) + var/full_shots = floor(cell.max_charge / estimated_cost) if(!full_shots) return 0 return min(1, floor(cell.charge / estimated_cost) / full_shots) - return min(1, cell.maxcharge ? cell.charge / cell.maxcharge : 0) + return min(1, cell.max_charge ? cell.charge / cell.max_charge : 0) /** * Estimates how many shots the gun's power supply has charge for @@ -305,7 +308,7 @@ var/estimated_cost = get_estimated_charge_cost() if(!estimated_cost) return INFINITY - return floor(cell.maxcharge / estimated_cost) + return floor(cell.max_charge / estimated_cost) //* Power *// diff --git a/code/modules/projectiles/guns/gun/projectile/energy/frontier.dm b/code/modules/projectiles/guns/gun/projectile/energy/frontier.dm index 9a08ec3158d..50ae07e9c64 100644 --- a/code/modules/projectiles/guns/gun/projectile/energy/frontier.dm +++ b/code/modules/projectiles/guns/gun/projectile/energy/frontier.dm @@ -7,16 +7,15 @@ item_state_slots = list(SLOT_ID_RIGHT_HAND = "phaser", SLOT_ID_LEFT_HAND = "phaser", "SLOT_ID_BELT" = "phaser") fire_sound = /datum/soundbyte/guns/energy/laser_3/rifle origin_tech = list(TECH_COMBAT = 4, TECH_MAGNET = 2, TECH_POWER = 4) - charge_cost = 300 legacy_battery_lock = 1 var/recharging = 0 - var/phase_power = 75 + var/phase_power = POWER_CELL_CAPACITY_WEAPON / 16 projectile_type = /obj/projectile/beam firemodes = list( - list(mode_name="lethal", fire_delay=12, projectile_type=/obj/projectile/beam, charge_cost = 300), - list(mode_name="low-power", fire_delay=8, projectile_type=/obj/projectile/beam/weaklaser, charge_cost = 60), + list(mode_name="lethal", fire_delay=12, projectile_type=/obj/projectile/beam, charge_cost = POWER_CELL_CAPACITY_WEAPON / 8), + list(mode_name="low-power", fire_delay=8, projectile_type=/obj/projectile/beam/weaklaser, charge_cost = POWER_CELL_CAPACITY_WEAPON / 40), ) /obj/item/gun/projectile/energy/frontier/on_attack_hand(datum/event_args/actor/clickchain/clickchain, clickchain_flags) @@ -69,8 +68,8 @@ modifystate = "carbinekill" firemodes = list( - list(mode_name="lethal", fire_delay=12, projectile_type=/obj/projectile/beam, modifystate="carbinekill", charge_cost = 300), - list(mode_name="low-power", fire_delay=8, projectile_type=/obj/projectile/beam/weaklaser, modifystate="carbinestun", charge_cost = 60), + list(mode_name="lethal", fire_delay=12, projectile_type=/obj/projectile/beam, modifystate="carbinekill", charge_cost = POWER_CELL_CAPACITY_WEAPON / 8), + list(mode_name="low-power", fire_delay=8, projectile_type=/obj/projectile/beam/weaklaser, modifystate="carbinestun", charge_cost = POWER_CELL_CAPACITY_WEAPON / 40), ) @@ -85,12 +84,11 @@ phase_power = 100 w_class = WEIGHT_CLASS_SMALL - charge_cost = 600 modifystate = "holdoutkill" firemodes = list( - list(mode_name="lethal", fire_delay=12, projectile_type=/obj/projectile/beam, modifystate="holdoutkill", charge_cost = 600), - list(mode_name="low-power", fire_delay=8, projectile_type=/obj/projectile/beam/weaklaser, modifystate="holdoutstun", charge_cost = 120), - list(mode_name="stun", fire_delay=12, projectile_type=/obj/projectile/beam/stun/med, modifystate="holdoutshock", charge_cost = 300), + list(mode_name="lethal", fire_delay=12, projectile_type=/obj/projectile/beam, modifystate="holdoutkill", charge_cost = POWER_CELL_CAPACITY_WEAPON / 4), + list(mode_name="low-power", fire_delay=8, projectile_type=/obj/projectile/beam/weaklaser, modifystate="holdoutstun", charge_cost = POWER_CELL_CAPACITY_WEAPON / 8), + list(mode_name="stun", fire_delay=12, projectile_type=/obj/projectile/beam/stun/med, modifystate="holdoutshock", charge_cost = POWER_CELL_CAPACITY_WEAPON / 8), ) /obj/item/gun/projectile/energy/frontier/taj @@ -100,13 +98,12 @@ icon_state = "phaser-taj" item_state = "phaser-taj" wielded_item_state = "phaser-taj" - charge_cost = 600 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 8 projectile_type = /obj/projectile/beam/midlaser - firemodes = list( - ) + firemodes = list() /obj/item/gun/projectile/energy/frontier/taj/on_attack_hand(datum/event_args/actor/clickchain/clickchain, clickchain_flags) . = ..() diff --git a/code/modules/projectiles/guns/gun/projectile/energy/hardlight_bow.dm b/code/modules/projectiles/guns/gun/projectile/energy/hardlight_bow.dm index a24c3e01274..2049ce1c852 100644 --- a/code/modules/projectiles/guns/gun/projectile/energy/hardlight_bow.dm +++ b/code/modules/projectiles/guns/gun/projectile/energy/hardlight_bow.dm @@ -6,13 +6,13 @@ icon_state = "bow_hardlight" item_state = "bow_pipe" slot_flags = SLOT_BACK | SLOT_BELT - charge_cost = 1200 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 1 legacy_battery_lock = 1 pin = /obj/item/firing_pin/explorer projectile_type = /obj/projectile/ion var/recharging = 0 - var/phase_power = 150 + var/phase_power = POWER_CELL_CAPACITY_WEAPON / 4 /obj/item/gun/projectile/energy/hardlight_bow/on_attack_hand(datum/event_args/actor/clickchain/clickchain, clickchain_flags) . = ..() diff --git a/code/modules/projectiles/guns/gun/projectile/energy/hooklauncher.dm b/code/modules/projectiles/guns/gun/projectile/energy/hooklauncher.dm index 4ea6a6e3deb..47926e7f39a 100644 --- a/code/modules/projectiles/guns/gun/projectile/energy/hooklauncher.dm +++ b/code/modules/projectiles/guns/gun/projectile/energy/hooklauncher.dm @@ -13,8 +13,6 @@ cycle_cooldown = 1.5 SECONDS; } charge_cost = 300 - - cell_type = /obj/item/cell/device/weapon projectile_type = /obj/projectile/energy/hook // An easily concealable not-ripoff version. It would be silenced, if it didn't make it blatant you're the one using it. @@ -28,7 +26,7 @@ w_class = WEIGHT_CLASS_TINY - cell_type = /obj/item/cell/device/weapon/recharge/alien + cell_type = /obj/item/cell/regen/weapon legacy_battery_lock = TRUE charge_cost = 400 charge_meter = FALSE diff --git a/code/modules/projectiles/guns/gun/projectile/energy/laser.dm b/code/modules/projectiles/guns/gun/projectile/energy/laser.dm index 43220a2a0f1..b4d8ea677e7 100644 --- a/code/modules/projectiles/guns/gun/projectile/energy/laser.dm +++ b/code/modules/projectiles/guns/gun/projectile/energy/laser.dm @@ -5,13 +5,13 @@ name = "normal" cycle_cooldown = 0.8 SECONDS projectile_type = /obj/projectile/beam/midlaser - charge_cost = 2400 / 10 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 16 /datum/firemode/energy/laser_rifle/suppression name = "suppressive" cycle_cooldown = 0.4 SECONDS projectile_type = /obj/projectile/beam/weaklaser - charge_cost = 2400 / 40 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 48 /obj/item/gun/projectile/energy/laser name = "laser rifle" @@ -50,7 +50,7 @@ firemodes = /datum/firemode/energy{ name = "normal"; projectile_type = /obj/projectile/beam/practice; - charge_cost = 2400 / 80; + charge_cost = POWER_CELL_CAPACITY_WEAPON / 80; cycle_cooldown = 0.4 SECONDS; } @@ -64,7 +64,7 @@ firemodes = /datum/firemode/energy{ name = "normal"; - charge_cost = 2400 / 10; + charge_cost = POWER_CELL_CAPACITY_WEAPON / 12; projectile_type = /obj/projectile/beam; cycle_cooldown = 1 SECONDS; } @@ -119,11 +119,11 @@ firemodes = /datum/firemode/energy { projectile_type = /obj/projectile/beam/cyan; - charge_cost = 2400 / 10; + charge_cost = POWER_CELL_CAPACITY_WEAPON / 12; cycle_cooldown = 1 SECONDS; } - cell_type = /obj/item/cell/device/weapon/recharge/alien // Self charges. + cell_type = /obj/item/cell/regen/weapon origin_tech = list(TECH_COMBAT = 8, TECH_MAGNET = 7) modifystate = "alienpistol" @@ -136,8 +136,8 @@ slot_flags = SLOT_BELT | SLOT_HOLSTER w_class = WEIGHT_CLASS_NORMAL projectile_type = /obj/projectile/beam - charge_cost = /obj/item/cell/device/weapon/recharge/captain::maxcharge / 5 - cell_type = /obj/item/cell/device/weapon/recharge/captain + charge_cost = /obj/item/cell/regen/weapon::max_charge / 10 + cell_type = /obj/item/cell/regen/weapon legacy_battery_lock = 1 /obj/item/gun/projectile/energy/lasercannon @@ -156,7 +156,7 @@ heavy = TRUE one_handed_penalty = 90 // The thing's heavy and huge. accuracy = 75 - charge_cost = 600 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 6 /obj/item/gun/projectile/energy/lasercannon/mounted name = "mounted laser cannon" @@ -176,7 +176,7 @@ item_state = "xray" origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 3, TECH_MAGNET = 2) projectile_type = /obj/projectile/beam/xray - charge_cost = 200 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 12 worth_intrinsic = 500 // op as balls /obj/item/gun/projectile/energy/sniperrifle @@ -198,13 +198,12 @@ cycle_cooldown = 3.5 SECONDS; } slot_flags = SLOT_BACK - charge_cost = 600 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 8 damage_force = 10 heavy = TRUE w_class = WEIGHT_CLASS_HUGE // So it can't fit in a backpack. accuracy = 25 //shooting at the hip - scoped_accuracy = 80 -// requires_two_hands = 1 + scoped_accuracy = 100 one_handed_penalty = 60 // The weapon itself is heavy, and the long barrel makes it hard to hold steady with just one hand. /obj/item/gun/projectile/energy/sniperrifle/verb/scope() @@ -217,24 +216,20 @@ /obj/item/gun/projectile/energy/sniperrifle/locked name = "expedition marksman energy rifle" - desc = "A modified version of the HI DMR 9E with a replacement firing pin and reduced shot capacity in exchange for a self recharging cell." + desc = "A modified version of the HI DMR 9E with a replacement firing pin." pin = /obj/item/firing_pin/explorer - cell_type = /obj/item/cell/device/weapon/recharge/sniper - accuracy = 45 //Modifications include slightly better hip-firing furniture. - legacy_battery_lock = 1 //With the change that the normal DMR can now change the weapon cell, we need to add this here so people can't take out the self-recharging special cell. - scoped_accuracy = 100 - charge_cost = 600 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 8 /obj/item/gun/projectile/energy/monorifle name = "antique mono-rifle" - desc = "An old laser rifle. This one can only fire once before requiring recharging." + desc = "An old laser rifle. This one can only fire a few times before requiring recharging." description_fluff = "Modeled after ancient hunting rifles, this rifle was dubbed the 'Rainy Day Special' by some, due to its use as some barmens' fight-stopper of choice. One shot is all it takes, or so they say." icon_state = "eshotgun" item_state = "shotgun" origin_tech = list(TECH_COMBAT = 6, TECH_MATERIAL = 4, TECH_POWER = 3) projectile_type = /obj/projectile/beam/sniper slot_flags = SLOT_BACK - charge_cost = 1300 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 2 damage_force = 8 heavy = TRUE w_class = WEIGHT_CLASS_BULKY @@ -252,11 +247,11 @@ /obj/item/gun/projectile/energy/monorifle/combat name = "combat mono-rifle" - desc = "A modernized version of the mono-rifle. This one can fire twice before requiring recharging." + desc = "A modernized version of the mono-rifle. This one can fire a few times before requiring recharging." description_fluff = "A modern design produced by a company once working from Saint Columbia, based on the antique mono-rifle 'Rainy Day Special' design." icon_state = "ecshotgun" item_state = "cshotgun" - charge_cost = 1000 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 4 damage_force = 12 accuracy = 70 scoped_accuracy = 95 @@ -270,7 +265,7 @@ origin_tech = list(TECH_COMBAT = 1, TECH_MAGNET = 2) materials_base = list(MAT_STEEL = 2000) projectile_type = /obj/projectile/beam/lasertag/blue - cell_type = /obj/item/cell/device/weapon/recharge + cell_type = /obj/item/cell/regen/weapon legacy_battery_lock = 1 suit_storage_class = SUIT_STORAGE_CLASS_HARDWEAR | SUIT_STORAGE_CLASS_SOFTWEAR @@ -310,9 +305,8 @@ w_class = WEIGHT_CLASS_BULKY heavy = TRUE slot_flags = SLOT_BACK - charge_cost = 60 // 40 shots, lay down the firepower + charge_cost = POWER_CELL_CAPACITY_WEAPON / 48 projectile_type = /obj/projectile/beam/weaklaser - cell_type = /obj/item/cell/device/weapon origin_tech = list(TECH_COMBAT = 5, TECH_MAGNET = 5, TECH_ILLEGAL = 3) firemodes = list( @@ -328,9 +322,8 @@ item_state = "ziplas" w_class = WEIGHT_CLASS_SMALL slot_flags = SLOT_BELT|SLOT_BACK - charge_cost = 1500 //You got 1 shot... + charge_cost = POWER_CELL_CAPACITY_WEAPON / 2.5 projectile_type = /obj/projectile/beam/heavylaser //But it hurts a lot - cell_type = /obj/item/cell/device/weapon unstable = 1 //NT SpecOps Laser Rifle @@ -352,6 +345,6 @@ one_handed_penalty = 25 firemodes = list( - list(mode_name="normal", fire_delay=6, projectile_type=/obj/projectile/beam/midlaser, charge_cost = 200), - list(mode_name="suppressive", fire_delay=3, projectile_type=/obj/projectile/beam/weaklaser, charge_cost = 50), + list(mode_name="normal", fire_delay=6, projectile_type=/obj/projectile/beam/midlaser, charge_cost = POWER_CELL_CAPACITY_WEAPON / 16), + list(mode_name="suppressive", fire_delay=3, projectile_type=/obj/projectile/beam/weaklaser, charge_cost = POWER_CELL_CAPACITY_WEAPON / 48), ) diff --git a/code/modules/projectiles/guns/gun/projectile/energy/netgun_vr.dm b/code/modules/projectiles/guns/gun/projectile/energy/netgun_vr.dm index c0f6319a3a9..d037db59d2e 100644 --- a/code/modules/projectiles/guns/gun/projectile/energy/netgun_vr.dm +++ b/code/modules/projectiles/guns/gun/projectile/energy/netgun_vr.dm @@ -21,7 +21,7 @@ fire_sound = 'sound/weapons/eluger.ogg' origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 5, TECH_MAGNET = 3) projectile_type = /obj/projectile/beam/stun/blue - charge_cost = 240 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 5 firemodes = list( /datum/firemode/energy/netgun/stun, @@ -33,7 +33,7 @@ var/list/overlays_to_add = list() if(obj_cell_slot.cell) - var/ratio = obj_cell_slot.cell.charge / obj_cell_slot.cell.maxcharge + var/ratio = obj_cell_slot.cell.charge / obj_cell_slot.cell.max_charge if(obj_cell_slot.cell.charge < charge_cost) ratio = 0 diff --git a/code/modules/projectiles/guns/gun/projectile/energy/nuclear.dm b/code/modules/projectiles/guns/gun/projectile/energy/nuclear.dm index 915e7629f14..f2fda842023 100644 --- a/code/modules/projectiles/guns/gun/projectile/energy/nuclear.dm +++ b/code/modules/projectiles/guns/gun/projectile/energy/nuclear.dm @@ -4,7 +4,7 @@ /datum/firemode/energy/energy_gun/stun name = "stun" projectile_type = /obj/projectile/beam/stun/med - charge_cost = 2400 / 10 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 12 cycle_cooldown = 0.4 SECONDS legacy_direct_varedits = list( "modifystate" = "energystun", @@ -13,7 +13,7 @@ /datum/firemode/energy/energy_gun/kill name = "lethal" projectile_type = /obj/projectile/beam - charge_cost = 2400 / 5 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 12 cycle_cooldown = 0.8 SECONDS legacy_direct_varedits = list( "modifystate" = "energykill", @@ -95,23 +95,27 @@ /datum/firemode/energy/mining_carbine/mine name = "mine" projectile_type = /obj/projectile/beam/excavation - legacy_direct_varedits = list(modifystate="fm-2tstun", charge_cost = 20) + charge_cost = POWER_CELL_CAPACITY_WEAPON / 120 + legacy_direct_varedits = list(modifystate="fm-2tstun") /datum/firemode/energy/mining_carbine/mine_burst name = "mine burst" projectile_type = /obj/projectile/beam/excavation burst_amount = 5 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 120 legacy_direct_varedits = list(burst_accuracy=list(65,65,65), dispersion=list(0.0, 0.2, 0.5), modifystate="fm-2tstun") /datum/firemode/energy/mining_carbine/scatter name = "scatter" projectile_type = /obj/projectile/scatter/excavation - legacy_direct_varedits = list(modifystate="fm-2tkill", charge_cost = 40) + charge_cost = POWER_CELL_CAPACITY_WEAPON / 40 + legacy_direct_varedits = list(modifystate="fm-2tkill") /datum/firemode/energy/mining_carbine/scatter_burst name = "scatter burst" burst_amount = 5 projectile_type = /obj/projectile/scatter/excavation + charge_cost = POWER_CELL_CAPACITY_WEAPON / 40 legacy_direct_varedits = list(burst_accuracy=list(65,65,65), dispersion=list(0.0, 0.2, 0.5), modifystate="fm-2tkill") /obj/item/gun/projectile/energy/gun/miningcarbine @@ -119,7 +123,6 @@ desc = "Following Miner's demand for a portable excavation laser, a military-favourite FM-2t has been modified to shoot excavation lasers." icon_state = "fm-2tstun100" //May resprite this to be more rifley item_state = null //so the human update icon uses the icon_state instead. - charge_cost = 20 damage_force = 8 w_class = WEIGHT_CLASS_BULKY origin_tech = list(TECH_COMBAT = 4, TECH_MAGNET = 2, TECH_ILLEGAL = 2) @@ -139,12 +142,12 @@ /datum/firemode/energy/advanced_energy_gun/stun name = "stun" projectile_type = /obj/projectile/beam/stun/med - charge_cost = 2400 / 10 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 10 /datum/firemode/energy/advanced_energy_gun/kill name = "lethal" projectile_type = /obj/projectile/beam - charge_cost = 2400 / 5 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 5 /obj/item/gun/projectile/energy/gun/nuclear name = "advanced energy gun" @@ -156,7 +159,7 @@ damage_force = 8 //looks heavier than a pistol w_class = WEIGHT_CLASS_BULKY //Looks bigger than a pistol, too. heavy = TRUE - cell_type = /obj/item/cell/device/weapon/recharge + cell_type = /obj/item/cell/regen/weapon legacy_battery_lock = 1 modifystate = null @@ -175,12 +178,12 @@ /datum/firemode/energy/legacy_nt_combat_pistol/stun name = "stun" projectile_type = /obj/projectile/beam/stun/med - charge_cost = 2400 / 12 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 12 /datum/firemode/energy/legacy_nt_combat_pistol/kill name = "lethal" projectile_type = /obj/projectile/beam - charge_cost = 2400 / 6 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 6 //NT SpecOps Laser Pistol /obj/item/gun/projectile/energy/gun/combat diff --git a/code/modules/projectiles/guns/gun/projectile/energy/particle.dm b/code/modules/projectiles/guns/gun/projectile/energy/particle.dm index 7de826db8c5..4bc87b242ec 100644 --- a/code/modules/projectiles/guns/gun/projectile/energy/particle.dm +++ b/code/modules/projectiles/guns/gun/projectile/energy/particle.dm @@ -21,7 +21,7 @@ firemodes = /datum/firemode/energy{ cycle_cooldown = 1 SECONDS; } - charge_cost = 200 //slightly more shots than lasers + charge_cost = POWER_CELL_CAPACITY_WEAPON / 16 var/safetycatch = 0 //if 1, won't let you fire in pressurised environment, rather than malfunctioning var/obj/item/pressurelock/attached_safety @@ -63,7 +63,7 @@ damage_force = 10 one_handed_penalty = 60 // The thing's heavy and huge. accuracy = 70 - charge_cost = 400 // 6 shots + charge_cost = POWER_CELL_CAPACITY_WEAPON / 8 self_recharge = 1 heavy = TRUE charge_delay = 15 //won't start charging until it's ready to fire again @@ -118,7 +118,7 @@ sparks.set_up(2, 1, T) sparks.start() obj_cell_slot.cell.charge = 0 - obj_cell_slot.cell.maxcharge = 1 //just to avoid div/0 runtimes + obj_cell_slot.cell.max_charge = 1 //just to avoid div/0 runtimes obj_cell_slot.cell.desc += " It seems to be burnt out!" desc += " The casing is covered in scorch-marks." // todo: transform_cycle_cooldown(datum/firing_cycle/cycle) as num diff --git a/code/modules/projectiles/guns/gun/projectile/energy/special.dm b/code/modules/projectiles/guns/gun/projectile/energy/special.dm index 63f444a87ce..2ab57518961 100644 --- a/code/modules/projectiles/guns/gun/projectile/energy/special.dm +++ b/code/modules/projectiles/guns/gun/projectile/energy/special.dm @@ -25,7 +25,7 @@ damage_force = 5 slot_flags = SLOT_BELT|SLOT_HOLSTER heavy = FALSE - charge_cost = 480 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 8 projectile_type = /obj/projectile/ion/pistol /obj/item/gun/projectile/energy/ionrifle/weak @@ -47,7 +47,7 @@ projectile_type = /obj/projectile/energy/floramut origin_tech = list(TECH_MATERIAL = 2, TECH_BIO = 3, TECH_POWER = 3) modifystate = "floramut" - cell_type = /obj/item/cell/device/weapon/recharge + cell_type = /obj/item/cell/regen/weapon no_pin_required = 1 legacy_battery_lock = 1 var/singleton/plantgene/gene = null @@ -95,7 +95,7 @@ heavy = TRUE projectile_type = /obj/projectile/meteor cell_type = /obj/item/cell/potato - charge_cost = 100 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 8 self_recharge = 1 recharge_time = 5 //Time it takes for shots to recharge (in ticks) charge_meter = 0 @@ -138,10 +138,10 @@ icon_state = "staff" slot_flags = SLOT_BACK w_class = WEIGHT_CLASS_BULKY - charge_cost = 480 + charge_cost = /obj/item/cell/regen/weapon::max_charge / 10 projectile_type = /obj/projectile/change origin_tech = null - cell_type = /obj/item/cell/device/weapon/recharge + cell_type = /obj/item/cell/regen/weapon legacy_battery_lock = 1 charge_meter = 0 @@ -213,9 +213,9 @@ wielded_item_state = "dakkalaser-wielded" w_class = WEIGHT_CLASS_HUGE heavy = TRUE - charge_cost = 24 // 100 shots, it's a spray and pray (to RNGesus) weapon. + charge_cost = POWER_CELL_CAPACITY_WEAPON / 120 projectile_type = /obj/projectile/energy/blue_pellet - cell_type = /obj/item/cell/device/weapon/recharge + cell_type = /obj/item/cell/regen/weapon legacy_battery_lock = 1 accuracy = 75 // Suppressive weapons don't work too well if there's no risk of being hit. origin_tech = list(TECH_COMBAT = 6, TECH_MAGNET = 6, TECH_ILLEGAL = 6) @@ -238,10 +238,10 @@ w_class = WEIGHT_CLASS_HUGE heavy = TRUE - charge_cost = 10000 // Uses large cells, can at max have 3 shots. + charge_cost = 7500 projectile_type = /obj/projectile/beam/tungsten - cell_type = /obj/item/cell/high - cell_system_legacy_use_device = FALSE + cell_type = /obj/item/cell/basic/tier_1/large + cell_accept = CELL_TYPE_SMALL | CELL_TYPE_WEAPON | CELL_TYPE_MEDIUM | CELL_TYPE_LARGE accuracy = 75 charge_meter = 0 @@ -334,9 +334,8 @@ fire_sound = 'sound/weapons/eluger.ogg' projectile_type = /obj/projectile/beam/medigun + cell_accept = CELL_TYPE_SMALL | CELL_TYPE_WEAPON | CELL_TYPE_MEDIUM | CELL_TYPE_LARGE - cell_system_legacy_use_device = FALSE - cell_type = /obj/item/cell/high charge_cost = 2500 /obj/item/gun/projectile/energy/puzzle_key @@ -351,9 +350,9 @@ firemodes = /datum/firemode/energy{ projectile_type = /obj/projectile/beam/emitter; cycle_cooldown = 1 SECONDS; - charge_cost = 2400 / 3; + charge_cost = POWER_CELL_CAPACITY_WEAPON / 3; } - cell_type = /obj/item/cell/device/weapon/recharge/captain + cell_type = /obj/item/cell/regen/weapon legacy_battery_lock = 1 one_handed_penalty = 0 @@ -366,9 +365,8 @@ firemodes = /datum/firemode/energy{ cycle_cooldown = 2 SECONDS; } - charge_cost = 900 - cell_type = /obj/item/cell - cell_system_legacy_use_device = FALSE + charge_cost = POWER_CELL_CAPACITY_WEAPON / 6 + cell_accept = CELL_TYPE_MEDIUM | CELL_TYPE_SMALL | CELL_TYPE_WEAPON slot_flags = SLOT_BELT|SLOT_BACK w_class = WEIGHT_CLASS_BULKY heavy = TRUE @@ -392,10 +390,10 @@ firemodes = /datum/firemode/energy{ projectile_type = /obj/projectile/bullet/cyanideround/jezzail; cycle_cooldown = 2 SECONDS; - charge_cost = 2400 / 4; + charge_cost = POWER_CELL_CAPACITY_WEAPON / 8; } - cell_type = /obj/item/cell/device/weapon legacy_battery_lock = 1 + cell_type = /obj/item/cell/regen/weapon slot_flags = SLOT_BACK w_class = WEIGHT_CLASS_BULKY heavy = TRUE @@ -408,11 +406,11 @@ /datum/firemode/energy/plasma/normal name = "standard" - legacy_direct_varedits = list(projectile_type=/obj/projectile/plasma, charge_cost = 350) + legacy_direct_varedits = list(projectile_type=/obj/projectile/plasma, charge_cost = POWER_CELL_CAPACITY_WEAPON / 12) /datum/firemode/energy/plasma/high name = "high power" - legacy_direct_varedits = list(projectile_type=/obj/projectile/plasma/hot, charge_cost = 370) + legacy_direct_varedits = list(projectile_type=/obj/projectile/plasma/hot, charge_cost = POWER_CELL_CAPACITY_WEAPON / 6) //Plasma Guns Plasma Guns! /obj/item/gun/projectile/energy/plasma @@ -421,8 +419,6 @@ icon_state = "prifle" item_state = null projectile_type = /obj/projectile/plasma - charge_cost = 400 - cell_type = /obj/item/cell/device/weapon slot_flags = SLOT_BELT|SLOT_BACK w_class = WEIGHT_CLASS_BULKY heavy = TRUE diff --git a/code/modules/projectiles/guns/gun/projectile/energy/stripper.dm b/code/modules/projectiles/guns/gun/projectile/energy/stripper.dm index 4622717a5ee..76641a571d7 100644 --- a/code/modules/projectiles/guns/gun/projectile/energy/stripper.dm +++ b/code/modules/projectiles/guns/gun/projectile/energy/stripper.dm @@ -1,6 +1,6 @@ /datum/firemode/energy/stripper projectile_type = /obj/projectile/energy/stripper - charge_cost = 240 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 10 /obj/item/gun/projectile/energy/stripper//Because it can be fun name = "stripper gun" diff --git a/code/modules/projectiles/guns/gun/projectile/energy/stun.dm b/code/modules/projectiles/guns/gun/projectile/energy/stun.dm index 27441b69969..c29cd518896 100644 --- a/code/modules/projectiles/guns/gun/projectile/energy/stun.dm +++ b/code/modules/projectiles/guns/gun/projectile/energy/stun.dm @@ -4,12 +4,12 @@ /datum/firemode/energy/taser/stun name = "stun" projectile_type = /obj/projectile/energy/electrode - legacy_direct_varedits = list(modifystate="taser", charge_cost = 240) + charge_cost = POWER_CELL_CAPACITY_WEAPON / 10 /datum/firemode/energy/taser/disable name = "disable" projectile_type = /obj/projectile/beam/disabler/weak - legacy_direct_varedits = list(modifystate="taserblue", charge_cost = 160) + charge_cost = POWER_CELL_CAPACITY_WEAPON / 20 /obj/item/gun/projectile/energy/taser name = "taser gun" @@ -39,15 +39,11 @@ /obj/item/gun/projectile/energy/taser/mounted/cyborg name = "taser gun" - charge_cost = 400 recharge_time = 7 //Time it takes for shots to recharge (in ticks) /obj/item/gun/projectile/energy/taser/mounted/cyborg/swarm name = "disabler" desc = "An archaic device which attacks the target's nervous-system or control circuits." - projectile_type = /obj/projectile/beam/stun/disabler - charge_cost = 200 - recharge_time = 0.5 SECONDS /obj/item/gun/projectile/energy/stunrevolver name = "stun revolver" @@ -56,7 +52,7 @@ item_state = "stunrevolver" origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3, TECH_POWER = 2) projectile_type = /obj/projectile/energy/electrode/strong - charge_cost = 400 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 8 /obj/item/gun/projectile/energy/crossbow name = "mini energy-crossbow" @@ -69,8 +65,8 @@ slot_flags = SLOT_BELT | SLOT_HOLSTER silenced = 1 projectile_type = /obj/projectile/energy/bolt - charge_cost = 480 - cell_type = /obj/item/cell/device/weapon/recharge + charge_cost = POWER_CELL_CAPACITY_WEAPON / 12 + cell_type = /obj/item/cell/regen/weapon legacy_battery_lock = 1 charge_meter = 0 @@ -96,7 +92,7 @@ firemodes = /datum/firemode/energy{ projectile_type = /obj/projectile/energy/plasmastun; cycle_cooldown = 2 SECONDS; - charge_cost = 2400 / 4; + charge_cost = POWER_CELL_CAPACITY_WEAPON / 4; } one_handed_penalty = 5 @@ -109,5 +105,5 @@ firemodes = /datum/firemode/energy{ projectile_type = /obj/projectile/energy/electrode/stunshot; cycle_cooldown = 0.4 SECONDS; - charge_cost = 2400 / 2; + charge_cost = POWER_CELL_CAPACITY_WEAPON / 2; } diff --git a/code/modules/projectiles/guns/gun/projectile/energy/temperature.dm b/code/modules/projectiles/guns/gun/projectile/energy/temperature.dm index e17397aaf09..ca3a515fd9f 100644 --- a/code/modules/projectiles/guns/gun/projectile/energy/temperature.dm +++ b/code/modules/projectiles/guns/gun/projectile/energy/temperature.dm @@ -2,7 +2,7 @@ name = "temperature gun" icon_state = "freezegun" desc = "A gun that can add or remove heat from entities it hits. In other words, it can fire 'cold', and 'hot' beams." - charge_cost = 240 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 16 origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 4, TECH_POWER = 3, TECH_MAGNET = 2) slot_flags = SLOT_BELT|SLOT_BACK no_pin_required = 1 @@ -10,6 +10,6 @@ one_handed_penalty = 15 firemodes = list( - list(mode_name="endothermic beam", projectile_type = /obj/projectile/temp, charge_cost = 240), - list(mode_name="exothermic beam", projectile_type = /obj/projectile/temp/hot, charge_cost = 240), + list(mode_name="endothermic beam", projectile_type = /obj/projectile/temp), + list(mode_name="exothermic beam", projectile_type = /obj/projectile/temp/hot), ) diff --git a/code/modules/projectiles/guns/gun/projectile/magnetic.dm b/code/modules/projectiles/guns/gun/projectile/magnetic.dm index 8513bff094e..5338ea61891 100644 --- a/code/modules/projectiles/guns/gun/projectile/magnetic.dm +++ b/code/modules/projectiles/guns/gun/projectile/magnetic.dm @@ -16,6 +16,7 @@ origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 4, TECH_ILLEGAL = 2, TECH_MAGNET = 4) w_class = WEIGHT_CLASS_BULKY cell_system = TRUE + cell_accept = CELL_TYPE_MEDIUM | CELL_TYPE_SMALL | CELL_TYPE_WEAPON var/obj/item/stock_parts/capacitor/capacitor // Installed capacitor. Higher rating == faster charge between shots. var/obj/item/stock_parts/manipulator/manipulator // Installed manipulator. Mostly for Phoron Bore, higher rating == less mats consumed upon firing @@ -41,7 +42,6 @@ if(capacitor) power_per_tick = (power_cost*0.15) * capacitor.rating . = ..() - obj_cell_slot.legacy_use_device_cells = FALSE // todo : dont update icon here update_icon() @@ -90,7 +90,7 @@ show_ammo(user) if(obj_cell_slot.cell) - . += "The installed [obj_cell_slot.cell.name] has a charge level of [round((obj_cell_slot.cell.charge/obj_cell_slot.cell.maxcharge)*100)]%." + . += "The installed [obj_cell_slot.cell.name] has a charge level of [round((obj_cell_slot.cell.charge/obj_cell_slot.cell.max_charge)*100)]%." if(capacitor) . += "The installed [capacitor.name] has a charge level of [round((capacitor.charge/capacitor.max_charge)*100)]%." @@ -210,7 +210,7 @@ power_cost = 500 - cell_type = /obj/item/cell/high + cell_type = /obj/item/cell/basic/tier_1/medium /obj/item/gun/projectile/magnetic/fuelrod/Initialize(mapload) capacitor = new /obj/item/stock_parts/capacitor diff --git a/code/modules/projectiles/guns/gun/projectile/magnetic/magnetic_railgun.dm b/code/modules/projectiles/guns/gun/projectile/magnetic/magnetic_railgun.dm index ea541b25eef..0a6492b4e91 100644 --- a/code/modules/projectiles/guns/gun/projectile/magnetic/magnetic_railgun.dm +++ b/code/modules/projectiles/guns/gun/projectile/magnetic/magnetic_railgun.dm @@ -14,7 +14,7 @@ loaded = /obj/item/rcd_ammo/large weight = ITEM_WEIGHT_GUN_BULKY encumbrance = ITEM_ENCUMBRANCE_GUN_BULKY - cell_type = /obj/item/cell/hyper + cell_type = /obj/item/cell/basic/tier_4/medium var/initial_capacitor_type = /obj/item/stock_parts/capacitor/adv var/empty_sound = 'sound/machines/twobeep.ogg' @@ -83,7 +83,7 @@ icon_state = "flechette_gun" item_state = "z8carbine" - cell_type = /obj/item/cell/hyper + cell_type = /obj/item/cell/basic/tier_3/medium initial_capacitor_type = /obj/item/stock_parts/capacitor/adv slot_flags = SLOT_BACK @@ -112,7 +112,7 @@ removable_components = TRUE - cell_type = /obj/item/cell/high + cell_type = /obj/item/cell/basic/tier_3/medium initial_capacitor_type = /obj/item/stock_parts/capacitor slot_flags = SLOT_BACK @@ -141,7 +141,7 @@ w_class = WEIGHT_CLASS_NORMAL - cell_type = /obj/item/cell/high + cell_type = /obj/item/cell/basic/tier_3/medium initial_capacitor_type = /obj/item/stock_parts/capacitor slot_flags = SLOT_BELT|SLOT_HOLSTER @@ -170,7 +170,7 @@ icon_state = "railgun_sifguard" item_state = "z8carbine" - cell_type = /obj/item/cell/high + cell_type = /obj/item/cell/basic/tier_3/medium initial_capacitor_type = /obj/item/stock_parts/capacitor/adv slot_flags = SLOT_BACK diff --git a/code/modules/projectiles/guns/gun/vr_legacy/custom_guns.dm b/code/modules/projectiles/guns/gun/vr_legacy/custom_guns.dm index 0006a842ac1..71bef2f632f 100644 --- a/code/modules/projectiles/guns/gun/vr_legacy/custom_guns.dm +++ b/code/modules/projectiles/guns/gun/vr_legacy/custom_guns.dm @@ -235,15 +235,14 @@ item_state = "gun" w_class = WEIGHT_CLASS_SMALL projectile_type = /obj/projectile/beam/stun - charge_cost = 1200 charge_meter = 0 modifystate = null legacy_battery_lock = 1 fire_sound = 'sound/weapons/Taser.ogg' origin_tech = list(TECH_COMBAT = 3, TECH_MAGNET = 2) firemodes = list( - list(mode_name="stun", projectile_type=/obj/projectile/beam/stun, fire_sound='sound/weapons/Taser.ogg', charge_cost = 600), - list(mode_name="lethal", projectile_type=/obj/projectile/beam, fire_sound='sound/weapons/Laser.ogg', charge_cost = 1200), + list(mode_name="stun", projectile_type=/obj/projectile/beam/stun, fire_sound='sound/weapons/Taser.ogg', charge_cost=POWER_CELL_CAPACITY_WEAPON/12), + list(mode_name="lethal", projectile_type=/obj/projectile/beam, fire_sound='sound/weapons/Laser.ogg', charge_cost=POWER_CELL_CAPACITY_WEAPON/8), ) /obj/item/gun/projectile/energy/gun/martin/update_overlays() diff --git a/code/modules/projectiles/guns/gun/vr_legacy/gunsword.dm b/code/modules/projectiles/guns/gun/vr_legacy/gunsword.dm index 898e6fd1d33..9ed2673dcf3 100644 --- a/code/modules/projectiles/guns/gun/vr_legacy/gunsword.dm +++ b/code/modules/projectiles/guns/gun/vr_legacy/gunsword.dm @@ -1,4 +1,4 @@ -/obj/item/gun/projectile/energy/gun/fluff/gunsword +/obj/item/gun/projectile/energy/gun/sword_buster name = "Sword Buster" desc = "The Sword Buster gun is custom built using the science behind a Golden Empire pistol. The cell can be removed in close range and used as energy shortsword." @@ -16,27 +16,29 @@ fire_sound = 'sound/weapons/gauss_shoot.ogg' charge_meter = 1 - cell_type = /obj/item/cell/device/weapon/gunsword + cell_type = /obj/item/cell/sword_buster modifystate = "gbuster" firemodes = list( - list(mode_name="stun", charge_cost=240,projectile_type=/obj/projectile/beam/stun, modifystate="gbuster", fire_sound='sound/weapons/Taser.ogg'), - list(mode_name="lethal", charge_cost=480,projectile_type=/obj/projectile/beam, modifystate="gbuster", fire_sound='sound/weapons/gauss_shoot.ogg'), + list(mode_name="stun", charge_cost=240,projectile_type=/obj/projectile/beam/stun, modifystate="gbuster", fire_sound='sound/weapons/Taser.ogg'), + list(mode_name="lethal", charge_cost=480,projectile_type=/obj/projectile/beam, modifystate="gbuster", fire_sound='sound/weapons/gauss_shoot.ogg'), ) - +/obj/item/gun/projectile/energy/gun/sword_buster/object_cell_slot_accepts(obj/item/cell/cell, datum/object_system/cell_slot/slot, slot_opinion, silent, datum/event_args/actor/actor) + return istype(cell, /obj/item/cell/sword_buster) || ..() // -----------------gunsword battery-------------------------- -/obj/item/cell/device/weapon/gunsword +/obj/item/cell/sword_buster name = "Buster Cell" desc = "The Buster Cell. It doubles as a sword when activated outside the gun housing." icon = 'icons/vore/custom_guns_vr.dmi' icon_state = "gsaberoff" icon_override = 'icons/vore/custom_guns_vr.dmi' item_state = "gsaberoff" - maxcharge = 2400 - charge_amount = 20 + atom_flags = NOBLOODY + max_charge = 4800 + self_recharge_amount = 20 damage_force = 3 damage_tier = 4.75 throw_force = 5 @@ -44,19 +46,19 @@ throw_range = 5 w_class = WEIGHT_CLASS_SMALL origin_tech = list(TECH_MAGNET = 3, TECH_COMBAT = 5) + damage_mode = NONE var/active = 0 var/active_force = 30 var/active_throwforce = 20 var/active_w_class = WEIGHT_CLASS_BULKY var/active_embed_chance = 0 //In the off chance one of these is supposed to embed, you can just tweak this var - atom_flags = NOBLOODY var/lrange = 2 var/lpower = 2 var/lcolor = "#800080" -/obj/item/cell/device/weapon/gunsword/proc/activate(mob/living/user) +/obj/item/cell/sword_buster/proc/activate(mob/living/user) if(active) return icon_state = "gsaber" @@ -73,7 +75,7 @@ -/obj/item/cell/device/weapon/gunsword/proc/deactivate(mob/living/user) +/obj/item/cell/sword_buster/proc/deactivate(mob/living/user) if(!active) return playsound(user, 'sound/weapons/saberoff.ogg', 50, 1) @@ -89,7 +91,7 @@ attack_verb = list() -/obj/item/cell/device/weapon/gunsword/attack_self(mob/user, datum/event_args/actor/actor) +/obj/item/cell/sword_buster/attack_self(mob/user, datum/event_args/actor/actor) . = ..() if(.) return @@ -110,5 +112,5 @@ add_fingerprint(user) return -/obj/item/cell/device/weapon/gunsword/update_icon() +/obj/item/cell/sword_buster/update_icon() cut_overlay() diff --git a/code/modules/projectiles/guns/gun/vr_legacy/protector.dm b/code/modules/projectiles/guns/gun/vr_legacy/protector.dm index 00676eb5c64..a443ab2f334 100644 --- a/code/modules/projectiles/guns/gun/vr_legacy/protector.dm +++ b/code/modules/projectiles/guns/gun/vr_legacy/protector.dm @@ -56,22 +56,12 @@ var/list/overlays_to_add = list() var/ratio = 0 - /* Don't have one for this gun - var/itemState = null - if(!initial(item_state)) - itemState = icon_state - */ - var/iconState = "[icon_state]_charge" if (modifystate) overlays_to_add += "[icon_state]_[modifystate]" iconState += "_[modifystate]" - /* Don't have one for this gun - if(itemState) - itemState += "[modifystate]" - */ if(obj_cell_slot.cell) - ratio = CEILING(((obj_cell_slot.cell.charge / obj_cell_slot.cell.maxcharge) * charge_sections), 1) + ratio = CEILING(((obj_cell_slot.cell.charge / obj_cell_slot.cell.max_charge) * charge_sections), 1) if(obj_cell_slot.cell.charge < charge_cost) overlays_to_add += "[icon_state]_empty" @@ -84,12 +74,6 @@ else overlays_to_add += "[icon_state]_[modifystate][ratio]" - /* Don't have one for this gun - if(itemState) - itemState += "[ratio]" - item_state = itemState - */ - // todo: burn this entire proc to the ground, because the writer deserves to have their eyelids replaced with lemons // "this goodd system but i'm going to snowflake it for one gun" diff --git a/code/modules/projectiles/guns/gun/vr_legacy/pummeler.dm b/code/modules/projectiles/guns/gun/vr_legacy/pummeler.dm index 54379788013..f6a10b487e3 100644 --- a/code/modules/projectiles/guns/gun/vr_legacy/pummeler.dm +++ b/code/modules/projectiles/guns/gun/vr_legacy/pummeler.dm @@ -18,7 +18,7 @@ fire_sound = 'sound/effects/basscannon.ogg' projectile_type = /obj/projectile/pummel - charge_cost = 600 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 12 origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3, TECH_MAGNET = 5) diff --git a/code/modules/projectiles/guns/gun/vr_legacy/sickshot.dm b/code/modules/projectiles/guns/gun/vr_legacy/sickshot.dm index 997a285686a..cab3d337035 100644 --- a/code/modules/projectiles/guns/gun/vr_legacy/sickshot.dm +++ b/code/modules/projectiles/guns/gun/vr_legacy/sickshot.dm @@ -18,7 +18,7 @@ fire_sound = 'sound/weapons/eluger.ogg' projectile_type = /obj/projectile/sickshot - charge_cost = 600 + charge_cost = POWER_CELL_CAPACITY_WEAPON / 12 origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3, TECH_MAGNET = 2) diff --git a/code/modules/projectiles/guns/gun_component.dm b/code/modules/projectiles/guns/gun_component.dm index 0235f855680..15dda93d741 100644 --- a/code/modules/projectiles/guns/gun_component.dm +++ b/code/modules/projectiles/guns/gun_component.dm @@ -99,7 +99,7 @@ /** * Called right before fire() is invoked, if [hook_iteration_pre_fire] is set. */ -/obj/item/gun_component/proc/on_firing_cycle_iteration(datum/gun_firing_cycle/cycle) +/obj/item/gun_component/proc/on_firing_cycle_iteration(obj/item/gun/source, datum/gun_firing_cycle/cycle) return /** @@ -108,7 +108,7 @@ * * This is relatively low level compared to firing cycle iteration, and can be used to * modify the projectile. */ -/obj/item/gun_component/proc/on_projectile_injection(datum/gun_firing_cycle/cycle, obj/projectile/proj) +/obj/item/gun_component/proc/on_projectile_injection(obj/item/gun/source, datum/gun_firing_cycle/cycle, obj/projectile/proj) return //* Gun API - Actions *// diff --git a/code/modules/projectiles/guns/gun_component/focusing_lens/divide_by.dm b/code/modules/projectiles/guns/gun_component/focusing_lens/divide_by.dm index d686448e316..998357de15c 100644 --- a/code/modules/projectiles/guns/gun_component/focusing_lens/divide_by.dm +++ b/code/modules/projectiles/guns/gun_component/focusing_lens/divide_by.dm @@ -42,6 +42,7 @@ GENERATE_DESIGN_FOR_NT_PROTOLATHE(/obj/item/gun_component/focusing_lens/divide_b divide_by = 2 cheat_factor = 1.15 cooldown_multiplier = 1.25 + power_consumption_multiplier = 1.15 materials_base = list( /datum/prototype/material/steel::id = 500, @@ -56,6 +57,7 @@ GENERATE_DESIGN_FOR_NT_PROTOLATHE(/obj/item/gun_component/focusing_lens/divide_b divide_by = 3 cheat_factor = 1.2 cooldown_multiplier = 1.5 + power_consumption_multiplier = 1.2 materials_base = list( /datum/prototype/material/steel::id = 500, diff --git a/code/modules/projectiles/guns/gun_component/particle_array.dm b/code/modules/projectiles/guns/gun_component/particle_array.dm index 323ab0d9807..ed99c1edaf3 100644 --- a/code/modules/projectiles/guns/gun_component/particle_array.dm +++ b/code/modules/projectiles/guns/gun_component/particle_array.dm @@ -4,6 +4,10 @@ /datum/prototype/design/generated/gun_component/particle_array abstract_type = /datum/prototype/design/generated/gun_component/particle_array +/** + * ## Warning - Caveats + * * Component signal hooks currently always fire, even if this isn't the active array. + */ /obj/item/gun_component/particle_array name = "weapon particle array" desc = "A nondescript particle array used in energy weapons." @@ -11,7 +15,9 @@ component_slot = GUN_COMPONENT_PARTICLE_ARRAY /// base charge cost in cell units - var/base_charge_cost = /obj/item/cell/device/weapon::maxcharge / 24 + var/base_charge_cost = /obj/item/cell/basic/tier_1/weapon::max_charge / 24 + /// base delay add + var/base_delay_add = 0 SECONDS /// considered lethal? /// * lethal arrays can be disabled on a separate 'safety' setting var/considered_lethal = FALSE @@ -28,7 +34,13 @@ /** * Consume next projectile hook */ -/obj/item/gun_component/particle_array/proc/consume_next_projectile(datum/gun_firing_cycle/cycle) as /obj/projectile +/obj/item/gun_component/particle_array/proc/consume_next_projectile(datum/gun_firing_cycle/cycle) + // appliy delay if needed + // sorry no subtracting with add! that can result in weird shit happening. + if(cycle.cycle_iterations_fired == 1 && base_delay_add > 0) + // first one, inject base delay + cycle.firing_delay += base_delay_add + cycle.overall_cooldown_adjust += base_delay_add var/effective_power_use = base_charge_cost * cycle.next_projectile_cost_multiplier if(effective_power_use) if(!installed.modular_use_checked_power(src, effective_power_use)) diff --git a/code/modules/projectiles/guns/gun_component/particle_array/disabler_beam.dm b/code/modules/projectiles/guns/gun_component/particle_array/disabler_beam.dm new file mode 100644 index 00000000000..e3933c6ca79 --- /dev/null +++ b/code/modules/projectiles/guns/gun_component/particle_array/disabler_beam.dm @@ -0,0 +1,36 @@ +//* This file is explicitly licensed under the MIT license. *// +//* Copyright (c) 2024 Citadel Station Developers *// + +GENERATE_DESIGN_FOR_NT_PROTOLATHE(/obj/item/gun_component/particle_array/disabler_beam, /gun_component/particle_array/disabler_beam, "gun_component-particle_array-disabler_beam") +/obj/item/gun_component/particle_array/disabler_beam + name = /obj/item/gun_component/particle_array::name + " (disabler beam)" + desc = "A particle array that generates a neuromuscular disruption beam." + + considered_lethal = TRUE + selection_name = "disabler beam" + render_color = "#00f2ff" + base_charge_cost = /obj/item/cell/basic/tier_1/weapon::max_charge / 20 + + materials_base = list( + /datum/prototype/material/steel::id = 500, + /datum/prototype/material/glass::id = 250, + /datum/prototype/material/gold::id = 125, + /datum/prototype/material/silver::id = 250, + ) + + projectile_type = /obj/projectile/particle_array/disabler_beam + +/obj/projectile/particle_array/disabler_beam + name = "disabler beam" + #warn icon state + pass_flags = NONE + damage_type = DAMAGE_TYPE_HALLOSS + damage_flag = ARMOR_ENERGY + damage_force = 20 + projectile_type = PROJECTILE_TYPE_BEAM | PROJECTILE_TYPE_ENERGY + impact_sound = PROJECTILE_IMPACT_SOUNDS_ENERGY + hitscan = TRUE + color = "#00f1f5" + #warn tracer_icon_state, tracer_add_state, tracer_add_state_alpha + auto_emissive_strength = 192 + #warn fire_sound diff --git a/code/modules/projectiles/guns/gun_component/particle_array/disabler_bolt.dm b/code/modules/projectiles/guns/gun_component/particle_array/disabler_bolt.dm new file mode 100644 index 00000000000..a425369e7ee --- /dev/null +++ b/code/modules/projectiles/guns/gun_component/particle_array/disabler_bolt.dm @@ -0,0 +1,34 @@ +//* This file is explicitly licensed under the MIT license. *// +//* Copyright (c) 2024 Citadel Station Developers *// + +GENERATE_DESIGN_FOR_NT_PROTOLATHE(/obj/item/gun_component/particle_array/disabler_bolt, /gun_component/particle_array/disabler_bolt, "gun_component-particle_array-disabler_bolt") +/obj/item/gun_component/particle_array/disabler_bolt + name = /obj/item/gun_component/particle_array::name + " (disabler bolt)" + desc = "A particle array that generates an energy bolt capable of disrupting neuromuscular functions." + + considered_lethal = TRUE + selection_name = "disabler bolt" + render_color = "#00f2ff" + base_charge_cost = /obj/item/cell/basic/tier_1/weapon::max_charge / 20 + + materials_base = list( + /datum/prototype/material/steel::id = 500, + /datum/prototype/material/glass::id = 250, + /datum/prototype/material/gold::id = 125, + /datum/prototype/material/silver::id = 250, + ) + + projectile_type = /obj/projectile/particle_array/disabler_bolt + +/obj/projectile/particle_array/disabler_bolt + name = "disabler bolt" + #warn icon state + pass_flags = NONE + damage_type = DAMAGE_TYPE_HALLOSS + damage_flag = ARMOR_ENERGY + damage_force = 25 + projectile_type = PROJECTILE_TYPE_BEAM | PROJECTILE_TYPE_ENERGY + impact_sound = PROJECTILE_IMPACT_SOUNDS_ENERGY + color = "#00f5f1" + auto_emissive_strength = 192 + #warn fire_sound diff --git a/code/modules/projectiles/guns/gun_component/particle_array/discharge_beam.dm b/code/modules/projectiles/guns/gun_component/particle_array/discharge_beam.dm index 4943b7b29d3..540ea8fc578 100644 --- a/code/modules/projectiles/guns/gun_component/particle_array/discharge_beam.dm +++ b/code/modules/projectiles/guns/gun_component/particle_array/discharge_beam.dm @@ -1,6 +1,7 @@ //* This file is explicitly licensed under the MIT license. *// //* Copyright (c) 2024 Citadel Station Developers *// +GENERATE_DESIGN_FOR_NT_PROTOLATHE(/obj/item/gun_component/particle_array/discharge_beam, /gun_component/particle_array/discharge_beam, "gun_component-particle_array-discharge_beam") /obj/item/gun_component/particle_array/discharge_beam name = /obj/item/gun_component/particle_array::name + " (discharge beam)" desc = "A particle array that generates an ionized pathway to send an electric discharge through." @@ -8,7 +9,38 @@ considered_lethal = TRUE selection_name = "discharge beam" render_color = "#ffff00" + base_charge_cost = /obj/item/cell/basic/tier_1/weapon::max_charge / 12 + base_delay_add = 0.3 SECONDS - #warn charge + materials_base = list( + /datum/prototype/material/steel::id = 500, + /datum/prototype/material/glass::id = 250, + /datum/prototype/material/gold::id = 125, + /datum/prototype/material/silver::id = 250, + ) -#warn impl + projectile_type = /obj/projectile/particle_array/discharge_beam + +/obj/projectile/particle_array/discharge_beam + name = "discharge beam" + pass_flags = NONE + damage_type = DAMAGE_TYPE_BURN + damage_flag = ARMOR_ENERGY + damage_force = 0 + projectile_type = PROJECTILE_TYPE_BEAM | PROJECTILE_TYPE_ENERGY + impact_sound = PROJECTILE_IMPACT_SOUNDS_ENERGY + hitscan = TRUE + color = "#f5ed00" + tracer_icon = 'icons/modules/projectiles/projectile-tracer.dmi' + tracer_icon_state = "discharge-1" + tracer_add_state = TRUE + tracer_add_state_alpha = 235 + auto_emissive_strength = 192 + fire_sound = /datum/soundbyte/guns/energy/taser_2 + base_projectile_effects = list( + /datum/projectile_effect/electrical_impulse{ + shock_energy = 50; + shock_damage = 7.5; + shock_agony = 30; + }, + ) diff --git a/code/modules/projectiles/guns/gun_component/particle_array/discharge_bolt.dm b/code/modules/projectiles/guns/gun_component/particle_array/discharge_bolt.dm new file mode 100644 index 00000000000..792a53265cb --- /dev/null +++ b/code/modules/projectiles/guns/gun_component/particle_array/discharge_bolt.dm @@ -0,0 +1,42 @@ +//* This file is explicitly licensed under the MIT license. *// +//* Copyright (c) 2024 Citadel Station Developers *// + +GENERATE_DESIGN_FOR_NT_PROTOLATHE(/obj/item/gun_component/particle_array/discharge_bolt, /gun_component/particle_array/discharge_bolt, "gun_component-particle_array-discharge_bolt") +/obj/item/gun_component/particle_array/discharge_bolt + name = /obj/item/gun_component/particle_array::name + " (discharge bolt)" + desc = "A particle array that generates an energy bolt that causes an electrical discharge on impact." + + considered_lethal = TRUE + selection_name = "discharge bolt" + render_color = "#ffff00" + base_charge_cost = /obj/item/cell/basic/tier_1/weapon::max_charge / 12 + base_delay_add = 0.25 SECONDS + + materials_base = list( + /datum/prototype/material/steel::id = 500, + /datum/prototype/material/glass::id = 250, + /datum/prototype/material/gold::id = 125, + /datum/prototype/material/silver::id = 250, + ) + + projectile_type = /obj/projectile/particle_array/discharge_bolt + +/obj/projectile/particle_array/discharge_bolt + name = "discharge bolt" + icon = 'icons/modules/projectiles/projectile-hardsprited.dmi' + icon_state = "discharge-bolt" + pass_flags = NONE + damage_type = DAMAGE_TYPE_BURN + damage_flag = ARMOR_ENERGY + damage_force = 0 + projectile_type = PROJECTILE_TYPE_BEAM | PROJECTILE_TYPE_ENERGY + impact_sound = PROJECTILE_IMPACT_SOUNDS_ENERGY + auto_emissive_strength = 192 + fire_sound = /datum/soundbyte/guns/energy/taser_2 + base_projectile_effects = list( + /datum/projectile_effect/electrical_impulse{ + shock_energy = 100; + shock_damage = 10; + shock_agony = 40; + }, + ) diff --git a/code/modules/projectiles/guns/gun_component/particle_array/particle_beam.dm b/code/modules/projectiles/guns/gun_component/particle_array/particle_beam.dm index 03e94a8b0c3..dcd43baab64 100644 --- a/code/modules/projectiles/guns/gun_component/particle_array/particle_beam.dm +++ b/code/modules/projectiles/guns/gun_component/particle_array/particle_beam.dm @@ -6,7 +6,7 @@ GENERATE_DESIGN_FOR_NT_PROTOLATHE(/obj/item/gun_component/particle_array/particl name = /obj/item/gun_component/particle_array::name + " (laser)" desc = "A particle array that emits a damaging beam. Bog-standard, really." - base_charge_cost = /obj/item/cell/device/weapon::maxcharge / 12 + base_charge_cost = /obj/item/cell/basic/tier_1/weapon::max_charge / 12 considered_lethal = TRUE selection_name = "laser" render_color = "#ff0000" @@ -24,8 +24,8 @@ GENERATE_DESIGN_FOR_NT_PROTOLATHE(/obj/item/gun_component/particle_array/particl pass_flags = ATOM_PASS_FLAGS_BEAM damage_type = DAMAGE_TYPE_BURN damage_flag = ARMOR_LASER - damage_tier = 3 - damage_force = 30 + damage_tier = 3.45 + damage_force = 35 projectile_type = PROJECTILE_TYPE_BEAM | PROJECTILE_TYPE_PHOTONIC impact_sound = PROJECTILE_IMPACT_SOUNDS_ENERGY hitscan = TRUE diff --git a/code/modules/projectiles/guns/gun_component/particle_array/particle_bolt.dm b/code/modules/projectiles/guns/gun_component/particle_array/particle_bolt.dm index f921d2ef46b..8dcaabe8b4e 100644 --- a/code/modules/projectiles/guns/gun_component/particle_array/particle_bolt.dm +++ b/code/modules/projectiles/guns/gun_component/particle_array/particle_bolt.dm @@ -1,14 +1,33 @@ //* This file is explicitly licensed under the MIT license. *// //* Copyright (c) 2024 Citadel Station Developers *// +GENERATE_DESIGN_FOR_NT_PROTOLATHE(/obj/item/gun_component/particle_array/particle_bolt, /gun_component/particle_array/particle_bolt, "gun_component-particle_array-particle_bolt") /obj/item/gun_component/particle_array/particle_bolt - name = /obj/item/gun_component/particle_array::name + " (bolt)" - desc = "A particle array that emits a tight, damaging energy bolt. Boring." + name = /obj/item/gun_component/particle_array::name + " (particle bolt)" + desc = "A particle array that emits a damaging energy bolt. Bog-standard, really." considered_lethal = TRUE - selection_name = "bolt" + selection_name = "particle bolt" render_color = "#ff0000" + base_charge_cost = /obj/item/cell/basic/tier_1/weapon::max_charge / 12 - #warn charge + materials_base = list( + /datum/prototype/material/steel::id = 500, + /datum/prototype/material/glass::id = 250, + ) -#warn impl + projectile_type = /obj/projectile/particle_array/particle_bolt + +/obj/projectile/particle_array/particle_bolt + name = "particle bolt" + icon = 'icons/modules/projectiles/projectile-hardsprited.dmi' + icon_state = "particle-bolt" + pass_flags = NONE + damage_type = DAMAGE_TYPE_BURN + damage_flag = ARMOR_LASER + damage_tier = 3.75 + damage_force = 35 + projectile_type = PROJECTILE_TYPE_ENERGY | PROJECTILE_TYPE_PHOTONIC + impact_sound = PROJECTILE_IMPACT_SOUNDS_ENERGY + auto_emissive_strength = 192 + fire_sound = /datum/soundbyte/guns/energy/laser_1 diff --git a/code/modules/projectiles/projectile/projectile.dm b/code/modules/projectiles/projectile/projectile.dm index 8ba46138a9f..a10e3685fa9 100644 --- a/code/modules/projectiles/projectile/projectile.dm +++ b/code/modules/projectiles/projectile/projectile.dm @@ -504,11 +504,10 @@ if(isnum(set_angle_to)) set_angle(set_angle_to) // handle submunitions - this can qdelete ourselves! - var/list/obj/projectile/fired_submunitions = submunitions ? split_into_default_submunitions(TRUE) : null + if(submunitions) + split_into_default_submunitions(TRUE, null, direct_target, no_source_check) if(!QDELETED(src)) launch(direct_target, no_source_check) - for(var/obj/projectile/submunition as anything in fired_submunitions) - submunition.launch(direct_target, no_source_check) /** * Handles actually launching a projectile. @@ -722,6 +721,10 @@ return blocker_opinion /obj/projectile/Crossed(atom/movable/AM) + if(!impacted) + STACK_TRACE("found a non-initialized and/or gc'd projectile. destroying.") + qdel(src) + return ..() scan_crossed_atom(AM) @@ -1239,7 +1242,7 @@ /** * This can qdel() ourselves! */ -/obj/projectile/proc/split_into_default_submunitions(fire_immediately, datum/callback/on_submunition_ready) +/obj/projectile/proc/split_into_default_submunitions(fire_immediately, datum/callback/on_submunition_ready, atom/use_direct_target, no_source_check) . = split_into_submunitions( submunitions, submunition_type || type, @@ -1252,6 +1255,8 @@ submunition_distribution_overwrite, fire_immediately, on_submunition_ready, + use_direct_target, + no_source_check, ) if(submunitions_only) qdel(src) @@ -1270,10 +1275,12 @@ * * fire_immediately - fire the split shots. * * on_submunition_ready - (optional) callback to execute when a submunition is readied, right before it's fire()'d. * The callback is executed asynchronously. + * * use_direct_target - (optional) invokes PB behavior + * * no_source_check - (optional) passed into fire() * * @return list() of submunitions */ -/obj/projectile/proc/split_into_submunitions(amount, path, angular_spread, uniform_angular_spread, linear_spread, uniform_linear_spread, distribute, distribute_mod, distribute_overwrite, fire_immediately, datum/callback/on_submunition_ready) +/obj/projectile/proc/split_into_submunitions(amount, path, angular_spread, uniform_angular_spread, linear_spread, uniform_linear_spread, distribute, distribute_mod, distribute_overwrite, fire_immediately, datum/callback/on_submunition_ready, atom/use_direct_target, no_source_check) // we must be fired; otherwise, things don't work right. ASSERT(fired) . = list() @@ -1303,7 +1310,7 @@ split.set_angle(angle + our_angle_mod) on_submunition_ready?.InvokeAsync(split) if(fire_immediately) - split.fire() + split.fire(null, use_direct_target, no_source_check) . += split /** diff --git a/code/modules/projectiles/projectile/projectile_effect/electrical_impulse.dm b/code/modules/projectiles/projectile/projectile_effect/electrical_impulse.dm index 8b92bf9ee4b..4bd79df0ec5 100644 --- a/code/modules/projectiles/projectile/projectile_effect/electrical_impulse.dm +++ b/code/modules/projectiles/projectile/projectile_effect/electrical_impulse.dm @@ -14,5 +14,12 @@ var/shock_flags = NONE /datum/projectile_effect/electrical_impulse/on_impact(obj/projectile/proj, atom/target, impact_flags, def_zone) - target.electrocute(shock_energy, shock_damage, shock_agony, shock_flags, def_zone, proj) + target.electrocute( + shock_energy * proj.projectile_effect_multiplier, + shock_damage * proj.projectile_effect_multiplier, + shock_agony * proj.projectile_effect_multiplier, + shock_flags, + def_zone, + proj, + ) return impact_flags diff --git a/code/modules/projectiles/projectile/projectile_effect/electrical_probe.dm b/code/modules/projectiles/projectile/projectile_effect/electrical_probe.dm index 94b49e35332..b37e65e4c82 100644 --- a/code/modules/projectiles/projectile/projectile_effect/electrical_probe.dm +++ b/code/modules/projectiles/projectile/projectile_effect/electrical_probe.dm @@ -14,8 +14,18 @@ /datum/projectile_effect/electrical_probe/on_impact(obj/projectile/proj, atom/target, impact_flags, def_zone) if(!isliving(target)) return impact_flags - var/list/shock_results = target.electrocute(0, 0, 0, ELECTROCUTE_ACT_FLAG_SILENT, def_zone, proj) + var/list/shock_results = target.electrocute( + 0, + 0, + 0, + ELECTROCUTE_ACT_FLAG_SILENT, + def_zone, + proj, + ) var/efficiency = shock_results[ELECTROCUTE_ACT_ARG_EFFICIENCY] var/mob/living/living_target = target - living_target.apply_status_effect(status_effect_path, status_effect_duration * efficiency) + living_target.apply_status_effect( + status_effect_path, + status_effect_duration * efficiency * proj.projectile_effect_multiplier, + ) return impact_flags diff --git a/code/modules/reagents/distilling/distilling.dm b/code/modules/reagents/distilling/distilling.dm index 93dcb6c0adf..ee0f5e0e56f 100644 --- a/code/modules/reagents/distilling/distilling.dm +++ b/code/modules/reagents/distilling/distilling.dm @@ -191,6 +191,7 @@ /obj/machinery/portable_atmospherics/powered/reagent_distillery/use_power(var/amount, var/chan = -1) last_power_draw_legacy = amount + var/obj/item/cell/cell = obj_cell_slot?.cell if(use_cell && cell && cell.charge) var/needed = DYNAMIC_W_TO_CELL_UNITS(amount, 1) needed -= cell.use(needed) diff --git a/code/modules/reagents/machinery/dispenser/dispenser.dm b/code/modules/reagents/machinery/dispenser/dispenser.dm index a181074b0fc..a513d827694 100644 --- a/code/modules/reagents/machinery/dispenser/dispenser.dm +++ b/code/modules/reagents/machinery/dispenser/dispenser.dm @@ -7,6 +7,9 @@ /obj/item/cell = 1, /obj/item/stock_parts/console_screen = 1, ) + def_components = list( + /obj/item/cell = /obj/item/cell/basic/tier_1/large, + ) #define MAX_MACROS 20 #define MAX_MACRO_STEPS 50 @@ -41,7 +44,7 @@ // todo: component_parts supporting "use this and don't keep this in component_parts". var/obj/item/cell/cell /// initial cell type - var/cell_type = /obj/item/cell/high + var/cell_type = /obj/item/cell/basic/tier_1/large /// recharge rate in KW var/recharge_rate = 10 /// inserted beaker / whatever @@ -125,7 +128,7 @@ return if(!cell || !charging) return - var/wanted = max(0, DYNAMIC_CELL_UNITS_TO_KW(cell.maxcharge - cell.charge, delta_time)) + var/wanted = max(0, DYNAMIC_CELL_UNITS_TO_KW(cell.max_charge - cell.charge, delta_time)) if(!wanted) return // todo: this is shit, it doesn't update area power because our power code is primitive. @@ -198,7 +201,7 @@ .["amount_max"] = dispense_amount_max .["has_cell"] = !!cell .["cell_charge"] = cell?.charge - .["cell_capacity"] = cell?.maxcharge + .["cell_capacity"] = cell?.max_charge .["panel_open"] = panel_open .["has_beaker"] = !!inserted .["beaker"] = inserted?.reagents? list( diff --git a/code/modules/research/designs/power_cells.dm b/code/modules/research/designs/power_cells.dm deleted file mode 100644 index cd20c020621..00000000000 --- a/code/modules/research/designs/power_cells.dm +++ /dev/null @@ -1,46 +0,0 @@ -/datum/prototype/design/science/powercell - abstract_type = /datum/prototype/design/science/powercell - category = DESIGN_CATEGORY_POWER - lathe_type = LATHE_TYPE_PROTOLATHE | LATHE_TYPE_MECHFAB - -/datum/prototype/design/science/powercell/basic - id = "basic_cell" - req_tech = list(TECH_POWER = 1) - materials_base = list(MAT_STEEL = 350, MAT_GLASS = 50) - build_path = /obj/item/cell - - -/datum/prototype/design/science/powercell/high - id = "high_cell" - req_tech = list(TECH_POWER = 2) - materials_base = list(MAT_STEEL = 400, MAT_GLASS = 60) - build_path = /obj/item/cell/high - - -/datum/prototype/design/science/powercell/super - id = "super_cell" - req_tech = list(TECH_POWER = 3, TECH_MATERIAL = 2) - materials_base = list(MAT_STEEL = 700, MAT_GLASS = 70) - build_path = /obj/item/cell/super - - -/datum/prototype/design/science/powercell/hyper - id = "hyper_cell" - req_tech = list(TECH_POWER = 5, TECH_MATERIAL = 4) - materials_base = list(MAT_STEEL = 400, MAT_GOLD = 150, MAT_SILVER = 150, MAT_GLASS = 70) - build_path = /obj/item/cell/hyper - - -/datum/prototype/design/science/powercell/device - lathe_type = LATHE_TYPE_PROTOLATHE - id = "device" - materials_base = list(MAT_STEEL = 250, MAT_GLASS = 25) - build_path = /obj/item/cell/device - - -/datum/prototype/design/science/powercell/weapon - lathe_type = LATHE_TYPE_PROTOLATHE - id = "weapon" - materials_base = list(MAT_STEEL = 450, MAT_GLASS = 50) - build_path = /obj/item/cell/device/weapon - diff --git a/code/modules/research/designs/weapons.dm b/code/modules/research/designs/weapons.dm index fdf9f4b1e5a..6c1d6d56070 100644 --- a/code/modules/research/designs/weapons.dm +++ b/code/modules/research/designs/weapons.dm @@ -10,18 +10,6 @@ subcategory = DESIGN_SUBCATEGORY_ENERGY abstract_type = /datum/prototype/design/science/weapon/energy -/datum/prototype/design/science/weapon/energy/stunrevolver - id = "stunrevolver" - req_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3, TECH_POWER = 2) - materials_base = list(MAT_STEEL = 1750) - build_path = /obj/item/gun/projectile/energy/stunrevolver - -/datum/prototype/design/science/weapon/energy/nuclear_gun - id = "nuclear_gun" - req_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 5, TECH_POWER = 3) - materials_base = list(MAT_STEEL = 3750, MAT_GLASS = 1250, MAT_URANIUM = 500) - build_path = /obj/item/gun/projectile/energy/gun/nuclear - /datum/prototype/design/science/weapon/energy/phoronpistol id = "ppistol" req_tech = list(TECH_COMBAT = 5, TECH_PHORON = 4) diff --git a/code/modules/roles/ghostroles/roles/pirate.dm b/code/modules/roles/ghostroles/roles/pirate.dm index 1942467c3e0..74b7134d166 100644 --- a/code/modules/roles/ghostroles/roles/pirate.dm +++ b/code/modules/roles/ghostroles/roles/pirate.dm @@ -92,7 +92,7 @@ to_chat(user, "If you want to kill the pirate off, something to pry open the sleeper might be the best way to do it.") /obj/structure/ghost_role_spawner/pirate/attackby(obj/item/W, mob/user, params) - if(W.tool_behaviour == TOOL_CROWBAR && user.a_intent != INTENT_HARM) + if(W.tool_behavior == TOOL_CROWBAR && user.a_intent != INTENT_HARM) if(user.mind.has_antag_datum(/datum/antagonist/pirate)) to_chat(user,"Why would you want to do that to your shipmate? That'd kill them.") return diff --git a/code/modules/shieldgen/handheld_defuser.dm b/code/modules/shieldgen/handheld_defuser.dm index d71a7f38edf..36f831366bc 100644 --- a/code/modules/shieldgen/handheld_defuser.dm +++ b/code/modules/shieldgen/handheld_defuser.dm @@ -6,28 +6,25 @@ icon_state = "hdiffuser_off" origin_tech = list(TECH_MAGNET = 5, TECH_POWER = 5, TECH_ILLEGAL = 2) w_class = WEIGHT_CLASS_SMALL - var/obj/item/cell/device/cell = /obj/item/cell/device - var/enabled = 0 + var/cell_type = /obj/item/cell/basic/tier_1/small + var/cell_accept = CELL_TYPE_SMALL | CELL_TYPE_WEAPON + var/enabled = 0 /obj/item/shield_diffuser/Initialize(mapload) . = ..() - if(cell) - cell = new cell(src) + init_cell_slot_easy_tool(cell_type, cell_accept) /obj/item/shield_diffuser/Destroy() - QDEL_NULL(cell) if(enabled) STOP_PROCESSING(SSobj, src) - . = ..() - -/obj/item/shield_diffuser/get_cell(inducer) - return cell + return ..() /obj/item/shield_diffuser/process(delta_time) if(!enabled) return PROCESS_KILL + var/obj/item/cell/cell = get_cell() for(var/direction in GLOB.cardinal) var/turf/simulated/shielded_tile = get_step(get_turf(src), direction) for(var/obj/effect/shield/S in shielded_tile) @@ -58,35 +55,6 @@ /obj/item/shield_diffuser/examine(mob/user, dist) . = ..() + var/obj/item/cell/cell = get_cell() to_chat(user, "The charge meter reads [cell ? cell.percent() : 0]%") to_chat(user, "It is [enabled ? "enabled" : "disabled"].") - -/obj/item/shield_diffuser/attack_hand(mob/user, datum/event_args/actor/clickchain/e_args) - if(user.get_inactive_held_item() == src) - if(cell) - cell.update_icon() - user.put_in_hands(cell) - cell = null - to_chat(user, "You remove the cell from the [src].") - playsound(src, 'sound/machines/button.ogg', 30, 1, 0) - enabled = 0 - update_icon() - return - ..() - else - return ..() - -/obj/item/shield_diffuser/attackby(obj/item/W, mob/user as mob) - if(istype(W, /obj/item/cell)) - if(istype(W, /obj/item/cell/device)) - if(!cell) - if(!user.attempt_insert_item_for_installation(W, src)) - return - cell = W - to_chat(user, "You install a cell in \the [src].") - playsound(src, 'sound/machines/button.ogg', 30, 1, 0) - update_icon() - else - to_chat(user, "\The [src] already has a cell.") - else - to_chat(user, "\The [src] cannot use that type of cell.") diff --git a/code/modules/spells/aoe_turf/charge.dm b/code/modules/spells/aoe_turf/charge.dm index 98e3e585d31..8aae6065895 100644 --- a/code/modules/spells/aoe_turf/charge.dm +++ b/code/modules/spells/aoe_turf/charge.dm @@ -56,10 +56,10 @@ if(istype(target, /obj/item/cell/)) var/obj/item/cell/C = target if(prob(80)) - C.maxcharge -= 200 - if(C.maxcharge <= 1) //Div by 0 protection - C.maxcharge = 1 - C.charge = C.maxcharge + C.max_charge -= 200 + if(C.max_charge <= 1) //Div by 0 protection + C.max_charge = 1 + C.charge = C.max_charge charged_item = C if(!charged_item) diff --git a/code/modules/sprite_accessories/hair/hair.dm b/code/modules/sprite_accessories/hair/hair.dm index bf68752eafb..c475e5e1b0d 100644 --- a/code/modules/sprite_accessories/hair/hair.dm +++ b/code/modules/sprite_accessories/hair/hair.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /* ATTENTION! This file is dedicated to all "modern hair sprites"; that only require white/ diff --git a/code/modules/supply/supply_pack.dm b/code/modules/supply/supply_pack.dm index 4bab85362f7..d7c9864ef25 100644 --- a/code/modules/supply/supply_pack.dm +++ b/code/modules/supply/supply_pack.dm @@ -1,5 +1,5 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2024 silicons *// +//* Copyright (c) 2024 Citadel Station Developers *// /** * a holder for a pack of objects that can be ordered @@ -159,7 +159,7 @@ /** * todo: return list of entities? - * + * * @return container spawned, or null (which can also mean we don't use a container for some reason) */ /datum/supply_pack/proc/instantiate_pack_at(atom/where) diff --git a/code/modules/tgui/modules/ntos-only/configurator.dm b/code/modules/tgui/modules/ntos-only/configurator.dm index 598c476a97b..e18e514fd6e 100644 --- a/code/modules/tgui/modules/ntos-only/configurator.dm +++ b/code/modules/tgui/modules/ntos-only/configurator.dm @@ -17,11 +17,11 @@ data["power_usage"] = movable.last_power_usage data["battery_exists"] = movable.battery_module ? 1 : 0 if(movable.battery_module) - data["battery_rating"] = movable.battery_module.battery.maxcharge + data["battery_rating"] = movable.battery_module.battery.max_charge data["battery_percent"] = round(movable.battery_module.battery.percent()) if(movable.battery_module && movable.battery_module.battery) - data["battery"] = list("max" = movable.battery_module.battery.maxcharge, "charge" = round(movable.battery_module.battery.charge)) + data["battery"] = list("max" = movable.battery_module.battery.max_charge, "charge" = round(movable.battery_module.battery.charge)) var/list/hardware = movable.get_all_components() var/list/all_entries[0] diff --git a/code/modules/vehicles/sealed/mecha/mech_bay.dm b/code/modules/vehicles/sealed/mecha/mech_bay.dm index bb6af913fc1..31e72ac8800 100644 --- a/code/modules/vehicles/sealed/mecha/mech_bay.dm +++ b/code/modules/vehicles/sealed/mecha/mech_bay.dm @@ -55,7 +55,7 @@ var/obj/vehicle/sealed/mecha/mech = charging var/obj/item/cell/cell = charging.get_cell() if(cell) - var/t = min(charge, cell.maxcharge - cell.charge) + var/t = min(charge, cell.max_charge - cell.charge) if(t > 0) if(istype(mech)) mech.give_power(t) diff --git a/code/modules/vehicles/sealed/mecha/mecha.dm b/code/modules/vehicles/sealed/mecha/mecha.dm index 0fcdfa0fc4d..aae4a5dad61 100644 --- a/code/modules/vehicles/sealed/mecha/mecha.dm +++ b/code/modules/vehicles/sealed/mecha/mecha.dm @@ -444,7 +444,7 @@ C.forceMove(src) cell = C return - cell = new /obj/item/cell/high(src) + cell = new /obj/item/cell/basic/tier_1/large(src) /obj/vehicle/sealed/mecha/get_cell(inducer) return cell @@ -2534,7 +2534,7 @@ if(mecha.get_charge()) mecha.spark_system.start() mecha.cell.charge -= min(20,mecha.cell.charge) - mecha.cell.maxcharge -= min(20,mecha.cell.maxcharge) + mecha.cell.max_charge -= min(20,mecha.cell.max_charge) return @@ -2588,7 +2588,7 @@ /obj/vehicle/sealed/mecha/proc/update_cell_alerts() if(occupant_legacy && cell) - var/cellcharge = cell.charge/cell.maxcharge + var/cellcharge = cell.charge/cell.max_charge switch(cellcharge) if(0.75 to INFINITY) occupant_legacy.clear_alert("charge") diff --git a/code/modules/vehicles/sealed/mecha/modules/tools/energy_relay.dm b/code/modules/vehicles/sealed/mecha/modules/tools/energy_relay.dm index 28246a3de23..48ed403ae34 100644 --- a/code/modules/vehicles/sealed/mecha/modules/tools/energy_relay.dm +++ b/code/modules/vehicles/sealed/mecha/modules/tools/energy_relay.dm @@ -100,7 +100,7 @@ ER.set_ready_state(1) ER.occupant_message("No powercell detected.") return - if(cur_charge charge_use) turn_on() src.visible_message("\The [src] rumbles to life.", "You hear something rumble deeply.") @@ -137,6 +140,7 @@ /obj/vehicle_old/bike/Move(var/turf/destination) if(kickstand) return 0 + var/obj/item/cell/cell = get_cell() if(on && (!cell || cell.charge < charge_use)) turn_off() visible_message("\The [src] whines, before its engines wind down.") diff --git a/code/modules/vehicles_legacy/construction.dm b/code/modules/vehicles_legacy/construction.dm index 6da492e2f5d..dd8e6fcaeff 100644 --- a/code/modules/vehicles_legacy/construction.dm +++ b/code/modules/vehicles_legacy/construction.dm @@ -99,6 +99,7 @@ return if(4) + // todo: lol if(istype(W, /obj/item/cell)) if(!user.attempt_insert_item_for_installation(W, src)) return @@ -136,7 +137,8 @@ playsound(loc, W.tool_sound, 30, 1) var/obj/vehicle_old/train/engine/quadbike/built/product = new(get_turf(src)) to_chat(user, "You finish \the [product]") - product.cell = cell + QDEL_NULL(product.obj_cell_slot.cell) + product.obj_cell_slot.cell = cell cell.forceMove(product) cell = null qdel(src) @@ -243,6 +245,7 @@ return if(5) + // todo: lol if(istype(W, /obj/item/cell)) if(!user.attempt_insert_item_for_installation(W, src)) return @@ -259,7 +262,8 @@ playsound(loc, W.tool_sound, 30, 1) var/obj/vehicle_old/bike/built/product = new(get_turf(src)) to_chat(user, "You finish \the [product]") - product.cell = cell + QDEL_NULL(product.obj_cell_slot.cell) + product.obj_cell_slot.cell = cell cell.forceMove(product) cell = null qdel(src) diff --git a/code/modules/vehicles_legacy/train/quadbike/quadbike-trolley.dm b/code/modules/vehicles_legacy/train/quadbike/quadbike-trolley.dm new file mode 100644 index 00000000000..f4560029437 --- /dev/null +++ b/code/modules/vehicles_legacy/train/quadbike/quadbike-trolley.dm @@ -0,0 +1,105 @@ + +/* + * Trailer bits and bobs. + */ + +/obj/vehicle_old/train/trolley/trailer + name = "all terrain trailer" + icon = 'icons/obj/vehicles_64x64.dmi' + icon_state = "quadtrailer" + anchored = 0 + passenger_allowed = 1 + buckle_lying = 1 + locked = 0 + + load_item_visible = 1 + load_offset_x = 0 + load_offset_y = 13 + mob_offset_y = 16 + + pixel_x = -16 + + paint_color = "#ffffff" + +/obj/vehicle_old/train/trolley/trailer/random/Initialize(mapload) + . = ..() + paint_color = rgb(rand(1,255),rand(1,255),rand(1,255)) + +/obj/vehicle_old/train/trolley/trailer/proc/update_load() + if(load) + var/y_offset = load_offset_y + if(istype(load, /mob/living)) + y_offset = mob_offset_y + load.pixel_x = (initial(load.pixel_x) + 16 + load_offset_x + pixel_x) //Base location for the sprite, plus 16 to center it on the 'base' sprite of the trailer, plus the x shift of the trailer, then shift it by the same pixel_x as the trailer to track it. + load.pixel_y = (initial(load.pixel_y) + y_offset + pixel_y) //Same as the above. + return 1 + return 0 + +/obj/vehicle_old/train/trolley/trailer/Initialize(mapload) + . = ..() + update_icon() + +/obj/vehicle_old/train/trolley/trailer/Move() + ..() + if(lead) + switch(dir) //Due to being a Big Boy sprite, it has to have special pixel shifting to look 'normal'. + if(1) + pixel_y = -10 + pixel_x = -16 + if(2) + pixel_y = 0 + pixel_x = -16 + if(4) + pixel_y = 0 + pixel_x = -25 + if(8) + pixel_y = 0 + pixel_x = -5 + else + pixel_x = initial(pixel_x) + pixel_y = initial(pixel_y) + update_load() + +/obj/vehicle_old/train/trolley/trailer/Bump(atom/Obstacle) + if(!istype(Obstacle, /atom/movable)) + return + var/atom/movable/A = Obstacle + + if(!A.anchored) + var/turf/T = get_step(A, dir) + if(isturf(T)) + A.Move(T, dir) //bump things away when hit + + if(istype(A, /mob/living)) + var/mob/living/M = A + visible_message("[src] knocks over [M]!") + M.apply_effects(1, 1) + M.apply_damages(8 / move_delay) + if(load) + M.apply_damages(4/move_delay) + var/list/throw_dirs = list(1, 2, 4, 8, 5, 6, 9, 10) + if(!emagged) + throw_dirs -= dir + var/turf/T2 = get_step(A, pick(throw_dirs)) + M.throw_at_old(T2, 1, 1, src) + if(istype(load, /mob/living/carbon/human)) + var/mob/living/D = load + to_chat(D, "You hit [M]!") + add_attack_logs(D,M,"Ran over with [src.name]") + +/obj/vehicle_old/train/trolley/trailer/update_icon() + ..() + cut_overlay() + + var/image/Bodypaint = new(icon = 'icons/obj/vehicles_64x64.dmi', icon_state = "[initial(icon_state)]_a", layer = src.layer) + Bodypaint.color = paint_color + add_overlay(Bodypaint) + +/obj/vehicle_old/train/trolley/trailer/attackby(obj/item/W as obj, mob/user as mob) + if(istype(W, /obj/item/multitool) && open) + var/new_paint = input("Please select paint color.", "Paint Color", paint_color) as color|null + if(new_paint) + paint_color = new_paint + update_icon() + return + ..() diff --git a/code/modules/vehicles_legacy/quad.dm b/code/modules/vehicles_legacy/train/quadbike/quadbike.dm similarity index 67% rename from code/modules/vehicles_legacy/quad.dm rename to code/modules/vehicles_legacy/train/quadbike/quadbike.dm index e575534d0ba..054024f35e8 100644 --- a/code/modules/vehicles_legacy/quad.dm +++ b/code/modules/vehicles_legacy/train/quadbike/quadbike.dm @@ -20,27 +20,20 @@ var/frame_state = "quad" //Custom-item proofing! var/custom_frame = FALSE - cell = /obj/item/cell/high paint_color = "#ffffff" + cell_type = /obj/item/cell/basic/tier_1/large var/outdoors_speed_mod = 0.7 //The general 'outdoors' speed. I.E., the general difference you'll be at when driving outside. /obj/vehicle_old/train/engine/quadbike/built - cell = null + cell_type = null /obj/vehicle_old/train/engine/quadbike/random/Initialize(mapload) . = ..() paint_color = rgb(rand(1,255),rand(1,255),rand(1,255)) update_icon() -/obj/item/key/quadbike - name = "key" - desc = "A keyring with a small steel key, and a blue fob reading \"ZOOM!\"." - icon = 'icons/obj/vehicles.dmi' - icon_state = "quad_keys" - w_class = WEIGHT_CLASS_TINY - /obj/vehicle_old/train/engine/quadbike/Move(var/turf/destination) var/turf/T = get_turf(src) ..() //Move it move it, so we can test it test it. @@ -154,107 +147,9 @@ var/turf/T = get_step(M, pick(throw_dirs)) M.throw_at_old(T, 1, 1, src) -/* - * Trailer bits and bobs. - */ - -/obj/vehicle_old/train/trolley/trailer - name = "all terrain trailer" - icon = 'icons/obj/vehicles_64x64.dmi' - icon_state = "quadtrailer" - anchored = 0 - passenger_allowed = 1 - buckle_lying = 1 - locked = 0 - - load_item_visible = 1 - load_offset_x = 0 - load_offset_y = 13 - mob_offset_y = 16 - - pixel_x = -16 - - paint_color = "#ffffff" - -/obj/vehicle_old/train/trolley/trailer/random/Initialize(mapload) - . = ..() - paint_color = rgb(rand(1,255),rand(1,255),rand(1,255)) - -/obj/vehicle_old/train/trolley/trailer/proc/update_load() - if(load) - var/y_offset = load_offset_y - if(istype(load, /mob/living)) - y_offset = mob_offset_y - load.pixel_x = (initial(load.pixel_x) + 16 + load_offset_x + pixel_x) //Base location for the sprite, plus 16 to center it on the 'base' sprite of the trailer, plus the x shift of the trailer, then shift it by the same pixel_x as the trailer to track it. - load.pixel_y = (initial(load.pixel_y) + y_offset + pixel_y) //Same as the above. - return 1 - return 0 - -/obj/vehicle_old/train/trolley/trailer/Initialize(mapload) - . = ..() - update_icon() - -/obj/vehicle_old/train/trolley/trailer/Move() - ..() - if(lead) - switch(dir) //Due to being a Big Boy sprite, it has to have special pixel shifting to look 'normal'. - if(1) - pixel_y = -10 - pixel_x = -16 - if(2) - pixel_y = 0 - pixel_x = -16 - if(4) - pixel_y = 0 - pixel_x = -25 - if(8) - pixel_y = 0 - pixel_x = -5 - else - pixel_x = initial(pixel_x) - pixel_y = initial(pixel_y) - update_load() - -/obj/vehicle_old/train/trolley/trailer/Bump(atom/Obstacle) - if(!istype(Obstacle, /atom/movable)) - return - var/atom/movable/A = Obstacle - - if(!A.anchored) - var/turf/T = get_step(A, dir) - if(isturf(T)) - A.Move(T, dir) //bump things away when hit - - if(istype(A, /mob/living)) - var/mob/living/M = A - visible_message("[src] knocks over [M]!") - M.apply_effects(1, 1) - M.apply_damages(8 / move_delay) - if(load) - M.apply_damages(4/move_delay) - var/list/throw_dirs = list(1, 2, 4, 8, 5, 6, 9, 10) - if(!emagged) - throw_dirs -= dir - var/turf/T2 = get_step(A, pick(throw_dirs)) - M.throw_at_old(T2, 1, 1, src) - if(istype(load, /mob/living/carbon/human)) - var/mob/living/D = load - to_chat(D, "You hit [M]!") - add_attack_logs(D,M,"Ran over with [src.name]") - -/obj/vehicle_old/train/trolley/trailer/update_icon() - ..() - cut_overlay() - - var/image/Bodypaint = new(icon = 'icons/obj/vehicles_64x64.dmi', icon_state = "[initial(icon_state)]_a", layer = src.layer) - Bodypaint.color = paint_color - add_overlay(Bodypaint) - -/obj/vehicle_old/train/trolley/trailer/attackby(obj/item/W as obj, mob/user as mob) - if(istype(W, /obj/item/multitool) && open) - var/new_paint = input("Please select paint color.", "Paint Color", paint_color) as color|null - if(new_paint) - paint_color = new_paint - update_icon() - return - ..() +/obj/item/key/quadbike + name = "key" + desc = "A keyring with a small steel key, and a blue fob reading \"ZOOM!\"." + icon = 'icons/obj/vehicles.dmi' + icon_state = "quad_keys" + w_class = WEIGHT_CLASS_TINY diff --git a/code/modules/vehicles_legacy/rover_vr.dm b/code/modules/vehicles_legacy/train/rover/rover-engine.dm similarity index 57% rename from code/modules/vehicles_legacy/rover_vr.dm rename to code/modules/vehicles_legacy/train/rover/rover-engine.dm index d764f278738..8fc080d8fb5 100644 --- a/code/modules/vehicles_legacy/rover_vr.dm +++ b/code/modules/vehicles_legacy/train/rover/rover-engine.dm @@ -23,52 +23,21 @@ load_offset_x = 0 pixel_x = -8 pixel_y = -8 - cell = /obj/item/cell/high + cell_type = /obj/item/cell/basic/tier_1/large var/car_limit = 0 //how many cars an engine can pull before performance degrades. This should be 0 to prevent trailers from unhitching. active_engines = 1 var/obj/item/key/rover/key var/siren = 0 //This is for eventually getting the siren sprite to work. -/obj/vehicle_old/train/rover/engine/dunebuggy - name = "Research Dune Buggy" - desc = "A Dune Buggy developed for asteroid exploration and transportation. It has a sSSticker that says to wear EVA suits if used in space." - icon = 'icons/vore/rover_vr.dmi' - icon_state = "dunebug" - - -/obj/item/key/rover - name = "The Rover key" - desc = "The Rover key used to start it." - icon = 'icons/obj/vehicles.dmi' - icon_state = "securikey" - w_class = WEIGHT_CLASS_TINY - -/obj/vehicle_old/train/rover/trolley - name = "Train trolley" - desc = "A trolley designed to transport security equipment to a scene." - icon = 'icons/obj/vehicles.dmi' - icon_state = "secitemcarrierbot" - anchored = 0 - passenger_allowed = 0 - locked = 0 - - load_item_visible = 0 - load_offset_x = 0 - load_offset_y = 0 - mob_offset_y = 0 - -//------------------------------------------- -// Standard procs -//------------------------------------------- /obj/vehicle_old/train/rover/engine/Initialize(mapload) . = ..() - cell = new /obj/item/cell/high(src) key = new(src) turn_off() //so engine verbs are correctly set /obj/vehicle_old/train/rover/engine/Move(var/turf/destination) + var/obj/item/cell/cell = get_cell() if(on && cell.charge < charge_use) turn_off() update_stats() @@ -84,13 +53,6 @@ return ..() -/obj/vehicle_old/train/rover/trolley/attackby(obj/item/W as obj, mob/user as mob) - if(open && istype(W, /obj/item/tool/wirecutters)) - passenger_allowed = !passenger_allowed - user.visible_message("[user] [passenger_allowed ? "cuts" : "mends"] a cable in [src].","You [passenger_allowed ? "cut" : "mend"] the load limiter cable.") - else - ..() - /obj/vehicle_old/train/rover/engine/attackby(obj/item/W as obj, mob/user as mob) if(istype(W, /obj/item/key/rover)) if(!key) @@ -101,29 +63,11 @@ return ..() -//cargo trains are open topped, so there is a chance the projectile will hit the mob ridding the train instead -/obj/vehicle_old/train/rover/on_bullet_act(obj/projectile/proj, impact_flags, list/bullet_act_args) - if(has_buckled_mobs() && prob(70)) - var/mob/buckled = pick(buckled_mobs) - return proj.impact_redirect(buckled, args) - return ..() - -/obj/vehicle_old/train/rover/update_icon() - if(open) - icon_state = initial(icon_state) + "_open" - else - icon_state = initial(icon_state) - -/obj/vehicle_old/train/rover/trolley/insert_cell(var/obj/item/cell/C, var/mob/living/carbon/human/H) - return - -/obj/vehicle_old/train/rover/engine/insert_cell(var/obj/item/cell/C, var/mob/living/carbon/human/H) - ..() - update_stats() - -/obj/vehicle_old/train/rover/engine/remove_cell(var/mob/living/carbon/human/H) - ..() - update_stats() +/obj/vehicle_old/train/rover/engine/dunebuggy + name = "Research Dune Buggy" + desc = "A Dune Buggy developed for asteroid exploration and transportation. It has a sSSticker that says to wear EVA suits if used in space." + icon = 'icons/vore/rover_vr.dmi' + icon_state = "dunebug" /obj/vehicle_old/train/rover/engine/Bump(atom/Obstacle) var/obj/machinery/door/D = Obstacle @@ -133,14 +77,6 @@ ..() -/obj/vehicle_old/train/rover/trolley/Bump(atom/Obstacle) - if(!lead) - return //so people can't knock others over by pushing a trolley around - ..() - -//------------------------------------------- -// Train procs -//------------------------------------------- /obj/vehicle_old/train/rover/engine/turn_on() if(!key) return @@ -167,17 +103,6 @@ else add_obj_verb(src, /obj/vehicle_old/train/rover/engine/verb/stop_engine) -/obj/vehicle_old/train/rover/RunOver(var/mob/living/M) - var/list/parts = list(BP_HEAD, BP_TORSO, BP_L_LEG, BP_R_LEG, BP_L_ARM, BP_R_ARM) - - M.apply_effects(5, 5) - for(var/i = 0, i < rand(1,3), i++) - M.apply_damage(rand(1,5), DAMAGE_TYPE_BRUTE, pick(parts)) - -/obj/vehicle_old/train/rover/trolley/RunOver(var/mob/living/M) - ..() - attack_log += "\[[time_stamp()]\] ran over [M.name] ([M.ckey])" - /obj/vehicle_old/train/rover/engine/RunOver(var/mob/living/M) ..() @@ -190,10 +115,6 @@ else attack_log += "\[[time_stamp()]\] ran over [M.name] ([M.ckey])" - -//------------------------------------------- -// Interaction procs -//------------------------------------------- /obj/vehicle_old/train/rover/engine/relaymove(mob/user, direction) if(user != load) return 0 @@ -210,6 +131,7 @@ /obj/vehicle_old/train/rover/engine/examine(mob/user, dist) . = ..() . += "The power light is [on ? "on" : "off"].\nThere are[key ? "" : " no"] keys in the ignition." + var/obj/item/cell/cell = get_cell() . += "The charge meter reads [cell? round(cell.percent(), 0.01) : 0]%" /obj/vehicle_old/train/rover/engine/verb/start_engine() @@ -228,6 +150,7 @@ if (on) to_chat(usr, "You start [src]'s engine.") else + var/obj/item/cell/cell = get_cell() if(cell.charge < charge_use) to_chat(usr, "[src] is out of power.") else @@ -270,25 +193,6 @@ remove_obj_verb(src, /obj/vehicle_old/train/rover/engine/verb/remove_key) -//------------------------------------------- -// Loading/unloading procs -//------------------------------------------- -/obj/vehicle_old/train/rover/trolley/load(var/atom/movable/C) - if(ismob(C) && !passenger_allowed) - return 0 - if(!istype(C,/obj/machinery) && !istype(C,/obj/structure/closet) && !istype(C,/obj/structure/largecrate) && !istype(C,/obj/structure/reagent_dispensers) && !istype(C,/obj/structure/ore_box) && !istype(C, /mob/living/carbon/human)) - return 0 - - //if there are any items you don't want to be able to interact with, add them to this check - // ~no more shielded, emitter armed death trains - if(istype(C, /obj/machinery)) - load_object(C) - else - ..() - - if(load) - return 1 - /obj/vehicle_old/train/rover/engine/load(var/atom/movable/C) if(!istype(C, /mob/living/carbon/human)) return 0 @@ -304,49 +208,6 @@ return C.alpha = initial(C.alpha) -//Load the object "inside" the trolley and add an overlay of it. -//This prevents the object from being interacted with until it has -// been unloaded. A dummy object is loaded instead so the loading -// code knows to handle it correctly. -/obj/vehicle_old/train/rover/trolley/proc/load_object(atom/movable/C) - if(!isturf(C.loc)) //To prevent loading things from someone's inventory, which wouldn't get handled properly. - return 0 - if(load || C.anchored) - return 0 - - var/datum/vehicle_dummy_load/dummy_load = new() - load = dummy_load - - if(!load) - return - dummy_load.actual_load = C - C.forceMove(src) - - if(load_item_visible) - C.pixel_x += load_offset_x - C.pixel_y += load_offset_y - C.layer = layer - - add_overlay(C) - - //we can set these back now since we have already cloned the icon into the overlay - C.pixel_x = initial(C.pixel_x) - C.pixel_y = initial(C.pixel_y) - C.layer = initial(C.layer) - -/obj/vehicle_old/train/rover/trolley/unload(var/mob/user, var/direction) - if(istype(load, /datum/vehicle_dummy_load)) - var/datum/vehicle_dummy_load/dummy_load = load - load = dummy_load.actual_load - dummy_load.actual_load = null - qdel(dummy_load) - cut_overlay() - ..() - -//------------------------------------------- -// Latching/unlatching procs -//------------------------------------------- - /obj/vehicle_old/train/rover/engine/latch(obj/vehicle_old/train/T, mob/user) if(!istype(T) || !Adjacent(T)) return 0 @@ -363,17 +224,6 @@ else if(global.reverse_dir[dir] == T_dir) //else if car is behind T.attach_to(src, user) -//------------------------------------------------------- -// Stat update procs -// -// Update the trains stats for speed calculations. -// The longer the train, the slower it will go. car_limit -// sets the max number of cars one engine can pull at -// full speed. Adding more cars beyond this will slow the -// train proportionate to the length of the train. Adding -// more engines increases this limit by car_limit per -// engine. -//------------------------------------------------------- /obj/vehicle_old/train/rover/engine/update_car(var/train_length, var/active_engines) src.train_length = train_length src.active_engines = active_engines @@ -386,12 +236,3 @@ move_delay *= (1 / max(1, active_engines)) * 2 //overweight penalty (scaled by the number of engines) move_delay += 2 //base reference speed move_delay *= 1.1 //makes cargo trains 10% slower than running when not overweight - -/obj/vehicle_old/train/rover/trolley/update_car(var/train_length, var/active_engines) - src.train_length = train_length - src.active_engines = active_engines - - if(!lead && !tow) - anchored = 0 - else - anchored = 1 diff --git a/code/modules/vehicles_legacy/train/rover/rover-trolley.dm b/code/modules/vehicles_legacy/train/rover/rover-trolley.dm new file mode 100644 index 00000000000..4c9b428eda6 --- /dev/null +++ b/code/modules/vehicles_legacy/train/rover/rover-trolley.dm @@ -0,0 +1,103 @@ + +/obj/vehicle_old/train/rover/trolley + name = "Train trolley" + desc = "A trolley designed to transport security equipment to a scene." + icon = 'icons/obj/vehicles.dmi' + icon_state = "secitemcarrierbot" + anchored = 0 + passenger_allowed = 0 + locked = 0 + + load_item_visible = 0 + load_offset_x = 0 + load_offset_y = 0 + mob_offset_y = 0 + +/obj/vehicle_old/train/rover/trolley/attackby(obj/item/W as obj, mob/user as mob) + if(open && istype(W, /obj/item/tool/wirecutters)) + passenger_allowed = !passenger_allowed + user.visible_message("[user] [passenger_allowed ? "cuts" : "mends"] a cable in [src].","You [passenger_allowed ? "cut" : "mend"] the load limiter cable.") + else + ..() + +//cargo trains are open topped, so there is a chance the projectile will hit the mob ridding the train instead +/obj/vehicle_old/train/rover/on_bullet_act(obj/projectile/proj, impact_flags, list/bullet_act_args) + if(has_buckled_mobs() && prob(70)) + var/mob/buckled = pick(buckled_mobs) + return proj.impact_redirect(buckled, args) + return ..() + +/obj/vehicle_old/train/rover/update_icon() + if(open) + icon_state = initial(icon_state) + "_open" + else + icon_state = initial(icon_state) + +/obj/vehicle_old/train/rover/trolley/Bump(atom/Obstacle) + if(!lead) + return //so people can't knock others over by pushing a trolley around + ..() + +/obj/vehicle_old/train/rover/trolley/RunOver(var/mob/living/M) + ..() + attack_log += "\[[time_stamp()]\] ran over [M.name] ([M.ckey])" + +/obj/vehicle_old/train/rover/trolley/load(var/atom/movable/C) + if(ismob(C) && !passenger_allowed) + return 0 + if(!istype(C,/obj/machinery) && !istype(C,/obj/structure/closet) && !istype(C,/obj/structure/largecrate) && !istype(C,/obj/structure/reagent_dispensers) && !istype(C,/obj/structure/ore_box) && !istype(C, /mob/living/carbon/human)) + return 0 + + //if there are any items you don't want to be able to interact with, add them to this check + // ~no more shielded, emitter armed death trains + if(istype(C, /obj/machinery)) + load_object(C) + else + ..() + + if(load) + return 1 + +/obj/vehicle_old/train/rover/trolley/proc/load_object(atom/movable/C) + if(!isturf(C.loc)) //To prevent loading things from someone's inventory, which wouldn't get handled properly. + return 0 + if(load || C.anchored) + return 0 + + var/datum/vehicle_dummy_load/dummy_load = new() + load = dummy_load + + if(!load) + return + dummy_load.actual_load = C + C.forceMove(src) + + if(load_item_visible) + C.pixel_x += load_offset_x + C.pixel_y += load_offset_y + C.layer = layer + + add_overlay(C) + + //we can set these back now since we have already cloned the icon into the overlay + C.pixel_x = initial(C.pixel_x) + C.pixel_y = initial(C.pixel_y) + C.layer = initial(C.layer) + +/obj/vehicle_old/train/rover/trolley/unload(var/mob/user, var/direction) + if(istype(load, /datum/vehicle_dummy_load)) + var/datum/vehicle_dummy_load/dummy_load = load + load = dummy_load.actual_load + dummy_load.actual_load = null + qdel(dummy_load) + cut_overlay() + ..() + +/obj/vehicle_old/train/rover/trolley/update_car(var/train_length, var/active_engines) + src.train_length = train_length + src.active_engines = active_engines + + if(!lead && !tow) + anchored = 0 + else + anchored = 1 diff --git a/code/modules/vehicles_legacy/train/rover/rover.dm b/code/modules/vehicles_legacy/train/rover/rover.dm new file mode 100644 index 00000000000..ed3a26bf39f --- /dev/null +++ b/code/modules/vehicles_legacy/train/rover/rover.dm @@ -0,0 +1,14 @@ + +/obj/vehicle_old/train/rover/RunOver(var/mob/living/M) + var/list/parts = list(BP_HEAD, BP_TORSO, BP_L_LEG, BP_R_LEG, BP_L_ARM, BP_R_ARM) + + M.apply_effects(5, 5) + for(var/i = 0, i < rand(1,3), i++) + M.apply_damage(rand(1,5), DAMAGE_TYPE_BRUTE, pick(parts)) + +/obj/item/key/rover + name = "The Rover key" + desc = "The Rover key used to start it." + icon = 'icons/obj/vehicles.dmi' + icon_state = "securikey" + w_class = WEIGHT_CLASS_TINY diff --git a/code/modules/vehicles_legacy/Securitrain_vr.dm b/code/modules/vehicles_legacy/train/securitrain/securitrain-engine.dm similarity index 58% rename from code/modules/vehicles_legacy/Securitrain_vr.dm rename to code/modules/vehicles_legacy/train/securitrain/securitrain-engine.dm index 1619b17ba98..ad0a38c7d45 100644 --- a/code/modules/vehicles_legacy/Securitrain_vr.dm +++ b/code/modules/vehicles_legacy/train/securitrain/securitrain-engine.dm @@ -22,52 +22,22 @@ load_offset_x = 0 mob_offset_y = 7 + cell_type = /obj/item/cell/basic/tier_1/large + var/car_limit = 0 //how many cars an engine can pull before performance degrades. This should be 0 to prevent trailers from unhitching. active_engines = 1 var/obj/item/key/security/key var/siren = 0 //This is for eventually getting the siren sprite to work. -/obj/item/key/security - name = "The Security Cart key" - desc = "The Security Cart Key used to start it." - icon = 'icons/obj/vehicles.dmi' - icon_state = "securikey" - w_class = WEIGHT_CLASS_TINY - -/obj/vehicle_old/train/security/trolley - name = "Train trolley" - desc = "A trolly designed to transport security personnel or prisoners." - icon = 'icons/obj/vehicles.dmi' - icon_state = "paddy_trailer" - anchored = 0 - passenger_allowed = 1 - locked = 0 - - load_item_visible = 1 - load_offset_x = 0 - load_offset_y = 4 - mob_offset_y = 8 - -/obj/vehicle_old/train/security/trolley/cargo - name = "Train trolley" - desc = "A trolley designed to transport security equipment to a scene." - icon = 'icons/obj/vehicles.dmi' - icon_state = "secitemcarrierbot" - passenger_allowed = 0 //Stick a man inside the box. :v - load_item_visible = 0 //The load is supposed to be invisible. - -//------------------------------------------- -// Standard procs -//------------------------------------------- /obj/vehicle_old/train/security/engine/Initialize(mapload) . = ..() - cell = new /obj/item/cell/high(src) key = new(src) var/image/I = new(icon = 'icons/obj/vehicles.dmi', icon_state = "cargo_engine_overlay", layer = src.layer + 0.2) //over mobs add_overlay(I) turn_off() //so engine verbs are correctly set /obj/vehicle_old/train/security/engine/Move(var/turf/destination) + var/obj/item/cell/cell = get_cell() if(on && cell.charge < charge_use) turn_off() update_stats() @@ -83,13 +53,6 @@ return ..() -/obj/vehicle_old/train/security/trolley/attackby(obj/item/W as obj, mob/user as mob) - if(open && istype(W, /obj/item/tool/wirecutters)) - passenger_allowed = !passenger_allowed - user.visible_message("[user] [passenger_allowed ? "cuts" : "mends"] a cable in [src].","You [passenger_allowed ? "cut" : "mend"] the load limiter cable.") - else - ..() - /obj/vehicle_old/train/security/engine/attackby(obj/item/W as obj, mob/user as mob) if(istype(W, /obj/item/key/cargo_train)) if(!key) @@ -100,30 +63,6 @@ return ..() -//cargo trains are open topped, so there is a chance the projectile will hit the mob ridding the train instead -/obj/vehicle_old/train/security/on_bullet_act(obj/projectile/proj, impact_flags, list/bullet_act_args) - if(has_buckled_mobs() && prob(70)) - var/mob/buckled = pick(buckled_mobs) - return proj.impact_redirect(buckled, args) - return ..() - -/obj/vehicle_old/train/security/update_icon() - if(open) - icon_state = initial(icon_state) + "_open" - else - icon_state = initial(icon_state) - -/obj/vehicle_old/train/security/trolley/insert_cell(var/obj/item/cell/C, var/mob/living/carbon/human/H) - return - -/obj/vehicle_old/train/security/engine/insert_cell(var/obj/item/cell/C, var/mob/living/carbon/human/H) - ..() - update_stats() - -/obj/vehicle_old/train/security/engine/remove_cell(var/mob/living/carbon/human/H) - ..() - update_stats() - /obj/vehicle_old/train/security/engine/Bump(atom/Obstacle) var/obj/machinery/door/D = Obstacle var/mob/living/carbon/human/H = load @@ -132,14 +71,6 @@ ..() -/obj/vehicle_old/train/security/trolley/Bump(atom/Obstacle) - if(!lead) - return //so people can't knock others over by pushing a trolley around - ..() - -//------------------------------------------- -// Train procs -//------------------------------------------- /obj/vehicle_old/train/security/engine/turn_on() if(!key) return @@ -166,17 +97,6 @@ else add_obj_verb(src, /obj/vehicle_old/train/security/engine/verb/stop_engine) -/obj/vehicle_old/train/security/RunOver(var/mob/living/M) - var/list/parts = list(BP_HEAD, BP_TORSO, BP_L_LEG, BP_R_LEG, BP_L_ARM, BP_R_ARM) - - M.apply_effects(5, 5) - for(var/i = 0, i < rand(1,3), i++) - M.apply_damage(rand(1,5), DAMAGE_TYPE_BRUTE, pick(parts)) - -/obj/vehicle_old/train/security/trolley/RunOver(var/mob/living/M) - ..() - attack_log += "\[[time_stamp()]\] ran over [M.name] ([M.ckey])" - /obj/vehicle_old/train/security/engine/RunOver(var/mob/living/M) ..() @@ -189,10 +109,12 @@ else attack_log += "\[[time_stamp()]\] ran over [M.name] ([M.ckey])" +/obj/vehicle_old/train/security/engine/examine(mob/user, dist) + . = ..() + . += "The power light is [on ? "on" : "off"].\nThere are[key ? "" : " no"] keys in the ignition." + var/obj/item/cell/cell = get_cell() + . += "The charge meter reads [cell? round(cell.percent(), 0.01) : 0]%" -//------------------------------------------- -// Interaction procs -//------------------------------------------- /obj/vehicle_old/train/security/engine/relaymove(mob/user, direction) if(user != load) return 0 @@ -206,11 +128,6 @@ else return ..() -/obj/vehicle_old/train/security/engine/examine(mob/user, dist) - . = ..() - . += "The power light is [on ? "on" : "off"].\nThere are[key ? "" : " no"] keys in the ignition." - . += "The charge meter reads [cell? round(cell.percent(), 0.01) : 0]%" - /obj/vehicle_old/train/security/engine/verb/start_engine() set name = "Start engine" set category = "Vehicle" @@ -227,6 +144,7 @@ if (on) to_chat(usr, "You start [src]'s engine.") else + var/obj/item/cell/cell = get_cell() if(cell.charge < charge_use) to_chat(usr, "[src] is out of power.") else @@ -269,74 +187,12 @@ remove_obj_verb(src, /obj/vehicle_old/train/security/engine/verb/remove_key) -//------------------------------------------- -// Loading/unloading procs -//------------------------------------------- -/obj/vehicle_old/train/security/trolley/load(var/atom/movable/C) - if(ismob(C) && !passenger_allowed) - return 0 - if(!istype(C,/obj/machinery) && !istype(C,/obj/structure/closet) && !istype(C,/obj/structure/largecrate) && !istype(C,/obj/structure/reagent_dispensers) && !istype(C,/obj/structure/ore_box) && !istype(C, /mob/living/carbon/human)) - return 0 - - //if there are any items you don't want to be able to interact with, add them to this check - // ~no more shielded, emitter armed death trains - if(istype(C, /obj/machinery)) - load_object(C) - else - ..() - - if(load) - return 1 - /obj/vehicle_old/train/security/engine/load(var/atom/movable/C) if(!istype(C, /mob/living/carbon/human)) return 0 return ..() -//Load the object "inside" the trolley and add an overlay of it. -//This prevents the object from being interacted with until it has -// been unloaded. A dummy object is loaded instead so the loading -// code knows to handle it correctly. -/obj/vehicle_old/train/security/trolley/proc/load_object(atom/movable/C) - if(!isturf(C.loc)) //To prevent loading things from someone's inventory, which wouldn't get handled properly. - return 0 - if(load || C.anchored) - return 0 - - var/datum/vehicle_dummy_load/dummy_load = new() - load = dummy_load - - if(!load) - return - dummy_load.actual_load = C - C.forceMove(src) - - if(load_item_visible) - C.pixel_x += load_offset_x - C.pixel_y += load_offset_y - C.layer = layer - - add_overlay(C) - - //we can set these back now since we have already cloned the icon into the overlay - C.pixel_x = initial(C.pixel_x) - C.pixel_y = initial(C.pixel_y) - C.layer = initial(C.layer) - -/obj/vehicle_old/train/security/trolley/unload(mob/user, direction) - if(istype(load, /datum/vehicle_dummy_load)) - var/datum/vehicle_dummy_load/dummy_load = load - load = dummy_load.actual_load - dummy_load.actual_load = null - qdel(dummy_load) - cut_overlay() - ..() - -//------------------------------------------- -// Latching/unlatching procs -//------------------------------------------- - /obj/vehicle_old/train/security/engine/latch(obj/vehicle_old/train/T, mob/user) if(!istype(T) || !Adjacent(T)) return 0 @@ -376,12 +232,3 @@ move_delay *= (1 / max(1, active_engines)) * 2 //overweight penalty (scaled by the number of engines) move_delay += 2 //base reference speed move_delay *= 1.1 //makes cargo trains 10% slower than running when not overweight - -/obj/vehicle_old/train/security/trolley/update_car(var/train_length, var/active_engines) - src.train_length = train_length - src.active_engines = active_engines - - if(!lead && !tow) - anchored = 0 - else - anchored = 1 diff --git a/code/modules/vehicles_legacy/train/securitrain/securitrain-trolley.dm b/code/modules/vehicles_legacy/train/securitrain/securitrain-trolley.dm new file mode 100644 index 00000000000..f7b30461187 --- /dev/null +++ b/code/modules/vehicles_legacy/train/securitrain/securitrain-trolley.dm @@ -0,0 +1,101 @@ + +/obj/vehicle_old/train/security/trolley + name = "Train trolley" + desc = "A trolly designed to transport security personnel or prisoners." + icon = 'icons/obj/vehicles.dmi' + icon_state = "paddy_trailer" + anchored = 0 + passenger_allowed = 1 + locked = 0 + + load_item_visible = 1 + load_offset_x = 0 + load_offset_y = 4 + mob_offset_y = 8 + +/obj/vehicle_old/train/security/trolley/cargo + name = "Train trolley" + desc = "A trolley designed to transport security equipment to a scene." + icon = 'icons/obj/vehicles.dmi' + icon_state = "secitemcarrierbot" + passenger_allowed = 0 //Stick a man inside the box. :v + load_item_visible = 0 //The load is supposed to be invisible. + +/obj/vehicle_old/train/security/trolley/attackby(obj/item/W as obj, mob/user as mob) + if(open && istype(W, /obj/item/tool/wirecutters)) + passenger_allowed = !passenger_allowed + user.visible_message("[user] [passenger_allowed ? "cuts" : "mends"] a cable in [src].","You [passenger_allowed ? "cut" : "mend"] the load limiter cable.") + else + ..() + +/obj/vehicle_old/train/security/trolley/Bump(atom/Obstacle) + if(!lead) + return //so people can't knock others over by pushing a trolley around + ..() + +/obj/vehicle_old/train/security/trolley/RunOver(var/mob/living/M) + ..() + attack_log += "\[[time_stamp()]\] ran over [M.name] ([M.ckey])" +/obj/vehicle_old/train/security/trolley/load(var/atom/movable/C) + if(ismob(C) && !passenger_allowed) + return 0 + if(!istype(C,/obj/machinery) && !istype(C,/obj/structure/closet) && !istype(C,/obj/structure/largecrate) && !istype(C,/obj/structure/reagent_dispensers) && !istype(C,/obj/structure/ore_box) && !istype(C, /mob/living/carbon/human)) + return 0 + + //if there are any items you don't want to be able to interact with, add them to this check + // ~no more shielded, emitter armed death trains + if(istype(C, /obj/machinery)) + load_object(C) + else + ..() + + if(load) + return 1 + +//Load the object "inside" the trolley and add an overlay of it. +//This prevents the object from being interacted with until it has +// been unloaded. A dummy object is loaded instead so the loading +// code knows to handle it correctly. +/obj/vehicle_old/train/security/trolley/proc/load_object(atom/movable/C) + if(!isturf(C.loc)) //To prevent loading things from someone's inventory, which wouldn't get handled properly. + return 0 + if(load || C.anchored) + return 0 + + var/datum/vehicle_dummy_load/dummy_load = new() + load = dummy_load + + if(!load) + return + dummy_load.actual_load = C + C.forceMove(src) + + if(load_item_visible) + C.pixel_x += load_offset_x + C.pixel_y += load_offset_y + C.layer = layer + + add_overlay(C) + + //we can set these back now since we have already cloned the icon into the overlay + C.pixel_x = initial(C.pixel_x) + C.pixel_y = initial(C.pixel_y) + C.layer = initial(C.layer) + +/obj/vehicle_old/train/security/trolley/unload(mob/user, direction) + if(istype(load, /datum/vehicle_dummy_load)) + var/datum/vehicle_dummy_load/dummy_load = load + load = dummy_load.actual_load + dummy_load.actual_load = null + qdel(dummy_load) + cut_overlay() + ..() + +/obj/vehicle_old/train/security/trolley/update_car(var/train_length, var/active_engines) + src.train_length = train_length + src.active_engines = active_engines + + if(!lead && !tow) + anchored = 0 + else + anchored = 1 diff --git a/code/modules/vehicles_legacy/train/securitrain/securitrain.dm b/code/modules/vehicles_legacy/train/securitrain/securitrain.dm new file mode 100644 index 00000000000..980855b9dd5 --- /dev/null +++ b/code/modules/vehicles_legacy/train/securitrain/securitrain.dm @@ -0,0 +1,29 @@ + +/obj/vehicle_old/train/security + +/obj/vehicle_old/train/security/update_icon() + if(open) + icon_state = initial(icon_state) + "_open" + else + icon_state = initial(icon_state) + +//cargo trains are open topped, so there is a chance the projectile will hit the mob ridding the train instead +/obj/vehicle_old/train/security/on_bullet_act(obj/projectile/proj, impact_flags, list/bullet_act_args) + if(has_buckled_mobs() && prob(70)) + var/mob/buckled = pick(buckled_mobs) + return proj.impact_redirect(buckled, args) + return ..() + +/obj/vehicle_old/train/security/RunOver(var/mob/living/M) + var/list/parts = list(BP_HEAD, BP_TORSO, BP_L_LEG, BP_R_LEG, BP_L_ARM, BP_R_ARM) + + M.apply_effects(5, 5) + for(var/i = 0, i < rand(1,3), i++) + M.apply_damage(rand(1,5), DAMAGE_TYPE_BRUTE, pick(parts)) + +/obj/item/key/security + name = "The Security Cart key" + desc = "The Security Cart Key used to start it." + icon = 'icons/obj/vehicles.dmi' + icon_state = "securikey" + w_class = WEIGHT_CLASS_TINY diff --git a/code/modules/vehicles_legacy/cargo_train.dm b/code/modules/vehicles_legacy/train/train-engine.dm similarity index 55% rename from code/modules/vehicles_legacy/cargo_train.dm rename to code/modules/vehicles_legacy/train/train-engine.dm index 8e576f0a2b1..a66f0d7ab52 100644 --- a/code/modules/vehicles_legacy/cargo_train.dm +++ b/code/modules/vehicles_legacy/train/train-engine.dm @@ -12,46 +12,24 @@ load_offset_x = 0 mob_offset_y = 7 - cell = /obj/item/cell/high + cell_type = /obj/item/cell/basic/tier_1/large + var/speed_mod = 1.1 var/car_limit = 3 //how many cars an engine can pull before performance degrades active_engines = 1 + var/obj/item/key/key var/key_type = /obj/item/key/cargo_train -/obj/item/key/cargo_train - name = "key" - desc = "A keyring with a small steel key, and a yellow fob reading \"Choo Choo!\"." - icon = 'icons/obj/vehicles.dmi' - icon_state = "train_keys" - w_class = WEIGHT_CLASS_TINY - -/obj/vehicle_old/train/trolley - name = "cargo train trolley" - icon = 'icons/obj/vehicles.dmi' - icon_state = "cargo_trailer" - anchored = 0 - passenger_allowed = 0 - locked = 0 - - load_item_visible = 1 - load_offset_x = 0 - load_offset_y = 4 - mob_offset_y = 8 - -//------------------------------------------- -// Standard procs -//------------------------------------------- /obj/vehicle_old/train/engine/Initialize(mapload) . = ..() - if(cell) - cell = new cell(src) key = new key_type(src) var/image/I = new(icon = 'icons/obj/vehicles.dmi', icon_state = "cargo_engine_overlay", layer = src.layer + 0.2) //over mobs add_overlay(I) turn_off() //so engine verbs are correctly set /obj/vehicle_old/train/engine/Move(var/turf/destination) + var/obj/item/cell/cell = get_cell() if(on && cell.charge < charge_use) turn_off() update_stats() @@ -67,13 +45,6 @@ return ..() -/obj/vehicle_old/train/trolley/attackby(obj/item/W as obj, mob/user as mob) - if(open && W.is_wirecutter()) - passenger_allowed = !passenger_allowed - user.visible_message("[user] [passenger_allowed ? "cuts" : "mends"] a cable in [src].","You [passenger_allowed ? "cut" : "mend"] the load limiter cable.") - else - ..() - /obj/vehicle_old/train/engine/attackby(obj/item/W as obj, mob/user as mob) if(istype(W, key_type)) if(!key) @@ -84,33 +55,6 @@ return CLICKCHAIN_DO_NOT_PROPAGATE return ..() -/* -//cargo trains are open topped, so there is a chance the projectile will hit the mob ridding the train instead -/obj/vehicle_old/train/cargo/on_bullet_act(obj/projectile/proj, impact_flags, list/bullet_act_args) - if(has_buckled_mobs() && prob(70)) - var/mob/living/L = pick(buckled_mobs) - L.bullet_act(Proj) - return - ..() - -/obj/vehicle_old/train/cargo/update_icon() - if(open) - icon_state = initial(icon_state) + "_open" - else - icon_state = initial(icon_state) -*/ - -/obj/vehicle_old/train/trolley/insert_cell(var/obj/item/cell/C, var/mob/living/carbon/human/H) - return - -/obj/vehicle_old/train/engine/insert_cell(var/obj/item/cell/C, var/mob/living/carbon/human/H) - ..() - update_stats() - -/obj/vehicle_old/train/engine/remove_cell(var/mob/living/carbon/human/H) - ..() - update_stats() - /obj/vehicle_old/train/engine/Bump(atom/Obstacle) var/obj/machinery/door/D = Obstacle var/mob/living/carbon/human/H = load @@ -119,14 +63,6 @@ ..() -/obj/vehicle_old/train/trolley/Bump(atom/Obstacle) - if(!lead) - return //so people can't knock others over by pushing a trolley around - ..() - -//------------------------------------------- -// Train procs -//------------------------------------------- /obj/vehicle_old/train/engine/turn_on() if(!key) return @@ -153,17 +89,6 @@ else add_obj_verb(src, /obj/vehicle_old/train/engine/verb/stop_engine) -/obj/vehicle_old/train/RunOver(var/mob/living/M) - var/list/parts = list(BP_HEAD, BP_TORSO, BP_L_LEG, BP_R_LEG, BP_L_ARM, BP_R_ARM) - - M.apply_effects(5, 5) - for(var/i = 0, i < rand(1,3), i++) - M.apply_damage(rand(1,5), DAMAGE_TYPE_BRUTE, pick(parts)) - -/obj/vehicle_old/train/trolley/RunOver(var/mob/living/M) - ..() - attack_log += "\[[time_stamp()]\] ran over [M.name] ([M.ckey])" - /obj/vehicle_old/train/engine/RunOver(var/mob/living/M) ..() @@ -176,10 +101,6 @@ else attack_log += "\[[time_stamp()]\] ran over [M.name] ([M.ckey])" - -//------------------------------------------- -// Interaction procs -//------------------------------------------- /obj/vehicle_old/train/engine/relaymove(mob/user, direction) if(user != load) return 0 @@ -196,6 +117,7 @@ /obj/vehicle_old/train/engine/examine(mob/user, dist) . = ..() . += "The power light is [on ? "on" : "off"].\nThere are[key ? "" : " no"] keys in the ignition." + var/obj/item/cell/cell = get_cell() . += "The charge meter reads [cell? round(cell.percent(), 0.01) : 0]%" /obj/vehicle_old/train/engine/CtrlClick(var/mob/user) @@ -229,6 +151,7 @@ if (on) to_chat(usr, "You start [src]'s engine.") else + var/obj/item/cell/cell = get_cell() if(cell.charge < charge_use) to_chat(usr, "[src] is out of power.") else @@ -271,74 +194,12 @@ remove_obj_verb(src, /obj/vehicle_old/train/engine/verb/remove_key) -//------------------------------------------- -// Loading/unloading procs -//------------------------------------------- -/obj/vehicle_old/train/trolley/load(var/atom/movable/C, var/mob/user) - if(ismob(C) && !passenger_allowed) - return 0 - if(!istype(C,/obj/machinery) && !istype(C,/obj/structure/closet) && !istype(C,/obj/structure/largecrate) && !istype(C,/obj/structure/reagent_dispensers) && !istype(C,/obj/structure/ore_box) && !istype(C, /mob/living/carbon/human)) - return 0 - - //if there are any items you don't want to be able to interact with, add them to this check - // ~no more shielded, emitter armed death trains - if(istype(C, /obj/machinery)) - load_object(C) - else - ..(C, user) - - if(load) - return 1 - /obj/vehicle_old/train/engine/load(var/atom/movable/C, var/mob/user) if(!istype(C, /mob/living/carbon/human)) return 0 return ..() -//Load the object "inside" the trolley and add an overlay of it. -//This prevents the object from being interacted with until it has -// been unloaded. A dummy object is loaded instead so the loading -// code knows to handle it correctly. -/obj/vehicle_old/train/trolley/proc/load_object(atom/movable/C) - if(!isturf(C.loc)) //To prevent loading things from someone's inventory, which wouldn't get handled properly. - return 0 - if(load || C.anchored) - return 0 - - var/datum/vehicle_dummy_load/dummy_load = new() - load = dummy_load - - if(!load) - return - dummy_load.actual_load = C - C.forceMove(src) - - if(load_item_visible) - C.pixel_x += load_offset_x - C.pixel_y += load_offset_y - C.layer = layer - - add_overlay(C) - - //we can set these back now since we have already cloned the icon into the overlay - C.pixel_x = initial(C.pixel_x) - C.pixel_y = initial(C.pixel_y) - C.layer = initial(C.layer) - -/obj/vehicle_old/train/trolley/unload(mob/user, direction) - if(istype(load, /datum/vehicle_dummy_load)) - var/datum/vehicle_dummy_load/dummy_load = load - load = dummy_load.actual_load - dummy_load.actual_load = null - qdel(dummy_load) - cut_overlays() - ..() - -//------------------------------------------- -// Latching/unlatching procs -//------------------------------------------- - /obj/vehicle_old/train/engine/latch(obj/vehicle_old/train/T, mob/user) if(!istype(T) || !Adjacent(T)) return 0 @@ -355,17 +216,6 @@ else if(global.reverse_dir[dir] == T_dir) //else if car is behind T.attach_to(src, user) -//------------------------------------------------------- -// Stat update procs -// -// Update the trains stats for speed calculations. -// The longer the train, the slower it will go. car_limit -// sets the max number of cars one engine can pull at -// full speed. Adding more cars beyond this will slow the -// train proportionate to the length of the train. Adding -// more engines increases this limit by car_limit per -// engine. -//------------------------------------------------------- /obj/vehicle_old/train/engine/update_car(var/train_length, var/active_engines) src.train_length = train_length src.active_engines = active_engines @@ -378,12 +228,3 @@ move_delay *= (1 / max(1, active_engines)) * 2 //overweight penalty (scaled by the number of engines) move_delay += 2 //base reference speed move_delay *= speed_mod //makes cargo trains 10% slower than running when not overweight - -/obj/vehicle_old/train/trolley/update_car(var/train_length, var/active_engines) - src.train_length = train_length - src.active_engines = active_engines - - if(!lead && !tow) - anchored = 0 - else - anchored = 1 diff --git a/code/modules/vehicles_legacy/train/train-trolley.dm b/code/modules/vehicles_legacy/train/train-trolley.dm new file mode 100644 index 00000000000..2f5626c0ed2 --- /dev/null +++ b/code/modules/vehicles_legacy/train/train-trolley.dm @@ -0,0 +1,100 @@ + +/obj/vehicle_old/train/trolley + name = "cargo train trolley" + icon = 'icons/obj/vehicles.dmi' + icon_state = "cargo_trailer" + anchored = 0 + passenger_allowed = 0 + locked = 0 + + load_item_visible = 1 + load_offset_x = 0 + load_offset_y = 4 + mob_offset_y = 8 + +/obj/vehicle_old/train/trolley/attackby(obj/item/W as obj, mob/user as mob) + if(open && W.is_wirecutter()) + passenger_allowed = !passenger_allowed + user.visible_message("[user] [passenger_allowed ? "cuts" : "mends"] a cable in [src].","You [passenger_allowed ? "cut" : "mend"] the load limiter cable.") + else + ..() + +/obj/vehicle_old/train/trolley/Bump(atom/Obstacle) + if(!lead) + return //so people can't knock others over by pushing a trolley around + ..() + +/obj/vehicle_old/train/RunOver(var/mob/living/M) + var/list/parts = list(BP_HEAD, BP_TORSO, BP_L_LEG, BP_R_LEG, BP_L_ARM, BP_R_ARM) + + M.apply_effects(5, 5) + for(var/i = 0, i < rand(1,3), i++) + M.apply_damage(rand(1,5), DAMAGE_TYPE_BRUTE, pick(parts)) + +/obj/vehicle_old/train/trolley/RunOver(var/mob/living/M) + ..() + attack_log += "\[[time_stamp()]\] ran over [M.name] ([M.ckey])" + +/obj/vehicle_old/train/trolley/load(var/atom/movable/C, var/mob/user) + if(ismob(C) && !passenger_allowed) + return 0 + if(!istype(C,/obj/machinery) && !istype(C,/obj/structure/closet) && !istype(C,/obj/structure/largecrate) && !istype(C,/obj/structure/reagent_dispensers) && !istype(C,/obj/structure/ore_box) && !istype(C, /mob/living/carbon/human)) + return 0 + + //if there are any items you don't want to be able to interact with, add them to this check + // ~no more shielded, emitter armed death trains + if(istype(C, /obj/machinery)) + load_object(C) + else + ..(C, user) + + if(load) + return 1 + +//Load the object "inside" the trolley and add an overlay of it. +//This prevents the object from being interacted with until it has +// been unloaded. A dummy object is loaded instead so the loading +// code knows to handle it correctly. +/obj/vehicle_old/train/trolley/proc/load_object(atom/movable/C) + if(!isturf(C.loc)) //To prevent loading things from someone's inventory, which wouldn't get handled properly. + return 0 + if(load || C.anchored) + return 0 + + var/datum/vehicle_dummy_load/dummy_load = new() + load = dummy_load + + if(!load) + return + dummy_load.actual_load = C + C.forceMove(src) + + if(load_item_visible) + C.pixel_x += load_offset_x + C.pixel_y += load_offset_y + C.layer = layer + + add_overlay(C) + + //we can set these back now since we have already cloned the icon into the overlay + C.pixel_x = initial(C.pixel_x) + C.pixel_y = initial(C.pixel_y) + C.layer = initial(C.layer) + +/obj/vehicle_old/train/trolley/unload(mob/user, direction) + if(istype(load, /datum/vehicle_dummy_load)) + var/datum/vehicle_dummy_load/dummy_load = load + load = dummy_load.actual_load + dummy_load.actual_load = null + qdel(dummy_load) + cut_overlays() + ..() + +/obj/vehicle_old/train/trolley/update_car(var/train_length, var/active_engines) + src.train_length = train_length + src.active_engines = active_engines + + if(!lead && !tow) + anchored = 0 + else + anchored = 1 diff --git a/code/modules/vehicles_legacy/train.dm b/code/modules/vehicles_legacy/train/train.dm similarity index 96% rename from code/modules/vehicles_legacy/train.dm rename to code/modules/vehicles_legacy/train/train.dm index a957a1c6776..af77ff0acda 100644 --- a/code/modules/vehicles_legacy/train.dm +++ b/code/modules/vehicles_legacy/train/train.dm @@ -239,3 +239,10 @@ /obj/vehicle_old/train/proc/update_car(var/train_length, var/active_engines) return + +/obj/item/key/cargo_train + name = "key" + desc = "A keyring with a small steel key, and a yellow fob reading \"Choo Choo!\"." + icon = 'icons/obj/vehicles.dmi' + icon_state = "train_keys" + w_class = WEIGHT_CLASS_TINY diff --git a/code/modules/vehicles_legacy/vehicle.dm b/code/modules/vehicles_legacy/vehicle.dm index 00c186d542e..8ec5e25832f 100644 --- a/code/modules/vehicles_legacy/vehicle.dm +++ b/code/modules/vehicles_legacy/vehicle.dm @@ -35,7 +35,6 @@ var/powered = 0 //set if vehicle is powered and should use fuel when moving var/move_delay = 1 //set this to limit the speed of the vehicle - var/obj/item/cell/cell var/charge_use = 5 //set this to adjust the amount of power the vehicle uses per move var/paint_color = "#666666" //For vehicles with special paint overlays. @@ -46,13 +45,26 @@ var/load_offset_y = 0 //pixel_y offset for item overlay var/mob_offset_y = 0 //pixel_y offset for mob overlay -//------------------------------------------- -// Standard procs -//------------------------------------------- + var/cell_type + var/cell_accept -//BUCKLE HOOKS +/obj/vehicle_old/Initialize(mapload) + . = ..() + init_cell_slot_easy_machine(cell_type, cell_accept) + +/obj/vehicle_old/object_cell_slot_inserted(obj/item/cell/cell, datum/object_system/cell_slot/slot) + ..() + powercheck() + +/obj/vehicle_old/object_cell_slot_removed(obj/item/cell/cell, datum/object_system/cell_slot/slot) + ..() + powercheck() + +/obj/vehicle_old/object_cell_slot_mutable(mob/user, datum/object_system/cell_slot/slot, silent, datum/event_args/actor/actor) + return ..() && open /obj/vehicle_old/Move() + var/obj/item/cell/cell = get_cell() if(world.time > l_move_time + move_delay) var/old_loc = get_turf(src) if(mechanical && on && powered && cell.charge < charge_use) @@ -90,11 +102,6 @@ update_icon() to_chat(user, "Maintenance panel is now [open ? "opened" : "closed"].") playsound(src, W.tool_sound, 50, 1) - else if(W.is_crowbar() && cell && open) - remove_cell(user) - - else if(istype(W, /obj/item/cell) && !cell && open) - insert_cell(W, user) else if(istype(W, /obj/item/weldingtool)) var/obj/item/weldingtool/T = W if(T.welding) @@ -181,6 +188,7 @@ /obj/vehicle_old/proc/turn_on() if(!mechanical || stat) return FALSE + var/obj/item/cell/cell = get_cell() if(powered && cell.charge < charge_use) return FALSE on = 1 @@ -224,10 +232,11 @@ new /obj/effect/gibspawner/robot(Tsec) new /obj/effect/debris/cleanable/blood/oil(src.loc) + var/obj/item/cell/cell = obj_cell_slot?.cell if(cell) cell.forceMove(Tsec) cell.update_icon() - cell = null + obj_cell_slot.cell = null qdel(src) @@ -239,6 +248,7 @@ if(!mechanical) return + var/obj/item/cell/cell = get_cell() if(!cell && !powered) return @@ -254,31 +264,6 @@ turn_on() return -/obj/vehicle_old/proc/insert_cell(var/obj/item/cell/C, var/mob/living/carbon/human/H) - if(!mechanical) - return - if(cell) - return - if(!istype(C)) - return - if(!H.attempt_insert_item_for_installation(C, src)) - return - - cell = C - powercheck() - to_chat(usr, "You install [C] in [src].") - -/obj/vehicle_old/proc/remove_cell(var/mob/living/carbon/human/H) - if(!mechanical) - return - if(!cell) - return - - to_chat(usr, "You remove [cell] from [src].") - H.grab_item_from_interacted_with(cell, src) - cell = null - powercheck() - /obj/vehicle_old/proc/RunOver(var/mob/living/M) return //write specifics for different vehicles diff --git a/code/modules/vore/fluffstuff/custom_boxes.dm b/code/modules/vore/fluffstuff/custom_boxes.dm index 5055734b0e0..bbc0b97c34e 100644 --- a/code/modules/vore/fluffstuff/custom_boxes.dm +++ b/code/modules/vore/fluffstuff/custom_boxes.dm @@ -236,7 +236,9 @@ Swimsuits, for general use, to avoid arriving to work with your swimsuit. icon = 'icons/vore/custom_items_vr.dmi' icon_state = "capsule" foldable = null + // for corvo: makes it not a box w_class = WEIGHT_CLASS_SMALL + weight_volume = WEIGHT_VOLUME_SMALL max_single_weight_class = WEIGHT_CLASS_NORMAL insertion_whitelist = list(/obj/item/clothing/under/swimsuit/) starts_with = list(/obj/item/clothing/under/swimsuit/black) diff --git a/code/modules/vore/fluffstuff/custom_items.dm b/code/modules/vore/fluffstuff/custom_items.dm index 166a400d6f4..e8b422668b3 100644 --- a/code/modules/vore/fluffstuff/custom_items.dm +++ b/code/modules/vore/fluffstuff/custom_items.dm @@ -555,8 +555,8 @@ w_class = WEIGHT_CLASS_SMALL origin_tech = list(TECH_MAGNET = 5, TECH_BLUESPACE = 5, TECH_ILLEGAL = 7) - var/cell_type = /obj/item/cell/device/weapon - var/obj/item/cell/power_source + var/cell_type = /obj/item/cell/basic/tier_1/weapon + var/cell_accept = CELL_TYPE_SMALL | CELL_TYPE_WEAPON var/charge_cost = 800 // cell/device/weapon has 2400 var/list/beacons = list() @@ -569,11 +569,8 @@ var/list/logged_events = list() /obj/item/perfect_tele/Initialize(mapload) + init_cell_slot_easy_tool(cell_type, cell_accept) . = ..() - if(cell_type) - power_source = new cell_type(src) - else - power_source = new /obj/item/cell/device(src) spk = new(src) spk.set_up(5, 0, src) spk.attach(src) @@ -583,11 +580,11 @@ for(var/obj/item/perfect_tele_beacon/B in beacons) B.tele_hand = null beacons.Cut() - QDEL_NULL(power_source) QDEL_NULL(spk) return ..() /obj/item/perfect_tele/update_icon() + var/obj/item/cell/power_source = get_cell() if(!power_source) icon_state = "[initial(icon_state)]_o" else if(ready && (power_source.check_charge(charge_cost) || power_source.fully_charged())) @@ -597,15 +594,6 @@ ..() -/obj/item/perfect_tele/attack_hand(mob/user, datum/event_args/actor/clickchain/e_args) - if(user.get_inactive_held_item() == src && power_source) - to_chat(user,"You eject \the [power_source] from \the [src].") - user.put_in_hands(power_source) - power_source = null - update_icon() - else - return ..() - /obj/item/perfect_tele/attack_self(mob/user, datum/event_args/actor/actor) . = ..() if(.) @@ -655,15 +643,7 @@ return /obj/item/perfect_tele/attackby(obj/W, mob/user) - if(istype(W,cell_type) && !power_source) - if(!user.attempt_insert_item_for_installation(W, src)) - return - power_source = W - power_source.update_icon() //Why doesn't a cell do this already? :| - to_chat(user,"You insert \the [power_source] into \the [src].") - update_icon() - - else if(istype(W,/obj/item/perfect_tele_beacon)) + if(istype(W,/obj/item/perfect_tele_beacon)) var/obj/item/perfect_tele_beacon/tb = W if(tb.tele_name in beacons) if(!user.attempt_consume_item_for_construction(tb)) @@ -678,6 +658,7 @@ ..() /obj/item/perfect_tele/proc/teleport_checks(mob/living/target,mob/living/user) + var/obj/item/cell/power_source = get_cell() //Uhhuh, need that power source if(!power_source) to_chat(user,"\The [src] has no power source!") @@ -734,6 +715,7 @@ /obj/item/perfect_tele/afterattack(mob/living/target, mob/user, clickchain_flags, list/params) //No, you can't teleport people from over there. + var/obj/item/cell/power_source = get_cell() if(!(clickchain_flags & CLICKCHAIN_HAS_PROXIMITY)) return @@ -894,7 +876,7 @@ desc = "A more limited translocator with a single beacon, useful for some things, like setting the mining department on fire accidentally. Legal for use in the pursuit of Nanotrasen interests, namely mining and exploration." icon_state = "minitrans" beacons_left = 1 //Just one - cell_type = /obj/item/cell/device + cell_type = /obj/item/cell/basic/tier_1/small origin_tech = list(TECH_MAGNET = 5, TECH_BLUESPACE = 5) /* @@ -910,12 +892,13 @@ name = "alien translocator" desc = "This strange device allows one to teleport people and objects across large distances." - cell_type = /obj/item/cell/device/weapon/recharge/alien + cell_type = /obj/item/cell/regen/weapon charge_cost = 400 beacons_left = 6 failure_chance = 0 //Percent /obj/item/perfect_tele/admin/teleport_checks(mob/living/target,mob/living/user) + var/obj/item/cell/power_source = get_cell() //Uhhuh, need that power source if(!power_source) to_chat(user,"\The [src] has no power source!") diff --git a/code/modules/xenoarcheaology/artifacts/replicator.dm b/code/modules/xenoarcheaology/artifacts/replicator.dm index abf957cf646..31878e1d8cd 100644 --- a/code/modules/xenoarcheaology/artifacts/replicator.dm +++ b/code/modules/xenoarcheaology/artifacts/replicator.dm @@ -47,7 +47,9 @@ /obj/item/clothing/head/cone, /obj/item/tool/crowbar, /obj/item/clipboard, - /obj/item/cell, + /obj/item/cell/basic/tier_3/weapon, + /obj/item/cell/basic/tier_2/medium, + /obj/item/cell/basic/tier_1/large, /obj/item/surgical/circular_saw, /obj/item/material/knife/machete/hatchet, /obj/item/handcuffs, diff --git a/code/modules/xenoarcheaology/finds/find_spawning.dm b/code/modules/xenoarcheaology/finds/find_spawning.dm index 3b0c9846b4c..215fd5dea2a 100644 --- a/code/modules/xenoarcheaology/finds/find_spawning.dm +++ b/code/modules/xenoarcheaology/finds/find_spawning.dm @@ -305,10 +305,10 @@ if(prob(5)) new_gun.obj_cell_slot.cell.rigged = 1 if(prob(10)) - new_gun.obj_cell_slot.cell.maxcharge = 0 + new_gun.obj_cell_slot.cell.max_charge = 0 LAZYSET(new_gun.origin_tech, TECH_ARCANE, rand(0, 1)) if(prob(15)) - new_gun.obj_cell_slot.cell.charge = rand(0, new_gun.obj_cell_slot.cell.maxcharge) + new_gun.obj_cell_slot.cell.charge = rand(0, new_gun.obj_cell_slot.cell.max_charge) LAZYSET(new_gun.origin_tech, TECH_ARCANE, 1) else new_gun.obj_cell_slot.cell.charge = 0 @@ -429,7 +429,7 @@ /obj/item/surgical/retractor/alien, /obj/item/surgical/scalpel/alien, /obj/item/surgical/surgicaldrill/alien, - /obj/item/cell/device/weapon/recharge/alien, + /obj/item/cell/regen/weapon, /obj/item/clothing/suit/armor/alien, /obj/item/clothing/head/helmet/alien, /obj/item/clothing/head/psy_crown/wrath diff --git a/code/modules/xenoarcheaology/tools/suspension_generator.dm b/code/modules/xenoarcheaology/tools/suspension_generator.dm index 6777cbee61f..ce1e9243a1a 100644 --- a/code/modules/xenoarcheaology/tools/suspension_generator.dm +++ b/code/modules/xenoarcheaology/tools/suspension_generator.dm @@ -5,17 +5,20 @@ icon_state = "suspension2" density = 1 req_access = list(ACCESS_SCIENCE_MAIN) - var/obj/item/cell/cell + var/cell_type = /obj/item/cell/basic/tier_1/large + var/cell_accept = CELL_TYPE_LARGE | CELL_TYPE_MEDIUM | CELL_TYPE_WEAPON | CELL_TYPE_SMALL var/locked = TRUE var/power_use = 5 var/obj/effect/suspension_field/suspension_field /obj/machinery/suspension_gen/Initialize(mapload) . = ..() - qdel(cell) - cell = new /obj/item/cell/high(src) + if(. == INITIALIZE_HINT_QDEL) + return + init_cell_slot_easy_machine(cell_type, cell_accept) /obj/machinery/suspension_gen/process(delta_time) + var/obj/item/cell/cell = get_cell() if(suspension_field) if(cell.use(power_use)) var/turf/T = get_turf(suspension_field) @@ -36,17 +39,6 @@ deactivate() /obj/machinery/suspension_gen/attack_hand(mob/user, datum/event_args/actor/clickchain/e_args) - if(panel_open) - if(cell) - to_chat(user, SPAN_NOTICE("You remove [cell].")) - cell.forceMove(loc) - cell.add_fingerprint(user) - cell.update_icon() - - icon_state = "suspension0" - cell = null - return - ui_interact(user) /obj/machinery/suspension_gen/ui_interact(mob/user, datum/tgui/ui) @@ -57,10 +49,11 @@ /obj/machinery/suspension_gen/ui_data(mob/user, datum/tgui/ui) var/list/data = ..() + var/obj/item/cell/cell = get_cell() data["cell"] = cell data["cellCharge"] = cell?.charge - data["cellMaxCharge"] = cell?.maxcharge + data["cellMaxCharge"] = cell?.max_charge data["locked"] = locked data["suspension_field"] = suspension_field @@ -71,6 +64,7 @@ if(..()) return TRUE + var/obj/item/cell/cell = get_cell() switch(action) if("toggle_field") if(locked) @@ -107,22 +101,13 @@ desc = "It has stubby legs bolted up against it's body for stabilising." else to_chat(user, SPAN_WARNING("You are unable to unsecure [src] while it is active!")) - else if(istype(W, /obj/item/cell)) - if(panel_open) - if(cell) - to_chat(user, SPAN_WARNING("There is a power cell already installed.")) - return - if(!user.attempt_insert_item_for_installation(W, src)) - return - cell = W - to_chat(user, SPAN_NOTICE("You insert [cell].")) - icon_state = "suspension1" else if(check_access(W)) locked = !locked to_chat(user, SPAN_NOTICE("You [locked ? "lock" : "unlock"] [src].")) else to_chat(user, SPAN_WARNING("[src] flashes \'Access denied.\'")) + return ..() /obj/machinery/suspension_gen/emag_act(var/remaining_charges, var/mob/user) if(locked) diff --git a/code/modules/xenobio/items/extracts.dm b/code/modules/xenobio/items/extracts.dm index f080ea3fa05..3a533ec3382 100644 --- a/code/modules/xenobio/items/extracts.dm +++ b/code/modules/xenobio/items/extracts.dm @@ -484,7 +484,8 @@ required_container_path = /obj/item/slime_extract/yellow /datum/chemical_reaction/slime/yellow_battery/on_extract_reaction(datum/reagent_holder/holder, multiplier, obj/item/slime_extract/extract) - new /obj/item/cell/slime(get_turf(holder.my_atom)) + for(var/i in 1 to 2) + new /obj/item/cell/slime_core/whole(get_turf(holder.my_atom)) ..() // *************** diff --git a/code/modules/xenobio/items/weapons.dm b/code/modules/xenobio/items/weapons.dm index baf830f7207..8eb60ee02e3 100644 --- a/code/modules/xenobio/items/weapons.dm +++ b/code/modules/xenobio/items/weapons.dm @@ -8,7 +8,7 @@ active_color = "#33CCFF" origin_tech = list(TECH_COMBAT = 2, TECH_BIO = 2) description_info = "This baton will stun a slime or other slime-based lifeform for about five seconds, if hit with it while on." - charge_cost = /obj/item/cell/device::maxcharge / 10 + charge_cost = /obj/item/cell/basic/tier_1/weapon::max_charge / 10 stun_power = 10 var/extra_slime_stun_power = 40 @@ -32,7 +32,7 @@ ) /obj/item/melee/baton/slime/loaded - cell_type = /obj/item/cell/device + cell_type = /obj/item/cell/basic/tier_1/weapon // Research borg's version /obj/item/melee/baton/slime/robot @@ -52,7 +52,7 @@ While marketed towards handling slimes, it may be useful for other creatures." icon_state = "taserold" fire_sound = 'sound/weapons/taser2.ogg' - charge_cost = 120 // Twice as many shots. + charge_cost = POWER_CELL_CAPACITY_WEAPON / 24 no_pin_required = 1 accuracy = 30 // Make it a bit easier to hit the slimes. description_info = "This gun will stun a slime or other lesser slimy lifeform for about two seconds, if hit with the projectile it fires." diff --git a/code/unit_tests/datum/design.dm b/code/unit_tests/datum/design.dm index 3bd84a7c2d5..2145cfac55c 100644 --- a/code/unit_tests/datum/design.dm +++ b/code/unit_tests/datum/design.dm @@ -3,12 +3,6 @@ for(var/datum/prototype/design/path as anything in subtypesof(/datum/prototype/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/prototype/design/instance = new path lookup[initial(path.id)] = instance if(!length(instance.materials_base) && !length(instance.material_costs) && !length(instance.reagents) && !length(instance.ingredients) && !(instance.design_flags & DESIGN_IGNORE_RESOURCE_SANITY)) diff --git a/icons/items/power/cells/large.dmi b/icons/items/power/cells/large.dmi new file mode 100644 index 00000000000..80dcad7aee7 Binary files /dev/null and b/icons/items/power/cells/large.dmi differ diff --git a/icons/items/power/cells/medium.dmi b/icons/items/power/cells/medium.dmi new file mode 100644 index 00000000000..d2905518c3d Binary files /dev/null and b/icons/items/power/cells/medium.dmi differ diff --git a/icons/items/power/cells/small.dmi b/icons/items/power/cells/small.dmi new file mode 100644 index 00000000000..eec8aaaebf5 Binary files /dev/null and b/icons/items/power/cells/small.dmi differ diff --git a/icons/items/power/cells/special/slime_core.dmi b/icons/items/power/cells/special/slime_core.dmi new file mode 100644 index 00000000000..571c1188ce1 Binary files /dev/null and b/icons/items/power/cells/special/slime_core.dmi differ diff --git a/icons/items/power/cells/weapon.dmi b/icons/items/power/cells/weapon.dmi new file mode 100644 index 00000000000..c3ac4b0d2ec Binary files /dev/null and b/icons/items/power/cells/weapon.dmi differ diff --git a/icons/modules/projectiles/projectile-hardsprited.dmi b/icons/modules/projectiles/projectile-hardsprited.dmi new file mode 100644 index 00000000000..b4f90e773a4 Binary files /dev/null and b/icons/modules/projectiles/projectile-hardsprited.dmi differ diff --git a/icons/obj/power.dmi b/icons/obj/power.dmi index 754b5962901..686a2a28431 100644 Binary files a/icons/obj/power.dmi and b/icons/obj/power.dmi differ diff --git a/icons/obj/projectiles_tracer.dmi b/icons/obj/projectiles_tracer.dmi index ebda77bfd26..2b74239014f 100644 Binary files a/icons/obj/projectiles_tracer.dmi and b/icons/obj/projectiles_tracer.dmi differ diff --git a/icons/screen/atom_hud/job.dmi b/icons/screen/atom_hud/job.dmi index 3bddacae14b..1487548bd50 100644 Binary files a/icons/screen/atom_hud/job.dmi and b/icons/screen/atom_hud/job.dmi differ diff --git a/maps/away_missions/archive/blackmarketpackers.dmm b/maps/away_missions/archive/blackmarketpackers.dmm index a356680a0bc..876c89194b9 100644 --- a/maps/away_missions/archive/blackmarketpackers.dmm +++ b/maps/away_missions/archive/blackmarketpackers.dmm @@ -1387,7 +1387,7 @@ /area/awaymission/BMPship1) "fE" = ( /obj/structure/table/rack, -/obj/item/cell/high, +/obj/item/cell/basic/tier_1/medium, /turf/simulated/floor/tiled/dark, /area/awaymission/BMPship1) "fF" = ( @@ -1528,7 +1528,7 @@ /obj/structure/cable{ icon_state = "1-2" }, -/obj/item/cell/high, +/obj/item/cell/basic/tier_1/medium, /turf/simulated/floor, /area/awaymission/BMPship1) "gi" = ( diff --git a/maps/away_missions/archive/desertbase.dmm b/maps/away_missions/archive/desertbase.dmm index 4bcdfed5cfd..059d395125c 100644 --- a/maps/away_missions/archive/desertbase.dmm +++ b/maps/away_missions/archive/desertbase.dmm @@ -284,9 +284,7 @@ /obj/item/stack/material/glass{ amount = 15 }, -/obj/item/cell{ - maxcharge = 15000 - }, +/obj/item/cell/basic/tier_3/medium, /turf/simulated/shuttle/floor/darkred, /area/space) "ba" = ( diff --git a/maps/away_missions/archive/example.dmm b/maps/away_missions/archive/example.dmm index ca020315233..c09ef86193e 100644 --- a/maps/away_missions/archive/example.dmm +++ b/maps/away_missions/archive/example.dmm @@ -401,7 +401,7 @@ "bG" = ( /obj/machinery/door/airlock{ name = "Unisex Restrooms"; - + }, /turf/simulated/floor/tiled/white, /area/awaymission/example) @@ -615,7 +615,7 @@ /area/awaymission/example) "cw" = ( /obj/structure/table/standard, -/obj/item/cell/high, +/obj/item/cell/basic/tier_1/medium, /turf/simulated/floor, /area/awaymission/example) "cy" = ( diff --git a/maps/away_missions/archive/jungle.dmm b/maps/away_missions/archive/jungle.dmm index b29a7b537e4..c86301bc292 100644 --- a/maps/away_missions/archive/jungle.dmm +++ b/maps/away_missions/archive/jungle.dmm @@ -708,7 +708,7 @@ /turf/simulated/floor/tiled/white, /area/jungle/crash_ship_source) "dN" = ( -/obj/item/cell, +/obj/item/cell/basic/tier_3/medium, /turf/simulated/floor/tiled/white, /area/jungle/crash_ship_source) "dO" = ( diff --git a/maps/away_missions/archive/spacebattle.dmm b/maps/away_missions/archive/spacebattle.dmm index e3c7a315092..9bf0db51890 100644 --- a/maps/away_missions/archive/spacebattle.dmm +++ b/maps/away_missions/archive/spacebattle.dmm @@ -1343,8 +1343,8 @@ /area/awaymission/spacebattle/cruiser) "hC" = ( /obj/structure/closet/crate, -/obj/item/cell/high, -/obj/item/cell/high, +/obj/item/cell/basic/tier_1/medium, +/obj/item/cell/basic/tier_1/medium, /turf/simulated/floor/plating, /area/awaymission/spacebattle/cruiser) "hD" = ( diff --git a/maps/away_missions/archive/stationCollision.dmm b/maps/away_missions/archive/stationCollision.dmm index 92a922d7680..313bf015e20 100644 --- a/maps/away_missions/archive/stationCollision.dmm +++ b/maps/away_missions/archive/stationCollision.dmm @@ -1177,7 +1177,7 @@ pixel_x = -3; pixel_y = 5 }, -/obj/item/cell/crap, +/obj/item/cell/basic/tier_1/medium, /turf/simulated/floor/airless, /area/awaymission/research) "fo" = ( diff --git a/maps/away_missions/archive/zresearchlabs.dmm b/maps/away_missions/archive/zresearchlabs.dmm index 3a6bf460974..7810deea9b9 100644 --- a/maps/away_missions/archive/zresearchlabs.dmm +++ b/maps/away_missions/archive/zresearchlabs.dmm @@ -188,12 +188,8 @@ /obj/item/airlock_electronics, /obj/item/airlock_electronics, /obj/item/module/power_control, -/obj/item/cell/high{ - maxcharge = 15000 - }, -/obj/item/cell/high{ - maxcharge = 15000 - }, +/obj/item/cell/basic/tier_1/medium, +/obj/item/cell/basic/tier_1/medium, /obj/machinery/light, /turf/simulated/floor/plating, /area/awaymission/labs/cave) @@ -2598,7 +2594,7 @@ /obj/structure/cable{ icon_state = "4-8" }, -/obj/item/cell/hyper, +/obj/item/cell/basic/tier_1/medium, /obj/structure/cable{ icon_state = "1-8" }, @@ -3301,7 +3297,7 @@ "jH" = ( /obj/structure/table/reinforced, /obj/item/borg/upgrade/vtec, -/obj/item/cell/hyper/empty, +/obj/item/cell/basic/tier_1/medium/empty, /turf/simulated/floor{ icon_state = "white" }, @@ -5879,7 +5875,7 @@ pixel_y = 5 }, /obj/item/storage/belt/champion, -/obj/item/cell/infinite, +/obj/item/cell/basic/tier_1/medium, /turf/simulated/floor{ dir = 1 }, diff --git a/maps/away_missions/snow_outpost_140/levels/snow_outpost.dmm b/maps/away_missions/snow_outpost_140/levels/snow_outpost.dmm index bca1e768466..216d3fc2bc3 100644 --- a/maps/away_missions/snow_outpost_140/levels/snow_outpost.dmm +++ b/maps/away_missions/snow_outpost_140/levels/snow_outpost.dmm @@ -701,8 +701,8 @@ /area/awaymission/snow_outpost/powered) "di" = ( /obj/structure/table/standard, -/obj/item/cell/high, -/obj/item/cell/high, +/obj/item/cell/basic/tier_1/medium, +/obj/item/cell/basic/tier_1/medium, /turf/simulated/floor, /area/awaymission/snow_outpost/powered) "dj" = ( @@ -828,7 +828,7 @@ /area/awaymission/snow_outpost/dark) "dJ" = ( /obj/structure/table/woodentable, -/obj/item/cell/device/weapon/recharge/alien, +/obj/item/cell/regen/fractal/weapon, /turf/simulated/shuttle/floor/alienplating, /area/awaymission/snow_outpost/dark) "dK" = ( diff --git a/maps/away_missions/zoo_197x305/levels/zoo.dmm b/maps/away_missions/zoo_197x305/levels/zoo.dmm index 128684df940..c0a34066c54 100644 --- a/maps/away_missions/zoo_197x305/levels/zoo.dmm +++ b/maps/away_missions/zoo_197x305/levels/zoo.dmm @@ -1423,7 +1423,7 @@ /area/awaymission/zoo/pirateship) "eq" = ( /obj/structure/table/rack, -/obj/item/cell/high, +/obj/item/cell/basic/tier_1/medium, /obj/effect/floor_decal/industrial/warning{ dir = 8 }, @@ -1621,7 +1621,7 @@ /turf/simulated/floor/plating, /area/awaymission/zoo/pirateship) "eT" = ( -/obj/item/cell/high, +/obj/item/cell/basic/tier_1/medium, /turf/simulated/floor/tiled, /area/awaymission/zoo/pirateship) "eU" = ( @@ -2348,9 +2348,7 @@ /obj/item/stack/material/glass{ amount = 15 }, -/obj/item/cell{ - maxcharge = 15000 - }, +/obj/item/cell/basic/tier_2/medium, /turf/simulated/shuttle/floor/darkred, /area/awaymission/zoo/syndieship) "hf" = ( @@ -8293,9 +8291,9 @@ "xc" = ( /obj/structure/closet/crate/solar, /obj/effect/floor_decal/industrial/outline/yellow, -/obj/item/cell/crap, -/obj/item/cell/crap, -/obj/item/cell/crap, +/obj/item/cell/basic/tier_1/medium, +/obj/item/cell/basic/tier_1/medium, +/obj/item/cell/basic/tier_1/medium, /turf/simulated/floor, /area/awaymission/zoo) "xd" = ( diff --git a/maps/map_levels/140x140/alienship.dmm b/maps/map_levels/140x140/alienship.dmm index fd173bcd2f2..c0027a85d2f 100644 --- a/maps/map_levels/140x140/alienship.dmm +++ b/maps/map_levels/140x140/alienship.dmm @@ -123,7 +123,7 @@ /turf/simulated/shuttle/floor/alien, /area/tether_away/alienship) "aB" = ( -/obj/item/cell/device/weapon/recharge/alien, +/obj/item/cell/regen/fractal/weapon, /turf/simulated/shuttle/floor/alienplating, /area/tether_away/alienship) "aC" = ( @@ -133,7 +133,7 @@ /area/tether_away/alienship) "aD" = ( /obj/structure/table/alien, -/obj/item/cell/device/weapon/recharge/alien, +/obj/item/cell/regen/fractal/weapon, /turf/simulated/shuttle/floor/alienplating, /area/tether_away/alienship) "aE" = ( @@ -495,13 +495,13 @@ /turf/simulated/shuttle/floor/alien, /area/tether_away/alienship) "cI" = ( -/obj/item/cell/device/weapon/recharge/alien, +/obj/item/cell/regen/fractal/weapon, /obj/structure/table/alien, /obj/item/weldingtool/alien, /turf/simulated/shuttle/floor/alienplating, /area/tether_away/alienship) "cJ" = ( -/obj/item/cell/device/weapon/recharge/alien, +/obj/item/cell/regen/fractal/weapon, /obj/structure/table/alien, /turf/simulated/shuttle/floor/alienplating, /area/tether_away/alienship) diff --git a/maps/map_levels/140x140/talon/talon1.dmm b/maps/map_levels/140x140/talon/talon1.dmm index 2562315959c..5cf260669c6 100644 --- a/maps/map_levels/140x140/talon/talon1.dmm +++ b/maps/map_levels/140x140/talon/talon1.dmm @@ -76,7 +76,6 @@ /obj/machinery/vending/engineering{ icon_deny = null; icon_state = "sovietsoda"; - products = list(/obj/item/clothing/under/rank/chief_engineer=4,/obj/item/clothing/under/rank/engineer=4,/obj/item/clothing/shoes/orange=4,/obj/item/clothing/head/hardhat=4,/obj/item/storage/belt/utility=4,/obj/item/clothing/glasses/meson=4,/obj/item/clothing/gloves/yellow=4,/obj/item/tool/screwdriver=12,/obj/item/tool/crowbar=12,/obj/item/tool/wirecutters=12,/obj/item/multitool=12,/obj/item/tool/wrench=12,/obj/item/t_scanner=12,/obj/item/stack/cable_coil/heavyduty=8,/obj/item/cell=8,/obj/item/weldingtool=8,/obj/item/clothing/head/welding=8,/obj/item/light/tube=10,/obj/item/clothing/head/hardhat/red=4,/obj/item/clothing/suit/fire=4,/obj/item/stock_parts/scanning_module=5,/obj/item/stock_parts/micro_laser=5,/obj/item/stock_parts/matter_bin=5,/obj/item/stock_parts/manipulator=5,/obj/item/stock_parts/console_screen=5); req_access = list(301); req_log_access = 301; req_one_access = list(301) @@ -195,15 +194,15 @@ pixel_y = 24 }, /obj/structure/table/standard, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_3/weapon{ pixel_x = -5; pixel_y = 2 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_3/weapon{ pixel_x = 5; pixel_y = 2 }, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_3/weapon, /turf/simulated/floor/tiled/eris/steel, /area/talon/deckone/brig) "cb" = ( @@ -2334,7 +2333,6 @@ /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/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 }, @@ -3538,14 +3536,14 @@ /obj/machinery/atmospherics/component/unary/vent_pump/on, /obj/structure/table/standard, /obj/machinery/cell_charger, -/obj/item/cell/super{ +/obj/item/cell/basic/tier_4/medium{ pixel_x = -5; pixel_y = 5 }, -/obj/item/cell/super{ +/obj/item/cell/basic/tier_4/medium{ pixel_y = 10 }, -/obj/item/cell/super{ +/obj/item/cell/basic/tier_4/medium{ pixel_x = 5; pixel_y = 5 }, @@ -5588,15 +5586,15 @@ /area/talon/deckone/central_hallway) "Uy" = ( /obj/structure/table/rack/shelf/steel, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_3/weapon{ pixel_x = -5; pixel_y = 1 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_3/weapon{ pixel_x = 5; pixel_y = 1 }, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_3/weapon, /turf/simulated/floor/tiled/eris/white/danger, /area/talon/deckone/armory) "UA" = ( @@ -5842,15 +5840,15 @@ /area/talon/deckone/engine) "WJ" = ( /obj/structure/table/rack/shelf/steel, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_3/weapon{ pixel_x = 5; pixel_y = 1 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_3/weapon{ pixel_x = -5; pixel_y = 1 }, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_3/weapon, /obj/item/gun/projectile/energy/netgun, /turf/simulated/floor/tiled/eris/white/danger, /area/talon/deckone/armory) diff --git a/maps/map_levels/140x140/talon/talon2.dmm b/maps/map_levels/140x140/talon/talon2.dmm index 182b941f23e..0b7692167d4 100644 --- a/maps/map_levels/140x140/talon/talon2.dmm +++ b/maps/map_levels/140x140/talon/talon2.dmm @@ -465,7 +465,7 @@ /area/talon/decktwo/central_hallway) "gK" = ( /obj/structure/table/rack/shelf/steel, -/obj/item/cell/device/weapon/empty, +/obj/item/cell/basic/tier_3/weapon/empty, /obj/item/gun/projectile/energy/gun/eluger, /turf/simulated/floor/reinforced, /area/talon/decktwo/vault) @@ -3741,7 +3741,7 @@ /area/talon/decktwo/central_hallway) "Rr" = ( /obj/structure/table/rack/shelf/steel, -/obj/item/cell/device/weapon/empty, +/obj/item/cell/basic/tier_3/weapon/empty, /obj/item/gun/projectile/energy/laser/practice, /obj/item/gun/projectile/energy/laser/practice, /obj/item/gun/projectile/energy/laser/practice, diff --git a/maps/sectors/admin_planets_192/andromeda.dmm b/maps/sectors/admin_planets_192/andromeda.dmm index 00d478e4233..206d1d63451 100644 --- a/maps/sectors/admin_planets_192/andromeda.dmm +++ b/maps/sectors/admin_planets_192/andromeda.dmm @@ -771,7 +771,7 @@ /turf/simulated/floor/tiled/kafel_full/green, /area/admin_planet/andromeda/medward_storage) "cu" = ( -/obj/machinery/power/apc/high/south_mount, +/obj/machinery/power/apc/large_cell/south_mount, /obj/structure/cable, /turf/simulated/floor/tiled/techfloor, /area/admin_planet/andromeda/rnd_xenobio_storage) @@ -1196,7 +1196,7 @@ /turf/space, /area/admin_planet/andromeda/engi_workroom) "dP" = ( -/obj/machinery/power/apc/high/west_mount, +/obj/machinery/power/apc/large_cell/west_mount, /obj/structure/cable, /turf/simulated/floor/tiled/yellow, /area/admin_planet/andromeda/supply_office) @@ -1396,7 +1396,7 @@ id = "checkpoint1"; pixel_x = 5 }, -/obj/machinery/power/apc/high/west_mount, +/obj/machinery/power/apc/large_cell/west_mount, /obj/structure/cable, /turf/simulated/floor/tiled/kafel_full/red, /area/admin_planet/andromeda/checkpoint_2) @@ -1853,7 +1853,7 @@ /obj/effect/floor_decal/industrial/warning{ dir = 1 }, -/obj/machinery/power/apc/high/west_mount, +/obj/machinery/power/apc/large_cell/west_mount, /obj/structure/closet/secure_closet/robotics, /obj/structure/cable{ dir = 8 @@ -1913,7 +1913,7 @@ }, /area/admin_planet/andromeda/medward_surgical_a) "gb" = ( -/obj/machinery/power/apc/high/north_mount, +/obj/machinery/power/apc/large_cell/north_mount, /obj/structure/cable{ icon_state = "0-8" }, @@ -2050,7 +2050,7 @@ /turf/simulated/floor/tiled/techfloor, /area/admin_planet/andromeda/engi_equipment) "gE" = ( -/obj/machinery/power/apc/high/west_mount, +/obj/machinery/power/apc/large_cell/west_mount, /obj/structure/cable{ icon_state = "0-4" }, @@ -2694,7 +2694,7 @@ }, /area/admin_planet/andromeda/engi_monitoring) "il" = ( -/obj/machinery/power/apc/high/north_mount, +/obj/machinery/power/apc/large_cell/north_mount, /obj/structure/cable{ icon_state = "0-2" }, @@ -3256,7 +3256,7 @@ /turf/simulated/floor/carpet/bcarpet, /area/admin_planet/andromeda/rnd_lobby) "jH" = ( -/obj/machinery/power/apc/high/east_mount, +/obj/machinery/power/apc/large_cell/east_mount, /obj/structure/cable, /turf/simulated/floor/tiled/kafel_full/red, /area/admin_planet/andromeda/sec_office) @@ -3286,7 +3286,7 @@ /turf/simulated/floor/tiled/steel_grid, /area/admin_planet/andromeda/rnd_xenobotany) "jO" = ( -/obj/machinery/power/apc/high/north_mount, +/obj/machinery/power/apc/large_cell/north_mount, /obj/structure/cable{ dir = 1 }, @@ -3610,7 +3610,7 @@ /turf/simulated/floor/tiled/yellow, /area/admin_planet/andromeda/supply_office) "kO" = ( -/obj/machinery/power/apc/high/north_mount, +/obj/machinery/power/apc/large_cell/north_mount, /obj/structure/cable{ icon_state = "0-2" }, @@ -3744,7 +3744,7 @@ /obj/effect/floor_decal/carpet/blue{ dir = 5 }, -/obj/machinery/power/apc/high/west_mount, +/obj/machinery/power/apc/large_cell/west_mount, /obj/structure/cable{ dir = 8 }, @@ -4385,7 +4385,7 @@ /turf/simulated/floor/reinforced, /area/admin_planet/andromeda/northern_lobby) "nm" = ( -/obj/machinery/power/apc/high/north_mount, +/obj/machinery/power/apc/large_cell/north_mount, /obj/structure/cable{ icon_state = "0-2" }, @@ -4977,45 +4977,45 @@ /area/admin_planet/andromeda/engi_lobby) "pa" = ( /obj/structure/table/rack/shelf/steel, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 6; pixel_y = -4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -8; pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -4; pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 4; pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 8; pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -8; pixel_y = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -4; pixel_y = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_y = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 4; pixel_y = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 8; pixel_y = 3 }, @@ -5154,7 +5154,7 @@ pixel_y = -8; pixel_x = -15 }, -/obj/machinery/power/apc/high/west_mount, +/obj/machinery/power/apc/large_cell/west_mount, /obj/structure/cable{ dir = 8 }, @@ -5410,7 +5410,7 @@ }, /area/admin_planet/andromeda/lobby) "qs" = ( -/obj/machinery/power/apc/high/west_mount, +/obj/machinery/power/apc/large_cell/west_mount, /obj/structure/cable{ icon_state = "0-4" }, @@ -5900,7 +5900,7 @@ /turf/simulated/floor/tiled/steel, /area/admin_planet/andromeda/engi_workroom) "rU" = ( -/obj/machinery/power/apc/high/north_mount, +/obj/machinery/power/apc/large_cell/north_mount, /obj/structure/cable{ icon_state = "0-2" }, @@ -5927,7 +5927,7 @@ }, /area/admin_planet/andromeda/lobby) "sd" = ( -/obj/machinery/power/apc/high/north_mount, +/obj/machinery/power/apc/large_cell/north_mount, /obj/structure/cable{ icon_state = "0-4" }, @@ -5996,35 +5996,18 @@ /area/admin_planet/andromeda/sec_holding_cell) "sn" = ( /obj/structure/table/reinforced, -/obj/item/cell/high{ - maxcharge = 15000; - pixel_y = 7 - }, -/obj/item/cell/high{ - maxcharge = 15000; - pixel_y = -3 - }, -/obj/item/cell/high{ - maxcharge = 15000; - pixel_y = 2 - }, -/obj/item/cell/high{ - maxcharge = 15000 - }, -/obj/item/cell/high{ - maxcharge = 15000; - pixel_y = 7 - }, -/obj/item/cell/high{ - maxcharge = 15000; - pixel_y = -3 - }, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_3/small, +/obj/item/cell/basic/tier_3/small, +/obj/item/cell/basic/tier_3/small, +/obj/item/cell/basic/tier_3/small, +/obj/item/cell/basic/tier_3/small, +/obj/item/cell/basic/tier_3/small, /turf/simulated/floor/tiled/techfloor, /area/admin_planet/andromeda/engi_equipment) "so" = ( @@ -6361,7 +6344,7 @@ /turf/simulated/floor/tiled/kafel_full/gray, /area/admin_planet/andromeda/supply_lobby) "tr" = ( -/obj/machinery/power/apc/high/west_mount, +/obj/machinery/power/apc/large_cell/west_mount, /obj/structure/cable{ dir = 1 }, @@ -6608,7 +6591,7 @@ /turf/simulated/floor/bmarble, /area/admin_planet/andromeda/rnd_rd_office) "um" = ( -/obj/machinery/power/apc/high/east_mount, +/obj/machinery/power/apc/large_cell/east_mount, /obj/structure/cable{ icon_state = "0-8" }, @@ -7328,7 +7311,7 @@ /turf/simulated/floor/plating, /area/admin_planet/andromeda/western_maints) "wP" = ( -/obj/machinery/power/apc/high/south_mount, +/obj/machinery/power/apc/large_cell/south_mount, /obj/structure/cable{ icon_state = "0-8" }, @@ -7562,7 +7545,7 @@ /turf/simulated/floor/tiled/kafel_full/yellow, /area/admin_planet/andromeda/medward_chemistry) "xs" = ( -/obj/machinery/power/apc/high/south_mount, +/obj/machinery/power/apc/large_cell/south_mount, /obj/structure/cable{ dir = 8 }, @@ -8400,7 +8383,7 @@ /turf/simulated/floor/tiled/techfloor/monogrid, /area/admin_planet/andromeda/engi_prep) "zT" = ( -/obj/machinery/power/apc/high/north_mount, +/obj/machinery/power/apc/large_cell/north_mount, /obj/structure/cable{ icon_state = "0-8" }, @@ -8445,7 +8428,7 @@ /turf/simulated/floor/plating, /area/admin_planet/andromeda/rnd_lobby) "Af" = ( -/obj/machinery/power/apc/high/east_mount, +/obj/machinery/power/apc/large_cell/east_mount, /obj/structure/cable{ icon_state = "0-8" }, @@ -9204,7 +9187,7 @@ /turf/simulated/floor/tiled/kafel_full/gray, /area/admin_planet/andromeda/rnd_circuitry) "Cx" = ( -/obj/machinery/power/apc/high/east_mount, +/obj/machinery/power/apc/large_cell/east_mount, /obj/structure/cable{ icon_state = "0-8" }, @@ -9267,7 +9250,7 @@ pixel_x = -2; pixel_y = -2 }, -/obj/machinery/power/apc/high/north_mount, +/obj/machinery/power/apc/large_cell/north_mount, /obj/structure/cable{ icon_state = "0-2" }, @@ -9349,7 +9332,7 @@ /turf/simulated/floor/reinforced, /area/admin_planet/andromeda/rnd_xenobio) "CW" = ( -/obj/machinery/power/apc/high/south_mount, +/obj/machinery/power/apc/large_cell/south_mount, /obj/structure/cable/orange, /turf/simulated/floor/tiled/techfloor, /area/admin_planet/andromeda/engi_monitoring) @@ -9633,7 +9616,7 @@ id = "checkpoint1"; pixel_x = -6 }, -/obj/machinery/power/apc/high/east_mount, +/obj/machinery/power/apc/large_cell/east_mount, /obj/structure/cable, /turf/simulated/floor/tiled/kafel_full/red, /area/admin_planet/andromeda/checkpoint_1) @@ -9720,7 +9703,7 @@ }, /area/admin_planet/andromeda/medward_chemistry) "Ek" = ( -/obj/machinery/power/apc/high/north_mount, +/obj/machinery/power/apc/large_cell/north_mount, /obj/structure/cable{ icon_state = "0-2" }, @@ -9923,7 +9906,7 @@ /turf/simulated/floor/tiled/steel, /area/admin_planet/andromeda/rnd_lockers) "EW" = ( -/obj/machinery/power/apc/high/west_mount, +/obj/machinery/power/apc/large_cell/west_mount, /obj/structure/cable{ icon_state = "0-2" }, @@ -10450,7 +10433,7 @@ /turf/space, /area/admin_planet/andromeda/engi_workroom) "GC" = ( -/obj/machinery/power/apc/high/north_mount, +/obj/machinery/power/apc/large_cell/north_mount, /obj/structure/cable{ dir = 1 }, @@ -10743,7 +10726,7 @@ /obj/machinery/light/flamp{ pixel_x = 14 }, -/obj/machinery/power/apc/high/east_mount, +/obj/machinery/power/apc/large_cell/east_mount, /obj/structure/cable{ icon_state = "0-8" }, @@ -11674,7 +11657,7 @@ /area/admin_planet/andromeda/engi_lobby) "JU" = ( /obj/structure/closet/excavation, -/obj/machinery/power/apc/high/east_mount, +/obj/machinery/power/apc/large_cell/east_mount, /obj/structure/cable{ icon_state = "0-8" }, @@ -12160,14 +12143,14 @@ /area/admin_planet/andromeda/rnd_xenobio) "LA" = ( /obj/machinery/door/firedoor/glass, -/obj/machinery/power/apc/high/north_mount, +/obj/machinery/power/apc/large_cell/north_mount, /obj/structure/cable{ icon_state = "0-4" }, /turf/simulated/floor/tiled/kafel_full/purple, /area/admin_planet/andromeda/rnd_nexus) "LB" = ( -/obj/machinery/power/apc/high/west_mount, +/obj/machinery/power/apc/large_cell/west_mount, /obj/structure/cable{ icon_state = "0-4" }, @@ -12198,7 +12181,7 @@ /turf/simulated/floor/tiled/techfloor, /area/admin_planet/andromeda/engi_lobby) "LF" = ( -/obj/machinery/power/apc/high/south_mount, +/obj/machinery/power/apc/large_cell/south_mount, /obj/structure/cable{ icon_state = "0-4" }, @@ -12640,7 +12623,7 @@ /area/admin_planet/andromeda/rnd_lockers) "Ng" = ( /obj/structure/cable, -/obj/machinery/power/apc/high/east_mount, +/obj/machinery/power/apc/large_cell/east_mount, /obj/structure/cable{ icon_state = "1-8" }, @@ -12753,7 +12736,7 @@ /area/admin_planet/andromeda/northern_maints) "Ny" = ( /obj/structure/table/marble, -/obj/machinery/power/apc/high/west_mount, +/obj/machinery/power/apc/large_cell/west_mount, /obj/structure/cable{ icon_state = "0-4" }, @@ -13130,41 +13113,41 @@ /area/admin_planet/andromeda/engi_lobby) "OR" = ( /obj/structure/table/rack/shelf/steel, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -8; pixel_y = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -4; pixel_y = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_y = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 4; pixel_y = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 8; pixel_y = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -8; pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -4; pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 4; pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 8; pixel_y = -5 }, @@ -13237,7 +13220,7 @@ /turf/simulated/floor/tiled/kafel_full/green, /area/admin_planet/andromeda/medward_treatment) "Pf" = ( -/obj/machinery/power/apc/high/east_mount, +/obj/machinery/power/apc/large_cell/east_mount, /obj/structure/cable, /turf/simulated/floor/tiled/dark{ color = "#A9A9A9" @@ -13347,7 +13330,7 @@ /turf/simulated/floor/tiled/kafel_full/beige, /area/admin_planet/andromeda/medward_treatment) "Pu" = ( -/obj/machinery/power/apc/hyper/west_mount, +/obj/machinery/power/apc/large_cell/tier_3/west_mount, /obj/machinery/power/rtg/fake_gen, /obj/structure/cable{ icon_state = "0-8" @@ -13792,7 +13775,7 @@ /turf/simulated/floor/tiled/kafel_full/purple, /area/admin_planet/andromeda/rnd_lobby) "QZ" = ( -/obj/machinery/power/apc/high/north_mount, +/obj/machinery/power/apc/large_cell/north_mount, /obj/structure/cable{ icon_state = "0-2" }, @@ -14376,7 +14359,7 @@ /area/admin_planet/andromeda/sec_lockers) "SS" = ( /obj/effect/floor_decal/industrial/outline/yellow, -/obj/machinery/power/apc/high/north_mount, +/obj/machinery/power/apc/large_cell/north_mount, /obj/structure/cable{ dir = 1 }, @@ -14467,7 +14450,7 @@ /turf/simulated/floor/tiled/kafel_full/beige, /area/admin_planet/andromeda/medward_storage) "Tk" = ( -/obj/machinery/power/apc/high/west_mount, +/obj/machinery/power/apc/large_cell/west_mount, /obj/structure/cable{ icon_state = "0-4" }, @@ -14716,7 +14699,7 @@ /turf/simulated/wall/r_wall/prepainted, /area/admin_planet/andromeda/eastern_maints) "TY" = ( -/obj/machinery/power/apc/high/west_mount, +/obj/machinery/power/apc/large_cell/west_mount, /obj/structure/cable{ icon_state = "0-4" }, @@ -14735,7 +14718,7 @@ }, /area/admin_planet/andromeda/NEXUS_Hallway) "Ua" = ( -/obj/machinery/power/apc/high/east_mount, +/obj/machinery/power/apc/large_cell/east_mount, /obj/structure/cable, /obj/structure/cable{ icon_state = "1-8" @@ -14946,7 +14929,7 @@ /area/admin_planet/andromeda/engi_workroom) "UN" = ( /obj/machinery/light/spot, -/obj/machinery/power/apc/high/south_mount, +/obj/machinery/power/apc/large_cell/south_mount, /obj/structure/cable, /turf/simulated/floor/tiled/steel_dirty/dark, /area/admin_planet/andromeda/sec_warden_office) @@ -14983,7 +14966,7 @@ /turf/simulated/floor/wood, /area/admin_planet/andromeda/lounge) "UU" = ( -/obj/machinery/power/apc/high/north_mount, +/obj/machinery/power/apc/large_cell/north_mount, /obj/structure/cable{ icon_state = "0-2" }, @@ -15351,7 +15334,7 @@ /turf/simulated/floor/tiled/steel_grid, /area/admin_planet/andromeda/rnd_xenobotany) "VO" = ( -/obj/machinery/power/apc/hyper/east_mount, +/obj/machinery/power/apc/large_cell/tier_3/east_mount, /obj/structure/cable{ icon_state = "0-4" }, @@ -15842,7 +15825,7 @@ /turf/simulated/floor/tiled/steel_grid, /area/admin_planet/andromeda/rnd_anomaly_lab) "Xn" = ( -/obj/machinery/power/apc/hyper/north_mount, +/obj/machinery/power/apc/large_cell/tier_3/north_mount, /obj/machinery/power/rtg/fake_gen, /obj/structure/cable, /turf/simulated/floor/plating, @@ -15856,7 +15839,7 @@ /turf/simulated/floor/tiled/techfloor/grid, /area/admin_planet/andromeda/engi_workroom) "Xp" = ( -/obj/machinery/power/apc/high/north_mount, +/obj/machinery/power/apc/large_cell/north_mount, /obj/structure/cable{ dir = 1 }, @@ -15943,7 +15926,7 @@ }, /obj/machinery/disposal, /obj/structure/disposalpipe/trunk, -/obj/machinery/power/apc/super/east_mount, +/obj/machinery/power/apc/large_cell/tier_2/east_mount, /obj/machinery/door/firedoor/glass, /obj/structure/cable{ icon_state = "0-8" @@ -16429,7 +16412,7 @@ }, /area/admin_planet/andromeda/rnd_lobby) "Zc" = ( -/obj/machinery/power/apc/high/east_mount, +/obj/machinery/power/apc/large_cell/east_mount, /obj/structure/cable{ icon_state = "0-8" }, @@ -16514,7 +16497,7 @@ pixel_y = 9; layer = 3 }, -/obj/machinery/power/apc/high/west_mount, +/obj/machinery/power/apc/large_cell/west_mount, /obj/structure/cable{ icon_state = "0-4" }, @@ -16692,7 +16675,7 @@ }, /area/admin_planet/andromeda/engi_lobby) "ZT" = ( -/obj/machinery/power/apc/high/north_mount, +/obj/machinery/power/apc/large_cell/north_mount, /obj/structure/cable{ icon_state = "0-2" }, diff --git a/maps/sectors/admin_planets_192/croatoan.dmm b/maps/sectors/admin_planets_192/croatoan.dmm index 3b0d2164f33..ba1147dd639 100644 --- a/maps/sectors/admin_planets_192/croatoan.dmm +++ b/maps/sectors/admin_planets_192/croatoan.dmm @@ -3677,66 +3677,66 @@ pixel_y = 8 }, /obj/item/gunbox/armor/security, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 6; pixel_y = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 6; pixel_y = -4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -8; pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -4; pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 4; pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 8; pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -8; pixel_y = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -4; pixel_y = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_y = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 4; pixel_y = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 8; pixel_y = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -8 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 8 }, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_1/weapon, /obj/structure/cable{ icon_state = "1-2" }, @@ -5644,63 +5644,63 @@ /area/admin_planet/croatoan/med_lobby) "tI" = ( /obj/structure/table/rack/shelf/steel, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 6; pixel_y = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 6; pixel_y = -4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -8; pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -4; pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 4; pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 8; pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -8; pixel_y = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -4; pixel_y = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_y = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 4; pixel_y = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 8; pixel_y = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -8 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 8 }, /turf/simulated/floor/reinforced, @@ -10173,7 +10173,7 @@ light_range = 12 }, /obj/machinery/power/rtg/fake_gen, -/obj/machinery/power/apc/hyper/west_mount, +/obj/machinery/power/apc/large_cell/tier_3/west_mount, /turf/simulated/floor/reinforced, /area/admin_planet/croatoan/extreme_security_containment_facilities) "Kc" = ( @@ -13260,7 +13260,7 @@ "Uu" = ( /obj/structure/table/reinforced, /obj/item/defib_kit, -/obj/item/cell/high, +/obj/item/cell/basic/tier_3/medium, /obj/item/tool/screwdriver, /obj/structure/window/reinforced{ dir = 8 diff --git a/maps/sectors/admin_planets_192/fey_map.dmm b/maps/sectors/admin_planets_192/fey_map.dmm index 0f729313e0b..a702f483b7c 100644 --- a/maps/sectors/admin_planets_192/fey_map.dmm +++ b/maps/sectors/admin_planets_192/fey_map.dmm @@ -1068,7 +1068,7 @@ }, /area/admin_planet/fey_forest/underbrush) "wd" = ( -/obj/machinery/power/apc/talon/hyper/west_mount, +/obj/machinery/power/apc/talon/west_mount, /obj/structure/cable/orange{ icon_state = "2-8" }, @@ -1725,58 +1725,58 @@ /area/admin_planet/fey_forest/gateway_facility) "Ku" = ( /obj/structure/table/rack/shelf/steel, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -8; pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -4; pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 4; pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 8; pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -8; pixel_y = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -4; pixel_y = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_y = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 4; pixel_y = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 8; pixel_y = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -8 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 8 }, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_1/weapon, /turf/simulated/floor/tiled/techfloor, /area/admin_planet/fey_forest/gateway_facility) "KN" = ( @@ -1892,36 +1892,36 @@ /area/admin_planet/fey_forest/gateway_facility) "Pm" = ( /obj/structure/table/rack/shelf/steel, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, +/obj/item/cell/basic/tier_1/small, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/small, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/small, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/small, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/small, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/small, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/small, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/small, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/small, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/small, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/small, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/small, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/small, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/small, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/small, +/obj/item/cell/basic/tier_1/weapon, /obj/machinery/recharger/wallcharger{ pixel_x = 4; pixel_y = -28 diff --git a/maps/sectors/nebula_tradeport/levels/nebula_tradeport.dmm b/maps/sectors/nebula_tradeport/levels/nebula_tradeport.dmm index 37fd12f0127..4e363af39c6 100644 --- a/maps/sectors/nebula_tradeport/levels/nebula_tradeport.dmm +++ b/maps/sectors/nebula_tradeport/levels/nebula_tradeport.dmm @@ -2628,7 +2628,6 @@ /area/shuttle/udang/main) "ahr" = ( /obj/machinery/power/apc/alarms_hidden/south_mount{ - cell_type = /obj/item/cell/super; req_access = list(160) }, /obj/structure/cable/yellow, @@ -2665,7 +2664,7 @@ dir = 9 }, /obj/structure/cable/cyan, -/obj/machinery/power/apc/hyper/south_mount, +/obj/machinery/power/apc/large_cell/tier_3/south_mount, /turf/simulated/floor/plating, /area/shuttle/udang/main) "ahw" = ( @@ -7553,7 +7552,7 @@ /obj/random/tool/power, /obj/random/tool/power, /obj/random/tool/power, -/obj/item/cell/device/weapon/recharge/alien, +/obj/item/cell/regen/fractal/weapon, /obj/random/tool/alien, /turf/simulated/floor/tiled/dark, /area/shuttle/trade_ship/general) @@ -11580,9 +11579,9 @@ /area/space) "aFr" = ( /obj/structure/table/steel_reinforced, -/obj/item/cell/hyper, -/obj/item/cell/high, -/obj/item/cell/high, +/obj/item/cell/basic/tier_4/large, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, /obj/item/storage/toolbox/syndicate{ pixel_y = 11 }, @@ -16434,7 +16433,7 @@ req_access = list(160) }, /obj/structure/table/marble, -/obj/item/gun/projectile/energy/gun/fluff/gunsword, +/obj/item/gun/projectile/energy/gun/sword_buster, /obj/effect/floor_decal/spline/plain{ dir = 10 }, @@ -22728,12 +22727,12 @@ /obj/effect/floor_decal/spline/plain{ dir = 5 }, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon, /turf/simulated/floor/carpet/patterened/blue, /area/shuttle/salvager) "jQK" = ( @@ -24508,7 +24507,7 @@ /turf/simulated/floor/reinforced, /area/tradeport/pads) "nOM" = ( -/obj/machinery/power/apc/high/east_mount, +/obj/machinery/power/apc/large_cell/east_mount, /obj/machinery/atmospherics/component/unary/vent_pump/on, /obj/structure/cable/orange{ icon_state = "1-2" @@ -25121,7 +25120,6 @@ dir = 8 }, /obj/machinery/power/apc/alarms_hidden/south_mount{ - cell_type = /obj/item/cell/super; req_access = list(160) }, /turf/simulated/floor/tiled/old_tile/blue, @@ -26956,7 +26954,7 @@ /obj/machinery/atmospherics/pipe/simple/hidden/cyan{ dir = 6 }, -/obj/machinery/power/apc/hyper/west_mount, +/obj/machinery/power/apc/large_cell/tier_3/west_mount, /obj/structure/cable/pink{ icon_state = "0-8"; dir = 1 diff --git a/maps/sectors/piratebase_192/levels/piratebase_192.dmm b/maps/sectors/piratebase_192/levels/piratebase_192.dmm index 2e0ad3f706a..2a7ab1b9f39 100644 --- a/maps/sectors/piratebase_192/levels/piratebase_192.dmm +++ b/maps/sectors/piratebase_192/levels/piratebase_192.dmm @@ -2569,7 +2569,7 @@ dir = 8; pixel_x = -22 }, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_3/weapon, /obj/item/gun/projectile/energy/zip{ name = "First Mate Zippy" }, @@ -3210,8 +3210,8 @@ /area/piratebase/bunks) "DI" = ( /obj/structure/table/rack/shelf/steel, -/obj/item/cell/device/weapon/gunsword, -/obj/item/gun/projectile/energy/gun/fluff/gunsword, +/obj/item/cell/sword_buster, +/obj/item/gun/projectile/energy/gun/sword_buster, /turf/simulated/floor/reinforced, /area/piratebase/vault) "DJ" = ( diff --git a/maps/sectors/sky_planet/levels/sky_planet_upper_sky_west.dmm b/maps/sectors/sky_planet/levels/sky_planet_upper_sky_west.dmm index 7005b03d036..5dc2d53fb15 100644 --- a/maps/sectors/sky_planet/levels/sky_planet_upper_sky_west.dmm +++ b/maps/sectors/sky_planet/levels/sky_planet_upper_sky_west.dmm @@ -5063,8 +5063,8 @@ /obj/item/clothing/head/soft/blue, /obj/item/clothing/suit/storage/hooded/wintercoat, /obj/item/clothing/suit/storage/hooded/wintercoat/olive, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon, /turf/simulated/floor/wood/indoors, /area/sector/sky_planet/occulum) "xk" = ( @@ -11543,8 +11543,8 @@ /area/sector/sky_planet/sky) "YS" = ( /obj/item/gun/projectile/energy/taser, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon, /obj/item/clothing/accessory/badge/corporate_tag/press, /obj/item/clothing/accessory/badge/corporate_tag/press, /obj/structure/closet/walllocker_double/west, @@ -11552,8 +11552,8 @@ /obj/structure/cable/white{ icon_state = "1-2" }, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon, /obj/effect/floor_decal/industrial/hatch, /turf/simulated/floor/tiled/techfloor, /area/shuttle/crescend) diff --git a/maps/sectors/surt/levels/surt_west.dmm b/maps/sectors/surt/levels/surt_west.dmm index 18c981e9519..373bc3c86fd 100644 --- a/maps/sectors/surt/levels/surt_west.dmm +++ b/maps/sectors/surt/levels/surt_west.dmm @@ -731,7 +731,7 @@ /obj/structure/cable{ icon_state = "0-4" }, -/obj/machinery/power/apc/high/south_mount, +/obj/machinery/power/apc/large_cell/south_mount, /turf/simulated/floor/plating, /area/sector/surt/mining_base/common) "sA" = ( @@ -2095,7 +2095,7 @@ }, /obj/structure/table/steel, /obj/machinery/cell_charger, -/obj/item/cell/high, +/obj/item/cell/basic/tier_2/medium, /turf/simulated/floor/tiled, /area/sector/surt/mining_base/common) "VX" = ( diff --git a/maps/sectors/virgo2_140/levels/virgo2_140_aerostat.dmm b/maps/sectors/virgo2_140/levels/virgo2_140_aerostat.dmm index 4aaf011fec4..7eb451f9fb7 100644 --- a/maps/sectors/virgo2_140/levels/virgo2_140_aerostat.dmm +++ b/maps/sectors/virgo2_140/levels/virgo2_140_aerostat.dmm @@ -297,7 +297,6 @@ }, /obj/machinery/power/apc/east_mount{ alarms_hidden = 1; - cell_type = /obj/item/cell/high/empty; req_access = list() }, /turf/simulated/floor/bluegrid/virgo2, diff --git a/maps/sectors/virgo4_140/levels/virgo4_140_beach.dmm b/maps/sectors/virgo4_140/levels/virgo4_140_beach.dmm index 2786ed9f88e..d138ab7c3cf 100644 --- a/maps/sectors/virgo4_140/levels/virgo4_140_beach.dmm +++ b/maps/sectors/virgo4_140/levels/virgo4_140_beach.dmm @@ -22,7 +22,7 @@ /area/tether_away/beach/powershed) "ag" = ( /obj/structure/table/woodentable, -/obj/item/cell/apc, +/obj/item/cell/basic/tier_1/medium, /turf/simulated/floor/wood, /area/tether_away/beach/resort/janibar) "ah" = ( diff --git a/maps/stations-centcom/ncv_oracle/ncv_oracle.dmm b/maps/stations-centcom/ncv_oracle/ncv_oracle.dmm index 3f1b9c682bd..4ea2437588a 100644 --- a/maps/stations-centcom/ncv_oracle/ncv_oracle.dmm +++ b/maps/stations-centcom/ncv_oracle/ncv_oracle.dmm @@ -6479,18 +6479,18 @@ /area/shuttle/specops/general) "ue" = ( /obj/structure/table/reinforced, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, /turf/unsimulated/floor{ icon_state = "dark" }, @@ -7065,8 +7065,7 @@ /obj/structure/closet{ name = "robotics parts" }, -/obj/item/cell/high{ - maxcharge = 15000; +/obj/item/cell/basic/tier_1/large{ pixel_x = 5; pixel_y = -5 }, @@ -7078,18 +7077,15 @@ pixel_x = -8; pixel_y = 4 }, -/obj/item/cell/high{ - maxcharge = 15000; +/obj/item/cell/basic/tier_1/large{ pixel_x = 5; pixel_y = -5 }, -/obj/item/cell/high{ - maxcharge = 15000; +/obj/item/cell/basic/tier_1/large{ pixel_x = 5; pixel_y = -5 }, -/obj/item/cell/high{ - maxcharge = 15000; +/obj/item/cell/basic/tier_1/large{ pixel_x = 5; pixel_y = -5 }, @@ -8657,26 +8653,26 @@ }, /area/centcom/bathroom) "Bb" = ( -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon, /obj/structure/table/steel_reinforced, /turf/unsimulated/floor{ icon_state = "dark" @@ -9667,15 +9663,15 @@ "EI" = ( /obj/structure/table/rack, /obj/effect/floor_decal/industrial/outline/yellow, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -2; pixel_y = -2 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -2; pixel_y = -2 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -2; pixel_y = -2 }, @@ -11576,12 +11572,8 @@ /area/centcom/bathroom) "KM" = ( /obj/structure/table/standard, -/obj/item/cell/high{ - maxcharge = 15000 - }, -/obj/item/cell/high{ - maxcharge = 15000 - }, +/obj/item/cell/basic/tier_1/large, +/obj/item/cell/basic/tier_1/large, /obj/machinery/cell_charger, /obj/effect/floor_decal/borderfloorwhite, /obj/effect/floor_decal/corner/purple/border, @@ -13239,18 +13231,18 @@ "PV" = ( /obj/structure/table/reinforced, /obj/effect/floor_decal/industrial/outline/blue, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, /turf/unsimulated/floor{ icon_state = "dark" }, @@ -15903,41 +15895,41 @@ "YE" = ( /obj/structure/table/standard, /obj/machinery/recharger, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 4; pixel_y = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 2; pixel_y = 2 }, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -2; pixel_y = -2 }, /obj/effect/floor_decal/industrial/outline/grey, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 4; pixel_y = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 4; pixel_y = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 4; pixel_y = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 4; pixel_y = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -2; pixel_y = -2 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -2; pixel_y = -2 }, diff --git a/maps/stations-centcom/ndv_marksman/ndv_marksman.dmm b/maps/stations-centcom/ndv_marksman/ndv_marksman.dmm index a4a1fcddb46..7b61c5a73d0 100644 --- a/maps/stations-centcom/ndv_marksman/ndv_marksman.dmm +++ b/maps/stations-centcom/ndv_marksman/ndv_marksman.dmm @@ -6848,8 +6848,7 @@ /obj/structure/closet{ name = "robotics parts" }, -/obj/item/cell/high{ - maxcharge = 15000; +/obj/item/cell/basic/tier_1/large{ pixel_x = 5; pixel_y = -5 }, @@ -6861,18 +6860,15 @@ pixel_x = -8; pixel_y = 4 }, -/obj/item/cell/high{ - maxcharge = 15000; +/obj/item/cell/basic/tier_1/large{ pixel_x = 5; pixel_y = -5 }, -/obj/item/cell/high{ - maxcharge = 15000; +/obj/item/cell/basic/tier_1/large{ pixel_x = 5; pixel_y = -5 }, -/obj/item/cell/high{ - maxcharge = 15000; +/obj/item/cell/basic/tier_1/large{ pixel_x = 5; pixel_y = -5 }, @@ -7161,26 +7157,26 @@ }, /area/centcom/security) "tc" = ( -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, /obj/structure/table/steel_reinforced, /turf/unsimulated/floor{ icon_state = "dark" @@ -9858,18 +9854,18 @@ "Ad" = ( /obj/structure/table/reinforced, /obj/effect/floor_decal/industrial/outline/blue, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, /turf/unsimulated/floor{ icon_state = "dark" }, @@ -16119,15 +16115,15 @@ "Ql" = ( /obj/structure/table/rack, /obj/effect/floor_decal/industrial/outline/yellow, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_3/weapon{ pixel_x = -2; pixel_y = -2 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_3/weapon{ pixel_x = -2; pixel_y = -2 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_3/weapon{ pixel_x = -2; pixel_y = -2 }, @@ -16283,41 +16279,41 @@ "QN" = ( /obj/structure/table/standard, /obj/machinery/recharger, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_3/weapon{ pixel_x = 4; pixel_y = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_3/weapon{ pixel_x = 2; pixel_y = 2 }, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon{ pixel_x = -2; pixel_y = -2 }, /obj/effect/floor_decal/industrial/outline/grey, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_3/weapon{ pixel_x = 4; pixel_y = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_3/weapon{ pixel_x = 4; pixel_y = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_3/weapon{ pixel_x = 4; pixel_y = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_3/weapon{ pixel_x = 4; pixel_y = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_3/weapon{ pixel_x = -2; pixel_y = -2 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_3/weapon{ pixel_x = -2; pixel_y = -2 }, @@ -19684,12 +19680,8 @@ /area/centcom/security) "Zk" = ( /obj/structure/table/standard, -/obj/item/cell/high{ - maxcharge = 15000 - }, -/obj/item/cell/high{ - maxcharge = 15000 - }, +/obj/item/cell/basic/tier_1/large, +/obj/item/cell/basic/tier_1/large, /obj/machinery/cell_charger, /obj/effect/floor_decal/borderfloorwhite, /obj/effect/floor_decal/corner/purple/border, @@ -19851,18 +19843,18 @@ /area/holodeck/holodorm/source_boxing) "ZE" = ( /obj/structure/table/reinforced, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, /turf/unsimulated/floor{ icon_state = "dark" }, diff --git a/maps/stations-centcom/nts_demeter/nts_demeter.dmm b/maps/stations-centcom/nts_demeter/nts_demeter.dmm index 603d8846735..45fb93575d4 100644 --- a/maps/stations-centcom/nts_demeter/nts_demeter.dmm +++ b/maps/stations-centcom/nts_demeter/nts_demeter.dmm @@ -7776,18 +7776,18 @@ /area/tdome/tdome1) "Ck" = ( /obj/structure/table/reinforced, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, +/obj/item/cell/basic/tier_3/medium, +/obj/item/cell/basic/tier_3/medium, +/obj/item/cell/basic/tier_3/medium, +/obj/item/cell/basic/tier_3/medium, +/obj/item/cell/basic/tier_3/medium, +/obj/item/cell/basic/tier_3/medium, +/obj/item/cell/basic/tier_3/large, +/obj/item/cell/basic/tier_3/large, +/obj/item/cell/basic/tier_3/large, +/obj/item/cell/basic/tier_3/large, +/obj/item/cell/basic/tier_3/large, +/obj/item/cell/basic/tier_3/large, /turf/unsimulated/floor/dark, /area/centcom/specops) "Cm" = ( @@ -9519,26 +9519,26 @@ /area/centcom/specops) "UC" = ( /obj/structure/table/reinforced, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_2/weapon, +/obj/item/cell/basic/tier_2/weapon, +/obj/item/cell/basic/tier_2/weapon, +/obj/item/cell/basic/tier_2/weapon, +/obj/item/cell/basic/tier_2/weapon, +/obj/item/cell/basic/tier_2/weapon, +/obj/item/cell/basic/tier_2/weapon, +/obj/item/cell/basic/tier_2/weapon, +/obj/item/cell/basic/tier_2/weapon, +/obj/item/cell/basic/tier_2/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, /turf/unsimulated/floor/dark, /area/centcom/specops) "UK" = ( diff --git a/maps/stations/endeavour/levels/deck1.dmm b/maps/stations/endeavour/levels/deck1.dmm index f0898a8398f..5d59ade7f07 100644 --- a/maps/stations/endeavour/levels/deck1.dmm +++ b/maps/stations/endeavour/levels/deck1.dmm @@ -1502,7 +1502,6 @@ /area/station/exploration/hallway_aft/endeavour) "bci" = ( /obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super; dir = 2; pixel_x = 0; pixel_y = 21 @@ -2672,9 +2671,7 @@ /turf/simulated/floor/tiled/techfloor/grid, /area/station/exploration/hallway_fore/endeavour) "bXQ" = ( -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable/green{ icon_state = "0-4" }, @@ -4168,9 +4165,7 @@ /obj/structure/cable/green{ icon_state = "0-4" }, -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /turf/simulated/floor/wood, /area/crew_quarters/sleep/Dorm_4) "cZW" = ( @@ -4927,9 +4922,7 @@ /obj/effect/floor_decal/corner/brown/border{ dir = 8 }, -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable/green{ icon_state = "0-2" }, @@ -5822,9 +5815,7 @@ dir = 8 }, /obj/structure/table/woodentable, -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable/green{ icon_state = "0-2" }, @@ -16490,9 +16481,7 @@ /obj/structure/cable/green{ icon_state = "0-4" }, -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /turf/simulated/floor/wood, /area/crew_quarters/sleep/Dorm_3) "lQM" = ( @@ -16894,9 +16883,7 @@ /area/bridge) "mfu" = ( /obj/machinery/atmospherics/portables_connector, -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable/green{ icon_state = "0-4" }, @@ -20458,9 +20445,7 @@ /turf/simulated/floor/tiled/steel, /area/hallway/d1portforhall/endeavour) "oMt" = ( -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable/green, /turf/simulated/floor/tiled/dark, /area/gateway) @@ -22631,9 +22616,7 @@ /obj/machinery/camera/network/exploration{ dir = 4 }, -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable/green{ icon_state = "0-4" }, @@ -30995,9 +30978,9 @@ dir = 1 }, /obj/structure/table/reinforced, -/obj/item/cell, -/obj/item/cell/device/empty, -/obj/item/cell/device/empty, +/obj/item/cell/basic/tier_2/medium, +/obj/item/cell/basic/tier_1/small, +/obj/item/cell/basic/tier_1/small, /turf/simulated/floor/tiled, /area/maintenance/tool_storage) "wjN" = ( @@ -33735,9 +33718,7 @@ /obj/effect/floor_decal/corner/navgold/border{ dir = 8 }, -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable/green{ icon_state = "0-4" }, diff --git a/maps/stations/endeavour/levels/deck2.dmm b/maps/stations/endeavour/levels/deck2.dmm index c517794d689..926fbfb02bc 100644 --- a/maps/stations/endeavour/levels/deck2.dmm +++ b/maps/stations/endeavour/levels/deck2.dmm @@ -12333,7 +12333,6 @@ dir = 1 }, /obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super; dir = 2; pixel_x = 0; pixel_y = 21 @@ -13872,7 +13871,8 @@ "jGo" = ( /obj/structure/table/steel, /obj/machinery/recharger, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_1/small, +/obj/item/cell/basic/tier_1/weapon, /turf/simulated/floor/tiled/techfloor, /area/rnd/workshop) "jHd" = ( @@ -15996,7 +15996,6 @@ /area/hallway/d2amidportmaint/endeavour) "lnu" = ( /obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super; dir = 2; pixel_x = 0; pixel_y = 21 @@ -16217,7 +16216,6 @@ /area/medical/patient_wing) "luU" = ( /obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super; dir = 2; pixel_x = 0; pixel_y = 21 @@ -16761,7 +16759,6 @@ /area/assembly/robotics) "lOB" = ( /obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super; dir = 2; pixel_x = 0; pixel_y = 21 @@ -24658,7 +24655,6 @@ icon_state = "0-8" }, /obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super; dir = 2; pixel_x = 0; pixel_y = 21 diff --git a/maps/stations/endeavour/levels/deck3.dmm b/maps/stations/endeavour/levels/deck3.dmm index de098d4a9a5..81d4274f7a9 100644 --- a/maps/stations/endeavour/levels/deck3.dmm +++ b/maps/stations/endeavour/levels/deck3.dmm @@ -13158,7 +13158,7 @@ /area/hallway/d3afthall/endeavour) "jGk" = ( /obj/structure/table/steel, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -9; pixel_y = 4 }, @@ -13168,46 +13168,46 @@ /obj/effect/floor_decal/corner/red{ dir = 6 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -8; pixel_y = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -7; pixel_y = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -6; pixel_y = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -5; pixel_y = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -4; pixel_y = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -3; pixel_y = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -2; pixel_y = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -1; pixel_y = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_y = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 1; pixel_y = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 2; pixel_y = 4 }, @@ -15320,25 +15320,25 @@ "lsq" = ( /obj/effect/floor_decal/industrial/outline/blue, /obj/structure/table/rack/shelf/steel, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -8 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -1 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 8 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 3 }, /obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers, @@ -17111,7 +17111,7 @@ dir = 10 }, /obj/structure/closet/secure_closet/warden{ - starts_with = list(/obj/item/storage/box/survival_knife,/obj/item/clothing/suit/storage/vest/warden,/obj/item/clothing/under/rank/warden,/obj/item/clothing/under/rank/warden/corp,/obj/item/clothing/under/rank/warden/skirt_pleated,/obj/item/clothing/suit/storage/vest/wardencoat,/obj/item/clothing/suit/storage/vest/wardencoat/alt,/obj/item/clothing/head/helmet/dermal,/obj/item/clothing/head/helmet/warden,/obj/item/clothing/head/helmet/warden/hat,/obj/item/cartridge/security,/obj/item/radio/headset/headset_sec,/obj/item/radio/headset/headset_sec/alt,/obj/item/clothing/accessory/armor/helmetcamera/security,/obj/item/clothing/accessory/armor/helmetcamera/security/body,/obj/item/clothing/glasses/sunglasses/sechud,/obj/item/barrier_tape_roll/police,/obj/item/clothing/accessory/badge/holo/warden,/obj/item/storage/box/flashbangs,/obj/item/storage/box/firingpins,/obj/item/storage/belt/security,/obj/item/reagent_containers/spray/pepper,/obj/item/melee/baton/loaded,/obj/item/gun/projectile/energy/gun,/obj/item/cell/device/weapon,/obj/item/storage/box/holobadge,/obj/item/clothing/head/beret/sec/corporate/warden,/obj/item/clothing/suit/storage/hooded/wintercoat/security,/obj/item/clothing/shoes/boots/winter/security,/obj/item/gps/security,/obj/item/flashlight/maglight,/obj/item/megaphone,/obj/item/clothing/mask/gas/half,/obj/item/gun/projectile/ballistic/shotgun/pump/combat/warden,/obj/item/holowarrant) + starts_with = list(/obj/item/storage/box/survival_knife,/obj/item/clothing/suit/storage/vest/warden,/obj/item/clothing/under/rank/warden,/obj/item/clothing/under/rank/warden/corp,/obj/item/clothing/under/rank/warden/skirt_pleated,/obj/item/clothing/suit/storage/vest/wardencoat,/obj/item/clothing/suit/storage/vest/wardencoat/alt,/obj/item/clothing/head/helmet/dermal,/obj/item/clothing/head/helmet/warden,/obj/item/clothing/head/helmet/warden/hat,/obj/item/cartridge/security,/obj/item/radio/headset/headset_sec,/obj/item/radio/headset/headset_sec/alt,/obj/item/clothing/accessory/armor/helmetcamera/security,/obj/item/clothing/accessory/armor/helmetcamera/security/body,/obj/item/clothing/glasses/sunglasses/sechud,/obj/item/barrier_tape_roll/police,/obj/item/clothing/accessory/badge/holo/warden,/obj/item/storage/box/flashbangs,/obj/item/storage/box/firingpins,/obj/item/storage/belt/security,/obj/item/reagent_containers/spray/pepper,/obj/item/melee/baton/loaded,/obj/item/gun/projectile/energy/gun,/obj/item/cell/basic/tier_1/weapon,/obj/item/storage/box/holobadge,/obj/item/clothing/head/beret/sec/corporate/warden,/obj/item/clothing/suit/storage/hooded/wintercoat/security,/obj/item/clothing/shoes/boots/winter/security,/obj/item/gps/security,/obj/item/flashlight/maglight,/obj/item/megaphone,/obj/item/clothing/mask/gas/half,/obj/item/gun/projectile/ballistic/shotgun/pump/combat/warden,/obj/item/holowarrant) }, /obj/structure/cable/green, /obj/item/book/manual/security_space_law, @@ -28389,9 +28389,7 @@ /obj/structure/cable/green{ icon_state = "0-4" }, -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /turf/simulated/floor/tiled/dark, /area/security/nuke_storage) "uRN" = ( @@ -30381,12 +30379,8 @@ /area/hallway/d3fwdportmaint/endeavour) "wiS" = ( /obj/structure/table/reinforced, -/obj/item/cell/high{ - maxcharge = 15000 - }, -/obj/item/cell/high{ - maxcharge = 15000 - }, +/obj/item/cell/basic/tier_3/medium, +/obj/item/cell/basic/tier_3/medium, /obj/machinery/fire_alarm/east_mount, /obj/machinery/atmospherics/component/unary/vent_scrubber/on{ dir = 8 diff --git a/maps/stations/endeavour/levels/deck4.dmm b/maps/stations/endeavour/levels/deck4.dmm index 0d6ac862c07..781cb3bfe27 100644 --- a/maps/stations/endeavour/levels/deck4.dmm +++ b/maps/stations/endeavour/levels/deck4.dmm @@ -1946,9 +1946,7 @@ /turf/simulated/floor/tiled/steel_ridged, /area/hallway/d4afthall/endeavour) "bLm" = ( -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable/green, /obj/effect/floor_decal/techfloor/orange{ dir = 8 @@ -5284,9 +5282,7 @@ /area/crew_quarters/sleep/engi_wash) "eKh" = ( /obj/structure/table/steel, -/obj/item/cell/high{ - maxcharge = 15000 - }, +/obj/item/cell/basic/tier_3/medium, /obj/item/stack/cable_coil, /obj/machinery/camera/network/engineering{ dir = 8 @@ -8800,21 +8796,11 @@ /area/hallway/d4fwdportmaint/endeavour) "hPd" = ( /obj/structure/table/reinforced, -/obj/item/cell/high{ - maxcharge = 15000 - }, -/obj/item/cell/high{ - maxcharge = 15000 - }, -/obj/item/cell/high{ - maxcharge = 15000 - }, -/obj/item/cell/high{ - maxcharge = 15000 - }, -/obj/item/cell/high{ - maxcharge = 15000 - }, +/obj/item/cell/basic/tier_3/medium, +/obj/item/cell/basic/tier_3/medium, +/obj/item/cell/basic/tier_3/medium, +/obj/item/cell/basic/tier_3/medium, +/obj/item/cell/basic/tier_3/medium, /obj/effect/floor_decal/techfloor/orange{ dir = 4 }, @@ -14392,21 +14378,11 @@ dir = 4 }, /obj/structure/table/reinforced, -/obj/item/cell/high{ - maxcharge = 15000 - }, -/obj/item/cell/high{ - maxcharge = 15000 - }, -/obj/item/cell/high{ - maxcharge = 15000 - }, -/obj/item/cell/high{ - maxcharge = 15000 - }, -/obj/item/cell/high{ - maxcharge = 15000 - }, +/obj/item/cell/basic/tier_3/medium, +/obj/item/cell/basic/tier_3/medium, +/obj/item/cell/basic/tier_3/medium, +/obj/item/cell/basic/tier_3/medium, +/obj/item/cell/basic/tier_3/medium, /obj/structure/cable/green{ icon_state = "1-4" }, @@ -15465,9 +15441,7 @@ /turf/simulated/floor/bluegrid, /area/ai) "nJc" = ( -/obj/machinery/power/apc/south_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/south_mount, /obj/structure/cable/green{ icon_state = "0-4" }, @@ -19671,9 +19645,7 @@ /obj/structure/cable/green{ icon_state = "0-4" }, -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /turf/simulated/floor/tiled/white, /area/engineering/shield_gen) "rZh" = ( @@ -23301,9 +23273,7 @@ /turf/simulated/floor/tiled/steel_ridged, /area/hallway/d4portafthall/endeavour) "vtv" = ( -/obj/machinery/power/apc/north_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/north_mount, /obj/structure/cable/green{ icon_state = "0-4" }, diff --git a/maps/stations/rift/map_files/rift-02-underground2.dmm b/maps/stations/rift/map_files/rift-02-underground2.dmm index 75ae2add16f..13ae8e02df5 100644 --- a/maps/stations/rift/map_files/rift-02-underground2.dmm +++ b/maps/stations/rift/map_files/rift-02-underground2.dmm @@ -2496,7 +2496,7 @@ /obj/effect/floor_decal/techfloor{ dir = 1 }, -/obj/machinery/power/apc/super/north_mount{ +/obj/machinery/power/apc/large_cell/tier_2/north_mount{ name = "north bump"; pixel_y = 24 }, @@ -3430,7 +3430,7 @@ /obj/effect/floor_decal/techfloor{ dir = 8 }, -/obj/machinery/power/apc/high, +/obj/machinery/power/apc/large_cell, /obj/structure/cable/green{ icon_state = "0-2" }, @@ -11483,14 +11483,10 @@ /area/maintenance/atmos) "QQ" = ( /obj/structure/table/reinforced, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/high{ - maxcharge = 15000 - }, -/obj/item/cell/high{ - maxcharge = 15000 - }, +/obj/item/cell/basic/tier_2/small, +/obj/item/cell/basic/tier_2/small, +/obj/item/cell/basic/tier_3/medium, +/obj/item/cell/basic/tier_3/medium, /turf/simulated/floor/tiled, /area/engineering/workshop) "QS" = ( diff --git a/maps/stations/rift/map_files/rift-03-underground1.dmm b/maps/stations/rift/map_files/rift-03-underground1.dmm index 1504da35ab0..72d8b448107 100644 --- a/maps/stations/rift/map_files/rift-03-underground1.dmm +++ b/maps/stations/rift/map_files/rift-03-underground1.dmm @@ -5989,7 +5989,7 @@ /area/maintenance/substation/engineering) "rC" = ( /obj/item/storage/toolbox/mechanical, -/obj/item/cell/high, +/obj/item/cell/basic/tier_2/medium, /obj/structure/table/rack/shelf, /obj/effect/floor_decal/industrial/warning{ dir = 8 @@ -6897,9 +6897,7 @@ /turf/simulated/floor/tiled, /area/engineering/atmos) "uV" = ( -/obj/machinery/power/apc/north_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/north_mount, /obj/effect/floor_decal/borderfloorblack{ dir = 1 }, @@ -13749,9 +13747,7 @@ /area/hallway/primary/underone) "Qt" = ( /obj/structure/table/steel, -/obj/item/cell/high{ - maxcharge = 15000 - }, +/obj/item/cell/basic/tier_3/medium, /obj/item/stack/cable_coil, /obj/machinery/cell_charger{ pixel_y = 5 diff --git a/maps/stations/rift/map_files/rift-04-surface1.dmm b/maps/stations/rift/map_files/rift-04-surface1.dmm index 1d6465f3ab5..abecfcece09 100644 --- a/maps/stations/rift/map_files/rift-04-surface1.dmm +++ b/maps/stations/rift/map_files/rift-04-surface1.dmm @@ -5072,7 +5072,7 @@ "dsH" = ( /obj/machinery/cell_charger, /obj/structure/table/standard, -/obj/item/cell/high{ +/obj/item/cell/basic/tier_2/medium{ pixel_x = 2; pixel_y = -1 }, @@ -8794,9 +8794,7 @@ "fOz" = ( /obj/structure/table/woodentable, /obj/machinery/recharger, -/obj/machinery/power/apc/north_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/north_mount, /obj/structure/cable/green{ icon_state = "0-2" }, @@ -12815,7 +12813,7 @@ /area/medical/virologytransiteast) "igE" = ( /obj/structure/table/rack/shelf, -/obj/item/cell, +/obj/item/cell/basic/tier_1/large, /obj/item/module/power_control, /turf/simulated/floor/tiled/steel, /area/quartermaster/warehouse) @@ -16471,11 +16469,11 @@ /obj/machinery/newscaster{ pixel_x = 32 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_2/weapon{ pixel_x = 6; pixel_y = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_2/weapon{ pixel_x = 6; pixel_y = -4 }, @@ -20355,7 +20353,7 @@ /obj/machinery/atmospherics/pipe/simple/hidden/supply{ dir = 8 }, -/obj/machinery/power/apc/high/south_mount, +/obj/machinery/power/apc/large_cell/south_mount, /obj/structure/cable/green{ icon_state = "0-4" }, @@ -21401,7 +21399,7 @@ dir = 6 }, /obj/machinery/cell_charger, -/obj/item/cell/high, +/obj/item/cell/basic/tier_2/medium, /turf/simulated/floor/tiled/steel, /area/storage/tools) "nmZ" = ( @@ -23167,11 +23165,11 @@ /obj/item/spaceflare{ icon_state = "implantpad-0" }, -/obj/item/cell/high{ +/obj/item/cell/basic/tier_2/medium{ pixel_x = 2; pixel_y = 2 }, -/obj/item/cell/high{ +/obj/item/cell/basic/tier_2/medium{ pixel_x = -2; pixel_y = -2 }, @@ -23616,7 +23614,7 @@ /obj/effect/floor_decal/techfloor{ dir = 4 }, -/obj/machinery/power/apc/super/east_mount{ +/obj/machinery/power/apc/large_cell/tier_2/east_mount{ name = "east bump"; pixel_x = 24 }, diff --git a/maps/stations/rift/map_files/rift-05-surface2.dmm b/maps/stations/rift/map_files/rift-05-surface2.dmm index d41e25ac1ff..e689c9d99fd 100644 --- a/maps/stations/rift/map_files/rift-05-surface2.dmm +++ b/maps/stations/rift/map_files/rift-05-surface2.dmm @@ -716,22 +716,22 @@ /area/medical/morgue) "ayC" = ( /obj/structure/table/rack/shelf/steel, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -8; pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -4; pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 4; pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 8; pixel_y = -5 }, @@ -2522,30 +2522,30 @@ /area/rift/surfacebase/outside/outside2) "brw" = ( /obj/structure/table/rack/shelf/steel, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -8 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -8 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -4 }, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 8 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 8 }, /obj/effect/floor_decal/industrial/outline/blue, @@ -12504,7 +12504,7 @@ desc = null; pixel_y = 24 }, -/obj/item/cell/high, +/obj/item/cell/basic/tier_3/medium, /obj/structure/extinguisher_cabinet{ pixel_x = -27 }, @@ -16292,42 +16292,42 @@ /area/crew_quarters/sleep) "kjQ" = ( /obj/structure/table/rack/shelf/steel, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -8; pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -4; pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 4; pixel_y = -5 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 8; pixel_y = -5 }, /obj/effect/floor_decal/industrial/outline/blue, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -8; pixel_y = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -4; pixel_y = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_y = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 4; pixel_y = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 8; pixel_y = 3 }, @@ -22686,9 +22686,7 @@ /turf/simulated/floor/tiled/monowhite, /area/medical/sleeper) "nUi" = ( -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/effect/floor_decal/steeldecal/steel_decals10{ dir = 1 }, @@ -23538,7 +23536,7 @@ /obj/machinery/light{ dir = 1 }, -/obj/machinery/power/apc/super/north_mount{ +/obj/machinery/power/apc/large_cell/tier_2/north_mount{ pixel_y = 24 }, /obj/machinery/button/remote/airlock{ @@ -26801,9 +26799,7 @@ /turf/simulated/floor/tiled/steel, /area/hallway/primary/surfacetwo) "qCM" = ( -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable/green{ icon_state = "0-2" }, diff --git a/maps/stations/rift/map_files/rift-06-surface3.dmm b/maps/stations/rift/map_files/rift-06-surface3.dmm index ed82f6ac417..a60de074923 100644 --- a/maps/stations/rift/map_files/rift-06-surface3.dmm +++ b/maps/stations/rift/map_files/rift-06-surface3.dmm @@ -2275,9 +2275,7 @@ /turf/simulated/floor/tiled/techmaint, /area/shuttle/excursion/cockpit) "ahF" = ( -/obj/machinery/power/apc/east_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/east_mount, /obj/structure/cable/green{ icon_state = "0-8" }, @@ -7395,11 +7393,11 @@ "awT" = ( /obj/structure/table/reinforced, /obj/machinery/recharger, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_2/weapon{ pixel_x = 6; pixel_y = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_2/weapon{ pixel_x = 6; pixel_y = -4 }, @@ -7505,9 +7503,7 @@ pixel_x = 32 }, /obj/structure/table/reinforced, -/obj/machinery/power/apc/north_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/north_mount, /obj/structure/cable/green{ icon_state = "0-2" }, @@ -7550,7 +7546,7 @@ dir = 4 }, /obj/machinery/portable_atmospherics/canister/phoron, -/obj/machinery/power/apc/high, +/obj/machinery/power/apc/large_cell, /turf/simulated/floor/tiled/techfloor, /area/shuttle/excursion/cargo) "axr" = ( @@ -14854,8 +14850,8 @@ }, /obj/item/gun/projectile/energy/gun, /obj/item/gun/projectile/energy/gun, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_2/weapon, +/obj/item/cell/basic/tier_2/weapon, /turf/simulated/floor/tiled/steel_grid, /area/bridge/bunker) "aUt" = ( @@ -25168,7 +25164,7 @@ /obj/structure/cable/cyan{ icon_state = "0-4" }, -/obj/machinery/power/apc/high/west_mount, +/obj/machinery/power/apc/large_cell/west_mount, /obj/effect/debris/cleanable/dirt, /turf/simulated/floor, /area/shuttle/oldcentury) diff --git a/maps/stations/rift/map_files/rift-10-west_plains.dmm b/maps/stations/rift/map_files/rift-10-west_plains.dmm index e9b323cc0f9..cf44fa6dd4d 100644 --- a/maps/stations/rift/map_files/rift-10-west_plains.dmm +++ b/maps/stations/rift/map_files/rift-10-west_plains.dmm @@ -399,9 +399,7 @@ /obj/structure/cable/green{ icon_state = "0-4" }, -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/extinguisher_cabinet{ dir = 1; pixel_y = -32 @@ -4744,9 +4742,7 @@ /turf/simulated/floor/lythios43c, /area/rift/facility/interior/surface) "vL" = ( -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable/green{ icon_state = "0-4" }, @@ -6711,9 +6707,7 @@ /obj/structure/cable/green{ icon_state = "0-2" }, -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /turf/simulated/floor, /area/rnd/outpost/atmos) "Fx" = ( diff --git a/maps/stations/strelka/levels/strelka_deck1.dmm b/maps/stations/strelka/levels/strelka_deck1.dmm index 239fc64063a..64eeeb4716b 100644 --- a/maps/stations/strelka/levels/strelka_deck1.dmm +++ b/maps/stations/strelka/levels/strelka_deck1.dmm @@ -329,25 +329,25 @@ "bE" = ( /obj/effect/floor_decal/industrial/outline/blue, /obj/structure/table/rack/shelf/steel, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_2/weapon{ pixel_x = -8 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_2/weapon{ pixel_x = -4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_2/weapon{ pixel_x = -1 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_2/weapon{ pixel_x = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_2/weapon{ pixel_x = 8 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_2/weapon{ pixel_x = 3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_2/weapon{ pixel_x = 3 }, /turf/simulated/floor/tiled/techfloor/monogrid, @@ -1918,11 +1918,11 @@ /obj/machinery/newscaster{ pixel_x = 39 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_2/weapon{ pixel_x = 6; pixel_y = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_2/weapon{ pixel_x = 6; pixel_y = -4 }, @@ -3994,7 +3994,7 @@ /obj/structure/cable/white{ icon_state = "0-2" }, -/obj/machinery/power/apc/hyper/west_mount, +/obj/machinery/power/apc/large_cell/west_mount, /obj/machinery/button/remote/blast_door{ id = "armorylight"; name = "Emergency bridge Acccess"; @@ -5059,7 +5059,7 @@ /obj/structure/cable{ icon_state = "0-2" }, -/obj/machinery/power/apc/super/north_mount, +/obj/machinery/power/apc/large_cell/north_mount, /obj/machinery/computer/ship/helm, /turf/simulated/floor/carpet/oracarpet, /area/shuttle/personalmicro2) @@ -5840,7 +5840,7 @@ pixel_y = -30; pixel_x = 10 }, -/obj/machinery/power/apc/super/south_mount, +/obj/machinery/power/apc/large_cell/south_mount, /obj/structure/cable, /turf/simulated/floor/carpet/turcarpet, /area/shuttle/personalmicro1) @@ -7879,7 +7879,7 @@ pixel_y = 30; pixel_x = -14 }, -/obj/machinery/power/apc/super/north_mount, +/obj/machinery/power/apc/large_cell/north_mount, /obj/structure/bed/chair/shuttle{ dir = 8 }, @@ -8161,7 +8161,7 @@ pixel_y = -30; pixel_x = 10 }, -/obj/machinery/power/apc/super/south_mount, +/obj/machinery/power/apc/large_cell/south_mount, /obj/machinery/light{ dir = 4 }, @@ -8334,7 +8334,7 @@ "Ji" = ( /obj/structure/table/carbon/reinforced, /obj/machinery/cell_charger, -/obj/item/cell/high, +/obj/item/cell/basic/tier_3/medium, /obj/machinery/status_display{ pixel_y = 32 }, diff --git a/maps/stations/strelka/levels/strelka_deck2.dmm b/maps/stations/strelka/levels/strelka_deck2.dmm index eab33ed8d10..b2ccea3c193 100644 --- a/maps/stations/strelka/levels/strelka_deck2.dmm +++ b/maps/stations/strelka/levels/strelka_deck2.dmm @@ -1697,9 +1697,7 @@ /obj/item/paper{ info = "If you're reading this, then congratulations. The company somehow figured this station, or ship, is of enough importance that they have a shield system already built-in for you to just flip a switch on! Well... Almost at least. There's a quick checklist you'll need to go through to make sure you don't end up killing everyone on this polished scrapheap. Listen.. Read.. Eh.. Whatever you use to pay attention, start paying attention. You need to make sure those blocks jutting out around that shield are set to max to pull in as much back-up power as possible for when something goes belly-up. Next is the core shield itself. You might think smacking everything to the highest setting and leaving it is the smart move, huh? Welp, no. You'll just pull your entire facilities power to this machine and end up killing everyone trying to protect them. Ironic, isn't it? Nah, what you want is to set a nice middle-ground for this. Also that vertical range? Make sure it's covering every single floor of your facility so no where is at risk. Last... Range. Depends on the structure, but going a LITTLE past the structures size isn't a bad thing, hell it'll even protect ships that fly in if they're small and close enough if you got the range for it. Hope it's not a hostile ship though.Well that's all the critical stuff you need to know about this, now do us proud and don't blow up the dang place on your first shift like many others.Senior Chief Engineer --- (The name seems to of been scribbled out.)" }, -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable{ icon_state = "0-2" }, @@ -17065,12 +17063,8 @@ pixel_y = 17 }, /obj/machinery/cell_charger, -/obj/item/cell/high{ - maxcharge = 15000 - }, -/obj/item/cell/high{ - maxcharge = 15000 - }, +/obj/item/cell/basic/tier_3/medium, +/obj/item/cell/basic/tier_3/medium, /turf/simulated/floor/carpet/patterened/orange, /area/engineering/strelka/storage) "Rt" = ( diff --git a/maps/stations/strelka/levels/strelka_deck3.dmm b/maps/stations/strelka/levels/strelka_deck3.dmm index 0833ff37a1e..922e40e9d99 100644 --- a/maps/stations/strelka/levels/strelka_deck3.dmm +++ b/maps/stations/strelka/levels/strelka_deck3.dmm @@ -2233,7 +2233,7 @@ /obj/structure/cable/orange{ icon_state = "0-2" }, -/obj/machinery/power/apc/super/north_mount, +/obj/machinery/power/apc/large_cell/north_mount, /turf/simulated/floor/tiled/asteroid_steel, /area/hallway/strelka/deck3) "hj" = ( @@ -13183,11 +13183,11 @@ icon_state = "implantpad-0" }, /obj/machinery/cell_charger, -/obj/item/cell/high{ +/obj/item/cell/basic/tier_3/medium{ pixel_x = 2; pixel_y = -1 }, -/obj/item/cell/high{ +/obj/item/cell/basic/tier_3/medium{ pixel_x = 2; pixel_y = -1 }, diff --git a/maps/stations/tether/levels/midpoint.dmm b/maps/stations/tether/levels/midpoint.dmm index 5ff8d51ad76..54ea423b85d 100644 --- a/maps/stations/tether/levels/midpoint.dmm +++ b/maps/stations/tether/levels/midpoint.dmm @@ -308,9 +308,7 @@ /turf/simulated/floor/plating, /area/maintenance/tether_midpoint) "sx" = ( -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable, /obj/structure/disposalpipe/segment{ dir = 1; diff --git a/maps/stations/tether/levels/mining.dmm b/maps/stations/tether/levels/mining.dmm index 7124eee63b9..9f50b5fedd7 100644 --- a/maps/stations/tether/levels/mining.dmm +++ b/maps/stations/tether/levels/mining.dmm @@ -270,8 +270,8 @@ /obj/effect/floor_decal/industrial/warning/dust{ dir = 8 }, -/obj/item/cell/high, -/obj/item/cell/high, +/obj/item/cell/basic/tier_3/medium, +/obj/item/cell/basic/tier_3/medium, /turf/simulated/floor/tiled/steel_dirty/virgo3b, /area/outpost/mining_main/drill_equipment) "hF" = ( diff --git a/maps/stations/tether/levels/station1.dmm b/maps/stations/tether/levels/station1.dmm index 69b20db3b86..fdfee26203e 100644 --- a/maps/stations/tether/levels/station1.dmm +++ b/maps/stations/tether/levels/station1.dmm @@ -2073,7 +2073,7 @@ /obj/effect/floor_decal/corner/yellow/border{ dir = 1 }, -/obj/machinery/power/apc/super/north_mount{ +/obj/machinery/power/apc/large_cell/tier_2/north_mount{ pixel_y = 28 }, /obj/structure/cable/green{ @@ -2145,9 +2145,7 @@ /area/hallway/station/docks) "eh" = ( /obj/structure/table/reinforced, -/obj/item/cell/high{ - maxcharge = 15000 - }, +/obj/item/cell/basic/tier_3/medium, /obj/machinery/camera/network/engineering, /turf/simulated/floor/tiled, /area/engineering/engine_eva) @@ -8389,9 +8387,7 @@ pixel_x = 3; pixel_y = 3 }, -/obj/item/cell/high{ - maxcharge = 15000 - }, +/obj/item/cell/basic/tier_3/medium, /turf/simulated/floor/tiled/techmaint, /area/engineering/engine_smes) "rf" = ( @@ -10630,8 +10626,8 @@ /obj/structure/window/reinforced{ dir = 1 }, -/obj/item/cell/device, -/obj/item/cell/device, +/obj/item/cell/basic/tier_2/small, +/obj/item/cell/basic/tier_2/small, /obj/machinery/light_switch{ dir = 8; pixel_x = 24 @@ -12799,9 +12795,7 @@ /turf/simulated/floor/tiled/techfloor, /area/ai_cyborg_station) "Ar" = ( -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable{ icon_state = "0-4" }, @@ -13174,9 +13168,7 @@ /turf/simulated/floor, /area/constructionsite) "Bh" = ( -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable/green{ icon_state = "0-4" }, @@ -14474,7 +14466,6 @@ icon_state = "0-4" }, /obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super; req_access = list(); req_one_access = list(11,67) }, @@ -15115,9 +15106,7 @@ info = "The big blue box recently installed in here is a 'grid checker' which will shut off the power if a dangerous power spike from the engine erupts into the powernet. Shutting everything down protects everything from electrical damage, however the outages can be disruptive to colony operations, so it is designed to restore power after a somewhat significant delay, up to ten minutes or so. The grid checker can be manually hacked in order to end the outage sooner. To do that, you must cut three specific wires which do not cause a red light to shine, then pulse a fourth wire. Electrical protection is highly recommended when doing maintenance on the grid checker."; name = "grid checker info" }, -/obj/item/cell/high{ - maxcharge = 15000 - }, +/obj/item/cell/basic/tier_3/medium, /obj/item/storage/box/lights/mixed, /turf/simulated/floor/tiled/techmaint, /area/engineering/engine_smes) @@ -16100,19 +16089,13 @@ "GV" = ( /obj/structure/table/reinforced, /obj/machinery/cell_charger, -/obj/item/cell/high{ - maxcharge = 15000 - }, +/obj/item/cell/basic/tier_3/medium, /obj/item/tool/wrench, /obj/structure/window/reinforced{ dir = 1 }, -/obj/item/cell/high{ - maxcharge = 15000 - }, -/obj/item/cell/high{ - maxcharge = 15000 - }, +/obj/item/cell/basic/tier_3/medium, +/obj/item/cell/basic/tier_3/medium, /turf/simulated/floor/tiled, /area/engineering/workshop) "GW" = ( @@ -20525,9 +20508,7 @@ /area/bridge/secondary/hallway) "Qj" = ( /obj/structure/cable/green, -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/machinery/atmospherics/pipe/simple/hidden/supply{ dir = 5 }, @@ -25166,7 +25147,6 @@ icon_state = "0-4" }, /obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super; req_access = list(); req_one_access = list(11,67) }, diff --git a/maps/stations/tether/levels/station2.dmm b/maps/stations/tether/levels/station2.dmm index 24fd4fa3529..e68e477deff 100644 --- a/maps/stations/tether/levels/station2.dmm +++ b/maps/stations/tether/levels/station2.dmm @@ -2398,9 +2398,7 @@ /area/tether/station/dock_one) "eT" = ( /obj/structure/table/steel, -/obj/item/cell/high{ - maxcharge = 15000 - }, +/obj/item/cell/basic/tier_3/medium, /obj/item/stack/cable_coil, /obj/machinery/cell_charger{ pixel_y = 5 @@ -20832,12 +20830,8 @@ "Qx" = ( /obj/structure/table/reinforced, /obj/machinery/cell_charger, -/obj/item/cell/high{ - maxcharge = 15000 - }, -/obj/item/cell/high{ - maxcharge = 15000 - }, +/obj/item/cell/basic/tier_3/medium, +/obj/item/cell/basic/tier_3/medium, /obj/item/stack/cable_coil{ pixel_x = 3; pixel_y = -7 diff --git a/maps/stations/tether/levels/surface1.dmm b/maps/stations/tether/levels/surface1.dmm index 2bd31396dbc..57255fe1e32 100644 --- a/maps/stations/tether/levels/surface1.dmm +++ b/maps/stations/tether/levels/surface1.dmm @@ -2766,7 +2766,7 @@ /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, -/obj/machinery/power/apc/high/east_mount{ +/obj/machinery/power/apc/large_cell/east_mount{ pixel_x = 28 }, /turf/simulated/floor/tiled, @@ -5873,9 +5873,7 @@ /turf/simulated/floor/tiled, /area/tether/surfacebase/surface_one_hall) "cZI" = ( -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable/green{ icon_state = "0-4" }, @@ -8210,16 +8208,12 @@ pixel_x = 3; pixel_y = -7 }, -/obj/item/cell/high{ - maxcharge = 15000 - }, +/obj/item/cell/basic/tier_3/medium, /obj/item/stack/cable_coil{ pixel_x = 3; pixel_y = -7 }, -/obj/item/cell/high{ - maxcharge = 15000 - }, +/obj/item/cell/basic/tier_3/medium, /obj/item/storage/toolbox/mechanical{ pixel_x = -2; pixel_y = -1 @@ -9662,7 +9656,7 @@ /turf/simulated/floor/maglev/virgo3b, /area/tether/surfacebase/outside/outside1) "fjm" = ( -/obj/machinery/power/apc/high/east_mount{ +/obj/machinery/power/apc/large_cell/east_mount{ pixel_x = 28 }, /obj/structure/cable/green{ @@ -10700,9 +10694,7 @@ /obj/structure/cable/green{ icon_state = "0-2" }, -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /turf/simulated/floor, /area/rnd/outpost/atmos) "fHJ" = ( @@ -15683,7 +15675,7 @@ /obj/structure/cable/cyan{ icon_state = "0-4" }, -/obj/machinery/power/apc/super/north_mount{ +/obj/machinery/power/apc/large_cell/tier_2/north_mount{ pixel_y = 28 }, /turf/simulated/floor/tiled, @@ -17765,9 +17757,7 @@ "jrU" = ( /obj/machinery/portable_atmospherics/canister/nitrogen, /obj/effect/floor_decal/industrial/outline/yellow, -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable/cyan{ icon_state = "0-4" }, @@ -20747,9 +20737,7 @@ /obj/machinery/atmospherics/pipe/simple/hidden/supply{ dir = 5 }, -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable/green{ icon_state = "0-4" }, @@ -22315,9 +22303,7 @@ /area/tether/surfacebase/security/brig) "lRY" = ( /obj/effect/floor_decal/industrial/warning/dust, -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable/green{ icon_state = "0-4" }, @@ -24296,9 +24282,7 @@ /obj/structure/cable/green{ icon_state = "0-4" }, -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/extinguisher_cabinet{ dir = 1; pixel_y = -32 @@ -31754,7 +31738,7 @@ /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 8 }, -/obj/machinery/power/apc/high{ +/obj/machinery/power/apc/large_cell{ dir = 1 }, /turf/simulated/floor/tiled, @@ -32631,7 +32615,7 @@ /area/maintenance/lower/xenoflora) "rzQ" = ( /obj/structure/cable/orange, -/obj/machinery/power/apc/high, +/obj/machinery/power/apc/large_cell, /obj/machinery/light, /obj/structure/bed/chair/wood{ dir = 8 @@ -34661,7 +34645,7 @@ /turf/simulated/floor/tiled/techfloor/grid, /area/tether/surfacebase/tram) "syr" = ( -/obj/machinery/power/apc/super/east_mount{ +/obj/machinery/power/apc/large_cell/tier_2/east_mount{ name = "east bump"; pixel_x = 24 }, @@ -35221,9 +35205,7 @@ /obj/structure/railing{ dir = 4 }, -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/effect/floor_decal/industrial/outline/yellow, /obj/structure/cable/green{ icon_state = "16-0" @@ -36530,9 +36512,7 @@ /obj/structure/railing{ dir = 4 }, -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable{ icon_state = "0-4" }, @@ -39369,7 +39349,7 @@ /obj/machinery/light{ dir = 1 }, -/obj/machinery/power/apc/super/north_mount{ +/obj/machinery/power/apc/large_cell/tier_2/north_mount{ pixel_y = 28 }, /obj/machinery/button/remote/blast_door{ @@ -43637,9 +43617,7 @@ /obj/effect/floor_decal/corner/brown/bordercorner2{ dir = 10 }, -/obj/machinery/power/apc/north_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/north_mount, /obj/structure/cable/green{ icon_state = "0-2" }, diff --git a/maps/stations/tether/levels/surface2.dmm b/maps/stations/tether/levels/surface2.dmm index cc3680b7a55..0bc98ab5301 100644 --- a/maps/stations/tether/levels/surface2.dmm +++ b/maps/stations/tether/levels/surface2.dmm @@ -2163,10 +2163,10 @@ /obj/item/clothing/glasses/hud/security, /obj/item/clothing/glasses/hud/security, /obj/item/clothing/glasses/hud/security, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 3 }, /turf/simulated/floor/tiled/dark, @@ -6662,9 +6662,7 @@ /obj/structure/cable/green{ icon_state = "0-4" }, -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /turf/simulated/floor/tiled/techmaint, /area/tcomfoyer) "eUu" = ( @@ -8194,9 +8192,7 @@ /obj/machinery/atmospherics/component/unary/vent_pump/on{ dir = 4 }, -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable/green{ icon_state = "0-4" }, @@ -10276,9 +10272,7 @@ /obj/machinery/atmospherics/component/unary/vent_pump/on{ dir = 4 }, -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable/green{ icon_state = "0-4" }, @@ -12908,9 +12902,7 @@ /obj/structure/table/reinforced, /obj/item/suit_cooling_unit, /obj/item/suit_cooling_unit, -/obj/item/cell/high{ - maxcharge = 15000 - }, +/obj/item/cell/basic/tier_2/medium, /obj/machinery/status_display{ pixel_x = 32 }, @@ -14060,7 +14052,7 @@ /obj/structure/cable/green{ icon_state = "0-4" }, -/obj/machinery/power/apc/super/critical/north_mount{ +/obj/machinery/power/apc/large_cell/tier_2/critical/north_mount{ name = "north bump"; pixel_y = 24 }, @@ -17635,20 +17627,20 @@ /obj/effect/floor_decal/corner/blue/border{ dir = 1 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -6; pixel_y = 3 }, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon, +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -6; pixel_y = -3 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = -1; pixel_y = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_1/weapon{ pixel_x = 5; pixel_y = 3 }, @@ -23226,9 +23218,7 @@ /obj/effect/floor_decal/corner/yellow/border{ dir = 8 }, -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable/cyan{ icon_state = "0-4" }, @@ -24323,7 +24313,7 @@ /obj/structure/cable/green{ icon_state = "0-4" }, -/obj/machinery/power/apc/high/west_mount{ +/obj/machinery/power/apc/large_cell/west_mount{ pixel_x = -28 }, /turf/simulated/floor/tiled/techfloor, @@ -25818,7 +25808,7 @@ /obj/structure/cable/green{ icon_state = "0-4" }, -/obj/machinery/power/apc/super/north_mount{ +/obj/machinery/power/apc/large_cell/tier_2/north_mount{ pixel_y = 24 }, /obj/machinery/button/remote/airlock{ @@ -27951,9 +27941,7 @@ /obj/machinery/atmospherics/component/unary/vent_pump/on{ dir = 4 }, -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable/green{ icon_state = "0-4" }, diff --git a/maps/stations/tether/levels/surface3.dmm b/maps/stations/tether/levels/surface3.dmm index ee64c323eaf..70a2d4bdfed 100644 --- a/maps/stations/tether/levels/surface3.dmm +++ b/maps/stations/tether/levels/surface3.dmm @@ -2529,9 +2529,7 @@ /turf/simulated/floor/tiled/dark, /area/rnd/outpost/xenobiology/outpost_main) "bpc" = ( -/obj/machinery/power/apc/north_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/north_mount, /obj/structure/cable/green{ icon_state = "0-2" }, @@ -11045,16 +11043,12 @@ pixel_x = 3; pixel_y = -7 }, -/obj/item/cell/high{ - maxcharge = 15000 - }, +/obj/item/cell/basic/tier_3/medium, /obj/item/stack/cable_coil{ pixel_x = 3; pixel_y = -7 }, -/obj/item/cell/high{ - maxcharge = 15000 - }, +/obj/item/cell/basic/tier_3/medium, /obj/item/storage/toolbox/mechanical{ pixel_x = -2; pixel_y = -1 @@ -13627,9 +13621,7 @@ /turf/simulated/floor/grass, /area/hydroponics) "iku" = ( -/obj/machinery/power/apc/north_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/north_mount, /obj/structure/cable/green{ icon_state = "0-2" }, @@ -13844,9 +13836,7 @@ /turf/simulated/floor/tiled, /area/rnd/research/researchdivision) "iqT" = ( -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable/green{ icon_state = "0-2" }, @@ -16169,9 +16159,7 @@ /turf/simulated/floor/tiled/white, /area/tether/surfacebase/medical/triage) "jHu" = ( -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable/green{ icon_state = "0-4" }, @@ -16196,9 +16184,7 @@ dir = 6 }, /obj/landmark/spawnpoint/job/librarian, -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable/green{ icon_state = "0-4" }, @@ -16841,12 +16827,8 @@ dir = 9 }, /obj/machinery/cell_charger, -/obj/item/cell/high{ - maxcharge = 15000 - }, -/obj/item/cell/high{ - maxcharge = 15000 - }, +/obj/item/cell/basic/tier_3/medium, +/obj/item/cell/basic/tier_3/medium, /turf/simulated/floor/tiled, /area/rnd/research) "kev" = ( @@ -19528,9 +19510,7 @@ /turf/simulated/floor/tiled/dark, /area/rnd/outpost/xenobiology/outpost_stairs) "lUN" = ( -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable/green, /turf/simulated/floor/wood, /area/crew_quarters/recreation_area) @@ -25128,9 +25108,7 @@ /turf/simulated/floor/tiled/steel_grid, /area/rnd/robotics) "pbg" = ( -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable/orange{ icon_state = "0-4" }, @@ -25746,9 +25724,7 @@ /obj/structure/bed/chair/wheelchair{ dir = 4 }, -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable/green{ icon_state = "0-2" }, @@ -27196,9 +27172,7 @@ /turf/simulated/floor/tiled/dark, /area/rnd/outpost/xenobiology/outpost_hallway) "qix" = ( -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable/green{ icon_state = "0-4" }, @@ -33608,23 +33582,19 @@ /obj/structure/closet{ name = "robotics parts" }, -/obj/item/cell/high{ - maxcharge = 15000; +/obj/item/cell/basic/tier_3/medium{ pixel_x = 5; pixel_y = -5 }, -/obj/item/cell/high{ - maxcharge = 15000; +/obj/item/cell/basic/tier_3/medium{ pixel_x = 5; pixel_y = -5 }, -/obj/item/cell/high{ - maxcharge = 15000; +/obj/item/cell/basic/tier_3/medium{ pixel_x = 5; pixel_y = -5 }, -/obj/item/cell/high{ - maxcharge = 15000; +/obj/item/cell/basic/tier_3/medium{ pixel_x = 5; pixel_y = -5 }, @@ -35821,9 +35791,7 @@ /turf/simulated/floor/wood, /area/library) "vmd" = ( -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable/green{ icon_state = "0-4" }, @@ -37382,9 +37350,7 @@ /turf/simulated/floor/wood, /area/crew_quarters/bar) "wdG" = ( -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable{ icon_state = "0-4" }, @@ -39919,9 +39885,7 @@ /obj/effect/floor_decal/corner/lightgrey/border{ dir = 8 }, -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super - }, +/obj/machinery/power/apc/west_mount, /obj/structure/cable{ icon_state = "0-4" }, diff --git a/maps/submaps/level_specific/class_d/SupplyDrop1D.dmm b/maps/submaps/level_specific/class_d/SupplyDrop1D.dmm index 6a40bc9d1ab..6f5af0f53a4 100644 --- a/maps/submaps/level_specific/class_d/SupplyDrop1D.dmm +++ b/maps/submaps/level_specific/class_d/SupplyDrop1D.dmm @@ -29,8 +29,8 @@ /obj/item/gun/projectile/energy/stunrevolver, /obj/item/storage/box/flare, /obj/item/stack/marker_beacon/ten, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, /obj/item/trash/tastybread, /obj/item/trash/tastybread, /obj/item/trash/sosjerky, diff --git a/maps/submaps/level_specific/class_d/SupplyDrop2D.dmm b/maps/submaps/level_specific/class_d/SupplyDrop2D.dmm index f119309c9c6..f2d9663a1e3 100644 --- a/maps/submaps/level_specific/class_d/SupplyDrop2D.dmm +++ b/maps/submaps/level_specific/class_d/SupplyDrop2D.dmm @@ -25,8 +25,8 @@ /area/class_d/explored) "i" = ( /obj/structure/loot_pile/maint/technical, -/obj/item/cell/device/weapon/empty, -/obj/item/cell/device/weapon/empty, +/obj/item/cell/basic/tier_3/weapon/empty, +/obj/item/cell/basic/tier_3/weapon/empty, /turf/simulated/floor/classd, /area/class_d/explored) "j" = ( diff --git a/maps/submaps/level_specific/class_h/AuxiliaryResearchFacility.dmm b/maps/submaps/level_specific/class_h/AuxiliaryResearchFacility.dmm index c21fc89a1cd..4f74e8240fa 100644 --- a/maps/submaps/level_specific/class_h/AuxiliaryResearchFacility.dmm +++ b/maps/submaps/level_specific/class_h/AuxiliaryResearchFacility.dmm @@ -2066,7 +2066,7 @@ /area/class_h/POIs/AuxiliaryResearchFacility) "VL" = ( /obj/effect/debris/cleanable/dirt, -/obj/item/cell/apc, +/obj/item/cell/basic/tier_1/medium, /turf/simulated/floor/tiled/techfloor/grid, /area/class_h/POIs/AuxiliaryResearchFacility) "VM" = ( diff --git a/maps/submaps/level_specific/class_h/SupplyDrop1H.dmm b/maps/submaps/level_specific/class_h/SupplyDrop1H.dmm index 9f40e74b323..3096e7d7d4b 100644 --- a/maps/submaps/level_specific/class_h/SupplyDrop1H.dmm +++ b/maps/submaps/level_specific/class_h/SupplyDrop1H.dmm @@ -26,8 +26,8 @@ /obj/item/gun/projectile/energy/stunrevolver, /obj/item/storage/box/flare, /obj/item/stack/marker_beacon/ten, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, /obj/item/trash/tastybread, /obj/item/trash/tastybread, /obj/item/trash/sosjerky, diff --git a/maps/submaps/level_specific/class_h/SupplyDrop2H.dmm b/maps/submaps/level_specific/class_h/SupplyDrop2H.dmm index 384844475bb..e43b2874ebe 100644 --- a/maps/submaps/level_specific/class_h/SupplyDrop2H.dmm +++ b/maps/submaps/level_specific/class_h/SupplyDrop2H.dmm @@ -29,8 +29,8 @@ "i" = ( /obj/structure/loot_pile/maint/technical, /obj/item/gps/internal/poi, -/obj/item/cell/device/weapon/empty, -/obj/item/cell/device/weapon/empty, +/obj/item/cell/basic/tier_3/weapon/empty, +/obj/item/cell/basic/tier_3/weapon/empty, /turf/simulated/floor/reinforced, /area/class_h/explored) "j" = ( diff --git a/maps/submaps/level_specific/virgo2/Blackshuttledown.dmm b/maps/submaps/level_specific/virgo2/Blackshuttledown.dmm index 25c01eed59d..577bbdd0c59 100644 --- a/maps/submaps/level_specific/virgo2/Blackshuttledown.dmm +++ b/maps/submaps/level_specific/virgo2/Blackshuttledown.dmm @@ -231,10 +231,7 @@ /turf/simulated/floor/tiled/steel, /area/submap/virgo2/Blackshuttledown) "aP" = ( -/obj/machinery/power/apc/east_mount{ - cell_type = /obj/item/cell/hyper; - name = "Unknown APC" - }, +/obj/machinery/power/apc/east_mount, /turf/simulated/floor/tiled/steel, /area/submap/virgo2/Blackshuttledown) "aQ" = ( diff --git a/maps/submaps/level_specific/virgo2/CrashedSmuggler.dmm b/maps/submaps/level_specific/virgo2/CrashedSmuggler.dmm index 20ed234c28b..d55f8f2ec7e 100644 --- a/maps/submaps/level_specific/virgo2/CrashedSmuggler.dmm +++ b/maps/submaps/level_specific/virgo2/CrashedSmuggler.dmm @@ -18,7 +18,7 @@ /area/submap/virgo2/CrashedSmuggler/ship) "cc" = ( /obj/machinery/power/apc/alarms_hidden/south_mount{ - cell_type = /obj/item/cell/high/empty + cell_type = /obj/item/cell/basic/tier_4/medium/empty }, /obj/structure/cable/cyan{ dir = 4 diff --git a/maps/submaps/level_specific/virgo2/DJOutpost1.dmm b/maps/submaps/level_specific/virgo2/DJOutpost1.dmm index 3fa4975b77b..69e52b2d041 100644 --- a/maps/submaps/level_specific/virgo2/DJOutpost1.dmm +++ b/maps/submaps/level_specific/virgo2/DJOutpost1.dmm @@ -170,8 +170,7 @@ "B" = ( /obj/structure/table/steel_reinforced, /obj/item/radio, -/obj/machinery/power/apc/east_mount{ - cell_type = /obj/item/cell/hyper; +/obj/machinery/power/apc/large_cell/tier_3/east_mount{ environ = 1; equipment = 1; lighting = 1; diff --git a/maps/submaps/level_specific/virgo2/DoomP.dmm b/maps/submaps/level_specific/virgo2/DoomP.dmm index 5c8333132c2..c398a36d0dc 100644 --- a/maps/submaps/level_specific/virgo2/DoomP.dmm +++ b/maps/submaps/level_specific/virgo2/DoomP.dmm @@ -334,10 +334,10 @@ /area/submap/virgo2/DoomP) "bq" = ( /obj/structure/table/rack, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, /turf/simulated/floor/tiled/techfloor, /area/submap/virgo2/DoomP) "br" = ( diff --git a/maps/submaps/level_specific/virgo2/Lab1.dmm b/maps/submaps/level_specific/virgo2/Lab1.dmm index 6f48bc39f00..f67e81dcfe1 100644 --- a/maps/submaps/level_specific/virgo2/Lab1.dmm +++ b/maps/submaps/level_specific/virgo2/Lab1.dmm @@ -98,7 +98,7 @@ "q" = ( /obj/structure/table/standard, /obj/random/toolbox, -/obj/item/cell/super, +/obj/item/cell/basic/tier_4/medium, /turf/simulated/floor/tiled/steel_dirty, /area/submap/virgo2/Lab1) "r" = ( @@ -117,8 +117,7 @@ /turf/simulated/floor/tiled/steel_dirty, /area/submap/virgo2/Lab1) "u" = ( -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/hyper; +/obj/machinery/power/apc/large_cell/tier_3/west_mount{ name = "Unknown APC"; operating = 0 }, @@ -204,7 +203,7 @@ /turf/simulated/floor/tiled/steel_dirty, /area/submap/virgo2/Lab1) "I" = ( -/obj/item/cell/super, +/obj/item/cell/basic/tier_4/medium, /turf/simulated/floor/tiled/steel_dirty, /area/submap/virgo2/Lab1) "J" = ( diff --git a/maps/submaps/level_specific/virgo2/Manor1.dmm b/maps/submaps/level_specific/virgo2/Manor1.dmm index 8d2b6ea9575..e95f9b7b3a8 100644 --- a/maps/submaps/level_specific/virgo2/Manor1.dmm +++ b/maps/submaps/level_specific/virgo2/Manor1.dmm @@ -511,8 +511,8 @@ /area/submap/virgo2/Manor1) "cc" = ( /obj/structure/closet/cabinet, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, /obj/random/medical, /turf/simulated/floor/holofloor/wood, /area/submap/virgo2/Manor1) diff --git a/maps/submaps/level_specific/virgo2/Rockybase.dmm b/maps/submaps/level_specific/virgo2/Rockybase.dmm index c856c461835..53d28cda4c9 100644 --- a/maps/submaps/level_specific/virgo2/Rockybase.dmm +++ b/maps/submaps/level_specific/virgo2/Rockybase.dmm @@ -652,7 +652,6 @@ dir = 8 }, /obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super; name = "Unknown APC" }, /turf/simulated/floor/plating/virgo2, diff --git a/maps/submaps/mountains/Mineshaft1.dmm b/maps/submaps/mountains/Mineshaft1.dmm index 07a6aff45a4..52496260d03 100644 --- a/maps/submaps/mountains/Mineshaft1.dmm +++ b/maps/submaps/mountains/Mineshaft1.dmm @@ -108,8 +108,8 @@ /area/submap/cave/AMine1) "v" = ( /obj/structure/table/standard, -/obj/item/cell/high, -/obj/item/cell/high, +/obj/item/cell/basic/tier_3/medium, +/obj/item/cell/basic/tier_3/medium, /turf/simulated/floor, /area/submap/cave/AMine1) "w" = ( diff --git a/maps/submaps/mountains/SupplyDrop1.dmm b/maps/submaps/mountains/SupplyDrop1.dmm index 74f62040c45..d691a9cf46e 100644 --- a/maps/submaps/mountains/SupplyDrop1.dmm +++ b/maps/submaps/mountains/SupplyDrop1.dmm @@ -32,8 +32,8 @@ /obj/item/gun/projectile/energy/stunrevolver, /obj/item/storage/box/flare, /obj/item/stack/marker_beacon/ten, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, /obj/item/trash/tastybread, /obj/item/trash/tastybread, /obj/item/trash/sosjerky, diff --git a/maps/submaps/mountains/crashed_ufo.dmm b/maps/submaps/mountains/crashed_ufo.dmm index 76500d2ea26..2eb7f86b979 100644 --- a/maps/submaps/mountains/crashed_ufo.dmm +++ b/maps/submaps/mountains/crashed_ufo.dmm @@ -287,7 +287,7 @@ /turf/simulated/shuttle/floor/alienplating, /area/submap/cave/crashed_ufo) "bk" = ( -/obj/item/cell/device/weapon/empty, +/obj/item/cell/basic/tier_5/weapon/empty, /turf/simulated/shuttle/floor/alienplating, /area/submap/cave/crashed_ufo) "bl" = ( diff --git a/maps/submaps/mountains/lost_explorer.dmm b/maps/submaps/mountains/lost_explorer.dmm index fc80b2558df..0f1cb21fae1 100644 --- a/maps/submaps/mountains/lost_explorer.dmm +++ b/maps/submaps/mountains/lost_explorer.dmm @@ -25,7 +25,7 @@ /area/submap/cave/lost_explorer) "g" = ( /obj/item/clothing/suit/storage/hooded/explorer, -/obj/item/cell/device, +/obj/item/cell/basic/tier_4/weapon, /turf/simulated/mineral/floor/ignore_mapgen, /area/submap/cave/lost_explorer) "h" = ( diff --git a/maps/submaps/plains/Diner.dmm b/maps/submaps/plains/Diner.dmm index 529663e861f..4940ecf0340 100644 --- a/maps/submaps/plains/Diner.dmm +++ b/maps/submaps/plains/Diner.dmm @@ -369,7 +369,7 @@ /area/submap/Diner) "bl" = ( /obj/structure/table/woodentable, -/obj/item/cell/high, +/obj/item/cell/basic/tier_3/medium, /turf/simulated/floor/lino, /area/submap/Diner) "bm" = ( diff --git a/maps/submaps/plains/Diner_vr.dmm b/maps/submaps/plains/Diner_vr.dmm index 0d5b25d8a69..5c7a1bb2d24 100644 --- a/maps/submaps/plains/Diner_vr.dmm +++ b/maps/submaps/plains/Diner_vr.dmm @@ -381,7 +381,7 @@ /area/submap/Diner) "bn" = ( /obj/structure/table/woodentable, -/obj/item/cell/high, +/obj/item/cell/basic/tier_3/medium, /turf/simulated/floor/lino, /area/submap/Diner) "bo" = ( diff --git a/maps/submaps/plains/Mechpt.dmm b/maps/submaps/plains/Mechpt.dmm index 4eface7e1b5..7c63f6d83d2 100644 --- a/maps/submaps/plains/Mechpt.dmm +++ b/maps/submaps/plains/Mechpt.dmm @@ -22,8 +22,8 @@ "f" = ( /obj/structure/railing, /obj/structure/table/woodentable, -/obj/item/cell/high, -/obj/item/cell/high, +/obj/item/cell/basic/tier_3/medium, +/obj/item/cell/basic/tier_3/medium, /turf/template_noop, /area/submap/Mechpt) "g" = ( @@ -110,8 +110,8 @@ dir = 1 }, /obj/structure/table/woodentable, -/obj/item/cell/high, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_3/medium, +/obj/item/cell/basic/tier_3/weapon, /turf/template_noop, /area/submap/Mechpt) "v" = ( diff --git a/maps/submaps/plains/Peninsula.dmm b/maps/submaps/plains/Peninsula.dmm index b7f411e68f3..e6ebe03071c 100644 --- a/maps/submaps/plains/Peninsula.dmm +++ b/maps/submaps/plains/Peninsula.dmm @@ -25,8 +25,8 @@ /area/submap/Peninsula) "h" = ( /obj/structure/table/woodentable, -/obj/item/cell/device, -/obj/item/cell/device, +/obj/item/cell/basic/tier_3/small, +/obj/item/cell/basic/tier_3/small, /turf/template_noop, /area/submap/Peninsula) "i" = ( diff --git a/maps/submaps/plains/PooledR.dmm b/maps/submaps/plains/PooledR.dmm index e9ae94a51b8..29909510ec0 100644 --- a/maps/submaps/plains/PooledR.dmm +++ b/maps/submaps/plains/PooledR.dmm @@ -27,9 +27,7 @@ /area/submap/PooledR) "h" = ( /obj/structure/table/woodentable, -/obj/item/gun/projectile/energy/retro{ - cell_type = /obj/item/cell/device/weapon/empty - }, +/obj/item/gun/projectile/energy/retro, /turf/template_noop, /area/submap/PooledR) "i" = ( diff --git a/maps/submaps/plains/PooledR_vr.dmm b/maps/submaps/plains/PooledR_vr.dmm index ec7e2add3eb..3f4e5765060 100644 --- a/maps/submaps/plains/PooledR_vr.dmm +++ b/maps/submaps/plains/PooledR_vr.dmm @@ -27,9 +27,7 @@ /area/submap/PooledR) "h" = ( /obj/structure/table/woodentable, -/obj/item/gun/projectile/energy/retro{ - cell_type = /obj/item/cell/device/weapon/empty - }, +/obj/item/gun/projectile/energy/retro, /turf/template_noop, /area/submap/PooledR) "i" = ( diff --git a/maps/submaps/plains/SupplyDrop2.dmm b/maps/submaps/plains/SupplyDrop2.dmm index f9fabea0872..ab836f2bfbb 100644 --- a/maps/submaps/plains/SupplyDrop2.dmm +++ b/maps/submaps/plains/SupplyDrop2.dmm @@ -29,8 +29,8 @@ "i" = ( /obj/structure/loot_pile/maint/technical, /obj/item/gps/internal/poi, -/obj/item/cell/device/weapon/empty, -/obj/item/cell/device/weapon/empty, +/obj/item/cell/basic/tier_4/weapon/empty, +/obj/item/cell/basic/tier_4/weapon/empty, /turf/simulated/floor/plating, /area/submap/SupplyDrop2) "j" = ( diff --git a/maps/submaps/plains/Thiefc.dmm b/maps/submaps/plains/Thiefc.dmm index 30fb902eec5..2d0874c62e8 100644 --- a/maps/submaps/plains/Thiefc.dmm +++ b/maps/submaps/plains/Thiefc.dmm @@ -103,8 +103,8 @@ /area/submap/Thiefc) "o" = ( /obj/structure/closet/crate, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, /turf/simulated/floor/outdoors/dirt{ outdoors = 0 }, diff --git a/maps/submaps/plains/Thiefc_vr.dmm b/maps/submaps/plains/Thiefc_vr.dmm index 6c7acfe7c79..9e77e179de0 100644 --- a/maps/submaps/plains/Thiefc_vr.dmm +++ b/maps/submaps/plains/Thiefc_vr.dmm @@ -110,10 +110,10 @@ /area/submap/Thiefc) "o" = ( /obj/structure/closet/crate, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, /obj/item/perfect_tele/one_beacon, /turf/simulated/floor/outdoors/dirt{ outdoors = 0 diff --git a/maps/submaps/plains/house1.dmm b/maps/submaps/plains/house1.dmm index 5b2fe2f7e7b..bf197de7305 100644 --- a/maps/submaps/plains/house1.dmm +++ b/maps/submaps/plains/house1.dmm @@ -230,9 +230,9 @@ "aU" = ( /obj/structure/table/rack, /obj/item/clothing/under/explorer, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, +/obj/item/cell/basic/tier_3/small, +/obj/item/cell/basic/tier_3/small, +/obj/item/cell/basic/tier_3/small, /turf/simulated/floor/wood, /area/submap/house1) "aV" = ( diff --git a/maps/submaps/plains/house1_arealess.dmm b/maps/submaps/plains/house1_arealess.dmm index 1d3b0e1c271..e2e30591601 100644 --- a/maps/submaps/plains/house1_arealess.dmm +++ b/maps/submaps/plains/house1_arealess.dmm @@ -231,9 +231,9 @@ "aU" = ( /obj/structure/table/rack, /obj/item/clothing/under/explorer, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, +/obj/item/cell/basic/tier_3/small, +/obj/item/cell/basic/tier_3/small, +/obj/item/cell/basic/tier_3/small, /turf/simulated/floor/wood, /area/template_noop) "aV" = ( diff --git a/maps/submaps/plains/house1_arealess_vr.dmm b/maps/submaps/plains/house1_arealess_vr.dmm index 10ca147cc38..9359d33464e 100644 --- a/maps/submaps/plains/house1_arealess_vr.dmm +++ b/maps/submaps/plains/house1_arealess_vr.dmm @@ -231,9 +231,9 @@ "aU" = ( /obj/structure/table/rack, /obj/item/clothing/under/explorer, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, +/obj/item/cell/basic/tier_3/small, +/obj/item/cell/basic/tier_3/small, +/obj/item/cell/basic/tier_3/small, /turf/simulated/floor/wood, /area/template_noop) "aV" = ( diff --git a/maps/submaps/plains/house1_vr.dmm b/maps/submaps/plains/house1_vr.dmm index 8fef150755e..9bce3e84bcf 100644 --- a/maps/submaps/plains/house1_vr.dmm +++ b/maps/submaps/plains/house1_vr.dmm @@ -230,9 +230,9 @@ "aU" = ( /obj/structure/table/rack, /obj/item/clothing/under/explorer, -/obj/item/cell/device, -/obj/item/cell/device, -/obj/item/cell/device, +/obj/item/cell/basic/tier_3/small, +/obj/item/cell/basic/tier_3/small, +/obj/item/cell/basic/tier_3/small, /turf/simulated/floor/wood, /area/submap/house1) "aV" = ( diff --git a/maps/submaps/wilderness/DJOutpost1.dmm b/maps/submaps/wilderness/DJOutpost1.dmm index 00ede1f44b0..8715ea0b765 100644 --- a/maps/submaps/wilderness/DJOutpost1.dmm +++ b/maps/submaps/wilderness/DJOutpost1.dmm @@ -178,8 +178,7 @@ "B" = ( /obj/structure/table/steel_reinforced, /obj/item/radio, -/obj/machinery/power/apc/east_mount{ - cell_type = /obj/item/cell/hyper; +/obj/machinery/power/apc/large_cell/tier_3/east_mount{ environ = 1; equipment = 1; lighting = 1; diff --git a/maps/submaps/wilderness/DJOutpost3.dmm b/maps/submaps/wilderness/DJOutpost3.dmm index 11d1282db81..c6688037678 100644 --- a/maps/submaps/wilderness/DJOutpost3.dmm +++ b/maps/submaps/wilderness/DJOutpost3.dmm @@ -174,8 +174,7 @@ "aC" = ( /obj/structure/table/steel_reinforced, /obj/item/radio, -/obj/machinery/power/apc/east_mount{ - cell_type = /obj/item/cell/hyper; +/obj/machinery/power/apc/large_cell/tier_3/east_mount{ environ = 1; equipment = 1; lighting = 1; diff --git a/maps/submaps/wilderness/DJOutpost4.dmm b/maps/submaps/wilderness/DJOutpost4.dmm index eaf8c9b96d2..5e446a8fadd 100644 --- a/maps/submaps/wilderness/DJOutpost4.dmm +++ b/maps/submaps/wilderness/DJOutpost4.dmm @@ -223,8 +223,7 @@ "aK" = ( /obj/structure/table/steel_reinforced, /obj/item/radio, -/obj/machinery/power/apc/east_mount{ - cell_type = /obj/item/cell/hyper; +/obj/machinery/power/apc/large_cell/tier_3/east_mount{ environ = 1; equipment = 1; lighting = 1; diff --git a/maps/submaps/wilderness/DoomP.dmm b/maps/submaps/wilderness/DoomP.dmm index 86474bc9543..55353d9bcc1 100644 --- a/maps/submaps/wilderness/DoomP.dmm +++ b/maps/submaps/wilderness/DoomP.dmm @@ -352,8 +352,8 @@ /area/submap/DoomP) "bq" = ( /obj/structure/table/rack, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, /turf/simulated/floor/tiled/techfloor, /area/submap/DoomP) "br" = ( diff --git a/maps/submaps/wilderness/Lab1.dmm b/maps/submaps/wilderness/Lab1.dmm index aea24815996..556c119f171 100644 --- a/maps/submaps/wilderness/Lab1.dmm +++ b/maps/submaps/wilderness/Lab1.dmm @@ -98,7 +98,7 @@ "q" = ( /obj/structure/table/standard, /obj/random/toolbox, -/obj/item/cell/super, +/obj/item/cell/basic/tier_4/medium, /turf/simulated/floor/tiled/steel_dirty, /area/submap/Lab1) "r" = ( @@ -117,8 +117,7 @@ /turf/simulated/floor/tiled/steel_dirty, /area/submap/Lab1) "u" = ( -/obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/hyper; +/obj/machinery/power/apc/large_cell/tier_3/west_mount{ name = "Unknown APC"; operating = 0 }, @@ -207,7 +206,7 @@ /turf/simulated/floor/tiled/steel_dirty, /area/submap/Lab1) "J" = ( -/obj/item/cell/super, +/obj/item/cell/basic/tier_3/medium, /turf/simulated/floor/tiled/steel_dirty, /area/submap/Lab1) "K" = ( diff --git a/maps/submaps/wilderness/Manor1.dmm b/maps/submaps/wilderness/Manor1.dmm index 6c957466440..8a2e0cd3fc1 100644 --- a/maps/submaps/wilderness/Manor1.dmm +++ b/maps/submaps/wilderness/Manor1.dmm @@ -521,8 +521,8 @@ /area/submap/Manor1) "cc" = ( /obj/structure/closet/cabinet, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, /obj/random/medical, /turf/simulated/floor/holofloor/wood, /area/submap/Manor1) diff --git a/maps/submaps/wilderness/Rockybase.dmm b/maps/submaps/wilderness/Rockybase.dmm index 1d3943c9108..09a929e57ac 100644 --- a/maps/submaps/wilderness/Rockybase.dmm +++ b/maps/submaps/wilderness/Rockybase.dmm @@ -321,7 +321,7 @@ /obj/structure/table/rack, /obj/item/storage/box/shotgunshells, /obj/item/storage/box/shotgunshells, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_3/weapon, /turf/simulated/floor/tiled/techfloor, /area/submap/Rockybase) "bi" = ( @@ -890,7 +890,6 @@ /area/submap/Rockybase) "de" = ( /obj/machinery/power/apc/west_mount{ - cell_type = /obj/item/cell/super; name = "Unknown APC" }, /obj/structure/cable/green{ diff --git a/maps/templates/admin/dhael_centcom.dmm b/maps/templates/admin/dhael_centcom.dmm index c5e72d63b2b..260c81e71da 100644 --- a/maps/templates/admin/dhael_centcom.dmm +++ b/maps/templates/admin/dhael_centcom.dmm @@ -11,41 +11,41 @@ "af" = ( /obj/structure/table/standard, /obj/machinery/recharger, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_4/weapon{ pixel_x = 4; pixel_y = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_4/weapon{ pixel_x = 2; pixel_y = 2 }, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon{ pixel_x = -2; pixel_y = -2 }, /obj/effect/floor_decal/industrial/outline/grey, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_4/weapon{ pixel_x = 4; pixel_y = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_4/weapon{ pixel_x = 4; pixel_y = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_4/weapon{ pixel_x = 4; pixel_y = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_4/weapon{ pixel_x = 4; pixel_y = 4 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_4/weapon{ pixel_x = -2; pixel_y = -2 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_4/weapon{ pixel_x = -2; pixel_y = -2 }, @@ -478,26 +478,26 @@ /area/centcom/specops) "bu" = ( /obj/structure/table/reinforced, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, /turf/unsimulated/floor{ icon_state = "dark" }, @@ -979,18 +979,18 @@ "cM" = ( /obj/structure/table/reinforced, /obj/effect/floor_decal/industrial/outline/blue, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, /turf/unsimulated/floor{ icon_state = "dark" }, @@ -2166,12 +2166,8 @@ /area/centcom/control) "fl" = ( /obj/structure/table/standard, -/obj/item/cell/high{ - maxcharge = 15000 - }, -/obj/item/cell/high{ - maxcharge = 15000 - }, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, /obj/machinery/cell_charger, /obj/effect/floor_decal/borderfloorwhite, /obj/effect/floor_decal/corner/purple/border, @@ -2314,8 +2310,7 @@ /obj/structure/closet{ name = "robotics parts" }, -/obj/item/cell/high{ - maxcharge = 15000; +/obj/item/cell/basic/tier_4/medium{ pixel_x = 5; pixel_y = -5 }, @@ -2327,18 +2322,15 @@ pixel_x = -8; pixel_y = 4 }, -/obj/item/cell/high{ - maxcharge = 15000; +/obj/item/cell/basic/tier_4/medium{ pixel_x = 5; pixel_y = -5 }, -/obj/item/cell/high{ - maxcharge = 15000; +/obj/item/cell/basic/tier_4/medium{ pixel_x = 5; pixel_y = -5 }, -/obj/item/cell/high{ - maxcharge = 15000; +/obj/item/cell/basic/tier_4/medium{ pixel_x = 5; pixel_y = -5 }, @@ -3165,15 +3157,15 @@ "iE" = ( /obj/structure/table/rack, /obj/effect/floor_decal/industrial/outline/yellow, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_4/weapon{ pixel_x = -2; pixel_y = -2 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_4/weapon{ pixel_x = -2; pixel_y = -2 }, -/obj/item/cell/device/weapon{ +/obj/item/cell/basic/tier_4/weapon{ pixel_x = -2; pixel_y = -2 }, @@ -10098,18 +10090,18 @@ /area/centcom/living) "Ez" = ( /obj/structure/table/reinforced, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, /turf/unsimulated/floor{ icon_state = "dark" }, diff --git a/maps/templates/admin/ert.dmm b/maps/templates/admin/ert.dmm index e03230e48f7..44391222dcf 100644 --- a/maps/templates/admin/ert.dmm +++ b/maps/templates/admin/ert.dmm @@ -281,7 +281,7 @@ dir = 4 }, /obj/machinery/meter, -/obj/machinery/power/apc/hyper/north_mount{ +/obj/machinery/power/apc/large_cell/tier_3/north_mount{ alarms_hidden = 1; name = "VB APC - North"; pixel_y = 24 @@ -590,7 +590,7 @@ dir = 4 }, /obj/machinery/meter, -/obj/machinery/power/apc/hyper/south_mount{ +/obj/machinery/power/apc/large_cell/tier_3/south_mount{ alarms_hidden = 1; name = "VB APC - South" }, @@ -774,7 +774,7 @@ /turf/simulated/floor/tiled/techfloor, /area/ship/ert/atmos) "gR" = ( -/obj/machinery/power/apc/hyper/east_mount{ +/obj/machinery/power/apc/large_cell/tier_3/east_mount{ alarms_hidden = 1; name = "VB APC - East"; pixel_x = 24 @@ -788,7 +788,7 @@ /obj/structure/table/rack/steel, /obj/item/vehicle_module/shocker, /obj/item/vehicle_module/shocker, -/obj/machinery/power/apc/hyper/north_mount{ +/obj/machinery/power/apc/large_cell/tier_3/north_mount{ alarms_hidden = 1; name = "VB APC - North"; pixel_y = 24 @@ -1876,7 +1876,7 @@ /obj/item/clothing/accessory/storage/black_vest, /obj/item/clothing/accessory/storage/black_vest, /obj/item/clothing/accessory/storage/black_vest, -/obj/machinery/power/apc/hyper/east_mount{ +/obj/machinery/power/apc/large_cell/tier_3/east_mount{ alarms_hidden = 1; name = "VB APC - East"; pixel_x = 24 @@ -2139,19 +2139,19 @@ /area/ship/ert/armoury_dl) "pY" = ( /obj/structure/table/steel_reinforced, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, /obj/machinery/cell_charger, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, /obj/item/tool/screwdriver, /obj/item/tool/wrench, /obj/item/tool/crowbar, @@ -3027,7 +3027,7 @@ /obj/item/gun/projectile/energy/ionrifle/pistol, /obj/item/gun/projectile/energy/ionrifle, /obj/item/gun/projectile/energy/ionrifle, -/obj/machinery/power/apc/hyper/east_mount{ +/obj/machinery/power/apc/large_cell/tier_3/east_mount{ alarms_hidden = 1; name = "VB APC - East"; pixel_x = 24 @@ -3384,7 +3384,7 @@ /turf/simulated/floor/wood, /area/ship/ert/commander) "Af" = ( -/obj/machinery/power/apc/hyper/east_mount{ +/obj/machinery/power/apc/large_cell/tier_3/east_mount{ alarms_hidden = 1; name = "VB APC - East"; pixel_x = 24 @@ -3418,7 +3418,7 @@ /turf/simulated/floor/tiled/techmaint, /area/ship/ert/hallways_aft) "An" = ( -/obj/machinery/power/apc/hyper/east_mount{ +/obj/machinery/power/apc/large_cell/tier_3/east_mount{ alarms_hidden = 1; name = "VB APC - East"; pixel_x = 24 @@ -3661,7 +3661,7 @@ /turf/simulated/floor/reinforced/airless, /area/ship/ert/eng_storage) "Cn" = ( -/obj/machinery/power/apc/hyper/east_mount{ +/obj/machinery/power/apc/large_cell/tier_3/east_mount{ alarms_hidden = 1; name = "VB APC - East"; pixel_x = 24 @@ -3882,7 +3882,7 @@ /obj/item/extinguisher/mini, /obj/item/extinguisher/mini, /obj/item/extinguisher/mini, -/obj/machinery/power/apc/hyper/north_mount{ +/obj/machinery/power/apc/large_cell/tier_3/north_mount{ alarms_hidden = 1; name = "VB APC - North"; pixel_y = 24 @@ -4083,7 +4083,7 @@ /obj/structure/table/rack/steel, /obj/item/storage/box/frags, /obj/item/storage/box/frags, -/obj/machinery/power/apc/hyper/east_mount{ +/obj/machinery/power/apc/large_cell/tier_3/east_mount{ alarms_hidden = 1; name = "VB APC - East"; pixel_x = 24 @@ -4190,36 +4190,36 @@ /obj/machinery/atmospherics/component/unary/vent_pump/on{ dir = 1 }, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, /turf/simulated/floor/tiled/techmaint, /area/ship/ert/armoury_st) "FY" = ( @@ -4311,7 +4311,7 @@ /turf/simulated/floor/tiled/techmaint, /area/ship/ert/eng_storage) "GT" = ( -/obj/machinery/power/apc/hyper/south_mount{ +/obj/machinery/power/apc/large_cell/tier_3/south_mount{ alarms_hidden = 1; name = "VB APC - South" }, @@ -4518,7 +4518,7 @@ /turf/simulated/floor/tiled/techfloor, /area/ship/ert/atmos) "Ip" = ( -/obj/machinery/power/apc/hyper/east_mount{ +/obj/machinery/power/apc/large_cell/tier_3/east_mount{ alarms_hidden = 1; name = "VB APC - East"; pixel_x = 24 @@ -5166,7 +5166,7 @@ /obj/structure/cable/green{ icon_state = "1-8" }, -/obj/machinery/power/apc/hyper/east_mount{ +/obj/machinery/power/apc/large_cell/tier_3/east_mount{ alarms_hidden = 1; name = "VB APC - East"; pixel_x = 24 @@ -5752,7 +5752,7 @@ /turf/simulated/floor/tiled/techmaint, /area/ship/ert/teleporter) "Qc" = ( -/obj/machinery/power/apc/hyper/west_mount{ +/obj/machinery/power/apc/large_cell/tier_3/west_mount{ alarms_hidden = 1; name = "VB APC - West"; pixel_x = -24 @@ -5800,7 +5800,7 @@ /obj/item/smes_coil, /obj/item/t_scanner/advanced, /obj/item/t_scanner/advanced, -/obj/machinery/power/apc/hyper/south_mount{ +/obj/machinery/power/apc/large_cell/tier_3/south_mount{ alarms_hidden = 1; name = "VB APC - South" }, @@ -5861,7 +5861,7 @@ "QY" = ( /obj/structure/table/rack, /obj/item/hardsuit/ert, -/obj/item/cell/slime, +/obj/item/cell/slime_core/whole, /turf/simulated/floor/wood, /area/ship/ert/commander) "QZ" = ( @@ -6069,7 +6069,7 @@ /area/ship/ert/dock_star) "SA" = ( /obj/machinery/atmospherics/pipe/simple/hidden/supply, -/obj/machinery/power/apc/hyper/east_mount{ +/obj/machinery/power/apc/large_cell/tier_3/east_mount{ alarms_hidden = 1; name = "VB APC - East"; pixel_x = 24 @@ -6601,7 +6601,7 @@ /turf/simulated/floor/reinforced/airless, /area/ship/ert/barracks) "Yq" = ( -/obj/machinery/power/apc/hyper/east_mount{ +/obj/machinery/power/apc/large_cell/tier_3/east_mount{ alarms_hidden = 1; name = "VB APC - East"; pixel_x = 24 diff --git a/maps/templates/admin/ert_base.dmm b/maps/templates/admin/ert_base.dmm index 1c5fad8951f..32128c4ad84 100644 --- a/maps/templates/admin/ert_base.dmm +++ b/maps/templates/admin/ert_base.dmm @@ -443,10 +443,10 @@ /obj/item/gun/projectile/energy/gun/martin{ legacy_battery_lock = 0 }, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, /turf/simulated/shuttle/floor/black, /area/shuttle/specops/centcom) "aX" = ( @@ -464,18 +464,18 @@ /obj/item/gun/projectile/energy/gun, /obj/item/gun/projectile/energy/gun, /obj/item/gun/projectile/energy/gun, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, /turf/simulated/shuttle/floor/black, /area/shuttle/specops/centcom) "aZ" = ( @@ -572,18 +572,18 @@ /obj/item/gun/projectile/energy/laser, /obj/item/gun/projectile/energy/laser, /obj/item/gun/projectile/energy/laser, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, /turf/simulated/shuttle/floor/black, /area/shuttle/specops/centcom) "bk" = ( @@ -675,10 +675,10 @@ /obj/item/gun/projectile/energy/ionrifle, /obj/item/gun/projectile/energy/ionrifle/pistol, /obj/item/gun/projectile/energy/ionrifle/pistol, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, /turf/simulated/shuttle/floor/black, /area/shuttle/specops/centcom) "bv" = ( @@ -1393,19 +1393,19 @@ dir = 1 }, /obj/structure/table/steel_reinforced, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, /obj/machinery/cell_charger, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, /turf/simulated/shuttle/floor/black, /area/shuttle/specops/centcom) "cS" = ( diff --git a/maps/templates/admin/killhouse1.dmm b/maps/templates/admin/killhouse1.dmm index 526bb740db1..059f3328873 100644 --- a/maps/templates/admin/killhouse1.dmm +++ b/maps/templates/admin/killhouse1.dmm @@ -5,9 +5,7 @@ /turf/simulated/floor/wood, /area/killhouse/one) "au" = ( -/obj/machinery/power/apc/hyper/west_mount{ - cell_type = /obj/item/cell/infinite - }, +/obj/machinery/power/apc/large_cell/tier_3/west_mount, /obj/machinery/light/small, /turf/simulated/floor/concrete/rng/lythios43c/outdoors, /area/killhouse/one) @@ -588,7 +586,7 @@ /obj/item/circuitboard/cell_charger, /obj/item/stack/cable_coil/white, /obj/item/stack/cable_coil/white, -/obj/item/cell/high, +/obj/item/cell/basic/tier_3/medium, /turf/simulated/floor/concrete/rng/lythios43c, /area/killhouse/one) "AV" = ( @@ -823,9 +821,7 @@ /area/killhouse/one) "MR" = ( /obj/structure/trash_pile, -/obj/machinery/power/apc/hyper/east_mount{ - cell_type = /obj/item/cell/infinite - }, +/obj/machinery/power/apc/large_cell/tier_3/east_mount, /turf/simulated/floor/concrete/rng/lythios43c/outdoors, /area/killhouse/one/outside) "MU" = ( diff --git a/maps/templates/admin/killhouse2.dmm b/maps/templates/admin/killhouse2.dmm index fec9d8a9cac..a7fb6e0c680 100644 --- a/maps/templates/admin/killhouse2.dmm +++ b/maps/templates/admin/killhouse2.dmm @@ -1723,9 +1723,7 @@ /turf/simulated/floor/tiled/white, /area/killhouse/two) "Ev" = ( -/obj/machinery/power/apc/hyper/east_mount{ - cell_type = /obj/item/cell/infinite - }, +/obj/machinery/power/apc/large_cell/tier_3/east_mount, /turf/simulated/floor/outdoors/snow/lythios43c, /area/killhouse/two/outside) "EB" = ( @@ -2718,9 +2716,7 @@ /turf/simulated/floor/tiled/steel_grid, /area/killhouse/two) "Wi" = ( -/obj/machinery/power/apc/hyper/south_mount{ - cell_type = /obj/item/cell/infinite - }, +/obj/machinery/power/apc/large_cell/tier_3/south_mount, /turf/simulated/floor/concrete/rng/lythios43c/outdoors, /area/killhouse/two) "Wj" = ( @@ -2811,7 +2807,7 @@ /area/killhouse/two) "XQ" = ( /obj/structure/table/steel, -/obj/item/cell/high, +/obj/item/cell/basic/tier_3/medium, /turf/simulated/floor/concrete/rng/lythios43c/outdoors, /area/killhouse/two) "XR" = ( diff --git a/maps/templates/admin/killhouseteleporter.dmm b/maps/templates/admin/killhouseteleporter.dmm index 61ddde63231..94fe5cd04d6 100644 --- a/maps/templates/admin/killhouseteleporter.dmm +++ b/maps/templates/admin/killhouseteleporter.dmm @@ -124,9 +124,7 @@ dir = 6; icon_state = "warning" }, -/obj/machinery/power/apc/hyper/south_mount{ - cell_type = /obj/item/cell/infinite - }, +/obj/machinery/power/apc/large_cell/tier_3/south_mount, /turf/simulated/floor/reinforced, /area/killhouse/teleporter) "M" = ( diff --git a/maps/templates/admin/kk_mercship.dmm b/maps/templates/admin/kk_mercship.dmm index d5f115d2307..c5a63c5b0c1 100644 --- a/maps/templates/admin/kk_mercship.dmm +++ b/maps/templates/admin/kk_mercship.dmm @@ -54,7 +54,7 @@ /obj/structure/cable/orange{ icon_state = "0-4" }, -/obj/machinery/power/apc/hyper/west_mount{ +/obj/machinery/power/apc/large_cell/tier_3/west_mount{ alarms_hidden = 1; name = "Merc APC - West"; pixel_x = -24 @@ -168,24 +168,24 @@ /turf/simulated/floor/tiled/techfloor, /area/ship/manta/hallways_port) "aS" = ( -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, /obj/structure/table/steel_reinforced, /turf/simulated/floor/tiled/techfloor, /area/ship/manta/armoury_st) @@ -230,10 +230,10 @@ /obj/effect/floor_decal/techfloor{ dir = 4 }, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, /turf/simulated/floor/tiled/techfloor, /area/ship/manta/armoury_st) "bc" = ( @@ -582,7 +582,7 @@ /obj/structure/cable/orange{ icon_state = "0-2" }, -/obj/machinery/power/apc/hyper/north_mount{ +/obj/machinery/power/apc/large_cell/tier_3/north_mount{ alarms_hidden = 1; name = "Merc APC - North"; pixel_y = 24 @@ -629,7 +629,7 @@ /obj/effect/floor_decal/techfloor{ dir = 1 }, -/obj/machinery/power/apc/hyper/north_mount{ +/obj/machinery/power/apc/large_cell/tier_3/north_mount{ alarms_hidden = 1; name = "Merc APC - North"; pixel_y = 24 @@ -1805,7 +1805,7 @@ /turf/simulated/floor/tiled/techfloor, /area/ship/manta/bridge) "iQ" = ( -/obj/machinery/power/apc/hyper/east_mount{ +/obj/machinery/power/apc/large_cell/tier_3/east_mount{ alarms_hidden = 1; name = "Merc APC - East"; pixel_x = 24 @@ -1888,7 +1888,7 @@ /turf/simulated/wall/rshull, /area/shuttle/manta_ship_boat) "jg" = ( -/obj/machinery/power/apc/hyper/north_mount{ +/obj/machinery/power/apc/large_cell/tier_3/north_mount{ alarms_hidden = 1; name = "Merc APC - North"; pixel_y = 24 @@ -2387,10 +2387,10 @@ /obj/item/melee/baton/loaded, /obj/item/gun/projectile/energy/taser, /obj/item/gun/projectile/energy/taser, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, /obj/effect/floor_decal/techfloor, /obj/structure/table/steel_reinforced, /turf/simulated/floor/tiled/dark, @@ -2431,7 +2431,7 @@ name = "Syndicate-Spawn" }, /obj/item/bedsheet/hos, -/obj/machinery/power/apc/hyper/east_mount{ +/obj/machinery/power/apc/large_cell/tier_3/east_mount{ alarms_hidden = 1; name = "Merc APC - East"; pixel_x = 24 @@ -2682,7 +2682,7 @@ /obj/structure/railing{ dir = 8 }, -/obj/machinery/power/apc/hyper/east_mount{ +/obj/machinery/power/apc/large_cell/tier_3/east_mount{ alarms_hidden = 1; name = "Merc APC - East"; pixel_x = 24 @@ -2954,7 +2954,7 @@ /turf/simulated/floor/plating, /area/ship/manta/radiator_port) "ov" = ( -/obj/machinery/power/apc/hyper/east_mount{ +/obj/machinery/power/apc/large_cell/tier_3/east_mount{ alarms_hidden = 1; name = "Merc APC - East"; pixel_x = 24 @@ -2987,10 +2987,10 @@ /obj/effect/floor_decal/techfloor{ dir = 8 }, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, /turf/simulated/floor/tiled/techfloor, /area/ship/manta/armoury_st) "oE" = ( @@ -3208,7 +3208,7 @@ /obj/machinery/atmospherics/pipe/simple/visible{ dir = 10 }, -/obj/machinery/power/apc/hyper/east_mount{ +/obj/machinery/power/apc/large_cell/tier_3/east_mount{ alarms_hidden = 1; name = "Merc APC - East"; pixel_x = 24 @@ -3429,7 +3429,7 @@ /turf/simulated/floor/tiled/white, /area/ship/manta/med) "rl" = ( -/obj/machinery/power/apc/hyper/south_mount{ +/obj/machinery/power/apc/large_cell/tier_3/south_mount{ alarms_hidden = 1; name = "Merc APC - South" }, @@ -4215,7 +4215,7 @@ /turf/simulated/floor/tiled/techfloor, /area/ship/manta/recreation) "vw" = ( -/obj/machinery/power/apc/hyper/south_mount{ +/obj/machinery/power/apc/large_cell/tier_3/south_mount{ alarms_hidden = 1; name = "Merc APC - South" }, @@ -4712,7 +4712,7 @@ /turf/simulated/floor/plating, /area/ship/manta/engine) "xv" = ( -/obj/machinery/power/apc/hyper/west_mount{ +/obj/machinery/power/apc/large_cell/tier_3/west_mount{ alarms_hidden = 1; name = "Merc APC - West"; pixel_x = -24 @@ -5241,10 +5241,10 @@ dir = 4; pixel_x = -23 }, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, /obj/item/gun/projectile/energy/netgun, /obj/item/gun/projectile/energy/netgun, /obj/item/gun/projectile/energy/plasmastun, @@ -5263,10 +5263,10 @@ /obj/effect/floor_decal/techfloor{ dir = 4 }, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, /turf/simulated/floor/tiled/techfloor, /area/ship/manta/armoury_st) "zy" = ( @@ -5544,7 +5544,7 @@ /turf/simulated/floor/tiled/techfloor, /area/ship/manta/recreation) "Bk" = ( -/obj/machinery/power/apc/hyper/west_mount{ +/obj/machinery/power/apc/large_cell/tier_3/west_mount{ alarms_hidden = 1; name = "Merc APC - West"; pixel_x = -24 @@ -5688,7 +5688,7 @@ /turf/simulated/floor/tiled/techfloor, /area/ship/manta/mech_bay) "Cn" = ( -/obj/machinery/power/apc/hyper/south_mount{ +/obj/machinery/power/apc/large_cell/tier_3/south_mount{ alarms_hidden = 1; name = "Merc APC - South" }, @@ -5990,10 +5990,10 @@ /obj/effect/floor_decal/techfloor{ dir = 8 }, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, /turf/simulated/floor/tiled/techfloor, /area/ship/manta/armoury_st) "Dw" = ( @@ -6040,10 +6040,10 @@ dir = 4 }, /obj/machinery/fire_alarm/alarms_hidden/east_mount, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, /turf/simulated/floor/tiled/techfloor, /area/ship/manta/armoury_st) "DB" = ( @@ -6367,7 +6367,7 @@ /obj/effect/floor_decal/techfloor{ dir = 6 }, -/obj/machinery/power/apc/hyper/south_mount{ +/obj/machinery/power/apc/large_cell/tier_3/south_mount{ alarms_hidden = 1; name = "Merc APC - South" }, @@ -6638,7 +6638,7 @@ /obj/structure/table/rack, /obj/item/vehicle_module/shocker, /obj/effect/floor_decal/techfloor, -/obj/machinery/power/apc/hyper/south_mount{ +/obj/machinery/power/apc/large_cell/tier_3/south_mount{ alarms_hidden = 1; name = "Merc APC - South" }, @@ -6881,8 +6881,8 @@ /obj/effect/floor_decal/techfloor{ dir = 8 }, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, /turf/simulated/floor/tiled/techfloor, /area/ship/manta/armoury_st) "IK" = ( @@ -6926,8 +6926,8 @@ /obj/effect/floor_decal/techfloor{ dir = 4 }, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, /turf/simulated/floor/tiled/techfloor, /area/ship/manta/armoury_st) "Jd" = ( @@ -7409,7 +7409,7 @@ /area/ship/manta/dock_star) "LC" = ( /obj/effect/floor_decal/techfloor, -/obj/machinery/power/apc/hyper/south_mount{ +/obj/machinery/power/apc/large_cell/tier_3/south_mount{ alarms_hidden = 1; name = "Merc APC - South" }, @@ -7789,8 +7789,8 @@ /obj/machinery/light{ dir = 8 }, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, /turf/simulated/floor/tiled/techfloor, /area/ship/manta/armoury_st) "NA" = ( @@ -7817,8 +7817,8 @@ /obj/machinery/light{ dir = 4 }, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, /turf/simulated/floor/tiled/techfloor, /area/ship/manta/armoury_st) "NH" = ( @@ -8273,7 +8273,7 @@ /obj/effect/floor_decal/techfloor{ dir = 1 }, -/obj/machinery/power/apc/hyper/north_mount{ +/obj/machinery/power/apc/large_cell/tier_3/north_mount{ alarms_hidden = 1; name = "Merc APC - North"; pixel_y = 24 @@ -8292,7 +8292,7 @@ /obj/structure/railing{ dir = 4 }, -/obj/machinery/power/apc/hyper/west_mount{ +/obj/machinery/power/apc/large_cell/tier_3/west_mount{ alarms_hidden = 1; name = "Merc APC - West"; pixel_x = -24 @@ -8537,10 +8537,10 @@ /obj/structure/table/rack, /obj/item/gun/projectile/energy/lasercannon, /obj/item/gun/projectile/energy/lasercannon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, /obj/effect/floor_decal/techfloor{ dir = 4 }, @@ -8784,7 +8784,7 @@ name = "Syndicate-Spawn" }, /obj/item/bedsheet/hos, -/obj/machinery/power/apc/hyper/east_mount{ +/obj/machinery/power/apc/large_cell/tier_3/east_mount{ alarms_hidden = 1; name = "Merc APC - East"; pixel_x = 24 @@ -9474,7 +9474,7 @@ /turf/simulated/floor/tiled/techfloor, /area/ship/manta/hangar) "Ww" = ( -/obj/machinery/power/apc/hyper/south_mount{ +/obj/machinery/power/apc/large_cell/tier_3/south_mount{ alarms_hidden = 1; name = "Merc APC - South" }, @@ -9916,7 +9916,7 @@ /obj/machinery/atmospherics/pipe/simple/hidden/fuel{ dir = 8 }, -/obj/machinery/power/apc/hyper/north_mount{ +/obj/machinery/power/apc/large_cell/tier_3/north_mount{ alarms_hidden = 1; name = "Merc APC - North"; pixel_y = 24 @@ -10106,7 +10106,7 @@ pixel_x = 12; pixel_y = 8 }, -/obj/machinery/power/apc/hyper/east_mount{ +/obj/machinery/power/apc/large_cell/tier_3/east_mount{ alarms_hidden = 1; name = "Merc APC - East"; pixel_x = 24 diff --git a/maps/templates/admin/mercbase.dmm b/maps/templates/admin/mercbase.dmm index 99996e8ec7e..4b66662b7d6 100644 --- a/maps/templates/admin/mercbase.dmm +++ b/maps/templates/admin/mercbase.dmm @@ -296,10 +296,10 @@ }, /obj/item/gun/projectile/energy/lasercannon, /obj/item/gun/projectile/energy/lasercannon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, /turf/unsimulated/floor{ icon_state = "dark" }, @@ -465,24 +465,24 @@ /area/antag/antag_base) "aO" = ( /obj/structure/table/rack, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, /turf/unsimulated/floor{ icon_state = "dark" }, @@ -2312,8 +2312,8 @@ }, /obj/item/gun/projectile/energy/taser, /obj/item/gun/projectile/energy/taser, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_4/weapon, +/obj/item/cell/basic/tier_4/weapon, /obj/structure/table/steel, /obj/effect/floor_decal/borderfloorblack, /turf/unsimulated/floor{ diff --git a/maps/templates/archive/tradeship.dmm b/maps/templates/archive/tradeship.dmm index dcad551d9a7..fcecd2b981d 100644 --- a/maps/templates/archive/tradeship.dmm +++ b/maps/templates/archive/tradeship.dmm @@ -723,9 +723,9 @@ /area/shuttle/trade) "bU" = ( /obj/structure/table/steel_reinforced, -/obj/item/cell/high, -/obj/item/cell/high, -/obj/item/cell/hyper, +/obj/item/cell/basic/tier_5/medium, +/obj/item/cell/basic/tier_5/medium, +/obj/item/cell/basic/tier_5/medium, /obj/item/cell/potato, /obj/structure/window/reinforced, /turf/simulated/shuttle/floor/black, diff --git a/maps/templates/shelters/shelter_4.dmm b/maps/templates/shelters/shelter_4.dmm index 41dc7e99120..2a2e71cd4ba 100644 --- a/maps/templates/shelters/shelter_4.dmm +++ b/maps/templates/shelters/shelter_4.dmm @@ -434,17 +434,17 @@ /obj/item/ammo_magazine/a5_56mm/ap, /obj/item/ammo_magazine/a5_56mm/ap, /obj/item/ammo_magazine/a5_56mm/ap, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, /obj/machinery/light, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, /turf/simulated/shuttle/floor/voidcraft/dark, /area/survivalpod) "U" = ( diff --git a/maps/templates/shuttles/overmaps/generic/abductor.dmm b/maps/templates/shuttles/overmaps/generic/abductor.dmm index afc63b4ac50..c30e0bfed77 100644 --- a/maps/templates/shuttles/overmaps/generic/abductor.dmm +++ b/maps/templates/shuttles/overmaps/generic/abductor.dmm @@ -429,8 +429,8 @@ /obj/structure/table/alien, /obj/item/gun/projectile/energy/medigun, /obj/item/gun/projectile/energy/medigun, -/obj/item/cell/infinite, -/obj/item/cell/infinite, +/obj/item/cell/infinite/weapon, +/obj/item/cell/infinite/weapon, /turf/simulated/shuttle/floor/alienplating, /area/abductor/interior) "Bv" = ( diff --git a/maps/templates/shuttles/overmaps/generic/bearcat.dmm b/maps/templates/shuttles/overmaps/generic/bearcat.dmm index 8343f828c3b..caf4f1f4669 100644 --- a/maps/templates/shuttles/overmaps/generic/bearcat.dmm +++ b/maps/templates/shuttles/overmaps/generic/bearcat.dmm @@ -1899,7 +1899,7 @@ pixel_y = 4 }, /obj/item/t_scanner, -/obj/item/cell/high, +/obj/item/cell/basic/tier_3/medium, /obj/machinery/light_switch{ pixel_y = 25 }, diff --git a/maps/templates/shuttles/overmaps/generic/cruiser.dmm b/maps/templates/shuttles/overmaps/generic/cruiser.dmm index f93b60e793b..71e90d6a39c 100644 --- a/maps/templates/shuttles/overmaps/generic/cruiser.dmm +++ b/maps/templates/shuttles/overmaps/generic/cruiser.dmm @@ -2062,10 +2062,10 @@ pixel_x = -2; pixel_y = -2 }, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, /obj/machinery/air_alarm{ dir = 4; pixel_x = -23 @@ -5184,14 +5184,14 @@ "lI" = ( /obj/structure/table/steel_reinforced, /obj/machinery/cell_charger, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, /turf/simulated/floor/tiled/steel_grid, /area/mothership/armory) "lJ" = ( @@ -5793,14 +5793,14 @@ /obj/item/gun/projectile/energy/laser, /obj/item/gun/projectile/energy/laser, /obj/item/gun/projectile/energy/laser, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, /obj/structure/closet/secure_closet/guncabinet{ req_one_access = list(103) }, @@ -5827,14 +5827,14 @@ /obj/item/gun/projectile/energy/nt_pulse/rifle, /obj/item/gun/projectile/energy/nt_pulse/rifle, /obj/item/gun/projectile/energy/nt_pulse/rifle, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, /obj/item/gun/projectile/energy/gun, /obj/item/gun/projectile/energy/gun, /turf/simulated/floor/tiled/steel_grid, @@ -5919,23 +5919,19 @@ empty = 1; name = "First-Aid (empty)" }, -/obj/item/cell/high{ - maxcharge = 15000; +/obj/item/cell/basic/tier_3/medium{ pixel_x = 5; pixel_y = -5 }, -/obj/item/cell/high{ - maxcharge = 15000; +/obj/item/cell/basic/tier_3/medium{ pixel_x = 5; pixel_y = -5 }, -/obj/item/cell/high{ - maxcharge = 15000; +/obj/item/cell/basic/tier_3/medium{ pixel_x = 5; pixel_y = -5 }, -/obj/item/cell/high{ - maxcharge = 15000; +/obj/item/cell/basic/tier_3/medium{ pixel_x = 5; pixel_y = -5 }, @@ -6159,14 +6155,14 @@ /obj/item/gun/projectile/energy/gun, /obj/item/gun/projectile/energy/gun, /obj/item/gun/projectile/energy/gun, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, /obj/structure/closet/secure_closet/guncabinet{ req_one_access = list(103) }, diff --git a/maps/templates/shuttles/overmaps/generic/curashuttle.dmm b/maps/templates/shuttles/overmaps/generic/curashuttle.dmm index 75a34a7f793..ce56db06d71 100644 --- a/maps/templates/shuttles/overmaps/generic/curashuttle.dmm +++ b/maps/templates/shuttles/overmaps/generic/curashuttle.dmm @@ -1304,8 +1304,8 @@ pixel_x = -3; pixel_y = 13 }, -/obj/item/cell/high, -/obj/item/cell/high, +/obj/item/cell/basic/tier_3/medium, +/obj/item/cell/basic/tier_3/medium, /obj/item/storage/briefcase/inflatable, /obj/item/storage/briefcase/inflatable, /turf/simulated/floor/tiled/techfloor/grid, diff --git a/maps/templates/shuttles/overmaps/generic/ghostship.dmm b/maps/templates/shuttles/overmaps/generic/ghostship.dmm index d6caa51ca52..b0991ad2f76 100644 --- a/maps/templates/shuttles/overmaps/generic/ghostship.dmm +++ b/maps/templates/shuttles/overmaps/generic/ghostship.dmm @@ -6842,8 +6842,8 @@ dir = 9 }, /obj/structure/closet, -/obj/item/cell/high, -/obj/item/cell/high, +/obj/item/cell/basic/tier_3/medium, +/obj/item/cell/basic/tier_3/medium, /turf/simulated/floor/tiled/steel_dirty/silver, /area/ship/ghostship/expedition) "pL" = ( diff --git a/maps/templates/shuttles/overmaps/generic/shelter_6.dmm b/maps/templates/shuttles/overmaps/generic/shelter_6.dmm index 6cee29e5539..64d83ca0efb 100644 --- a/maps/templates/shuttles/overmaps/generic/shelter_6.dmm +++ b/maps/templates/shuttles/overmaps/generic/shelter_6.dmm @@ -289,46 +289,46 @@ /obj/item/gun/projectile/energy/gun, /obj/item/gun/projectile/energy/gun, /obj/item/gun/projectile/energy/gun, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, -/obj/item/cell/device/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, +/obj/item/cell/basic/tier_3/weapon, /turf/simulated/floor/reinforced, /area/shuttle/tabiranth) "ah" = ( @@ -733,16 +733,16 @@ /obj/item/storage/backpack/ert/security, /obj/item/storage/backpack/ert/security, /obj/item/storage/backpack/ert/security, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, -/obj/item/cell/hyper, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, +/obj/item/cell/basic/tier_4/medium, /obj/item/gun/projectile/energy/frontier, /obj/item/gun/projectile/energy/frontier, /obj/item/gun/projectile/energy/frontier, @@ -1169,40 +1169,20 @@ /obj/item/plastique, /obj/item/plastique, /obj/item/plastique, -/obj/item/cell/device/weapon/recharge/alien, -/obj/item/cell/device/weapon/recharge/alien, -/obj/item/cell/device/weapon/recharge/alien, -/obj/item/cell/device/weapon/recharge/alien, -/obj/item/cell/device/weapon/recharge/alien, -/obj/item/cell/device/weapon/recharge/alien, +/obj/item/cell/regen/fractal/weapon, +/obj/item/cell/regen/fractal/weapon, +/obj/item/cell/regen/fractal/weapon, +/obj/item/cell/regen/fractal/weapon, +/obj/item/cell/regen/fractal/weapon, +/obj/item/cell/regen/fractal/weapon, /obj/item/storage/secure/briefcase/nsfw_pack_hos, /obj/item/storage/secure/briefcase/nsfw_pack, /obj/item/ammo_casing/microbattery/vm_aml/corpse_mend, /obj/item/ammo_casing/microbattery/vm_aml/corpse_mend, -/obj/item/cell/slime{ - description_info = "This 'cell' holds a max charge of 20k and self recharges over time."; - icon_state = "icell"; - maxcharge = 20000; - name = "slime core cell" - }, -/obj/item/cell/slime{ - description_info = "This 'cell' holds a max charge of 20k and self recharges over time."; - icon_state = "icell"; - maxcharge = 20000; - name = "slime core cell" - }, -/obj/item/cell/slime{ - description_info = "This 'cell' holds a max charge of 20k and self recharges over time."; - icon_state = "icell"; - maxcharge = 20000; - name = "slime core cell" - }, -/obj/item/cell/slime{ - description_info = "This 'cell' holds a max charge of 20k and self recharges over time."; - icon_state = "icell"; - maxcharge = 20000; - name = "slime core cell" - }, +/obj/item/cell/slime_core/whole, +/obj/item/cell/slime_core/whole, +/obj/item/cell/slime_core/whole, +/obj/item/cell/slime_core/whole, /obj/item/slime_extract/pink, /obj/item/slime_extract/pink, /obj/item/slime_extract/pink, @@ -1342,10 +1322,10 @@ dir = 9 }, /obj/item/inducer, -/obj/item/cell/device/weapon/recharge/alien, -/obj/item/cell/device/weapon/recharge/alien, -/obj/item/cell/device/weapon/recharge/alien, -/obj/item/cell/device/weapon/recharge/alien, +/obj/item/cell/regen/fractal/weapon, +/obj/item/cell/regen/fractal/weapon, +/obj/item/cell/regen/fractal/weapon, +/obj/item/cell/regen/fractal/weapon, /obj/item/circuitboard/machine/abductor/core/hybrid, /obj/item/circuitboard/machine/abductor/core/hybrid, /turf/simulated/floor/tiled/techmaint, diff --git a/maps/templates/shuttles/overmaps/generic/vespa.dmm b/maps/templates/shuttles/overmaps/generic/vespa.dmm index 4514a1bf9c3..e56cc05b6fd 100644 --- a/maps/templates/shuttles/overmaps/generic/vespa.dmm +++ b/maps/templates/shuttles/overmaps/generic/vespa.dmm @@ -7225,8 +7225,8 @@ dir = 9 }, /obj/structure/closet, -/obj/item/cell/high, -/obj/item/cell/high, +/obj/item/cell/basic/tier_3/medium, +/obj/item/cell/basic/tier_3/medium, /turf/simulated/floor/tiled/techfloor, /area/ship/expe/expedition) "pL" = ( diff --git a/tools/bootstrap/node_.ps1 b/tools/bootstrap/node_.ps1 index 6e575ce8728..71fec1bd392 100644 --- a/tools/bootstrap/node_.ps1 +++ b/tools/bootstrap/node_.ps1 @@ -33,7 +33,7 @@ function Verify-Node { Write-Output "Verifying Node checksum" $FileHash = Get-FileHash $NodeTarget -Algorithm SHA256 $ActualSha = $FileHash.Hash - $LoginResponse = Invoke-WebRequest "https://nodejs.org/download/release/v$NodeVersion/SHASUMS256.txt" + $LoginResponse = Invoke-WebRequest "https://nodejs.org/download/release/v$NodeVersion/SHASUMS256.txt" -UseBasicParsing $ShaArray = $LoginResponse.Content.split("`n") foreach ($ShaArrayEntry in $ShaArray) { $EntrySplit = $ShaArrayEntry -split "\s+" diff --git a/tools/bootstrap/python_.ps1 b/tools/bootstrap/python_.ps1 index fe89450f14e..17b0eabeb29 100644 --- a/tools/bootstrap/python_.ps1 +++ b/tools/bootstrap/python_.ps1 @@ -47,6 +47,7 @@ if (!(Test-Path $PythonExe -PathType Leaf)) { "https://www.python.org/ftp/python/$PythonVersion/python-$PythonVersion-embed-amd64.zip" ` -OutFile $Archive ` -ErrorAction Stop + -UseBasicParsing [System.IO.Compression.ZipFile]::ExtractToDirectory($Archive, $PythonDir) @@ -69,6 +70,7 @@ if (!(Test-Path "$PythonDir/Scripts/pip.exe")) { Invoke-WebRequest "https://bootstrap.pypa.io/get-pip.py" ` -OutFile "$Cache/get-pip.py" ` -ErrorAction Stop + -UseBasicParsing & $PythonExe "$Cache/get-pip.py" --no-warn-script-location if ($LASTEXITCODE -ne 0) { diff --git a/tools/dmi/__init__.py b/tools/dmi/__init__.py index 7578a3ecea2..18b5bff7885 100755 --- a/tools/dmi/__init__.py +++ b/tools/dmi/__init__.py @@ -381,16 +381,42 @@ class DmiTransformPipeline: return image + def shift_crop_by_pattern(self, pattern: str, x_o: int, y_o: int) -> DmiTransformPipeline: + matcher: re.Pattern = re.compile(pattern) + self.dmi.states = [DmiTransformPipeline.impl_shift_crop_state(s, x_o, y_o) if matcher.fullmatch(s.name) else s for s in self.dmi.states] + return self + + def impl_shift_crop_state(state: State, x_o: int, y_o: int): + state.frames = [DmiTransformPipeline.impl_shift_crop_image(f, x_o, y_o) for f in state.frames] + return state + + def impl_shift_crop_image(image: Image.Image, x_o: int, y_o: int): + image2 = image.copy() + # clear + for x in range(image.width): + for y in range(image.height): + image2.putpixel((x, y), (0, 0, 0, 0)) + # copy + for x in range(image.width): + for y in range(image.height): + o_x = x + x_o + # negative because the image row is top first + o_y = y - y_o + if(o_x >= image.width or o_x < 0): + continue + if(o_y >= image.width or o_y < 0): + continue + image2.putpixel((o_x, o_y), image.getpixel((x, y))) + return image2 + def greyscale_state_pattern(self, pattern: str) -> DmiTransformPipeline: matcher: re.Pattern = re.compile(pattern) self.dmi.states = [DmiTransformPipeline._greyscale_state(s) if matcher.fullmatch(s.name) else s for s in self.dmi.states] return self def greyscale_all_states(self) -> DmiTransformPipeline: - for state in self.dmi.states: DmiTransformPipeline._greyscale_state(state) - return self def greyscale_state(self, name: str | list[str]) -> DmiTransformPipeline: