Polaris sync

This commit is contained in:
Eearslya
2016-08-06 20:34:44 -07:00
566 changed files with 16223 additions and 7350 deletions
@@ -222,6 +222,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
/mob/observer/dead
var/datum/exonet_protocol/exonet = null
var/list/exonet_messages = list()
// Proc: New()
// Parameters: None
@@ -305,6 +306,10 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
if(comm.exonet)
im_contacts_ui[++im_contacts_ui.len] = list("name" = sanitize(comm.name), "address" = comm.exonet.address, "ref" = "\ref[comm]")
for(var/mob/observer/dead/ghost in im_contacts)
if(ghost.exonet)
im_contacts_ui[++im_contacts_ui.len] = list("name" = sanitize(ghost.name), "address" = ghost.exonet.address, "ref" = "\ref[ghost]")
//Actual messages.
for(var/I in im_list)
im_list_ui[++im_list_ui.len] = list("address" = I["address"], "to_address" = I["to_address"], "im" = I["im"])
@@ -411,6 +416,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
if(text)
exonet.send_message(their_address, "text", text)
im_list += list(list("address" = exonet.address, "to_address" = their_address, "im" = text))
log_pda("[usr] (COMM: [src]) sent \"[text]\" to [exonet.get_atom_from_address(their_address)]")
if(href_list["disconnect"])
var/name_to_disconnect = href_list["disconnect"]
@@ -493,7 +499,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
// Proc: receive_exonet_message()
// Parameters: 3 (origin atom - the source of the message's holder, origin_address - where the message came from, message - the message received)
// Description: Handles voice requests and invite messages originating from both real communicators and ghosts. Also includes a ping response.
/mob/observer/dead/receive_exonet_message(origin_atom, origin_address, message)
/mob/observer/dead/receive_exonet_message(origin_atom, origin_address, message, text)
if(message == "voice")
if(istype(origin_atom, /obj/item/device/communicator))
var/obj/item/device/communicator/comm = origin_atom
@@ -508,7 +514,9 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
var/random = rand(450,700)
random = random / 10
exonet.send_message(origin_address, "64 bytes received from [exonet.address] ecmp_seq=1 ttl=51 time=[random] ms")
if(message == "text") //Ghosts don't get texting yet. Mostly for spam prevention by ghosts but also due to ui requirements not sorted out yet.
if(message == "text")
src << "<span class='notice'>\icon[origin_atom] Received text message from [origin_atom]: <b>\"[text]\"</b></span>"
exonet_messages.Add("<b>From [origin_atom]:</b><br>[text]")
return
// Proc: register_device()
@@ -533,7 +541,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
communicating |= comm
listening_objects |= src
update_icon()
// Proc: del_communicating()
// Parameters: 1 (comm - the communicator to remove from communicating)
// Description: Used when this communicator is being asked to stop relaying say/me messages to another
@@ -732,7 +740,9 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
/obj/item/device/communicator/proc/request_im(var/atom/candidate, var/origin_address, var/text)
var/who = null
if(isobserver(candidate))
return
var/mob/observer/dead/ghost = candidate
who = ghost
im_list += list(list("address" = origin_address, "to_address" = exonet.address, "im" = text))
else if(istype(candidate, /obj/item/device/communicator))
var/obj/item/device/communicator/comm = candidate
who = comm.owner
@@ -811,7 +821,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
if(!T) return
var/list/in_range = get_mobs_and_objs_in_view_fast(T,world.view,0) //Range of 3 since it's a tiny video display
var/list/mobs_to_relay = in_range["mobs"]
for(var/mob/mob in mobs_to_relay) //We can't use visible_message(), or else we will get an infinite loop if two communicators hear each other.
var/dst = get_dist(get_turf(mob),get_turf(comm))
if(dst <= video_range)
@@ -827,7 +837,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
// Description: Relays the speech to all linked communicators.
/obj/item/device/communicator/hear_talk(mob/living/M, text, verb, datum/language/speaking)
for(var/obj/item/device/communicator/comm in communicating)
var/turf/T = get_turf(comm)
if(!T) return
var/list/in_range = get_mobs_and_objs_in_view_fast(T,world.view,0)
@@ -915,6 +925,71 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
src << "A communications request has been sent to [chosen_communicator]. Now you need to wait until someone answers."
// Verb: text_communicator()
// Parameters: None
// Description: Allows a ghost to send a text message to a communicator.
/mob/observer/dead/verb/text_communicator()
set category = "Ghost"
set name = "Text Communicator"
set desc = "If there is a communicator available, send a text message to it."
if(ticker.current_state < GAME_STATE_PLAYING)
src << "<span class='danger'>The game hasn't started yet!</span>"
return
if (!src.stat)
return
if (usr != src)
return //something is terribly wrong
for(var/mob/living/L in mob_list) //Simple check so you don't have dead people calling.
if(src.client.prefs.real_name == L.real_name)
src << "<span class='danger'>Your identity is already present in the game world. Please load in a different character first.</span>"
return
var/obj/machinery/exonet_node/E = get_exonet_node()
if(!E || !E.on || !E.allow_external_communicators)
src << "<span class='danger'>The Exonet node at telecommunications is down at the moment, or is actively blocking you, so your call can't go through.</span>"
return
var/list/choices = list()
for(var/obj/item/device/communicator/comm in all_communicators)
if(!comm.network_visibility || !comm.exonet || !comm.exonet.address)
continue
choices.Add(comm)
if(!choices.len)
src << "<span class='danger'>There are no available communicators, sorry.</span>"
return
var/choice = input(src,"Send a text message to whom?") as null|anything in choices
if(choice)
var/obj/item/device/communicator/chosen_communicator = choice
var/mob/observer/dead/O = src
var/text_message = sanitize(input(src, "What do you want the message to say?")) as message
if(text_message && O.exonet)
O.exonet.send_message(chosen_communicator.exonet.address, "text", text_message)
src << "<span class='notice'>You have sent '[text_message]' to [chosen_communicator].</span>."
exonet_messages.Add("<b>To [chosen_communicator]:</b><br>[text_message]")
log_pda("[usr] (COMM: [src]) sent \"[text_message]\" to [chosen_communicator]")
// Verb: show_text_messages()
// Parameters: None
// Description: Lets ghosts review messages they've sent or received.
/mob/observer/dead/verb/show_text_messages()
set category = "Ghost"
set name = "Show Text Messages"
set desc = "Allows you to see exonet text messages you've sent and received."
var/HTML = "<html><head><title>Exonet Message Log</title></head><body>"
for(var/line in exonet_messages)
HTML += line + "<br>"
HTML +="</body></html>"
usr << browse(HTML, "window=log;size=400x444;border=1;can_resize=1;can_close=1;can_minimize=0")
// Proc: connect_video()
// Parameters: user - the mob doing the viewing of video, comm - the communicator at the far end
// Description: Sets up a videocall and puts the first view into it using watch_video, and updates the icon
@@ -963,7 +1038,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
// Description: Cleans up mob's client when they stop watching a video
/obj/item/device/communicator/proc/video_cleanup(mob/user)
if(!user) return
user.reset_view(null)
user.unset_machine()
@@ -972,14 +1047,14 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
// Description: Ends the video call by clearing video_source
/obj/item/device/communicator/proc/end_video(var/reason)
video_source = null
. = "<span class='danger'>\icon[src] [reason ? reason : "Video session ended"].</span>"
visible_message(.)
update_icon()
//For synths who have no hands.
/obj/item/device/communicator/integrated
/obj/item/device/communicator/integrated
name = "integrated communicator"
desc = "A circuit used for long-range communications, able to be integrated into a system."
+8 -4
View File
@@ -74,13 +74,17 @@
if(M.stat!=DEAD)
var/safety = M:eyecheck()
if(safety <= 0)
var/flash_strength = 10
var/flash_strength = 5
if(ishuman(M))
var/mob/living/carbon/human/H = M
flash_strength *= H.species.flash_mod
if(flash_strength > 0)
M.Weaken(flash_strength)
M.flash_eyes()
if(flash_strength > 0)
H.confused = max(H.confused, flash_strength)
H.eye_blind = max(H.eye_blind, flash_strength)
H.eye_blurry = max(H.eye_blurry, flash_strength + 5)
H.flash_eyes()
else
flashfail = 1
@@ -3,7 +3,6 @@
desc = "A hand-held emergency light."
icon = 'icons/obj/lighting.dmi'
icon_state = "flashlight"
item_state = "flashlight"
w_class = 2
flags = CONDUCT
slot_flags = SLOT_BELT
@@ -89,7 +88,7 @@
name = "penlight"
desc = "A pen-sized light, used by medical staff."
icon_state = "penlight"
item_state = ""
item_state = "pen"
flags = CONDUCT
slot_flags = SLOT_EARS
brightness_on = 2
@@ -99,7 +98,6 @@
name = "maglight"
desc = "A very, very heavy duty flashlight."
icon_state = "maglight"
item_state = "maglight"
force = 10
flags = CONDUCT
brightness_on = 4
@@ -113,7 +111,7 @@
name = "low-power flashlight"
desc = "A miniature lamp, that might be used by small robots."
icon_state = "penlight"
item_state = ""
item_state = null
flags = CONDUCT
brightness_on = 2
w_class = 1
@@ -124,7 +122,6 @@
name = "desk lamp"
desc = "A desk lamp with an adjustable mount."
icon_state = "lamp"
item_state = "lamp"
brightness_on = 5
w_class = 4
flags = CONDUCT
@@ -136,7 +133,6 @@
/obj/item/device/flashlight/lamp/green
desc = "A classic green-shaded desk lamp."
icon_state = "lampgreen"
item_state = "lampgreen"
brightness_on = 5
light_color = "#FFC58F"
@@ -2,7 +2,6 @@
name = "floor painter"
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "labeler1"
item_state = "flight"
var/decal = "remove all decals"
var/paint_dir = "precise"
@@ -2,7 +2,6 @@
name = "closet painter"
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "labeler1"
item_state = "flight"
var/colour = "plain"
var/colour_secure = "plain"
@@ -2,7 +2,6 @@
name = "pipe painter"
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "labeler1"
item_state = "flight"
var/list/modes
var/mode
@@ -2,6 +2,10 @@
name = "electropack"
desc = "Dance my monkeys! DANCE!!!"
icon_state = "electropack0"
item_icons = list(
slot_l_hand_str = 'icons/mob/items/lefthand_storage.dmi',
slot_r_hand_str = 'icons/mob/items/righthand_storage.dmi',
)
item_state = "electropack"
frequency = 1449
flags = CONDUCT
@@ -4,7 +4,6 @@
desc = "An encryption key for a radio headset. Contains cypherkeys."
icon = 'icons/obj/radio.dmi'
icon_state = "cypherkey"
item_state = ""
w_class = 1
slot_flags = SLOT_EARS
var/translate_binary = 0
@@ -3,7 +3,6 @@
desc = "An updated, modular intercom that fits over the head. Takes encryption keys"
var/radio_desc = ""
icon_state = "headset"
item_state = "headset"
matter = list(DEFAULT_WALL_MATERIAL = 75)
subspace_transmission = 1
canhear_range = 0 // can't hear headsets from very far away
@@ -71,7 +70,7 @@
/obj/item/device/radio/headset/syndicate/alt
icon_state = "syndie_headset"
item_state = "syndie_headset"
item_state = "headset"
origin_tech = list(TECH_ILLEGAL = 3)
syndie = 1
ks1type = /obj/item/device/encryptionkey/syndicate
@@ -91,7 +90,7 @@
name = "security bowman headset"
desc = "This is used by your elite security force."
icon_state = "sec_headset_alt"
item_state = "sec_headset_alt"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/headset_sec
/obj/item/device/radio/headset/headset_eng
@@ -105,7 +104,7 @@
name = "engineering bowman headset"
desc = "When the engineers wish to chat like girls."
icon_state = "eng_headset_alt"
item_state = "eng_headset_alt"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/headset_eng
/obj/item/device/radio/headset/headset_rob
@@ -126,7 +125,7 @@
name = "medical bowman headset"
desc = "A headset for the trained staff of the medbay."
icon_state = "med_headset_alt"
item_state = "med_headset_alt"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/headset_med
/obj/item/device/radio/headset/headset_sci
@@ -154,7 +153,7 @@
name = "command bowman headset"
desc = "A headset with a commanding channel."
icon_state = "com_headset_alt"
item_state = "com_headset_alt"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/headset_com
@@ -169,7 +168,7 @@
name = "captain's bowman headset"
desc = "The headset of the boss."
icon_state = "com_headset_alt"
item_state = "com_headset_alt"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/heads/captain
/obj/item/device/radio/headset/heads/ai_integrated //No need to care about icons, it should be hidden inside the AI anyway.
@@ -198,7 +197,7 @@
name = "research director's bowman headset"
desc = "Headset of the researching God."
icon_state = "com_headset_alt"
item_state = "com_headset_alt"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/heads/rd
/obj/item/device/radio/headset/heads/hos
@@ -212,7 +211,7 @@
name = "head of security's bowman headset"
desc = "The headset of the man who protects your worthless lifes."
icon_state = "com_headset_alt"
item_state = "com_headset_alt"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/heads/hos
/obj/item/device/radio/headset/heads/ce
@@ -226,7 +225,7 @@
name = "chief engineer's bowman headset"
desc = "The headset of the guy who is in charge of morons"
icon_state = "com_headset_alt"
item_state = "com_headset_alt"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/heads/ce
/obj/item/device/radio/headset/heads/cmo
@@ -240,7 +239,7 @@
name = "chief medical officer's bowman headset"
desc = "The headset of the highly trained medical chief."
icon_state = "com_headset_alt"
item_state = "com_headset_alt"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/heads/cmo
/obj/item/device/radio/headset/heads/hop
@@ -254,7 +253,7 @@
name = "head of personnel's bowman headset"
desc = "The headset of the guy who will one day be captain."
icon_state = "com_headset_alt"
item_state = "com_headset_alt"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/heads/hop
/*
/obj/item/device/radio/headset/headset_mine
@@ -275,7 +274,7 @@
name = "supply bowman headset"
desc = "A bowman headset used by the QM and his slaves."
icon_state = "cargo_headset_alt"
item_state = "cargo_headset_alt"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/headset_cargo
/obj/item/device/radio/headset/headset_service
@@ -297,7 +296,7 @@
name = "emergency response team bowman headset"
desc = "The headset of the boss's boss."
icon_state = "com_headset_alt"
item_state = "com_headset_alt"
item_state = "headset"
// freerange = 1
ks2type = /obj/item/device/encryptionkey/ert
@@ -25,7 +25,7 @@ var/global/list/default_medbay_channels = list(
name = "station bounced radio"
suffix = "\[3\]"
icon_state = "walkietalkie"
item_state = "walkietalkie"
item_state = "radio"
var/on = 1 // 0 for off
var/last_transmission
+1 -1
View File
@@ -13,7 +13,7 @@ REAGENT SCANNER
name = "health analyzer"
desc = "A hand-held body scanner able to distinguish vital signs of the subject."
icon_state = "health"
item_state = "analyzer"
item_state = "healthanalyzer"
flags = CONDUCT
slot_flags = SLOT_BELT
throwforce = 3
@@ -4,7 +4,7 @@
w_class = 4
icon = 'icons/obj/device.dmi'
icon_state = "suitcooler0"
slot_flags = SLOT_BACK //you can carry it on your back if you want, but it won't do anything unless attached to suit storage
slot_flags = SLOT_BACK
//copied from tank.dm
flags = CONDUCT
@@ -20,7 +20,7 @@
var/on = 0 //is it turned on?
var/cover_open = 0 //is the cover open?
var/obj/item/weapon/cell/cell
var/max_cooling = 12 // in degrees per second - probably don't need to mess with heat capacity here
var/max_cooling = 15 // in degrees per second - probably don't need to mess with heat capacity here
var/charge_consumption = 3 // charge per second at max_cooling
var/thermostat = T20C
@@ -87,7 +87,7 @@
var/mob/living/carbon/human/H = M
if (!H.wear_suit || H.s_store != src)
if (!H.wear_suit || (H.s_store != src && H.back != src))
return 0
return 1
@@ -1,21 +0,0 @@
/*
Telecrystal item
Does nothing if not suitable antag type, checks for accept_tcrystals = 1 in a mob's mind.
For new antags, make sure to add "player.mind.accept_tcrystals = 1" if you want tradable tcrystals.
*/
/obj/item/device/telecrystal
name = "red crystal"
desc = "A strange, red, glowing crystal."
icon = 'icons/obj/stock_parts.dmi'
icon_state = "telecrystal"
item_state = "telecrystal"
force = 5
origin_tech = list(TECH_MATERIAL = 2, TECH_BLUESPACE = 1, TECH_ILLEGAL = 1)
/obj/item/device/telecrystal/attack_self(mob/user as mob)
if(user.mind.accept_tcrystals) //Checks to see if antag type allows for tcrystals
user.mind.tcrystals += 1
user.drop_from_inventory(src)
qdel(src)
return
+1 -1
View File
@@ -11,7 +11,7 @@
var/list/purchase_log = new
var/datum/mind/uplink_owner = null
var/used_TC = 0
var/offer_time = 15 MINUTES //The time increment per discount offered
var/offer_time = 10 MINUTES //The time increment per discount offered
var/next_offer_time //The time a discount will next be offered
var/datum/uplink_item/discount_item //The item to be discounted
var/discount_amount //The amount as a percent the item will be discounted by
@@ -1,4 +1,5 @@
var/datum/uplink_random_selection/default_uplink_selection = new/datum/uplink_random_selection/default()
var/datum/uplink_random_selection/all_uplink_selection = new/datum/uplink_random_selection/all()
/datum/uplink_random_item
var/uplink_item // The uplink item
@@ -14,16 +15,22 @@ var/datum/uplink_random_selection/default_uplink_selection = new/datum/uplink_ra
/datum/uplink_random_selection
var/list/datum/uplink_random_item/items
var/list/datum/uplink_random_item/all_items
/datum/uplink_random_selection/New()
..()
items = list()
all_items = list()
/datum/uplink_random_selection/proc/get_random_item(var/telecrystals, obj/item/device/uplink/U, var/list/bought_items)
/datum/uplink_random_selection/proc/get_random_item(var/telecrystals, obj/item/device/uplink/U, var/list/bought_items, var/items_override = 0)
var/const/attempts = 50
for(var/i = 0; i < attempts; i++)
var/datum/uplink_random_item/RI = pick(items)
var/datum/uplink_random_item/RI
if(items_override)
RI = pick(all_items)
else
RI = pick(items)
if(!prob(RI.keep_probability))
continue
var/datum/uplink_item/I = uplink.items_assoc[RI.uplink_item]
@@ -35,6 +42,14 @@ var/datum/uplink_random_selection/default_uplink_selection = new/datum/uplink_ra
continue
return I
/datum/uplink_random_selection/all/New()
..()
for(var/datum/uplink_item/item in uplink.items)
if(item.blacklisted)
continue
else
all_items += new/datum/uplink_random_item(item.type)
/datum/uplink_random_selection/default/New()
..()
@@ -86,7 +101,7 @@ var/datum/uplink_random_selection/default_uplink_selection = new/datum/uplink_ra
items += new/datum/uplink_random_item(/datum/uplink_item/item/hardsuit_modules/thermal, reselect_propbability = 15)
items += new/datum/uplink_random_item(/datum/uplink_item/item/hardsuit_modules/energy_net, reselect_propbability = 15)
items += new/datum/uplink_random_item(/datum/uplink_item/item/ewar_voice, reselect_propbability = 15)
items += new/datum/uplink_random_item(/datum/uplink_item/item/hardsuit_modules/ewar_voice, reselect_propbability = 15)
items += new/datum/uplink_random_item(/datum/uplink_item/item/hardsuit_modules/maneuvering_jets, reselect_propbability = 15)
items += new/datum/uplink_random_item(/datum/uplink_item/item/hardsuit_modules/egun, reselect_propbability = 15)
items += new/datum/uplink_random_item(/datum/uplink_item/item/hardsuit_modules/power_sink, reselect_propbability = 15)
@@ -5,7 +5,6 @@
desc = "A wooden musical instrument with four strings and a bow. \"The devil went down to space, he was looking for an assistant to grief.\""
icon = 'icons/obj/musician.dmi'
icon_state = "violin"
item_state = "violin"
force = 10
var/datum/song/song
var/playing = 0