mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 01:34:01 +00:00
Makes energy gun cells bomb proof. Makes the cells of indestructible energy guns also indestructible. (#91284)
## About The Pull Request The cell contained within energy guns can sometimes be destroyed due to...reasons. This makes it so that the cell is bombproof, and if the gun is indestructible, also indestructible for good measure. ## Why It's Good For The Game This is basically a constant problem that doesn't seem to ever go away due to the fact that the cell is an actual physical object and not an abstraction. While it remains an actual object, lets just...make it not break and brick an important item, yeah? ## Changelog 🆑 fix: If an energy weapon is indestructible, so is the cell within the weapon. fix: Cells inside of energy guns are bomb proof so as to not brick a gun that somehow survives being bombed. /🆑
This commit is contained in:
@@ -222,6 +222,8 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
|
||||
#define FREEZE_PROOF (1<<7)
|
||||
/// can't be shuttle crushed.
|
||||
#define SHUTTLE_CRUSH_PROOF (1<<8)
|
||||
/// can't be destroyed by bombs
|
||||
#define BOMB_PROOF (1<<9)
|
||||
|
||||
//tesla_zap
|
||||
#define ZAP_MACHINE_EXPLOSIVE (1<<0)
|
||||
|
||||
@@ -352,7 +352,8 @@ DEFINE_BITFIELD(resistance_flags, list(
|
||||
"ACID_PROOF" = ACID_PROOF,
|
||||
"INDESTRUCTIBLE" = INDESTRUCTIBLE,
|
||||
"FREEZE_PROOF" = FREEZE_PROOF,
|
||||
"SHUTTLE_CRUSH_PROOF" = SHUTTLE_CRUSH_PROOF
|
||||
"SHUTTLE_CRUSH_PROOF" = SHUTTLE_CRUSH_PROOF,
|
||||
"BOMB_PROOF" = BOMB_PROOF,
|
||||
))
|
||||
|
||||
DEFINE_BITFIELD(sight, list(
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
take_damage(damage_taken, BRUTE, MELEE, 1, get_dir(src, hit_by))
|
||||
|
||||
/obj/ex_act(severity, target)
|
||||
if(resistance_flags & INDESTRUCTIBLE)
|
||||
if(resistance_flags & (INDESTRUCTIBLE|BOMB_PROOF))
|
||||
return FALSE
|
||||
|
||||
. = ..() //contents explosion
|
||||
|
||||
@@ -93,6 +93,9 @@
|
||||
cell = new(src)
|
||||
if(!dead_cell)
|
||||
cell.give(cell.maxcharge)
|
||||
if(cell && resistance_flags & INDESTRUCTIBLE)
|
||||
cell.resistance_flags |= INDESTRUCTIBLE
|
||||
cell.resistance_flags |= BOMB_PROOF
|
||||
update_ammo_types()
|
||||
recharge_newshot(TRUE)
|
||||
if(selfcharge)
|
||||
|
||||
Reference in New Issue
Block a user