mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-24 17:22:23 +00:00
* CI change * world.dm * .dme world.dm * subsystem renaming * .dme for subsystems * ai_laws.dm * armor.dm * emote.dm * logging.dm * spell.dm * air_alarm.dm * crew.dm * decal.dm * emissive_blocker.dm * footstep.dm * spawner.dm * fire.dm * carbon.dm * living.dm * mob.dm * movement.dm * thermal_drill.dm * plasmamen.dm * lavaland.dm * chaplain.dm * lightning.dm * magnet.dm * mimic.dm * wizard.dm * morph.dm * vampire.dm * click.dm * self.dm * radiation_storm.dm * airlock.dm * autolathe.dm * mulebot.dm * nuclearbomb.dm * particle_accelerator.dm * smartfridge.dm * syndicatebomb.dm * vending.dm * wires.dm * sound.dm * mining.dm * syndicate_space_base.dm * monkey.dm * guardian.dm * bomb.dm * standard.dm * nuclear.dm * pinpointer.dm * access.dm * departments.dm * job.dm * science.dm * buttons.dm * cloning.dm * igniter.dm * wishgranter.dm * atmos_control.dm * message.dm * power_monitor.dm * mecha.dm * combat.dm * mining_tools.dm * meteors.dm * spiders.dm * contraband.dm * aliens.dm * uplinks.dm * voice.dm * intercom.dm * lights.dm * robot_items.dm * mineral.dm * dice.dm * extinguisher.dm * paint.dm * signs.dm * staff.dm * smokebomb.dm * boxes.dm * random.dm * janicart.dm * statue.dm * cargo.dm * asteroid.dm * headslug.dm * fulton.dm * atmospherics.dm * pump.dm * corpse.dm * oldstation.dm * gps.dm * preferences.dm * clothing.dm * ears.dm * glasses.dm * boxing.dm * color.dm * renames ninja gear files * recipes.dm * error_handler.dm * anomaly.dm * floorcluwne.dm * undead.dm * overmind.dm * shield.dm * bottle.dm * organ.dm * piano.dm * plasma_fist.dm * language.dm * mob_defines.dm * mob_helpers.dm * damage_procs.dm * _defines.dm * empress.dm and queen.dm * brain.dm * organ file renaming * subsystems.dm * constructs.dm * bot.dm * pet.dm * nature.dm * magic.dm * colors.dm * drugs.dm * medicine.dm * toxins.dm * shuttle.dm * surgery.dm * moves a bunch of define files * traits.dm * names.dm * other_mobs.dm * flags.dm * some final define files * well turns out contractor_pinpointer.dm was taken * I forgot to remove this file * how in the hell did this get unticked * I DID INCLUDE IT, but there was a "w" there * swaps the world definitions * camera renamed to SScamera * examine -> alien_examine
107 lines
2.9 KiB
Plaintext
107 lines
2.9 KiB
Plaintext
SUBSYSTEM_DEF(radio)
|
|
name = "Radio"
|
|
flags = SS_NO_FIRE
|
|
|
|
var/list/radiochannels = list(
|
|
"Common" = PUB_FREQ,
|
|
"Science" = SCI_FREQ,
|
|
"Command" = COMM_FREQ,
|
|
"Procedure" = PROC_FREQ,
|
|
"Medical" = MED_FREQ,
|
|
"Engineering" = ENG_FREQ,
|
|
"Security" = SEC_FREQ,
|
|
"Response Team" = ERT_FREQ,
|
|
"Special Ops" = DTH_FREQ,
|
|
"Syndicate" = SYND_FREQ,
|
|
"SyndTeam" = SYNDTEAM_FREQ,
|
|
"Supply" = SUP_FREQ,
|
|
"Service" = SRV_FREQ,
|
|
"AI Private" = AI_FREQ,
|
|
"Medical(I)" = MED_I_FREQ,
|
|
"Security(I)" = SEC_I_FREQ
|
|
)
|
|
var/list/CENT_FREQS = list(ERT_FREQ, DTH_FREQ)
|
|
var/list/ANTAG_FREQS = list(SYND_FREQ, SYNDTEAM_FREQ)
|
|
var/list/DEPT_FREQS = list(AI_FREQ, COMM_FREQ, ENG_FREQ, MED_FREQ, SEC_FREQ, SCI_FREQ, SRV_FREQ, SUP_FREQ, PROC_FREQ)
|
|
var/list/datum/radio_frequency/frequencies = list()
|
|
|
|
// This is a disgusting hack to stop this tripping CI when this thing needs to FUCKING DIE
|
|
/datum/controller/subsystem/radio/Initialize()
|
|
return
|
|
|
|
// This is fucking disgusting and needs to die
|
|
/datum/controller/subsystem/radio/proc/frequency_span_class(frequency)
|
|
// Antags!
|
|
if(frequency in ANTAG_FREQS)
|
|
return "syndradio"
|
|
// centcomm channels (deathsquid and ert)
|
|
if(frequency in CENT_FREQS)
|
|
return "centradio"
|
|
// This switch used to be a shit tonne of if statements. I am gonna find who made this and give them a kind talking to
|
|
switch(frequency)
|
|
if(COMM_FREQ)
|
|
return "comradio"
|
|
if(AI_FREQ)
|
|
return "airadio"
|
|
if(SEC_FREQ)
|
|
return "secradio"
|
|
if(ENG_FREQ)
|
|
return "engradio"
|
|
if(SCI_FREQ)
|
|
return "sciradio"
|
|
if(MED_FREQ)
|
|
return "medradio"
|
|
if(SUP_FREQ)
|
|
return "supradio"
|
|
if(SRV_FREQ)
|
|
return "srvradio"
|
|
if(PROC_FREQ)
|
|
return "proradio"
|
|
|
|
// If the above switch somehow failed. And it needs the SSradio. part otherwise it fails to compile
|
|
if(frequency in DEPT_FREQS)
|
|
return "deptradio"
|
|
|
|
// If its none of the others
|
|
return "radio"
|
|
|
|
|
|
/datum/controller/subsystem/radio/proc/add_object(obj/device as obj, new_frequency as num, filter = null as text|null)
|
|
var/f_text = num2text(new_frequency)
|
|
var/datum/radio_frequency/frequency = frequencies[f_text]
|
|
|
|
if(!frequency)
|
|
frequency = new
|
|
frequency.frequency = new_frequency
|
|
frequencies[f_text] = frequency
|
|
|
|
frequency.add_listener(device, filter)
|
|
return frequency
|
|
|
|
/datum/controller/subsystem/radio/proc/remove_object(obj/device, old_frequency)
|
|
var/f_text = num2text(old_frequency)
|
|
var/datum/radio_frequency/frequency = frequencies[f_text]
|
|
|
|
if(frequency)
|
|
frequency.remove_listener(device)
|
|
|
|
if(frequency.devices.len == 0)
|
|
qdel(frequency)
|
|
frequencies -= f_text
|
|
|
|
return 1
|
|
|
|
/datum/controller/subsystem/radio/proc/return_frequency(new_frequency as num)
|
|
var/f_text = num2text(new_frequency)
|
|
var/datum/radio_frequency/frequency = frequencies[f_text]
|
|
|
|
if(!frequency)
|
|
frequency = new
|
|
frequency.frequency = new_frequency
|
|
frequencies[f_text] = frequency
|
|
|
|
return frequency
|
|
|
|
|
|
// ALL THE SHIT BELOW THIS LINE ISNT PART OF THE SUBSYSTEM AND REALLY NEEDS ITS OWN FILE
|