mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 07:08:00 +01:00
[MIRROR] adds a gun circuit shell (#7934)
* adds a gun circuit shell (#61156) adds the circuit gun shell, every projectile it hits with outputs the shot mob, everytime its shot charge from an attached circuit is transferred to it, it deals no damage increases the range of the to string circuit to 7 tiles from 5, now should get everything in view range * adds a gun circuit shell * Update gun.dm Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com> Co-authored-by: Gandalf <jzo123@hotmail.com>
This commit is contained in:
co-authored by
Fikou
Gandalf
parent
bd116f2e38
commit
ebbd5fae19
@@ -152,8 +152,12 @@
|
||||
zoom(user, user.dir, FALSE) //we can only stay zoomed in if it's in our hands //yeah and we only unzoom if we're actually zoomed using the gun!!
|
||||
|
||||
//called after the gun has successfully fired its chambered ammo.
|
||||
/obj/item/gun/proc/process_chamber()
|
||||
return FALSE
|
||||
/obj/item/gun/proc/process_chamber(empty_chamber = TRUE, from_firing = TRUE, chamber_next_round = TRUE)
|
||||
handle_chamber(empty_chamber, from_firing, chamber_next_round)
|
||||
SEND_SIGNAL(src, COMSIG_GUN_CHAMBER_PROCESSED)
|
||||
|
||||
/obj/item/gun/proc/handle_chamber(empty_chamber = TRUE, from_firing = TRUE, chamber_next_round = TRUE)
|
||||
return
|
||||
|
||||
//check if there's enough ammo/energy/whatever to shoot one time
|
||||
//i.e if clicking would make it shoot
|
||||
|
||||
@@ -210,7 +210,7 @@
|
||||
. += "[icon_state]_mag_[capacity_number]"
|
||||
|
||||
|
||||
/obj/item/gun/ballistic/process_chamber(empty_chamber = TRUE, from_firing = TRUE, chamber_next_round = TRUE)
|
||||
/obj/item/gun/ballistic/handle_chamber(empty_chamber = TRUE, from_firing = TRUE, chamber_next_round = TRUE)
|
||||
if(!semi_auto && from_firing)
|
||||
return
|
||||
var/obj/item/ammo_casing/AC = chambered //Find chambered round
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
can_be_sawn_off = FALSE
|
||||
projectile_damage_multiplier = 0.75
|
||||
|
||||
/obj/item/gun/ballistic/rifle/boltaction/pipegun/process_chamber(empty_chamber, from_firing, chamber_next_round)
|
||||
/obj/item/gun/ballistic/rifle/boltaction/pipegun/handle_chamber()
|
||||
. = ..()
|
||||
do_sparks(1, TRUE, src)
|
||||
|
||||
|
||||
@@ -46,8 +46,8 @@
|
||||
pb_knockback = 0
|
||||
gun_flags = TOY_FIREARM_OVERLAY
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/toy/process_chamber(empty_chamber = 0)
|
||||
..()
|
||||
/obj/item/gun/ballistic/shotgun/toy/handle_chamber()
|
||||
. = ..()
|
||||
if(chambered && !chambered.loaded_projectile)
|
||||
qdel(chambered)
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
if(!chambered.loaded_projectile)
|
||||
chambered.newshot()
|
||||
|
||||
/obj/item/gun/energy/process_chamber()
|
||||
/obj/item/gun/energy/handle_chamber()
|
||||
if(chambered && !chambered.loaded_projectile) //if loaded_projectile is null, i.e the shot has been fired...
|
||||
var/obj/item/ammo_casing/energy/shot = chambered
|
||||
cell.use(shot.e_cost)//... drain the cell cell
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
if (charges && chambered && !chambered.loaded_projectile)
|
||||
chambered.newshot()
|
||||
|
||||
/obj/item/gun/magic/process_chamber()
|
||||
/obj/item/gun/magic/handle_chamber()
|
||||
if(chambered && !chambered.loaded_projectile) //if BB is null, i.e the shot has been fired...
|
||||
charges--//... drain a charge
|
||||
recharge_newshot()
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
/obj/item/gun/chem/can_shoot()
|
||||
return syringes_left
|
||||
|
||||
/obj/item/gun/chem/process_chamber()
|
||||
/obj/item/gun/chem/handle_chamber()
|
||||
if(chambered && !chambered.loaded_projectile && syringes_left)
|
||||
chambered.newshot()
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
/obj/item/gun/syringe/can_shoot()
|
||||
return syringes.len
|
||||
|
||||
/obj/item/gun/syringe/process_chamber()
|
||||
/obj/item/gun/syringe/handle_chamber()
|
||||
if(chambered && !chambered.loaded_projectile) //we just fired
|
||||
recharge_newshot()
|
||||
update_appearance()
|
||||
|
||||
Reference in New Issue
Block a user