Skip to content

Commit

Permalink
clarity of spawning with no ammo.
Browse files Browse the repository at this point in the history
  • Loading branch information
FalloutFalcon committed Sep 25, 2024
1 parent 836139b commit 2d53e6d
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@

//ENERGY
//set to true so the gun is given an empty cell
var/dead_cell = FALSE
var/spawn_no_ammo = FALSE

// Need to sort
///trigger guard on the weapon. Used for hulk mutations and ashies. I honestly dont know how usefult his is, id avoid touching it
Expand Down
5 changes: 3 additions & 2 deletions code/modules/projectiles/guns/ballistic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
return
if (!magazine && default_ammo_type)
magazine = new default_ammo_type(src)
if (!default_ammo_type)
if (spawn_no_ammo)
get_ammo_list (drop_all = TRUE)
chamber_round()
update_appearance()
Expand Down Expand Up @@ -332,7 +332,8 @@
rounds.Add(chambered)
if(drop_all)
chambered = null
rounds.Add(magazine.ammo_list(drop_all))
if(magazine)
rounds.Add(magazine.ammo_list(drop_all))
return rounds

GLOBAL_LIST_INIT(gun_saw_types, typecacheof(list(
Expand Down
2 changes: 1 addition & 1 deletion code/modules/projectiles/guns/energy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
. = ..()
if(default_ammo_type)
cell = new default_ammo_type(src)
if(dead_cell)
if(spawn_no_ammo)
cell.use(cell.maxcharge)
update_ammo_types()
recharge_newshot(TRUE)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/projectiles/guns/energy/energy_gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
manufacturer = MANUFACTURER_SHARPLITE_NEW

/obj/item/gun/energy/e_gun/empty_cell
dead_cell = TRUE
spawn_no_ammo = TRUE

/obj/item/gun/energy/e_gun/mini
name = "miniature energy gun"
Expand All @@ -36,7 +36,7 @@
spread_unwielded = 5

/obj/item/gun/energy/e_gun/mini/empty_cell
dead_cell = TRUE
spawn_no_ammo = TRUE

/obj/item/gun/energy/e_gun/hades
name = "SL AL-655 'Hades' energy rifle"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/projectiles/guns/energy/laser.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
spread_unwielded = 10

/obj/item/gun/energy/laser/empty_cell
dead_cell = TRUE
spawn_no_ammo = TRUE

/obj/item/gun/energy/laser/practice
name = "practice laser gun"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/projectiles/guns/energy/special.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
return

/obj/item/gun/energy/ionrifle/empty_cell
dead_cell = TRUE
spawn_no_ammo = TRUE

/obj/item/gun/energy/ionrifle/carbine
name = "ion carbine"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
armour_penetration = -10

/obj/item/gun/energy/kalix/empty_cell
dead_cell = TRUE
spawn_no_ammo = TRUE

/obj/item/gun/energy/kalix/pgf
name = "Etherbor BG-16"
Expand Down Expand Up @@ -107,7 +107,7 @@
delay = 0

/obj/item/gun/energy/kalix/pistol/empty_cell
dead_cell = TRUE
spawn_no_ammo = TRUE

/obj/item/gun/energy/kalix/pgf/heavy
name = "Etherbor HBG-7"
Expand Down

0 comments on commit 2d53e6d

Please sign in to comment.