mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
+37
-3
@@ -66,11 +66,42 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
|
||||
|
||||
icon = 'icons/effects/fire.dmi'
|
||||
icon_state = "1"
|
||||
l_color = "#ED9200"
|
||||
l_color = "#010000"
|
||||
layer = TURF_LAYER
|
||||
|
||||
var/firelevel = 10000 //Calculated by gas_mixture.calculate_firelevel()
|
||||
|
||||
/obj/fire/proc/GenColor(var/datum/gas_mixture/ac)
|
||||
var/temperature = ac.temperature
|
||||
//All temperatures are in Kelvin for the color assignment
|
||||
if(temperature > 9000)
|
||||
//rainbow, wtf?
|
||||
l_color = pick("#0092ED", "#EDEDED", "#ED9200", "#ED00ED", "#0000ED", "#010000", "#00EDED", "#EDED00", "#ED0000")
|
||||
else if(temperature >= 7150)
|
||||
//dark blue
|
||||
l_color = "#0000ED"
|
||||
else if(temperature >= 5300)
|
||||
//blue
|
||||
l_color = "#0092ED"
|
||||
else if(temperature >= 1800)
|
||||
//cyan
|
||||
l_color = "#00EDED"
|
||||
else if(temperature >= 1500)
|
||||
//white
|
||||
l_color = "#EDEDED"
|
||||
else if(temperature >= 1300)
|
||||
//yellow
|
||||
l_color = "#EDED00"
|
||||
else if(temperature >= 1100)
|
||||
//orange
|
||||
l_color = "#ED9200"
|
||||
else if(temperature >= 75)
|
||||
//red
|
||||
l_color = "#ED0000"
|
||||
else
|
||||
//black fire, go atmos!
|
||||
l_color = "#010000"
|
||||
|
||||
/obj/fire/process()
|
||||
. = 1
|
||||
|
||||
@@ -114,10 +145,10 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
|
||||
icon_state = "3"
|
||||
SetLuminosity(7)
|
||||
else if(firelevel > 2.5)
|
||||
icon_state = "2"
|
||||
icon_state = "3"
|
||||
SetLuminosity(5)
|
||||
else
|
||||
icon_state = "1"
|
||||
icon_state = "3"
|
||||
SetLuminosity(3)
|
||||
|
||||
//im not sure how to implement a version that works for every creature so for now monkeys are firesafe
|
||||
@@ -130,6 +161,9 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
|
||||
// Burn the turf, too.
|
||||
S.fire_act(air_contents, air_contents.temperature, air_contents.return_volume())
|
||||
|
||||
//Update color of the fire
|
||||
src.GenColor(air_contents)
|
||||
|
||||
//spread
|
||||
for(var/direction in cardinal)
|
||||
var/turf/simulated/enemy_tile = get_step(S, direction)
|
||||
|
||||
+23
-32
@@ -167,8 +167,6 @@
|
||||
// The old system would loop through lists for a total of 5000 per function call, in an empty server.
|
||||
// This new system will loop at around 1000 in an empty server.
|
||||
|
||||
// SCREW THAT SHIT, we're not recursing.
|
||||
|
||||
/proc/get_mobs_in_view(var/R, var/atom/source)
|
||||
// Returns a list of mobs in range of R from source. Used in radio and say code.
|
||||
|
||||
@@ -180,48 +178,40 @@
|
||||
|
||||
var/list/range = hear(R, T)
|
||||
|
||||
for(var/mob/M in range)
|
||||
hear += M
|
||||
for(var/atom/A in range)
|
||||
if(ismob(A))
|
||||
var/mob/M = A
|
||||
if(M.client)
|
||||
hear += M
|
||||
//world.log << "Start = [M] - [get_turf(M)] - ([M.x], [M.y], [M.z])"
|
||||
else if(istype(A, /obj/item/device/radio))
|
||||
hear += A
|
||||
|
||||
var/list/objects = list()
|
||||
if(isobj(A) || ismob(A))
|
||||
hear |= recursive_mob_check(A, hear, 3, 1, 0, 1)
|
||||
|
||||
for(var/obj/O in range) //Get a list of objects in hearing range. We'll check to see if any clients have their "eye" set to the object
|
||||
objects += O
|
||||
|
||||
for(var/client/C in clients)
|
||||
if(!istype(C) || !C.eye || istype(C.eye, /mob/aiEye))
|
||||
continue //I have no idea when this client check would be needed, but if this runtimes people won't hear anything
|
||||
//So kinda paranoid about runtime avoidance.
|
||||
if(istype(C.eye, /obj/machinery/camera))
|
||||
continue //No microphones in cameras.
|
||||
|
||||
if(C.mob in hear)
|
||||
continue
|
||||
|
||||
var/list/hear_and_objects = (hear|objects) //Combined these lists here instead of doing the combine 3 more times.
|
||||
|
||||
if(C.eye in hear_and_objects)
|
||||
hear += C.mob
|
||||
|
||||
else if(C.mob && C.mob.loc in hear_and_objects)
|
||||
hear += C.mob
|
||||
else if(C.mob && C.mob.loc.loc in hear_and_objects)
|
||||
hear += C.mob
|
||||
else if(C.mob && C.mob.loc.loc.loc in hear_and_objects)
|
||||
hear += C.mob
|
||||
return hear
|
||||
|
||||
|
||||
/proc/get_mobs_in_radio_ranges(var/list/obj/item/device/radio/radios)
|
||||
|
||||
//set background = 1
|
||||
set background = 1
|
||||
|
||||
. = list()
|
||||
// Returns a list of mobs who can hear any of the radios given in @radios
|
||||
var/list/speaker_coverage = list()
|
||||
for(var/i = 1; i <= radios.len; i++)
|
||||
var/obj/item/device/radio/R = radios[i]
|
||||
for(var/obj/item/device/radio/R in radios)
|
||||
if(R)
|
||||
//Cyborg checks. Receiving message uses a bit of cyborg's charge.
|
||||
var/obj/item/device/radio/borg/BR = R
|
||||
if(istype(BR) && BR.myborg)
|
||||
var/mob/living/silicon/robot/borg = BR.myborg
|
||||
var/datum/robot_component/CO = borg.get_component("radio")
|
||||
if(!CO)
|
||||
continue //No radio component (Shouldn't happen)
|
||||
if(!borg.is_component_functioning("radio") || !borg.use_power(CO.energy_consumption))
|
||||
continue //No power.
|
||||
|
||||
var/turf/speaker = get_turf(R)
|
||||
if(speaker)
|
||||
for(var/turf/T in hear(R.canhear_range,speaker))
|
||||
@@ -239,6 +229,7 @@
|
||||
. |= M // Since we're already looping through mobs, why bother using |= ? This only slows things down.
|
||||
return .
|
||||
|
||||
|
||||
#define SIGN(X) ((X<0)?-1:1)
|
||||
|
||||
proc
|
||||
|
||||
@@ -28,6 +28,7 @@ var/global/list/airlocks = list() //list of all airlocks
|
||||
//Languages/species/whitelist.
|
||||
var/global/list/all_species[0]
|
||||
var/global/list/all_languages[0]
|
||||
var/global/list/language_keys[0] // Table of say codes for all languages
|
||||
var/global/list/all_nations[0]
|
||||
var/global/list/whitelisted_species = list()
|
||||
|
||||
@@ -114,6 +115,13 @@ var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Al
|
||||
var/datum/language/L = new T
|
||||
all_languages[L.name] = L
|
||||
|
||||
for (var/language_name in all_languages)
|
||||
var/datum/language/L = all_languages[language_name]
|
||||
if(!(L.flags & NONGLOBAL))
|
||||
language_keys[":[lowertext(L.key)]"] = L
|
||||
language_keys[".[lowertext(L.key)]"] = L
|
||||
language_keys["#[lowertext(L.key)]"] = L
|
||||
|
||||
var/rkey = 0
|
||||
paths = typesof(/datum/species)-/datum/species
|
||||
for(var/T in paths)
|
||||
|
||||
+14
-8
@@ -49,15 +49,19 @@ proc/random_facial_hair_style(gender, species = "Human")
|
||||
|
||||
return f_style
|
||||
|
||||
proc/random_name(gender, speciesName = "Human")
|
||||
var/datum/species/S = all_species[speciesName]
|
||||
if(S)
|
||||
return S.makeName(gender)
|
||||
else
|
||||
if(gender==FEMALE)
|
||||
proc/random_name(gender, species = "Human")
|
||||
|
||||
var/datum/species/current_species
|
||||
if(species)
|
||||
current_species = all_species[species]
|
||||
|
||||
if(!current_species || current_species.name == "Human")
|
||||
if(gender==FEMALE)
|
||||
return capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names))
|
||||
else
|
||||
return capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
|
||||
else
|
||||
return capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
|
||||
else
|
||||
return current_species.get_random_name(gender)
|
||||
|
||||
proc/random_skin_tone()
|
||||
switch(pick(60;"caucasian", 15;"afroamerican", 10;"african", 10;"latino", 5;"albino"))
|
||||
@@ -128,6 +132,8 @@ Proc for attack log creation, because really why not
|
||||
|
||||
proc/add_logs(mob/target, mob/user, what_done, var/object=null, var/addition=null)
|
||||
var/list/ignore=list("shaked","CPRed","grabbed","punched")
|
||||
if(!user)
|
||||
return
|
||||
if(ismob(user))
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Has [what_done] [target.name][ismob(target) ? "([target.ckey])" : ""][object ? " with [object]" : " "][addition]</font>")
|
||||
if(ismob(target))
|
||||
|
||||
@@ -34,12 +34,9 @@
|
||||
return t
|
||||
|
||||
//Removes a few problematic characters
|
||||
/proc/sanitize_simple(var/t,var/list/repl_chars = list("\n"="#","\t"="#","�"="�"))
|
||||
/proc/sanitize_simple(var/t,var/list/repl_chars = list("\n"="#","\t"="#"))
|
||||
for(var/char in repl_chars)
|
||||
var/index = findtext(t, char)
|
||||
while(index)
|
||||
t = copytext(t, 1, index) + repl_chars[char] + copytext(t, index+1)
|
||||
index = findtext(t, char)
|
||||
replacetext(t, char, repl_chars[char])
|
||||
return t
|
||||
|
||||
/proc/readd_quotes(var/t)
|
||||
@@ -341,4 +338,5 @@ proc/checkhtml(var/t)
|
||||
return sanitize(input)
|
||||
|
||||
/proc/trim_strip_html_properly(var/input, var/max_length = MAX_MESSAGE_LEN)
|
||||
return trim(strip_html_properly(input, max_length))
|
||||
return trim(strip_html_properly(input, max_length))
|
||||
|
||||
@@ -65,6 +65,8 @@
|
||||
if(stat || paralysis || stunned || weakened)
|
||||
return
|
||||
|
||||
face_atom(A)
|
||||
|
||||
if(next_move > world.time) // in the year 2000...
|
||||
return
|
||||
|
||||
|
||||
@@ -64,10 +64,11 @@
|
||||
// Now you can click through portals, wormholes, gateways, and teleporters while observing. -Sayu
|
||||
|
||||
/obj/machinery/teleport/hub/attack_ghost(mob/user as mob)
|
||||
var/atom/l = loc
|
||||
var/obj/machinery/computer/teleporter/com = locate(/obj/machinery/computer/teleporter, locate(l.x - 2, l.y, l.z))
|
||||
if(com && com.locked)
|
||||
user.loc = get_turf(com.locked)
|
||||
var/obj/machinery/teleport/station/S = power_station
|
||||
if(S)
|
||||
var/obj/machinery/computer/teleporter/com = S.teleporter_console
|
||||
if(com && com.target)
|
||||
user.loc = get_turf(com.target)
|
||||
|
||||
/obj/effect/portal/attack_ghost(mob/user as mob)
|
||||
if(target)
|
||||
|
||||
+181
-190
@@ -40,7 +40,7 @@
|
||||
|
||||
obj/proc/receive_signal(datum/signal/signal, var/receive_method as num, var/receive_param)
|
||||
Handler from received signals. By default does nothing. Define your own for your object.
|
||||
Avoid of sending signals directly from this proc, use spawn(-1). Do not use sleep() here please.
|
||||
Avoid of sending signals directly from this proc, use spawn(-1). DO NOT use sleep() here or call procs that sleep please. If you must, use spawn()
|
||||
parameters:
|
||||
signal - see description below. Extract all needed data from the signal before doing sleep(), spawn() or return!
|
||||
receive_method - may be TRANSMISSION_WIRE or TRANSMISSION_RADIO.
|
||||
@@ -61,33 +61,6 @@
|
||||
|
||||
*/
|
||||
|
||||
/* the radio controller is a confusing piece of shit and didnt work
|
||||
so i made radios not use the radio controller.
|
||||
*/
|
||||
var/list/all_radios = list()
|
||||
|
||||
/proc/add_radio(var/obj/item/radio, freq)
|
||||
if(!freq || !radio)
|
||||
return
|
||||
if(!all_radios["[freq]"])
|
||||
all_radios["[freq]"] = list(radio)
|
||||
return freq
|
||||
|
||||
all_radios["[freq]"] |= radio
|
||||
return freq
|
||||
|
||||
/proc/remove_radio(var/obj/item/radio, freq)
|
||||
if(!freq || !radio)
|
||||
return
|
||||
if(!all_radios["[freq]"])
|
||||
return
|
||||
|
||||
all_radios["[freq]"] -= radio
|
||||
|
||||
/proc/remove_radio_all(var/obj/item/radio)
|
||||
for(var/freq in all_radios)
|
||||
all_radios["[freq]"] -= radio
|
||||
|
||||
/*
|
||||
Frequency range: 1200 to 1600
|
||||
Radiochat range: 1441 to 1489 (most devices refuse to be tune to other frequency, even during mapmaking)
|
||||
@@ -99,10 +72,10 @@ Radio:
|
||||
1355 - Medical
|
||||
1357 - Engineering
|
||||
1359 - Security
|
||||
1441 - death squad
|
||||
1341 - death squad
|
||||
1443 - Confession Intercom
|
||||
1347 - Cargo techs
|
||||
1349 - Service
|
||||
1349 - Service people
|
||||
|
||||
Devices:
|
||||
1451 - tracking implant
|
||||
@@ -112,7 +85,7 @@ On the map:
|
||||
1311 for prison shuttle console (in fact, it is not used)
|
||||
1435 for status displays
|
||||
1437 for atmospherics/fire alerts
|
||||
1439 for engine components
|
||||
1438 for engine components
|
||||
1439 for air pumps, air scrubbers, atmo control
|
||||
1441 for atmospherics - supply tanks
|
||||
1443 for atmospherics - distribution loop/mixed air tank
|
||||
@@ -124,30 +97,14 @@ On the map:
|
||||
1455 for AI access
|
||||
*/
|
||||
|
||||
var/list/radiochannels = list(
|
||||
"Common" = 1459,
|
||||
"Science" = 1351,
|
||||
"Command" = 1353,
|
||||
"Medical" = 1355,
|
||||
"Engineering" = 1357,
|
||||
"Security" = 1359,
|
||||
"Response Team" = 1443,
|
||||
"Deathsquad" = 1441,
|
||||
"Syndicate" = 1213,
|
||||
"Supply" = 1347,
|
||||
"Service" = 1349,
|
||||
"AI Private" = 1447
|
||||
)
|
||||
//depenging helpers
|
||||
var/list/DEPT_FREQS = list(1351, 1355, 1357, 1359, 1213, 1443, 1441, 1347, 1349)
|
||||
|
||||
// central command channels, i.e deathsquid & response teams
|
||||
var/list/CENT_FREQS = list(1441, 1443)
|
||||
|
||||
var/const/COMM_FREQ = 1353 //command, colored gold in chat window
|
||||
var/const/COMM_FREQ = 1353
|
||||
var/const/SYND_FREQ = 1213
|
||||
var/const/ERT_FREQ = 1345
|
||||
var/const/DTH_FREQ = 1341
|
||||
var/const/AI_FREQ = 1447
|
||||
|
||||
// department channels
|
||||
var/const/PUB_FREQ = 1459
|
||||
var/const/SEC_FREQ = 1359
|
||||
var/const/ENG_FREQ = 1357
|
||||
var/const/SCI_FREQ = 1351
|
||||
@@ -155,25 +112,85 @@ var/const/MED_FREQ = 1355
|
||||
var/const/SUP_FREQ = 1347
|
||||
var/const/SRV_FREQ = 1349
|
||||
|
||||
// other channels
|
||||
var/const/AIPRIV_FREQ = 1447
|
||||
var/list/radiochannels = list(
|
||||
"Common" = PUB_FREQ,
|
||||
"Science" = SCI_FREQ,
|
||||
"Command" = COMM_FREQ,
|
||||
"Medical" = MED_FREQ,
|
||||
"Engineering" = ENG_FREQ,
|
||||
"Security" = SEC_FREQ,
|
||||
"Response Team" = ERT_FREQ,
|
||||
"Special Ops" = DTH_FREQ,
|
||||
"Syndicate" = SYND_FREQ,
|
||||
"Supply" = SUP_FREQ,
|
||||
"Service" = SRV_FREQ,
|
||||
"AI Private" = AI_FREQ
|
||||
)
|
||||
|
||||
// central command channels, i.e deathsquid & response teams
|
||||
var/list/CENT_FREQS = list(ERT_FREQ, DTH_FREQ)
|
||||
|
||||
// Antag channels, i.e. Syndicate
|
||||
var/list/ANTAG_FREQS = list(SYND_FREQ)
|
||||
|
||||
//depenging helpers
|
||||
var/list/DEPT_FREQS = list(SCI_FREQ, MED_FREQ, ENG_FREQ, SEC_FREQ, SUP_FREQ, SRV_FREQ, ERT_FREQ, SYND_FREQ, DTH_FREQ)
|
||||
|
||||
#define TRANSMISSION_WIRE 0
|
||||
#define TRANSMISSION_RADIO 1
|
||||
|
||||
/proc/frequency_span_class(var/frequency)
|
||||
// Antags!
|
||||
if (frequency in ANTAG_FREQS)
|
||||
return "syndradio"
|
||||
// centcomm channels (deathsquid and ert)
|
||||
else if(frequency in CENT_FREQS)
|
||||
return "centradio"
|
||||
// command channel
|
||||
else if(frequency == COMM_FREQ)
|
||||
return "comradio"
|
||||
// AI private channel
|
||||
else if(frequency == AI_FREQ)
|
||||
return "airadio"
|
||||
// department radio formatting (poorly optimized, ugh)
|
||||
else if(frequency == SEC_FREQ)
|
||||
return "secradio"
|
||||
else if (frequency == ENG_FREQ)
|
||||
return "engradio"
|
||||
else if(frequency == SCI_FREQ)
|
||||
return "sciradio"
|
||||
else if(frequency == MED_FREQ)
|
||||
return "medradio"
|
||||
else if(frequency == SUP_FREQ) // cargo
|
||||
return "supradio"
|
||||
else if(frequency == SRV_FREQ) // service
|
||||
return "srvradio"
|
||||
// If all else fails and it's a dept_freq, color me purple!
|
||||
else if(frequency in DEPT_FREQS)
|
||||
return "deptradio"
|
||||
|
||||
return "radio"
|
||||
|
||||
/* filters */
|
||||
var/const/RADIO_TO_AIRALARM = "1"
|
||||
var/const/RADIO_FROM_AIRALARM = "2"
|
||||
var/const/RADIO_CHAT = "3"
|
||||
var/const/RADIO_ATMOSIA = "4"
|
||||
var/const/RADIO_NAVBEACONS = "5"
|
||||
var/const/RADIO_AIRLOCK = "6"
|
||||
var/const/RADIO_SECBOT = "7"
|
||||
var/const/RADIO_MULEBOT = "8"
|
||||
var/const/RADIO_MAGNETS = "9"
|
||||
//When devices register with the radio controller, they might register under a certain filter.
|
||||
//Other devices can then choose to send signals to only those devices that belong to a particular filter.
|
||||
//This is done for performance, so we don't send signals to lots of machines unnecessarily.
|
||||
|
||||
//This filter is special because devices belonging to default also recieve signals sent to any other filter.
|
||||
var/const/RADIO_DEFAULT = "radio_default"
|
||||
|
||||
var/const/RADIO_TO_AIRALARM = "radio_airalarm" //air alarms
|
||||
var/const/RADIO_FROM_AIRALARM = "radio_airalarm_rcvr" //devices interested in recieving signals from air alarms
|
||||
var/const/RADIO_CHAT = "radio_telecoms"
|
||||
var/const/RADIO_ATMOSIA = "radio_atmos"
|
||||
var/const/RADIO_NAVBEACONS = "radio_navbeacon"
|
||||
var/const/RADIO_AIRLOCK = "radio_airlock"
|
||||
var/const/RADIO_SECBOT = "radio_secbot"
|
||||
var/const/RADIO_MULEBOT = "radio_mulebot"
|
||||
var/const/RADIO_CLEANBOT = "10"
|
||||
var/const/RADIO_FLOORBOT = "11"
|
||||
var/const/RADIO_MEDBOT = "12"
|
||||
var/const/RADIO_MAGNETS = "radio_magnet"
|
||||
|
||||
var/global/datum/controller/radio/radio_controller
|
||||
|
||||
@@ -181,164 +198,138 @@ var/global/datum/controller/radio/radio_controller
|
||||
radio_controller = new /datum/controller/radio()
|
||||
return 1
|
||||
|
||||
datum/controller/radio
|
||||
//callback used by objects to react to incoming radio signals
|
||||
/obj/proc/receive_signal(datum/signal/signal, receive_method, receive_param)
|
||||
return null
|
||||
|
||||
//The global radio controller
|
||||
/datum/controller/radio
|
||||
var/list/datum/radio_frequency/frequencies = list()
|
||||
|
||||
proc/add_object(obj/device as obj, var/new_frequency as num, var/filter = null as text|null)
|
||||
var/f_text = num2text(new_frequency)
|
||||
var/datum/radio_frequency/frequency = frequencies[f_text]
|
||||
/datum/controller/radio/proc/add_object(obj/device as obj, var/new_frequency as num, var/filter = null as text|null)
|
||||
var/f_text = num2text(new_frequency)
|
||||
var/datum/radio_frequency/frequency = frequencies[f_text]
|
||||
|
||||
if(!frequency)
|
||||
frequency = new
|
||||
frequency.frequency = new_frequency
|
||||
frequencies[f_text] = frequency
|
||||
if(!frequency)
|
||||
frequency = new
|
||||
frequency.frequency = new_frequency
|
||||
frequencies[f_text] = frequency
|
||||
|
||||
frequency.add_listener(device, filter)
|
||||
return frequency
|
||||
frequency.add_listener(device, filter)
|
||||
return frequency
|
||||
|
||||
proc/remove_object(obj/device, old_frequency)
|
||||
var/f_text = num2text(old_frequency)
|
||||
var/datum/radio_frequency/frequency = frequencies[f_text]
|
||||
/datum/controller/radio/proc/remove_object(obj/device, old_frequency)
|
||||
var/f_text = num2text(old_frequency)
|
||||
var/datum/radio_frequency/frequency = frequencies[f_text]
|
||||
|
||||
if(frequency)
|
||||
frequency.remove_listener(device)
|
||||
if(frequency)
|
||||
frequency.remove_listener(device)
|
||||
|
||||
if(frequency.devices.len == 0)
|
||||
del(frequency)
|
||||
frequencies -= f_text
|
||||
if(frequency.devices.len == 0)
|
||||
del(frequency)
|
||||
frequencies -= f_text
|
||||
|
||||
return 1
|
||||
return 1
|
||||
|
||||
proc/return_frequency(var/new_frequency as num)
|
||||
var/f_text = num2text(new_frequency)
|
||||
var/datum/radio_frequency/frequency = frequencies[f_text]
|
||||
/datum/controller/radio/proc/return_frequency(var/new_frequency as num)
|
||||
var/f_text = num2text(new_frequency)
|
||||
var/datum/radio_frequency/frequency = frequencies[f_text]
|
||||
|
||||
if(!frequency)
|
||||
frequency = new
|
||||
frequency.frequency = new_frequency
|
||||
frequencies[f_text] = frequency
|
||||
if(!frequency)
|
||||
frequency = new
|
||||
frequency.frequency = new_frequency
|
||||
frequencies[f_text] = frequency
|
||||
|
||||
return frequency
|
||||
return frequency
|
||||
|
||||
datum/radio_frequency
|
||||
/datum/radio_frequency
|
||||
var/frequency as num
|
||||
var/list/list/obj/devices = list()
|
||||
|
||||
proc
|
||||
post_signal(obj/source as obj|null, datum/signal/signal, var/filter = null as text|null, var/range = null as num|null)
|
||||
//log_admin("DEBUG \[[world.timeofday]\]: post_signal {source=\"[source]\", [signal.debug_print()], filter=[filter]}")
|
||||
// var/N_f=0
|
||||
// var/N_nf=0
|
||||
// var/Nt=0
|
||||
var/turf/start_point
|
||||
if(range)
|
||||
start_point = get_turf(source)
|
||||
if(!start_point)
|
||||
del(signal)
|
||||
return 0
|
||||
if (filter) //here goes some copypasta. It is for optimisation. -rastaf0
|
||||
for(var/obj/device in devices[filter])
|
||||
if(device == source)
|
||||
continue
|
||||
if(range)
|
||||
var/turf/end_point = get_turf(device)
|
||||
if(!end_point)
|
||||
continue
|
||||
//if(max(abs(start_point.x-end_point.x), abs(start_point.y-end_point.y)) <= range)
|
||||
if(start_point.z!=end_point.z || get_dist(start_point, end_point) > range)
|
||||
continue
|
||||
device.receive_signal(signal, TRANSMISSION_RADIO, frequency)
|
||||
for(var/obj/device in devices["_default"])
|
||||
if(device == source)
|
||||
continue
|
||||
if(range)
|
||||
var/turf/end_point = get_turf(device)
|
||||
if(!end_point)
|
||||
continue
|
||||
//if(max(abs(start_point.x-end_point.x), abs(start_point.y-end_point.y)) <= range)
|
||||
if(start_point.z!=end_point.z || get_dist(start_point, end_point) > range)
|
||||
continue
|
||||
device.receive_signal(signal, TRANSMISSION_RADIO, frequency)
|
||||
// N_f++
|
||||
else
|
||||
for (var/next_filter in devices)
|
||||
// var/list/obj/DDD = devices[next_filter]
|
||||
// Nt+=DDD.len
|
||||
for(var/obj/device in devices[next_filter])
|
||||
if(device == source)
|
||||
continue
|
||||
if(range)
|
||||
var/turf/end_point = get_turf(device)
|
||||
if(!end_point)
|
||||
continue
|
||||
//if(max(abs(start_point.x-end_point.x), abs(start_point.y-end_point.y)) <= range)
|
||||
if(start_point.z!=end_point.z || get_dist(start_point, end_point) > range)
|
||||
continue
|
||||
device.receive_signal(signal, TRANSMISSION_RADIO, frequency)
|
||||
// N_nf++
|
||||
/datum/radio_frequency/proc/post_signal(obj/source as obj|null, datum/signal/signal, var/filter = null as text|null, var/range = null as num|null)
|
||||
var/turf/start_point
|
||||
if(range)
|
||||
start_point = get_turf(source)
|
||||
if(!start_point)
|
||||
del(signal)
|
||||
return 0
|
||||
if (filter)
|
||||
send_to_filter(source, signal, filter, start_point, range)
|
||||
send_to_filter(source, signal, RADIO_DEFAULT, start_point, range)
|
||||
else
|
||||
//Broadcast the signal to everyone!
|
||||
for (var/next_filter in devices)
|
||||
send_to_filter(source, signal, next_filter, start_point, range)
|
||||
|
||||
// log_admin("DEBUG: post_signal(source=[source] ([source.x], [source.y], [source.z]),filter=[filter]) frequency=[frequency], N_f=[N_f], N_nf=[N_nf]")
|
||||
//Sends a signal to all machines belonging to a given filter. Should be called by post_signal()
|
||||
/datum/radio_frequency/proc/send_to_filter(obj/source, datum/signal/signal, var/filter, var/turf/start_point = null, var/range = null)
|
||||
if (range && !start_point)
|
||||
return
|
||||
|
||||
for(var/obj/device in devices[filter])
|
||||
if(device == source)
|
||||
continue
|
||||
if(range)
|
||||
var/turf/end_point = get_turf(device)
|
||||
if(!end_point)
|
||||
continue
|
||||
if(start_point.z!=end_point.z || get_dist(start_point, end_point) > range)
|
||||
continue
|
||||
|
||||
// del(signal)
|
||||
device.receive_signal(signal, TRANSMISSION_RADIO, frequency)
|
||||
|
||||
add_listener(obj/device as obj, var/filter as text|null)
|
||||
if (!filter)
|
||||
filter = "_default"
|
||||
//log_admin("add_listener(device=[device],filter=[filter]) frequency=[frequency]")
|
||||
var/list/obj/devices_line = devices[filter]
|
||||
if (!devices_line)
|
||||
devices_line = new
|
||||
devices[filter] = devices_line
|
||||
devices_line+=device
|
||||
/datum/radio_frequency/proc/add_listener(obj/device as obj, var/filter as text|null)
|
||||
if (!filter)
|
||||
filter = RADIO_DEFAULT
|
||||
//log_admin("add_listener(device=[device],filter=[filter]) frequency=[frequency]")
|
||||
var/list/obj/devices_line = devices[filter]
|
||||
if (!devices_line)
|
||||
devices_line = new
|
||||
devices[filter] = devices_line
|
||||
devices_line+=device
|
||||
// var/list/obj/devices_line___ = devices[filter_str]
|
||||
// var/l = devices_line___.len
|
||||
//log_admin("DEBUG: devices_line.len=[devices_line.len]")
|
||||
//log_admin("DEBUG: devices(filter_str).len=[l]")
|
||||
//log_admin("DEBUG: devices_line.len=[devices_line.len]")
|
||||
//log_admin("DEBUG: devices(filter_str).len=[l]")
|
||||
|
||||
remove_listener(obj/device)
|
||||
for (var/devices_filter in devices)
|
||||
var/list/devices_line = devices[devices_filter]
|
||||
devices_line-=device
|
||||
while (null in devices_line)
|
||||
devices_line -= null
|
||||
if (devices_line.len==0)
|
||||
devices -= devices_filter
|
||||
del(devices_line)
|
||||
/datum/radio_frequency/proc/remove_listener(obj/device)
|
||||
for (var/devices_filter in devices)
|
||||
var/list/devices_line = devices[devices_filter]
|
||||
devices_line-=device
|
||||
while (null in devices_line)
|
||||
devices_line -= null
|
||||
if (devices_line.len==0)
|
||||
devices -= devices_filter
|
||||
del(devices_line)
|
||||
|
||||
|
||||
obj/proc
|
||||
receive_signal(datum/signal/signal, receive_method, receive_param)
|
||||
return null
|
||||
|
||||
datum/signal
|
||||
/datum/signal
|
||||
var/obj/source
|
||||
|
||||
var/transmission_method = 0
|
||||
var/transmission_method = 0 //unused at the moment
|
||||
//0 = wire
|
||||
//1 = radio transmission
|
||||
//2 = subspace transmission
|
||||
|
||||
var/data = list()
|
||||
var/list/data = list()
|
||||
var/encryption
|
||||
|
||||
var/frequency = 0
|
||||
|
||||
proc/copy_from(datum/signal/model)
|
||||
source = model.source
|
||||
transmission_method = model.transmission_method
|
||||
data = model.data
|
||||
encryption = model.encryption
|
||||
frequency = model.frequency
|
||||
/datum/signal/proc/copy_from(datum/signal/model)
|
||||
source = model.source
|
||||
transmission_method = model.transmission_method
|
||||
data = model.data
|
||||
encryption = model.encryption
|
||||
frequency = model.frequency
|
||||
|
||||
proc/debug_print()
|
||||
if (source)
|
||||
. = "signal = {source = '[source]' ([source:x],[source:y],[source:z])\n"
|
||||
else
|
||||
. = "signal = {source = '[source]' ()\n"
|
||||
for (var/i in data)
|
||||
. += "data\[\"[i]\"\] = \"[data[i]]\"\n"
|
||||
if(islist(data[i]))
|
||||
var/list/L = data[i]
|
||||
for(var/t in L)
|
||||
. += "data\[\"[i]\"\] list has: [t]"
|
||||
/datum/signal/proc/debug_print()
|
||||
if (source)
|
||||
. = "signal = {source = '[source]' ([source:x],[source:y],[source:z])\n"
|
||||
else
|
||||
. = "signal = {source = '[source]' ()\n"
|
||||
for (var/i in data)
|
||||
. += "data\[\"[i]\"\] = \"[data[i]]\"\n"
|
||||
if(islist(data[i]))
|
||||
var/list/L = data[i]
|
||||
for(var/t in L)
|
||||
. += "data\[\"[i]\"\] list has: [t]"
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
var/list/station_levels = list(1) // Defines which Z-levels the station exists on.
|
||||
var/list/admin_levels= list(2) // Defines which Z-levels which are for admin functionality, for example including such areas as Central Command and the Syndicate Shuttle
|
||||
var/list/contact_levels = list(1, 5) // Defines which Z-levels which, for example, a Code Red announcement may affect
|
||||
var/list/player_levels = list(1, 3, 4, 5, 6) // Defines all Z-levels a character can typically reach
|
||||
var/list/player_levels = list(1, 3, 4, 5, 6, 7) // Defines all Z-levels a character can typically reach
|
||||
|
||||
var/const/minutes_to_ticks = 60 * 10
|
||||
// Event settings
|
||||
|
||||
@@ -441,7 +441,7 @@ client
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
var/new_name = copytext(sanitize(input(usr,"What would you like to name this mob?","Input a name",M.real_name) as text|null),1,MAX_NAME_LEN)
|
||||
var/new_name = sanitize(copytext(input(usr,"What would you like to name this mob?","Input a name",M.real_name) as text|null,1,MAX_NAME_LEN))
|
||||
if( !new_name || !M ) return
|
||||
|
||||
message_admins("Admin [key_name_admin(usr)] renamed [key_name_admin(M)] to [new_name].")
|
||||
|
||||
+16
-4
@@ -446,7 +446,7 @@ datum/mind
|
||||
assigned_role = new_role
|
||||
|
||||
else if (href_list["memory_edit"])
|
||||
var/new_memo = copytext(sanitize(input("Write new memory", "Memory", memory) as null|message),1,MAX_MESSAGE_LEN)
|
||||
var/new_memo = sanitize(copytext(input("Write new memory", "Memory", memory) as null|message,1,MAX_MESSAGE_LEN))
|
||||
if (isnull(new_memo)) return
|
||||
memory = new_memo
|
||||
|
||||
@@ -580,12 +580,24 @@ datum/mind
|
||||
new_objective.target_amount = target_number
|
||||
|
||||
if("identity theft")
|
||||
var/list/possible_targets = list("Free objective")
|
||||
for(var/datum/mind/possible_target in ticker.minds)
|
||||
if ((possible_target != src) && istype(possible_target.current, /mob/living/carbon/human))
|
||||
possible_targets += possible_target.current
|
||||
|
||||
var/new_target = input("Select target:", "Objective target") as null|anything in possible_targets
|
||||
if (!new_target)
|
||||
return
|
||||
var/datum/mind/targ = new_target
|
||||
if(!istype(targ))
|
||||
log_debug("Invalid target for identity theft objective, cancelling")
|
||||
return
|
||||
new_objective = new /datum/objective/escape/escape_with_identity
|
||||
new_objective.owner = src
|
||||
new_objective.find_target()
|
||||
|
||||
new_objective.target = new_target
|
||||
new_objective.explanation_text = "Escape on the shuttle or an escape pod with the identity of [targ.current.real_name], the [targ.assigned_role] while wearing their identification card."
|
||||
if ("custom")
|
||||
var/expl = copytext(sanitize(input("Custom objective:", "Objective", objective ? objective.explanation_text : "") as text|null),1,MAX_MESSAGE_LEN)
|
||||
var/expl = sanitize(copytext(input("Custom objective:", "Objective", objective ? objective.explanation_text : "") as text|null,1,MAX_MESSAGE_LEN))
|
||||
if (!expl) return
|
||||
new_objective = new /datum/objective
|
||||
new_objective.owner = src
|
||||
|
||||
@@ -33,14 +33,16 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048
|
||||
|
||||
/datum/wires/airlock/GetInteractWindow()
|
||||
var/obj/machinery/door/airlock/A = holder
|
||||
var/haspower = A.arePowerSystemsOn()
|
||||
. += ..()
|
||||
. += text("<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]", (A.locked ? "The door bolts have fallen!" : "The door bolts look up."),
|
||||
(A.lights ? "The door bolt lights are on." : "The door bolt lights are off!"),
|
||||
((A.arePowerSystemsOn() && !(A.stat & NOPOWER)) ? "The test light is on." : "The test light is off!"),
|
||||
(A.aiControlDisabled==0 ? "The 'AI control allowed' light is on." : "The 'AI control allowed' light is off."),
|
||||
(A.safe==0 ? "The 'Check Wiring' light is on." : "The 'Check Wiring' light is off."),
|
||||
(A.normalspeed==0 ? "The 'Check Timing Mechanism' light is on." : "The 'Check Timing Mechanism' light is off."),
|
||||
(A.emergency==0 ? "The emergency lights are off." : "The emergency lights are on."))
|
||||
. += text("<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]",
|
||||
(A.locked ? "The door bolts have fallen!" : "The door bolts look up."),
|
||||
((A.lights && haspower) ? "The door bolt lights are on." : "The door bolt lights are off!"),
|
||||
((haspower) ? "The test light is on." : "The test light is off!"),
|
||||
((A.aiControlDisabled==0 && !A.emagged && haspower) ? "The 'AI control allowed' light is on." : "The 'AI control allowed' light is off."),
|
||||
((A.safe==0 && haspower) ? "The 'Check Wiring' light is on." : "The 'Check Wiring' light is off."),
|
||||
((A.normalspeed==0 && haspower) ? "The 'Check Timing Mechanism' light is on." : "The 'Check Timing Mechanism' light is off."),
|
||||
((A.emergency==0 && haspower) ? "The emergency lights are off." : "The emergency lights are on."))
|
||||
|
||||
|
||||
/datum/wires/airlock/UpdateCut(var/index, var/mended)
|
||||
@@ -125,7 +127,7 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048
|
||||
switch(index)
|
||||
if(AIRLOCK_WIRE_IDSCAN)
|
||||
//Sending a pulse through this disables emergency access and flashes the red light on the door (if the door has power).
|
||||
if((A.arePowerSystemsOn()) && (!(A.stat & NOPOWER)))
|
||||
if((A.arePowerSystemsOn()) && A.density)
|
||||
A.door_animate("deny")
|
||||
if(A.emergency)
|
||||
A.emergency = 0
|
||||
|
||||
@@ -21,11 +21,24 @@ var/const/WIRE_TRANSMIT = 4
|
||||
var/obj/item/device/radio/R = holder
|
||||
switch(index)
|
||||
if(WIRE_SIGNAL)
|
||||
R.listening = !R.listening
|
||||
R.broadcasting = R.listening
|
||||
R.listening = !R.listening && !IsIndexCut(WIRE_RECEIVE)
|
||||
R.broadcasting = R.listening && !IsIndexCut(WIRE_TRANSMIT)
|
||||
|
||||
if(WIRE_RECEIVE)
|
||||
R.listening = !R.listening
|
||||
R.listening = !R.listening && !IsIndexCut(WIRE_SIGNAL)
|
||||
|
||||
if(WIRE_TRANSMIT)
|
||||
R.broadcasting = !R.broadcasting
|
||||
R.broadcasting = !R.broadcasting && !IsIndexCut(WIRE_SIGNAL)
|
||||
|
||||
/datum/wires/radio/UpdateCut(var/index, var/mended)
|
||||
var/obj/item/device/radio/R = holder
|
||||
switch(index)
|
||||
if(WIRE_SIGNAL)
|
||||
R.listening = mended && !IsIndexCut(WIRE_RECEIVE)
|
||||
R.broadcasting = mended && !IsIndexCut(WIRE_TRANSMIT)
|
||||
|
||||
if(WIRE_RECEIVE)
|
||||
R.listening = mended && !IsIndexCut(WIRE_SIGNAL)
|
||||
|
||||
if(WIRE_TRANSMIT)
|
||||
R.broadcasting = mended && !IsIndexCut(WIRE_SIGNAL)
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
#define TELECOMMS_RECEPTION_NONE 0
|
||||
#define TELECOMMS_RECEPTION_SENDER 1
|
||||
#define TELECOMMS_RECEPTION_RECEIVER 2
|
||||
#define TELECOMMS_RECEPTION_BOTH 3
|
||||
|
||||
/proc/get_frequency_name(var/display_freq)
|
||||
var/freq_text
|
||||
|
||||
// the name of the channel
|
||||
if(display_freq in ANTAG_FREQS)
|
||||
freq_text = "#unkn"
|
||||
else
|
||||
for(var/channel in radiochannels)
|
||||
if(radiochannels[channel] == display_freq)
|
||||
freq_text = channel
|
||||
break
|
||||
|
||||
// --- 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)
|
||||
|
||||
return freq_text
|
||||
|
||||
/datum/reception
|
||||
var/obj/machinery/message_server/message_server = null
|
||||
var/telecomms_reception = TELECOMMS_RECEPTION_NONE
|
||||
var/message = ""
|
||||
|
||||
/datum/receptions
|
||||
var/obj/machinery/message_server/message_server = null
|
||||
var/sender_reception = TELECOMMS_RECEPTION_NONE
|
||||
var/list/receiver_reception = new
|
||||
|
||||
/proc/get_message_server()
|
||||
if(message_servers)
|
||||
for (var/obj/machinery/message_server/MS in message_servers)
|
||||
if(MS.active)
|
||||
return MS
|
||||
return null
|
||||
|
||||
/proc/check_signal(var/datum/signal/signal)
|
||||
return signal && signal.data["done"]
|
||||
|
||||
/proc/get_sender_reception(var/atom/sender, var/datum/signal/signal)
|
||||
return check_signal(signal) ? TELECOMMS_RECEPTION_SENDER : TELECOMMS_RECEPTION_NONE
|
||||
|
||||
/proc/get_receiver_reception(var/receiver, var/datum/signal/signal)
|
||||
if(receiver && check_signal(signal))
|
||||
var/turf/pos = get_turf(receiver)
|
||||
if(pos && (pos.z in signal.data["level"]))
|
||||
return TELECOMMS_RECEPTION_RECEIVER
|
||||
return TELECOMMS_RECEPTION_NONE
|
||||
|
||||
/proc/get_reception(var/atom/sender, var/receiver, var/message = "", var/do_sleep = 1)
|
||||
var/datum/reception/reception = new
|
||||
|
||||
// check if telecomms I/O route 1459 is stable
|
||||
reception.message_server = get_message_server()
|
||||
|
||||
var/datum/signal/signal = sender.telecomms_process(do_sleep) // Be aware that this proc calls sleep, to simulate transmition delays
|
||||
reception.telecomms_reception |= get_sender_reception(sender, signal)
|
||||
reception.telecomms_reception |= get_receiver_reception(receiver, signal)
|
||||
reception.message = signal && signal.data["compression"] > 0 ? Gibberish(message, signal.data["compression"] + 50) : message
|
||||
|
||||
return reception
|
||||
|
||||
/proc/get_receptions(var/atom/sender, var/list/atom/receivers, var/do_sleep = 1)
|
||||
var/datum/receptions/receptions = new
|
||||
receptions.message_server = get_message_server()
|
||||
|
||||
var/datum/signal/signal
|
||||
if(sender)
|
||||
signal = sender.telecomms_process(do_sleep)
|
||||
receptions.sender_reception = get_sender_reception(sender, signal)
|
||||
|
||||
for(var/atom/receiver in receivers)
|
||||
if(!signal)
|
||||
signal = receiver.telecomms_process()
|
||||
receptions.receiver_reception[receiver] = get_receiver_reception(receiver, signal)
|
||||
|
||||
return receptions
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
/mob/camera/blob/proc/blob_talk(message)
|
||||
log_say("[key_name(src)] : [message]")
|
||||
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
message = trim(sanitize(copytext(message, 1, MAX_MESSAGE_LEN)))
|
||||
|
||||
if (!message)
|
||||
return
|
||||
|
||||
@@ -120,9 +120,9 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
|
||||
var/datum/objective/escape/escape_with_identity/identity_theft = new
|
||||
identity_theft.owner = changeling
|
||||
identity_theft.target = kill_objective.target
|
||||
identity_theft.target_real_name = kill_objective.target.current.real_name //Whoops, forgot this.
|
||||
if(identity_theft.target && identity_theft.target.current)
|
||||
var/target_real_name = identity_theft.target.current.real_name
|
||||
identity_theft.explanation_text = "Escape on the shuttle or an escape pod with the identity of [target_real_name], the [identity_theft.target.assigned_role] while wearing their identification card."
|
||||
identity_theft.explanation_text = "Escape on the shuttle or an escape pod with the identity of [identity_theft.target_real_name], the [identity_theft.target.assigned_role] while wearing their identification card."
|
||||
else
|
||||
identity_theft.explanation_text = "Free objective"
|
||||
changeling.objectives += identity_theft
|
||||
@@ -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)
|
||||
user.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
|
||||
|
||||
@@ -564,7 +564,7 @@ ________________________________________________________________________________
|
||||
if("Message")
|
||||
var/obj/item/device/pda/P = locate(href_list["target"])
|
||||
var/t = input(U, "Please enter untraceable message.") as text
|
||||
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
|
||||
t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN))
|
||||
if(!t||U.stat||U.wear_suit!=src||!s_initialized)//Wow, another one of these. Man...
|
||||
display_to << browse(null, "window=spideros")
|
||||
return
|
||||
@@ -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>."
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -480,7 +480,7 @@ As such, it's hard-coded for now. No reason for it not to be, really.
|
||||
var/mission
|
||||
if(alert("Would you the Ninja to have a random or preset mission?",,"Random","Preset")=="Preset")
|
||||
while(!mission)
|
||||
mission = copytext(sanitize(input(src, "Please specify which mission the space ninja shall undertake.", "Specify Mission", "")),1,MAX_MESSAGE_LEN)
|
||||
mission = sanitize(copytext(input(src, "Please specify which mission the space ninja shall undertake.", "Specify Mission", ""),1,MAX_MESSAGE_LEN))
|
||||
if(!mission)
|
||||
if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes")
|
||||
return
|
||||
|
||||
@@ -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")
|
||||
@@ -409,7 +441,7 @@ proc/issyndicate(mob/living/M as mob)
|
||||
|
||||
/proc/nukelastname(var/mob/M as mob) //--All praise goes to NEO|Phyte, all blame goes to DH, and it was Cindi-Kate's idea. Also praise Urist for copypasta ho.
|
||||
var/randomname = pick(last_names)
|
||||
var/newname = copytext(sanitize(input(M,"You are the nuke operative [pick("Czar", "Boss", "Commander", "Chief", "Kingpin", "Director", "Overlord")]. Please choose a last name for your family.", "Name change",randomname)),1,MAX_NAME_LEN)
|
||||
var/newname = sanitize(copytext(input(M,"You are the nuke operative [pick("Czar", "Boss", "Commander", "Chief", "Kingpin", "Director", "Overlord")]. Please choose a last name for your family.", "Name change",randomname),1,MAX_NAME_LEN))
|
||||
|
||||
if (!newname)
|
||||
newname = randomname
|
||||
|
||||
@@ -23,10 +23,6 @@ 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
|
||||
use_power = 0
|
||||
unacidable = 1
|
||||
|
||||
@@ -84,7 +80,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 +182,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 +197,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 +217,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 +227,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 +337,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 +426,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
|
||||
|
||||
@@ -619,7 +619,7 @@ datum/objective/steal
|
||||
var/tmp_obj = new O.typepath
|
||||
var/custom_name = tmp_obj:name
|
||||
del(tmp_obj)
|
||||
O.name = copytext(sanitize(input("Enter target name:", "Objective target", custom_name) as text|null),1,MAX_NAME_LEN)
|
||||
O.name = sanitize(copytext(input("Enter target name:", "Objective target", custom_name) as text|null,1,MAX_NAME_LEN))
|
||||
if (!O.name) return
|
||||
steal_target = O
|
||||
explanation_text = "Steal [O.name]."
|
||||
@@ -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)
|
||||
@@ -745,12 +749,14 @@ datum/objective/absorb
|
||||
return 0
|
||||
|
||||
datum/objective/destroy
|
||||
var/target_real_name
|
||||
find_target()
|
||||
var/list/possible_targets = active_ais(1)
|
||||
var/mob/living/silicon/ai/target_ai = pick(possible_targets)
|
||||
target = target_ai.mind
|
||||
if(target && target.current)
|
||||
explanation_text = "Destroy [target.current.real_name], the experimental AI."
|
||||
target_real_name = target.current.real_name
|
||||
explanation_text = "Destroy [target_real_name], the AI."
|
||||
else
|
||||
explanation_text = "Free Objective"
|
||||
return target
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
var/wizard_name_first = pick(wizard_first)
|
||||
var/wizard_name_second = pick(wizard_second)
|
||||
var/randomname = "[wizard_name_first] [wizard_name_second]"
|
||||
var/newname = copytext(sanitize(input(M, "You are the wizard's apprentice. Would you like to change your name to something else?", "Name change", randomname) as null|text),1,MAX_NAME_LEN)
|
||||
var/newname = sanitize(copytext(input(M, "You are the wizard's apprentice. Would you like to change your name to something else?", "Name change", randomname) as null|text,1,MAX_NAME_LEN))
|
||||
|
||||
if (!newname)
|
||||
newname = randomname
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
var/wizard_name_second = pick(wizard_second)
|
||||
var/randomname = "[wizard_name_first] [wizard_name_second]"
|
||||
spawn(0)
|
||||
var/newname = copytext(sanitize(input(wizard_mob, "You are the Space Wizard. Would you like to change your name to something else?", "Name change", randomname) as null|text),1,MAX_NAME_LEN)
|
||||
var/newname = sanitize(copytext(input(wizard_mob, "You are the Space Wizard. Would you like to change your name to something else?", "Name change", randomname) as null|text,1,MAX_NAME_LEN))
|
||||
|
||||
if (!newname)
|
||||
newname = randomname
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
|
||||
spawn(0)
|
||||
var/religion_name = "Christianity"
|
||||
var/new_religion = copytext(sanitize(input(H, "You are the crew services officer. Would you like to change your religion? Default is Christianity, in SPACE.", "Name change", religion_name)),1,MAX_NAME_LEN)
|
||||
var/new_religion = sanitize(copytext(input(H, "You are the crew services officer. Would you like to change your religion? Default is Christianity, in SPACE.", "Name change", religion_name),1,MAX_NAME_LEN))
|
||||
|
||||
if (!new_religion)
|
||||
new_religion = religion_name
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
spawn(1)
|
||||
var/deity_name = "Space Jesus"
|
||||
var/new_deity = copytext(sanitize(input(H, "Would you like to change your deity? Default is Space Jesus.", "Name change", deity_name)),1,MAX_NAME_LEN)
|
||||
var/new_deity = sanitize(copytext(input(H, "Would you like to change your deity? Default is Space Jesus.", "Name change", deity_name),1,MAX_NAME_LEN))
|
||||
|
||||
if ((length(new_deity) == 0) || (new_deity == "Space Jesus") )
|
||||
new_deity = deity_name
|
||||
|
||||
@@ -142,8 +142,6 @@
|
||||
pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24)
|
||||
pixel_y = (dir & 3)? (dir ==1 ? -24 : 24) : 0
|
||||
update_icon()
|
||||
if(ticker && ticker.current_state == 3)//if the game is running
|
||||
src.initialize()
|
||||
return
|
||||
|
||||
first_run()
|
||||
|
||||
@@ -1,52 +1,5 @@
|
||||
/obj/machinery/portable_atmospherics/canister
|
||||
name = "canister"
|
||||
icon = 'icons/obj/atmos.dmi'
|
||||
icon_state = "yellow"
|
||||
density = 1
|
||||
var/health = 100.0
|
||||
flags = CONDUCT
|
||||
|
||||
var/menu = 0
|
||||
//used by nanoui: 0 = main menu, 1 = relabel
|
||||
var/valve_open = 0
|
||||
var/release_pressure = ONE_ATMOSPHERE
|
||||
|
||||
var/list/_color //variable that stores colours
|
||||
var/list/decals // list that stores the decals
|
||||
var/list/possibledecals
|
||||
var/list/oldcolor//lists for check_change()
|
||||
var/list/olddecals
|
||||
var/list/possiblemaincolor //these lists contain the possible colors of a canister
|
||||
var/list/possibleseccolor
|
||||
var/list/possibletertcolor
|
||||
var/list/possiblequartcolor
|
||||
var/list/colorcontainer //passed to the ui to render the color lists
|
||||
|
||||
var/can_label = 1
|
||||
var/filled = 0.5
|
||||
pressure_resistance = 7*ONE_ATMOSPHERE
|
||||
var/temperature_resistance = 1000 + T0C
|
||||
volume = 1000
|
||||
use_power = 0
|
||||
var/release_log = ""
|
||||
var/busy = 0
|
||||
var/update_flag = 0
|
||||
|
||||
New()
|
||||
..()
|
||||
_color = list(
|
||||
"prim" = "yellow",
|
||||
"sec" = null,
|
||||
"ter" = null,
|
||||
"quart" = null)
|
||||
oldcolor = list()
|
||||
decals = list()
|
||||
olddecals = list()
|
||||
possibledecals = list( //var that stores all possible decals, used by ui
|
||||
list("name" = "Low temperature canister", "icon" = "cold", "active" = 0),
|
||||
list("name" = "High temperature canister", "icon" = "hot", "active" = 0),
|
||||
list("name" = "Plasma containing canister", "icon" = "plasma", "active" = 0)
|
||||
)
|
||||
/datum/canister_icons
|
||||
var
|
||||
possiblemaincolor = list( //these lists contain the possible colors of a canister
|
||||
list("name" = "\[N2O\]", "icon" = "redws"),
|
||||
list("name" = "\[N2\]", "icon" = "red"),
|
||||
@@ -81,29 +34,103 @@
|
||||
list("name" = "\[Air\]", "icon" = "grey-c-2"),
|
||||
list("name" = "\[CAUTION\]", "icon" = "yellow-c-2")
|
||||
)
|
||||
colorcontainer = list(//passed to the ui to render the color lists
|
||||
"prim" = list(
|
||||
"options" = possiblemaincolor,
|
||||
"name" = "Primary color",
|
||||
"anycolor" = -1,//0: no color applied. 1: color selected. Not used for primary color.
|
||||
),
|
||||
"sec" = list(
|
||||
"options" = possibleseccolor,
|
||||
"name" = "Secondary color",
|
||||
"anycolor" = 0,
|
||||
),
|
||||
"ter" = list(
|
||||
"options" = possibletertcolor,
|
||||
"name" = "Tertiary color",
|
||||
"anycolor" = 0,
|
||||
),
|
||||
"quart" = list(
|
||||
"options" = possiblequartcolor,
|
||||
"name" = "Quaternary color",
|
||||
"anycolor" = 0,
|
||||
)
|
||||
|
||||
possibledecals = list( //var that stores all possible decals, used by ui
|
||||
list("name" = "Low temperature canister", "icon" = "cold"),
|
||||
list("name" = "High temperature canister", "icon" = "hot"),
|
||||
list("name" = "Plasma containing canister", "icon" = "plasma")
|
||||
)
|
||||
|
||||
var/datum/canister_icons/canister_icon_container = new()
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister
|
||||
name = "canister"
|
||||
icon = 'icons/obj/atmos.dmi'
|
||||
icon_state = "yellow"
|
||||
density = 1
|
||||
var/health = 100.0
|
||||
flags = CONDUCT
|
||||
|
||||
var/menu = 0
|
||||
//used by nanoui: 0 = main menu, 1 = relabel
|
||||
|
||||
var/valve_open = 0
|
||||
var/release_pressure = ONE_ATMOSPHERE
|
||||
|
||||
var/list/_color //variable that stores colours
|
||||
var/list/decals //list that stores the decals
|
||||
|
||||
//lists for check_change()
|
||||
var/list/oldcolor
|
||||
var/list/olddecals
|
||||
|
||||
//passed to the ui to render the color lists
|
||||
var/list/colorcontainer
|
||||
var/list/possibledecals
|
||||
|
||||
var/can_label = 1
|
||||
var/filled = 0.5
|
||||
pressure_resistance = 7*ONE_ATMOSPHERE
|
||||
var/temperature_resistance = 1000 + T0C
|
||||
volume = 1000
|
||||
use_power = 0
|
||||
var/release_log = ""
|
||||
var/busy = 0
|
||||
var/update_flag = 0
|
||||
|
||||
New()
|
||||
..()
|
||||
_color = list(
|
||||
"prim" = "yellow",
|
||||
"sec" = "none",
|
||||
"ter" = "none",
|
||||
"quart" = "none")
|
||||
oldcolor = new /list()
|
||||
decals = list("cold" = 0, "hot" = 0, "plasma" = 0)
|
||||
colorcontainer = new /list(4)
|
||||
possibledecals = new /list(3)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/proc/init_data_vars()
|
||||
//passed to the ui to render the color lists
|
||||
colorcontainer = list(
|
||||
"prim" = list(
|
||||
"options" = canister_icon_container.possiblemaincolor,
|
||||
"name" = "Primary color",
|
||||
),
|
||||
"sec" = list(
|
||||
"options" = canister_icon_container.possibleseccolor,
|
||||
"name" = "Secondary color",
|
||||
),
|
||||
"ter" = list(
|
||||
"options" = canister_icon_container.possibletertcolor,
|
||||
"name" = "Tertiary color",
|
||||
),
|
||||
"quart" = list(
|
||||
"options" = canister_icon_container.possiblequartcolor,
|
||||
"name" = "Quaternary color",
|
||||
)
|
||||
)
|
||||
|
||||
//var/anycolor used by the nanoUI, 0: no color applied. 1: color applied
|
||||
for(var/C in colorcontainer)
|
||||
if(C == "prim") continue
|
||||
var/list/L = colorcontainer[C]
|
||||
if(!(_color[C]) || (_color[C] == "none"))
|
||||
L.Add(list("anycolor" = 0))
|
||||
else
|
||||
L.Add(list("anycolor" = 1))
|
||||
colorcontainer[C] = L
|
||||
|
||||
possibledecals = new /list(3)
|
||||
|
||||
var/i
|
||||
var/list/L = canister_icon_container.possibledecals
|
||||
for(i=1;i<=L.len;i++)
|
||||
var/list/LL = L[i]
|
||||
LL = LL.Copy() //make sure we don't edit the datum list
|
||||
LL.Add(list("active" = decals[LL["icon"]])) //"active" used by nanoUI
|
||||
possibledecals[i] = LL
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/proc/check_change()
|
||||
var/old_flag = update_flag
|
||||
@@ -126,11 +153,11 @@
|
||||
if(list2params(oldcolor) != list2params(_color))
|
||||
update_flag |= 64
|
||||
oldcolor = _color.Copy()
|
||||
|
||||
|
||||
if(list2params(olddecals) != list2params(decals))
|
||||
update_flag |= 128
|
||||
olddecals = decals.Copy()
|
||||
|
||||
|
||||
if(update_flag == old_flag)
|
||||
return 1
|
||||
else
|
||||
@@ -160,19 +187,16 @@ update_flag
|
||||
if(check_change()) //Returns 1 if no change needed to icons.
|
||||
return
|
||||
|
||||
src.overlays = 0
|
||||
|
||||
if (_color["sec"])//COLORS!
|
||||
overlays.Add(_color["sec"])
|
||||
|
||||
if (_color["ter"])
|
||||
overlays.Add(_color["ter"])
|
||||
|
||||
if (_color["quart"])
|
||||
overlays.Add(_color["quart"])
|
||||
|
||||
overlays.Cut()
|
||||
|
||||
for(var/C in _color)
|
||||
if(C == "prim") continue
|
||||
if(_color[C] == "none") continue
|
||||
overlays.Add(_color[C])
|
||||
|
||||
for(var/D in decals)
|
||||
overlays.Add("decal-" + D)
|
||||
if(decals[D])
|
||||
overlays.Add("decal-" + D)
|
||||
|
||||
if(update_flag & 1)
|
||||
overlays += "can-open"
|
||||
@@ -186,32 +210,32 @@ update_flag
|
||||
overlays += "can-o2"
|
||||
else if(update_flag & 32)
|
||||
overlays += "can-o3"
|
||||
|
||||
|
||||
update_flag &= ~196 //the flags 128 and 64 represent change, not states. As such, we have to reset them to be able to detect a change on the next go.
|
||||
return
|
||||
|
||||
//template modification exploit prevention, used in Topic()
|
||||
/obj/machinery/portable_atmospherics/canister/proc/is_a_color(var/inputVar, var/checkColor = "all")
|
||||
/obj/machinery/portable_atmospherics/canister/proc/is_a_color(var/inputVar, var/checkColor = "all")
|
||||
if (checkColor == "prim" || checkColor == "all")
|
||||
for(var/list/L in possiblemaincolor)
|
||||
for(var/list/L in canister_icon_container.possiblemaincolor)
|
||||
if (L["icon"] == inputVar)
|
||||
return 1
|
||||
if (checkColor == "sec" || checkColor == "all")
|
||||
for(var/list/L in possibleseccolor)
|
||||
for(var/list/L in canister_icon_container.possibleseccolor)
|
||||
if (L["icon"] == inputVar)
|
||||
return 1
|
||||
if (checkColor == "ter" || checkColor == "all")
|
||||
for(var/list/L in possibletertcolor)
|
||||
for(var/list/L in canister_icon_container.possibletertcolor)
|
||||
if (L["icon"] == inputVar)
|
||||
return 1
|
||||
if (checkColor == "quart" || checkColor == "all")
|
||||
for(var/list/L in possiblequartcolor)
|
||||
for(var/list/L in canister_icon_container.possiblequartcolor)
|
||||
if (L["icon"] == inputVar)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/proc/is_a_decal(var/inputVar)
|
||||
for(var/list/L in possibledecals)
|
||||
for(var/list/L in canister_icon_container.possibledecals)
|
||||
if (L["icon"] == inputVar)
|
||||
return 1
|
||||
return 0
|
||||
@@ -364,6 +388,8 @@ update_flag
|
||||
if (src.destroyed)
|
||||
return
|
||||
|
||||
init_data_vars() //set up var/colorcontainer and var/possibledecals
|
||||
|
||||
// this is the data which will be sent to the ui
|
||||
var/data[0]
|
||||
data["name"] = name
|
||||
@@ -395,6 +421,10 @@ update_flag
|
||||
ui.open()
|
||||
// auto update every Master Controller tick
|
||||
ui.set_auto_update(1)
|
||||
|
||||
//Disregard these, avoid cluttering up the VV window
|
||||
colorcontainer = new /list(4)
|
||||
possibledecals = new /list(3)
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/Topic(href, href_list)
|
||||
|
||||
@@ -406,7 +436,7 @@ update_flag
|
||||
usr << browse(null, "window=canister")
|
||||
onclose(usr, "canister")
|
||||
return
|
||||
|
||||
|
||||
if (href_list["choice"] == "menu")
|
||||
menu = text2num(href_list["mode_target"])
|
||||
|
||||
@@ -437,10 +467,10 @@ update_flag
|
||||
release_pressure = min(10*ONE_ATMOSPHERE, release_pressure+diff)
|
||||
else
|
||||
release_pressure = max(ONE_ATMOSPHERE/10, release_pressure+diff)
|
||||
|
||||
|
||||
if (href_list["rename"])
|
||||
if (can_label)
|
||||
var/T = copytext(sanitize(input("Choose canister label", "Name", name) as text|null),1,MAX_NAME_LEN)
|
||||
var/T = sanitize(copytext(input("Choose canister label", "Name", name) as text|null,1,MAX_NAME_LEN))
|
||||
if (can_label) //Exploit prevention
|
||||
if (T)
|
||||
name = T
|
||||
@@ -454,40 +484,24 @@ update_flag
|
||||
_color["prim"] = href_list["icon"]
|
||||
if (href_list["choice"] == "Secondary color")
|
||||
if (href_list["icon"] == "none")
|
||||
_color["sec"] = ""
|
||||
colorcontainer["sec"]["anycolor"] = 0
|
||||
_color["sec"] = "none"
|
||||
else if (is_a_color(href_list["icon"],"sec"))
|
||||
_color["sec"] = href_list["icon"]
|
||||
colorcontainer["sec"]["anycolor"] = 1
|
||||
if (href_list["choice"] == "Tertiary color")
|
||||
if (href_list["icon"] == "none")
|
||||
_color["ter"] = ""
|
||||
colorcontainer["ter"]["anycolor"] = 0
|
||||
_color["ter"] = "none"
|
||||
else if (is_a_color(href_list["icon"],"ter"))
|
||||
_color["ter"] = href_list["icon"]
|
||||
colorcontainer["ter"]["anycolor"] = 1
|
||||
if (href_list["choice"] == "Quaternary color")
|
||||
if (href_list["icon"] == "none")
|
||||
_color["quart"] = ""
|
||||
colorcontainer["quart"]["anycolor"] = 0
|
||||
_color["quart"] = "none"
|
||||
else if (is_a_color(href_list["icon"],"quart"))
|
||||
_color["quart"] = href_list["icon"]
|
||||
colorcontainer["quart"]["anycolor"] = 1
|
||||
|
||||
|
||||
if (href_list["choice"] == "decals")
|
||||
if (is_a_decal(href_list["icon"]))
|
||||
for (var/list/L in possibledecals)
|
||||
if (L["icon"] == href_list["icon"])
|
||||
L["active"] = (L["active"] == 0)
|
||||
break
|
||||
|
||||
decals = list()
|
||||
|
||||
for (var/list/L in possibledecals)
|
||||
if (L["active"])
|
||||
if (!(L["icon"] in decals))
|
||||
decals.Add(L["icon"])
|
||||
|
||||
decals[href_list["icon"]] = (decals[href_list["icon"]] == 0)
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
update_icon()
|
||||
|
||||
@@ -526,10 +540,9 @@ update_flag
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/toxins/New()
|
||||
..()
|
||||
|
||||
|
||||
_color["prim"] = "orange"
|
||||
decals = list("plasma")
|
||||
possibledecals[3]["active"] = 1
|
||||
decals["plasma"] = 1
|
||||
src.air_contents.toxins = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
air_contents.update_values()
|
||||
|
||||
@@ -547,7 +560,7 @@ update_flag
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/sleeping_agent/New()
|
||||
..()
|
||||
|
||||
|
||||
_color["prim"] = "redws"
|
||||
var/datum/gas/sleeping_agent/trace_gas = new
|
||||
air_contents.trace_gases += trace_gas
|
||||
@@ -585,7 +598,7 @@ update_flag
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/carbon_dioxide/New()
|
||||
..()
|
||||
|
||||
|
||||
_color["prim"] = "black"
|
||||
src.air_contents.carbon_dioxide = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
air_contents.update_values()
|
||||
@@ -596,7 +609,7 @@ update_flag
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/air/New()
|
||||
..()
|
||||
|
||||
|
||||
_color["prim"] = "grey"
|
||||
src.air_contents.oxygen = (O2STANDARD*src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
src.air_contents.nitrogen = (N2STANDARD*src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
|
||||
@@ -179,75 +179,6 @@
|
||||
/obj/machinery/autolathe/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
if (!busy)
|
||||
if(href_list["menu"])
|
||||
screen = text2num(href_list["menu"])
|
||||
|
||||
if(href_list["category"])
|
||||
selected_category = href_list["category"]
|
||||
|
||||
if(href_list["make"])
|
||||
|
||||
var/turf/T = get_step(src.loc, get_dir(src,usr))
|
||||
|
||||
/////////////////
|
||||
//href protection
|
||||
being_built = files.FindDesignByID(href_list["make"]) //check if it's a valid design
|
||||
if(!being_built)
|
||||
return
|
||||
|
||||
//multiplier checks : only stacks can have one and its value is 1, 10 ,25 or max_multiplier
|
||||
var/multiplier = text2num(href_list["multiplier"])
|
||||
var/max_multiplier = min(50, being_built.materials["$metal"] ?round(m_amount/being_built.materials["$metal"]):INFINITY,being_built.materials["$glass"]?round(g_amount/being_built.materials["$glass"]):INFINITY)
|
||||
var/is_stack = ispath(being_built.build_path, /obj/item/stack)
|
||||
|
||||
if(!is_stack && (multiplier > 1))
|
||||
return
|
||||
if (!(multiplier in list(1,10,25,max_multiplier))) //"enough materials ?" is checked further down
|
||||
return
|
||||
/////////////////
|
||||
|
||||
var/coeff = (is_stack ? 1 : 2 ** prod_coeff) //stacks are unaffected by production coefficient
|
||||
var/metal_cost = being_built.materials["$metal"]
|
||||
var/glass_cost = being_built.materials["$glass"]
|
||||
|
||||
var/power = max(2000, (metal_cost+glass_cost)*multiplier/5)
|
||||
|
||||
if((m_amount >= metal_cost*multiplier/coeff) && (g_amount >= glass_cost*multiplier/coeff))
|
||||
busy = 1
|
||||
use_power(power)
|
||||
icon_state = "autolathe"
|
||||
flick("autolathe_n",src)
|
||||
spawn(32/coeff)
|
||||
use_power(power)
|
||||
if(is_stack)
|
||||
m_amount -= metal_cost*multiplier
|
||||
g_amount -= glass_cost*multiplier
|
||||
var/obj/item/stack/S = new being_built.build_path(T)
|
||||
S.amount = multiplier
|
||||
else
|
||||
m_amount -= metal_cost/coeff
|
||||
g_amount -= glass_cost/coeff
|
||||
var/obj/item/new_item = new being_built.build_path(T)
|
||||
new_item.m_amt /= coeff
|
||||
new_item.g_amt /= coeff
|
||||
if(m_amount < 0)
|
||||
m_amount = 0
|
||||
if(g_amount < 0)
|
||||
g_amount = 0
|
||||
busy = 0
|
||||
src.updateUsrDialog()
|
||||
|
||||
if(href_list["search"])
|
||||
matching_designs.Cut()
|
||||
|
||||
for(var/datum/design/D in files.known_designs)
|
||||
if(findtext(D.name,href_list["to_search"]))
|
||||
matching_designs.Add(D)
|
||||
|
||||
else
|
||||
usr << "<span class=\"alert\">The autolathe is busy. Please wait for completion of previous operation.</span>"
|
||||
|
||||
if(href_list["menu"])
|
||||
screen = text2num(href_list["menu"])
|
||||
|
||||
|
||||
@@ -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>")
|
||||
|
||||
|
||||
@@ -585,7 +585,7 @@
|
||||
|
||||
else if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = input(user, "Enter new robot name", src.name, src.created_name) as text
|
||||
t = copytext(sanitize(t), 1, MAX_NAME_LEN)
|
||||
t = sanitize(copytext(t), 1, MAX_NAME_LEN)
|
||||
if (!t)
|
||||
return
|
||||
if (!in_range(src, usr) && src.loc != usr)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -322,7 +324,7 @@ var/global/mulebot_count = 0
|
||||
|
||||
if("setid")
|
||||
refresh=0
|
||||
var/new_id = copytext(sanitize(input("Enter new bot ID", "Mulebot [suffix ? "([suffix])" : ""]", suffix) as text|null),1,MAX_NAME_LEN)
|
||||
var/new_id = sanitize(copytext(input("Enter new bot ID", "Mulebot [suffix ? "([suffix])" : ""]", suffix) as text|null,1,MAX_NAME_LEN))
|
||||
refresh=1
|
||||
if(new_id)
|
||||
suffix = new_id
|
||||
@@ -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
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
if (is_authenticated() && modify)
|
||||
var/t1 = href_list["assign_target"]
|
||||
if(t1 == "Custom")
|
||||
var/temp_t = copytext(sanitize(input("Enter a custom job assignment.","Assignment")),1,MAX_MESSAGE_LEN)
|
||||
var/temp_t = sanitize(copytext(input("Enter a custom job assignment.","Assignment"),1,MAX_MESSAGE_LEN))
|
||||
//let custom jobs function as an impromptu alt title, mainly for sechuds
|
||||
if(temp_t && modify)
|
||||
modify.assignment = temp_t
|
||||
|
||||
@@ -422,7 +422,7 @@
|
||||
//Enter message
|
||||
if("Message")
|
||||
custommessage = input(usr, "Please enter your message.") as text|null
|
||||
custommessage = copytext(sanitize(custommessage), 1, MAX_MESSAGE_LEN)
|
||||
custommessage = sanitize(copytext(custommessage, 1, MAX_MESSAGE_LEN))
|
||||
|
||||
//Send message
|
||||
if("Send")
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
usr << "Unauthorized Access."
|
||||
|
||||
else if(href_list["warn"])
|
||||
var/warning = copytext(sanitize(input(usr,"Message:","Enter your message here!","")),1,MAX_MESSAGE_LEN)
|
||||
var/warning = sanitize(copytext(input(usr,"Message:","Enter your message here!",""),1,MAX_MESSAGE_LEN))
|
||||
if(!warning) return
|
||||
var/obj/item/weapon/implant/I = locate(href_list["warn"])
|
||||
if((I)&&(I.imp_in))
|
||||
|
||||
@@ -358,7 +358,7 @@ About the new airlock wires panel:
|
||||
return ((src.aiControlDisabled==1) && (!hackProof) && (!src.isAllPowerLoss()));
|
||||
|
||||
/obj/machinery/door/airlock/proc/arePowerSystemsOn()
|
||||
if (stat & NOPOWER)
|
||||
if (stat & (NOPOWER|BROKEN))
|
||||
return 0
|
||||
return (src.secondsMainPowerLost==0 || src.secondsBackupPowerLost==0)
|
||||
|
||||
@@ -473,7 +473,8 @@ About the new airlock wires panel:
|
||||
if("spark")
|
||||
flick("door_spark", src)
|
||||
if("deny")
|
||||
flick("door_deny", src)
|
||||
if(density && src.arePowerSystemsOn())
|
||||
flick("door_deny", src)
|
||||
return
|
||||
|
||||
/obj/machinery/door/airlock/attack_ai(mob/user as mob)
|
||||
@@ -1028,19 +1029,19 @@ About the new airlock wires panel:
|
||||
if(density)
|
||||
if(beingcrowbarred == 0) //being fireaxe'd
|
||||
var/obj/item/weapon/twohanded/fireaxe/F = C
|
||||
if(F:wielded)
|
||||
if(F.wielded)
|
||||
spawn(0) open(1)
|
||||
else
|
||||
user << "\red You need to be wielding the Fire axe to do that."
|
||||
user << "\red You need to be wielding \the [C] to do that."
|
||||
else
|
||||
spawn(0) open(1)
|
||||
else
|
||||
if(beingcrowbarred == 0)
|
||||
var/obj/item/weapon/twohanded/fireaxe/F = C
|
||||
if(F:wielded)
|
||||
if(F.wielded)
|
||||
spawn(0) close(1)
|
||||
else
|
||||
user << "\red You need to be wielding the Fire axe to do that."
|
||||
user << "\red You need to be wielding \the [C] to do that."
|
||||
else
|
||||
spawn(0) close(1)
|
||||
else
|
||||
|
||||
@@ -8,11 +8,6 @@ obj/machinery/door/airlock
|
||||
var/datum/radio_frequency/radio_connection
|
||||
var/cur_command = null //the command the door is currently attempting to complete
|
||||
|
||||
obj/machinery/door/airlock/proc/can_radio()
|
||||
if(!arePowerSystemsOn())
|
||||
return 0
|
||||
return 1
|
||||
|
||||
obj/machinery/door/airlock/process()
|
||||
..()
|
||||
if (arePowerSystemsOn())
|
||||
@@ -21,14 +16,13 @@ obj/machinery/door/airlock/process()
|
||||
obj/machinery/door/airlock/receive_signal(datum/signal/signal)
|
||||
if (!arePowerSystemsOn()) return //no power
|
||||
|
||||
if (!can_radio()) return //no radio
|
||||
|
||||
if(!signal || signal.encryption) return
|
||||
|
||||
if(id_tag != signal.data["tag"] || !signal.data["command"]) return
|
||||
|
||||
cur_command = signal.data["command"]
|
||||
execute_current_command()
|
||||
spawn()
|
||||
execute_current_command()
|
||||
|
||||
obj/machinery/door/airlock/proc/execute_current_command()
|
||||
if(operating)
|
||||
@@ -94,7 +88,7 @@ obj/machinery/door/airlock/proc/command_completed(var/command)
|
||||
|
||||
return 1 //Unknown command. Just assume it's completed.
|
||||
|
||||
obj/machinery/door/airlock/proc/send_status()
|
||||
obj/machinery/door/airlock/proc/send_status(var/bumped = 0)
|
||||
if(radio_connection)
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = 1 //radio signal
|
||||
@@ -103,6 +97,9 @@ obj/machinery/door/airlock/proc/send_status()
|
||||
|
||||
signal.data["door_status"] = density?("closed"):("open")
|
||||
signal.data["lock_status"] = locked?("locked"):("unlocked")
|
||||
|
||||
if (bumped)
|
||||
signal.data["bumped_with_access"] = 1
|
||||
|
||||
radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, filter = RADIO_AIRLOCK)
|
||||
|
||||
@@ -122,17 +119,7 @@ obj/machinery/door/airlock/Bumped(atom/AM)
|
||||
if(istype(AM, /obj/mecha))
|
||||
var/obj/mecha/mecha = AM
|
||||
if(density && radio_connection && mecha.occupant && (src.allowed(mecha.occupant) || src.check_access_list(mecha.operation_req_access)))
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = 1 //radio signal
|
||||
signal.data["tag"] = id_tag
|
||||
signal.data["timestamp"] = world.time
|
||||
|
||||
signal.data["door_status"] = density?("closed"):("open")
|
||||
signal.data["lock_status"] = locked?("locked"):("unlocked")
|
||||
|
||||
signal.data["bumped_with_access"] = 1
|
||||
|
||||
radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, filter = RADIO_AIRLOCK)
|
||||
send_status(1)
|
||||
return
|
||||
|
||||
obj/machinery/door/airlock/proc/set_frequency(new_frequency)
|
||||
@@ -258,6 +245,12 @@ obj/machinery/access_button/update_icon()
|
||||
else
|
||||
icon_state = "access_button_off"
|
||||
|
||||
obj/machinery/access_button/attackby(obj/item/I as obj, mob/user as mob)
|
||||
//Swiping ID on the access button
|
||||
if (istype(I, /obj/item/weapon/card/id) || istype(I, /obj/item/device/pda))
|
||||
attack_hand(user)
|
||||
return
|
||||
..()
|
||||
|
||||
obj/machinery/access_button/attack_hand(mob/user)
|
||||
add_fingerprint(usr)
|
||||
@@ -296,4 +289,4 @@ obj/machinery/access_button/airlock_interior
|
||||
|
||||
obj/machinery/access_button/airlock_exterior
|
||||
frequency = 1379
|
||||
command = "cycle_exterior"
|
||||
command = "cycle_exterior"
|
||||
@@ -265,7 +265,7 @@
|
||||
var/datum/signal/signal = new
|
||||
signal.data["tag"] = tag
|
||||
signal.data["command"] = command
|
||||
post_signal(signal)
|
||||
post_signal(signal, RADIO_AIRLOCK)
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/proc/signalPump(var/tag, var/power, var/direction, var/pressure)
|
||||
var/datum/signal/signal = new
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
name = "Embedded Controller"
|
||||
anchored = 1
|
||||
|
||||
use_power = 1
|
||||
idle_power_usage = 10
|
||||
|
||||
var/on = 1
|
||||
|
||||
@@ -43,8 +46,10 @@
|
||||
density = 0
|
||||
|
||||
var/id_tag
|
||||
//var/radio_power_use = 50 //power used to xmit signals
|
||||
|
||||
var/frequency = 1379
|
||||
var/radio_filter = null
|
||||
var/datum/radio_frequency/radio_connection
|
||||
unacidable = 1
|
||||
|
||||
@@ -60,14 +65,15 @@
|
||||
else
|
||||
icon_state = "airlock_control_off"
|
||||
|
||||
/obj/machinery/embedded_controller/radio/post_signal(datum/signal/signal)
|
||||
/obj/machinery/embedded_controller/radio/post_signal(datum/signal/signal, var/filter = null)
|
||||
signal.transmission_method = TRANSMISSION_RADIO
|
||||
if(radio_connection)
|
||||
return radio_connection.post_signal(src, signal)
|
||||
//use_power(radio_power_use) //neat idea, but causes way too much lag.
|
||||
return radio_connection.post_signal(src, signal, filter)
|
||||
else
|
||||
del(signal)
|
||||
|
||||
/obj/machinery/embedded_controller/radio/proc/set_frequency(new_frequency)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = radio_controller.add_object(src, frequency)
|
||||
radio_connection = radio_controller.add_object(src, frequency, radio_filter)
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -323,7 +323,7 @@
|
||||
if(speed <= 0)
|
||||
speed = 1
|
||||
if("setpath")
|
||||
var/newpath = copytext(sanitize(input(usr, "Please define a new path!",,path) as text|null),1,MAX_MESSAGE_LEN)
|
||||
var/newpath = sanitize(copytext(input(usr, "Please define a new path!",,path) as text|null,1,MAX_MESSAGE_LEN))
|
||||
if(newpath && newpath != "")
|
||||
moving = 0 // stop moving
|
||||
path = newpath
|
||||
|
||||
@@ -193,7 +193,7 @@ Transponder Codes:<UL>"}
|
||||
updateDialog()
|
||||
|
||||
else if(href_list["locedit"])
|
||||
var/newloc = copytext(sanitize(input("Enter New Location", "Navigation Beacon", location) as text|null),1,MAX_MESSAGE_LEN)
|
||||
var/newloc = sanitize(copytext(input("Enter New Location", "Navigation Beacon", location) as text|null,1,MAX_MESSAGE_LEN))
|
||||
if(newloc)
|
||||
location = newloc
|
||||
updateDialog()
|
||||
|
||||
@@ -944,7 +944,7 @@ obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
user << "<FONT COLOR='blue'>There's already a scribble in this page... You wouldn't want to make things too cluttered, would you?</FONT>"
|
||||
else
|
||||
var/s = strip_html( input(user, "Write something", "Newspaper", "") )
|
||||
s = copytext(sanitize(s), 1, MAX_MESSAGE_LEN)
|
||||
s = sanitize(copytext(s, 1, MAX_MESSAGE_LEN))
|
||||
if (!s)
|
||||
return
|
||||
if (!in_range(src, usr) && src.loc != usr)
|
||||
|
||||
@@ -848,7 +848,7 @@ Status: []<BR>"},
|
||||
|
||||
if (istype(W, /obj/item/weapon/pen)) // you can rename turrets like bots!
|
||||
var/t = input(user, "Enter new turret name", src.name, src.finish_name) as text
|
||||
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
|
||||
t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN))
|
||||
if (!t)
|
||||
return
|
||||
if (!in_range(src, usr) && src.loc != usr)
|
||||
|
||||
@@ -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"]]"
|
||||
|
||||
|
||||
@@ -32,4 +32,10 @@
|
||||
/obj/effect/overlay/coconut
|
||||
name = "Coconuts"
|
||||
icon = 'icons/misc/beach.dmi'
|
||||
icon_state = "coconuts"
|
||||
icon_state = "coconuts"
|
||||
|
||||
/obj/effect/overlay/adminoverlay
|
||||
name = "adminoverlay"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "admin"
|
||||
layer = 4.1
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
return
|
||||
if (!in_range(src, user) && src.loc != user)
|
||||
return
|
||||
t = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
|
||||
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
|
||||
if (t)
|
||||
src.name = "body bag - "
|
||||
src.name += t
|
||||
|
||||
@@ -689,7 +689,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
U << "The PDA softly beeps."
|
||||
ui.close()
|
||||
else
|
||||
t = copytext(sanitize(t), 1, 20)
|
||||
t = sanitize(copytext(t, 1, 20))
|
||||
ttone = t
|
||||
else
|
||||
ui.close()
|
||||
@@ -897,7 +897,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
/obj/item/device/pda/proc/create_message(var/mob/living/U = usr, var/obj/item/device/pda/P)
|
||||
|
||||
var/t = input(U, "Please enter message", name, null) as text
|
||||
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
|
||||
t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN))
|
||||
t = readd_quotes(t)
|
||||
if (!t || !istype(P))
|
||||
return
|
||||
|
||||
@@ -48,6 +48,8 @@
|
||||
signal.data[key4] = value4
|
||||
|
||||
frequency.post_signal(src, signal, filter = s_filter)
|
||||
|
||||
return
|
||||
|
||||
/obj/item/radio/integrated/receive_signal(datum/signal/signal)
|
||||
/*var/obj/item/device/pda/P = src.loc
|
||||
|
||||
@@ -66,10 +66,11 @@
|
||||
if(user && convert)
|
||||
terrible_conversion_proc(M, user)
|
||||
M.Stun(1)
|
||||
user.visible_message("<span class='disarm'>[user] blinds [M] with the flash!</span>")
|
||||
user.visible_message("<span class='disarm'>[user] blinds [M] with the flash!</span>")
|
||||
return 1
|
||||
else
|
||||
user.visible_message("<span class='disarm'>[user] fails to blind [M] with the flash!</span>")
|
||||
if(user)
|
||||
user.visible_message("<span class='disarm'>[user] fails to blind [M] with the flash!</span>")
|
||||
return 0
|
||||
|
||||
/obj/item/device/flash/attack(mob/living/M, mob/user)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
user << "\red \The [src] needs to recharge!"
|
||||
return
|
||||
|
||||
var/message = copytext(sanitize(input(user, "Shout a message?", "Megaphone", null) as text),1,MAX_MESSAGE_LEN)
|
||||
var/message = sanitize(copytext(input(user, "Shout a message?", "Megaphone", null) as text,1,MAX_MESSAGE_LEN))
|
||||
if(!message)
|
||||
return
|
||||
message = capitalize(message)
|
||||
|
||||
@@ -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,10 +259,13 @@
|
||||
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)
|
||||
var/newlaws = sanitize(copytext(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)
|
||||
pai.pai_laws = newlaws
|
||||
pai << "Your supplemental directives have been updated. Your new directives are:"
|
||||
|
||||
@@ -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, :z - service, :m - medical, :n - science."
|
||||
flags = EARBANGPROTECT
|
||||
icon_state = "com_headset_alt"
|
||||
item_state = "com_headset_alt"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon_state = "intercom"
|
||||
anchored = 1
|
||||
w_class = 4.0
|
||||
canhear_range = 5
|
||||
canhear_range = 2
|
||||
flags = CONDUCT | NOBLOODY
|
||||
var/number = 0
|
||||
var/anyai = 1
|
||||
@@ -15,7 +15,7 @@
|
||||
..()
|
||||
processing_objects += src
|
||||
|
||||
/obj/item/device/radio/intercom/Destroy()
|
||||
/obj/item/device/radio/intercom/Del()
|
||||
processing_objects -= src
|
||||
..()
|
||||
|
||||
@@ -24,10 +24,6 @@
|
||||
spawn (0)
|
||||
attack_self(user)
|
||||
|
||||
/obj/item/device/radio/intercom/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
/obj/item/device/radio/intercom/attack_hand(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
spawn (0)
|
||||
@@ -36,15 +32,13 @@
|
||||
/obj/item/device/radio/intercom/receive_range(freq, level)
|
||||
if (!on)
|
||||
return -1
|
||||
if (isWireCut(WIRE_RECEIVE))
|
||||
return -1
|
||||
if(!(0 in level))
|
||||
var/turf/position = get_turf(src)
|
||||
if(isnull(position) || !(position.z in level))
|
||||
return -1
|
||||
if (!src.listening)
|
||||
return -1
|
||||
if(freq == SYND_FREQ)
|
||||
if(freq in ANTAG_FREQS)
|
||||
if(!(src.syndie))
|
||||
return -1//Prevents broadcast of messages over devices lacking the encryption
|
||||
|
||||
@@ -72,4 +66,4 @@
|
||||
if(!on)
|
||||
icon_state = "intercom-p"
|
||||
else
|
||||
icon_state = "intercom"
|
||||
icon_state = "intercom"
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -250,7 +250,7 @@
|
||||
return
|
||||
src.registered_name = t
|
||||
|
||||
var u = copytext(sanitize(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Civilian")),1,MAX_MESSAGE_LEN)
|
||||
var u = sanitize(copytext(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Civilian"),1,MAX_MESSAGE_LEN))
|
||||
if(!u)
|
||||
alert("Invalid assignment.")
|
||||
src.registered_name = ""
|
||||
@@ -265,13 +265,13 @@
|
||||
|
||||
switch(alert("Would you like to display the ID, or retitle it?","Choose.","Rename","Show"))
|
||||
if("Rename")
|
||||
var t = copytext(sanitize(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name)),1,26)
|
||||
var t = sanitize(copytext(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name),1,26))
|
||||
if(!t || t == "Unknown" || t == "floor" || t == "wall" || t == "r-wall") //Same as mob/new_player/prefrences.dm
|
||||
alert("Invalid name.")
|
||||
return
|
||||
src.registered_name = t
|
||||
|
||||
var u = copytext(sanitize(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Civilian")),1,MAX_MESSAGE_LEN)
|
||||
var u = sanitize(copytext(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Civilian"),1,MAX_MESSAGE_LEN))
|
||||
if(!u)
|
||||
alert("Invalid assignment.")
|
||||
src.registered_name = ""
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
return
|
||||
if((!in_range(src, usr) && src.loc != user))
|
||||
return
|
||||
t = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
|
||||
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
|
||||
if(t)
|
||||
src.name = text("Glass Case- '[]'", t)
|
||||
else
|
||||
|
||||
@@ -673,7 +673,7 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<iframe width='100%' height='97%' src="http://nanotrasen.se/wiki/index.php?title=Space_law&printable=yes" frameborder="0" id="main_frame"></iframe> </body>
|
||||
<iframe width='100%' height='97%' src="http://nanotrasen.se/wiki/index.php?title=Space_Law&printable=yes" frameborder="0" id="main_frame"></iframe> </body>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
@@ -21,6 +21,11 @@
|
||||
// Reagent ID => friendly name
|
||||
var/list/reagents_to_log=list()
|
||||
|
||||
/obj/New()
|
||||
..()
|
||||
if(ticker && ticker.current_state == GAME_STATE_PLAYING)
|
||||
initialize()
|
||||
|
||||
/obj/Topic(href, href_list, var/nowindow = 0, var/checkrange = 1)
|
||||
// Calling Topic without a corresponding window open causes runtime errors
|
||||
if(!nowindow && ..())
|
||||
|
||||
@@ -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
|
||||
@@ -111,7 +111,7 @@
|
||||
return
|
||||
if ((!in_range(src, usr) && src.loc != user))
|
||||
return
|
||||
t = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
|
||||
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
|
||||
if (t)
|
||||
src.name = text("Morgue- '[]'", t)
|
||||
src.overlays += image(src.icon, "morgue_label")
|
||||
@@ -285,7 +285,7 @@
|
||||
return
|
||||
if ((!in_range(src, usr) > 1 && src.loc != user))
|
||||
return
|
||||
t = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
|
||||
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
|
||||
if (t)
|
||||
src.name = text("Crematorium- '[]'", t)
|
||||
else
|
||||
|
||||
@@ -373,7 +373,7 @@ var/list/mechtoys = list(
|
||||
if(!istype(P)) return
|
||||
|
||||
var/timeout = world.time + 600
|
||||
var/reason = copytext(sanitize(input(usr,"Reason:","Why do you require this item?","") as null|text),1,MAX_MESSAGE_LEN)
|
||||
var/reason = sanitize(copytext(input(usr,"Reason:","Why do you require this item?","") as null|text,1,MAX_MESSAGE_LEN))
|
||||
if(world.time > timeout) return
|
||||
if(!reason) return
|
||||
|
||||
@@ -578,7 +578,7 @@ var/list/mechtoys = list(
|
||||
if(!istype(P)) return
|
||||
|
||||
var/timeout = world.time + 600
|
||||
var/reason = copytext(sanitize(input(usr,"Reason:","Why do you require this item?","") as null|text),1,MAX_MESSAGE_LEN)
|
||||
var/reason = sanitize(copytext(input(usr,"Reason:","Why do you require this item?","") as null|text,1,MAX_MESSAGE_LEN))
|
||||
if(world.time > timeout) return
|
||||
if(!reason) return
|
||||
|
||||
|
||||
@@ -61,15 +61,13 @@
|
||||
pod_overlays = new/list(2)
|
||||
pod_overlays[DAMAGE] = image(icon, icon_state="pod_damage")
|
||||
pod_overlays[FIRE] = image(icon, icon_state="pod_fire")
|
||||
|
||||
|
||||
overlays.Cut()
|
||||
|
||||
if(health <= round(initial(health)/2))
|
||||
overlays += pod_overlays[DAMAGE]
|
||||
if(health <= round(initial(health)/4))
|
||||
overlays += pod_overlays[FIRE]
|
||||
else
|
||||
overlays -= pod_overlays[FIRE]
|
||||
else
|
||||
overlays -= pod_overlays[DAMAGE]
|
||||
|
||||
/obj/spacepod/bullet_act(var/obj/item/projectile/P)
|
||||
if(P.damage && !P.nodamage)
|
||||
@@ -133,6 +131,12 @@
|
||||
|
||||
update_icons()
|
||||
|
||||
/obj/spacepod/proc/repair_damage(var/repair_amount)
|
||||
if(health)
|
||||
health = min(initial(health), health + repair_amount)
|
||||
update_icons()
|
||||
|
||||
|
||||
/obj/spacepod/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
@@ -157,10 +161,12 @@
|
||||
/obj/spacepod/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(iscrowbar(W))
|
||||
hatch_open = !hatch_open
|
||||
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
user << "<span class='notice'>You [hatch_open ? "open" : "close"] the maintenance hatch.</span>"
|
||||
if(istype(W, /obj/item/weapon/stock_parts/cell))
|
||||
if(!hatch_open)
|
||||
return ..()
|
||||
user << "\red The maintenance hatch is closed!"
|
||||
return
|
||||
if(battery)
|
||||
user << "<span class='notice'>The pod already has a battery.</span>"
|
||||
return
|
||||
@@ -170,7 +176,8 @@
|
||||
return
|
||||
if(istype(W, /obj/item/device/spacepod_equipment))
|
||||
if(!hatch_open)
|
||||
return ..()
|
||||
user << "\red The maintenance hatch is closed!"
|
||||
return
|
||||
if(!equipment_system)
|
||||
user << "<span class='warning'>The pod has no equipment datum, yell at pomf</span>"
|
||||
return
|
||||
@@ -185,6 +192,23 @@
|
||||
equipment_system.weapon_system = W
|
||||
equipment_system.weapon_system.my_atom = src
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
if(!hatch_open)
|
||||
user << "\red You must open the maintenance hatch before attempting repairs."
|
||||
return
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(!WT.isOn())
|
||||
user << "\red The welder must be on for this task."
|
||||
return
|
||||
if (health < initial(health))
|
||||
user << "\blue You start welding the spacepod..."
|
||||
playsound(loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
if(!src || !WT.remove_fuel(3, user)) return
|
||||
repair_damage(10)
|
||||
user << "\blue You mend some [pick("dents","bumps","damage")] with \the [WT]"
|
||||
else
|
||||
user << "\blue <b>\The [src] is fully repaired!</b>"
|
||||
|
||||
/obj/spacepod/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
@@ -408,6 +432,7 @@
|
||||
|
||||
|
||||
/obj/spacepod/MouseDrop_T(mob/M as mob, mob/user as mob)
|
||||
if(!isliving(M)) return
|
||||
if(M != user)
|
||||
if(M.stat != 0)
|
||||
if(allow2enter)
|
||||
|
||||
@@ -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
|
||||
@@ -10,7 +10,7 @@ var/global/normal_ooc_colour = "#002eb8"
|
||||
src << "Guests may not use OOC."
|
||||
return
|
||||
|
||||
msg = trim(copytext(sanitize(msg), 1, MAX_MESSAGE_LEN))
|
||||
msg = trim(sanitize(copytext(msg, 1, MAX_MESSAGE_LEN)))
|
||||
if(!msg) return
|
||||
|
||||
if(!(prefs.toggles & CHAT_OOC))
|
||||
@@ -92,7 +92,7 @@ var/global/normal_ooc_colour = "#002eb8"
|
||||
src << "Guests may not use OOC."
|
||||
return
|
||||
|
||||
msg = trim(copytext(sanitize(msg), 1, MAX_MESSAGE_LEN))
|
||||
msg = trim(sanitize(copytext(msg, 1, MAX_MESSAGE_LEN)))
|
||||
if(!msg) return
|
||||
|
||||
if(!(prefs.toggles & CHAT_LOOC))
|
||||
|
||||
@@ -42,7 +42,7 @@ var/list/admin_verbs_admin = list(
|
||||
/client/proc/admin_memo, /*admin memo system. show/delete/write. +SERVER needed to delete admin memos of others*/
|
||||
/client/proc/dsay, /*talk in deadchat using our ckey/fakekey*/
|
||||
/client/proc/toggleprayers, /*toggles prayers on/off*/
|
||||
// /client/proc/toggle_hear_radio, /*toggles whether we hear the radio*/
|
||||
/client/proc/toggle_hear_radio, /*toggles whether we hear the radio*/
|
||||
/client/proc/investigate_show, /*various admintools for investigation. Such as a singulo grief-log*/
|
||||
/datum/admins/proc/toggleooc, /*toggles ooc on/off for everyone*/
|
||||
/datum/admins/proc/toggleoocdead, /*toggles ooc on/off for everyone who is dead*/
|
||||
@@ -60,7 +60,10 @@ var/list/admin_verbs_admin = list(
|
||||
/client/proc/man_up,
|
||||
/client/proc/global_man_up,
|
||||
/client/proc/delbook,
|
||||
/client/proc/empty_ai_core_toggle_latejoin
|
||||
/client/proc/empty_ai_core_toggle_latejoin,
|
||||
/client/proc/freeze,
|
||||
/client/proc/freezemecha
|
||||
|
||||
)
|
||||
var/list/admin_verbs_ban = list(
|
||||
/client/proc/unban_panel,
|
||||
|
||||
@@ -2242,7 +2242,7 @@
|
||||
if(!ticker)
|
||||
alert("The game hasn't started yet!")
|
||||
return
|
||||
var/objective = copytext(sanitize(input("Enter an objective")),1,MAX_MESSAGE_LEN)
|
||||
var/objective = sanitize(copytext(input("Enter an objective"),1,MAX_MESSAGE_LEN))
|
||||
if(!objective)
|
||||
return
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
|
||||
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
|
||||
if(!msg) return
|
||||
|
||||
log_admin("[key_name(src)] : [msg]")
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
if(!check_rights(R_ADMIN|R_MOD)) return
|
||||
|
||||
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
|
||||
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
|
||||
log_admin("MOD: [key_name(src)] : [msg]")
|
||||
|
||||
if (!msg)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
if (src.holder.rights & R_ADMIN)
|
||||
stafftype = "ADMIN"
|
||||
|
||||
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
|
||||
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
|
||||
log_admin("[key_name(src)] : [msg]")
|
||||
|
||||
if (!msg)
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//////Freeze Mob/Mech Verb -- Ported from NSS Pheonix (Unbound Travels)/////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//////Allows admin's to right click on any mob/mech and freeze them in place.///
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/client/proc/freeze(mob/living/M as mob in mob_list)
|
||||
set category = "Special Verbs"
|
||||
set name = "Freeze"
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
if(!mob)
|
||||
return
|
||||
if(!istype(M))
|
||||
alert("Cannot freeze a ghost")
|
||||
return
|
||||
if(usr)
|
||||
if (usr.client)
|
||||
if(usr.client.holder)
|
||||
if (istype(M, /mob/living/carbon/slime))
|
||||
if(!M.paralysis)
|
||||
M.adjustToxLoss(2147483647)
|
||||
M.AdjustParalysis(2147483647)
|
||||
var/adminomaly = new/obj/effect/overlay/adminoverlay
|
||||
spawn(50)
|
||||
M.overlays += adminomaly
|
||||
M << "<b><font color= red>You have been frozen by <a href='?priv_msg=\ref[usr.client]'>[key]</a></b></font>"
|
||||
message_admins("\blue [key_name_admin(usr)] froze [key_name(M)]")
|
||||
log_admin("[key_name(usr)] froze [key_name(M)]")
|
||||
else if (M.paralysis)
|
||||
M.AdjustParalysis(-2147483647)
|
||||
M.blinded = 0
|
||||
M.lying = 0
|
||||
M.stat = 0
|
||||
M << "<b> <font color= red>You have been unfrozen by <a href='?priv_msg=\ref[usr.client]'>[key]</a></b></font>"
|
||||
message_admins("\blue [key_name_admin(usr)] unfroze [key_name(M)]")
|
||||
log_admin("[key_name(usr)] unfroze [key_name(M)]")
|
||||
M.revive()
|
||||
else if (istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/FM = M
|
||||
|
||||
if(!FM.paralysis)
|
||||
FM.anchored = 1
|
||||
FM.frozen = 1
|
||||
FM.AdjustParalysis(2147483647)
|
||||
var/adminomaly = new/obj/effect/overlay/adminoverlay
|
||||
spawn(50)
|
||||
FM.overlays += adminomaly
|
||||
FM << "<b><font color= red>You have been frozen by <a href='?priv_msg=\ref[usr.client]'>[key]</a></b></font>"
|
||||
message_admins("\blue [key_name_admin(usr)] froze [key_name(FM)]")
|
||||
log_admin("[key_name(usr)] froze [key_name(FM)]")
|
||||
else if (M.paralysis)
|
||||
FM.anchored = 0
|
||||
FM.frozen = 0
|
||||
FM.AdjustParalysis(-2147483647)
|
||||
FM.blinded = 0
|
||||
FM.lying = 0
|
||||
FM.stat = 0
|
||||
|
||||
FM << "<b> <font color= red>You have been unfrozen by <a href='?priv_msg=\ref[usr.client]'>[key]</a></b></font>"
|
||||
message_admins("\blue [key_name_admin(usr)] unfroze [key_name(FM)]")
|
||||
log_admin("[key_name(usr)] unfroze [key_name(FM)]")
|
||||
|
||||
else
|
||||
|
||||
if(!M.paralysis)
|
||||
M.anchored = 1
|
||||
M.AdjustParalysis(2147483647)
|
||||
var/adminomaly = new/obj/effect/overlay/adminoverlay
|
||||
spawn(50)
|
||||
M.overlays += adminomaly
|
||||
M << "<b><font color= red>You have been frozen by <a href='?priv_msg=\ref[usr.client]'>[key]</a></b></font>"
|
||||
message_admins("\blue [key_name_admin(usr)] froze [key_name(M)]")
|
||||
log_admin("[key_name(usr)] froze [key_name(M)]")
|
||||
else if (M.paralysis)
|
||||
M.anchored = 0
|
||||
M.AdjustParalysis(-2147483647)
|
||||
M.blinded = 0
|
||||
M.lying = 0
|
||||
M.stat = 0
|
||||
|
||||
M << "<b> <font color= red>You have been unfrozen by <a href='?priv_msg=\ref[usr.client]'>[key]</a></b></font>"
|
||||
message_admins("\blue [key_name_admin(usr)] unfroze [key_name(M)]")
|
||||
log_admin("[key_name(usr)] unfroze [key_name(M)]")
|
||||
|
||||
|
||||
/client/proc/freezemecha(obj/mecha/O as obj in mechas_list)
|
||||
set category = "Special Verbs"
|
||||
set name = "Freeze Mech"
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
var/obj/mecha/M = O
|
||||
if(!istype(M,/obj/mecha))
|
||||
src << "\red <b>This can only be used on Mechs!</b>"
|
||||
return
|
||||
else
|
||||
if(usr)
|
||||
if (usr.client)
|
||||
if(usr.client.holder)
|
||||
var/adminomaly = new/obj/effect/overlay/adminoverlay
|
||||
if(M.can_move == 1)
|
||||
M.can_move = 0
|
||||
M.overlays += adminomaly
|
||||
if(M.occupant)
|
||||
M.removeVerb(/obj/mecha/verb/eject)
|
||||
M.occupant << "<b><font color= red>You have been frozen by <a href='?priv_msg=\ref[usr.client]'>[key]</a></b></font>"
|
||||
message_admins("\blue [key_name_admin(usr)] froze [key_name(M.occupant)] in a [M.name]")
|
||||
log_admin("[key_name(usr)] froze [key_name(M.occupant)] in a [M.name]")
|
||||
else
|
||||
message_admins("\blue [key_name_admin(usr)] froze an empty [M.name]")
|
||||
log_admin("[key_name(usr)] froze an empty [M.name]")
|
||||
else if(M.can_move == 0)
|
||||
M.can_move = 1
|
||||
M.overlays -= adminomaly
|
||||
if(M.occupant)
|
||||
M.addVerb(/obj/mecha/verb/eject)
|
||||
M.occupant << "<b><font color= red>You have been unfrozen by <a href='?priv_msg=\ref[usr.client]'>[key]</a></b></font>"
|
||||
message_admins("\blue [key_name_admin(usr)] unfroze [key_name(M.occupant)] in a [M.name]")
|
||||
log_admin("[key_name(usr)] unfroze [M.occupant.name]/[M.occupant.ckey] in a [M.name]")
|
||||
else
|
||||
message_admins("\blue [key_name_admin(usr)] unfroze an empty [M.name]")
|
||||
log_admin("[key_name(usr)] unfroze an empty [M.name]")
|
||||
@@ -19,7 +19,7 @@ var/global/sent_honksquad = 0
|
||||
|
||||
var/input = null
|
||||
while(!input)
|
||||
input = copytext(sanitize(input(src, "Please specify which mission the HONKsquad shall undertake.", "Specify Mission", "")),1,MAX_MESSAGE_LEN)
|
||||
input = sanitize(copytext(input(src, "Please specify which mission the HONKsquad shall undertake.", "Specify Mission", ""),1,MAX_MESSAGE_LEN))
|
||||
if(!input)
|
||||
if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes")
|
||||
return
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set category = "IC"
|
||||
set name = "Pray"
|
||||
|
||||
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
|
||||
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
|
||||
if(!msg) return
|
||||
|
||||
if(usr.client)
|
||||
@@ -15,23 +15,9 @@
|
||||
var/image/cross = image('icons/obj/storage.dmi',"bible")
|
||||
msg = "\blue \icon[cross] <b><font color=purple>PRAY: </font>[key_name(src, 1)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[src]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=\ref[src]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[src]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[src]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[src]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;adminspawncookie=\ref[src]'>SC</a>):</b> [msg]"
|
||||
|
||||
var/list/eventholders = list()
|
||||
var/list/banholders = list()
|
||||
|
||||
for(var/client/X in admins)
|
||||
if(R_EVENT & X.holder.rights)
|
||||
eventholders += X
|
||||
if(R_BAN & X.holder.rights)
|
||||
banholders += X
|
||||
|
||||
if(eventholders.len)
|
||||
for(var/client/C in eventholders)
|
||||
if(C.prefs.toggles & CHAT_PRAYER)
|
||||
C << msg
|
||||
else if (banholders.len)
|
||||
for(var/client/C in banholders)
|
||||
if(C.prefs.toggles & CHAT_PRAYER)
|
||||
C << msg
|
||||
X << msg
|
||||
|
||||
usr << "Your prayers have been received by the gods."
|
||||
|
||||
@@ -39,67 +25,25 @@
|
||||
//log_admin("HELP: [key_name(src)]: [msg]")
|
||||
|
||||
/proc/Centcomm_announce(var/text , var/mob/Sender)
|
||||
var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "\blue <b><font color=orange>CENTCOMM:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
|
||||
|
||||
var/list/eventholders = list()
|
||||
var/list/banholders = list()
|
||||
|
||||
for(var/client/X in admins)
|
||||
if(R_EVENT & X.holder.rights)
|
||||
eventholders += X
|
||||
if(R_BAN & X.holder.rights)
|
||||
banholders += X
|
||||
|
||||
if(eventholders.len)
|
||||
for(var/client/C in eventholders)
|
||||
C << msg
|
||||
return
|
||||
else if (banholders.len)
|
||||
for(var/client/C in banholders)
|
||||
C << msg
|
||||
return
|
||||
X << msg
|
||||
|
||||
/proc/Syndicate_announce(var/text , var/mob/Sender)
|
||||
var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "\blue <b><font color='#DC143C'>SYNDICATE:</font> [key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;SyndicateReply=\ref[Sender]'>REPLY</A>):</b> [msg]"
|
||||
|
||||
var/list/eventholders = list()
|
||||
var/list/banholders = list()
|
||||
|
||||
for(var/client/X in admins)
|
||||
if(R_EVENT & X.holder.rights)
|
||||
eventholders += X
|
||||
if(R_BAN & X.holder.rights)
|
||||
banholders += X
|
||||
|
||||
if(eventholders.len)
|
||||
for(var/client/C in eventholders)
|
||||
C << msg
|
||||
return
|
||||
else if (banholders.len)
|
||||
for(var/client/C in banholders)
|
||||
C << msg
|
||||
return
|
||||
X << msg
|
||||
|
||||
/proc/HONK_announce(var/text , var/mob/Sender)
|
||||
var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "\blue <b><font color=pink>HONK:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;HONKReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
|
||||
|
||||
var/list/eventholders = list()
|
||||
var/list/banholders = list()
|
||||
|
||||
for(var/client/X in admins)
|
||||
if(R_EVENT & X.holder.rights)
|
||||
eventholders += X
|
||||
if(R_BAN & X.holder.rights)
|
||||
banholders += X
|
||||
|
||||
if(eventholders.len)
|
||||
for(var/client/C in eventholders)
|
||||
C << msg
|
||||
return
|
||||
else if (banholders.len)
|
||||
for(var/client/C in banholders)
|
||||
C << msg
|
||||
return
|
||||
X << msg
|
||||
@@ -19,7 +19,7 @@ var/global/sent_strike_team = 0
|
||||
|
||||
var/input = null
|
||||
while(!input)
|
||||
input = copytext(sanitize(input(src, "Please specify which mission the death commando squad shall undertake.", "Specify Mission", "")),1,MAX_MESSAGE_LEN)
|
||||
input = sanitize(copytext(input(src, "Please specify which mission the death commando squad shall undertake.", "Specify Mission", ""),1,MAX_MESSAGE_LEN))
|
||||
if(!input)
|
||||
if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes")
|
||||
return
|
||||
|
||||
@@ -24,7 +24,7 @@ var/global/sent_syndicate_strike_team = 0
|
||||
|
||||
var/input = null
|
||||
while(!input)
|
||||
input = copytext(sanitize(input(src, "Please specify which mission the syndicate strike team shall undertake.", "Specify Mission", "")),1,MAX_MESSAGE_LEN)
|
||||
input = sanitize(copytext(input(src, "Please specify which mission the syndicate strike team shall undertake.", "Specify Mission", ""),1,MAX_MESSAGE_LEN))
|
||||
if(!input)
|
||||
if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes")
|
||||
return
|
||||
|
||||
@@ -144,14 +144,13 @@
|
||||
|
||||
|
||||
proc/set_frequency(new_frequency)
|
||||
if(!radio_controller)
|
||||
sleep(20)
|
||||
if(!radio_controller)
|
||||
spawn(20)
|
||||
if(!radio_controller)
|
||||
return
|
||||
radio_controller.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = radio_controller.add_object(src, frequency, RADIO_CHAT)
|
||||
return
|
||||
radio_controller.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = radio_controller.add_object(src, frequency, RADIO_CHAT)
|
||||
return
|
||||
|
||||
// Embedded signaller used in anomalies.
|
||||
/obj/item/device/assembly/signaler/anomaly
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
|
||||
/obj/effect/landmark/corpse/proc/createCorpse() //Creates a mob and checks for gear in each slot before attempting to equip it.
|
||||
var/mob/living/carbon/human/human/M = new /mob/living/carbon/human/human (src.loc)
|
||||
M.dna.mutantrace = mutantrace
|
||||
M.real_name = src.name
|
||||
M.death(1) //Kills the new mob
|
||||
M.timeofdeath = timeofdeath
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
/area/awaymission/academy
|
||||
name = "\improper Academy Asteroids"
|
||||
icon_state = "away"
|
||||
report_alerts = 0
|
||||
|
||||
/area/awaymission/academy/headmaster
|
||||
name = "\improper Academy Fore Block"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
name = "\improper BMP Asteroids"
|
||||
icon_state = "away"
|
||||
luminosity = 0
|
||||
|
||||
report_alerts = 0
|
||||
|
||||
/area/awaymission/BMPship/Aft
|
||||
name = "\improper Aft Block"
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
name = "XCC-P5831"
|
||||
icon_state = "away"
|
||||
requires_power = 0
|
||||
|
||||
report_alerts = 0
|
||||
|
||||
/area/awaymission/centcomAway/general
|
||||
name = "XCC-P5831"
|
||||
music = "music/ambigen3.ogg"
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
//Challenge Areas
|
||||
|
||||
/area/awaymission/challenge
|
||||
name = "Challenge"
|
||||
icon_state = "away"
|
||||
report_alerts = 0
|
||||
|
||||
/area/awaymission/challenge/start
|
||||
name = "Where Am I?"
|
||||
icon_state = "away"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
luminosity = 1
|
||||
lighting_use_dynamic = 0
|
||||
requires_power = 0
|
||||
report_alerts = 0
|
||||
|
||||
/area/awaymission/clownplanet/miningtown
|
||||
name = "\improper Clown Planet - Bananium-o-Rama"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
name = "\improper Space Battle"
|
||||
icon_state = "away"
|
||||
requires_power = 0
|
||||
report_alerts = 0
|
||||
|
||||
/area/awaymission/spacebattle/cruiser
|
||||
name = "\improper Nanotrasen Cruiser"
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
* Areas
|
||||
*/
|
||||
//Gateroom gets its own APC specifically for the gate
|
||||
/area/awaymission
|
||||
report_alerts = 0
|
||||
|
||||
/area/awaymission/gateroom
|
||||
|
||||
//Library, medbay, storage room
|
||||
|
||||
@@ -25,6 +25,16 @@
|
||||
src << "As a ghost, you will now [(prefs.toggles & CHAT_GHOSTRADIO) ? "hear all radio chat in the world" : "only hear from nearby speakers"]."
|
||||
prefs.save_preferences(src)
|
||||
feedback_add_details("admin_verb","TGR")
|
||||
|
||||
/client/proc/toggle_hear_radio()
|
||||
set name = "Show/Hide RadioChatter"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggle seeing radiochatter from radios and speakers"
|
||||
if(!holder) return
|
||||
prefs.toggles ^= CHAT_RADIO
|
||||
prefs.save_preferences(src)
|
||||
usr << "You will [(prefs.toggles & CHAT_RADIO) ? "now" : "no longer"] see radio chatter from radios or speakers"
|
||||
feedback_add_details("admin_verb","THR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/toggleadminhelpsound()
|
||||
set name = "Hear/Silence Adminhelps"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user