mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-01-10 09:23:18 +00:00
Merge branch 'dev' into PowerTwo
Conflicts: code/modules/power/solar.dm
This commit is contained in:
@@ -109,6 +109,17 @@
|
||||
O.show_message("\red [usr] destroys the [name]!", 1)
|
||||
health = 0
|
||||
else
|
||||
|
||||
// Aliens can get straight through these.
|
||||
if(istype(usr,/mob/living/carbon))
|
||||
var/mob/living/carbon/M = usr
|
||||
if(locate(/datum/organ/internal/xenos/hivenode) in M.internal_organs)
|
||||
for(var/mob/O in oviewers(src))
|
||||
O.show_message("\red [usr] strokes the [name] and it melts away!", 1)
|
||||
health = 0
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
usr << "\blue You claw at the [name]."
|
||||
for(var/mob/O in oviewers(src))
|
||||
O.show_message("\red [usr] claws at the [name]!", 1)
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
/obj/effect/sign/double/barsign
|
||||
icon = 'icons/obj/barsigns.dmi'
|
||||
icon_state = "empty"
|
||||
anchored = 1
|
||||
|
||||
New()
|
||||
var/list/valid_states = list("pinkflamingo", "magmasea", "limbo", "rustyaxe", "armokbar", "brokendrum", "meadbay", "thedamnwall", "thecavern", "cindikate", "theorchard", "thesaucyclown", "theclownshead", "whiskeyimplant", "carpecarp", "robustroadhouse", "greytide", "theredshirt")
|
||||
src.icon_state = "[pick(valid_states)]"
|
||||
@@ -20,7 +20,7 @@
|
||||
icon_state="poster4"
|
||||
|
||||
/datum/poster/tg_5
|
||||
name = "Syndicate Recruitment Poster"
|
||||
name = "Mercenary Recruitment Poster"
|
||||
desc = "See the galaxy! Shatter corrupt megacorporations! Join today!"
|
||||
icon_state="poster5"
|
||||
|
||||
|
||||
@@ -11,14 +11,13 @@ would spawn and follow the beaker, even if it is carried or thrown.
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
mouse_opacity = 0
|
||||
unacidable = 1//So effect are not targeted by alien acid.
|
||||
flags = TABLEPASS
|
||||
pass_flags = PASSTABLE | PASSGRILLE
|
||||
|
||||
/obj/effect/effect/water
|
||||
name = "water"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "extinguish"
|
||||
var/life = 15.0
|
||||
flags = TABLEPASS
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/effect/proc/delete()
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
/* Species-specific sprites, concept stolen from Paradise//vg/.
|
||||
ex:
|
||||
sprite_sheets = list(
|
||||
"Tajaran" = 'icons/cat/are/bad'
|
||||
"Tajara" = 'icons/cat/are/bad'
|
||||
)
|
||||
If index term exists and icon_override is not set, this sprite sheet will be used.
|
||||
*/
|
||||
@@ -260,6 +260,12 @@
|
||||
if(ishuman(M))
|
||||
//START HUMAN
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/list/mob_equip = list()
|
||||
if(H.species.hud && H.species.hud.equip_slots)
|
||||
mob_equip = H.species.hud.equip_slots
|
||||
|
||||
if(H.species && !(slot in mob_equip))
|
||||
return 0
|
||||
|
||||
switch(slot)
|
||||
if(slot_l_hand)
|
||||
@@ -303,7 +309,7 @@
|
||||
if(slot_belt)
|
||||
if(H.belt)
|
||||
return 0
|
||||
if(!H.w_uniform)
|
||||
if(!H.w_uniform && (slot_w_uniform in mob_equip))
|
||||
if(!disable_warning)
|
||||
H << "\red You need a jumpsuit before you can attach this [name]."
|
||||
return 0
|
||||
@@ -351,7 +357,7 @@
|
||||
if(slot_wear_id)
|
||||
if(H.wear_id)
|
||||
return 0
|
||||
if(!H.w_uniform)
|
||||
if(!H.w_uniform && (slot_w_uniform in mob_equip))
|
||||
if(!disable_warning)
|
||||
H << "\red You need a jumpsuit before you can attach this [name]."
|
||||
return 0
|
||||
@@ -361,7 +367,7 @@
|
||||
if(slot_l_store)
|
||||
if(H.l_store)
|
||||
return 0
|
||||
if(!H.w_uniform)
|
||||
if(!H.w_uniform && (slot_w_uniform in mob_equip))
|
||||
if(!disable_warning)
|
||||
H << "\red You need a jumpsuit before you can attach this [name]."
|
||||
return 0
|
||||
@@ -372,7 +378,7 @@
|
||||
if(slot_r_store)
|
||||
if(H.r_store)
|
||||
return 0
|
||||
if(!H.w_uniform)
|
||||
if(!H.w_uniform && (slot_w_uniform in mob_equip))
|
||||
if(!disable_warning)
|
||||
H << "\red You need a jumpsuit before you can attach this [name]."
|
||||
return 0
|
||||
@@ -384,7 +390,7 @@
|
||||
if(slot_s_store)
|
||||
if(H.s_store)
|
||||
return 0
|
||||
if(!H.wear_suit)
|
||||
if(!H.wear_suit && (slot_wear_suit in mob_equip))
|
||||
if(!disable_warning)
|
||||
H << "\red You need a suit before you can attach this [name]."
|
||||
return 0
|
||||
@@ -678,7 +684,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
usr.client.pixel_x = -viewoffset
|
||||
usr.client.pixel_y = 0
|
||||
|
||||
usr.visible_message("[usr] peers through the [devicename].")
|
||||
usr.visible_message("[usr] peers through the [zoomdevicename ? "[zoomdevicename] of the [src.name]" : "[src.name]"].")
|
||||
|
||||
/*
|
||||
if(istype(usr,/mob/living/carbon/human/))
|
||||
@@ -698,6 +704,6 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
usr.client.pixel_y = 0
|
||||
|
||||
if(!cannotzoom)
|
||||
usr.visible_message("[usr] lowers the [devicename].")
|
||||
usr.visible_message("[zoomdevicename ? "[usr] looks up from the [src.name]" : "[usr] lowers the [src.name]"].")
|
||||
|
||||
return
|
||||
@@ -35,6 +35,8 @@
|
||||
icon_state = "bodybag_closed"
|
||||
icon_closed = "bodybag_closed"
|
||||
icon_opened = "bodybag_open"
|
||||
open_sound = 'sound/items/zip.ogg'
|
||||
close_sound = 'sound/items/zip.ogg'
|
||||
var/item_path = /obj/item/bodybag
|
||||
density = 0
|
||||
storage_capacity = (mob_size * 2) - 1
|
||||
@@ -106,8 +108,6 @@
|
||||
desc = "A non-reusable plastic bag designed to prevent additional damage to an occupant at the cost of genetic damage."
|
||||
icon = 'icons/obj/cryobag.dmi'
|
||||
item_path = /obj/item/bodybag/cryobag
|
||||
open_sound = 'sound/items/zip.ogg'
|
||||
close_sound = 'sound/items/zip.ogg'
|
||||
store_misc = 0
|
||||
store_items = 0
|
||||
var/used = 0
|
||||
|
||||
@@ -225,7 +225,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if (!c) // if the user hasn't selected a PDA file we can't send a message
|
||||
return
|
||||
var/selected = plist[c]
|
||||
create_message(usr, selected)
|
||||
create_message(usr, selected, 0)
|
||||
|
||||
|
||||
/obj/item/device/pda/ai/verb/cmd_toggle_pda_receiver()
|
||||
@@ -260,9 +260,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
var/HTML = "<html><head><title>AI PDA Message Log</title></head><body>"
|
||||
for(var/index in tnote)
|
||||
if(index["sent"])
|
||||
HTML += addtext("<i><b>→ To <a href='byond://?src=\ref[src];choice=Message;target=",index["src"],"'>", index["owner"],"</a>:</b></i><br>", index["message"], "<br>")
|
||||
HTML += addtext("<i><b>→ To <a href='byond://?src=\ref[src];choice=Message;notap;target=",index["src"],"'>", index["owner"],"</a>:</b></i><br>", index["message"], "<br>")
|
||||
else
|
||||
HTML += addtext("<i><b>← From <a href='byond://?src=\ref[src];choice=Message;target=",index["target"],"'>", index["owner"],"</a>:</b></i><br>", index["message"], "<br>")
|
||||
HTML += addtext("<i><b>← From <a href='byond://?src=\ref[src];choice=Message;notap;target=",index["target"],"'>", index["owner"],"</a>:</b></i><br>", index["message"], "<br>")
|
||||
HTML +="</body></html>"
|
||||
usr << browse(HTML, "window=log;size=400x444;border=1;can_resize=1;can_close=1;can_minimize=0")
|
||||
|
||||
@@ -656,7 +656,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if("Message")
|
||||
|
||||
var/obj/item/device/pda/P = locate(href_list["target"])
|
||||
src.create_message(U, P)
|
||||
src.create_message(U, P, !("notap" in href_list))
|
||||
if(mode == 2)
|
||||
if(href_list["target"] in conversations) // Need to make sure the message went through, if not welp.
|
||||
active_conversation = href_list["target"]
|
||||
@@ -879,11 +879,11 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
id.loc = get_turf(src)
|
||||
id = null
|
||||
|
||||
/obj/item/device/pda/proc/create_message(var/mob/living/U = usr, var/obj/item/device/pda/P)
|
||||
|
||||
U.visible_message("<span class='notice'>[U] taps on \his PDA's screen.</span>")
|
||||
/obj/item/device/pda/proc/create_message(var/mob/living/U = usr, var/obj/item/device/pda/P, var/tap = 1)
|
||||
if(tap)
|
||||
U.visible_message("<span class='notice'>[U] taps on \his PDA's screen.</span>")
|
||||
U.last_target_click = world.time
|
||||
var/t = input(U, "Please enter message", name, null) as text
|
||||
var/t = input(U, "Please enter message", P.name, null) as text
|
||||
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
|
||||
if (!t || !istype(P))
|
||||
return
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
/obj/item/device/modkit/afterattack(obj/O, mob/user as mob, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
|
||||
if (!target_species)
|
||||
return //it shouldn't be null, okay?
|
||||
|
||||
@@ -31,12 +31,12 @@
|
||||
for (var/permitted_type in permitted_types)
|
||||
if(istype(O, permitted_type))
|
||||
allowed = 1
|
||||
|
||||
|
||||
var/obj/item/clothing/I = O
|
||||
if (!istype(I) || !allowed)
|
||||
user << "<span class='notice'>[src] is unable to modify that.</span>"
|
||||
return
|
||||
|
||||
|
||||
var/excluding = ("exclude" in I.species_restricted)
|
||||
var/in_list = (target_species in I.species_restricted)
|
||||
if (excluding ^ in_list)
|
||||
@@ -57,7 +57,7 @@
|
||||
parts &= ~MODKIT_HELMET
|
||||
if (istype(I, /obj/item/clothing/suit))
|
||||
parts &= ~MODKIT_SUIT
|
||||
|
||||
|
||||
if(!parts)
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
@@ -69,4 +69,4 @@
|
||||
/obj/item/device/modkit/tajaran
|
||||
name = "tajaran hardsuit modification kit"
|
||||
desc = "A kit containing all the needed tools and parts to modify a hardsuit for another user. This one looks like it's meant for Tajaran."
|
||||
target_species = "Tajaran"
|
||||
target_species = "Tajara"
|
||||
@@ -5,6 +5,7 @@
|
||||
icon = 'icons/obj/radio.dmi'
|
||||
icon_state = "cypherkey"
|
||||
item_state = ""
|
||||
w_class = 1
|
||||
var/translate_binary = 0
|
||||
var/translate_hive = 0
|
||||
var/syndie = 0
|
||||
@@ -17,7 +18,7 @@
|
||||
|
||||
/obj/item/device/encryptionkey/syndicate
|
||||
icon_state = "cypherkey"
|
||||
channels = list("Syndicate" = 1)
|
||||
channels = list("Mercenary" = 1)
|
||||
origin_tech = "syndicate=3"
|
||||
syndie = 1//Signifies that it de-crypts Syndicate transmissions
|
||||
|
||||
|
||||
@@ -19,6 +19,18 @@
|
||||
keyslot1 = new /obj/item/device/encryptionkey/
|
||||
recalculateChannels()
|
||||
|
||||
/obj/item/device/radio/headset/handle_message_mode(mob/living/M as mob, message, channel)
|
||||
if (channel == "special")
|
||||
if (translate_binary)
|
||||
var/datum/language/binary = all_languages["Robot Talk"]
|
||||
binary.broadcast(M, message)
|
||||
if (translate_hive)
|
||||
var/datum/language/hivemind = all_languages["Hivemind"]
|
||||
hivemind.broadcast(M, message)
|
||||
return null
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/device/radio/headset/receive_range(freq, level, aiOverride = 0)
|
||||
if (aiOverride)
|
||||
return ..(freq, level)
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
// 0 = old radios
|
||||
// 1 = new radios (subspace technology)
|
||||
|
||||
|
||||
/obj/item/device/radio
|
||||
@@ -219,6 +216,23 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
del(A)
|
||||
return
|
||||
|
||||
// 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)
|
||||
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 // the device has to be on
|
||||
// Fix for permacell radios, but kinda eh about actually fixing them.
|
||||
@@ -231,161 +245,85 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
|
||||
M.last_target_click = world.time
|
||||
|
||||
if(GLOBAL_RADIO_TYPE == 1) // NEW RADIO SYSTEMS: By Doohl
|
||||
/* Quick introduction:
|
||||
This new radio system uses a very robust FTL signaling technology unoriginally
|
||||
dubbed "subspace" which is somewhat similar to 'blue-space' but can't
|
||||
actually transmit large mass. Headsets are the only radio devices capable
|
||||
of sending subspace transmissions to the Communications Satellite.
|
||||
|
||||
/* 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.
|
||||
*/
|
||||
|
||||
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
|
||||
if (!connection)
|
||||
return
|
||||
|
||||
//#### Grab the connection datum ####//
|
||||
var/datum/radio_frequency/connection = null
|
||||
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.
|
||||
else // If a channel isn't specified, send to common.
|
||||
connection = radio_connection
|
||||
channel = null
|
||||
if (!istype(connection))
|
||||
return
|
||||
if (!connection)
|
||||
return
|
||||
var/turf/position = get_turf(src)
|
||||
|
||||
var/turf/position = get_turf(src)
|
||||
//#### Tagging the signal with all appropriate identity values ####//
|
||||
|
||||
//#### 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
|
||||
// ||-- The mob's name identity --||
|
||||
var/displayname = M.name // grab the display name (name you get when you hover over someone's icon)
|
||||
var/real_name = M.real_name // mob's real name
|
||||
var/mobkey = "none" // player key associated with mob
|
||||
var/voicemask = 0 // the speaker is wearing a voice mask
|
||||
if(M.client)
|
||||
mobkey = M.key // assign the mob's key
|
||||
|
||||
|
||||
var/jobname // the mob's "job"
|
||||
var/jobname // the mob's "job"
|
||||
|
||||
// --- Human: use their actual job ---
|
||||
if (ishuman(M))
|
||||
jobname = M:get_assignment()
|
||||
// --- Human: use their actual job ---
|
||||
if (ishuman(M))
|
||||
jobname = M:get_assignment()
|
||||
|
||||
// --- Carbon Nonhuman ---
|
||||
else if (iscarbon(M)) // Nonhuman carbon mob
|
||||
jobname = "No id"
|
||||
// --- Carbon Nonhuman ---
|
||||
else if (iscarbon(M)) // Nonhuman carbon mob
|
||||
jobname = "No id"
|
||||
|
||||
// --- AI ---
|
||||
else if (isAI(M))
|
||||
jobname = "AI"
|
||||
// --- AI ---
|
||||
else if (isAI(M))
|
||||
jobname = "AI"
|
||||
|
||||
// --- Cyborg ---
|
||||
else if (isrobot(M))
|
||||
jobname = "Cyborg"
|
||||
// --- Cyborg ---
|
||||
else if (isrobot(M))
|
||||
jobname = "Cyborg"
|
||||
|
||||
// --- Personal AI (pAI) ---
|
||||
else if (istype(M, /mob/living/silicon/pai))
|
||||
jobname = "Personal AI"
|
||||
// --- Personal AI (pAI) ---
|
||||
else if (istype(M, /mob/living/silicon/pai))
|
||||
jobname = "Personal AI"
|
||||
|
||||
// --- Unidentifiable mob ---
|
||||
else
|
||||
jobname = "Unknown"
|
||||
// --- Unidentifiable mob ---
|
||||
else
|
||||
jobname = "Unknown"
|
||||
|
||||
|
||||
// --- Modifications to the mob's identity ---
|
||||
// --- 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
|
||||
"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)
|
||||
|
||||
// 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,192 +332,102 @@ 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,verb,speaking)
|
||||
// Receiving code can be located in Telecommunications.dm
|
||||
return
|
||||
|
||||
|
||||
/* ###### 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 (!(wires & 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.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 (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= get_frequency_name(display_freq)
|
||||
|
||||
var/part_b = "</span><b> \icon[src]\[[freq_text]\]</b> <span class='message'>" // Tweaked for security headsets -- TLE
|
||||
var/part_c = "</span></span>"
|
||||
sleep(rand(10,25)) // wait a little...
|
||||
|
||||
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'>"
|
||||
else if (display_freq in DEPT_FREQS)
|
||||
part_a = "<span class='deptradio'><span class='name'>"
|
||||
if(signal.data["done"] && position.z in signal.data["level"])
|
||||
// we're done here.
|
||||
return
|
||||
|
||||
var/quotedmsg = M.say_quote(message)
|
||||
// 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 following recording is intended for research and feedback in the use of department radio channels.
|
||||
//THIS IS TEMPORARY. YEAH RIGHT
|
||||
if(!connection) return //~Carn
|
||||
|
||||
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(PUB_FREQ)
|
||||
blackbox.msg_common += blackbox_msg
|
||||
if(SCI_FREQ)
|
||||
blackbox.msg_science += blackbox_msg
|
||||
if(COMM_FREQ)
|
||||
blackbox.msg_command += blackbox_msg
|
||||
if(MED_FREQ)
|
||||
blackbox.msg_medical += blackbox_msg
|
||||
if(ENG_FREQ)
|
||||
blackbox.msg_engineering += blackbox_msg
|
||||
if(SEC_FREQ)
|
||||
blackbox.msg_security += blackbox_msg
|
||||
if(DTH_FREQ)
|
||||
blackbox.msg_deathsquad += blackbox_msg
|
||||
if(SYND_FREQ)
|
||||
blackbox.msg_syndicate += blackbox_msg
|
||||
if(SUP_FREQ)
|
||||
blackbox.msg_cargo += blackbox_msg
|
||||
else
|
||||
blackbox.messages += blackbox_msg
|
||||
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)
|
||||
|
||||
//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>[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>[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>[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>[part_b][quotedmsg][part_c]", 2)
|
||||
else
|
||||
R.show_message(rendered, 2)
|
||||
|
||||
/obj/item/device/radio/hear_talk(mob/M as mob, msg, var/verb = "says", var/datum/language/speaking = null)
|
||||
|
||||
@@ -689,6 +537,13 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
icon_state = "radio"
|
||||
canhear_range = 3
|
||||
|
||||
/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.cell_use_power(C.active_usage)
|
||||
|
||||
/obj/item/device/radio/borg/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
// ..()
|
||||
user.set_machine(src)
|
||||
|
||||
@@ -160,7 +160,7 @@ datum/nano_item_lists
|
||||
NANO UI FOR UPLINK WOOP WOOP
|
||||
*/
|
||||
/obj/item/device/uplink/hidden/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
var/title = "Syndicate Uplink"
|
||||
var/title = "Remote Uplink"
|
||||
var/data[0]
|
||||
|
||||
data["welcome"] = welcome
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
title+= "[R.title]"
|
||||
title+= " ([R.req_amount] [src.singular_name]\s)"
|
||||
if (can_build)
|
||||
t1 += text("<A href='?src=\ref[src];sublist=[recipes_sublist];make=[i]'>[title]</A> ")
|
||||
t1 += text("<A href='?src=\ref[src];sublist=[recipes_sublist];make=[i];multiplier=1'>[title]</A> ")
|
||||
else
|
||||
t1 += text("[]", title)
|
||||
continue
|
||||
@@ -112,7 +112,8 @@
|
||||
recipes_list = srl.recipes
|
||||
var/datum/stack_recipe/R = recipes_list[text2num(href_list["make"])]
|
||||
var/multiplier = text2num(href_list["multiplier"])
|
||||
if (!multiplier) multiplier = 1
|
||||
if (!multiplier || (multiplier <= 0)) //href exploit protection
|
||||
return
|
||||
if (src.amount < R.req_amount*multiplier)
|
||||
if (R.req_amount*multiplier>1)
|
||||
usr << "\red You haven't got enough [src] to build \the [R.req_amount*multiplier] [R.title]\s!"
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
item_state = "balloon-empty"
|
||||
|
||||
/obj/item/toy/syndicateballoon
|
||||
name = "syndicate balloon"
|
||||
name = "criminal balloon"
|
||||
desc = "There is a tag on the back that reads \"FUK NT!11!\"."
|
||||
throwforce = 0
|
||||
throw_speed = 4
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
icon_state = "empty"
|
||||
anchored = 1
|
||||
New()
|
||||
ChangeSign(pick("pinkflamingo", "magmasea", "limbo", "rustyaxe", "armokbar", "brokendrum", "meadbay", "thedamnwall", "thecavern", "cindikate", "theorchard", "thesaucyclown", "theclownshead"))
|
||||
ChangeSign(pick("pinkflamingo", "magmasea", "limbo", "rustyaxe", "armokbar", "brokendrum", "meadbay", "thedamnwall", "thecavern", "cindikate", "theorchard", "thesaucyclown", "theclownshead", "whiskeyimplant", "carpecarp", "robustroadhouse", "greytide", "theredshirt"))
|
||||
return
|
||||
proc/ChangeSign(var/Text)
|
||||
src.icon_state = "[Text]"
|
||||
@@ -15,7 +15,7 @@
|
||||
if(istype(I, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/card = I
|
||||
if(access_bar in card.GetAccess())
|
||||
var/sign_type = input(user, "What would you like to change the barsign to?") as null|anything in list("Pink Flamingo", "Magma Sea", "Limbo", "Rusty Axe", "Armok Bar", "Broken Drum", "Mead Bay", "The Damn Wall", "The Cavern", "Cindi Kate", "The Orchard", "The Saucy Clown", "The Clowns Head")
|
||||
var/sign_type = input(user, "What would you like to change the barsign to?") as null|anything in list("Off", "Pink Flamingo", "Magma Sea", "Limbo", "Rusty Axe", "Armok Bar", "Broken Drum", "Mead Bay", "The Damn Wall", "The Cavern", "Cindi Kate", "The Orchard", "The Saucy Clown", "The Clowns Head", "Whiskey Implant", "Carpe Carp", "Robust Roadhouse", "Greytide", "The Redshirt")
|
||||
if(sign_type == null)
|
||||
return
|
||||
else
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//wip wip wup
|
||||
/obj/structure/mirror
|
||||
name = "mirror"
|
||||
desc = "Mirror mirror on the wall, who's the most robust of them all?"
|
||||
name = "SalonPro Nano-Mirror(TM)"
|
||||
desc = "The leading technology in hair salon products, utilizing nano-machinery to style your hair just right."
|
||||
icon = 'icons/obj/watercloset.dmi'
|
||||
icon_state = "mirror"
|
||||
density = 0
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
|
||||
/obj/item/weapon/stool/attack(mob/M as mob, mob/user as mob)
|
||||
if (prob(5) && istype(M,/mob/living))
|
||||
user.visible_message("\red [user] breaks [src] over [M]'s back!.")
|
||||
user.visible_message("\red [user] breaks [src] over [M]'s back!")
|
||||
user.u_equip(src)
|
||||
var/obj/item/stack/sheet/metal/m = new/obj/item/stack/sheet/metal
|
||||
m.loc = get_turf(src)
|
||||
|
||||
@@ -31,6 +31,10 @@
|
||||
if(1 to 4) overlays += "phoron-[phorontanks]"
|
||||
if(5 to INFINITY) overlays += "phoron-5"
|
||||
|
||||
/obj/structure/dispenser/attack_ai(mob/user as mob)
|
||||
if(user.Adjacent(src))
|
||||
return attack_hand(user)
|
||||
..()
|
||||
|
||||
/obj/structure/dispenser/attack_hand(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
|
||||
@@ -114,15 +114,15 @@
|
||||
new /obj/item/weapon/shard(loc)
|
||||
if(reinf) new /obj/item/stack/rods(loc)
|
||||
del(src)
|
||||
else if (istype(usr,/mob/living/carbon/human))
|
||||
|
||||
var/mob/living/carbon/human/H = usr
|
||||
|
||||
if(H.species.can_shred(H))
|
||||
attack_generic(H,25)
|
||||
return
|
||||
|
||||
else if (usr.a_intent == "hurt")
|
||||
|
||||
if (istype(usr,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
if(H.species.can_shred(H))
|
||||
attack_generic(H,25)
|
||||
return
|
||||
|
||||
playsound(src.loc, 'sound/effects/glassknock.ogg', 80, 1)
|
||||
usr.visible_message("\red [usr.name] bangs against the [src.name]!", \
|
||||
"\red You bang against the [src.name]!", \
|
||||
|
||||
Reference in New Issue
Block a user