mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Adds a new xenoarch artifact.
Modifies inherent channels adding follow references for ghosts to them
This commit is contained in:
@@ -1337,4 +1337,12 @@ proc/rotate_icon(file, state, step = 1, aa = FALSE)
|
||||
|
||||
/proc/isEmag(obj/O)
|
||||
if(!O) return 0
|
||||
return istype(O, /obj/item/weapon/card/emag)
|
||||
return istype(O, /obj/item/weapon/card/emag)
|
||||
|
||||
proc/find_holder_of_type(var/atom/reference,var/typepath) //Returns the first object holder of the type you specified
|
||||
var/atom/location = reference.loc //ie /mob to find the first mob holding it
|
||||
while(!istype(location,/turf) && !istype(location,null))
|
||||
if(istype(location,typepath))
|
||||
return location
|
||||
location = location.loc
|
||||
return 0
|
||||
|
||||
@@ -127,18 +127,6 @@ var/list/freqtoname = list(
|
||||
return returntext
|
||||
return "[copytext("[freq]", 1, 4)].[copytext("[freq]", 4, 5)]"
|
||||
|
||||
/proc/attach_spans(input, list/spans)
|
||||
return "[message_spans(spans)][input]</span>"
|
||||
|
||||
/proc/message_spans(list/spans)
|
||||
var/output = "<SPAN CLASS='"
|
||||
|
||||
for(var/span in spans)
|
||||
output = "[output][span] "
|
||||
|
||||
output = "[output]'>"
|
||||
return output
|
||||
|
||||
/atom/movable/proc/GetVoice()
|
||||
return name
|
||||
|
||||
@@ -185,3 +173,12 @@ var/list/freqtoname = list(
|
||||
radio = null
|
||||
|
||||
..("job", "faketrack", "source", "radio")
|
||||
|
||||
proc/handle_render(var/mob,var/message,var/speaker)
|
||||
if(istype(mob, /mob/new_player)) return //One extra layer of sanity
|
||||
if(istype(mob,/mob/dead/observer))
|
||||
var/reference = "<a href='?src=\ref[src];follow=\ref[speaker]'>(Follow)</a> "
|
||||
message = reference+message
|
||||
mob << message
|
||||
else
|
||||
mob << message
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
return
|
||||
|
||||
var/message_a = say_quote(message)
|
||||
var/rendered = "<i><span class='game say'>Hivemind, <span class='name'>[name]</span> <span class='message'>[message_a]</span></span></i>"
|
||||
for (var/mob/living/S in player_list)
|
||||
if((!S.stat && (S.hivecheck())) || ((S in dead_mob_list) && !istype(S, /mob/new_player)))
|
||||
S << rendered
|
||||
var/rendered = text("<i><span class='game say'>Hivemind, <span class='name'>[]</span> <span class='message'>[]</span></span></i>",name,message_a)
|
||||
for (var/mob/S in player_list)
|
||||
if(S.hivecheck() || ((S in dead_mob_list) && !istype(S, /mob/new_player)))
|
||||
handle_render(S,rendered,src)
|
||||
|
||||
/mob/living/carbon/alien/handle_inherent_channels(message, message_mode)
|
||||
if(!..())
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#define MODE_HOLOPAD "holopad"
|
||||
#define MODE_CHANGELING "changeling"
|
||||
#define MODE_CULTCHAT "cultchat"
|
||||
#define MODE_ANCIENT "ancientchat"
|
||||
|
||||
#define SAY_MINIMUM_PRESSURE 10
|
||||
var/list/department_radio_keys = list(
|
||||
@@ -37,6 +38,7 @@ var/list/department_radio_keys = list(
|
||||
":d" = "Service", "#d" = "Service", ".d" = "Service",
|
||||
":g" = "changeling", "#g" = "changeling", ".g" = "changeling",
|
||||
":x" = "cultchat", "#x" = "cultchat", ".x" = "cultchat",
|
||||
":y" = "ancientchat", "#y" = "ancientchat", ".y" = "ancientchat",
|
||||
|
||||
":R" = "right ear", "#R" = "right ear", ".R" = "right ear", "!R" = "fake right ear",
|
||||
":L" = "left ear", "#L" = "left ear", ".L" = "left ear", "!L" = "fake left ear",
|
||||
@@ -55,6 +57,7 @@ var/list/department_radio_keys = list(
|
||||
":D" = "Service", "#D" = "Service", ".D" = "Service",
|
||||
":G" = "changeling", "#G" = "changeling", ".G" = "changeling",
|
||||
":X" = "cultchat", "#X" = "cultchat", ".X" = "cultchat",
|
||||
":Y" = "ancientchat", "#Y" = "ancientchat", ".Y" = "ancientchat",
|
||||
|
||||
//kinda localization -- rastaf0
|
||||
//same keys as above, but on russian keyboard layout. This file uses cp1251 as encoding.
|
||||
@@ -76,10 +79,7 @@ var/list/department_radio_keys = list(
|
||||
":<3A>" = "changeling", "#<23>" = "changeling", ".<2E>" = "changeling"
|
||||
)
|
||||
|
||||
/mob/living/proc/binarycheck()
|
||||
return 0
|
||||
|
||||
/mob/living/proc/hivecheck()
|
||||
/mob/living/hivecheck()
|
||||
if (isalien(src)) return 1
|
||||
if (!ishuman(src)) return
|
||||
var/mob/living/carbon/human/H = src
|
||||
@@ -235,19 +235,38 @@ var/list/department_radio_keys = list(
|
||||
return department_radio_keys[copytext(message, 1, 3)]
|
||||
|
||||
/mob/living/proc/handle_inherent_channels(message, message_mode)
|
||||
if(message_mode == MODE_CHANGELING)
|
||||
if(lingcheck())
|
||||
log_say("[mind.changeling.changelingID]/[src.key] : [message]")
|
||||
for(var/mob/M in mob_list)
|
||||
if(M.lingcheck() || ((M in dead_mob_list) && !istype(M, /mob/new_player)))
|
||||
M << "<i><font color=#800080><b>[mind.changeling.changelingID]:</b> [message]</font></i>"
|
||||
return 1
|
||||
if(message_mode == MODE_CULTCHAT && construct_chat_check(1) /*sending check for humins*/)
|
||||
log_say("Cult channel: [src.name]/[src.key] : [message]")
|
||||
for(var/mob/M in mob_list)
|
||||
if(M.construct_chat_check(2) /*receiving check*/ || ((M in dead_mob_list) && !istype(M, /mob/new_player)))
|
||||
M << "<span class='sinister'><b>[src.name]:</b> [message]</span>"
|
||||
return 1
|
||||
switch(message_mode)
|
||||
if(MODE_CHANGELING)
|
||||
if(lingcheck())
|
||||
log_say("[mind.changeling.changelingID]/[src.key] : [message]")
|
||||
var/themessage = text("<i><font color=#800080><b>[]:</b> []</font></i>",mind.changeling.changelingID,message)
|
||||
for(var/mob/M in player_list)
|
||||
if(M.lingcheck() || ((M in dead_mob_list) && !istype(M, /mob/new_player)))
|
||||
handle_render(M,themessage,src)
|
||||
return 1
|
||||
if(MODE_CULTCHAT)
|
||||
if(construct_chat_check(1)) /*sending check for humins*/
|
||||
log_say("Cult channel: [src.name]/[src.key] : [message]")
|
||||
var/themessage = text("<span class='sinister'><b>[]:</b> []</span>",src.name,message)
|
||||
for(var/mob/M in player_list)
|
||||
if(M.construct_chat_check(2) /*receiving check*/ || ((M in dead_mob_list) && !istype(M, /mob/new_player)))
|
||||
handle_render(M,themessage,src)
|
||||
return 1
|
||||
if(MODE_ANCIENT)
|
||||
var/list/stone = search_contents_for(/obj/item/commstone)
|
||||
if(stone.len)
|
||||
var/obj/item/commstone/commstone = stone[1]
|
||||
if(commstone.commdevice)
|
||||
var/list/stones = commstone.commdevice.get_active_stones()
|
||||
var/themessage = text("<span class='ancient'><b>[]:</b> []</span>",src.name,message)
|
||||
log_say("Ancient chat: [src.name]/[src.key] : [message]")
|
||||
for(var/thestone in stones)
|
||||
var/mob/M = find_holder_of_type(thestone,/mob)
|
||||
handle_render(M,themessage,src)
|
||||
for(var/M in dead_mob_list)
|
||||
if(!istype(M,/mob/new_player))
|
||||
handle_render(M,themessage,src)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/living/proc/treat_message(message, genesay = 0)
|
||||
|
||||
@@ -20,14 +20,10 @@
|
||||
log_say("[key_name(src)] (@[src.x],[src.y],[src.z])(MoMMItalk): [message]")
|
||||
|
||||
var/interior_message = say_quote(message)
|
||||
var/rendered = "<i><span class='mommi game say'>Damage Control, <span class='name'>[name]</span> <span class='message'>[interior_message]</span></span></i>"
|
||||
var/rendered = text("<i><span class='mommi game say'>Damage Control, <span class='name'>[]</span> <span class='message'>[]</span></span></i>",name,interior_message)
|
||||
|
||||
for (var/mob/living/silicon/robot/mommi/S in mob_list)
|
||||
if(S && istype(S) && S.keeper)
|
||||
S.show_message(rendered, 2)
|
||||
|
||||
for (var/mob/M in dead_mob_list)
|
||||
if(!istype(M,/mob/new_player) && !istype(M,/mob/living/carbon/brain)) //No meta-evesdropping
|
||||
rendered = "<i><span class='mommi game say'>Damage Control, <span class='name'>[name]</span> <a href='byond://?src=\ref[M];follow2=\ref[M];follow=\ref[src]'>(Follow)</a> <span class='message'>[interior_message]</span></span></i>"
|
||||
M.show_message(rendered, 2)
|
||||
for (var/mob/S in player_list)
|
||||
var/mob/living/silicon/robot/mommi/test = S
|
||||
if(istype(test) && !test.keeper || istype(S, /mob/new_player)) return 1
|
||||
handle_render(S,rendered,src)
|
||||
return 1
|
||||
|
||||
@@ -18,21 +18,15 @@
|
||||
|
||||
log_say("[key_name(src)] (@[src.x],[src.y],[src.z])(binary): [message]")
|
||||
|
||||
|
||||
var/message_a = say_quote(message)
|
||||
var/rendered = "<i><span class='game say'>Robotic Talk, <span class='name'>[name]</span> <span class='message'>[message_a]</span></span></i>"
|
||||
var/rendered = text("<i><span class='game say'>Robotic Talk, <span class='name'>[]</span> <span class='message'>[]</span></span></i>",name,message_a)
|
||||
|
||||
for (var/mob/living/S in living_mob_list)
|
||||
if(S.binarycheck() || S.stat == DEAD) // This SHOULD catch everything caught by the one below, but I'm not going to change it.
|
||||
if(istype(S , /mob/living/silicon/ai) && !isMoMMI(src))
|
||||
var/renderedAI = "<i><span class='game say'>Robotic Talk, <a href='byond://?src=\ref[S];track2=\ref[S];track=\ref[src]'><span class='name'>[name]</span></a> <span class='message'>[message_a]</span></span></i>"
|
||||
S << renderedAI
|
||||
else
|
||||
S << rendered
|
||||
for(var/mob/dead/observer/O in dead_mob_list)
|
||||
if(istype(O , /mob/dead/observer) && O.stat == DEAD)
|
||||
var/rendered_Obs = "<i><span class='game say'>Robotic Talk, <span class='name'>[name]</span> <a href='byond://?src=\ref[O];follow2=\ref[O];follow=\ref[src]'>(Follow)</a> <span class='message'>[message_a]</span></span></i>"
|
||||
O << rendered_Obs
|
||||
for (var/mob/S in player_list)
|
||||
if(istype(S , /mob/living/silicon/ai))
|
||||
var/renderedAI = "<i><span class='game say'>Robotic Talk, <a href='byond://?src=\ref[S];track2=\ref[S];track=\ref[src]'><span class='name'>[name]</span></a> <span class='message'>[message_a]</span></span></i>"
|
||||
S << renderedAI
|
||||
else if(S.binarycheck() || ((S in dead_mob_list) && !istype(S, /mob/new_player)))
|
||||
handle_render(S,rendered,src)
|
||||
|
||||
/mob/living/silicon/binarycheck()
|
||||
return 1
|
||||
|
||||
@@ -84,3 +84,9 @@
|
||||
|
||||
/mob/proc/construct_chat_check(var/setting)
|
||||
return 0
|
||||
|
||||
/mob/proc/hivecheck()
|
||||
return 0
|
||||
|
||||
/mob/proc/binarycheck()
|
||||
return 0
|
||||
|
||||
@@ -15,13 +15,14 @@
|
||||
artifact_find_type = pick(\
|
||||
5;/obj/structure/constructshell,\
|
||||
5;/obj/machinery/syndicate_beacon,\
|
||||
25;/obj/machinery/power/supermatter/shard,\
|
||||
25;/obj/machinery/power/supermatter,\
|
||||
50;/obj/structure/cult/pylon,\
|
||||
100;/obj/machinery/auto_cloner,\
|
||||
100;/obj/machinery/giga_drill,\
|
||||
100;/obj/mecha/working/hoverpod,\
|
||||
100;/obj/machinery/replicator,\
|
||||
150;/obj/structure/crystal,\
|
||||
100;/obj/machinery/communication,\
|
||||
1000;/obj/machinery/artifact)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
/obj/machinery/communication
|
||||
name = "Ancient Device"
|
||||
desc = "There seems to be six slots capable of holding small crystals placed along its side"
|
||||
icon = 'icons/obj/xenoarchaeology.dmi'
|
||||
icon_state = "communication"
|
||||
stat = NOPOWER //Niggers you will wrench this shit down or else
|
||||
density = 1
|
||||
use_power = 1
|
||||
active_power_usage = 4000
|
||||
idle_power_usage = 1000
|
||||
var/list/obj/item/commstone/allstones = list()
|
||||
var/remaining = 6
|
||||
|
||||
/obj/machinery/communication/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/commstone))
|
||||
if((W in allstones) && remaining < 6)
|
||||
user.drop_item(src)
|
||||
W.loc = src
|
||||
user << "<span class='notice'>You place one of the strange stones back onto the ancient device, it snaps into place.</span>"
|
||||
..()
|
||||
|
||||
/obj/machinery/communication/attack_hand(mob/user as mob)
|
||||
if(contents.len)
|
||||
var/obj/item/commstone/stone = contents[1]
|
||||
user.put_in_hands(stone)
|
||||
user << "<span class='notice'>You delicately remove one of the strange stones from the ancient device.</span>"
|
||||
return
|
||||
if(remaining)
|
||||
var/obj/item/commstone/stone = new(remaining)
|
||||
user.put_in_hands(stone)
|
||||
stone.commdevice = src
|
||||
allstones += stone
|
||||
remaining--
|
||||
user << "<span class='notice'>You delicately remove one of the strange stones from the ancient device.</span>"
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/machinery/communication/examine(mob/user as mob)
|
||||
..()
|
||||
if(remaining)
|
||||
user << "<span class='info'>The device's slots still apears to hold [remaining] stone\s."
|
||||
else
|
||||
user << "<span class='info'>The device no longer has any stones in any of its holders."
|
||||
if(stat & NOPOWER)
|
||||
user << "<span class='info'>It seems the machine is currently dark, perhaps it would activate when anchored into a powered area."
|
||||
|
||||
/obj/machinery/communication/Destroy()
|
||||
for(var/stone in contents)
|
||||
qdel(stone)
|
||||
..()
|
||||
|
||||
/obj/machinery/communication/proc/get_active_stones()
|
||||
if((stat & NOPOWER) && !anchored) return list()
|
||||
var/list/obj/item/commstone/thestones = allstones
|
||||
for(var/obj/item/commstone/check in thestones)
|
||||
if(check.loc == src)
|
||||
thestones -= check
|
||||
return thestones
|
||||
|
||||
/obj/item/commstone
|
||||
name = "Strange Stone"
|
||||
desc = "You can hear small voices coming from within, they whisper through to you a soft but persistent message - 'use .y'"
|
||||
icon = 'icons/obj/xenoarchaeology.dmi'
|
||||
icon_state = "crystal1"
|
||||
w_class = 2
|
||||
var/obj/machinery/communication/commdevice = null
|
||||
var/number = null
|
||||
|
||||
/obj/item/commstone/New(remaining)
|
||||
..()
|
||||
number = remaining
|
||||
update_icon()
|
||||
|
||||
/obj/item/commstone/examine(mob/user as mob)
|
||||
..()
|
||||
if(!commdevice || (commdevice.stat & NOPOWER))
|
||||
user << "<span class='info'>It seems to have lost its luster, perhaps the device it is connected to isn't functional."
|
||||
|
||||
|
||||
/obj/item/commstone/update_icon()
|
||||
icon_state = "crystal[number]"
|
||||
@@ -50,6 +50,7 @@ h1.alert, h2.alert {color: #000000;}
|
||||
.bnotice {color: #000099; font-weight: bold;}
|
||||
.sans {font-family: 'Comic Sans MS', cursive, sans-serif;}
|
||||
.alien {color: #543354;}
|
||||
.ancient {color: #008B8B; font-stye: italic;}
|
||||
.newscaster {color: #800000;}
|
||||
.mod {color: #735638; font-weight: bold;}
|
||||
.modooc {color: #000000; font-weight: bold;}
|
||||
|
||||
Reference in New Issue
Block a user