mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Revert "Revert "Saycode/language/species port from Bay""
This reverts commit d54579850c.
Conflicts:
code/game/gamemodes/nuclear/nuclearbomb.dm
code/game/objects/items/devices/radio/intercom.dm
code/modules/mob/living/silicon/pai/pai.dm
This commit is contained in:
@@ -2268,6 +2268,7 @@ area/security/podbay
|
||||
|
||||
/area/awaycontent
|
||||
name = "space"
|
||||
report_alerts = 0
|
||||
|
||||
/area/awaycontent/a1
|
||||
icon_state = "awaycontent1"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
// flags: See below, bitfield.
|
||||
#define MUTCHK_FORCED 1
|
||||
/proc/domutcheck(var/mob/living/M, var/connected=null, var/flags=0)
|
||||
|
||||
for(var/datum/dna/gene/gene in dna_genes)
|
||||
if(!M || !M.dna)
|
||||
return
|
||||
@@ -75,6 +76,14 @@
|
||||
var/gene_active = (gene.flags & GENE_ALWAYS_ACTIVATE)
|
||||
if(!gene_active)
|
||||
gene_active = M.dna.GetSEState(gene.block)
|
||||
|
||||
var/defaultgenes // Do not mutate inherent species abilities
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
defaultgenes = H.species.default_genes
|
||||
|
||||
if((gene in defaultgenes) && gene_active)
|
||||
return
|
||||
|
||||
// Prior state
|
||||
var/gene_prior_status = (gene.type in M.active_genes)
|
||||
|
||||
@@ -335,7 +335,7 @@
|
||||
|
||||
if(L)
|
||||
usr.attack_log += text("\[[time_stamp()]\] <font color='red'>[usr.real_name] ([usr.ckey]) cast the spell [name] on [L.real_name] ([L.ckey]).</font>")
|
||||
msg_admin_attack("[usr.real_name] ([usr.ckey]) has cast the spell [name] on [L.real_name] ([L.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[usr.x];Y=[usr.y];Z=[usr.z]'>JMP</a>)")
|
||||
msg_admin_attack("[usr.real_name] ([usr.ckey]) has cast the spell [name] on [L.real_name] ([L.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[usr.x];Y=[usr.y];Z=[usr.z]'>JMP</a>)")
|
||||
|
||||
L.adjust_fire_stacks(0.5)
|
||||
L.visible_message("\red <b>[L.name]</b> suddenly bursts into flames!")
|
||||
|
||||
@@ -162,12 +162,12 @@
|
||||
H.visible_message("\red [usr] sprays a cloud of fine ice crystals, engulfing [H]!",
|
||||
"<span class='notice'>[usr] sprays a cloud of fine ice crystals over your [H.head]'s visor.</span>")
|
||||
log_admin("[ckey(usr.key)] has used cryokinesis on [ckey(C.key)], internals yes, suit yes")
|
||||
msg_admin_attack("[usr.real_name] ([usr.ckey]) has cast cryokinesis on [C.real_name] ([C.ckey]), (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[usr.x];Y=[usr.y];Z=[usr.z]'>JMP</a>)")
|
||||
msg_admin_attack("[usr.real_name] ([usr.ckey]) has cast cryokinesis on [C.real_name] ([C.ckey]), (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[usr.x];Y=[usr.y];Z=[usr.z]'>JMP</a>)")
|
||||
else
|
||||
H.visible_message("\red [usr] sprays a cloud of fine ice crystals engulfing, [H]!",
|
||||
"<span class='warning'>[usr] sprays a cloud of fine ice crystals cover your [H.head]'s visor and make it into your air vents!.</span>")
|
||||
log_admin("[usr.real_name] ([ckey(usr.key)]) has used cryokinesis on [C.real_name] ([ckey(C.key)]), (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[usr.x];Y=[usr.y];Z=[usr.z]'>)")
|
||||
msg_admin_attack("[usr.real_name] ([usr.ckey]) has cast cryokinesis on [C.real_name] ([C.ckey]), (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[usr.x];Y=[usr.y];Z=[usr.z]'>JMP</a>)")
|
||||
msg_admin_attack("[usr.real_name] ([usr.ckey]) has cast cryokinesis on [C.real_name] ([C.ckey]), (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[usr.x];Y=[usr.y];Z=[usr.z]'>JMP</a>)")
|
||||
H.bodytemperature = max(0, H.bodytemperature - 50)
|
||||
H.adjustFireLoss(5)
|
||||
if(!handle_suit)
|
||||
@@ -177,7 +177,7 @@
|
||||
|
||||
C.visible_message("\red [usr] sprays a cloud of fine ice crystals, engulfing [C]!")
|
||||
log_admin("[ckey(usr.key)] has used cryokinesis on [ckey(C.key)], internals no, suit no")
|
||||
msg_admin_attack("[usr.real_name] ([usr.ckey]) has cast cryokinesis on [C.real_name] ([C.ckey]), (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[usr.x];Y=[usr.y];Z=[usr.z]'>JMP</a>)")
|
||||
msg_admin_attack("[usr.real_name] ([usr.ckey]) has cast cryokinesis on [C.real_name] ([C.ckey]), (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[usr.x];Y=[usr.y];Z=[usr.z]'>JMP</a>)")
|
||||
|
||||
//playsound(usr.loc, 'bamf.ogg', 50, 0)
|
||||
|
||||
|
||||
@@ -310,13 +310,4 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
|
||||
user << "<span class='warning'>We already have this DNA in storage!</span>"
|
||||
|
||||
return 1
|
||||
|
||||
//More snowflake stuff, but for languages.
|
||||
/datum/changeling/proc/changeling_update_languages(var/updated_languages, var/mob/living/carbon/user)
|
||||
if(!istype(user) || !user)
|
||||
return
|
||||
user.languages = list()
|
||||
for(var/language in updated_languages)
|
||||
user.languages += language
|
||||
|
||||
return
|
||||
|
||||
@@ -360,10 +360,11 @@ var/list/sting_paths
|
||||
sting_paths = init_subtypes(/obj/effect/proc_holder/changeling)
|
||||
if(mind.changeling.purchasedpowers)
|
||||
remove_changeling_powers(1)
|
||||
|
||||
add_language("Changeling")
|
||||
|
||||
for(var/language in languages)
|
||||
if(!(language in mind.changeling.absorbed_languages))
|
||||
mind.changeling.absorbed_languages += language
|
||||
mind.changeling.absorbed_languages |= language
|
||||
|
||||
// purchase free powers.
|
||||
for(var/obj/effect/proc_holder/changeling/path in sting_paths)
|
||||
@@ -376,6 +377,17 @@ var/list/sting_paths
|
||||
var/mob/living/carbon/C = src //only carbons have dna now, so we have to typecaste
|
||||
mind.changeling.absorbed_dna |= C.dna
|
||||
return 1
|
||||
|
||||
//Used to dump the languages from the changeling datum into the actual mob.
|
||||
/mob/proc/changeling_update_languages(var/updated_languages)
|
||||
|
||||
for(var/datum/language/L in updated_languages)
|
||||
add_language("L.name")
|
||||
|
||||
//This isn't strictly necessary but just to be safe...
|
||||
add_language("Changeling")
|
||||
|
||||
return
|
||||
|
||||
/datum/changeling/proc/reset()
|
||||
chosen_sting = null
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
for(var/language in T.languages)
|
||||
if(!(language in absorbed_languages))
|
||||
absorbed_languages += language
|
||||
changeling_update_languages(absorbed_languages, user)
|
||||
T.changeling_update_languages(absorbed_languages)
|
||||
|
||||
absorbedcount++
|
||||
store_dna(new_dna, user)
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
I.implanted = O
|
||||
|
||||
user.mind.transfer_to(O)
|
||||
O.mind.changeling.changeling_update_languages(changeling.absorbed_languages)
|
||||
O.changeling_update_languages(changeling.absorbed_languages)
|
||||
O.mind.changeling.purchasedpowers -= src
|
||||
//O.mind.changeling.purchasedpowers += new /obj/effect/proc_holder/changeling/lesserform(null)
|
||||
feedback_add_details("changeling_powers","LFT")
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
C.mind.transfer_to(O)
|
||||
O.mind.changeling.purchasedpowers += new /obj/effect/proc_holder/changeling/humanform(null)
|
||||
O.mind.changeling.changeling_update_languages(changeling.absorbed_languages)
|
||||
O.changeling_update_languages(changeling.absorbed_languages)
|
||||
|
||||
feedback_add_details("changeling_powers","LF")
|
||||
qdel(C)
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
user.set_species()
|
||||
user.UpdateAppearance()
|
||||
domutcheck(user, null)
|
||||
|
||||
user.changeling_update_languages(changeling.absorbed_languages)
|
||||
|
||||
feedback_add_details("changeling_powers","TR")
|
||||
return 1
|
||||
|
||||
@@ -1351,21 +1351,21 @@ ________________________________________________________________________________
|
||||
var/chance = rand(1,100)
|
||||
switch(chance)
|
||||
if(1 to 70)//High chance of a regular name.
|
||||
voice = "[rand(0,1)==1?pick(first_names_female):pick(first_names_male)] [pick(last_names)]"
|
||||
changer.voice = "[rand(0,1)==1?pick(first_names_female):pick(first_names_male)] [pick(last_names)]"
|
||||
if(71 to 80)//Smaller chance of a clown name.
|
||||
voice = "[pick(clown_names)]"
|
||||
changer.voice = "[pick(clown_names)]"
|
||||
if(81 to 90)//Small chance of a wizard name.
|
||||
voice = "[pick(wizard_first)] [pick(wizard_second)]"
|
||||
changer.voice = "[pick(wizard_first)] [pick(wizard_second)]"
|
||||
if(91 to 100)//Small chance of an existing crew name.
|
||||
var/names[] = new()
|
||||
for(var/mob/living/carbon/human/M in player_list)
|
||||
if(M==U||!M.client||!M.real_name) continue
|
||||
names.Add(M.real_name)
|
||||
voice = !names.len ? "Cuban Pete" : pick(names)
|
||||
U << "You are now mimicking <B>[voice]</B>."
|
||||
changer.voice = !names.len ? "Cuban Pete" : pick(names)
|
||||
U << "You are now mimicking <B>[changer.voice]</B>."
|
||||
else
|
||||
U << "The voice synthesizer is [voice!="Unknown"?"now":"already"] deactivated."
|
||||
voice = "Unknown"
|
||||
U << "The voice synthesizer is [changer.voice!="Unknown"?"now":"already"] deactivated."
|
||||
changer.voice = "Unknown"
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/gas/voice/space_ninja/proc/switchm()
|
||||
@@ -1408,7 +1408,7 @@ ________________________________________________________________________________
|
||||
if(3)
|
||||
mode = "Meson Scanner"
|
||||
usr << "<B>[mode]</B> is active."//Leaving usr here since it may be on the floor or on a person.
|
||||
usr << "Voice mimicking algorithm is set <B>[!vchange?"inactive":"active"]</B>."
|
||||
usr << "Voice mimicking algorithm is set <B>[!changer.active?"inactive":"active"]</B>."
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -132,6 +132,7 @@ proc/issyndicate(mob/living/M as mob)
|
||||
synd_mind.current.loc = synd_spawn[spawnpos]
|
||||
|
||||
forge_syndicate_objectives(synd_mind)
|
||||
create_syndicate(synd_mind)
|
||||
greet_syndicate(synd_mind)
|
||||
equip_syndicate(synd_mind.current)
|
||||
|
||||
@@ -162,7 +163,38 @@ proc/issyndicate(mob/living/M as mob)
|
||||
spawn (rand(waittime_l, waittime_h))
|
||||
send_intercept()
|
||||
return ..()
|
||||
|
||||
/datum/game_mode/proc/create_syndicate(var/datum/mind/synd_mind) // So we don't have inferior species as ops - randomize a human
|
||||
var/mob/living/carbon/human/M = synd_mind.current
|
||||
M.set_species("Human",1)
|
||||
M.dna.ready_dna(M) // Quadriplegic Nuke Ops won't be participating in the paralympics
|
||||
|
||||
var/hair_c = pick("#8B4513","#000000","#FF4500","#FFD700") // Brown, black, red, blonde
|
||||
var/eye_c = pick("#000000","#8B4513","1E90FF") // Black, brown, blue
|
||||
var/skin_tone = pick(35, 60, 75, 90, 105, 120, 135, 150) // Caucasian - black
|
||||
var/hair_style = "Bald"
|
||||
var/facial_hair_style = "Shaved"
|
||||
if(M.gender == MALE)
|
||||
hair_style = pick(hair_styles_male_list)
|
||||
facial_hair_style = pick(facial_hair_styles_list)
|
||||
else
|
||||
hair_style = pick(hair_styles_female_list)
|
||||
if(prob(5))
|
||||
facial_hair_style = pick(facial_hair_styles_list)
|
||||
|
||||
M.r_facial = hex2num(copytext(hair_c, 2, 4))
|
||||
M.g_facial = hex2num(copytext(hair_c, 4, 6))
|
||||
M.b_facial = hex2num(copytext(hair_c, 6, 8))
|
||||
M.r_hair = hex2num(copytext(hair_c, 2, 4))
|
||||
M.g_hair = hex2num(copytext(hair_c, 4, 6))
|
||||
M.b_hair = hex2num(copytext(hair_c, 6, 8))
|
||||
M.r_eyes = hex2num(copytext(eye_c, 2, 4))
|
||||
M.g_eyes = hex2num(copytext(eye_c, 4, 6))
|
||||
M.b_eyes = hex2num(copytext(eye_c, 6, 8))
|
||||
M.s_tone = skin_tone + 35
|
||||
M.s_tone = -M.s_tone + 35
|
||||
M.h_style = hair_style
|
||||
M.f_style = facial_hair_style
|
||||
|
||||
/datum/game_mode/proc/prepare_syndicate_leader(var/datum/mind/synd_mind, var/nuke_code)
|
||||
var/leader_title = pick("Czar", "Boss", "Commander", "Chief", "Kingpin", "Director", "Overlord")
|
||||
|
||||
@@ -23,10 +23,7 @@ var/bomb_set
|
||||
var/timing_wire
|
||||
var/removal_stage = 0 // 0 is no removal, 1 is covers removed, 2 is covers open, 3 is sealant open, 4 is unwrenched, 5 is removed from bolts.
|
||||
var/lastentered
|
||||
var/data[0]
|
||||
var/uiwidth
|
||||
var/uiheight
|
||||
var/uititle
|
||||
flags = FPRINT
|
||||
use_power = 0
|
||||
unacidable = 1
|
||||
|
||||
@@ -84,7 +81,7 @@ var/bomb_set
|
||||
|
||||
if (istype(O, /obj/item/device/multitool) || istype(O, /obj/item/weapon/wirecutters))
|
||||
ui_interact(user)
|
||||
|
||||
|
||||
if (src.extended)
|
||||
if (istype(O, /obj/item/weapon/disk/nuclear))
|
||||
usr.drop_item()
|
||||
@@ -186,8 +183,12 @@ var/bomb_set
|
||||
|
||||
obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
|
||||
ui_interact(user)
|
||||
|
||||
|
||||
/obj/machinery/nuclearbomb/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
var/data[0]
|
||||
var/uiwidth
|
||||
var/uiheight
|
||||
var/uititle
|
||||
if(!src.opened)
|
||||
data["hacking"] = 0
|
||||
data["auth"] = src.auth
|
||||
@@ -197,12 +198,12 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
|
||||
else
|
||||
data["authstatus"] = "Auth. S2"
|
||||
else
|
||||
if (src.timing)
|
||||
if (src.timing)
|
||||
data["authstatus"] = "Set"
|
||||
else
|
||||
data["authstatus"] = "Auth. S1"
|
||||
data["safe"] = src.safety ? "Safe" : "Engaged"
|
||||
data["time"] = src.timeleft
|
||||
data["safe"] = src.safety ? "Safe" : "Engaged"
|
||||
data["time"] = src.timeleft
|
||||
data["timer"] = src.timing
|
||||
data["safety"] = src.safety
|
||||
data["anchored"] = src.anchored
|
||||
@@ -217,7 +218,7 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
|
||||
uititle = "Nuke Control Panel"
|
||||
else
|
||||
data["hacking"] = 1
|
||||
var/list/tempwires[0]
|
||||
var/list/tempwires[0]
|
||||
for(var/wire in src.wires)
|
||||
tempwires.Add(list(list("name" = wire, "cut" = src.wires[wire])))
|
||||
data["wires"] = tempwires
|
||||
@@ -227,10 +228,10 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
|
||||
uiwidth = 420
|
||||
uiheight = 440
|
||||
uititle = "Nuclear Bomb Defusion"
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "nuclear_bomb.tmpl", uititle, uiwidth, uiheight)
|
||||
ui.set_initial_data(data)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/nuclearbomb/verb/make_deployable()
|
||||
@@ -337,8 +338,8 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
|
||||
if (src.timing == -1.0)
|
||||
return
|
||||
if (src.safety)
|
||||
usr << "\red The safety is still on."
|
||||
nanomanager.update_uis(src)
|
||||
usr << "\red The safety is still on."
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
src.timing = !( src.timing )
|
||||
if (src.timing)
|
||||
@@ -426,7 +427,7 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
|
||||
if(ticker.mode.name == "nuclear emergency")
|
||||
ticker.mode:nukes_left --
|
||||
else if(off_station == 1)
|
||||
world << "<b>A nuclear device was set off, but the explosion was out of reach of the station!</b>"
|
||||
world << "<b>A nuclear device was set off, but the explosion was out of reach of the station!</b>"
|
||||
else if(off_station == 2)
|
||||
world << "<b>A nuclear device was set off, but the device was not on the station!</b>"
|
||||
else
|
||||
|
||||
@@ -727,10 +727,14 @@ datum/objective/absorb
|
||||
var/n_p = 1 //autowin
|
||||
if (ticker.current_state == GAME_STATE_SETTING_UP)
|
||||
for(var/mob/new_player/P in player_list)
|
||||
if(P.client && P.ready && P.mind!=owner)
|
||||
if(P.client && P.ready && P.mind != owner)
|
||||
if(P.client.prefs && (P.client.prefs.species == "Vox" || P.client.prefs.species == "Slime People" || P.client.prefs.species == "Machine")) // Special check for species that can't be absorbed. No better solution.
|
||||
continue
|
||||
n_p ++
|
||||
else if (ticker.current_state == GAME_STATE_PLAYING)
|
||||
for(var/mob/living/carbon/human/P in player_list)
|
||||
if((P.species.flags & IS_SYNTHETIC) || (P.species.flags & NO_SCAN))
|
||||
continue
|
||||
if(P.client && !(P.mind in ticker.mode.changelings) && P.mind!=owner)
|
||||
n_p ++
|
||||
target_amount = min(target_amount, n_p)
|
||||
|
||||
@@ -134,22 +134,6 @@
|
||||
|
||||
//testing("DNA2: [numsToAssign.len] blocks are unused: [english_list(numsToAssign)]")
|
||||
|
||||
// Run AFTER genetics setup and AFTER species setup.
|
||||
/proc/setup_species()
|
||||
// SPECIES GENETICS FUN
|
||||
for(var/name in all_species)
|
||||
// I hate BYOND. Can't just call while it's in the list.
|
||||
var/datum/species/species = all_species[name]
|
||||
if(species.default_block_names.len>0)
|
||||
testing("Setting up genetics for [species.name] (needs [english_list(species.default_block_names)])")
|
||||
species.default_blocks.Cut()
|
||||
for(var/block=1;block<DNA_SE_LENGTH;block++)
|
||||
if(assigned_blocks[block] in species.default_block_names)
|
||||
testing(" Found [assigned_blocks[block]] ([block])")
|
||||
species.default_blocks.Add(block)
|
||||
if(species.default_blocks.len)
|
||||
all_species[name]=species
|
||||
|
||||
/proc/setupfactions()
|
||||
|
||||
// Populate the factions list:
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
var/remote_disabled = 0 //If enabled, the AI cannot *Remotely* control a bot. It can still control it through cameras.
|
||||
var/mob/living/silicon/ai/calling_ai //Links a bot to the AI calling it.
|
||||
var/obj/item/device/radio/Radio //The bot's radio, for speaking to people.
|
||||
var/radio_frequency //The bot's default radio speaking freqency. Recommended to be on a department frequency.
|
||||
var/radio_name = "Common"
|
||||
//var/emagged = 0 //Urist: Moving that var to the general /bot tree as it's used by most bots
|
||||
var/auto_patrol = 0// set to make bot automatically patrol
|
||||
@@ -339,11 +338,9 @@
|
||||
/obj/machinery/bot/attack_ai(mob/user as mob)
|
||||
attack_hand(user)
|
||||
|
||||
/obj/machinery/bot/proc/speak(var/message, freq, var/freqname = null) //Pass a message to have the bot say() it. Pass a frequency to say it on the radio.
|
||||
/obj/machinery/bot/proc/speak(var/message, var/freqname = null) //Pass a message to have the bot say() it. Pass a frequency to say it on the radio.
|
||||
if((!on) || (!message))
|
||||
return
|
||||
if(freq)
|
||||
Radio.set_frequency(radio_frequency)
|
||||
if(freqname)
|
||||
Radio.autosay(message, src.name, freqname, list(src.z))
|
||||
else
|
||||
@@ -654,7 +651,7 @@ obj/machinery/bot/proc/start_patrol()
|
||||
botcard.access = user_access + prev_access //Adds the user's access, if any.
|
||||
mode = BOT_SUMMON
|
||||
calc_summon_path()
|
||||
speak("Responding.", radio_frequency, radio_name)
|
||||
speak("Responding.", radio_name)
|
||||
return
|
||||
|
||||
// receive response from beacon
|
||||
@@ -741,7 +738,7 @@ obj/machinery/bot/proc/bot_summon()
|
||||
check_bot_access()
|
||||
path = AStar(loc, summon_target, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance_cardinal, 0, 150, id=botcard, exclude=avoid)
|
||||
if(!path || tries >= 5) //Cannot reach target. Give up and announce the issue.
|
||||
speak("Summon command failed, destination unreachable.", radio_frequency, radio_name)
|
||||
speak("Summon command failed, destination unreachable.", radio_name)
|
||||
bot_reset()
|
||||
|
||||
/obj/machinery/bot/proc/summon_step()
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
var/failed_steps
|
||||
var/next_dest
|
||||
var/next_dest_loc
|
||||
radio_frequency = SRV_FREQ //Service
|
||||
radio_name = "Service"
|
||||
bot_type = CLEAN_BOT
|
||||
bot_type_name = "Cleanbot"
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
var/arrest_type = 0 //If true, don't handcuff
|
||||
var/projectile = /obj/item/projectile/energy/electrode //Holder for projectile type
|
||||
var/shoot_sound = 'sound/weapons/Taser.ogg'
|
||||
radio_frequency = SEC_FREQ
|
||||
radio_name = "Security"
|
||||
bot_type = SEC_BOT
|
||||
bot_type_name = "ED-209"
|
||||
@@ -269,7 +268,7 @@ Auto Patrol[]"},
|
||||
|
||||
if(declare_arrests)
|
||||
var/area/location = get_area(src)
|
||||
speak("[arrest_type ? "Detaining" : "Arresting"] level [threatlevel] scumbag <b>[target]</b> in [location].",radio_frequency, radio_name)
|
||||
speak("[arrest_type ? "Detaining" : "Arresting"] level [threatlevel] scumbag <b>[target]</b> in [location].", radio_name)
|
||||
target.visible_message("<span class='danger'>[target] has been stunned by [src]!</span>",\
|
||||
"<span class='userdanger'>[target] has been stunned by [src]!</span></span>")
|
||||
|
||||
|
||||
@@ -49,7 +49,6 @@
|
||||
var/oldloc = null
|
||||
req_one_access = list(access_construction, access_robotics)
|
||||
var/targetdirection
|
||||
radio_frequency = ENG_FREQ //Engineering channel
|
||||
radio_name = "Engineering"
|
||||
bot_type = FLOOR_BOT
|
||||
bot_type_name = "Floorbot"
|
||||
@@ -318,7 +317,7 @@
|
||||
/obj/machinery/bot/floorbot/proc/nag() //Annoy everyone on the channel to refill us!
|
||||
if(!nagged)
|
||||
var/area/location = get_area(src)
|
||||
speak("Requesting refill at <b>[location]</b>!", radio_frequency, radio_name)
|
||||
speak("Requesting refill at <b>[location]</b>!", radio_name)
|
||||
nagged = 1
|
||||
|
||||
/obj/machinery/bot/floorbot/proc/is_hull_breach(var/turf/t) //Ignore space tiles not considered part of a structure, also ignores shuttle docking areas.
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
var/declare_crit = 1 //If active, the bot will transmit a critical patient alert to MedHUD users.
|
||||
var/declare_cooldown = 0 //Prevents spam of critical patient alerts.
|
||||
var/stationary_mode = 0 //If enabled, the Medibot will not move automatically.
|
||||
radio_frequency = MED_FREQ //Medical frequency
|
||||
radio_name = "Medical"
|
||||
//Setting which reagents to use to treat what by default. By id.
|
||||
var/treatment_brute = "tricordrazine"
|
||||
@@ -533,7 +532,7 @@
|
||||
if((skin == "bezerk"))
|
||||
return
|
||||
var/area/location = get_area(src)
|
||||
speak("Medical emergency! [crit_patient ? "<b>[crit_patient]</b>" : "A patient"] is in critical condition at [location]!",radio_frequency, radio_name)
|
||||
speak("Medical emergency! [crit_patient ? "<b>[crit_patient]</b>" : "A patient"] is in critical condition at [location]!", radio_name)
|
||||
declare_cooldown = 1
|
||||
spawn(200) //Twenty seconds
|
||||
declare_cooldown = 0
|
||||
|
||||
@@ -71,7 +71,7 @@ var/global/mulebot_count = 0
|
||||
cell.charge = 2000
|
||||
cell.maxcharge = 2000
|
||||
|
||||
spawn(5) // must wait for map loading to finish
|
||||
spawn(50) // must wait for map loading to finish
|
||||
add_to_beacons(bot_filter)
|
||||
|
||||
mulebot_count += 1
|
||||
@@ -238,7 +238,7 @@ var/global/mulebot_count = 0
|
||||
|
||||
//user << browse("<HEAD><TITLE>M.U.L.E. Mk. III [suffix ? "([suffix])" : ""]</TITLE></HEAD>[dat]", "window=mulebot;size=350x500")
|
||||
//onclose(user, "mulebot")
|
||||
var/datum/browser/popup = new(user, "mulebot", "M.U.L.E. Mk. V [suffix ? "([suffix])" : ""]", 350, 535)
|
||||
var/datum/browser/popup = new(user, "mulebot", "M.U.L.E. Mk. V [suffix ? "([suffix])" : ""]", 350, 620)
|
||||
popup.set_content(dat)
|
||||
popup.set_title_image(user.browse_rsc_icon(icon, icon_state))
|
||||
popup.open()
|
||||
@@ -313,6 +313,8 @@ var/global/mulebot_count = 0
|
||||
updateDialog()
|
||||
|
||||
if("destination")
|
||||
if(!delivery_beacons.len)
|
||||
post_signal(beacon_freq, "findbeacon", "delivery")
|
||||
refresh=0
|
||||
var/new_dest = input("Select M.U.L.E. Destination", "Mulebot [suffix ? "([suffix])" : ""]", destination) as null|anything in delivery_beacons
|
||||
refresh=1
|
||||
@@ -683,7 +685,6 @@ var/global/mulebot_count = 0
|
||||
// called when bot reaches current target
|
||||
/obj/machinery/bot/mulebot/proc/at_target()
|
||||
if(!reached_target)
|
||||
radio_frequency = SUP_FREQ //Supply channel
|
||||
radio_name = "Supply"
|
||||
Radio.config(list("[radio_name]" = 0))
|
||||
visible_message("[src] makes a chiming sound!", "You hear a chime.")
|
||||
@@ -696,12 +697,11 @@ var/global/mulebot_count = 0
|
||||
calling_ai << "<span class='notice'>\icon[src] [src] wirelessly plays a chiming sound!</span>"
|
||||
playsound(calling_ai, 'sound/machines/chime.ogg',40, 0)
|
||||
calling_ai = null
|
||||
radio_frequency = AIPRIV_FREQ //Report on AI Private instead if the AI is controlling us.
|
||||
radio_name = "AI Private"
|
||||
Radio.config(list("[radio_name]" = 0))
|
||||
|
||||
if(load) // if loaded, unload at target
|
||||
speak("Destination <b>[destination]</b> reached. Unloading [load].", radio_frequency, radio_name)
|
||||
speak("Destination <b>[destination]</b> reached. Unloading [load].", radio_name)
|
||||
unload(loaddir)
|
||||
else
|
||||
// not loaded
|
||||
@@ -717,7 +717,7 @@ var/global/mulebot_count = 0
|
||||
if(AM)
|
||||
load(AM)
|
||||
if(report_delivery)
|
||||
speak("Now loading [load] at <b>[get_area(src)]</b>.", radio_frequency, radio_name)
|
||||
speak("Now loading [load] at <b>[get_area(src)]</b>.", radio_name)
|
||||
// whatever happened, check to see if we return home
|
||||
|
||||
if(auto_return && destination != home_destination)
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
var/arrest_type = 0 //If true, don't handcuff
|
||||
var/harmbaton = 0
|
||||
var/base_icon = "secbot"
|
||||
radio_frequency = SEC_FREQ //Security channel
|
||||
radio_name = "Security"
|
||||
bot_type = SEC_BOT
|
||||
bot_type_name = "Secbot"
|
||||
@@ -50,7 +49,6 @@
|
||||
/obj/machinery/bot/secbot/pingsky
|
||||
name = "Officer Pingsky"
|
||||
desc = "It's Officer Pingsky! Delegated to satellite guard duty for harbouring anti-human sentiment."
|
||||
radio_frequency = AIPRIV_FREQ
|
||||
radio_name = "AI Private"
|
||||
|
||||
/obj/machinery/bot/secbot/ofitser
|
||||
@@ -256,7 +254,7 @@ Auto Patrol: []"},
|
||||
|
||||
if(declare_arrests)
|
||||
var/area/location = get_area(src)
|
||||
speak("[arrest_type ? "Detaining" : "Arresting"] level [threatlevel] scumbag <b>[target]</b> in [location].",radio_frequency, radio_name)
|
||||
speak("[arrest_type ? "Detaining" : "Arresting"] level [threatlevel] scumbag <b>[target]</b> in [location].", radio_name)
|
||||
target.visible_message("<span class='danger'>[target] has been [harmbaton ? "beaten" : "stunned"] by [src]!</span>",\
|
||||
"<span class='userdanger'>[target] has been [harmbaton ? "beaten" : "stunned"] by [src]!</span>")
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/mob/living/silicon/ai/proc/InvalidTurf(turf/T as turf)
|
||||
if(!T)
|
||||
return 1
|
||||
if((T.z in config.station_levels))
|
||||
if((T.z in config.admin_levels))
|
||||
return 1
|
||||
if(T.z > 6)
|
||||
return 1
|
||||
|
||||
@@ -81,13 +81,20 @@ var/const/HOLOPAD_MODE = 0
|
||||
|
||||
/*This is the proc for special two-way communication between AI and holopad/people talking near holopad.
|
||||
For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
/obj/machinery/hologram/holopad/hear_talk(mob/living/M, text, verb)
|
||||
/obj/machinery/hologram/holopad/hear_talk(mob/living/M, text, verb, datum/language/speaking)
|
||||
if(M&&hologram&&master)//Master is mostly a safety in case lag hits or something.
|
||||
if(!master.say_understands(M))//The AI will be able to understand most mobs talking through the holopad.
|
||||
text = stars(text)
|
||||
if(!master.say_understands(M, speaking))//The AI will be able to understand most mobs talking through the holopad.
|
||||
if(speaking)
|
||||
text = speaking.scramble(text)
|
||||
else
|
||||
text = stars(text)
|
||||
var/name_used = M.GetVoice()
|
||||
//This communication is imperfect because the holopad "filters" voices and is only designed to connect to the master only.
|
||||
var/rendered = "<i><span class='game say'>Holopad received, <span class='name'>[name_used]</span> [verb], <span class='message'>\"[text]\"</span></span></i>"
|
||||
var/rendered
|
||||
if(speaking)
|
||||
rendered = "<i><span class='game say'>Holopad received, <span class='name'>[name_used]</span> [speaking.format_message(text, verb)]</span></i>"
|
||||
else
|
||||
rendered = "<i><span class='game say'>Holopad received, <span class='name'>[name_used]</span> [verb], <span class='message'>\"[text]\"</span></span></i>"
|
||||
master.show_message(rendered, 2)
|
||||
return
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
use_power = 1
|
||||
idle_power_usage = 25
|
||||
machinetype = 5
|
||||
heatgen = 0
|
||||
delay = 7
|
||||
circuitboard = "/obj/item/weapon/circuitboard/telecomms/broadcaster"
|
||||
|
||||
@@ -59,7 +58,9 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
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"], signal.data["level"], signal.frequency)
|
||||
signal.data["realname"], signal.data["vname"],,
|
||||
signal.data["compression"], signal.data["level"], signal.frequency,
|
||||
signal.data["verb"], signal.data["language"] )
|
||||
|
||||
|
||||
/** #### - Simple Broadcast - #### **/
|
||||
@@ -84,7 +85,8 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
signal.data["vmask"], signal.data["vmessage"],
|
||||
signal.data["radio"], signal.data["message"],
|
||||
signal.data["name"], signal.data["job"],
|
||||
signal.data["realname"], signal.data["vname"], 4, signal.data["compression"], signal.data["level"], signal.frequency)
|
||||
signal.data["realname"], signal.data["vname"], 4, signal.data["compression"], signal.data["level"], signal.frequency,
|
||||
signal.data["verb"], signal.data["language"])
|
||||
|
||||
if(!message_delay)
|
||||
message_delay = 1
|
||||
@@ -95,7 +97,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
/* --- Do a snazzy animation! --- */
|
||||
flick("broadcaster_send", src)
|
||||
|
||||
/obj/machinery/telecomms/broadcaster/Destroy()
|
||||
/obj/machinery/telecomms/broadcaster/Del()
|
||||
// In case message_delay is left on 1, otherwise it won't reset the list and people can't say the same thing twice anymore.
|
||||
if(message_delay)
|
||||
message_delay = 0
|
||||
@@ -117,7 +119,6 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
use_power = 0
|
||||
idle_power_usage = 0
|
||||
machinetype = 6
|
||||
heatgen = 0
|
||||
var/intercept = 0 // if nonzero, broadcasts all messages to syndicate channel
|
||||
|
||||
/obj/machinery/telecomms/allinone/receive_signal(datum/signal/signal)
|
||||
@@ -142,19 +143,21 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
|
||||
var/datum/radio_frequency/connection = signal.data["connection"]
|
||||
|
||||
if(connection.frequency == SYND_FREQ) // if syndicate broadcast, just
|
||||
if(connection.frequency in ANTAG_FREQS) // if antag broadcast, just
|
||||
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"], list(0), connection.frequency)
|
||||
signal.data["realname"], signal.data["vname"],, signal.data["compression"], list(0), connection.frequency,
|
||||
signal.data["verb"], signal.data["language"])
|
||||
else
|
||||
if(intercept)
|
||||
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"], 3, signal.data["compression"], list(0), connection.frequency)
|
||||
signal.data["realname"], signal.data["vname"], 3, signal.data["compression"], list(0), connection.frequency,
|
||||
signal.data["verb"], signal.data["language"])
|
||||
|
||||
|
||||
|
||||
@@ -218,7 +221,8 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
/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/data, var/compression, var/list/level, var/freq)
|
||||
var/data, var/compression, var/list/level, var/freq, var/verbage = "says", var/datum/language/speaking = null)
|
||||
|
||||
|
||||
/* ###### Prepare the radio connection ###### */
|
||||
|
||||
@@ -246,16 +250,14 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
if(R.receive_range(display_freq, level) > -1)
|
||||
radios += R
|
||||
|
||||
// --- Broadcast to syndicate radio! ---
|
||||
// --- Broadcast to antag radios! ---
|
||||
|
||||
else if(data == 3)
|
||||
|
||||
var/datum/radio_frequency/syndicateconnection = radio_controller.return_frequency(SYND_FREQ)
|
||||
|
||||
for (var/obj/item/device/radio/R in syndicateconnection.devices["[RADIO_CHAT]"])
|
||||
|
||||
if(R.receive_range(SYND_FREQ, level) > -1)
|
||||
radios += R
|
||||
for(var/antag_freq in ANTAG_FREQS)
|
||||
var/datum/radio_frequency/antag_connection = radio_controller.return_frequency(antag_freq)
|
||||
for (var/obj/item/device/radio/R in antag_connection.devices["[RADIO_CHAT]"])
|
||||
if(R.receive_range(antag_freq, level) > -1)
|
||||
radios += R
|
||||
|
||||
// --- Broadcast to ALL radio devices ---
|
||||
|
||||
@@ -283,6 +285,8 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
|
||||
/* --- Loop through the receivers and categorize them --- */
|
||||
|
||||
if (R.client && (R.client.prefs.toggles & CHAT_RADIO)) //Adminning with 80 people on can be fun when you're trying to talk and all you can hear is radios.
|
||||
continue
|
||||
|
||||
if(istype(R, /mob/new_player)) // we don't want new players to hear messages. rare but generates runtimes.
|
||||
continue
|
||||
@@ -324,88 +328,17 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
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(1347)
|
||||
freq_text = "Supply"
|
||||
if(1349)
|
||||
freq_text = "Service"
|
||||
if(1441)
|
||||
freq_text = "Special Ops"
|
||||
if(1443)
|
||||
freq_text = "Response Team"
|
||||
if(1447)
|
||||
freq_text = "AI Private"
|
||||
//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/freq_text = get_frequency_name(display_freq)
|
||||
|
||||
var/part_b_extra = ""
|
||||
if(data == 3) // intercepted radio message
|
||||
part_b_extra = " <i>(Intercepted)</i>"
|
||||
var/part_b = "</span><b> \icon[radio]\[[freq_text]\][part_b_extra]</b> <span class='message'>" // Tweaked for security headsets -- TLE
|
||||
var/part_a = "<span class='[frequency_span_class(display_freq)]'>\icon[radio]<b>\[[freq_text]\][part_b_extra]</b> <span class='name'>" // goes in the actual output
|
||||
|
||||
// --- Some more pre-message formatting ---
|
||||
var/part_b = "</span> <span class='message'>" // Tweaked for security headsets -- TLE
|
||||
var/part_c = "</span></span>"
|
||||
|
||||
// syndies!
|
||||
if (display_freq == SYND_FREQ)
|
||||
part_a = "<span class='syndradio'><span class='name'>"
|
||||
|
||||
// centcomm channels (deathsquid and ert)
|
||||
else if (display_freq in CENT_FREQS)
|
||||
part_a = "<span class='centradio'><span class='name'>"
|
||||
|
||||
// command channel
|
||||
else if (display_freq == COMM_FREQ)
|
||||
part_a = "<span class='comradio'><span class='name'>"
|
||||
|
||||
// AI private channel
|
||||
else if (display_freq == 1447)
|
||||
part_a = "<span class='airadio'><span class='name'>"
|
||||
|
||||
// department radio formatting (poorly optimized, ugh)
|
||||
else if (display_freq == SEC_FREQ)
|
||||
part_a = "<span class='secradio'><span class='name'>"
|
||||
|
||||
else if (display_freq == ENG_FREQ)
|
||||
part_a = "<span class='engradio'><span class='name'>"
|
||||
|
||||
else if (display_freq == SCI_FREQ)
|
||||
part_a = "<span class='sciradio'><span class='name'>"
|
||||
|
||||
else if (display_freq == MED_FREQ)
|
||||
part_a = "<span class='medradio'><span class='name'>"
|
||||
|
||||
else if (display_freq == SUP_FREQ) // cargo
|
||||
part_a = "<span class='supradio'><span class='name'>"
|
||||
|
||||
else if (display_freq == SRV_FREQ) // cargo
|
||||
part_a = "<span class='srvradio'><span class='name'>"
|
||||
// If all else fails and it's a dept_freq, color me purple!
|
||||
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 ---
|
||||
|
||||
@@ -424,133 +357,67 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
//BR.messages_admin += blackbox_admin_msg
|
||||
if(istype(blackbox))
|
||||
switch(display_freq)
|
||||
if(1459)
|
||||
if(PUB_FREQ)
|
||||
blackbox.msg_common += blackbox_msg
|
||||
if(1351)
|
||||
if(SCI_FREQ)
|
||||
blackbox.msg_science += blackbox_msg
|
||||
if(1353)
|
||||
if(COMM_FREQ)
|
||||
blackbox.msg_command += blackbox_msg
|
||||
if(1355)
|
||||
if(MED_FREQ)
|
||||
blackbox.msg_medical += blackbox_msg
|
||||
if(1357)
|
||||
if(ENG_FREQ)
|
||||
blackbox.msg_engineering += blackbox_msg
|
||||
if(1359)
|
||||
if(SEC_FREQ)
|
||||
blackbox.msg_security += blackbox_msg
|
||||
if(1441)
|
||||
if(DTH_FREQ)
|
||||
blackbox.msg_deathsquad += blackbox_msg
|
||||
if(1213)
|
||||
if(SYND_FREQ)
|
||||
blackbox.msg_syndicate += blackbox_msg
|
||||
if(1347)
|
||||
if(SUP_FREQ)
|
||||
blackbox.msg_cargo += blackbox_msg
|
||||
if(1349)
|
||||
if(SRV_FREQ)
|
||||
blackbox.msg_service += blackbox_msg
|
||||
else
|
||||
blackbox.messages += blackbox_msg
|
||||
|
||||
//End of research and feedback code.
|
||||
|
||||
var/aitrack = ""
|
||||
var/aiopen = ""
|
||||
/* ###### 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)
|
||||
aitrack = "<a href='byond://?src=\ref[radio];track2=\ref[R];track=\ref[M]'>"
|
||||
aiopen = "<a href='byond://?src=\ref[radio];open2=\ref[R];open=\ref[M]'>\[OPEN\] </a>"
|
||||
if(data == 4)
|
||||
aitrack = "<a href='byond://?src=\ref[radio];track2=\ref[R];faketrack=\ref[M]'>"
|
||||
|
||||
if(istype(R, /mob/living/silicon/ai))
|
||||
R.show_message("[part_a][aitrack][N] ([J]) </a>[aiopen][part_b][quotedmsg][part_c]", 2)
|
||||
else
|
||||
R.show_message(rendered, 2)
|
||||
R.hear_radio(message,verbage, speaking, part_a, part_b, M, 0, name)
|
||||
|
||||
/* --- Process all the mobs that heard the voice normally (understood) --- */
|
||||
|
||||
if (length(heard_normal))
|
||||
var/rendered = "[part_a][realname][part_b][quotedmsg][part_c]"
|
||||
|
||||
for (var/mob/R in heard_normal)
|
||||
aitrack = "<a href='byond://?src=\ref[radio];track2=\ref[R];track=\ref[M]'>"
|
||||
aiopen = "<a href='byond://?src=\ref[radio];open2=\ref[R];open=\ref[M]'>\[OPEN\] </a>"
|
||||
if(data == 4)
|
||||
aitrack = "<a href='byond://?src=\ref[radio];track2=\ref[R];faketrack=\ref[M]'>"
|
||||
|
||||
if(istype(R, /mob/living/silicon/ai))
|
||||
R.show_message("[part_a][aitrack][realname] ([job]) </a>[aiopen][part_b][quotedmsg][part_c]", 2)
|
||||
else
|
||||
R.show_message(rendered, 2)
|
||||
R.hear_radio(message, verbage, speaking, part_a, part_b, M, 0, realname)
|
||||
|
||||
/* --- Process all the mobs that heard the voice normally (did not understand) --- */
|
||||
|
||||
if (length(heard_voice))
|
||||
var/rendered = "[part_a][vname][part_b][vmessage][part_c]"
|
||||
|
||||
for (var/mob/R in heard_voice)
|
||||
aitrack = "<a href='byond://?src=\ref[radio];track2=\ref[R];track=\ref[M]'>"
|
||||
aiopen = "<a href='byond://?src=\ref[radio];open2=\ref[R];open=\ref[M]'>\[OPEN\] </a>"
|
||||
if(data == 4)
|
||||
aitrack = "<a href='byond://?src=\ref[radio];track2=\ref[R];faketrack=\ref[M]'>"
|
||||
|
||||
|
||||
if(istype(R, /mob/living/silicon/ai))
|
||||
R.show_message("[part_a][aitrack][vname] ([job]) </a>[aiopen][part_b][vmessage]][part_c]", 2)
|
||||
else
|
||||
R.show_message(rendered, 2)
|
||||
R.hear_radio(message,verbage, speaking, part_a, part_b, M,0, vname)
|
||||
|
||||
/* --- 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))
|
||||
if(M)
|
||||
quotedmsg = M.say_quote(stars(message))
|
||||
else
|
||||
quotedmsg = stars(quotedmsg)
|
||||
|
||||
var/rendered = "[part_a][vname][part_b][quotedmsg][part_c]"
|
||||
|
||||
for (var/mob/R in heard_garbled)
|
||||
aitrack = "<a href='byond://?src=\ref[radio];track2=\ref[R];track=\ref[M]'>"
|
||||
aiopen = "<a href='byond://?src=\ref[radio];open2=\ref[R];open=\ref[M]'>\[OPEN\] </a>"
|
||||
if(data == 4)
|
||||
aitrack = "<a href='byond://?src=\ref[radio];track2=\ref[R];faketrack=\ref[M]'>"
|
||||
|
||||
|
||||
if(istype(R, /mob/living/silicon/ai))
|
||||
R.show_message("[part_a][aitrack][vname]</a>[aiopen][part_b][quotedmsg][part_c]", 2)
|
||||
else
|
||||
R.show_message(rendered, 2)
|
||||
R.hear_radio(message, verbage, speaking, part_a, part_b, M, 1, vname)
|
||||
|
||||
|
||||
/* --- Complete gibberish. Usually happens when there's a compressed message --- */
|
||||
|
||||
if (length(heard_gibberish))
|
||||
if(M)
|
||||
quotedmsg = M.say_quote(Gibberish(message, compression + 50))
|
||||
else
|
||||
quotedmsg = Gibberish(quotedmsg, compression + 50)
|
||||
|
||||
var/rendered = "[part_a][Gibberish(name, compression + 50)][part_b][quotedmsg][part_c]"
|
||||
|
||||
for (var/mob/R in heard_gibberish)
|
||||
aitrack = "<a href='byond://?src=\ref[radio];track2=\ref[R];track=\ref[M]'>"
|
||||
aiopen = "<a href='byond://?src=\ref[radio];open2=\ref[R];open=\ref[M]'>\[OPEN\] </a>"
|
||||
if(data == 4)
|
||||
aitrack = "<a href='byond://?src=\ref[radio];track2=\ref[R];faketrack=\ref[M]'>"
|
||||
|
||||
|
||||
if(istype(R, /mob/living/silicon/ai))
|
||||
R.show_message("[part_a][aitrack][Gibberish(realname, compression + 50)] ([Gibberish(job, compression + 50)]) </a>[aiopen][part_b][quotedmsg][part_c]", 2)
|
||||
else
|
||||
R.show_message(rendered, 2)
|
||||
|
||||
R.hear_radio(message, verbage, speaking, part_a, part_b, M, 1)
|
||||
|
||||
return 1
|
||||
|
||||
/proc/Broadcast_SimpleMessage(var/source, var/frequency, var/text, var/data, var/mob/M, var/compression, var/level)
|
||||
|
||||
@@ -588,15 +455,15 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
receive |= R.send_hear(display_freq)
|
||||
|
||||
|
||||
// --- Broadcast to syndicate radio! ---
|
||||
// --- Broadcast to antag radios! ---
|
||||
|
||||
else if(data == 3)
|
||||
var/datum/radio_frequency/syndicateconnection = radio_controller.return_frequency(SYND_FREQ)
|
||||
|
||||
for (var/obj/item/device/radio/R in syndicateconnection.devices["[RADIO_CHAT]"])
|
||||
var/turf/position = get_turf(R)
|
||||
if(position && position.z == level)
|
||||
receive |= R.send_hear(SYND_FREQ)
|
||||
for(var/freq in ANTAG_FREQS)
|
||||
var/datum/radio_frequency/antag_connection = radio_controller.return_frequency(freq)
|
||||
for (var/obj/item/device/radio/R in antag_connection.devices["[RADIO_CHAT]"])
|
||||
var/turf/position = get_turf(R)
|
||||
if(position && position.z == level)
|
||||
receive |= R.send_hear(freq)
|
||||
|
||||
|
||||
// --- Broadcast to ALL radio devices ---
|
||||
@@ -621,6 +488,8 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
|
||||
/* --- Loop through the receivers and categorize them --- */
|
||||
|
||||
if (R.client && !(R.client.prefs.toggles & CHAT_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 ---
|
||||
@@ -648,34 +517,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
|
||||
/* --- 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(1347)
|
||||
freq_text = "Supply"
|
||||
if(1349)
|
||||
freq_text = "Service"
|
||||
//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)
|
||||
var/freq_text = get_frequency_name(display_freq)
|
||||
|
||||
// --- Some more pre-message formatting ---
|
||||
|
||||
@@ -689,7 +531,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
var/part_b = "</span><b> \icon[radio]\[[freq_text]\][part_b_extra]</b> <span class='message'>" // Tweaked for security headsets -- TLE
|
||||
var/part_c = "</span></span>"
|
||||
|
||||
if (display_freq==SYND_FREQ)
|
||||
if (display_freq in ANTAG_FREQS)
|
||||
part_a = "<span class='syndradio'><span class='name'>"
|
||||
else if (display_freq==COMM_FREQ)
|
||||
part_a = "<span class='comradio'><span class='name'>"
|
||||
@@ -705,25 +547,25 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
//BR.messages_admin += blackbox_admin_msg
|
||||
if(istype(blackbox))
|
||||
switch(display_freq)
|
||||
if(1459)
|
||||
if(PUB_FREQ)
|
||||
blackbox.msg_common += blackbox_msg
|
||||
if(1351)
|
||||
if(SCI_FREQ)
|
||||
blackbox.msg_science += blackbox_msg
|
||||
if(1353)
|
||||
if(COMM_FREQ)
|
||||
blackbox.msg_command += blackbox_msg
|
||||
if(1355)
|
||||
if(MED_FREQ)
|
||||
blackbox.msg_medical += blackbox_msg
|
||||
if(1357)
|
||||
if(ENG_FREQ)
|
||||
blackbox.msg_engineering += blackbox_msg
|
||||
if(1359)
|
||||
if(SEC_FREQ)
|
||||
blackbox.msg_security += blackbox_msg
|
||||
if(1441)
|
||||
if(DTH_FREQ)
|
||||
blackbox.msg_deathsquad += blackbox_msg
|
||||
if(1213)
|
||||
if(SYND_FREQ)
|
||||
blackbox.msg_syndicate += blackbox_msg
|
||||
if(1347)
|
||||
if(SUP_FREQ)
|
||||
blackbox.msg_cargo += blackbox_msg
|
||||
if(1349)
|
||||
if(SRV_FREQ)
|
||||
blackbox.msg_service += blackbox_msg
|
||||
else
|
||||
blackbox.messages += blackbox_msg
|
||||
@@ -767,7 +609,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
var/turf/position = get_turf(src)
|
||||
return (position.z in signal.data["level"] && signal.data["done"])
|
||||
|
||||
/atom/proc/telecomms_process()
|
||||
/atom/proc/telecomms_process(var/do_sleep = 1)
|
||||
|
||||
// First, we want to generate a new radio signal
|
||||
var/datum/signal/signal = new
|
||||
@@ -785,13 +627,14 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
"done" = 0,
|
||||
"level" = pos.z // The level it is being broadcasted at.
|
||||
)
|
||||
signal.frequency = 1459// Common channel
|
||||
signal.frequency = PUB_FREQ// Common channel
|
||||
|
||||
//#### Sending the signal to all subspace receivers ####//
|
||||
for(var/obj/machinery/telecomms/receiver/R in telecomms_list)
|
||||
R.receive_signal(signal)
|
||||
|
||||
sleep(rand(10,25))
|
||||
if(do_sleep)
|
||||
sleep(rand(10,25))
|
||||
|
||||
//world.log << "Level: [signal.data["level"]] - Done: [signal.data["done"]]"
|
||||
|
||||
|
||||
@@ -161,19 +161,13 @@
|
||||
<table class="request">
|
||||
<tr>
|
||||
<td class="radio">Transmit:</td>
|
||||
<td><a href='byond://?src=\ref[src];wires=[WIRE_TRANSMIT]'>[(!radio.isWireCut(WIRE_TRANSMIT)) ? "<font color=#55FF55>En" : "<font color=#FF5555>Dis" ]abled</font></a>
|
||||
<td><a href='byond://?src=\ref[src];wires=4'>[radio.broadcasting ? "<font color=#55FF55>En" : "<font color=#FF5555>Dis" ]abled</font></a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="radio">Receive:</td>
|
||||
<td><a href='byond://?src=\ref[src];wires=[WIRE_RECEIVE]'>[(!radio.isWireCut(WIRE_RECEIVE)) ? "<font color=#55FF55>En" : "<font color=#FF5555>Dis" ]abled</font></a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="radio">Signal Pulser:</td>
|
||||
<td><a href='byond://?src=\ref[src];wires=[WIRE_SIGNAL]'>[(!radio.isWireCut(WIRE_SIGNAL)) ? "<font color=#55FF55>En" : "<font color=#FF5555>Dis" ]abled</font></a>
|
||||
<td><a href='byond://?src=\ref[src];wires=2'>[radio.listening ? "<font color=#55FF55>En" : "<font color=#FF5555>Dis" ]abled</font></a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
@@ -265,8 +259,11 @@
|
||||
removePersonality()
|
||||
if(href_list["wires"])
|
||||
var/t1 = text2num(href_list["wires"])
|
||||
if(radio)
|
||||
radio.wires.CutWireIndex(t1)
|
||||
switch(t1)
|
||||
if(4)
|
||||
radio.ToggleBroadcast()
|
||||
if(2)
|
||||
radio.ToggleReception()
|
||||
if(href_list["setlaws"])
|
||||
var/newlaws = copytext(sanitize(input("Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws) as message),1,MAX_MESSAGE_LEN)
|
||||
if(newlaws)
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
|
||||
/obj/item/device/radio/headset/heads/captain/alt
|
||||
name = "\proper the captain's bowman headset"
|
||||
desc = "The headset of the boss. Protects ears from flashbangs. \nChannels are as follows: :c - command, :s - security, :e - engineering, :u - supply, :v - service, :m - medical, :n - science."
|
||||
desc = "The headset of the boss. Protects ears from flashbangs. \nChannels are as follows: :c - command, :s - security, :e - engineering, :u - supply, :zz - service, :m - medical, :n - science."
|
||||
flags = EARBANGPROTECT
|
||||
icon_state = "com_headset_alt"
|
||||
item_state = "com_headset_alt"
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
// 0 = old radios
|
||||
// 1 = new radios (subspace technology)
|
||||
|
||||
|
||||
/obj/item/device/radio
|
||||
icon = 'icons/obj/radio.dmi'
|
||||
name = "station bounced radio"
|
||||
@@ -11,19 +6,18 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
item_state = "walkietalkie"
|
||||
var/on = 1 // 0 for off
|
||||
var/last_transmission
|
||||
var/frequency = 1459 //common chat
|
||||
var/frequency = PUB_FREQ //common chat
|
||||
var/traitor_frequency = 0 //tune to frequency to unlock traitor supplies
|
||||
var/canhear_range = 3 // the range which mobs can hear this radio from
|
||||
var/obj/item/device/radio/patch_link = null
|
||||
var/datum/wires/radio/wires = null
|
||||
var/prison_radio = 0
|
||||
var/b_stat = 0
|
||||
var/broadcasting = 0
|
||||
var/listening = 1
|
||||
var/freerange = 0 // 0 - Sanitize frequencies, 1 - Full range
|
||||
var/list/channels = list() //see communications.dm for full list. First channels is a "default" for :h
|
||||
var/list/channels = list() //see communications.dm for full list. First channes is a "default" for :h
|
||||
var/subspace_transmission = 0
|
||||
var/syndie = 0//Holder to see if it's a syndicate encrypted radio
|
||||
var/syndie = 0//Holder to see if it's a syndicate encrpyed radio
|
||||
var/maxf = 1499
|
||||
// "Example" = FREQ_LISTENING|FREQ_BROADCASTING
|
||||
flags = CONDUCT
|
||||
@@ -31,32 +25,31 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
throw_speed = 2
|
||||
throw_range = 9
|
||||
w_class = 2
|
||||
g_amt = 25
|
||||
|
||||
m_amt = 75
|
||||
|
||||
var/const/TRANSMISSION_DELAY = 5 // only 2/second/radio
|
||||
g_amt = 25
|
||||
var/const/FREQ_LISTENING = 1
|
||||
//FREQ_BROADCASTING = 2
|
||||
var/prison_radio = 0
|
||||
|
||||
var/always_talk=0 // ALWAYS catch signals. Useful for covert listening devices.
|
||||
|
||||
/obj/item/device/radio
|
||||
var/datum/radio_frequency/radio_connection
|
||||
var/list/datum/radio_frequency/secure_radio_connections
|
||||
var/list/datum/radio_frequency/secure_radio_connections = new
|
||||
|
||||
proc/set_frequency(new_frequency)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = radio_controller.add_object(src, frequency, RADIO_CHAT)
|
||||
|
||||
|
||||
/obj/item/device/radio/New()
|
||||
wires = new(src)
|
||||
if(prison_radio)
|
||||
wires.CutWireIndex(WIRE_TRANSMIT)
|
||||
secure_radio_connections = new
|
||||
..()
|
||||
wires = new(src)
|
||||
if(radio_controller)
|
||||
initialize()
|
||||
|
||||
if(prison_radio)
|
||||
wires.CutWireIndex(WIRE_TRANSMIT)
|
||||
|
||||
|
||||
/obj/item/device/radio/initialize()
|
||||
@@ -117,9 +110,16 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
/obj/item/device/radio/proc/text_sec_channel(var/chan_name, var/chan_stat)
|
||||
var/list = !!(chan_stat&FREQ_LISTENING)!=0
|
||||
return {"
|
||||
<B>[chan_name]</B>: <A href='byond://?src=\ref[src];ch_name=[chan_name];listen=[!list]'>[list ? "Engaged" : "Disengaged"]</A><BR>
|
||||
<B>[chan_name]</B><br>
|
||||
Speaker: <A href='byond://?src=\ref[src];ch_name=[chan_name];listen=[!list]'>[list ? "Engaged" : "Disengaged"]</A><BR>
|
||||
"}
|
||||
|
||||
/obj/item/device/radio/proc/ToggleBroadcast()
|
||||
broadcasting = !broadcasting && !(wires.IsIndexCut(WIRE_TRANSMIT) || wires.IsIndexCut(WIRE_SIGNAL))
|
||||
|
||||
/obj/item/device/radio/proc/ToggleReception()
|
||||
listening = !listening && !(wires.IsIndexCut(WIRE_RECEIVE) || wires.IsIndexCut(WIRE_SIGNAL))
|
||||
|
||||
/obj/item/device/radio/Topic(href, href_list)
|
||||
//..()
|
||||
if (usr.stat || !on)
|
||||
@@ -129,13 +129,6 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
usr << browse(null, "window=radio")
|
||||
return
|
||||
usr.set_machine(src)
|
||||
if (href_list["open"])
|
||||
var/mob/target = locate(href_list["open"])
|
||||
var/mob/living/silicon/ai/A = locate(href_list["open2"])
|
||||
if(A && target)
|
||||
A.open_nearest_door(target)
|
||||
return
|
||||
|
||||
if (href_list["track"])
|
||||
var/mob/target = locate(href_list["track"])
|
||||
var/mob/living/silicon/ai/A = locate(href_list["track2"])
|
||||
@@ -143,23 +136,6 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
A.ai_actual_track(target)
|
||||
return
|
||||
|
||||
else if (href_list["faketrack"])
|
||||
var/mob/target = locate(href_list["track"])
|
||||
var/mob/living/silicon/ai/A = locate(href_list["track2"])
|
||||
if(A && target)
|
||||
|
||||
A:cameraFollow = target
|
||||
A << text("Now tracking [] on camera.", target.name)
|
||||
if (usr.machine == null)
|
||||
usr.machine = usr
|
||||
|
||||
while (usr:cameraFollow == target)
|
||||
usr << "Target is not on or near any active cameras on the station. We'll check again in 5 seconds (unless you use the cancel-camera verb)."
|
||||
sleep(40)
|
||||
continue
|
||||
|
||||
return
|
||||
|
||||
else if (href_list["freq"])
|
||||
var/new_frequency = (frequency + text2num(href_list["freq"]))
|
||||
if (!freerange || (frequency < 1200 || frequency > 1600))
|
||||
@@ -171,16 +147,17 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
return
|
||||
|
||||
else if (href_list["talk"])
|
||||
broadcasting = text2num(href_list["talk"])
|
||||
ToggleBroadcast()
|
||||
else if (href_list["listen"])
|
||||
var/chan_name = href_list["ch_name"]
|
||||
if (!chan_name)
|
||||
listening = text2num(href_list["listen"])
|
||||
ToggleReception()
|
||||
else
|
||||
if (channels[chan_name] & FREQ_LISTENING)
|
||||
channels[chan_name] &= ~FREQ_LISTENING
|
||||
else
|
||||
channels[chan_name] |= FREQ_LISTENING
|
||||
|
||||
if (!( master ))
|
||||
if (istype(loc, /mob))
|
||||
interact(loc)
|
||||
@@ -193,10 +170,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
updateDialog()
|
||||
add_fingerprint(usr)
|
||||
|
||||
/obj/item/device/radio/proc/isWireCut(var/index)
|
||||
return wires.IsIndexCut(index)
|
||||
|
||||
/obj/item/device/radio/proc/autosay(var/message, var/from, var/channel, var/zlevel = list(1)) //BS12 EDIT
|
||||
/obj/item/device/radio/proc/autosay(var/message, var/from, var/channel, var/zlevel = config.contact_levels) //BS12 EDIT
|
||||
var/datum/radio_frequency/connection = null
|
||||
if(channel && channels && channels.len > 0)
|
||||
if (channel == "department")
|
||||
@@ -219,173 +193,115 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
del(A)
|
||||
return
|
||||
|
||||
/obj/item/device/radio/talk_into(mob/living/M as mob, message, channel)
|
||||
if(!on) return // the device has to be on
|
||||
// Interprets the message mode when talking into a radio, possibly returning a connection datum
|
||||
/obj/item/device/radio/proc/handle_message_mode(mob/living/M as mob, message, message_mode)
|
||||
// If a channel isn't specified, send to common.
|
||||
if(!message_mode || message_mode == "headset")
|
||||
return radio_connection
|
||||
|
||||
// Otherwise, if a channel is specified, look for it.
|
||||
if(channels && channels.len > 0)
|
||||
if (message_mode == "department") // Department radio shortcut
|
||||
message_mode = channels[1]
|
||||
|
||||
if (channels[message_mode]) // only broadcast if the channel is set on
|
||||
return secure_radio_connections[message_mode]
|
||||
|
||||
// If we were to send to a channel we don't have, drop it.
|
||||
return null
|
||||
|
||||
/obj/item/device/radio/talk_into(mob/living/M as mob, message, channel, var/verb = "says", var/datum/language/speaking = null)
|
||||
if(!on) return 0 // the device has to be on
|
||||
// Fix for permacell radios, but kinda eh about actually fixing them.
|
||||
if(!M || !message) return
|
||||
if(!M || !message) return 0
|
||||
|
||||
// Uncommenting this. To the above comment:
|
||||
// The permacell radios aren't suppose to be able to transmit, this isn't a bug and this "fix" is just making radio wires useless. -Giacom
|
||||
if(isWireCut(WIRE_TRANSMIT)) // The device has to have all its wires and shit intact
|
||||
return
|
||||
if(wires.IsIndexCut(WIRE_TRANSMIT)) // The device has to have all its wires and shit intact
|
||||
return 0
|
||||
|
||||
M.last_target_click = world.time
|
||||
|
||||
/* 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 = handle_message_mode(M, message, channel)
|
||||
if (!istype(connection))
|
||||
return 0
|
||||
if (!connection)
|
||||
return 0
|
||||
|
||||
var/turf/position = get_turf(src)
|
||||
|
||||
//#### 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
|
||||
|
||||
|
||||
if(GLOBAL_RADIO_TYPE == 1) // NEW RADIO SYSTEMS: By Doohl
|
||||
var/jobname // the mob's "job"
|
||||
|
||||
/* 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.
|
||||
// --- Human: use their actual job ---
|
||||
if (ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
jobname = H.get_assignment()
|
||||
|
||||
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.
|
||||
*/
|
||||
// --- Carbon Nonhuman ---
|
||||
else if (iscarbon(M)) // Nonhuman carbon mob
|
||||
jobname = "No id"
|
||||
|
||||
//#### Grab the connection datum ####//
|
||||
var/datum/radio_frequency/connection = null
|
||||
//testing("[src]: talk_into([M], [message], [channel])")
|
||||
if(channel == "headset")
|
||||
channel = null
|
||||
if(channel) // If a channel is specified, look for it.
|
||||
if(channels && channels.len > 0)
|
||||
if (channel == "department")
|
||||
//world << "DEBUG: channel=\"[channel]\" switching to \"[channels[1]]\""
|
||||
channel = channels[1]
|
||||
connection = secure_radio_connections[channel]
|
||||
if (!channels[channel]) // if the channel is turned off, don't broadcast
|
||||
return
|
||||
else
|
||||
// If we were to send to a channel we don't have, drop it.
|
||||
return
|
||||
else // If a channel isn't specified, send to common.
|
||||
connection = radio_connection
|
||||
channel = null
|
||||
if (!istype(connection))
|
||||
return
|
||||
if (!connection)
|
||||
return
|
||||
// --- AI ---
|
||||
else if (isAI(M))
|
||||
jobname = "AI"
|
||||
|
||||
var/turf/position = get_turf(src)
|
||||
// --- Cyborg ---
|
||||
else if (isrobot(M))
|
||||
jobname = "Cyborg"
|
||||
|
||||
//#### Tagging the signal with all appropriate identity values ####//
|
||||
// --- Personal AI (pAI) ---
|
||||
else if (istype(M, /mob/living/silicon/pai))
|
||||
jobname = "Personal AI"
|
||||
|
||||
// ||-- 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
|
||||
// --- Unidentifiable mob ---
|
||||
else
|
||||
jobname = "Unknown"
|
||||
|
||||
|
||||
var/jobname // the mob's "job"
|
||||
// --- Modifications to the mob's identity ---
|
||||
|
||||
// --- 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))
|
||||
var/mob/living/silicon/robot/B = M
|
||||
jobname = "[B.designation] 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 (ishuman(M) && M.GetVoice() != real_name)
|
||||
displayname = M.GetVoice()
|
||||
jobname = "Unknown"
|
||||
voicemask = 1
|
||||
// The mob is disguising their identity:
|
||||
if (ishuman(M) && M.GetVoice() != real_name)
|
||||
displayname = M.GetVoice()
|
||||
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" = pick(M.speak_emote), // 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
|
||||
"type" = 0, // determines what type of radio input it is: normal broadcast
|
||||
"server" = null, // the last server to log this signal
|
||||
"reject" = 0, // if nonzero, the signal will not be accepted by any broadcasting machinery
|
||||
"level" = position.z // The source's z level
|
||||
)
|
||||
signal.frequency = connection.frequency // Quick frequency set
|
||||
|
||||
//#### Sending the signal to all subspace receivers ####//
|
||||
|
||||
for(var/obj/machinery/telecomms/receiver/R in telecomms_list)
|
||||
R.receive_signal(signal)
|
||||
|
||||
// Allinone can act as receivers.
|
||||
for(var/obj/machinery/telecomms/allinone/R in telecomms_list)
|
||||
R.receive_signal(signal)
|
||||
|
||||
// Receiving code can be located in Telecommunications.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
|
||||
|
||||
/* ###### 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
|
||||
|
||||
|
||||
/* --- Try to send a normal subspace broadcast first */
|
||||
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
|
||||
@@ -394,215 +310,110 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
"key" = mobkey, // the mob's key
|
||||
"vmessage" = pick(M.speak_emote), // 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
|
||||
"vmask" = voicemask, // 1 if the mob is using a voice gas mask
|
||||
|
||||
"compression" = 0, // uncompressed radio signal
|
||||
// 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,
|
||||
"traffic" = 0,
|
||||
"type" = 0,
|
||||
"server" = null,
|
||||
"reject" = 0,
|
||||
"level" = position.z
|
||||
"slow" = 0, // how much to sleep() before broadcasting - simulates net lag
|
||||
"traffic" = 0, // dictates the total traffic sum that the signal went through
|
||||
"type" = 0, // determines what type of radio input it is: normal broadcast
|
||||
"server" = null, // the last server to log this signal
|
||||
"reject" = 0, // if nonzero, the signal will not be accepted by any broadcasting machinery
|
||||
"level" = position.z, // The source's z level
|
||||
"language" = speaking,
|
||||
"verb" = verb
|
||||
)
|
||||
signal.frequency = connection.frequency // Quick frequency set
|
||||
|
||||
//#### Sending the signal to all subspace receivers ####//
|
||||
|
||||
for(var/obj/machinery/telecomms/receiver/R in telecomms_list)
|
||||
R.receive_signal(signal)
|
||||
|
||||
// Allinone can act as receivers.
|
||||
for(var/obj/machinery/telecomms/allinone/R in telecomms_list)
|
||||
R.receive_signal(signal)
|
||||
|
||||
sleep(rand(10,25)) // wait a little...
|
||||
|
||||
if(signal.data["done"] && position.z in signal.data["level"])
|
||||
// we're done here.
|
||||
return
|
||||
|
||||
// Oh my god; the comms are down or something because the signal hasn't been broadcasted yet in our level.
|
||||
// Send a mundane broadcast with limited targets:
|
||||
|
||||
//THIS IS TEMPORARY.
|
||||
if(!connection) return //~Carn
|
||||
|
||||
Broadcast_Message(connection, M, voicemask, pick(M.speak_emote),
|
||||
src, message, displayname, jobname, real_name, M.voice_name,
|
||||
filter_type, signal.data["compression"], list(position.z), connection.frequency)
|
||||
// Receiving code can be located in Telecommunications.dm
|
||||
return signal.data["done"] && position.z in signal.data["level"]
|
||||
|
||||
|
||||
/* ###### Intercoms and station-bounced radios ###### */
|
||||
|
||||
else // OLD RADIO SYSTEMS: By Goons?
|
||||
var/filter_type = 2
|
||||
|
||||
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
|
||||
var/display_freq = connection.frequency
|
||||
/* --- 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
|
||||
|
||||
//world << "DEBUG: used channel=\"[channel]\" frequency= \"[display_freq]\" connection.devices.len = [connection.devices.len]"
|
||||
|
||||
var/eqjobname
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = 2
|
||||
|
||||
if (ishuman(M))
|
||||
eqjobname = M:get_assignment()
|
||||
else if (iscarbon(M))
|
||||
eqjobname = "No id" //only humans can wear ID
|
||||
else if (isAI(M))
|
||||
eqjobname = "AI"
|
||||
else if (isrobot(M))
|
||||
eqjobname = "Cyborg"//Androids don't really describe these too well, in my opinion.
|
||||
else if (istype(M, /mob/living/silicon/pai))
|
||||
eqjobname = "Personal AI"
|
||||
else
|
||||
eqjobname = "Unknown"
|
||||
|
||||
if (isWireCut(WIRE_TRANSMIT))
|
||||
return
|
||||
/* --- Try to send a normal subspace broadcast first */
|
||||
|
||||
var/list/receive = list()
|
||||
signal.data = list(
|
||||
|
||||
//for (var/obj/item/device/radio/R in radio_connection.devices)
|
||||
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, 0)
|
||||
"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" = pick(M.speak_emote), // 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
|
||||
|
||||
//world << "DEBUG: receive.len=[receive.len]"
|
||||
var/list/heard_masked = list() // masked name or no real name
|
||||
var/list/heard_normal = list() // normal message
|
||||
var/list/heard_voice = list() // voice message
|
||||
var/list/heard_garbled = list() // garbled message
|
||||
"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,
|
||||
"type" = 0,
|
||||
"server" = null,
|
||||
"reject" = 0,
|
||||
"level" = position.z,
|
||||
"language" = speaking,
|
||||
"verb" = verb
|
||||
)
|
||||
signal.frequency = connection.frequency // Quick frequency set
|
||||
|
||||
for (var/mob/R in receive)
|
||||
if (R.say_understands(M))
|
||||
if (ishuman(M) && M.GetVoice() != M.real_name)
|
||||
heard_masked += R
|
||||
else
|
||||
heard_normal += R
|
||||
else
|
||||
heard_voice += R
|
||||
for(var/obj/machinery/telecomms/receiver/R in telecomms_list)
|
||||
R.receive_signal(signal)
|
||||
|
||||
if (length(heard_masked) || length(heard_normal) || length(heard_voice) || length(heard_garbled))
|
||||
var/part_a = "<span class='radio'><span class='name'>"
|
||||
//var/part_b = "</span><b> \icon[src]\[[format_frequency(frequency)]\]</b> <span class='message'>"
|
||||
var/freq_text
|
||||
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(1347)
|
||||
freq_text = "Supply"
|
||||
//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(!freq_text)
|
||||
freq_text = format_frequency(display_freq)
|
||||
sleep(rand(10,25)) // wait a little...
|
||||
|
||||
var/part_b = "</span><b> \icon[src]\[[freq_text]\]</b> <span class='message'>" // Tweaked for security headsets -- TLE
|
||||
var/part_c = "</span></span>"
|
||||
if(signal.data["done"] && position.z in signal.data["level"])
|
||||
// we're done here.
|
||||
return 1
|
||||
|
||||
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'>"
|
||||
// Oh my god; the comms are down or something because the signal hasn't been broadcasted yet in our level.
|
||||
// Send a mundane broadcast with limited targets:
|
||||
|
||||
var/quotedmsg = M.say_quote(message)
|
||||
//THIS IS TEMPORARY. YEAH RIGHT
|
||||
if(!connection) return 0 //~Carn
|
||||
|
||||
//This following recording is intended for research and feedback in the use of department radio channels.
|
||||
return Broadcast_Message(connection, M, voicemask, pick(M.speak_emote),
|
||||
src, message, displayname, jobname, real_name, M.voice_name,
|
||||
filter_type, signal.data["compression"], list(position.z), connection.frequency,verb,speaking)
|
||||
|
||||
var/part_blackbox_b = "</span><b> \[[freq_text]\]</b> <span class='message'>" // Tweaked for security headsets -- TLE
|
||||
var/blackbox_msg = "[part_a][M.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]"
|
||||
if(istype(blackbox))
|
||||
//BR.messages_admin += blackbox_admin_msg
|
||||
switch(display_freq)
|
||||
if(1459)
|
||||
blackbox.msg_common += blackbox_msg
|
||||
if(1351)
|
||||
blackbox.msg_science += blackbox_msg
|
||||
if(1353)
|
||||
blackbox.msg_command += blackbox_msg
|
||||
if(1355)
|
||||
blackbox.msg_medical += blackbox_msg
|
||||
if(1357)
|
||||
blackbox.msg_engineering += blackbox_msg
|
||||
if(1359)
|
||||
blackbox.msg_security += blackbox_msg
|
||||
if(1441)
|
||||
blackbox.msg_deathsquad += blackbox_msg
|
||||
if(1213)
|
||||
blackbox.msg_syndicate += blackbox_msg
|
||||
if(1347)
|
||||
blackbox.msg_cargo += blackbox_msg
|
||||
if(1349)
|
||||
blackbox.msg_service += blackbox_msg
|
||||
else
|
||||
blackbox.messages += blackbox_msg
|
||||
|
||||
//End of research and feedback code.
|
||||
|
||||
if (length(heard_masked))
|
||||
var/N = M.name
|
||||
var/J = eqjobname
|
||||
if(ishuman(M) && M.GetVoice() != M.real_name)
|
||||
N = M.GetVoice()
|
||||
J = "Unknown"
|
||||
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[src];track2=\ref[R];track=\ref[M]'>[N] ([J]) </a><a href='byond://?src=\ref[src];open2=\ref[R];open=\ref[M]'>\[OPEN\] </a> [part_b][quotedmsg][part_c]", 2)
|
||||
else
|
||||
R.show_message(rendered, 2)
|
||||
|
||||
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[src];track2=\ref[R];track=\ref[M]'>[M.real_name] ([eqjobname]) </a><a href='byond://?src=\ref[src];open2=\ref[R];open=\ref[M]'>\[OPEN\] </a>[part_b][quotedmsg][part_c]", 2)
|
||||
else
|
||||
R.show_message(rendered, 2)
|
||||
|
||||
if (length(heard_voice))
|
||||
var/rendered = "[part_a][M.voice_name][part_b][pick(M.speak_emote)][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[src];track2=\ref[R];track=\ref[M]'>[M.voice_name] ([eqjobname]) </a><a href='byond://?src=\ref[src];open2=\ref[R];open=\ref[M]'>\[OPEN\] </a>[part_b][pick(M.speak_emote)][part_c]", 2)
|
||||
else
|
||||
R.show_message(rendered, 2)
|
||||
|
||||
if (length(heard_garbled))
|
||||
quotedmsg = M.say_quote(stars(message))
|
||||
var/rendered = "[part_a][M.voice_name][part_b][quotedmsg][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[src];track2=\ref[R];track=\ref[M]'>[M.voice_name]</a><a href='byond://?src=\ref[src];open2=\ref[R];open=\ref[M]'>\[OPEN\] </a>[part_b][quotedmsg][part_c]", 2)
|
||||
else
|
||||
R.show_message(rendered, 2)
|
||||
|
||||
/obj/item/device/radio/hear_talk(mob/M as mob, msg)
|
||||
/obj/item/device/radio/hear_talk(mob/M as mob, msg, var/verb = "says", var/datum/language/speaking = null)
|
||||
|
||||
if (broadcasting)
|
||||
if(get_dist(src, M) <= canhear_range)
|
||||
talk_into(M, msg)
|
||||
talk_into(M, msg,null,verb,speaking)
|
||||
|
||||
|
||||
/*
|
||||
/obj/item/device/radio/proc/accept_rad(obj/item/device/radio/R as obj, message)
|
||||
|
||||
@@ -621,7 +432,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
// what the range is in which mobs will hear the radio
|
||||
// returns: -1 if can't receive, range otherwise
|
||||
|
||||
if (isWireCut(WIRE_RECEIVE))
|
||||
if (wires.IsIndexCut(WIRE_RECEIVE))
|
||||
return -1
|
||||
if(!listening)
|
||||
return -1
|
||||
@@ -629,7 +440,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
var/turf/position = get_turf(src)
|
||||
if(!position || !(position.z in level))
|
||||
return -1
|
||||
if(freq == SYND_FREQ)
|
||||
if(freq in ANTAG_FREQS)
|
||||
if(!(src.syndie))//Checks to see if it's allowed on that frequency, based on the encryption keys
|
||||
return -1
|
||||
if (!on)
|
||||
@@ -656,15 +467,13 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
return get_mobs_in_view(canhear_range, src)
|
||||
|
||||
|
||||
/obj/item/device/radio/examine()
|
||||
set src in view()
|
||||
|
||||
..()
|
||||
if ((in_range(src, usr) || loc == usr))
|
||||
/obj/item/device/radio/examine(mob/user)
|
||||
. = ..()
|
||||
if ((in_range(src, user) || loc == user))
|
||||
if (b_stat)
|
||||
usr.show_message("\blue \the [src] can be attached and modified!")
|
||||
user.show_message("\blue \the [src] can be attached and modified!")
|
||||
else
|
||||
usr.show_message("\blue \the [src] can not be modified or attached!")
|
||||
user.show_message("\blue \the [src] can not be modified or attached!")
|
||||
return
|
||||
|
||||
/obj/item/device/radio/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
@@ -697,8 +506,14 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
//Giving borgs their own radio to have some more room to work with -Sieve
|
||||
|
||||
/obj/item/device/radio/borg
|
||||
var/mob/living/silicon/robot/myborg = null // Cyborg which owns this radio. Used for power checks
|
||||
var/obj/item/device/encryptionkey/keyslot = null//Borg radios can handle a single encryption key
|
||||
|
||||
var/shut_up = 0
|
||||
icon = 'icons/obj/robot_component.dmi' // Cyborgs radio icons should look like the component.
|
||||
icon_state = "radio"
|
||||
canhear_range = 3
|
||||
subspace_transmission = 1
|
||||
|
||||
/obj/item/device/radio/borg/syndicate
|
||||
syndie = 1
|
||||
keyslot = new /obj/item/device/encryptionkey/syndicate
|
||||
@@ -713,6 +528,13 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
..()
|
||||
set_frequency(1441)
|
||||
|
||||
/obj/item/device/radio/borg/talk_into()
|
||||
. = ..()
|
||||
if (isrobot(src.loc))
|
||||
var/mob/living/silicon/robot/R = src.loc
|
||||
var/datum/robot_component/C = R.components["radio"]
|
||||
R.use_power(C.energy_consumption)
|
||||
|
||||
/obj/item/device/radio/borg/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
// ..()
|
||||
user.set_machine(src)
|
||||
@@ -758,18 +580,25 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
src.channels = list()
|
||||
src.syndie = 0
|
||||
|
||||
var/mob/living/silicon/robot/D = src.loc
|
||||
if(D.module)
|
||||
for(var/ch_name in D.module.channels)
|
||||
if(ch_name in src.channels)
|
||||
continue
|
||||
src.channels += ch_name
|
||||
src.channels[ch_name] += D.module.channels[ch_name]
|
||||
if(keyslot)
|
||||
for(var/ch_name in keyslot.channels)
|
||||
if(ch_name in src.channels)
|
||||
continue
|
||||
src.channels += ch_name
|
||||
src.channels[ch_name] = keyslot.channels[ch_name]
|
||||
src.channels[ch_name] += keyslot.channels[ch_name]
|
||||
|
||||
if(keyslot.syndie)
|
||||
src.syndie = 1
|
||||
|
||||
|
||||
for (var/ch_name in channels)
|
||||
for (var/ch_name in src.channels)
|
||||
if(!radio_controller)
|
||||
sleep(30) // Waiting for the radio_controller to be created.
|
||||
if(!radio_controller)
|
||||
@@ -784,12 +613,23 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
if(usr.stat || !on)
|
||||
return
|
||||
if (href_list["mode"])
|
||||
subspace_transmission = !subspace_transmission
|
||||
if(!subspace_transmission)//Simple as fuck, clears the channel list to prevent talking/listening over them if subspace transmission is disabled
|
||||
if(subspace_transmission != 1)
|
||||
subspace_transmission = 1
|
||||
usr << "Subspace Transmission is enabled"
|
||||
else
|
||||
subspace_transmission = 0
|
||||
usr << "Subspace Transmission is disabled"
|
||||
if(subspace_transmission == 0)//Simple as fuck, clears the channel list to prevent talking/listening over them if subspace transmission is disabled
|
||||
channels = list()
|
||||
else
|
||||
recalculateChannels()
|
||||
usr << "Subspace Transmission is [(subspace_transmission) ? "enabled" : "disabled"]"
|
||||
if (href_list["shutup"]) // Toggle loudspeaker mode, AKA everyone around you hearing your radio.
|
||||
shut_up = !shut_up
|
||||
if(shut_up)
|
||||
canhear_range = 0
|
||||
else
|
||||
canhear_range = 3
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/device/radio/borg/interact(mob/user as mob)
|
||||
@@ -806,6 +646,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
<A href='byond://?src=\ref[src];freq=2'>+</A>
|
||||
<A href='byond://?src=\ref[src];freq=10'>+</A><BR>
|
||||
<A href='byond://?src=\ref[src];mode=1'>Toggle Broadcast Mode</A><BR>
|
||||
Loudspeaker: [shut_up ? "<A href='byond://?src=\ref[src];shutup=0'>Disengaged</A>" : "<A href='byond://?src=\ref[src];shutup=1'>Engaged</A>"]<BR>
|
||||
"}
|
||||
|
||||
if(subspace_transmission)//Don't even bother if subspace isn't turned on
|
||||
@@ -830,11 +671,3 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
|
||||
/obj/item/device/radio/off
|
||||
listening = 0
|
||||
|
||||
/obj/item/device/radio/Destroy()
|
||||
if(radio_connection)
|
||||
radio_connection.remove_listener(src)
|
||||
if(isrobot(src.loc))
|
||||
var/mob/living/silicon/robot/R = src.loc
|
||||
R.radio = null
|
||||
..()
|
||||
|
||||
@@ -63,6 +63,10 @@
|
||||
attached_device.HasProximity(AM)
|
||||
return
|
||||
|
||||
/obj/item/device/transfer_valve/hear_talk(mob/living/M as mob, msg)
|
||||
..()
|
||||
for(var/obj/O in contents)
|
||||
O.hear_talk(M, msg)
|
||||
|
||||
/obj/item/device/transfer_valve/attack_self(mob/user as mob)
|
||||
ui_interact(user)
|
||||
|
||||
@@ -32,9 +32,11 @@
|
||||
R.icon_state = "robot"
|
||||
del(R.module)
|
||||
R.module = null
|
||||
R.camera.network.Remove(list("Engineering","Medical","MINE"))
|
||||
R.camera.network.Remove(list("Engineering","Medical","Mining Outpost"))
|
||||
R.updatename("Default")
|
||||
R.status_flags |= CANPUSH
|
||||
R.languages = list()
|
||||
R.speech_synthesizer_langs = list()
|
||||
R.notify_ai(2)
|
||||
R.updateicon()
|
||||
|
||||
|
||||
@@ -4,151 +4,83 @@
|
||||
density = 1
|
||||
layer = 2
|
||||
var/state = 0
|
||||
var/health = 200
|
||||
|
||||
attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench) && state == 0)
|
||||
if(anchored && !istype(src,/obj/structure/girder/displaced))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user << "\blue Now disassembling the girder"
|
||||
if(do_after(user,40))
|
||||
if(!src) return
|
||||
user << "\blue You dissasembled the girder!"
|
||||
new /obj/item/stack/sheet/metal(get_turf(src))
|
||||
del(src)
|
||||
else if(!anchored)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user << "\blue Now securing the girder"
|
||||
if(get_turf(user, 40))
|
||||
user << "\blue You secured the girder!"
|
||||
new/obj/structure/girder( src.loc )
|
||||
del(src)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
|
||||
user << "\blue Now slicing apart the girder"
|
||||
if(do_after(user,30))
|
||||
/obj/structure/girder/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench) && state == 0)
|
||||
if(anchored && !istype(src,/obj/structure/girder/displaced))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user << "\blue Now disassembling the girder"
|
||||
if(do_after(user,40))
|
||||
if(!src) return
|
||||
user << "\blue You slice apart the girder!"
|
||||
user << "\blue You dissasembled the girder!"
|
||||
new /obj/item/stack/sheet/metal(get_turf(src))
|
||||
del(src)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/pickaxe/diamonddrill))
|
||||
user << "\blue You drill through the girder!"
|
||||
new /obj/item/stack/sheet/metal(get_turf(src))
|
||||
del(src)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 && istype(src,/obj/structure/girder/reinforced))
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
user << "\blue Now unsecuring support struts"
|
||||
if(do_after(user,40))
|
||||
if(!src) return
|
||||
user << "\blue You unsecured the support struts!"
|
||||
state = 1
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wirecutters) && istype(src,/obj/structure/girder/reinforced) && state == 1)
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
user << "\blue Now removing support struts"
|
||||
if(do_after(user,40))
|
||||
if(!src) return
|
||||
user << "\blue You removed the support struts!"
|
||||
else if(!anchored)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user << "\blue Now securing the girder"
|
||||
if(get_turf(user, 40))
|
||||
user << "\blue You secured the girder!"
|
||||
new/obj/structure/girder( src.loc )
|
||||
del(src)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/crowbar) && state == 0 && anchored )
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user << "\blue Now dislodging the girder"
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You dislodged the girder!"
|
||||
new/obj/structure/girder/displaced( src.loc )
|
||||
del(src)
|
||||
else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
|
||||
user << "\blue Now slicing apart the girder"
|
||||
if(do_after(user,30))
|
||||
if(!src) return
|
||||
user << "\blue You slice apart the girder!"
|
||||
new /obj/item/stack/sheet/metal(get_turf(src))
|
||||
del(src)
|
||||
|
||||
else if(istype(W, /obj/item/stack/sheet))
|
||||
else if(istype(W, /obj/item/weapon/pickaxe/diamonddrill))
|
||||
user << "\blue You drill through the girder!"
|
||||
new /obj/item/stack/sheet/metal(get_turf(src))
|
||||
del(src)
|
||||
|
||||
var/obj/item/stack/sheet/S = W
|
||||
switch(S.type)
|
||||
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 && istype(src,/obj/structure/girder/reinforced))
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
user << "\blue Now unsecuring support struts"
|
||||
if(do_after(user,40))
|
||||
if(!src) return
|
||||
user << "\blue You unsecured the support struts!"
|
||||
state = 1
|
||||
|
||||
if(/obj/item/stack/sheet/metal, /obj/item/stack/sheet/metal/cyborg)
|
||||
if(!anchored)
|
||||
if(S.amount < 2) return
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(!pdiff)
|
||||
S.use(2)
|
||||
user << "\blue You create a false wall! Push on it to open or close the passage."
|
||||
new /obj/structure/falsewall (src.loc)
|
||||
del(src)
|
||||
else
|
||||
user << "\red There is too much air moving through the gap! The door wouldn't stay closed if you built it."
|
||||
message_admins("Attempted false wall made by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)] had a pressure difference of [pdiff]!")
|
||||
log_admin("Attempted false wall made by [user.real_name] (user.ckey) at [loc] had a pressure difference of [pdiff]!")
|
||||
return
|
||||
else
|
||||
if(S.amount < 2) return ..()
|
||||
user << "\blue Now adding plating..."
|
||||
if (do_after(user,40))
|
||||
if(!src || !S || S.amount < 2) return
|
||||
S.use(2)
|
||||
user << "\blue You added the plating!"
|
||||
var/turf/Tsrc = get_turf(src)
|
||||
Tsrc.ChangeTurf(/turf/simulated/wall)
|
||||
for(var/turf/simulated/wall/X in Tsrc.loc)
|
||||
if(X) X.add_hiddenprint(usr)
|
||||
del(src)
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/wirecutters) && istype(src,/obj/structure/girder/reinforced) && state == 1)
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
user << "\blue Now removing support struts"
|
||||
if(do_after(user,40))
|
||||
if(!src) return
|
||||
user << "\blue You removed the support struts!"
|
||||
new/obj/structure/girder( src.loc )
|
||||
del(src)
|
||||
|
||||
if(/obj/item/stack/sheet/plasteel)
|
||||
if(!anchored)
|
||||
if(S.amount < 2) return
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(!pdiff)
|
||||
S.use(2)
|
||||
user << "\blue You create a false wall! Push on it to open or close the passage."
|
||||
new /obj/structure/falsewall/reinforced (src.loc)
|
||||
del(src)
|
||||
else
|
||||
user << "\red There is too much air moving through the gap! The door wouldn't stay closed if you built it."
|
||||
message_admins("Attempted false rwall made by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)] had a pressure difference of [pdiff]!")
|
||||
log_admin("Attempted false rwall made by [user.real_name] ([user.ckey]) at [loc] had a pressure difference of [pdiff]!")
|
||||
return
|
||||
else
|
||||
if (src.icon_state == "reinforced") //I cant believe someone would actually write this line of code...
|
||||
if(S.amount < 1) return ..()
|
||||
user << "\blue Now finalising reinforced wall."
|
||||
if(do_after(user, 50))
|
||||
if(!src || !S || S.amount < 1) return
|
||||
S.use(1)
|
||||
user << "\blue Wall fully reinforced!"
|
||||
var/turf/Tsrc = get_turf(src)
|
||||
Tsrc.ChangeTurf(/turf/simulated/wall/r_wall)
|
||||
for(var/turf/simulated/wall/r_wall/X in Tsrc.loc)
|
||||
if(X) X.add_hiddenprint(usr)
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
if(S.amount < 1) return ..()
|
||||
user << "\blue Now reinforcing girders"
|
||||
if (do_after(user,60))
|
||||
if(!src || !S || S.amount < 1) return
|
||||
S.use(1)
|
||||
user << "\blue Girders reinforced!"
|
||||
new/obj/structure/girder/reinforced( src.loc )
|
||||
del(src)
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/crowbar) && state == 0 && anchored )
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user << "\blue Now dislodging the girder"
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You dislodged the girder!"
|
||||
new/obj/structure/girder/displaced( src.loc )
|
||||
del(src)
|
||||
|
||||
if(S.sheettype)
|
||||
var/M = S.sheettype
|
||||
else if(istype(W, /obj/item/stack/sheet))
|
||||
|
||||
var/obj/item/stack/sheet/S = W
|
||||
switch(S.type)
|
||||
|
||||
if(/obj/item/stack/sheet/metal, /obj/item/stack/sheet/metal/cyborg)
|
||||
if(!anchored)
|
||||
if(S.amount < 2) return
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(!pdiff)
|
||||
S.use(2)
|
||||
user << "\blue You create a false wall! Push on it to open or close the passage."
|
||||
var/F = text2path("/obj/structure/falsewall/[M]")
|
||||
new F (src.loc)
|
||||
new /obj/structure/falsewall (src.loc)
|
||||
del(src)
|
||||
else
|
||||
user << "\red There is too much air moving through the gap! The door wouldn't stay closed if you built it."
|
||||
message_admins("Attempted false [M] wall made by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)] had a pressure difference of [pdiff]!")
|
||||
log_admin("Attempted false [M] wall made by [user.real_name] ([user.ckey]) at [loc] had a pressure difference of [pdiff]!")
|
||||
message_admins("Attempted false wall made by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)] had a pressure difference of [pdiff]!")
|
||||
log_admin("Attempted false wall made by [user.real_name] (user.ckey) at [loc] had a pressure difference of [pdiff]!")
|
||||
return
|
||||
else
|
||||
if(S.amount < 2) return ..()
|
||||
@@ -158,67 +90,138 @@
|
||||
S.use(2)
|
||||
user << "\blue You added the plating!"
|
||||
var/turf/Tsrc = get_turf(src)
|
||||
Tsrc.ChangeTurf(text2path("/turf/simulated/wall/mineral/[M]"))
|
||||
for(var/turf/simulated/wall/mineral/X in Tsrc.loc)
|
||||
Tsrc.ChangeTurf(/turf/simulated/wall)
|
||||
for(var/turf/simulated/wall/X in Tsrc.loc)
|
||||
if(X) X.add_hiddenprint(usr)
|
||||
del(src)
|
||||
return
|
||||
|
||||
add_hiddenprint(usr)
|
||||
if(/obj/item/stack/sheet/plasteel)
|
||||
if(!anchored)
|
||||
if(S.amount < 2) return
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(!pdiff)
|
||||
S.use(2)
|
||||
user << "\blue You create a false wall! Push on it to open or close the passage."
|
||||
new /obj/structure/falsewall/reinforced (src.loc)
|
||||
del(src)
|
||||
else
|
||||
user << "\red There is too much air moving through the gap! The door wouldn't stay closed if you built it."
|
||||
message_admins("Attempted false rwall made by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)] had a pressure difference of [pdiff]!")
|
||||
log_admin("Attempted false rwall made by [user.real_name] ([user.ckey]) at [loc] had a pressure difference of [pdiff]!")
|
||||
return
|
||||
else
|
||||
if (src.icon_state == "reinforced") //I cant believe someone would actually write this line of code...
|
||||
if(S.amount < 1) return ..()
|
||||
user << "\blue Now finalising reinforced wall."
|
||||
if(do_after(user, 50))
|
||||
if(!src || !S || S.amount < 1) return
|
||||
S.use(1)
|
||||
user << "\blue Wall fully reinforced!"
|
||||
var/turf/Tsrc = get_turf(src)
|
||||
Tsrc.ChangeTurf(/turf/simulated/wall/r_wall)
|
||||
for(var/turf/simulated/wall/r_wall/X in Tsrc.loc)
|
||||
if(X) X.add_hiddenprint(usr)
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
if(S.amount < 1) return ..()
|
||||
user << "\blue Now reinforcing girders"
|
||||
if (do_after(user,60))
|
||||
if(!src || !S || S.amount < 1) return
|
||||
S.use(1)
|
||||
user << "\blue Girders reinforced!"
|
||||
new/obj/structure/girder/reinforced( src.loc )
|
||||
del(src)
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/pipe))
|
||||
var/obj/item/pipe/P = W
|
||||
if (P.pipe_type in list(0, 1, 5)) //simple pipes, simple bends, and simple manifolds.
|
||||
user.drop_item()
|
||||
P.loc = src.loc
|
||||
user << "\blue You fit the pipe into the [src]!"
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
bullet_act(var/obj/item/projectile/Proj)
|
||||
if(istype(Proj ,/obj/item/projectile/beam/pulse))
|
||||
src.ex_act(2)
|
||||
..()
|
||||
return 0
|
||||
|
||||
blob_act()
|
||||
if(prob(40))
|
||||
del(src)
|
||||
|
||||
bullet_act(var/obj/item/projectile/Proj)
|
||||
if(istype(Proj ,/obj/item/projectile/beam/pulse))
|
||||
src.ex_act(2)
|
||||
..()
|
||||
return 0
|
||||
|
||||
ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(75))
|
||||
var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal)
|
||||
new remains(loc)
|
||||
qdel(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(30))
|
||||
var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal)
|
||||
new remains(loc)
|
||||
qdel(src)
|
||||
return
|
||||
if(S.sheettype)
|
||||
var/M = S.sheettype
|
||||
if(!anchored)
|
||||
if(S.amount < 2) return
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(!pdiff)
|
||||
S.use(2)
|
||||
user << "\blue You create a false wall! Push on it to open or close the passage."
|
||||
var/F = text2path("/obj/structure/falsewall/[M]")
|
||||
new F (src.loc)
|
||||
del(src)
|
||||
else
|
||||
user << "\red There is too much air moving through the gap! The door wouldn't stay closed if you built it."
|
||||
message_admins("Attempted false [M] wall made by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)] had a pressure difference of [pdiff]!")
|
||||
log_admin("Attempted false [M] wall made by [user.real_name] ([user.ckey]) at [loc] had a pressure difference of [pdiff]!")
|
||||
return
|
||||
else
|
||||
return
|
||||
if(S.amount < 2) return ..()
|
||||
user << "\blue Now adding plating..."
|
||||
if (do_after(user,40))
|
||||
if(!src || !S || S.amount < 2) return
|
||||
S.use(2)
|
||||
user << "\blue You added the plating!"
|
||||
var/turf/Tsrc = get_turf(src)
|
||||
Tsrc.ChangeTurf(text2path("/turf/simulated/wall/mineral/[M]"))
|
||||
for(var/turf/simulated/wall/mineral/X in Tsrc.loc)
|
||||
if(X) X.add_hiddenprint(usr)
|
||||
del(src)
|
||||
return
|
||||
|
||||
add_hiddenprint(usr)
|
||||
|
||||
else if(istype(W, /obj/item/pipe))
|
||||
var/obj/item/pipe/P = W
|
||||
if (P.pipe_type in list(0, 1, 5)) //simple pipes, simple bends, and simple manifolds.
|
||||
user.drop_item()
|
||||
P.loc = src.loc
|
||||
user << "\blue You fit the pipe into the [src]!"
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/girder/blob_act()
|
||||
if(prob(40))
|
||||
del(src)
|
||||
|
||||
/obj/structure/girder/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(istype(Proj, /obj/item/projectile/beam))
|
||||
health -= Proj.damage
|
||||
..()
|
||||
if(health <= 0)
|
||||
new /obj/item/stack/sheet/metal(get_turf(src))
|
||||
del(src)
|
||||
|
||||
if(istype(Proj ,/obj/item/projectile/beam/pulse))
|
||||
src.ex_act(2)
|
||||
..()
|
||||
return 0
|
||||
|
||||
/obj/structure/girder/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(75))
|
||||
var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal)
|
||||
new remains(loc)
|
||||
qdel(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(30))
|
||||
var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal)
|
||||
new remains(loc)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
/obj/structure/girder/displaced
|
||||
icon_state = "displaced"
|
||||
anchored = 0
|
||||
health = 50
|
||||
|
||||
/obj/structure/girder/reinforced
|
||||
icon_state = "reinforced"
|
||||
state = 2
|
||||
health = 500
|
||||
|
||||
/obj/structure/cultgirder
|
||||
icon= 'icons/obj/cult.dmi'
|
||||
@@ -226,47 +229,55 @@
|
||||
anchored = 1
|
||||
density = 1
|
||||
layer = 2
|
||||
var/health = 250
|
||||
|
||||
attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user << "\blue Now disassembling the girder"
|
||||
if(do_after(user,40))
|
||||
user << "\blue You dissasembled the girder!"
|
||||
new /obj/effect/decal/remains/human(get_turf(src))
|
||||
del(src)
|
||||
/obj/structure/cultgirder/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user << "\blue Now disassembling the girder"
|
||||
if(do_after(user,40))
|
||||
user << "\blue You dissasembled the girder!"
|
||||
dismantle()
|
||||
|
||||
else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
|
||||
user << "\blue Now slicing apart the girder"
|
||||
if(do_after(user,30))
|
||||
user << "\blue You slice apart the girder!"
|
||||
new /obj/effect/decal/remains/human(get_turf(src))
|
||||
del(src)
|
||||
else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
|
||||
user << "\blue Now slicing apart the girder"
|
||||
if(do_after(user,30))
|
||||
user << "\blue You slice apart the girder!"
|
||||
dismantle()
|
||||
|
||||
else if(istype(W, /obj/item/weapon/pickaxe/diamonddrill))
|
||||
user << "\blue You drill through the girder!"
|
||||
new /obj/effect/decal/remains/human(get_turf(src))
|
||||
del(src)
|
||||
else if(istype(W, /obj/item/weapon/pickaxe/diamonddrill))
|
||||
user << "\blue You drill through the girder!"
|
||||
dismantle()
|
||||
|
||||
/obj/structure/cultgirder/proc/dismantle()
|
||||
new /obj/effect/decal/remains/human(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
blob_act()
|
||||
if(prob(40))
|
||||
del(src)
|
||||
/obj/structure/cultgirder/blob_act()
|
||||
if(prob(40))
|
||||
dismantle()
|
||||
|
||||
/obj/structure/cultgirder/bullet_act(var/obj/item/projectile/Proj) //No beam check- How else will you destroy the cult girder with silver bullets?????
|
||||
health -= Proj.damage
|
||||
..()
|
||||
if(health <= 0)
|
||||
dismantle()
|
||||
return
|
||||
|
||||
|
||||
ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
/obj/structure/cultgirder/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(30))
|
||||
new /obj/effect/decal/remains/human(loc)
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(30))
|
||||
new /obj/effect/decal/remains/human(loc)
|
||||
qdel(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(5))
|
||||
new /obj/effect/decal/remains/human(loc)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
return
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(5))
|
||||
new /obj/effect/decal/remains/human(loc)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
return
|
||||
@@ -182,9 +182,9 @@
|
||||
mecha.loc.assume_air(leaked_gas)
|
||||
else
|
||||
del(leaked_gas)
|
||||
if(mecha.hasInternalDamage(MECHA_INT_SHORT_CIRCUIT))
|
||||
/*if(mecha.hasInternalDamage(MECHA_INT_SHORT_CIRCUIT)) // LAG INDUCING - it'll keep on creating sparks
|
||||
if(mecha.get_charge())
|
||||
mecha.spark_system.start()
|
||||
mecha.cell.charge -= min(20,mecha.cell.charge)
|
||||
mecha.cell.maxcharge -= min(20,mecha.cell.maxcharge)
|
||||
mecha.cell.maxcharge -= min(20,mecha.cell.maxcharge) */
|
||||
return
|
||||
Reference in New Issue
Block a user