From be2f874e766b97712b5fba339a03a05121a9f69b Mon Sep 17 00:00:00 2001 From: CRUNCH <143041327+Fordoxia@users.noreply.github.com> Date: Tue, 26 Aug 2025 02:38:33 +0100 Subject: [PATCH] Removes crap, upgraded, and upgaded+ cells. Buffs the capacity of basic cells. (#29958) * Purgation complete * Update cell.dm * duplicated descriptions * subtyping * Update cell.dm * Loot * Update misc_spawners.dm * Update misc_spawners.dm * Update code/game/objects/effects/spawners/random/misc_spawners.dm Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com> Signed-off-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com> * Update cell.dm * Update code/game/objects/effects/spawners/random/misc_spawners.dm Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com> Signed-off-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com> * Update code/modules/power/cell.dm Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> Signed-off-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com> --------- Signed-off-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com> Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com> Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> --- _maps/map_files/stations/metastation.dmm | 2 +- .../effects/spawners/random/misc_spawners.dm | 43 ++++- code/game/objects/items/devices/scanners.dm | 4 +- .../mob/living/simple_animal/bot/mulebot.dm | 2 +- code/modules/power/apc/apc.dm | 2 +- code/modules/power/cell.dm | 159 ++++++++---------- .../modules/projectiles/guns/energy/energy.dm | 4 +- code/modules/projectiles/guns/energy/pulse.dm | 6 +- .../projectiles/guns/energy/special_eguns.dm | 6 +- code/modules/projectiles/guns/energy_guns.dm | 2 +- 10 files changed, 128 insertions(+), 102 deletions(-) diff --git a/_maps/map_files/stations/metastation.dmm b/_maps/map_files/stations/metastation.dmm index 92990c751f3..ebeb260a7ba 100644 --- a/_maps/map_files/stations/metastation.dmm +++ b/_maps/map_files/stations/metastation.dmm @@ -50666,7 +50666,6 @@ /turf/simulated/floor/plating, /area/station/service/cafeteria) "jLg" = ( -/obj/item/stock_parts/cell/crap, /obj/machinery/cell_charger, /obj/structure/table/wood, /obj/structure/window/reinforced{ @@ -50677,6 +50676,7 @@ pixel_x = 1; pixel_y = 31 }, +/obj/item/stock_parts/cell, /turf/simulated/floor/carpet, /area/station/science/robotics/showroom) "jLr" = ( diff --git a/code/game/objects/effects/spawners/random/misc_spawners.dm b/code/game/objects/effects/spawners/random/misc_spawners.dm index fbed0b38a8c..637fd9dd3ea 100644 --- a/code/game/objects/effects/spawners/random/misc_spawners.dm +++ b/code/game/objects/effects/spawners/random/misc_spawners.dm @@ -93,7 +93,48 @@ /obj/effect/spawner/random/stock_parts name = "stock parts spawner" icon_state = "stock_parts" - loot_subtype_path = /obj/item/stock_parts + loot = list( + // T1 + /obj/item/stock_parts/capacitor, + /obj/item/stock_parts/scanning_module, + /obj/item/stock_parts/manipulator, + /obj/item/stock_parts/micro_laser, + /obj/item/stock_parts/matter_bin, + + // T2 + /obj/item/stock_parts/capacitor/adv, + /obj/item/stock_parts/scanning_module/adv, + /obj/item/stock_parts/manipulator/nano, + /obj/item/stock_parts/micro_laser/high, + /obj/item/stock_parts/matter_bin/adv, + + // T3 + /obj/item/stock_parts/capacitor/super, + /obj/item/stock_parts/scanning_module/phasic, + /obj/item/stock_parts/manipulator/pico, + /obj/item/stock_parts/micro_laser/ultra, + /obj/item/stock_parts/matter_bin/super, + + // T4 + /obj/item/stock_parts/capacitor/quadratic, + /obj/item/stock_parts/scanning_module/triphasic, + /obj/item/stock_parts/manipulator/femto, + /obj/item/stock_parts/micro_laser/quadultra, + /obj/item/stock_parts/matter_bin/bluespace, + + // Power cells + /obj/item/stock_parts/cell, + /obj/item/stock_parts/cell/high, + /obj/item/stock_parts/cell/high/plus, + /obj/item/stock_parts/cell/super, + /obj/item/stock_parts/cell/hyper, + /obj/item/stock_parts/cell/bluespace, + /obj/item/stock_parts/cell/bluespace/charging, + /obj/item/stock_parts/cell/bluespace/trapped, + /obj/item/stock_parts/cell/infinite/abductor, + /obj/item/stock_parts/cell/high/slime, + /obj/item/stock_parts/cell/potato, + ) /obj/effect/spawner/random/stock_parts/Initialize(mapload) spawn_loot_count = rand(4, 7) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 4818a02f6d8..7129716d184 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -990,7 +990,7 @@ SLIME SCANNER throw_range = 10 origin_tech = "magnets=6;biotech=6" var/obj/item/stock_parts/cell/cell - var/cell_type = /obj/item/stock_parts/cell/upgraded + var/cell_type = /obj/item/stock_parts/cell/high var/ready = TRUE // Ready to scan var/printing = FALSE var/time_to_use = 0 // How much time remaining before next scan is available. @@ -1002,7 +1002,7 @@ SLIME SCANNER return cell /obj/item/bodyanalyzer/advanced - cell_type = /obj/item/stock_parts/cell/upgraded/plus + cell_type = /obj/item/stock_parts/cell/super // twice the charge! /obj/item/bodyanalyzer/borg name = "cyborg body analyzer" diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index ca06de04be1..674c17b27ab 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -69,7 +69,7 @@ access_card.access = J.get_access() LAZYADD(access_card.access, ACCESS_CARGO_BOT) prev_access = access_card.access - cell = new /obj/item/stock_parts/cell/upgraded(src) + cell = new /obj/item/stock_parts/cell/high(src) mulebot_count++ set_suffix(suffix ? suffix : "#[mulebot_count]") diff --git a/code/modules/power/apc/apc.dm b/code/modules/power/apc/apc.dm index 8423a0849d7..64601820e91 100644 --- a/code/modules/power/apc/apc.dm +++ b/code/modules/power/apc/apc.dm @@ -188,7 +188,7 @@ electronics_state = APC_ELECTRONICS_INSTALLED // is starting with a power cell installed, create it and set its charge level if(cell_type) - cell = new /obj/item/stock_parts/cell/upgraded(src) + cell = new /obj/item/stock_parts/cell(src) cell.maxcharge = cell_type // cell_type is maximum charge (old default was 1000 or 2500 (values one and two respectively) cell.charge = start_charge * cell.maxcharge / 100 // (convert percentage to actual value) diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index 89c0613752f..1c434454333 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -1,6 +1,6 @@ /obj/item/stock_parts/cell name = "power cell" - desc = "A rechargeable electrochemical power cell." + desc = "A rechargeable electrochemical power cell. This one is cheap and doesn't have very good capacity as a result." icon = 'icons/obj/power.dmi' icon_state = "cell" item_state = "cell1" @@ -11,7 +11,7 @@ /// Battery's current state of charge (kilojoules) var/charge = 0 /// Battery's maximum state of charge (kilojoules) - var/maxcharge = 1000 + var/maxcharge = 2500 /// How much energy the cell starts with (kilojoules) var/starting_charge materials = list(MAT_METAL = 700, MAT_GLASS = 50) @@ -35,7 +35,7 @@ charge = !isnull(starting_charge) ? starting_charge : maxcharge if(ratingdesc) // State of charge is in kJ so we multiply it by 1000 to get Joules - desc += " This one has a power rating of [DisplayJoules(maxcharge * 1000)], and you should not swallow it." + desc += "It can store [DisplayJoules(maxcharge * 1000)]. Doctors recommend that you do not swallow it." update_icon(UPDATE_OVERLAYS) /obj/item/stock_parts/cell/Destroy() @@ -97,7 +97,7 @@ if(rigged) . += "This power cell seems to be faulty!" else - . += "The charge meter reads [round(percent() )]%." + . += "The charge meter reads [round(percent())]%." /obj/item/stock_parts/cell/suicide_act(mob/user) to_chat(viewers(user), "[user] is licking the electrodes of [src]! It looks like [user.p_theyre()] trying to commit suicide!") @@ -171,71 +171,13 @@ else return 0 -// Cell variants +// MARK: Cell variants /obj/item/stock_parts/cell/empty starting_charge = 0 -/obj/item/stock_parts/cell/lever_gun - name = "\improper cycle charge cell" - desc = "You shouldn't be seeing this." - maxcharge = 150 - -/obj/item/stock_parts/cell/crap - name = "\improper Nanotrasen brand rechargeable AA battery" - desc = "You can't top the plasma top." //TOTALLY TRADEMARK INFRINGEMENT - maxcharge = 500 - materials = list(MAT_GLASS = 40) - rating = 2 - -/obj/item/stock_parts/cell/crap/empty - starting_charge = 0 - -/obj/item/stock_parts/cell/upgraded - name = "upgraded power cell" - desc = "A power cell with a slightly higher capacity than normal!" - maxcharge = 2500 - materials = list(MAT_GLASS = 50) - rating = 2 - chargerate = 1000 - -/obj/item/stock_parts/cell/upgraded/plus - name = "upgraded power cell+" - desc = "A power cell with an even higher capacity than the base model!" - maxcharge = 5000 - -/obj/item/stock_parts/cell/secborg - name = "security borg rechargeable D battery" - origin_tech = null - maxcharge = 600 //600 max charge / 100 charge per shot = six shots - materials = list(MAT_GLASS = 40) - rating = 2.5 - -/obj/item/stock_parts/cell/secborg/empty - starting_charge = 0 - -/obj/item/stock_parts/cell/hos_gun - name = "\improper X-01 multiphase energy gun power cell" - maxcharge = 1200 - -/// 200 pulse shots -/obj/item/stock_parts/cell/pulse - name = "pulse rifle power cell" - maxcharge = 40000 - rating = 3 - chargerate = 1500 - -/// 25 pulse shots -/obj/item/stock_parts/cell/pulse/carbine - name = "pulse carbine power cell" - maxcharge = 5000 - -/// 10 pulse shots -/obj/item/stock_parts/cell/pulse/pistol - name = "pulse pistol power cell" - maxcharge = 2000 - /obj/item/stock_parts/cell/high name = "high-capacity power cell" + desc = "A rechargeable electrochemical power cell. This one is a premium design with a good charge capacity." origin_tech = "powerstorage=2" icon_state = "hcell" maxcharge = 10000 @@ -245,7 +187,7 @@ /obj/item/stock_parts/cell/high/plus name = "high-capacity power cell+" - desc = "Where did these come from?" + desc = "A rechargeable electrochemical power cell. Where the hell did this one come from...?" icon_state = "h+cell" maxcharge = 15000 chargerate = 2250 @@ -255,6 +197,8 @@ /obj/item/stock_parts/cell/super name = "super-capacity power cell" + desc = "A rechargeable electrochemical power cell. \ + This one utilizes some experimental tweaks to the cell chemistry to achieve a better charge capacity than any cell currently available on the market." origin_tech = "powerstorage=3;materials=3" icon_state = "scell" item_state = "cell2" @@ -268,6 +212,9 @@ /obj/item/stock_parts/cell/hyper name = "hyper-capacity power cell" + desc = "A rechargeable electrochemical power cell. \ + A highly experimental and expensive exotic cell chemistry combined with tweaks to the electrolyte to allow \ + for even more tightly packed anodes and cathodes, giving this cell an incredible charge capacity." origin_tech = "powerstorage=4;engineering=4;materials=4" icon_state = "hpcell" item_state = "cell2" @@ -281,7 +228,9 @@ /obj/item/stock_parts/cell/bluespace name = "bluespace power cell" - desc = "A rechargeable transdimensional power cell." + desc = "A rechargeable electrochemical power cell. At the very forefront of power storage technology, there are few gains to be found from optimizing the cell's chemistry. \ + So the designers of this cell tried something much more conceptually simple: They took a super-capacity cell and made it twice as big. \ + They then exploited the transdimensional properties of bluespace to squeeze it down to a standard cell's form factor." origin_tech = "powerstorage=5;bluespace=4;materials=4;engineering=4" icon_state = "bscell" item_state = "cell3" @@ -295,7 +244,7 @@ /obj/item/stock_parts/cell/bluespace/charging name = "self-charging bluespace power cell" - desc = "An experimental, self-charging, transdimensional power cell." + desc = "A modified bluespace power cell that draws energy directly from bluespace." origin_tech = "powerstorage=10;bluespace=10" self_recharge = TRUE @@ -303,7 +252,8 @@ rigged = TRUE /obj/item/stock_parts/cell/infinite - name = "infinite-capacity power cell!" + name = "infinite-capacity power cell" + desc = "A self-recarging power cell. It produces endless amounts of energy seemingly out of nowhere." icon_state = "icell" item_state = "cell4" origin_tech = "powerstorage=7" @@ -311,18 +261,20 @@ materials = list(MAT_GLASS=1000) rating = 6 chargerate = 30000 + self_recharge = TRUE /obj/item/stock_parts/cell/infinite/use() return TRUE /obj/item/stock_parts/cell/infinite/abductor name = "void core" - desc = "An alien power cell that produces energy seemingly out of nowhere." + desc = "An alien power cell of unknown design. It produces endless amounts of energy seemingly out of nowhere." icon = 'icons/obj/abductor.dmi' icon_state = "cell" item_state = "cella" maxcharge = 50000 rating = 12 + chargerate = 50000 ratingdesc = FALSE /obj/item/stock_parts/cell/infinite/abductor/update_overlays() @@ -330,7 +282,7 @@ /obj/item/stock_parts/cell/potato name = "potato battery" - desc = "A rechargeable starch based power cell." + desc = "A rechargeable starch-based power cell. The charge capacity depends on the potency of the plant used to create it." icon = 'icons/obj/hydroponics/harvest.dmi' icon_state = "potato" item_state = "cellp" @@ -349,12 +301,52 @@ item_state = "cellsl" materials = list() rating = 5 //self-recharge makes these desirable - self_recharge = 1 // Infused slime cores self-recharge, over time + self_recharge = TRUE // Infused slime cores self-recharge, over time chargerate = 500 +// MARK: Internal Cells +// Special non-removable internal power cells inside stuff like guns. None of these should be obtainable. +/obj/item/stock_parts/cell/energy_gun + name = "energy gun internal power cell" + desc = "If you can see this, make an issue report to GitHub." + maxcharge = 1000 + +/obj/item/stock_parts/cell/energy_gun/hos_gun + name = "\improper X-01 multiphase energy gun internal power cell" + maxcharge = 1200 + +/obj/item/stock_parts/cell/energy_gun/lever_action + name = "lever action rifle internal power cell" + maxcharge = 150 + +/obj/item/stock_parts/cell/energy_gun/lmg + name = "cyborg LMG internal power cell" + maxcharge = 600 + +/obj/item/stock_parts/cell/energy_gun/bsg + name = "\improper B.S.G internal power cell" + maxcharge = 40000 + chargerate = 2600 // about 30 seconds to charge with a default recharger + +/// 200 pulse shots +/obj/item/stock_parts/cell/energy_gun/pulse + name = "pulse rifle internal power cell" + maxcharge = 40000 + chargerate = 1500 + +/// 25 pulse shots +/obj/item/stock_parts/cell/energy_gun/pulse/carbine + name = "pulse carbine internal power cell" + maxcharge = 5000 + +/// 10 pulse shots +/obj/item/stock_parts/cell/energy_gun/pulse/pistol + name = "pulse pistol internal power cell" + maxcharge = 2000 + /obj/item/stock_parts/cell/emproof name = "\improper EMP-proof cell" - desc = "An EMP-proof cell." + desc = "An EMP-proof cell. If you can see this, make an issue report to GitHub." maxcharge = 500 rating = 3 @@ -367,27 +359,20 @@ /obj/item/stock_parts/cell/emproof/corrupt() return +/// EMP proof so emp_act does not double dip. +/obj/item/stock_parts/cell/emproof/reactive + name = "reactive armor internal power cell" + desc = "If you can see this, make an issue report to GitHub." + maxcharge = 2400 + /obj/item/stock_parts/cell/ninja name = "spider-clan power cell" desc = "A standard ninja-suit power cell." maxcharge = 10000 - materials = list(MAT_GLASS = 60) - -/obj/item/stock_parts/cell/bsg - name = "\improper B.S.G power cell" - desc = "A high capacity, slow charging cell for the B.S.G." - maxcharge = 40000 - chargerate = 2600 // about 30 seconds to charge with a default recharger - -/// EMP proof so emp_act does not double dip. -/obj/item/stock_parts/cell/emproof/reactive - name = "reactive armor power cell" - desc = "A cell used to power reactive armors." - maxcharge = 2400 /obj/item/stock_parts/cell/flayerprod - name = "mind flayer internal cell" - desc = "you shouldn't be seeing this, contact a coder" + name = "mindflayer prod internal power cell" + desc = "If you can see this, make an issue report to GitHub." maxcharge = 4000 self_recharge = TRUE chargerate = 200 //This self charges it 50 power per tick at the base level diff --git a/code/modules/projectiles/guns/energy/energy.dm b/code/modules/projectiles/guns/energy/energy.dm index ba1acdd94e8..08a04b780e6 100644 --- a/code/modules/projectiles/guns/energy/energy.dm +++ b/code/modules/projectiles/guns/energy/energy.dm @@ -91,7 +91,7 @@ /obj/item/gun/energy/gun/hos name = "\improper X-01 MultiPhase Energy Gun" desc = "This is an expensive, modern recreation of an antique laser gun. The fire selector has three settings: 'disable', 'ion', 'kill'. Unfortunately, it has lost the ability to recharge over time." - cell_type = /obj/item/stock_parts/cell/hos_gun + cell_type = /obj/item/stock_parts/cell/energy_gun/hos_gun icon_state = "hoslaser" origin_tech = null force = 10 @@ -126,7 +126,7 @@ /obj/item/gun/energy/gun/blueshield name = "\improper EG-14 advanced energy revolver" desc = "An advanced, pistol sized energy gun. It looks stylish, and the design makes it slightly better at bludgeoning. The fire selector has two settings: 'disable', and 'kill'." - cell_type = /obj/item/stock_parts/cell/hos_gun + cell_type = /obj/item/stock_parts/cell/energy_gun/hos_gun icon_state = "bsgun" item_state = null force = 7 diff --git a/code/modules/projectiles/guns/energy/pulse.dm b/code/modules/projectiles/guns/energy/pulse.dm index 130dc2650ad..98a5cded6a0 100644 --- a/code/modules/projectiles/guns/energy/pulse.dm +++ b/code/modules/projectiles/guns/energy/pulse.dm @@ -20,7 +20,7 @@ modifystate = TRUE slot_flags = ITEM_SLOT_BACK ammo_type = list(/obj/item/ammo_casing/energy/laser/pulse, /obj/item/ammo_casing/energy/electrode, /obj/item/ammo_casing/energy/laser) - cell_type = /obj/item/stock_parts/cell/pulse + cell_type = /obj/item/stock_parts/cell/energy_gun/pulse execution_speed = 2 SECONDS /obj/item/gun/energy/pulse/examine_more(mob/user) @@ -58,7 +58,7 @@ slot_flags = ITEM_SLOT_BELT icon_state = "pulse_carbine" item_state = null - cell_type = /obj/item/stock_parts/cell/pulse/carbine + cell_type = /obj/item/stock_parts/cell/energy_gun/pulse/carbine can_flashlight = TRUE flight_x_offset = 18 flight_y_offset = 12 @@ -83,7 +83,7 @@ icon_state = "pulse_pistol" item_state = null can_holster = TRUE - cell_type = /obj/item/stock_parts/cell/pulse/pistol + cell_type = /obj/item/stock_parts/cell/energy_gun/pulse/pistol can_charge = FALSE /obj/item/gun/energy/pulse/pistol/examine(mob/user) diff --git a/code/modules/projectiles/guns/energy/special_eguns.dm b/code/modules/projectiles/guns/energy/special_eguns.dm index 2824a8aa6b5..3be04b196d4 100644 --- a/code/modules/projectiles/guns/energy/special_eguns.dm +++ b/code/modules/projectiles/guns/energy/special_eguns.dm @@ -379,7 +379,7 @@ desc = "A machine gun that fires 3D-printed flachettes slowly synthesized using your internal energy cell." icon_state = "l6closed0" icon = 'icons/obj/guns/projectile.dmi' - cell_type = /obj/item/stock_parts/cell/secborg + cell_type = /obj/item/stock_parts/cell/energy_gun/lmg ammo_type = list(/obj/item/ammo_casing/energy/c3dbullet) can_charge = FALSE @@ -625,7 +625,7 @@ weapon_weight = WEAPON_HEAVY w_class = WEIGHT_CLASS_BULKY slot_flags = ITEM_SLOT_BACK - cell_type = /obj/item/stock_parts/cell/bsg + cell_type = /obj/item/stock_parts/cell/energy_gun/bsg shaded_charge = TRUE can_fit_in_turrets = FALSE //Crystal would shatter, or someone would try to put an empty gun in the frame. var/obj/item/assembly/signaler/anomaly/flux/core = null @@ -1209,7 +1209,7 @@ /obj/item/gun/energy/laser/lever_action name = "model 2495" desc = "A rifle styled after an ancient Earth design. Concealed beneath the wooden furniture and forged metal is a modern laser gun. Features a hand-powered charger that can be used anywhere." - cell_type = /obj/item/stock_parts/cell/lever_gun + cell_type = /obj/item/stock_parts/cell/energy_gun/lever_action icon_state = "lever_action" item_state = "lever_action" fire_sound = 'sound/weapons/gunshots/gunshot_lascarbine.ogg' diff --git a/code/modules/projectiles/guns/energy_guns.dm b/code/modules/projectiles/guns/energy_guns.dm index ae26bb95f69..28310e68eaf 100644 --- a/code/modules/projectiles/guns/energy_guns.dm +++ b/code/modules/projectiles/guns/energy_guns.dm @@ -8,7 +8,7 @@ /// What type of power cell this uses var/obj/item/stock_parts/cell/cell /// The specific type of power cell this gun has. - var/cell_type = /obj/item/stock_parts/cell + var/cell_type = /obj/item/stock_parts/cell/energy_gun var/modifystate = 0 /// What projectiles can this gun shoot? var/list/ammo_type = list(/obj/item/ammo_casing/energy)