Port of the TG radio system. Tasty and I tested it out and it works smooth and clean :)

We were able to restore functionality after we blew up half the radio equipment, as well.
AI satellite is now the Comms satellite.
This commit is contained in:
SkyMarshal
2012-01-17 00:12:30 -07:00
parent 26e12e26d0
commit 0d7ce5f347
38 changed files with 4268 additions and 1979 deletions

View File

@@ -55,6 +55,7 @@
#define FILE_DIR "code/game/machinery/embedded_controller" #define FILE_DIR "code/game/machinery/embedded_controller"
#define FILE_DIR "code/game/machinery/kitchen" #define FILE_DIR "code/game/machinery/kitchen"
#define FILE_DIR "code/game/machinery/pipe" #define FILE_DIR "code/game/machinery/pipe"
#define FILE_DIR "code/game/machinery/telecomms"
#define FILE_DIR "code/game/magic" #define FILE_DIR "code/game/magic"
#define FILE_DIR "code/game/magic/cultist" #define FILE_DIR "code/game/magic/cultist"
#define FILE_DIR "code/game/mecha" #define FILE_DIR "code/game/mecha"
@@ -528,6 +529,11 @@
#include "code\game\machinery\kitchen\processor.dm" #include "code\game\machinery\kitchen\processor.dm"
#include "code\game\machinery\pipe\construction.dm" #include "code\game\machinery\pipe\construction.dm"
#include "code\game\machinery\pipe\pipe_dispenser.dm" #include "code\game\machinery\pipe\pipe_dispenser.dm"
#include "code\game\machinery\telecomms\broadcaster.dm"
#include "code\game\machinery\telecomms\logbrowser.dm"
#include "code\game\machinery\telecomms\machine_interactions.dm"
#include "code\game\machinery\telecomms\telecommunications.dm"
#include "code\game\machinery\telecomms\telemonitor.dm"
#include "code\game\magic\archived_book.dm" #include "code\game\magic\archived_book.dm"
#include "code\game\magic\library.dm" #include "code\game\magic\library.dm"
#include "code\game\magic\musician.dm" #include "code\game\magic\musician.dm"

View File

@@ -7,7 +7,7 @@
item_state = "zippo" item_state = "zippo"
w_class = 1.0 w_class = 1.0
m_amt = 80 m_amt = 80
/*
/obj/item/device/jammer /obj/item/device/jammer
name = "strange device" name = "strange device"
desc = "It blinks and has an antenna on it. Weird." desc = "It blinks and has an antenna on it. Weird."
@@ -72,3 +72,4 @@
icon_state = "t-ray0" icon_state = "t-ray0"
sleep(2) sleep(2)
*/

View File

@@ -28,6 +28,11 @@
if (affected_mob.nutrition > 100) if (affected_mob.nutrition > 100)
affected_mob.Stun(rand(4,6)) affected_mob.Stun(rand(4,6))
affected_mob << "\red You throw up!" affected_mob << "\red You throw up!"
for(var/mob/O in viewers(world.view, affected_mob))
if(O == affected_mob)
continue
O.show_message(text("<b>\red [] throws up!</b>", affected_mob), 1)
playsound(affected_mob.loc, 'splat.ogg', 50, 1)
var/turf/location = affected_mob.loc var/turf/location = affected_mob.loc
if (istype(location, /turf/simulated)) if (istype(location, /turf/simulated))
location.add_vomit_floor(affected_mob) location.add_vomit_floor(affected_mob)

View File

@@ -81,7 +81,7 @@ proc/process_ghost_teleport_locs()
ghostteleportlocs += AR.name ghostteleportlocs += AR.name
ghostteleportlocs[AR.name] = AR ghostteleportlocs[AR.name] = AR
var/turf/picked = pick(get_area_turfs(AR.type)) var/turf/picked = pick(get_area_turfs(AR.type))
if (picked.z == 1 || picked.z == 5) if (picked.z == 1 || picked.z == 3 || picked.z == 5)
ghostteleportlocs += AR.name ghostteleportlocs += AR.name
ghostteleportlocs[AR.name] = AR ghostteleportlocs[AR.name] = AR
@@ -1205,6 +1205,37 @@ proc/process_ghost_teleport_locs()
icon_state = "storage" icon_state = "storage"
// Telecommunications Satellite
/area/tcommsat/entrance
name = "Telecommunications Satellite Teleporter"
icon_state = "tcomsatentrance"
/area/tcommsat/chamber
name = "Telecommunications Satellite Central Compartment"
icon_state = "tcomsatcham"
/area/turret_protected/tcomfoyer
name = "Telecommunications Satellite Foyer"
icon_state = "tcomsatlob"
/area/turret_protected/tcomwest
name = "Telecommunications Satellite West Wing"
icon_state = "tcomsatwest"
/area/turret_protected/tcomeast
name = "Telecommunications Satellite East Wing"
icon_state = "tcomsateast"
/area/tcommsat/computer
name = "Telecommunications Satellite Observatory"
icon_state = "tcomsatcomp"
/area/tcommsat/lounge
name = "Telecommunications Satellite Lounge"
icon_state = "tcomsatlounge"
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
/* /*
Lists of areas to be used with is_type_in_list. Lists of areas to be used with is_type_in_list.

View File

@@ -339,6 +339,7 @@
m_amt = 50 m_amt = 50
g_amt = 20 g_amt = 20
origin_tech = "magnets=1;engineering=1" origin_tech = "magnets=1;engineering=1"
var/obj/machinery/telecomms/buffer // simple machine buffer for device linkage
/obj/item/blueprints /obj/item/blueprints
name = "station blueprints" name = "station blueprints"

View File

@@ -4,6 +4,7 @@
density = 1 density = 1
anchored = 1.0 anchored = 1.0
var/obj/item/weapon/circuitboard/circuit = null //if circuit==null, computer can't disassemble var/obj/item/weapon/circuitboard/circuit = null //if circuit==null, computer can't disassemble
var/emagged = 0
/obj/machinery/computer/operating /obj/machinery/computer/operating

View File

@@ -541,8 +541,8 @@
/datum/supply_packs/mecha_ripley /datum/supply_packs/mecha_ripley
name = "Circuit Crate (\"Ripley\" APLU)" name = "Circuit Crate (\"Ripley\" APLU)"
contains = list("/obj/item/weapon/book/manual/ripley_build_and_repair", contains = list("/obj/item/weapon/book/manual/ripley_build_and_repair",
"/obj/item/mecha_parts/circuitboard/ripley/peripherals", //TEMPORARY due to lack of circuitboard printer "/obj/item/mecha_parts/circuitboard/ripley/main", //TEMPORARY due to lack of circuitboard printer
"/obj/item/mecha_parts/circuitboard/ripley/main") //TEMPORARY due to lack of circuitboard printer "/obj/item/mecha_parts/circuitboard/ripley/peripherals") //TEMPORARY due to lack of circuitboard printer
cost = 40 cost = 40
containertype = "/obj/structure/closet/crate/secure" containertype = "/obj/structure/closet/crate/secure"
containername = "APLU \"Ripley\" Circuit Crate" containername = "APLU \"Ripley\" Circuit Crate"

View File

@@ -459,6 +459,7 @@
var/assignment = null var/assignment = null
var/obj/item/weapon/photo/PHOTO = null var/obj/item/weapon/photo/PHOTO = null
var/over_jumpsuit = 1 // If set to 0, it won't display on top of the mob's jumpsuit var/over_jumpsuit = 1 // If set to 0, it won't display on top of the mob's jumpsuit
var/dorm = 0 // determines if this ID has claimed a dorm already
/obj/item/weapon/card/id/gold /obj/item/weapon/card/id/gold
name = "identification card" name = "identification card"
@@ -1716,3 +1717,59 @@
origin_tech = "materials=5" origin_tech = "materials=5"
rating = 3 rating = 3
m_amt = 80 m_amt = 80
// Subspace stock parts
/obj/item/weapon/stock_parts/subspace/ansible
name = "Subspace Ansible"
icon_state = "subspace_ansible"
desc = "A compact module capable of sensing extradimensional activity."
origin_tech = "programming=3;magnets=5;materials=4;bluespace=2"
m_amt = 30
g_amt = 10
/obj/item/weapon/stock_parts/subspace/filter
name = "Hyperwave Filter"
icon_state = "hyperwave_filter"
desc = "A tiny device capable of filtering and converting super-intense radiowaves."
origin_tech = "programming=4;magnets=2"
m_amt = 30
g_amt = 10
/obj/item/weapon/stock_parts/subspace/amplifier
name = "Subspace Amplifier"
icon_state = "subspace_amplifier"
desc = "A compact micro-machine capable of amplifying weak subspace transmissions."
origin_tech = "programming=3;magnets=4;materials=4;bluespace=2"
m_amt = 30
g_amt = 10
/obj/item/weapon/stock_parts/subspace/treatment
name = "Subspace Treatment Disk"
icon_state = "treatment_disk"
desc = "A compact micro-machine capable of stretching out hyper-compressed radio waves."
origin_tech = "programming=3;magnets=2;materials=5;bluespace=2"
m_amt = 30
g_amt = 10
/obj/item/weapon/stock_parts/subspace/analyzer
name = "Subspace Wavelength Analyzer"
icon_state = "wavelength_analyzer"
desc = "A sophisticated analyzer capable of analyzing cryptic subspace wavelengths."
origin_tech = "programming=3;magnets=4;materials=4;bluespace=2"
m_amt = 30
g_amt = 10
/obj/item/weapon/stock_parts/subspace/crystal
name = "Ansible Crystal"
icon_state = "ansible_crystal"
desc = "A crystal made from pure glass used to transmit laser databursts to subspace."
origin_tech = "magnets=4;materials=4;bluespace=2"
g_amt = 50
/obj/item/weapon/stock_parts/subspace/transmitter
name = "Subspace Transmitter"
icon_state = "subspace_transmitter"
desc = "A large piece of equipment used to open a window into the subspace dimension."
origin_tech = "magnets=5;materials=5;bluespace=3"
m_amt = 50

View File

@@ -83,6 +83,60 @@
//turfs += centerturf //turfs += centerturf
return turfs return turfs
/proc/get_mobs_in_view(var/R, var/atom/source)
// Returns a list of mobs in range of R from source. Used in radio and say code.
var/turf/T = get_turf(source)
var/list/hear = hearers(R, T)
var/list/V = view(R, T)
// Search for closets:
for(var/obj/structure/closet/C in V)
for(var/mob/M in C.contents)
if(M.client)
hear += M
// Cryos:
for(var/obj/machinery/atmospherics/unary/cryo_cell/C in V)
if(C.occupant)
if(C.occupant.client)
hear += C.occupant
// Intelicards
for(var/obj/item/device/aicard/C in V)
for(var/mob/living/silicon/ai/M in C)
if(M.client)
hear += M
// Brains/MMIs/pAIs
for(var/mob/living/carbon/brain/C in world)
if(get_turf(C) in V)
hear += C
for(var/mob/living/silicon/pai/C in world)
if(get_turf(C) in V)
hear += C
// Personal AIs
for(var/obj/item/device/paicard/C in V)
if(C.pai)
if(C.pai.client)
hear += C.pai
// Exosuits
for(var/obj/mecha/C in V)
if(C.occupant)
if(C.occupant.client)
hear += C.occupant
// Disposal Machines
for(var/obj/machinery/disposal/C in V)
for(var/mob/M in C.contents)
if(M.client)
hear += M
return hear
/proc/get_dist_euclidian(atom/Loc1 as turf|mob|obj,atom/Loc2 as turf|mob|obj) /proc/get_dist_euclidian(atom/Loc1 as turf|mob|obj,atom/Loc2 as turf|mob|obj)
var/dx = Loc1.x - Loc2.x var/dx = Loc1.x - Loc2.x
var/dy = Loc1.y - Loc2.y var/dy = Loc1.y - Loc2.y

View File

@@ -161,9 +161,12 @@
src.blood_DNA = list2params(L) src.blood_DNA = list2params(L)
return return
/atom/proc/add_vomit_floor(mob/living/carbon/M as mob) /atom/proc/add_vomit_floor(mob/living/carbon/M as mob, var/toxvomit = 0)
if( istype(src, /turf/simulated) ) if( istype(src, /turf/simulated) )
var/obj/effect/decal/cleanable/vomit/this = new /obj/effect/decal/cleanable/vomit(src) var/obj/effect/decal/cleanable/vomit/this = new /obj/effect/decal/cleanable/vomit(src)
// Make toxins vomit look different
if(toxvomit)
this.icon_state = "vomittox_[pick(1,4)]"
for(var/datum/disease/D in M.viruses) for(var/datum/disease/D in M.viruses)
var/datum/disease/newDisease = new D.type var/datum/disease/newDisease = new D.type
this.viruses += newDisease this.viruses += newDisease

View File

@@ -159,13 +159,6 @@ datum/controller/radio
return 1 return 1
proc/RegisterScrambler(var/Frequency)
var/datum/radio_frequency/frequency = frequencies[Frequency]
frequency.scrambled++
proc/UnregisterScrambler(var/Frequency)
var/datum/radio_frequency/frequency = frequencies[Frequency]
frequency.scrambled--
proc/return_frequency(var/frequency as num) proc/return_frequency(var/frequency as num)
var/f_text = num2text(frequency) var/f_text = num2text(frequency)
return frequencies[f_text] return frequencies[f_text]
@@ -173,7 +166,6 @@ datum/controller/radio
datum/radio_frequency datum/radio_frequency
var/frequency as num var/frequency as num
var/list/list/obj/devices = list() var/list/list/obj/devices = list()
var/scrambled = 0
proc proc
post_signal(obj/source as obj|null, datum/signal/signal, var/filter = null as text|null, var/range = null as num|null) post_signal(obj/source as obj|null, datum/signal/signal, var/filter = null as text|null, var/range = null as num|null)
@@ -181,8 +173,6 @@ datum/radio_frequency
// var/N_f=0 // var/N_f=0
// var/N_nf=0 // var/N_nf=0
// var/Nt=0 // var/Nt=0
if(scrambled)
return
var/turf/start_point var/turf/start_point
if(range) if(range)
start_point = get_turf(source) start_point = get_turf(source)
@@ -282,6 +272,7 @@ datum/signal
transmission_method = model.transmission_method transmission_method = model.transmission_method
data = model.data data = model.data
encryption = model.encryption encryption = model.encryption
frequency = model.frequency
proc/debug_print() proc/debug_print()
if (source) if (source)

View File

@@ -1,39 +1,13 @@
/datum/event/electricalstorm /datum/event/electricalstorm
var var
list/datum/radio_frequency/DisruptedFrequencies = list( )
list/obj/machinery/light/Lights = list( ) list/obj/machinery/light/Lights = list( )
list/obj/machinery/light/APCs = list( ) list/obj/machinery/light/APCs = list( )
list/obj/machinery/light/Doors = list( ) list/obj/machinery/light/Doors = list( )
talk_out = 0
has_talked = 0
SafeFreq = 0
Announce() Announce()
Lifetime = rand(90, 300) Lifetime = rand(90, 300)
command_alert("The station is flying through an electrical storm. Radio communications may be disrupted", "Anomaly Alert") command_alert("The station is flying through an electrical storm. Radio communications may be disrupted", "Anomaly Alert")
for (var/datum/radio_frequency/Freq in radio_controller.frequencies)
if(prob(35))
radio_controller.RegisterScrambler(Freq)
DisruptedFrequencies += Freq
for (var/Freq = 1201, Freq <= 1599, Freq += 2)
if(prob(35))
ScrambledFrequencies += list ("[Freq]" = Freq)
else
UnscrambledFrequencies += list ("[Freq]" = Freq)
for (var/Freq in DEPT_FREQS)
if(prob(75))
ScrambledFrequencies |= list ("[Freq]" = Freq)
if(UnscrambledFrequencies["[Freq]"])
UnscrambledFrequencies -= list ("[Freq]" = Freq)
if(prob(80))
ScrambledFrequencies |= list ("1459" = 1459)
if(UnscrambledFrequencies["1459"])
UnscrambledFrequencies -= list ("1459" = 1459)
for(var/obj/machinery/light/Light in world) for(var/obj/machinery/light/Light in world)
if(Light.z == 1) if(Light.z == 1)
Lights += Light Lights += Light
@@ -46,20 +20,6 @@
if(Door.z == 1) if(Door.z == 1)
Doors += Door Doors += Door
talk_out = rand(40,70)
var/picked = 0
var/list/SafeTemp = list()
if(UnscrambledFrequencies["1459"])
SafeFreq = 1459
picked = 1
else
while(picked == 0)
SafeTemp = pick(UnscrambledFrequencies)
SafeFreq = UnscrambledFrequencies[SafeTemp]
if(SafeFreq < 1489 && SafeFreq > 1441)
picked = 1
Tick() Tick()
for(var/x = 0; x < 3; x++) for(var/x = 0; x < 3; x++)
if (prob(30)) if (prob(30))
@@ -68,18 +28,10 @@
DisruptAPC() DisruptAPC()
if (prob(10)) if (prob(10))
DisableDoor() DisableDoor()
if(talk_out <= ActiveFor && has_talked == 0)
command_alert("The radio frequency [SafeFreq/10] has been identified as stable despite the interference.", "Station Central Computer System")
has_talked = 1
Die() Die()
command_alert("The station has cleared the electrical storm. Radio communications restored", "Anomaly Alert") command_alert("The station has cleared the electrical storm. Radio communications restored", "Anomaly Alert")
for (var/datum/radio_frequency/Freq in ScrambledFrequencies)
radio_controller.UnregisterScrambler(Freq)
DisruptedFrequencies = list( )
UnscrambledFrequencies = list( )
ScrambledFrequencies = list( )
proc proc
BlowLight() //Blow out a light fixture BlowLight() //Blow out a light fixture

View File

@@ -59,6 +59,7 @@
access_hos = 58 access_hos = 58
access_RC_announce = 59 //Request console announcements access_RC_announce = 59 //Request console announcements
access_keycard_auth = 60 //Used for events which require at least two people to confirm them access_keycard_auth = 60 //Used for events which require at least two people to confirm them
access_tcomsat = 61 // has access to the entire telecomms satellite / machinery
//BEGIN CENTCOM ACCESS //BEGIN CENTCOM ACCESS
/*Should leave plenty of room if we need to add more access levels. /*Should leave plenty of room if we need to add more access levels.
@@ -142,12 +143,13 @@
return 1 return 1
if(!I || !istype(I, /obj/item/weapon/card/id) || !I.access) //not ID or no access if(!I || !istype(I, /obj/item/weapon/card/id) || !I.access) //not ID or no access
return 0 return 0
for(var/req in src.req_access)
if(!(req in I.access)) //doesn't have this access
return 0
if(src.req_one_access && src.req_one_access.len) if(src.req_one_access && src.req_one_access.len)
for(var/req in src.req_one_access) for(var/req in src.req_one_access)
if(req in I.access) //has an access from the single access list if(req in I.access) //has an access from the single access list
return 1 return 1
for(var/req in src.req_access)
if(!(req in I.access)) //doesn't have this access
return 0 return 0
return 1 return 1
@@ -158,14 +160,14 @@
if(!src.req_access.len && (!src.req_one_access || !src.req_one_access.len)) return 1 if(!src.req_access.len && (!src.req_one_access || !src.req_one_access.len)) return 1
if(!L) return 0 if(!L) return 0
if(!istype(L, /list)) return 0 if(!istype(L, /list)) return 0
for(var/req in src.req_access)
if(!(req in L)) //doesn't have this access
return 0
if(src.req_one_access && src.req_one_access.len) if(src.req_one_access && src.req_one_access.len)
for(var/req in src.req_one_access) for(var/req in src.req_one_access)
if(req in L) //has an access from the single access list if(req in L) //has an access from the single access list
return 1 return 1
for(var/req in src.req_access)
if(!(req in L)) //doesn't have this access
return 0 return 0
return 1 return 1
@@ -176,7 +178,7 @@
if("Station Engineer") if("Station Engineer")
return list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks) return list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks)
if("Assistant") if("Assistant")
return list() return list(access_maint_tunnels)
if("Chaplain") if("Chaplain")
return list(access_morgue, access_chapel_office, access_crematorium) return list(access_morgue, access_chapel_office, access_crematorium)
if("Detective") if("Detective")
@@ -192,9 +194,9 @@
if("Captain") if("Captain")
return get_all_accesses() return get_all_accesses()
if("Security Officer") if("Security Officer")
return list(access_security, access_brig, access_court, access_maint_tunnels) return list(access_security, access_brig, access_court)
if("Warden") if("Warden")
return list(access_security, access_brig, access_armory, access_court, access_maint_tunnels) return list(access_security, access_brig, access_armory, access_court)
if("Scientist") if("Scientist")
return list(access_tox, access_tox_storage, access_research, access_xenobiology) return list(access_tox, access_tox_storage, access_research, access_xenobiology)
if("Head of Security") if("Head of Security")
@@ -223,7 +225,7 @@
if("Mime") if("Mime")
return list(access_maint_tunnels, access_mime, access_theatre) return list(access_maint_tunnels, access_mime, access_theatre)
if("Chef") if("Chef")
return list(access_kitchen) return list(access_kitchen, access_morgue)
if("Roboticist") if("Roboticist")
return list(access_robotics, access_tech_storage, access_maint_tunnels) return list(access_robotics, access_tech_storage, access_maint_tunnels)
if("Cargo Technician") if("Cargo Technician")
@@ -234,15 +236,15 @@
return list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining) return list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining)
if("Chief Engineer") if("Chief Engineer")
return list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, return list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels,
access_external_airlocks, access_atmospherics, access_emergency_storage, access_eva, access_teleporter, access_external_airlocks, access_atmospherics, access_emergency_storage, access_eva,
access_heads, access_ai_upload, access_construction, access_robotics, access_heads, access_ai_upload, access_construction, access_robotics,
access_mint, access_ce, access_RC_announce, access_keycard_auth) access_mint, access_ce, access_RC_announce, access_keycard_auth, access_tcomsat)
if("Research Director") if("Research Director")
return list(access_medlab, access_rd, return list(access_medlab, access_rd,
access_maint_tunnels, access_heads, access_tox, access_maint_tunnels, access_heads, access_tox,
access_tox_storage, access_chemistry, access_teleporter, access_tox_storage, access_chemistry, access_teleporter,
access_research, access_robotics, access_xenobiology, access_RC_announce, access_research, access_robotics, access_xenobiology, access_RC_announce,
access_keycard_auth) access_keycard_auth, access_tcomsat)
if("Virologist") if("Virologist")
return list(access_medical, access_morgue, access_virology) return list(access_medical, access_morgue, access_virology)
if("Chief Medical Officer") if("Chief Medical Officer")
@@ -284,7 +286,7 @@
access_hydroponics, access_library, access_manufacturing, access_lawyer, access_virology, access_cmo, access_qm, access_clown, access_mime, access_surgery, access_hydroponics, access_library, access_manufacturing, access_lawyer, access_virology, access_cmo, access_qm, access_clown, access_mime, access_surgery,
access_theatre, access_research, access_mining, access_mailsorting, access_mint_vault, access_mint, access_theatre, access_research, access_mining, access_mailsorting, access_mint_vault, access_mint,
access_heads_vault, access_mining_station, access_xenobiology, access_ce, access_hop, access_hos, access_RC_announce, access_heads_vault, access_mining_station, access_xenobiology, access_ce, access_hop, access_hos, access_RC_announce,
access_keycard_auth) access_keycard_auth, access_tcomsat)
/proc/get_all_centcom_access() /proc/get_all_centcom_access()
return list(access_cent_general, access_cent_thunder, access_cent_specops, access_cent_medical, access_cent_living, access_cent_storage, access_cent_teleporter, access_cent_creed, access_cent_captain) return list(access_cent_general, access_cent_thunder, access_cent_specops, access_cent_medical, access_cent_living, access_cent_storage, access_cent_teleporter, access_cent_creed, access_cent_captain)
@@ -305,7 +307,7 @@
if(4) //engineering and maintenance if(4) //engineering and maintenance
return list(access_engine, access_engine_equip, access_maint_tunnels, access_external_airlocks, access_emergency_storage, access_tech_storage, access_atmospherics, access_construction, access_robotics, access_ce) return list(access_engine, access_engine_equip, access_maint_tunnels, access_external_airlocks, access_emergency_storage, access_tech_storage, access_atmospherics, access_construction, access_robotics, access_ce)
if(5) //command if(5) //command
return list(access_change_ids, access_ai_upload, access_teleporter, access_eva, access_heads, access_captain, access_all_personal_lockers, access_mint_vault, access_heads_vault, access_hop, access_RC_announce, access_keycard_auth) return list(access_change_ids, access_ai_upload, access_teleporter, access_eva, access_heads, access_captain, access_all_personal_lockers, access_mint_vault, access_heads_vault, access_hop, access_RC_announce, access_keycard_auth, access_tcomsat)
if(6) //station general if(6) //station general
return list(access_chapel_office, access_kitchen,access_bar, access_janitor, access_crematorium, access_library, access_theatre, access_lawyer, access_clown, access_mime) return list(access_chapel_office, access_kitchen,access_bar, access_janitor, access_crematorium, access_library, access_theatre, access_lawyer, access_clown, access_mime)
if(7) //supply if(7) //supply
@@ -453,6 +455,8 @@
return "RC announcements" return "RC announcements"
if(access_keycard_auth) if(access_keycard_auth)
return "Keycode auth. device" return "Keycode auth. device"
if(access_tcomsat)
return "Telecommunications Satellite"
/proc/get_centcom_access_desc(A) /proc/get_centcom_access_desc(A)
switch(A) switch(A)
@@ -478,7 +482,7 @@
/proc/get_all_jobs() /proc/get_all_jobs()
return list("Assistant", "Station Engineer", "Shaft Miner", "Detective", "Medical Doctor", "Captain", "Security Officer", "Warden", return list("Assistant", "Station Engineer", "Shaft Miner", "Detective", "Medical Doctor", "Captain", "Security Officer", "Warden",
"Geneticist", "Scientist", "Head of Security", "Head of Personnel", "Atmospheric Technician", "Geneticist", "Scientist", "Head of Security", "Head of Personnel", "Atmospheric Technician",
"Chaplain", "Bartender", "Chemist", "Janitor", "Chef", "Roboticist", "Quartermaster", "Chaplain", "Bartender", "Chemist", "Janitor", "Clown", "Mime", "Chef", "Roboticist", "Quartermaster",
"Chief Engineer", "Research Director", "Botanist", "Librarian", "Lawyer", "Virologist", "Cargo Technician", "Chief Medical Officer") "Chief Engineer", "Research Director", "Botanist", "Librarian", "Lawyer", "Virologist", "Cargo Technician", "Chief Medical Officer")
/proc/get_all_centcom_jobs() /proc/get_all_centcom_jobs()

View File

@@ -1,5 +1,4 @@
/obj/machinery/computer/arcade /obj/machinery/computer/arcade
var/emagged
var/turtle = 0 var/turtle = 0
/obj/machinery/computer/arcade/New() /obj/machinery/computer/arcade/New()

View File

@@ -158,6 +158,14 @@
name = "Circuit board (Outpost Status Display)" name = "Circuit board (Outpost Status Display)"
build_path = "/obj/machinery/computer/security/mining" build_path = "/obj/machinery/computer/security/mining"
origin_tech = "programming=2" origin_tech = "programming=2"
/obj/item/weapon/circuitboard/comm_monitor
name = "Circuit board (Telecommunications Monitor)"
build_path = "/obj/machinery/computer/telecomms/monitor"
origin_tech = "programming=3"
/obj/item/weapon/circuitboard/comm_server
name = "Circuit board (Telecommunications Server Monitor)"
build_path = "/obj/machinery/computer/telecomms/server"
origin_tech = "programming=3"
/obj/item/weapon/circuitboard/curefab /obj/item/weapon/circuitboard/curefab
name = "Circuit board (Cure fab)" name = "Circuit board (Cure fab)"

View File

@@ -284,3 +284,68 @@ obj/item/weapon/circuitboard/rdserver
"/obj/item/weapon/cable_coil" = 1) "/obj/item/weapon/cable_coil" = 1)
m_amt = 50 m_amt = 50
g_amt = 50 g_amt = 50
// Telecomms circuit boards:
/obj/item/weapon/circuitboard/telecomms/receiver
name = "Circuit Board (Subspace Receiver)"
build_path = "/obj/machinery/telecomms/receiver"
board_type = "machine"
origin_tech = "programming=4;engineering=3;bluespace=2"
frame_desc = "Requires 1 Subspace Ansible, 1 Hyperwave Filter, 2 Manipulators, and 1 Advanced Scanning Module."
req_components = list(
"/obj/item/weapon/stock_parts/subspace/ansible" = 1,
"/obj/item/weapon/stock_parts/subspace/filter" = 1,
"/obj/item/weapon/stock_parts/manipulator" = 2,
"/obj/item/weapon/stock_parts/scanning_module/adv" = 1)
/obj/item/weapon/circuitboard/telecomms/bus
name = "Circuit Board (Bus Mainframe)"
build_path = "/obj/machinery/telecomms/bus"
board_type = "machine"
origin_tech = "programming=4;engineering=4"
frame_desc = "Requires 2 Manipulators, 1 Cable Coil and 1 Hyperwave Filter."
req_components = list(
"/obj/item/weapon/stock_parts/manipulator" = 2,
"/obj/item/weapon/cable_coil" = 1,
"/obj/item/weapon/stock_parts/subspace/filter" = 1)
/obj/item/weapon/circuitboard/telecomms/processor
name = "Circuit Board (Processor Unit)"
build_path = "/obj/machinery/telecomms/processor"
board_type = "machine"
origin_tech = "programming=4;engineering=4"
frame_desc = "Requires 5 Manipulators, 1 Hyperwave Filter, 2 Treatment Disks, 1 Wavelength Analyzer, 2 Cable Coils and 1 Subspace Amplifier."
req_components = list(
"/obj/item/weapon/stock_parts/manipulator" = 5,
"/obj/item/weapon/stock_parts/subspace/filter" = 1,
"/obj/item/weapon/stock_parts/subspace/treatment" = 2,
"/obj/item/weapon/stock_parts/subspace/analyzer" = 1,
"/obj/item/weapon/cable_coil" = 2,
"/obj/item/weapon/stock_parts/subspace/amplifier" = 1)
/obj/item/weapon/circuitboard/telecomms/server
name = "Circuit Board (Telecommunication Server)"
build_path = "/obj/machinery/telecomms/server"
board_type = "machine"
origin_tech = "programming=4;engineering=4"
frame_desc = "Requires 2 Manipulators, 1 Cable Coil and 1 Hyperwave Filter."
req_components = list(
"/obj/item/weapon/stock_parts/manipulator" = 2,
"/obj/item/weapon/cable_coil" = 1,
"/obj/item/weapon/stock_parts/subspace/filter" = 1)
/obj/item/weapon/circuitboard/telecomms/broadcaster
name = "Circuit Board (Bus Mainframe)"
build_path = "/obj/machinery/telecomms/broadcaster"
board_type = "machine"
origin_tech = "programming=4;engineering=4;bluespace=2"
frame_desc = "Requires 2 Manipulators, 1 Cable Coil, 1 Hyperwave Filter, 1 Ansible Crystal, 1 Subspace Transmitter, 1 Subspace Amplifier and 4 High-Powered Micro-Lasers. "
req_components = list(
"/obj/item/weapon/stock_parts/manipulator" = 2,
"/obj/item/weapon/cable_coil" = 1,
"/obj/item/weapon/stock_parts/subspace/filter" = 1,
"/obj/item/weapon/stock_parts/subspace/crystal" = 1,
"/obj/item/weapon/stock_parts/subspace/transmitter" = 1,
"/obj/item/weapon/stock_parts/subspace/amplifier" = 1,
"/obj/item/weapon/stock_parts/micro_laser/high" = 4)

View File

@@ -0,0 +1,332 @@
/*
The broadcaster sends processed messages to all radio devices in the game. They
do not have to be headsets; intercoms and station-bounced radios suffice.
They receive their message from a server after the message has been logged.
*/
/obj/machinery/telecomms/broadcaster
name = "Subspace Broadcaster"
icon = 'stationobjs.dmi'
icon_state = "broadcaster"
desc = "A dish-shaped machine used to broadcast processed subspace signals."
density = 1
anchored = 1
use_power = 1
idle_power_usage = 25
machinetype = 5
heatgen = 60
delay = 7
circuitboard = "/obj/item/weapon/circuitboard/telecomms/broadcaster"
receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
if(signal.data["message"])
signal.data["done"] = 1 // mark the signal as being broadcasted
// Search for the original signal and mark it as done as well
var/datum/signal/original = signal.data["original"]
if(original)
original.data["done"] = 1
if(signal.data["slow"] > 0)
sleep(signal.data["slow"]) // simulate the network lag if necessary
/* ###### Broadcast a message using signal.data ###### */
Broadcast_Message(signal.data["connection"], signal.data["mob"],
signal.data["vmask"], signal.data["vmessage"],
signal.data["radio"], signal.data["message"],
signal.data["name"], signal.data["job"],
signal.data["realname"], signal.data["vname"],, signal.data["compression"])
/* --- Do a snazzy animation! --- */
flick("broadcaster_send", src)
/**
Here is the big, bad function that broadcasts a message given the appropriate
parameters.
@param connection:
The datum generated in radio.dm, stored in signal.data["connection"].
@param M:
Reference to the mob/speaker, stored in signal.data["mob"]
@param vmask:
Boolean value if the mob is "hiding" its identity via voice mask, stored in
signal.data["vmask"]
@param vmessage:
If specified, will display this as the message; such as "chimpering"
for monkies if the mob is not understood. Stored in signal.data["vmessage"].
@param radio:
Reference to the radio broadcasting the message, stored in signal.data["radio"]
@param message:
The actual string message to display to mobs who understood mob M. Stored in
signal.data["message"]
@param name:
The name to display when a mob receives the message. signal.data["name"]
@param job:
The name job to display for the AI when it receives the message. signal.data["job"]
@param realname:
The "real" name associated with the mob. signal.data["realname"]
@param vname:
If specified, will use this name when mob M is not understood. signal.data["vname"]
@param filtertype:
If specified:
1 -- Will only broadcast to intercoms
2 -- Will only broadcast to intercoms and station-bounced radios
@param compression:
If 0, the signal is audible
If nonzero, the signal may be partially inaudible or just complete gibberish.
**/
/proc/Broadcast_Message(var/datum/radio_frequency/connection, var/mob/M,
var/vmask, var/vmessage, var/obj/item/device/radio/radio,
var/message, var/name, var/job, var/realname, var/vname,
var/filtertype, var/compression)
/* ###### Prepare the radio connection ###### */
var/display_freq = connection.frequency
var/list/receive = list()
// --- Broadcast only to intercom devices ---
if(filtertype == 1)
for (var/obj/item/device/radio/intercom/R in connection.devices["[RADIO_CHAT]"])
receive |= R.send_hear(display_freq)
// --- Broadcast only to intercoms and station-bounced radios ---
else if(filtertype == 2)
for (var/obj/item/device/radio/R in connection.devices["[RADIO_CHAT]"])
if(istype(R, /obj/item/device/radio/headset))
continue
receive |= R.send_hear(display_freq)
// --- Broadcast to ALL radio devices ---
else
for (var/obj/item/device/radio/R in connection.devices["[RADIO_CHAT]"])
receive |= R.send_hear(display_freq)
/* ###### Organize the receivers into categories for displaying the message ###### */
// Understood the message:
var/list/heard_masked = list() // masked name or no real name
var/list/heard_normal = list() // normal message
// Did not understand the message:
var/list/heard_voice = list() // voice message (ie "chimpers")
var/list/heard_garbled = list() // garbled message (ie "f*c* **u, **i*er!")
var/list/heard_gibberish= list() // completely screwed over message (ie "F%! (O*# *#!<>&**%!")
for (var/mob/R in receive)
/* --- Loop through the receivers and categorize them --- */
if (R.client && R.client.STFU_radio) //Adminning with 80 people on can be fun when you're trying to talk and all you can hear is radios.
continue
// --- Check for compression ---
if(compression > 0)
heard_gibberish += R
continue
// --- Can understand the speech ---
if (R.say_understands(M))
// - Not human or wearing a voice mask -
if (!ishuman(M) || vmask)
heard_masked += R
// - Human and not wearing voice mask -
else
heard_normal += R
// --- Can't understand the speech ---
else
// - The speaker has a prespecified "voice message" to display if not understood -
if (vmessage)
heard_voice += R
// - Just display a garbled message -
else
heard_garbled += R
/* ###### Begin formatting and sending the message ###### */
if (length(heard_masked) || length(heard_normal) || length(heard_voice) || length(heard_garbled) || length(heard_gibberish))
/* --- Some miscellaneous variables to format the string output --- */
var/part_a = "<span class='radio'><span class='name'>" // goes in the actual output
var/freq_text // the name of the channel
// --- Set the name of the channel ---
switch(display_freq)
if(SYND_FREQ)
freq_text = "#unkn"
if(COMM_FREQ)
freq_text = "Command"
if(1351)
freq_text = "Science"
if(1355)
freq_text = "Medical"
if(1357)
freq_text = "Engineering"
if(1359)
freq_text = "Security"
if(1349)
freq_text = "Mining"
if(1347)
freq_text = "Cargo"
//There's probably a way to use the list var of channels in code\game\communications.dm to make the dept channels non-hardcoded, but I wasn't in an experimentive mood. --NEO
// --- If the frequency has not been assigned a name, just use the frequency as the name ---
if(!freq_text)
freq_text = format_frequency(display_freq)
// --- Some more pre-message formatting ---
var/part_b = "</span><b> \icon[radio]\[[freq_text]\]</b> <span class='message'>" // Tweaked for security headsets -- TLE
var/part_c = "</span></span>"
if (display_freq==SYND_FREQ)
part_a = "<span class='syndradio'><span class='name'>"
else if (display_freq==COMM_FREQ)
part_a = "<span class='comradio'><span class='name'>"
else if (display_freq in DEPT_FREQS)
part_a = "<span class='deptradio'><span class='name'>"
// --- Filter the message; place it in quotes apply a verb ---
var/quotedmsg = M.say_quote(message)
// --- This following recording is intended for research and feedback in the use of department radio channels ---
var/part_blackbox_b = "</span><b> \[[freq_text]\]</b> <span class='message'>" // Tweaked for security headsets -- TLE
var/blackbox_msg = "[part_a][name][part_blackbox_b][quotedmsg][part_c]"
//var/blackbox_admin_msg = "[part_a][M.name] (Real name: [M.real_name])[part_blackbox_b][quotedmsg][part_c]"
for (var/obj/machinery/blackbox_recorder/BR in world)
//BR.messages_admin += blackbox_admin_msg
switch(display_freq)
if(1459)
BR.msg_common += blackbox_msg
if(1351)
BR.msg_science += blackbox_msg
if(1353)
BR.msg_command += blackbox_msg
if(1355)
BR.msg_medical += blackbox_msg
if(1357)
BR.msg_engineering += blackbox_msg
if(1359)
BR.msg_security += blackbox_msg
if(1441)
BR.msg_deathsquad += blackbox_msg
if(1213)
BR.msg_syndicate += blackbox_msg
if(1349)
BR.msg_mining += blackbox_msg
if(1347)
BR.msg_cargo += blackbox_msg
else
BR.messages += blackbox_msg
//End of research and feedback code.
/* ###### Send the message ###### */
/* --- Process all the mobs that heard a masked voice (understood) --- */
if (length(heard_masked))
var/N = name
var/J = job
var/rendered = "[part_a][N][part_b][quotedmsg][part_c]"
for (var/mob/R in heard_masked)
if(istype(R, /mob/living/silicon/ai))
R.show_message("[part_a]<a href='byond://?src=\ref[radio];track2=\ref[R];track=\ref[M]'>[N] ([J]) </a>[part_b][quotedmsg][part_c]", 2)
else
R.show_message(rendered, 2)
/* --- Process all the mobs that heard the voice normally (understood) --- */
if (length(heard_normal))
var/rendered = "[part_a][M.real_name][part_b][quotedmsg][part_c]"
for (var/mob/R in heard_normal)
if(istype(R, /mob/living/silicon/ai))
R.show_message("[part_a]<a href='byond://?src=\ref[radio];track2=\ref[R];track=\ref[M]'>[realname] ([job]) </a>[part_b][quotedmsg][part_c]", 2)
else
R.show_message(rendered, 2)
/* --- Process all the mobs that heard the voice normally (did not understand) --- */
// Does not display message; displayes the mob's voice_message (ie "chimpers")
if (length(heard_voice))
var/rendered = "[part_a][vname][part_b][M.voice_message][part_c]"
for (var/mob/R in heard_voice)
if(istype(R, /mob/living/silicon/ai))
R.show_message("[part_a]<a href='byond://?src=\ref[radio];track2=\ref[R];track=\ref[M]'>[vname] ([job]) </a>[part_b][vmessage]][part_c]", 2)
else
R.show_message(rendered, 2)
/* --- Process all the mobs that heard a garbled voice (did not understand) --- */
// Displays garbled message (ie "f*c* **u, **i*er!")
if (length(heard_garbled))
quotedmsg = M.say_quote(stars(message))
var/rendered = "[part_a][vname][part_b][quotedmsg][part_c]"
for (var/mob/R in heard_garbled)
if(istype(R, /mob/living/silicon/ai))
R.show_message("[part_a]<a href='byond://?src=\ref[radio];track2=\ref[R];track=\ref[M]'>[vname]</a>[part_b][quotedmsg][part_c]", 2)
else
R.show_message(rendered, 2)
/* --- Complete gibberish. Usually happens when there's a compressed message --- */
if (length(heard_gibberish))
quotedmsg = M.say_quote(Gibberish(message, compression + 50))
var/rendered = "[part_a][Gibberish(M.real_name, compression + 50)][part_b][quotedmsg][part_c]"
for (var/mob/R in heard_gibberish)
if(istype(R, /mob/living/silicon/ai))
R.show_message("[part_a]<a href='byond://?src=\ref[radio];track2=\ref[R];track=\ref[M]'>[Gibberish(realname, compression + 50)] ([Gibberish(job, compression + 50)]) </a>[part_b][quotedmsg][part_c]", 2)
else
R.show_message(rendered, 2)

View File

@@ -0,0 +1,231 @@
/obj/machinery/computer/telecomms/server
name = "Telecommunications Server Monitor"
icon_state = "comm_logs"
var
screen = 0 // the screen number:
list/servers = list() // the servers located by the computer
var/obj/machinery/telecomms/server/SelectedServer
network = "NULL" // the network to probe
temp = "" // temporary feedback messages
universal_translate = 0 // set to 1 if it can translate nonhuman speech
req_access = list(access_tcomsat)
attack_hand(mob/user as mob)
if(stat & (BROKEN|NOPOWER))
return
user.machine = src
var/dat = "<TITLE>Telecommunication Server Monitor</TITLE><center><b>Telecommunications Server Monitor</b></center>"
switch(screen)
// --- Main Menu ---
if(0)
dat += "<br>[temp]<br>"
dat += "<br>Current Network: <a href='?src=\ref[src];input=network'>[network]</a><br>"
if(servers.len)
dat += "<br>Detected Telecommunication Servers:<ul>"
for(var/obj/machinery/telecomms/T in servers)
dat += "<li><a href='?src=\ref[src];viewserver=[T.id]'>\ref[T] [T.name]</a> ([T.id])</li>"
dat += "</ul>"
dat += "<br><a href='?src=\ref[src];operation=release'>\[Flush Buffer\]</a>"
else
dat += "<br>No servers detected. Scan for servers: <a href='?src=\ref[src];operation=scan'>\[Scan\]</a>"
// --- Viewing Server ---
if(1)
dat += "<br>[temp]<br>"
dat += "<center><a href='?src=\ref[src];operation=mainmenu'>\[Main Menu\]</a> <a href='?src=\ref[src];operation=refresh'>\[Refresh\]</a></center>"
dat += "<br>Current Network: [network]"
dat += "<br>Selected Server: [SelectedServer.id]"
if(SelectedServer.totaltraffic >= 1024)
dat += "<br>Total recorded traffic: [round(SelectedServer.totaltraffic / 1024)] Terrabytes<br><br>"
else
dat += "<br>Total recorded traffic: [SelectedServer.totaltraffic] Gigabytes<br><br>"
dat += "Stored Logs: <ol>"
var/i = 0
for(var/datum/comm_log_entry/C in SelectedServer.log_entries)
i++
dat += "<li><font color = #008F00>[C.name]</font color> <font color = #FF0000><a href='?src=\ref[src];delete=[i]'>\[X\]</a></font color><br>"
// -- Determine race of orator --
var/race // The actual race of the mob
var/language = "Human" // MMIs, pAIs, Cyborgs and humans all speak Human
var/mobtype = C.parameters["mobtype"]
var/mob/M = new mobtype
if(ishuman(M) || isbrain(M))
race = "Human"
else if(ismonkey(M))
race = "Monkey"
language = race
else if(issilicon(M) || C.parameters["job"] == "AI") // sometimes M gets deleted prematurely for AIs... just check the job
race = "Artificial Life"
else if(ismetroid(M)) // NT knows a lot about metroids, but not aliens. Can identify metroids
race = "Metroid"
language = race
else if(isanimal(M))
race = "Domestic Animal"
language = race
else
race = "<i>Unidentifiable</i>"
language = race
del(M)
// -- If the orator is a human, or universal translate is active, OR mob has universal speech on --
if(language == "Human" || universal_translate || C.parameters["uspeech"])
dat += "<u><font color = #18743E>Data type</font color></u>: [C.input_type]<br>"
dat += "<u><font color = #18743E>Source</font color></u>: [C.parameters["name"]] (Job: [C.parameters["job"]])<br>"
dat += "<u><font color = #18743E>Class</font color></u>: [race]<br>"
dat += "<u><font color = #18743E>Contents</font color></u>: \"[C.parameters["message"]]\"<br>"
// -- Orator is not human and universal translate not active --
else
dat += "<u><font color = #18743E>Data type</font color></u>: Audio File<br>"
dat += "<u><font color = #18743E>Source</font color></u>: <i>Unidentifiable</i><br>"
dat += "<u><font color = #18743E>Class</font color></u>: [race]<br>"
dat += "<u><font color = #18743E>Contents</font color></u>: <i>Unintelligble</i><br>"
dat += "</li><br>"
dat += "</ol>"
user << browse(dat, "window=comm_monitor;size=575x400")
onclose(user, "server_control")
temp = ""
return
Topic(href, href_list)
if(..())
return
add_fingerprint(usr)
usr.machine = src
if(!src.allowed(usr) && !emagged)
usr << "\red ACCESS DENIED."
return
if(href_list["viewserver"])
screen = 1
for(var/obj/machinery/telecomms/T in servers)
if(T.id == href_list["viewserver"])
SelectedServer = T
break
if(href_list["operation"])
switch(href_list["operation"])
if("release")
servers = list()
screen = 0
if("mainmenu")
screen = 0
if("scan")
if(servers.len > 0)
temp = "<font color = #D70B00>- FAILED: CANNOT PROBE WHEN BUFFER FULL -</font color>"
else
for(var/obj/machinery/telecomms/server/T in range(25, src))
if(T.network == network)
servers.Add(T)
if(!servers.len)
temp = "<font color = #D70B00>- FAILED: UNABLE TO LOCATE SERVERS IN \[[network]\] -</font color>"
else
temp = "<font color = #336699>- [servers.len] SERVERS PROBED & BUFFERED -</font color>"
screen = 0
if(href_list["delete"])
if(SelectedServer)
var/datum/comm_log_entry/D = SelectedServer.log_entries[text2num(href_list["delete"])]
temp = "<font color = #336699>- DELETED ENTRY: [D.name] -</font color>"
SelectedServer.log_entries.Remove(D)
del(D)
else
temp = "<font color = #D70B00>- FAILED: NO SELECTED MACHINE -</font color>"
if(href_list["input"])
var/newnet = input(usr, "Which network do you want to view?", "Comm Monitor", network) as null|text
if(newnet && usr in range(1, src) && newnet != network)
if(length(newnet) > 15)
temp = "<font color = #D70B00>- FAILED: NETWORK TAG STRING TOO LENGHTLY -</font color>"
else
network = newnet
screen = 0
machines = list()
temp = "<font color = #336699>- NEW NETWORK TAG SET IN ADDRESS \[[network]\] -</font color>"
updateUsrDialog()
return
attackby(var/obj/item/weapon/D as obj, var/mob/user as mob)
if(istype(D, /obj/item/weapon/screwdriver))
playsound(src.loc, 'Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
new /obj/item/weapon/shard( src.loc )
var/obj/item/weapon/circuitboard/comm_server/M = new /obj/item/weapon/circuitboard/comm_server( A )
for (var/obj/C in src)
C.loc = src.loc
A.circuit = M
A.state = 3
A.icon_state = "3"
A.anchored = 1
del(src)
else
user << "\blue You disconnect the monitor."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
var/obj/item/weapon/circuitboard/comm_server/M = new /obj/item/weapon/circuitboard/comm_server( A )
for (var/obj/C in src)
C.loc = src.loc
A.circuit = M
A.state = 4
A.icon_state = "4"
A.anchored = 1
del(src)
else if(istype(D, /obj/item/weapon/card/emag) && !emagged)
playsound(src.loc, 'sparks4.ogg', 75, 1)
emagged = 1
user << "\blue You you disable the security protocols"
src.updateUsrDialog()
return

View File

@@ -0,0 +1,230 @@
/*
All telecommunications interactions:
*/
/obj/machinery/telecomms
var
temp = "" // output message
construct_op = 0
attackby(obj/item/P as obj, mob/user as mob)
// Using a multitool lets you access the receiver's interface
if(istype(P, /obj/item/device/multitool))
attack_hand(user)
switch(construct_op)
if(0)
if(istype(P, /obj/item/weapon/screwdriver))
user << "You unfasten the bolts."
playsound(src.loc, 'Screwdriver.ogg', 50, 1)
construct_op ++
if(1)
if(istype(P, /obj/item/weapon/screwdriver))
user << "You fasten the bolts."
playsound(src.loc, 'Screwdriver.ogg', 50, 1)
construct_op --
if(istype(P, /obj/item/weapon/wrench))
user << "You dislodge the external plating."
playsound(src.loc, 'Ratchet.ogg', 75, 1)
construct_op ++
if(2)
if(istype(P, /obj/item/weapon/wrench))
user << "You secure the external plating."
playsound(src.loc, 'Ratchet.ogg', 75, 1)
construct_op --
if(istype(P, /obj/item/weapon/wirecutters))
playsound(src.loc, 'wirecutter.ogg', 50, 1)
user << "You remove the cables."
construct_op ++
var/obj/item/weapon/cable_coil/A = new /obj/item/weapon/cable_coil( user.loc )
A.amount = 5
stat |= BROKEN // the machine's been borked!
if(3)
if(istype(P, /obj/item/weapon/cable_coil))
var/obj/item/weapon/cable_coil/A = P
if(A.amount >= 5)
user << "You insert the cables."
A.amount -= 5
if(A.amount <= 0)
user.drop_item()
del(A)
construct_op --
stat &= ~BROKEN // the machine's not borked anymore!
if(istype(P, /obj/item/weapon/crowbar))
user << "You begin prying out the circuit board other components..."
playsound(src.loc, 'Crowbar.ogg', 50, 1)
if(do_after(user,60))
user << "You finish prying out the components."
// Drop all the component stuff
if(contents.len > 0)
for(var/obj/x in src)
x.loc = user.loc
else
// If the machine wasn't made during runtime, probably doesn't have components:
// manually find the components and drop them!
var/newpath = text2path(circuitboard)
var/obj/item/weapon/circuitboard/C = new newpath
for(var/I in C.req_components)
for(var/i = 1, i <= C.req_components[I], i++)
newpath = text2path(I)
var/obj/item/s = new newpath
s.loc = user.loc
// Drop a circuit board too
C.loc = user.loc
// Create a machine frame and delete the current machine
var/obj/machinery/constructable_frame/machine_frame/F = new
F.loc = src.loc
del(src)
attack_hand(var/mob/user as mob)
// You need a multitool to use this.
if(user.equipped())
if(!istype(user.equipped(), /obj/item/device/multitool))
return
else
return
if(stat & (BROKEN|NOPOWER) || !on)
return
var/obj/item/device/multitool/P = user.equipped()
user.machine = src
var/dat
dat = "<font face = \"Courier\"><HEAD><TITLE>[src.name]</TITLE></HEAD><center><H3>[src.name] Access</H3></center>"
dat += "<br>[temp]<br>"
if(id != "" && id)
dat += "<br>Identification String: <a href='?src=\ref[src];input=id'>[id]</a>"
else
dat += "<br>Identification String: <a href='?src=\ref[src];input=id'>NULL</a>"
dat += "<br>Network: <a href='?src=\ref[src];input=network'>[network]</a>"
dat += "<br>Prefabrication: [autolinkers.len ? "TRUE" : "FALSE"]"
dat += "<br>Linked Network Entities: <ol>"
for(var/obj/machinery/telecomms/T in links)
dat += "<li>\ref[T] [T.name] ([T.id])</li>"
dat += "</ol>"
dat += "<br>Filtering Frequencies: "
var/i = 0
if(length(freq_listening))
for(var/x in freq_listening)
i++
if(i < length(freq_listening))
dat += "[format_frequency(x)] GHz<a href='?src=\ref[src];delete=[i]'>\[X\]</a>; "
else
dat += "[format_frequency(x)] GHz<a href='?src=\ref[src];delete=[i]'>\[X\]</a>"
else
dat += "NONE"
dat += "<br> <a href='?src=\ref[src];input=freq'>\[Add Filter\]</a>"
dat += "<hr>"
if(P.buffer)
dat += "<br><br>MULTITOOL BUFFER: \ref[P.buffer] [P.buffer] <a href='?src=\ref[src];link=1'>\[Link\]</a> <a href='?src=\ref[src];flush=1'>\[Flush\]"
else
dat += "<br><br>MULTITOOL BUFFER: <a href='?src=\ref[src];buffer=1'>\[Add Machine\]</a>"
dat += "</font>"
temp = ""
user << browse(dat, "window=[src.name];size=520x500;can_resize=0")
onclose(user, "dormitory")
Topic(href, href_list)
if(usr.equipped())
if(!istype(usr.equipped(), /obj/item/device/multitool))
return
else
return
if(stat & (BROKEN|NOPOWER) || !on)
return
var/obj/item/device/multitool/P = usr.equipped()
if(href_list["input"])
switch(href_list["input"])
if("id")
var/newid = input(usr, "Specify the new ID for this machine", src, id) as null|text
if(newid && usr in range(1, src))
id = newid
temp = "<font color = #666633>-% New ID assigned: \"[id]\" %-</font color>"
if("network")
var/newnet = input(usr, "Specify the new network for this machine. This will break all current links.", src, network) as null|text
if(newnet && usr in range(1, src))
if(length(newnet) > 15)
temp = "<font color = #666633>-% Too many characters in new network tag %-</font color>"
else
for(var/obj/machinery/telecomms/T in links)
T.links.Remove(src)
network = newnet
links = list()
temp = "<font color = #666633>-% New network tag assigned: \"[network]\" %-</font color>"
if("freq")
var/newfreq = input(usr, "Specify a new frequency to filter (GHz). Decimals assigned automatically.", src, network) as null|num
if(newfreq && usr in range(1, src))
if(!(newfreq in freq_listening))
if(findtext(num2text(newfreq), "."))
newfreq *= 10 // shift the decimal one place
freq_listening.Add(newfreq)
temp = "<font color = #666633>-% New frequency filter assigned: \"[newfreq] GHz\" %-</font color>"
if(href_list["delete"])
var/x = freq_listening[text2num(href_list["delete"])]
temp = "<font color = #666633>-% Removed frequency filter [x] %-</font color>"
freq_listening.Remove(x)
if(href_list["link"])
if(P.buffer)
if(!(src in P.buffer.links))
P.buffer.links.Add(src)
if(!(P.buffer in src.links))
src.links.Add(P.buffer)
temp = "<font color = #666633>-% Successfully linked with \ref[P.buffer] [P.buffer.name] %-</font color>"
else
temp = "<font color = #666633>-% Unable to acquire buffer %-</font color>"
if(href_list["buffer"])
P.buffer = src
temp = "<font color = #666633>-% Successfully stored \ref[P.buffer] [P.buffer.name] in buffer %-</font color>"
if(href_list["flush"])
temp = "<font color = #666633>-% Buffer successfully flushed. %-</font color>"
P.buffer = null
usr.machine = src
src.add_fingerprint(usr)
updateUsrDialog()

View File

@@ -0,0 +1,548 @@
/*
Hello, friends, this is Doohl from sexylands. You may be wondering what this
monstrous code file is. Sit down, boys and girls, while I tell you the tale.
The machines defined in this file were designed to be compatible with any radio
signals, provided they use subspace transmission. Currently they are only used for
headsets, but they can eventually be outfitted for real COMPUTER networks. This
is just a skeleton, ladies and gentlemen.
Look at radio.dm for the prequel to this code.
*/
/obj/machinery/telecomms
var
list/links = list() // list of machines this machine is linked to
traffic = 0 // value increases as traffic increases
netspeed = 5 // how much traffic to lose per tick (50 gigabytes/second * netspeed)
list/autolinkers = list() // list of text/number values to link with
id = "NULL" // identification string
network = "NULL" // the network of the machinery
list/freq_listening = list() // list of frequencies to tune into: if none, will listen to all
machinetype = 0 // just a hacky way of preventing alike machines from pairing
on = 1
integrity = 100 // basically HP, loses integrity by heat
heatgen = 20 // how much heat to transfer to the environment
delay = 10 // how many process() ticks to delay per heat
heating_power = 40000
circuitboard = null // string pointing to a circuitboard type
proc/relay_information(datum/signal/signal, filter, copysig, amount)
// relay signal to all linked machinery that are of type [filter]. If signal has been sent [amount] times, stop sending
if(!on)
return
var/send_count = 0
signal.data["slow"] += rand(0, round((100-integrity))) // apply some lag based on integrity
// Apply some lag based on traffic rates
var/netlag = round(traffic / 50)
if(netlag > signal.data["slow"])
signal.data["slow"] = netlag
// Loop through all linked machines and send the signal or copy.
for(var/obj/machinery/telecomms/machine in links)
if(filter && !istype( machine, text2path(filter) ))
continue
if(!machine.on)
continue
if(amount && send_count >= amount)
break
// If we're sending a copy, be sure to create the copy for EACH machine and paste the data
var/datum/signal/copy = new
if(copysig)
copy.transmission_method = 2
copy.frequency = signal.frequency
// Copy the main data contents! Workaround for some nasty bug where the actual array memory is copied and not its contents.
copy.data = list(
"mob" = signal.data["mob"],
"mobtype" = signal.data["mobtype"],
"realname" = signal.data["realname"],
"name" = signal.data["name"],
"job" = signal.data["job"],
"key" = signal.data["key"],
"vmessage" = signal.data["vmessage"],
"vname" = signal.data["vname"],
"vmask" = signal.data["vmask"],
"compression" = signal.data["compression"],
"message" = signal.data["message"],
"connection" = signal.data["connection"],
"radio" = signal.data["radio"],
"slow" = signal.data["slow"],
"traffic" = signal.data["traffic"]
)
// Keep the "original" signal constant
if(!signal.data["original"])
copy.data["original"] = signal
else
copy.data["original"] = signal.data["original"]
else
del(copy)
send_count++
if(machine.is_freq_listening(signal))
machine.traffic++
spawn()
if(copysig && copy)
machine.receive_information(copy, src)
else
machine.receive_information(signal, src)
if(send_count > 0 && is_freq_listening(signal))
traffic++
return send_count
proc/relay_direct_information(datum/signal/signal, obj/machinery/telecomms/machine)
// send signal directly to a machine
machine.receive_information(signal, src)
proc/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
// receive information from linked machinery
..()
proc/is_freq_listening(datum/signal/signal)
// return 1 if found, 0 if not found
if((signal.frequency in freq_listening) || (!freq_listening.len))
return 1
else
return 0
New()
..()
if(autolinkers.len)
spawn(10)
// Links nearby machines
for(var/obj/machinery/telecomms/T in orange(15, src))
for(var/x in autolinkers)
if(T.autolinkers.Find(x))
if(!(T in links) && machinetype != T.machinetype)
links.Add(T)
update_icon()
if(on)
icon_state = initial(icon_state)
else
icon_state = "[initial(icon_state)]_off"
process()
if(stat & (BROKEN|NOPOWER) || integrity <= 0) // if powered, on. if not powered, off. if too damaged, off
on = 0
else
on = 1
// Check heat and generate some
checkheat()
// Update the icon
update_icon()
if(traffic > 0)
traffic -= netspeed
/* Machine checks */
if(on)
if(machinetype == 2) // bus mainframes
switch(traffic)
if(-100 to 49)
icon_state = initial(icon_state)
if(50 to 200)
icon_state = "bus2"
else
icon_state = "bus3"
// Check heat and generate some
proc/checkheat()
// Checks heat from the environment and applies any integrity damage
var/datum/gas_mixture/environment = loc.return_air()
switch(environment.temperature)
if(T0C to (T20C + 20))
integrity = between(0, integrity, 100)
if((T20C + 20) to (T0C + 70))
integrity = max(0, integrity - 1)
if(delay)
delay--
else
// If the machine is on, ready to produce heat, and has positive traffic, genn some heat
if(on && traffic > 0)
produce_heat(heatgen)
delay = initial(delay)
proc/produce_heat(heat_amt)
if(!(stat & (NOPOWER|BROKEN))) //Blatently stolen from space heater.
var/turf/simulated/L = loc
if(istype(L))
var/datum/gas_mixture/env = L.return_air()
if(env.temperature < (heat_amt+T0C))
var/transfer_moles = 0.25 * env.total_moles()
var/datum/gas_mixture/removed = env.remove(transfer_moles)
if(removed)
var/heat_capacity = removed.heat_capacity()
if(heat_capacity == 0 || heat_capacity == null)
heat_capacity = 1
removed.temperature = min((removed.temperature*heat_capacity + heating_power)/heat_capacity, 1000)
env.merge(removed)
/*
The receiver idles and receives messages from subspace-compatible radio equipment;
primarily headsets. They then just relay this information to all linked devices,
which can would probably be network buses.
Link to Processor Units in case receiver can't send to bus units.
*/
/obj/machinery/telecomms/receiver
name = "Subspace Receiver"
icon = 'stationobjs.dmi'
icon_state = "broadcast receiver"
desc = "This machine has a dish-like shape and green lights. It is designed to detect and process subspace radio activity."
density = 1
anchored = 1
use_power = 1
idle_power_usage = 30
machinetype = 1
heatgen = 10
circuitboard = "/obj/item/weapon/circuitboard/telecomms/receiver"
receive_signal(datum/signal/signal)
if(!on) // has to be on to receive messages
return
if(signal.transmission_method == 2)
if(is_freq_listening(signal)) // detect subspace signals
var/sendbus = relay_information(signal, "/obj/machinery/telecomms/bus", 1) // ideally relay the copied information to bus units
/* We can't send the signal to a bus, so we send it to a processor */
if(!sendbus)
signal.data["slow"] += rand(5, 10) // slow the signal down
relay_information(signal, "/obj/machinery/telecomms/processor", 1) // send copy to processors
/*
The bus mainframe idles and waits for receivers to relay them signals. They act
as the main network hub, transferring data packets from and to other machines.
They transfer uncompressed subspace packets to processor units, and then take
the processed packet to a server for logging.
Link to a subspace broadcaster if it can't send to a server.
*/
/obj/machinery/telecomms/bus
name = "Bus Mainframe"
icon = 'stationobjs.dmi'
icon_state = "bus1"
desc = "A mighty piece of hardware used to send massive amounts of data quickly."
density = 1
anchored = 1
use_power = 1
idle_power_usage = 50
machinetype = 2
heatgen = 20
circuitboard = "/obj/item/weapon/circuitboard/telecomms/bus"
netspeed = 40
receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
if(is_freq_listening(signal))
if(signal.data["compression"]) // if signal is still compressed from subspace transmission
// send to one linked processor unit
var/send_to_processor = relay_information(signal, "/obj/machinery/telecomms/processor")
if(!send_to_processor) // failed to send to a processor, relay information anyway
signal.data["slow"] += rand(1, 5) // slow the signal down only slightly
relay_information(signal, "/obj/machinery/telecomms/server", 1)
else // the signal has been decompressed by a processor unit
// send to all linked server units
var/sendserver = relay_information(signal, "/obj/machinery/telecomms/server", 1)
// Can't send to a single server, send to a broadcaster instead! But it needs a processor to do this
if(!sendserver)
signal.data["slow"] += rand(0, 1) // slow the signal down only slightly
relay_information(signal, "/obj/machinery/telecomms/broadcaster")
/*
The processor is a very simple machine that decompresses subspace signals and
transfers them back to the original bus. It is essential in producing audible
data.
Link to servers if bus is not present
*/
/obj/machinery/telecomms/processor
name = "Processor Unit"
icon = 'stationobjs.dmi'
icon_state = "processor"
desc = "This machine is used to process large quantities of information."
density = 1
anchored = 1
use_power = 1
idle_power_usage = 30
machinetype = 3
heatgen = 100
delay = 5
circuitboard = "/obj/item/weapon/circuitboard/telecomms/processor"
receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
if(is_freq_listening(signal))
signal.data["compression"] = 0 // uncompress subspace signal
if(istype(machine_from, /obj/machinery/telecomms/bus))
relay_direct_information(signal, machine_from) // send the signal back to the machine
else // no bus detected - send the signal to servers instead
signal.data["slow"] += rand(5, 10) // slow the signal down
relay_information(signal, "/obj/machinery/telecomms/server", 1)
/*
The server logs all traffic and signal data. Once it records the signal, it sends
it to the subspace broadcaster.
Store a maximum of 100 logs and then deletes them.
*/
/obj/machinery/telecomms/server
name = "Telecommunication Server"
icon = 'stationobjs.dmi'
icon_state = "comm_server"
desc = "A machine used to store data and network statistics."
density = 1
anchored = 1
use_power = 1
idle_power_usage = 15
machinetype = 4
heatgen = 50
circuitboard = "/obj/item/weapon/circuitboard/telecomms/server"
var
list/log_entries = list()
totaltraffic = 0 // gigabytes (if > 1024, divide by 1024 -> terrabytes)
receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
if(signal.data["message"])
if(is_freq_listening(signal))
if(traffic > 0)
totaltraffic += traffic // add current traffic to total traffic
// If signal has a message and appropriate frequency
update_logs()
var/datum/comm_log_entry/log = new
var/mob/M = signal.data["mob"]
// Copy the signal.data entries we want
log.parameters["mobtype"] = signal.data["mobtype"]
log.parameters["job"] = signal.data["job"]
log.parameters["key"] = signal.data["key"]
log.parameters["vmessage"] = signal.data["message"]
log.parameters["vname"] = signal.data["vname"]
log.parameters["message"] = signal.data["message"]
log.parameters["name"] = signal.data["name"]
log.parameters["realname"] = signal.data["realname"]
log.parameters["uspeech"] = M.universal_speak
// If the signal is still compressed, make the log entry gibberish
if(signal.data["compression"] > 0)
log.parameters["message"] = Gibberish(signal.data["message"], signal.data["compression"] + 50)
log.parameters["job"] = Gibberish(signal.data["job"], signal.data["compression"] + 50)
log.parameters["name"] = Gibberish(signal.data["name"], signal.data["compression"] + 50)
log.parameters["realname"] = Gibberish(signal.data["realname"], signal.data["compression"] + 50)
log.parameters["vname"] = Gibberish(signal.data["vname"], signal.data["compression"] + 50)
log.input_type = "Corrupt File"
log_entries.Add(log)
var/identifier = num2text( rand(-1000,1000) + world.time )
log.name = "data packet ([md5(identifier)])"
relay_information(signal, "/obj/machinery/telecomms/broadcaster") // send to all broadcasters
proc/update_logs()
// deletes all logs when there are 100
if(log_entries.len >= 100)
var/list/restore = list()
for(var/datum/comm_log_entry/log in log_entries)
if(log.garbage_collector) // if garbage collector is set to 1, delete
del(log)
else
restore.Add(log)
log_entries.len = 0
log_entries.Add(restore)
// Simple log entry datum
/datum/comm_log_entry
var/parameters = list() // carbon-copy to signal.data[]
var/name = "data packet (#)"
var/garbage_collector = 1 // if set to 0, will not be garbage collected
var/input_type = "Speech File"
// ### Preset machines (Located at centcom!) (Or the Comms Satellite) ###
/obj/machinery/telecomms/receiver/preset_left
id = "Receiver A"
network = "tcommsat"
autolinkers = list("bus1", "bus2") // link to bus units 1 and 2
freq_listening = list(1351, 1355, 1347, 1349) // science, medical, cargo, mining
/obj/machinery/telecomms/receiver/preset_right
id = "Receiver B"
network = "tcommsat"
autolinkers = list("bus3", "bus4") // Bus units 3 and 4
freq_listening = list(1459, 1353, 1357, 1359) // common, command, engineering, security
/obj/machinery/telecomms/bus/preset_one
id = "Bus 1"
network = "tcommsat"
autolinkers = list("bus1", "processor1", "science", "medical")
/obj/machinery/telecomms/bus/preset_two
id = "Bus 2"
network = "tcommsat"
autolinkers = list("bus2", "processor2", "cargo", "mining")
/obj/machinery/telecomms/bus/preset_three
id = "Bus 3"
network = "tcommsat"
autolinkers = list("bus3", "processor3", "security", "command")
/obj/machinery/telecomms/bus/preset_four
id = "Bus 4"
network = "tcommsat"
autolinkers = list("bus4", "processor4", "engineering", "common")
/obj/machinery/telecomms/processor/preset_one
id = "Processor 1"
network = "tcommsat"
autolinkers = list("processor1") // processors are sort of isolated; they don't need backward links
/obj/machinery/telecomms/processor/preset_two
id = "Processor 2"
network = "tcommsat"
autolinkers = list("processor2")
/obj/machinery/telecomms/processor/preset_three
id = "Processor 3"
network = "Communications Satellite"
autolinkers = list("processor3")
/obj/machinery/telecomms/processor/preset_four
id = "Processor 4"
network = "tcommsat"
autolinkers = list("processor4")
/obj/machinery/telecomms/server/presets
network = "tcommsat"
science
id = "science server"
freq_listening = list(1351)
autolinkers = list("science", "broadcasterA")
medical
id = "medical server"
freq_listening = list(1355)
autolinkers = list("medical", "broadcasterA")
cargo
id = "cargo server"
freq_listening = list(1347)
autolinkers = list("cargo", "broadcasterA")
mining
id = "mining server"
freq_listening = list(1349)
autolinkers = list("mining", "broadcasterA")
common
id = "common server"
freq_listening = list(1459)
autolinkers = list("common", "broadcasterB")
command
id = "command server"
freq_listening = list(1353)
autolinkers = list("command", "broadcasterB")
engineering
id = "engineering server"
freq_listening = list(1357)
autolinkers = list("engineering", "broadcasterB")
security
id = "security server"
freq_listening = list(1359)
autolinkers = list("security", "broadcasterB")
/obj/machinery/telecomms/broadcaster/preset_left
id = "Broadcaster A"
network = "tcommsat"
autolinkers = list("broadcasterA")
/obj/machinery/telecomms/broadcaster/preset_right
id = "Broadcaster B"
network = "tcommsat"
autolinkers = list("broadcasterB")

View File

@@ -0,0 +1,161 @@
/*
Telecomms monitor tracks the overall trafficing of a telecommunications network
and displays a heirarchy of linked machines.
*/
/obj/machinery/computer/telecomms/monitor
name = "Telecommunications Monitor"
icon_state = "comm_monitor"
var
screen = 0 // the screen number:
list/machines = list() // the machines located by the computer
var/obj/machinery/telecomms/SelectedMachine
network = "NULL" // the network to probe
temp = "" // temporary feedback messages
req_access = list(access_tcomsat)
attack_hand(mob/user as mob)
if(stat & (BROKEN|NOPOWER))
return
user.machine = src
var/dat = "<TITLE>Telecommunications Monitor</TITLE><center><b>Telecommunications Monitor</b></center>"
switch(screen)
// --- Main Menu ---
if(0)
dat += "<br>[temp]<br><br>"
dat += "<br>Current Network: <a href='?src=\ref[src];input=network'>[network]</a><br>"
if(machines.len)
dat += "<br>Detected Network Entities:<ul>"
for(var/obj/machinery/telecomms/T in machines)
dat += "<li><a href='?src=\ref[src];viewmachine=[T.id]'>\ref[T] [T.name]</a> ([T.id])</li>"
dat += "</ul>"
dat += "<br><a href='?src=\ref[src];operation=release'>\[Flush Buffer\]</a>"
else
dat += "<a href='?src=\ref[src];operation=probe'>\[Probe Network\]</a>"
// --- Viewing Machine ---
if(1)
dat += "<br>[temp]<br>"
dat += "<center><a href='?src=\ref[src];operation=mainmenu'>\[Main Menu\]</a></center>"
dat += "<br>Current Network: [network]<br>"
dat += "Selected Network Entity: [SelectedMachine.name] ([SelectedMachine.id])<br>"
dat += "Linked Entities: <ol>"
for(var/obj/machinery/telecomms/T in SelectedMachine.links)
dat += "<li><a href='?src=\ref[src];viewmachine=[T.id]'>\ref[T.id] [T.name]</a> ([T.id])</li>"
dat += "</ol>"
user << browse(dat, "window=comm_monitor;size=575x400")
onclose(user, "server_control")
temp = ""
return
Topic(href, href_list)
if(..())
return
add_fingerprint(usr)
usr.machine = src
if(!src.allowed(usr) && !emagged)
usr << "\red ACCESS DENIED."
return
if(href_list["viewmachine"])
screen = 1
for(var/obj/machinery/telecomms/T in machines)
if(T.id == href_list["viewmachine"])
SelectedMachine = T
break
if(href_list["operation"])
switch(href_list["operation"])
if("release")
machines = list()
screen = 0
if("mainmenu")
screen = 0
if("probe")
if(machines.len > 0)
temp = "<font color = #D70B00>- FAILED: CANNOT PROBE WHEN BUFFER FULL -</font color>"
else
for(var/obj/machinery/telecomms/T in range(25, src))
if(T.network == network)
machines.Add(T)
if(!machines.len)
temp = "<font color = #D70B00>- FAILED: UNABLE TO LOCATE NETWORK ENTITIES IN \[[network]\] -</font color>"
else
temp = "<font color = #336699>- [machines.len] ENTITIES LOCATED & BUFFERED -</font color>"
screen = 0
if(href_list["input"])
var/newnet = input(usr, "Which network do you want to view?", "Comm Monitor", network) as null|text
if(newnet && usr in range(1, src) && newnet != network)
if(length(newnet) > 15)
temp = "<font color = #D70B00>- FAILED: NETWORK TAG STRING TOO LENGHTLY -</font color>"
else
network = newnet
screen = 0
machines = list()
temp = "<font color = #336699>- NEW NETWORK TAG SET IN ADDRESS \[[network]\] -</font color>"
updateUsrDialog()
return
attackby(var/obj/item/weapon/D as obj, var/mob/user as mob)
if(istype(D, /obj/item/weapon/screwdriver))
playsound(src.loc, 'Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
new /obj/item/weapon/shard( src.loc )
var/obj/item/weapon/circuitboard/comm_monitor/M = new /obj/item/weapon/circuitboard/comm_monitor( A )
for (var/obj/C in src)
C.loc = src.loc
A.circuit = M
A.state = 3
A.icon_state = "3"
A.anchored = 1
del(src)
else
user << "\blue You disconnect the monitor."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
var/obj/item/weapon/circuitboard/comm_monitor/M = new /obj/item/weapon/circuitboard/comm_monitor( A )
for (var/obj/C in src)
C.loc = src.loc
A.circuit = M
A.state = 4
A.icon_state = "4"
A.anchored = 1
del(src)
else if(istype(D, /obj/item/weapon/card/emag) && !emagged)
playsound(src.loc, 'sparks4.ogg', 75, 1)
emagged = 1
user << "\blue You you disable the security protocols"
src.updateUsrDialog()
return

View File

@@ -56,6 +56,10 @@
invisibility = 2 invisibility = 2
density = 1 density = 1
var/lasers = 0 var/lasers = 0
var/lasertype = 1
// 1 = laser
// 2 = cannon
// 3 = pulse
var/health = 80 var/health = 80
var/obj/machinery/turretcover/cover = null var/obj/machinery/turretcover/cover = null
var/popping = 0 var/popping = 0
@@ -200,7 +204,13 @@
return return
var/obj/item/projectile/A var/obj/item/projectile/A
if (src.lasers) if (src.lasers)
switch(lasertype)
if(1)
A = new /obj/item/projectile/beam( loc ) A = new /obj/item/projectile/beam( loc )
if(2)
A = new /obj/item/projectile/beam/heavylaser( loc )
if(3)
A = new /obj/item/projectile/beam/pulse( loc )
A.original = target.loc A.original = target.loc
use_power(500) use_power(500)
else else

View File

@@ -69,6 +69,7 @@
radio.name = "[src] radio" radio.name = "[src] radio"
radio.icon = icon radio.icon = icon
radio.icon_state = icon_state radio.icon_state = icon_state
radio.subspace_transmission = 1
src.icon_state += "-open" src.icon_state += "-open"
/* /*
src.air_contents.volume = gas_tank_volume //liters src.air_contents.volume = gas_tank_volume //liters
@@ -365,7 +366,27 @@
src.occupant_message("\blue The [user]'s claws are stopped by the armor.") src.occupant_message("\blue The [user]'s claws are stopped by the armor.")
for (var/mob/V in viewers(src)) for (var/mob/V in viewers(src))
if(V.client && !(V.blinded)) if(V.client && !(V.blinded))
V.show_message("\blue The [user] rebounds off the [src.name] armor!", 1) V.show_message("\blue The [user] rebounds off [src.name]'s armor!", 1)
return
/obj/mecha/proc/attack_critter(obj/effect/critter/C)
src.log_message("Attack by creature. Attacker - [C].",1)
var/damage = max(0, rand(C.melee_damage_lower - 5, C.melee_damage_upper - 5 ))
if(!prob(src.deflect_chance) && damage > 0)
src.take_damage(damage)
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
playsound(src.loc, "sparks", 50, 1)
for (var/mob/V in viewers(src))
if(V.client && !(V.blinded))
V.show_message("\red <b>[C]</b> hits [src.name]'s armor!", 1)
else
src.log_append_to_last("Armor saved.")
src.occupant_message("\blue <b>[C]'s</b> attack is stopped by the armor.")
for (var/mob/V in viewers(src))
if(V.client && !(V.blinded))
V.show_message("\blue <b>[C]</b> rebounds off [src.name]'s armor!", 1)
return return

View File

@@ -372,11 +372,6 @@
return src.attack_hand(user) return src.attack_hand(user)
/obj/item/weapon/stamp/New()
..()
return
/obj/item/weapon/dice/attack_self(mob/user as mob) // Roll the dice -- TLE /obj/item/weapon/dice/attack_self(mob/user as mob) // Roll the dice -- TLE
var/temp_sides var/temp_sides
if(src.sides < 1) if(src.sides < 1)

View File

@@ -16,6 +16,12 @@ CLIPBOARDS
..() ..()
src.pixel_y = rand(-8, 8) src.pixel_y = rand(-8, 8)
src.pixel_x = rand(-9, 9) src.pixel_x = rand(-9, 9)
spawn(2)
if(src.info)
src.overlays += "paper_words"
return
/obj/item/weapon/paper/update_icon() //derp.
if(src.info) if(src.info)
src.overlays += "paper_words" src.overlays += "paper_words"
return return

View File

@@ -5,6 +5,7 @@
item_state = "headset" item_state = "headset"
g_amt = 0 g_amt = 0
m_amt = 75 m_amt = 75
subspace_transmission = 1
var var
translate_binary = 0 translate_binary = 0
translate_hive = 0 translate_hive = 0

View File

@@ -31,7 +31,7 @@
if (!src.listening) if (!src.listening)
return return
var/turf/T = get_turf(src) /* var/turf/T = get_turf(src)
var/list/hear = hearers(7, T) var/list/hear = hearers(7, T)
var/list/V var/list/V
//find mobs in lockers, cryo and intellycards //find mobs in lockers, cryo and intellycards
@@ -43,8 +43,8 @@
if (!V) //lasy initialisation if (!V) //lasy initialisation
V = view(7, T) V = view(7, T)
if (get_turf(M) in V) //this slow, but I don't think we'd have a lot of wardrobewhores every round --rastaf0 if (get_turf(M) in V) //this slow, but I don't think we'd have a lot of wardrobewhores every round --rastaf0
hear+=M hear+=M */
return hear return get_mobs_in_view(4,src)
hear_talk(mob/M as mob, msg) hear_talk(mob/M as mob, msg)

View File

@@ -1,3 +1,8 @@
var/GLOBAL_RADIO_TYPE = 1 // radio type to use
// 0 = old radios
// 1 = new radios (subspace technology)
/obj/item/device/radio /obj/item/device/radio
icon = 'radio.dmi' icon = 'radio.dmi'
name = "station bounced radio" name = "station bounced radio"
@@ -16,7 +21,7 @@
listening = 1 listening = 1
freerange = 0 // 0 - Sanitize frequencies, 1 - Full range freerange = 0 // 0 - Sanitize frequencies, 1 - Full range
list/channels = list() //see communications.dm for full list. First channes is a "default" for :h list/channels = list() //see communications.dm for full list. First channes is a "default" for :h
scrambleoverride = 0 //For use by jammers. subspace_transmission = 0
// "Example" = FREQ_LISTENING|FREQ_BROADCASTING // "Example" = FREQ_LISTENING|FREQ_BROADCASTING
flags = 450 // hello i'm a fucking idiot why is this 450?? CODE GODS PLEASE EXPLAIN~ flags = 450 // hello i'm a fucking idiot why is this 450?? CODE GODS PLEASE EXPLAIN~
throw_speed = 2 throw_speed = 2
@@ -28,7 +33,7 @@
WIRE_SIGNAL = 1 //sends a signal, like to set off a bomb or electrocute someone WIRE_SIGNAL = 1 //sends a signal, like to set off a bomb or electrocute someone
WIRE_RECEIVE = 2 WIRE_RECEIVE = 2
WIRE_TRANSMIT = 4 WIRE_TRANSMIT = 4
TRANSMISSION_DELAY = 0 // only 2/second/radio TRANSMISSION_DELAY = 5 // only 2/second/radio
FREQ_LISTENING = 1 FREQ_LISTENING = 1
//FREQ_BROADCASTING = 2 //FREQ_BROADCASTING = 2
@@ -179,6 +184,182 @@
add_fingerprint(usr) add_fingerprint(usr)
/obj/item/device/radio/talk_into(mob/M as mob, message, channel) /obj/item/device/radio/talk_into(mob/M as mob, message, channel)
if(GLOBAL_RADIO_TYPE == 1) // NEW RADIO SYSTEMS: By Doohl
/* Quick introduction:
This new radio system uses a very robust FTL signaling technology unoriginally
dubbed "subspace" which is somewhat similar to 'blue-space' but can't
actually transmit large mass. Headsets are the only radio devices capable
of sending subspace transmissions to the Communications Satellite.
A headset sends a signal to a subspace listener/reciever elsewhere in space,
the signal gets processed and logged, and an audible transmission gets sent
to each individual headset.
*/
//#### Grab the connection datum ####//
var/datum/radio_frequency/connection = null
if(channel && channels && channels.len > 0)
if (channel == "department")
//world << "DEBUG: channel=\"[channel]\" switching to \"[channels[1]]\""
channel = channels[1]
connection = secure_radio_connections[channel]
else
connection = radio_connection
channel = null
if (!istype(connection))
return
//#### Tagging the signal with all appropriate identity values ####//
// ||-- The mob's name identity --||
var/displayname = M.name // grab the display name (name you get when you hover over someone's icon)
var/real_name = M.real_name // mob's real name
var/mobkey = "none" // player key associated with mob
var/voicemask = 0 // the speaker is wearing a voice mask
if(M.client)
mobkey = M.key // assign the mob's key
var/jobname // the mob's "job"
// --- Human: use their actual job ---
if (ishuman(M))
jobname = M:get_assignment()
// --- Carbon Nonhuman ---
else if (iscarbon(M)) // Nonhuman carbon mob
jobname = "No id"
// --- AI ---
else if (isAI(M))
jobname = "AI"
// --- Cyborg ---
else if (isrobot(M))
jobname = "Cyborg"
// --- Personal AI (pAI) ---
else if (istype(M, /mob/living/silicon/pai))
jobname = "Personal AI"
// --- Unidentifiable mob ---
else
jobname = "Unknown"
// --- Modifications to the mob's identity ---
// The mob is disguising their identity:
if (istype(M.wear_mask, /obj/item/clothing/mask/gas/voice)&&M.wear_mask:vchange)
displayname = M.wear_mask:voice
jobname = "Unknown"
voicemask = 1
/* ###### Radio headsets can only broadcast through subspace ###### */
if(subspace_transmission)
// First, we want to generate a new radio signal
var/datum/signal/signal = new
signal.transmission_method = 2 // 2 would be a subspace transmission.
// transmission_method could probably be enumerated through #define. Would be neater.
// --- Finally, tag the actual signal with the appropriate values ---
signal.data = list(
// Identity-associated tags:
"mob" = M, // store a reference to the mob
"mobtype" = M.type, // the mob's type
"realname" = real_name, // the mob's real name
"name" = displayname, // the mob's display name
"job" = jobname, // the mob's job
"key" = mobkey, // the mob's key
"vmessage" = M.voice_message, // the message to display if the voice wasn't understood
"vname" = M.voice_name, // the name to display if the voice wasn't understood
"vmask" = voicemask, // 1 if the mob is using a voice gas mask
// We store things that would otherwise be kept in the actual mob
// so that they can be logged even AFTER the mob is deleted or something
// Other tags:
"compression" = rand(45,50), // compressed radio signal
"message" = message, // the actual sent message
"connection" = connection, // the radio connection to use
"radio" = src, // stores the radio used for transmission
"slow" = 0, // how much to sleep() before broadcasting - simulates net lag
"traffic" = 0 // dictates the total traffic sum that the signal went through
)
signal.frequency = connection.frequency // Quick frequency set
//#### Sending the signal to all subspace receivers ####//
for(var/obj/machinery/telecomms/receiver/R in world)
R.receive_signal(signal)
// Receiving code can be located in _____.dm
return
/* ###### Intercoms and station-bounced radios ###### */
var/filter_type = 2
/* --- Intercoms can only broadcast to other intercoms, but bounced radios can broadcast to bounced radios and intercoms --- */
if(istype(src, /obj/item/device/radio/intercom))
filter_type = 1
var/datum/signal/signal = new
signal.transmission_method = 2
/* --- Try to send a normal subspace broadcast first */
signal.data = list(
"mob" = M, // store a reference to the mob
"mobtype" = M.type, // the mob's type
"realname" = real_name, // the mob's real name
"name" = displayname, // the mob's display name
"job" = jobname, // the mob's job
"key" = mobkey, // the mob's key
"vmessage" = M.voice_message, // the message to display if the voice wasn't understood
"vname" = M.voice_name, // the name to display if the voice wasn't understood
"vmask" = voicemask, // 1 if the mob is using a voice gas mas
"compression" = 0, // uncompressed radio signal
"message" = message, // the actual sent message
"connection" = connection, // the radio connection to use
"radio" = src, // stores the radio used for transmission
"slow" = 0,
"traffic" = 0
)
signal.frequency = connection.frequency // Quick frequency set
for(var/obj/machinery/telecomms/receiver/R in world)
R.receive_signal(signal)
sleep(rand(10,25)) // wait a little...
if(signal.data["done"])
del(signal) // delete the signal - we're done here.
return
// Oh my god; the comms are down or something because the signal hasn't been broadcasted yet.
// Send a mundane broadcast with limited targets:
Broadcast_Message(connection, M, voicemask, M.voice_message,
src, message, displayname, jobname, real_name, M.voice_name,
filter_type, signal.data["compression"])
else // OLD RADIO SYSTEMS: By Goons?
var/datum/radio_frequency/connection = null var/datum/radio_frequency/connection = null
if(channel && channels && channels.len > 0) if(channel && channels && channels.len > 0)
if (channel == "department") if (channel == "department")
@@ -191,13 +372,6 @@
if (!istype(connection)) if (!istype(connection))
return return
var/display_freq = connection.frequency var/display_freq = connection.frequency
var/scramble = 0
if(ScrambledFrequencies.len || scrambleoverride)
if(ScrambledFrequencies["[display_freq]"] || scrambleoverride)
scramble = 1
if(prob(35+(25*scrambleoverride)))
M << "\blue The radio made a popping sound and nothing was transmitted."
return
//world << "DEBUG: used channel=\"[channel]\" frequency= \"[display_freq]\" connection.devices.len = [connection.devices.len]" //world << "DEBUG: used channel=\"[channel]\" frequency= \"[display_freq]\" connection.devices.len = [connection.devices.len]"
@@ -222,7 +396,8 @@
var/list/receive = list() var/list/receive = list()
//for (var/obj/item/device/radio/R in radio_connection.devices) //for (var/obj/item/device/radio/R in radio_connection.devices)
for (var/obj/item/device/radio/R in connection.devices["[RADIO_CHAT]"]) for (var/obj/item/device/radio/R in connection.devices["[RADIO_CHAT]"]) // Modified for security headset code -- TLE
//if(R.accept_rad(src, message))
receive |= R.send_hear(display_freq) receive |= R.send_hear(display_freq)
//world << "DEBUG: receive.len=[receive.len]" //world << "DEBUG: receive.len=[receive.len]"
@@ -230,24 +405,17 @@
var/list/heard_normal = list() // normal message var/list/heard_normal = list() // normal message
var/list/heard_voice = list() // voice message var/list/heard_voice = list() // voice message
var/list/heard_garbled = list() // garbled message var/list/heard_garbled = list() // garbled message
var/turf/cl = get_turf(M)
var/zlev = 25
for (var/mob/R in receive) for (var/mob/R in receive)
var/turf/gl = get_turf(R)
if(zlev == 25 && !(scrambleoverride || scramble) && (gl.z == cl.z) || !istype(src, /obj/item/device/radio/headset))
zlev = 85
if (R.client && R.client.STFU_radio) //Adminning with 80 people on can be fun when you're trying to talk and all you can hear is radios. if (R.client && R.client.STFU_radio) //Adminning with 80 people on can be fun when you're trying to talk and all you can hear is radios.
continue continue
if (R.say_understands(M) && ((gl.z == cl.z) || !istype(src, /obj/item/device/radio/headset))) if (R.say_understands(M))
if ((!ishuman(M) || istype(M.wear_mask, /obj/item/clothing/mask/gas/voice)) && !scramble) if (!ishuman(M) || istype(M.wear_mask, /obj/item/clothing/mask/gas/voice))
heard_masked += R heard_masked += R
else if (!scramble) else
heard_normal += R heard_normal += R
else else
heard_garbled += R if (M.voice_message)
else
if (M.voice_message && (gl.z == cl.z))
heard_voice += R heard_voice += R
else else
heard_garbled += R heard_garbled += R
@@ -285,7 +453,7 @@
if (display_freq==SYND_FREQ) if (display_freq==SYND_FREQ)
part_a = "<span class='syndradio'><span class='name'>" part_a = "<span class='syndradio'><span class='name'>"
if (display_freq==NUKE_FREQ) else if (display_freq==NUKE_FREQ)
part_a = "<span class='nukeradio'><span class='name'>" part_a = "<span class='nukeradio'><span class='name'>"
else if (display_freq==COMM_FREQ) else if (display_freq==COMM_FREQ)
part_a = "<span class='comradio'><span class='name'>" part_a = "<span class='comradio'><span class='name'>"
@@ -344,6 +512,7 @@
if (length(heard_normal)) if (length(heard_normal))
var/rendered = "[part_a][M.real_name][part_b][quotedmsg][part_c]" var/rendered = "[part_a][M.real_name][part_b][quotedmsg][part_c]"
for (var/mob/R in heard_normal) for (var/mob/R in heard_normal)
if(istype(R, /mob/living/silicon/ai)) if(istype(R, /mob/living/silicon/ai))
R.show_message("[part_a]<a href='byond://?src=\ref[src];track2=\ref[R];track=\ref[M]'>[M.real_name] ([eqjobname]) </a>[part_b][quotedmsg][part_c]", 2) R.show_message("[part_a]<a href='byond://?src=\ref[src];track2=\ref[R];track=\ref[M]'>[M.real_name] ([eqjobname]) </a>[part_b][quotedmsg][part_c]", 2)
@@ -360,10 +529,10 @@
R.show_message(rendered, 2) R.show_message(rendered, 2)
if (length(heard_garbled)) if (length(heard_garbled))
quotedmsg = M.say_quote(stars(message, zlev)) quotedmsg = M.say_quote(stars(message))
var/rendered = "[part_a]Unknown[part_b][quotedmsg][part_c]" var/rendered = "[part_a][M.voice_name][part_b][quotedmsg][part_c]"
for (var/mob/R in heard_garbled) for (var/mob/R in heard_voice)
if(istype(R, /mob/living/silicon/ai)) if(istype(R, /mob/living/silicon/ai))
R.show_message("[part_a]<a href='byond://?src=\ref[src];track2=\ref[R];track=\ref[M]'>[M.voice_name]</a>[part_b][quotedmsg][part_c]", 2) R.show_message("[part_a]<a href='byond://?src=\ref[src];track2=\ref[R];track=\ref[M]'>[M.voice_name]</a>[part_b][quotedmsg][part_c]", 2)
else else
@@ -410,6 +579,7 @@
if (!accept) if (!accept)
return return
/* // UURAAAGH ALL THE CPUS, WASTED. ALL OF THEM. NO. -- Doohl
var/turf/T = get_turf(src) var/turf/T = get_turf(src)
var/list/hear = hearers(1, T) var/list/hear = hearers(1, T)
var/list/V var/list/V
@@ -423,16 +593,12 @@
V = view(1, T) V = view(1, T)
if (get_turf(M) in V) //this slow, but I don't think we'd have a lot of wardrobewhores every round --rastaf0 if (get_turf(M) in V) //this slow, but I don't think we'd have a lot of wardrobewhores every round --rastaf0
hear+=M hear+=M
return hear */
/obj/item/device/radio/proc/config(op) /* Instead, let's individually search potential containers for mobs! More verbose but a LOT more efficient and less laggy */
for (var/ch_name in channels) // Check gamehelpers.dm for the proc definition:
radio_controller.remove_object(src, radiochannels[ch_name])
secure_radio_connections = new return get_mobs_in_view(1, src)
channels = op
for (var/ch_name in op)
secure_radio_connections[ch_name] = radio_controller.add_object(src, radiochannels[ch_name], RADIO_CHAT)
return
/obj/item/device/radio/examine() /obj/item/device/radio/examine()
set src in view() set src in view()
@@ -451,6 +617,7 @@
if (!( istype(W, /obj/item/weapon/screwdriver) )) if (!( istype(W, /obj/item/weapon/screwdriver) ))
return return
b_stat = !( b_stat ) b_stat = !( b_stat )
if(!istype(src, /obj/item/device/radio/beacon))
if (b_stat) if (b_stat)
user.show_message("\blue The radio can now be attached and modified!") user.show_message("\blue The radio can now be attached and modified!")
else else
@@ -459,6 +626,7 @@
//Foreach goto(83) //Foreach goto(83)
add_fingerprint(user) add_fingerprint(user)
return return
else return
/obj/item/device/radio/emp_act(severity) /obj/item/device/radio/emp_act(severity)
broadcasting = 0 broadcasting = 0
@@ -466,3 +634,12 @@
for (var/ch_name in channels) for (var/ch_name in channels)
channels[ch_name] = 0 channels[ch_name] = 0
..() ..()
/obj/item/device/radio/proc/config(op)
for (var/ch_name in channels)
radio_controller.remove_object(src, radiochannels[ch_name])
secure_radio_connections = new
channels = op
for (var/ch_name in op)
secure_radio_connections[ch_name] = radio_controller.add_object(src, radiochannels[ch_name], RADIO_CHAT)
return

View File

@@ -1192,7 +1192,19 @@ turf/simulated/floor/return_siding_icon_state()
inertial_drift(A) inertial_drift(A)
if(ticker && ticker.mode) if(ticker && ticker.mode)
if(ticker.mode.name == "nuclear emergency") return // Okay, so let's make it so that people can travel z levels but not nuke disks!
// if(ticker.mode.name == "nuclear emergency") return
if(istype(A, /obj/item/weapon/disk/nuclear)) // Don't let nuke disks travel Z levels
return
if(!isemptylist(A.search_contents_for(/obj/item/weapon/disk/nuclear)))
if(istype(A, /mob/living))
var/mob/living/MM = A
if(MM.client)
MM << "\red Something you are carrying is preventing you from leaving. Don't play stupid; you know exactly what it is."
return
else if(ticker.mode.name == "extended"||ticker.mode.name == "sandbox") Sandbox_Spacemove(A) else if(ticker.mode.name == "extended"||ticker.mode.name == "sandbox") Sandbox_Spacemove(A)

View File

@@ -240,6 +240,22 @@ proc/slur(phrase)
p++//for each letter p is increased to find where the next letter will be. p++//for each letter p is increased to find where the next letter will be.
return copytext(sanitize(t),1,MAX_MESSAGE_LEN) return copytext(sanitize(t),1,MAX_MESSAGE_LEN)
proc/Gibberish(t, p)
/* Turn text into complete gibberish! */
var/returntext = ""
for(var/i = 1, i <= length(t), i++)
var/letter = copytext(t, i, i+1)
if(prob(50))
if(p >= 70)
letter = ""
for(var/j = 1, j <= rand(0, 2), j++)
letter += pick("#","@","*","&","%","$","/", "<", ">", ";","*","*","*","*","*","*","*")
returntext += letter
return returntext
/proc/ninjaspeak(n) /proc/ninjaspeak(n)
/* /*

View File

@@ -375,6 +375,24 @@ datum
materials = list("$glass" = 2000, "acid" = 20) materials = list("$glass" = 2000, "acid" = 20)
build_path = "/obj/item/weapon/circuitboard/light_switch" build_path = "/obj/item/weapon/circuitboard/light_switch"
comm_monitor
name = "Circuit Design (Telecommunications Monitoring Console)"
desc = "Allows for the construction of circuit boards used to build a telecommunications monitor."
id = "comm_monitor"
req_tech = list("programming" = 3)
build_type = IMPRINTER
materials = list("$glass" = 2000, "acid" = 20)
build_path = "/obj/item/weapon/circuitboard/comm_monitor"
comm_server
name = "Circuit Design (Telecommunications Server Monitoring Console)"
desc = "Allows for the construction of circuit boards used to build a telecommunication server browser and monitor."
id = "comm_server"
req_tech = list("programming" = 3)
build_type = IMPRINTER
materials = list("$glass" = 2000, "acid" = 20)
build_path = "/obj/item/weapon/circuitboard/comm_server"
/////////////////////////////////// ///////////////////////////////////
//////////AI Module Disks////////// //////////AI Module Disks//////////
/////////////////////////////////// ///////////////////////////////////
@@ -505,6 +523,50 @@ datum
build_path = "/obj/item/weapon/aiModule/tyrant" build_path = "/obj/item/weapon/aiModule/tyrant"
///////////////////////////////////
/////Subspace Telecomms////////////
///////////////////////////////////
subspace_receiver
name = "Circuit Design (Subspace Receiver)"
desc = "Allows for the construction of Subspace Receiver equipment."
id = "s-receiver"
req_tech = list("programming" = 4, "engineering" = 3, "bluespace" = 2)
build_type = IMPRINTER
materials = list("$glass" = 2000, "acid" = 20)
telecomms_bus
name = "Circuit Design (Bus Mainframe)"
desc = "Allows for the construction of Telecommunications Bus Mainframes."
id = "s-bus"
req_tech = list("programming" = 4, "engineering" = 4)
build_type = IMPRINTER
materials = list("$glass" = 2000, "acid" = 20)
telecomms_processor
name = "Circuit Design (Processor Unit)"
desc = "Allows for the construction of Telecommunications Processor equipment."
id = "s-processor"
req_tech = list("programming" = 4, "engineering" = 4)
build_type = IMPRINTER
materials = list("$glass" = 2000, "acid" = 20)
telecomms_server
name = "Circuit Design (Subspace Receiver)"
desc = "Allows for the construction of Telecommunications Servers."
id = "s-server"
req_tech = list("programming" = 4, "engineering" = 4)
build_type = IMPRINTER
materials = list("$glass" = 2000, "acid" = 20)
subspace_broadcaster
name = "Circuit Design (Subspace Broadcaster)"
desc = "Allows for the construction of Subspace Broadcasting equipment."
id = "s-broadcaster"
req_tech = list("programming" = 4, "engineering" = 4, "bluespace" = 2)
build_type = IMPRINTER
materials = list("$glass" = 2000, "acid" = 20)
/////////////////////////////////// ///////////////////////////////////
/////Non-Board Computer Stuff////// /////Non-Board Computer Stuff//////
/////////////////////////////////// ///////////////////////////////////
@@ -880,6 +942,69 @@ datum
reliability_base = 75 reliability_base = 75
build_path = "/obj/item/weapon/stock_parts/matter_bin/super" build_path = "/obj/item/weapon/stock_parts/matter_bin/super"
subspace_ansible
name = "Subspace Ansible"
desc = "A compact module capable of sensing extradimensional activity."
id = "s-ansible"
req_tech = list("programming" = 3, "magnets" = 4, "materials" = 4, "bluespace" = 2)
build_type = PROTOLATHE
materials = list("$metal" = 80, "$silver" = 20)
build_path = "/obj/item/weapon/stock_parts/subspace/ansible"
hyperwave_filter
name = "Hyperwave Filter"
desc = "A tiny device capable of filtering and converting super-intense radiowaves."
id = "s-filter"
req_tech = list("programming" = 3, "magnets" = 3)
build_type = PROTOLATHE
materials = list("$metal" = 40, "$silver" = 10)
build_path = "/obj/item/weapon/stock_parts/subspace/filter"
subspace_amplifier
name = "Subspace Amplifier"
desc = "A compact micro-machine capable of amplifying weak subspace transmissions."
id = "s-amplifier"
req_tech = list("programming" = 3, "magnets" = 4, "materials" = 4, "bluespace" = 2)
build_type = PROTOLATHE
materials = list("$metal" = 10, "$gold" = 30, "$uranium" = 15)
build_path = "/obj/item/weapon/stock_parts/subspace/amplifier"
subspace_treatment
name = "Subspace Treatment Disk"
desc = "A compact micro-machine capable of stretching out hyper-compressed radio waves."
id = "s-amplifier"
req_tech = list("programming" = 3, "magnets" = 2, "materials" = 4, "bluespace" = 2)
build_type = PROTOLATHE
materials = list("$metal" = 10, "$silver" = 20)
build_path = "/obj/item/weapon/stock_parts/subspace/treatment"
subspace_analyzer
name = "Subspace Treatment Disk"
desc = "A sophisticated analyzer capable of analyzing cryptic subspace wavelengths."
id = "s-amplifier"
req_tech = list("programming" = 3, "magnets" = 4, "materials" = 4, "bluespace" = 2)
build_type = PROTOLATHE
materials = list("$metal" = 10, "$gold" = 15)
build_path = "/obj/item/weapon/stock_parts/subspace/analyzer"
subspace_crystal
name = "Ansible Crystal"
desc = "A sophisticated analyzer capable of analyzing cryptic subspace wavelengths."
id = "s-amplifier"
req_tech = list("magnets" = 4, "materials" = 4, "bluespace" = 2)
build_type = PROTOLATHE
materials = list("$glass" = 1000, "$silver" = 20, "$gold" = 20)
build_path = "/obj/item/weapon/stock_parts/subspace/crystal"
subspace_transmitter
name = "Subspace Transmitter"
desc = "A large piece of equipment used to open a window into the subspace dimension."
id = "s-amplifier"
req_tech = list("magnets" = 5, "materials" = 5, "bluespace" = 3)
build_type = PROTOLATHE
materials = list("$glass" = 100, "$silver" = 10, "$uranium" = 15)
build_path = "/obj/item/weapon/stock_parts/subspace/transmitter"
//////////////////////////////////////// ////////////////////////////////////////
//////////////////Power///////////////// //////////////////Power/////////////////
//////////////////////////////////////// ////////////////////////////////////////

View File

@@ -44,7 +44,6 @@ won't update every console in existence) but it's more of a hassle to do. Also,
screen = 1.0 //Which screen is currently showing. screen = 1.0 //Which screen is currently showing.
id = 0 //ID of the computer (for server restrictions). id = 0 //ID of the computer (for server restrictions).
sync = 1 //If sync = 0, it doesn't show up on Server Control Console sync = 1 //If sync = 0, it doesn't show up on Server Control Console
emagged = 0 //Turns off ID check
req_access = list(access_tox) //Data and setting manipulation requires scientist access. req_access = list(access_tox) //Data and setting manipulation requires scientist access.

View File

@@ -165,7 +165,6 @@
servers = list() servers = list()
consoles = list() consoles = list()
badmin = 0 badmin = 0
emagged = 0
Topic(href, href_list) Topic(href, href_list)
if(..()) if(..())

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 17 KiB

File diff suppressed because it is too large Load Diff