mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 17:52:36 +00:00
## About The Pull Request <details> - renamed ai folder to announcer -- announcer -- - moved vox_fem to announcer - moved approachingTG to announcer - separated the ambience folder into ambience and instrumental -- ambience -- - created holy folder moved all related sounds there - created engineering folder and moved all related sounds there - created security folder and moved ambidet there - created general folder and moved ambigen there - created icemoon folder and moved all icebox-related ambience there - created medical folder and moved all medbay-related ambi there - created ruin folder and moves all ruins ambi there - created beach folder and moved seag and shore there - created lavaland folder and moved related ambi there - created aurora_caelus folder and placed its ambi there - created misc folder and moved the rest of the files that don't have a specific category into it -- instrumental -- - moved traitor folder here - created lobby_music folder and placed our songs there (title0 not used anywhere? - server-side modification?) -- items -- - moved secdeath to hailer - moved surgery to handling -- effects -- - moved chemistry into effects - moved hallucinations into effects - moved health into effects - moved magic into effects -- vehicles -- - moved mecha into vehicles created mobs folder -- mobs -- - moved creatures folder into mobs - moved voice into mobs renamed creatures to non-humanoids renamed voice to humanoids -- non-humanoids-- created cyborg folder created hiss folder moved harmalarm.ogg to cyborg -- humanoids -- -- misc -- moved ghostwhisper to misc moved insane_low_laugh to misc I give up trying to document this. </details> - [X] ambience - [x] announcer - [x] effects - [X] instrumental - [x] items - [x] machines - [x] misc - [X] mobs - [X] runtime - [X] vehicles - [ ] attributions ## Why It's Good For The Game This folder is so disorganized that it's vomit inducing, will make it easier to find and add new sounds, providng a minor structure to the sound folder. ## Changelog 🆑 grungussuss refactor: the sound folder in the source code has been reorganized, please report any oddities with sounds playing or not playing server: lobby music has been repathed to sound/music/lobby_music /🆑
88 lines
2.8 KiB
Plaintext
88 lines
2.8 KiB
Plaintext
/**
|
|
* # Circuit Gun
|
|
*
|
|
* A gun that lets you fire projectiles to enact circuitry.
|
|
*/
|
|
/obj/item/gun/energy/wiremod_gun
|
|
name = "circuit gun"
|
|
desc = "A gun that fires projectiles able to control circuitry. It can recharge using power from an attached circuit."
|
|
icon = 'icons/obj/science/circuits.dmi'
|
|
icon_state = "setup_gun"
|
|
ammo_type = list(/obj/item/ammo_casing/energy/wiremod_gun)
|
|
cell_type = /obj/item/stock_parts/power_store/cell/emproof/wiremod_gun
|
|
item_flags = NONE
|
|
light_system = OVERLAY_LIGHT_DIRECTIONAL
|
|
light_on = FALSE
|
|
automatic_charge_overlays = FALSE
|
|
trigger_guard = TRIGGER_GUARD_ALLOW_ALL
|
|
gun_flags = NOT_A_REAL_GUN
|
|
|
|
/obj/item/ammo_casing/energy/wiremod_gun
|
|
projectile_type = /obj/projectile/energy/wiremod_gun
|
|
harmful = FALSE
|
|
select_name = "circuit"
|
|
fire_sound = 'sound/items/weapons/blaster.ogg'
|
|
|
|
/obj/projectile/energy/wiremod_gun
|
|
name = "scanning beam"
|
|
icon_state = "energy"
|
|
damage = 0
|
|
range = 7
|
|
|
|
/obj/item/stock_parts/power_store/cell/emproof/wiremod_gun
|
|
maxcharge = 0.1 * STANDARD_CELL_CHARGE
|
|
|
|
/obj/item/gun/energy/wiremod_gun/Initialize(mapload)
|
|
. = ..()
|
|
AddComponent(/datum/component/shell, list(
|
|
new /obj/item/circuit_component/wiremod_gun()
|
|
), SHELL_CAPACITY_MEDIUM)
|
|
|
|
/obj/item/circuit_component/wiremod_gun
|
|
display_name = "Gun"
|
|
desc = "Used to receive entities hit by projectiles from a gun."
|
|
/// Called when a projectile hits
|
|
var/datum/port/output/signal
|
|
/// The shooter
|
|
var/datum/port/output/shooter
|
|
/// The entity being shot
|
|
var/datum/port/output/shot
|
|
|
|
/obj/item/circuit_component/wiremod_gun/Initialize(mapload)
|
|
. = ..()
|
|
shooter = add_output_port("Shooter", PORT_TYPE_ATOM)
|
|
shot = add_output_port("Shot Entity", PORT_TYPE_ATOM)
|
|
signal = add_output_port("Shot", PORT_TYPE_SIGNAL)
|
|
|
|
/obj/item/circuit_component/wiremod_gun/register_shell(atom/movable/shell)
|
|
RegisterSignal(shell, COMSIG_PROJECTILE_ON_HIT, PROC_REF(handle_shot))
|
|
if(istype(shell, /obj/item/gun/energy))
|
|
RegisterSignal(shell, COMSIG_GUN_CHAMBER_PROCESSED, PROC_REF(handle_chamber))
|
|
|
|
/obj/item/circuit_component/wiremod_gun/unregister_shell(atom/movable/shell)
|
|
UnregisterSignal(shell, list(COMSIG_PROJECTILE_ON_HIT, COMSIG_GUN_CHAMBER_PROCESSED))
|
|
|
|
/**
|
|
* Called when the shell item shoots something
|
|
*/
|
|
/obj/item/circuit_component/wiremod_gun/proc/handle_shot(atom/source, mob/firer, atom/target, angle)
|
|
SIGNAL_HANDLER
|
|
|
|
playsound(source, SFX_TERMINAL_TYPE, 25, FALSE)
|
|
shooter.set_output(firer)
|
|
shot.set_output(target)
|
|
signal.set_output(COMPONENT_SIGNAL)
|
|
|
|
/**
|
|
* Called when the shell item processes a new chamber
|
|
*/
|
|
/obj/item/circuit_component/wiremod_gun/proc/handle_chamber(atom/source)
|
|
SIGNAL_HANDLER
|
|
|
|
if(!parent?.cell)
|
|
return
|
|
var/obj/item/gun/energy/fired_gun = source
|
|
var/transferred = fired_gun.cell.give(min(0.1 * STANDARD_CELL_CHARGE, parent.cell.charge))
|
|
if(transferred)
|
|
parent.cell.use(transferred, force = TRUE)
|