mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
Emitter: The Emitting (#92327)
## About The Pull Request Adds Diode Disks, installable disks that when fitted into an emitter can change its function. * Healing * Stamina damage, and heals the SM slightly at the cost of internal energy * Traitor engi only explosive that damages and supercharges the SM if used that way. Firerate is halved. * Incendiary that slightly damages the SM but has lots of energy * Sanity damaging one that improves SM psi coeff * Magnetic item attracting one that improves SM mol absorption. ## Why It's Good For The Game Fun and unique ways for Engi to use excess power or improve their SM setups. Could also lead to neat engi inventions such as, say, a circuit device that aims and fires a healing emitter at anyone nearby who is damaged. Should also incentivize the researching of useful techs, hence why important medium tier techs are what lock the different disks. ## Changelog 🆑 add: New Diode Disks which allow you to configurate emitters with special functions. add: New Engi & CE exclusive traitor item, a diode disk that causes an emitter to create low radius explosions when it hits things. Note that this will reduce the fire-rate of your emitter. /🆑 --------- Co-authored-by: ThrowawayUseless <notarealemail@emailservice.fake> Co-authored-by: necromanceranne <40847847+necromanceranne@users.noreply.github.com>
This commit is contained in:
committed by
nevimer
co-authored by
ThrowawayUseless
necromanceranne
parent
cacc639fbd
commit
6bc67d2bc6
@@ -27,6 +27,10 @@
|
||||
var/maximum_fire_delay = 10 SECONDS
|
||||
///Min delay before firing
|
||||
var/minimum_fire_delay = 2 SECONDS
|
||||
///Modifier to the preceeding two numbers
|
||||
var/fire_rate_mod = 1
|
||||
///Deactivates the "pause every 3 shots" system
|
||||
var/no_shot_counter = FALSE
|
||||
///When was the last shot
|
||||
var/last_shot = 0
|
||||
///Number of shots made (gets reset every few shots)
|
||||
@@ -57,6 +61,8 @@
|
||||
var/charge = 0
|
||||
///stores the direction and orientation of the last projectile
|
||||
var/last_projectile_params
|
||||
//the disk in the gun
|
||||
var/obj/item/emitter_disk/diskie
|
||||
|
||||
/obj/machinery/power/emitter/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -125,7 +131,7 @@
|
||||
else if(!powered)
|
||||
. += span_notice("Its status display is glowing faintly.")
|
||||
else
|
||||
. += span_notice("Its status display reads: Emitting one beam between <b>[DisplayTimeText(minimum_fire_delay)]</b> and <b>[DisplayTimeText(maximum_fire_delay)]</b>.")
|
||||
. += span_notice("Its status display reads: Emitting one beam between <b>[DisplayTimeText(minimum_fire_delay * fire_rate_mod)]</b> and <b>[DisplayTimeText(maximum_fire_delay * fire_rate_mod)]</b>.")
|
||||
. += span_notice("Power consumption at <b>[display_power(active_power_usage, convert = FALSE)]</b>.")
|
||||
|
||||
/obj/machinery/power/emitter/should_have_node()
|
||||
@@ -246,11 +252,11 @@
|
||||
projectile.fire(dir2angle(dir))
|
||||
if(!manual)
|
||||
last_shot = world.time
|
||||
if(shot_number < 3)
|
||||
fire_delay = 20
|
||||
if(shot_number < 3 || no_shot_counter)
|
||||
fire_delay = 20 * fire_rate_mod
|
||||
shot_number ++
|
||||
else
|
||||
fire_delay = rand(minimum_fire_delay,maximum_fire_delay)
|
||||
fire_delay = rand(minimum_fire_delay,maximum_fire_delay) * fire_rate_mod
|
||||
shot_number = 0
|
||||
return projectile
|
||||
|
||||
@@ -311,6 +317,8 @@
|
||||
/obj/machinery/power/emitter/crowbar_act(mob/living/user, obj/item/item)
|
||||
if(panel_open && gun)
|
||||
return remove_gun(user)
|
||||
if(panel_open && diskie)
|
||||
return remove_disk(user)
|
||||
default_deconstruction_crowbar(item)
|
||||
return TRUE
|
||||
|
||||
@@ -343,8 +351,30 @@
|
||||
wires.interact(user)
|
||||
return
|
||||
if(panel_open && !gun && istype(item,/obj/item/gun/energy))
|
||||
if(diskie)
|
||||
to_chat(user, span_warning("Remove the Diode Disk before inserting a gun."))
|
||||
return
|
||||
if(integrate(item,user))
|
||||
return
|
||||
if(panel_open && !gun && istype(item,/obj/item/emitter_disk))
|
||||
var/obj/item/emitter_disk/config_disk = item
|
||||
if(!user.transferItemToLoc(config_disk, src))
|
||||
balloon_alert(user, "stuck in hand!")
|
||||
return
|
||||
if(diskie)
|
||||
user.put_in_hands(diskie)
|
||||
balloon_alert(user, "disks swapped!")
|
||||
else
|
||||
balloon_alert(user, "disk inserted")
|
||||
diskie = config_disk
|
||||
projectile_type = diskie.stored_proj
|
||||
projectile_sound = diskie.stored_sound
|
||||
fire_rate_mod = diskie.fire_rate_mod
|
||||
no_shot_counter = diskie.no_shot_counter
|
||||
playsound(src, 'sound/machines/card_slide.ogg', 50)
|
||||
to_chat(user, span_notice("You update the [src]'s diode configuration with the [config_disk]."))
|
||||
if(diskie.consumable)
|
||||
qdel(diskie)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -373,6 +403,19 @@
|
||||
set_projectile()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/power/emitter/proc/remove_disk(mob/user)
|
||||
if(!diskie)
|
||||
return
|
||||
if(diskie.consumed_on_removal)
|
||||
qdel(diskie)
|
||||
else
|
||||
user.put_in_hands(diskie)
|
||||
diskie = null
|
||||
playsound(src, 'sound/machines/card_slide.ogg', 50, TRUE)
|
||||
set_projectile()
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/machinery/power/emitter/proc/set_projectile()
|
||||
if(LAZYLEN(gun_properties))
|
||||
if(mode || !gun_properties["lethal_projectile"])
|
||||
@@ -384,6 +427,8 @@
|
||||
return
|
||||
projectile_type = initial(projectile_type)
|
||||
projectile_sound = initial(projectile_sound)
|
||||
fire_rate_mod = initial(fire_rate_mod)
|
||||
no_shot_counter = initial(no_shot_counter)
|
||||
|
||||
/obj/machinery/power/emitter/emag_act(mob/user, obj/item/card/emag/emag_card)
|
||||
if(obj_flags & EMAGGED)
|
||||
@@ -569,3 +614,58 @@
|
||||
req_access = list("science")
|
||||
welded = TRUE
|
||||
use_power = NO_POWER_USE
|
||||
|
||||
/obj/item/emitter_disk
|
||||
name = "/improper Diode Disk: Debugger"
|
||||
desc = "This disk can be used on an emitter with an open panel to reset its projectile. Unless this was handed to you by an admin, you should report this on github."
|
||||
icon = 'icons/obj/devices/circuitry_n_data.dmi'
|
||||
icon_state = "datadisk6"
|
||||
var/stored_proj = /obj/projectile/beam/emitter/hitscan
|
||||
var/stored_sound = 'sound/items/weapons/emitter.ogg'
|
||||
var/consumed_on_removal = TRUE
|
||||
var/consumable = TRUE
|
||||
var/fire_rate_mod = 1
|
||||
var/no_shot_counter = FALSE
|
||||
|
||||
/obj/item/emitter_disk/stamina
|
||||
name = "/improper Diode Disk: Electrodisruptive"
|
||||
desc = "This disk can be used on an emitter with an open panel to make it shoot lasers which will increase the integrity of supermatter crystals and exhaust living creatures. The disk will be consumed in the process."
|
||||
stored_proj = /obj/projectile/beam/emitter/hitscan/bluelens
|
||||
consumed_on_removal = FALSE
|
||||
consumable = FALSE
|
||||
|
||||
/obj/item/emitter_disk/healing
|
||||
name = "/improper Diode Disk: Bioregenerative"
|
||||
desc = "This disk can be installed into an emitter with an open panel to make it shoot lasers which will heal the physical damages of living creatures."
|
||||
stored_proj = /obj/projectile/beam/emitter/hitscan/bioregen
|
||||
consumed_on_removal = FALSE
|
||||
consumable = FALSE
|
||||
|
||||
/obj/item/emitter_disk/incendiary
|
||||
name = "/improper Diode Disk: Conflagratory"
|
||||
desc = "This disk can be used on an emitter with an open panel to make it shoot lasers which will set living creatures ablaze."
|
||||
stored_proj = /obj/projectile/beam/emitter/hitscan/incend
|
||||
consumed_on_removal = FALSE
|
||||
consumable = FALSE
|
||||
|
||||
/obj/item/emitter_disk/sanity
|
||||
name = "/improper Diode Disk: Psychosiphoning"
|
||||
desc = "This disk can be used on an emitter with an open panel to make it shoot lasers which will depress living creatures and calm supermatter crystals."
|
||||
stored_proj = /obj/projectile/beam/emitter/hitscan/psy
|
||||
consumed_on_removal = FALSE
|
||||
consumable = FALSE
|
||||
|
||||
/obj/item/emitter_disk/magnetic
|
||||
name = "/improper Diode Disk: Magnetogenerative"
|
||||
desc = "This disk can be used on an emitter with an open panel to make it shoot lasers which will attract nearby objects."
|
||||
stored_proj = /obj/projectile/beam/emitter/hitscan/magnetic
|
||||
consumed_on_removal = FALSE
|
||||
consumable = FALSE
|
||||
|
||||
/obj/item/emitter_disk/blast
|
||||
name = "/improper Diode Disk: Hyperconcussive"
|
||||
desc = "This disk, loaded with proprietary syndicate firmware, can be used on an emitter with an open panel to make it shoot beams of concussive force which will cause small explosions."
|
||||
stored_proj = /obj/projectile/beam/emitter/hitscan/blast
|
||||
consumed_on_removal = FALSE
|
||||
consumable = FALSE
|
||||
fire_rate_mod = 2
|
||||
|
||||
Reference in New Issue
Block a user