another huge sync

This commit is contained in:
LetterJay
2017-06-21 18:00:00 -05:00
parent 0719541100
commit d04001c09d
51 changed files with 1443 additions and 981 deletions
+8 -21
View File
@@ -334,31 +334,18 @@
if(!objective)
return
SSblackbox.add_details("admin_secrets_fun_used","Traitor All ([objective])")
for(var/mob/living/carbon/human/H in GLOB.player_list)
if(H.stat == 2 || !H.client || !H.mind) continue
for(var/mob/living/H in GLOB.player_list)
if(!(istype(H, /mob/living/carbon/human)||istype(H, /mob/living/silicon/))) continue
if(H.stat == 2 || !H.client || !H.mind || ispAI(H)) continue
if(is_special_character(H)) continue
//traitorize(H, objective, 0)
SSticker.mode.traitors += H.mind
H.mind.special_role = "traitor"
H.mind.add_antag_datum(ANTAG_DATUM_TRAITOR_CUSTOM)
var/datum/antagonist/traitor/traitordatum = H.mind.has_antag_datum(ANTAG_DATUM_TRAITOR) //original datum self deletes
var/datum/objective/new_objective = new
new_objective.owner = H
new_objective.explanation_text = objective
H.mind.objectives += new_objective
SSticker.mode.greet_traitor(H.mind)
//SSticker.mode.forge_traitor_objectives(H.mind)
SSticker.mode.finalize_traitor(H.mind)
for(var/mob/living/silicon/A in GLOB.player_list)
if(A.stat == 2 || !A.client || !A.mind) continue
if(ispAI(A)) continue
else if(is_special_character(A)) continue
SSticker.mode.traitors += A.mind
A.mind.special_role = "traitor"
var/datum/objective/new_objective = new
new_objective.owner = A
new_objective.explanation_text = objective
A.mind.objectives += new_objective
SSticker.mode.greet_traitor(A.mind)
SSticker.mode.finalize_traitor(A.mind)
traitordatum.add_objective(new_objective)
traitordatum.equip(FALSE)
traitordatum.greet()
message_admins("<span class='adminnotice'>[key_name_admin(usr)] used everyone is a traitor secret. Objective is [objective]</span>")
log_admin("[key_name(usr)] used everyone is a traitor secret. Objective is [objective]")
@@ -202,6 +202,7 @@
to_chat(H, "<span class='heavy_brass'>The world before you suddenly glows a brilliant yellow. You hear the whooshing steam and clanking cogs of a billion billion machines, and all at once \
you see the truth. Ratvar, the Clockwork Justiciar, lies derelict and forgotten in an unseen realm, and he has selected you as one of his harbringers. You are now a servant of \
Ratvar, and you will bring him back.</span>")
H.playsound_local(get_turf(H), 'sound/ambience/antag/clockcultalr.ogg', 100, FALSE, pressure_affected = FALSE)
add_servant_of_ratvar(H, TRUE)
SSticker.mode.equip_servant(H)
candidates.Remove(H)
+33 -35
View File
@@ -112,7 +112,6 @@
message_admins("<span class='adminnotice'><b> LocalNarrate: [key_name_admin(usr)] at [get_area(A)][ADMIN_JMP(A)]:</b> [msg]<BR></span>")
SSblackbox.add_details("admin_verb","Local Narrate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_godmode(mob/M in GLOB.mob_list)
set category = "Special Verbs"
set name = "Godmode"
@@ -227,7 +226,7 @@
return 0
var/alien_caste = input(usr, "Please choose which caste to spawn.","Pick a caste",null) as null|anything in list("Queen","Praetorian","Hunter","Sentinel","Drone","Larva")
var/obj/effect/landmark/spawn_here = GLOB.xeno_spawn.len ? pick(GLOB.xeno_spawn) : null
var/obj/effect/landmark/spawn_here = GLOB.xeno_spawn.len ? pick(GLOB.xeno_spawn) : null
var/mob/living/carbon/alien/new_xeno
switch(alien_caste)
if("Queen")
@@ -244,8 +243,8 @@
new_xeno = new /mob/living/carbon/alien/larva(spawn_here)
else
return 0
if(!spawn_here)
SSjob.SendToLateJoin(new_xeno, FALSE)
if(!spawn_here)
SSjob.SendToLateJoin(new_xeno, FALSE)
new_xeno.ckey = ckey
var/msg = "<span class='notice'>[key_name_admin(usr)] has spawned [ckey] as a filthy xeno [alien_caste].</span>"
@@ -302,9 +301,9 @@ Traitors and the like can also be revived with the previous role mostly intact.
else//If we don't know what special role they have, for whatever reason, or they're a larva.
create_xeno(G_found.ckey)
return
if(!T)
SSjob.SendToLateJoin(new_xeno, FALSE)
if(!T)
SSjob.SendToLateJoin(new_xeno, FALSE)
//Now to give them their mind back.
G_found.mind.transfer_to(new_xeno) //be careful when doing stuff like this! I've already checked the mind isn't in use
@@ -318,8 +317,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
//check if they were a monkey
else if(findtext(G_found.real_name,"monkey"))
if(alert("This character appears to have been a monkey. Would you like to respawn them as such?",,"Yes","No")=="Yes")
var/mob/living/carbon/monkey/new_monkey = new
SSjob.SendToLateJoin(new_monkey)
var/mob/living/carbon/monkey/new_monkey = new
SSjob.SendToLateJoin(new_monkey)
G_found.mind.transfer_to(new_monkey) //be careful when doing stuff like this! I've already checked the mind isn't in use
new_monkey.key = G_found.key
to_chat(new_monkey, "You have been fully respawned. Enjoy the game.")
@@ -330,8 +329,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
//Ok, it's not a xeno or a monkey. So, spawn a human.
var/mob/living/carbon/human/new_character = new//The mob being spawned.
SSjob.SendToLateJoin(new_character)
var/mob/living/carbon/human/new_character = new//The mob being spawned.
SSjob.SendToLateJoin(new_character)
var/datum/data/record/record_found //Referenced to later to either randomize or not randomize the character.
if(G_found.mind && !G_found.mind.active) //mind isn't currently in use by someone/something
@@ -374,10 +373,13 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/player_key = G_found.key
//Now for special roles and equipment.
var/datum/antagonist/traitor/traitordatum = new_character.mind.has_antag_datum(ANTAG_DATUM_TRAITOR)
if(traitordatum)
SSjob.EquipRank(new_character, new_character.mind.assigned_role, 1)
traitordatum.equip()
switch(new_character.mind.special_role)
if("traitor")
SSjob.EquipRank(new_character, new_character.mind.assigned_role, 1)
SSticker.mode.equip_traitor(new_character)
if("Wizard")
new_character.loc = pick(GLOB.wizardstart)
//SSticker.mode.learn_basic_spells(new_character)
@@ -392,8 +394,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
if(L.name=="carpspawn")
ninja_spawn += L
var/datum/antagonist/ninja/ninjadatum = new_character.mind.has_antag_datum(ANTAG_DATUM_NINJA)
ninjadatum.equip_space_ninja()
var/datum/antagonist/ninja/ninjadatum = new_character.mind.has_antag_datum(ANTAG_DATUM_NINJA)
ninjadatum.equip_space_ninja()
if(ninja_spawn.len)
var/obj/effect/landmark/ninja_spawn_here = pick(ninja_spawn)
new_character.loc = ninja_spawn_here.loc
@@ -402,12 +404,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
switch(new_character.mind.assigned_role)
if("Cyborg")//More rigging to make em' work and check if they're traitor.
new_character = new_character.Robotize()
if(new_character.mind.special_role=="traitor")
SSticker.mode.add_law_zero(new_character)
if("AI")
new_character = new_character.AIize()
if(new_character.mind.special_role=="traitor")
SSticker.mode.add_law_zero(new_character)
else
SSjob.EquipRank(new_character, new_character.mind.assigned_role, 1)//Or we simply equip them.
@@ -591,7 +589,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
empulse(O, heavy, light)
log_admin("[key_name(usr)] created an EM Pulse ([heavy],[light]) at ([O.x],[O.y],[O.z])")
message_admins("[key_name_admin(usr)] created an EM Pulse ([heavy],[light]) at ([O.x],[O.y],[O.z])")
message_admins("[key_name_admin(usr)] created an EM Pulse ([heavy],[light]) at ([O.x],[O.y],[O.z])")
SSblackbox.add_details("admin_verb","EM Pulse") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
@@ -1199,17 +1197,17 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
message_admins(msg)
admin_ticket_log(target, msg)
log_admin("[key_name(usr)] punished [key_name(target)] with [punishment].")
/client/proc/trigger_centcom_recall()
if(!holder)
return
var/message = pick(GLOB.admiral_messages)
message = input("Enter message from the on-call admiral to be put in the recall report.", "Admiral Message", message) as text|null
if(!message)
return
message_admins("[key_name_admin(usr)] triggered a Centcom recall, with the admiral message of: [message]")
log_game("[key_name(usr)] triggered a Centcom recall, with the message of: [message]")
SSshuttle.centcom_recall(SSshuttle.emergency.timer, message)
/client/proc/trigger_centcom_recall()
if(!holder)
return
var/message = pick(GLOB.admiral_messages)
message = input("Enter message from the on-call admiral to be put in the recall report.", "Admiral Message", message) as text|null
if(!message)
return
message_admins("[key_name_admin(usr)] triggered a Centcom recall, with the admiral message of: [message]")
log_game("[key_name(usr)] triggered a Centcom recall, with the message of: [message]")
SSshuttle.centcom_recall(SSshuttle.emergency.timer, message)
+35 -35
View File
@@ -259,41 +259,41 @@ GLOBAL_LIST_EMPTY(asset_datums)
"jquery-1.10.2.min.js" = 'html/IRV/jquery-1.10.2.min.js'
)
/datum/asset/simple/changelog
assets = list(
"88x31.png" = 'html/88x31.png',
"bug-minus.png" = 'html/bug-minus.png',
"cross-circle.png" = 'html/cross-circle.png',
"hard-hat-exclamation.png" = 'html/hard-hat-exclamation.png',
"image-minus.png" = 'html/image-minus.png',
"image-plus.png" = 'html/image-plus.png',
"music-minus.png" = 'html/music-minus.png',
"music-plus.png" = 'html/music-plus.png',
"tick-circle.png" = 'html/tick-circle.png',
"wrench-screwdriver.png" = 'html/wrench-screwdriver.png',
"spell-check.png" = 'html/spell-check.png',
"burn-exclamation.png" = 'html/burn-exclamation.png',
"chevron.png" = 'html/chevron.png',
"chevron-expand.png" = 'html/chevron-expand.png',
"scales.png" = 'html/scales.png',
"changelog.css" = 'html/changelog.css'
)
/datum/asset/simple/goonchat
verify = TRUE
assets = list(
"jquery.min.js" = 'code/modules/html_interface/js/jquery.min.js',
"json2.min.js" = 'code/modules/goonchat/browserassets/js/json2.min.js',
"errorHandler.js" = 'code/modules/goonchat/browserassets/js/errorHandler.js',
"browserOutput.js" = 'code/modules/goonchat/browserassets/js/browserOutput.js',
"fontawesome-webfont.eot" = 'tgui/assets/fonts/fontawesome-webfont.eot',
"fontawesome-webfont.svg" = 'tgui/assets/fonts/fontawesome-webfont.svg',
"fontawesome-webfont.ttf" = 'tgui/assets/fonts/fontawesome-webfont.ttf',
"fontawesome-webfont.woff" = 'tgui/assets/fonts/fontawesome-webfont.woff',
"font-awesome.css" = 'code/modules/goonchat/browserassets/css/font-awesome.css',
"browserOutput.css" = 'code/modules/goonchat/browserassets/css/browserOutput.css',
)
/datum/asset/simple/changelog
assets = list(
"88x31.png" = 'html/88x31.png',
"bug-minus.png" = 'html/bug-minus.png',
"cross-circle.png" = 'html/cross-circle.png',
"hard-hat-exclamation.png" = 'html/hard-hat-exclamation.png',
"image-minus.png" = 'html/image-minus.png',
"image-plus.png" = 'html/image-plus.png',
"music-minus.png" = 'html/music-minus.png',
"music-plus.png" = 'html/music-plus.png',
"tick-circle.png" = 'html/tick-circle.png',
"wrench-screwdriver.png" = 'html/wrench-screwdriver.png',
"spell-check.png" = 'html/spell-check.png',
"burn-exclamation.png" = 'html/burn-exclamation.png',
"chevron.png" = 'html/chevron.png',
"chevron-expand.png" = 'html/chevron-expand.png',
"scales.png" = 'html/scales.png',
"changelog.css" = 'html/changelog.css'
)
/datum/asset/simple/goonchat
verify = FALSE
assets = list(
"jquery.min.js" = 'code/modules/html_interface/js/jquery.min.js',
"json2.min.js" = 'code/modules/goonchat/browserassets/js/json2.min.js',
"errorHandler.js" = 'code/modules/goonchat/browserassets/js/errorHandler.js',
"browserOutput.js" = 'code/modules/goonchat/browserassets/js/browserOutput.js',
"fontawesome-webfont.eot" = 'tgui/assets/fonts/fontawesome-webfont.eot',
"fontawesome-webfont.svg" = 'tgui/assets/fonts/fontawesome-webfont.svg',
"fontawesome-webfont.ttf" = 'tgui/assets/fonts/fontawesome-webfont.ttf',
"fontawesome-webfont.woff" = 'tgui/assets/fonts/fontawesome-webfont.woff',
"font-awesome.css" = 'code/modules/goonchat/browserassets/css/font-awesome.css',
"browserOutput.css" = 'code/modules/goonchat/browserassets/css/browserOutput.css',
)
//Registers HTML Interface assets.
/datum/asset/HTML_interface/register()
for(var/path in typesof(/datum/html_interface))
@@ -85,6 +85,7 @@
item_color = "bronze"
materials = list(MAT_METAL=1000)
resistance_flags = FIRE_PROOF
var/medaltype = "medal" //Sprite used for medalbox
var/commended = FALSE
//Pinning medals on people
@@ -138,6 +139,7 @@
desc = "A silver medal."
icon_state = "silver"
item_color = "silver"
medaltype = "medal-silver"
materials = list(MAT_SILVER=1000)
/obj/item/clothing/accessory/medal/silver/valor
@@ -153,6 +155,7 @@
desc = "A prestigious golden medal."
icon_state = "gold"
item_color = "gold"
medaltype = "medal-gold"
materials = list(MAT_GOLD=1000)
/obj/item/clothing/accessory/medal/gold/captain
@@ -169,6 +172,7 @@
desc = "An eccentric medal made of plasma."
icon_state = "plasma"
item_color = "plasma"
medaltype = "medal-plasma"
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = -10, acid = 0) //It's made of plasma. Of course it's flammable.
materials = list(MAT_PLASMA=1000)
+41 -34
View File
@@ -262,51 +262,57 @@ Gunshots/explosions/opening doors/less rare audio (done)
px = -32
/obj/effect/hallucination/oh_yeah
var/turf/closed/wall/wall
var/obj/effect/hallucination/simple/bubblegum/bubblegum = null
var/obj/effect/hallucination/simple/bubblegum/bubblegum
var/image/fakebroken
var/image/fakerune
/obj/effect/hallucination/oh_yeah/Initialize(mapload, var/mob/living/carbon/T)
..()
. = ..()
target = T
var/turf/closed/wall/wall
for(var/turf/closed/wall/W in range(7,target))
wall = W
break
if(wall)
fakebroken = image('icons/turf/floors.dmi', wall, "plating", layer = TURF_LAYER)
var/turf/landing = get_turf(target)
var/turf/landing_image_turf = get_step(landing, SOUTHWEST) //the icon is 3x3
fakerune = image('icons/effects/96x96.dmi', landing_image_turf, "landing", layer = ABOVE_OPEN_TURF_LAYER)
fakebroken.override = TRUE
if(target.client)
target.client.images |= fakebroken
target.client.images |= fakerune
target.playsound_local(wall,'sound/effects/meteorimpact.ogg', 150, 1)
bubblegum = new(wall, target)
sleep(10) //ominous wait
var/charged = FALSE //only get hit once
while(get_turf(bubblegum) != landing && target && target.stat != DEAD)
bubblegum.forceMove(get_step_towards(bubblegum, landing))
bubblegum.setDir(get_dir(bubblegum, landing))
target.playsound_local(get_turf(bubblegum), 'sound/effects/meteorimpact.ogg', 150, 1)
shake_camera(target, 2, 1)
if(bubblegum.Adjacent(target) && !charged)
charged = TRUE
target.Weaken(4)
target.staminaloss += 40
step_away(target, bubblegum)
shake_camera(target, 4, 3)
target.visible_message("<span class='warning'>[target] jumps backwards, falling on the ground!</span>","<span class='userdanger'>[bubblegum] slams into you!</span>")
sleep(2)
sleep(30)
qdel(bubblegum)
if(!wall)
return INITIALIZE_HINT_QDEL
fakebroken = image('icons/turf/floors.dmi', wall, "plating", layer = TURF_LAYER)
var/turf/landing = get_turf(target)
var/turf/landing_image_turf = get_step(landing, SOUTHWEST) //the icon is 3x3
fakerune = image('icons/effects/96x96.dmi', landing_image_turf, "landing", layer = ABOVE_OPEN_TURF_LAYER)
fakebroken.override = TRUE
if(target.client)
target.client.images |= fakebroken
target.client.images |= fakerune
target.playsound_local(wall,'sound/effects/meteorimpact.ogg', 150, 1)
bubblegum = new(wall, target)
addtimer(CALLBACK(src, .proc/bubble_attack, landing), 10)
/obj/effect/hallucination/oh_yeah/proc/bubble_attack(turf/landing)
var/charged = FALSE //only get hit once
while(get_turf(bubblegum) != landing && target && target.stat != DEAD)
bubblegum.forceMove(get_step_towards(bubblegum, landing))
bubblegum.setDir(get_dir(bubblegum, landing))
target.playsound_local(get_turf(bubblegum), 'sound/effects/meteorimpact.ogg', 150, 1)
shake_camera(target, 2, 1)
if(bubblegum.Adjacent(target) && !charged)
charged = TRUE
target.Weaken(4)
target.adjustStaminaLoss(40)
step_away(target, bubblegum)
shake_camera(target, 4, 3)
target.visible_message("<span class='warning'>[target] jumps backwards, falling on the ground!</span>","<span class='userdanger'>[bubblegum] slams into you!</span>")
sleep(2)
sleep(30)
qdel(src)
/obj/effect/hallucination/oh_yeah/Destroy()
if(target.client)
target.client.images.Remove(fakebroken)
target.client.images.Remove(fakerune)
QDEL_NULL(fakebroken)
QDEL_NULL(fakerune)
QDEL_NULL(bubblegum)
return ..()
/obj/effect/hallucination/singularity_scare
@@ -544,7 +550,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
/obj/item/clothing/suit/space/nasavoid, /obj/item/weapon/tank)
var/obj/effect/fake_attacker/F = new/obj/effect/fake_attacker(get_turf(target),target)
for(var/obj/item/I in clone.held_items)
if(!(locate(I) in non_fakeattack_weapons))
clone_weapon = I.name
@@ -625,7 +631,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
else if(src.dir == WEST)
del src.currentimage
src.currentimage = new /image(left,src)
SEND_IMAGE(my_target, currentimage)
to_chat(my_target, currentimage)
/obj/effect/fake_attacker/proc/attack_loop()
@@ -669,7 +675,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
var/obj/effect/overlay/O = new/obj/effect/overlay(target.loc)
O.name = "blood"
var/image/I = image('icons/effects/blood.dmi',O,"floor[rand(1,7)]",O.dir,1)
SEND_IMAGE(target, I)
to_chat(target, I)
QDEL_IN(O, 300)
@@ -786,6 +792,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
new /obj/effect/hallucination/items_other(src.loc,src)
if("sounds")
//Strange audio
//to_chat(src, "Strange Audio")
switch(rand(1,20))
if(1) playsound_local(null,'sound/machines/airlock.ogg', 15, 1)
if(2)
+83
View File
@@ -0,0 +1,83 @@
/datum/language/codespeak
name = "Codespeak"
desc = "Syndicate operatives can use a series of codewords to convey complex information, while sounding like random concepts and drinks to anyone listening in."
key = "t"
default_priority = 0
flags = TONGUELESS_SPEECH | LANGUAGE_HIDE_ICON_IF_NOT_UNDERSTOOD
icon_state = "codespeak"
/datum/language/codespeak/scramble(input)
var/lookup = check_cache(input)
if(lookup)
return lookup
. = ""
var/list/words = list()
while(length(.) < length(input))
words += generate_code_phrase(return_list=TRUE)
. = jointext(words, ", ")
. = capitalize(.)
var/input_ending = copytext(input, length(input))
var/static/list/endings
if(!endings)
endings = list("!", "?", ".")
if(input_ending in endings)
. += input_ending
add_to_cache(input, .)
/obj/item/weapon/codespeak_manual
name = "codespeak manual"
desc = "The book's cover reads: \"Codespeak(tm) - Secure your communication with metaphors so elaborate, they seem randomly generated!\""
icon = 'icons/obj/library.dmi'
icon_state = "book2"
var/charges = 1
/obj/item/weapon/codespeak_manual/attack_self(mob/living/user)
if(!isliving(user))
return
if(user.has_language(/datum/language/codespeak))
to_chat(user, "<span class='boldannounce'>You start skimming through [src], but you already know Codespeak.</span>")
return
to_chat(user, "<span class='boldannounce'>You start skimming through [src], and suddenly your mind is filled with codewords and responses.</span>")
user.grant_language(/datum/language/codespeak)
use_charge(user)
/obj/item/weapon/codespeak_manual/attack(mob/living/M, mob/living/user)
if(!istype(M) || !istype(user))
return
if(M == user)
attack_self(user)
return
playsound(loc, "punch", 25, 1, -1)
if(M.stat == DEAD)
M.visible_message("<span class='danger'>[user] smacks [M]'s lifeless corpse with [src].</span>", "<span class='userdanger'>[user] smacks your lifeless corpse with [src].</span>", "<span class='italics'>You hear smacking.</span>")
else if(M.has_language(/datum/language/codespeak))
M.visible_message("<span class='danger'>[user] beats [M] over the head with [src]!</span>", "<span class='userdanger'>[user] beats you over the head with [src]!</span>", "<span class='italics'>You hear smacking.</span>")
else
M.visible_message("<span class='notice'>[user] teaches [M] by beating them over the head with [src]!</span>", "<span class='boldnotice'>As [user] hits you with [src], codewords and responses flow through your mind.</span>", "<span class='italics'>You hear smacking.</span>")
M.grant_language(/datum/language/codespeak)
use_charge(user)
/obj/item/weapon/codespeak_manual/proc/use_charge(mob/user)
charges--
if(!charges)
var/turf/T = get_turf(src)
T.visible_message("<span class='warning'>The cover and contents of [src] start shifting and changing!</span>")
qdel(src)
var/obj/item/weapon/book/manual/random/book = new(T)
user.put_in_active_hand(book)
/obj/item/weapon/codespeak_manual/unlimited
name = "deluxe codespeak manual"
charges = INFINITY
+13 -1
View File
@@ -35,7 +35,7 @@
return TRUE
/datum/language/proc/get_icon()
return "<img class=icon src=\ref[icon] iconstate='[icon_state]'>"
return "[bicon(icon(icon, icon_state))]"
/datum/language/proc/get_random_name(gender, name_count=2, syllable_count=4, syllable_divisor=2)
if(!syllables || !syllables.len)
@@ -56,6 +56,18 @@
return "[trim(full_name)]"
/datum/language/proc/check_cache(input)
var/lookup = check_cache(input)
if(lookup)
return lookup
/datum/language/proc/add_to_cache(input, scrambled_text)
add_to_cache(input, scrambled_text)
return scrambled_text
/datum/language/proc/scramble(input)
if(!syllables || !syllables.len)
+81 -60
View File
@@ -1,4 +1,4 @@
#define LINKIFY_READY(string, value) "<a href='byond://?src=\ref[src];ready=[value]'>[string]</a>"
/mob/dead/new_player
var/ready = 0
@@ -24,26 +24,28 @@
loc = pick(GLOB.newplayer_start)
else
loc = locate(1,1,1)
. = ..()
/mob/dead/new_player/prepare_huds()
return
. = ..()
/mob/dead/new_player/prepare_huds()
return
/mob/dead/new_player/proc/new_player_panel()
var/output = "<center><p><a href='byond://?src=\ref[src];show_preferences=1'>Setup Character</A></p>"
var/output = "<center><p><a href='byond://?src=\ref[src];show_preferences=1'>Setup Character</a></p>"
if(!SSticker || SSticker.current_state <= GAME_STATE_PREGAME)
if(ready)
output += "<p>\[ <b>Ready</b> | <a href='byond://?src=\ref[src];ready=0'>Not Ready</a> \]</p>"
else
output += "<p>\[ <a href='byond://?src=\ref[src];ready=1'>Ready</a> | <b>Not Ready</b> \]</p>"
if(SSticker && SSticker.current_state <= GAME_STATE_PREGAME)
switch(ready)
if(PLAYER_NOT_READY)
output += "<p>\[ [LINKIFY_READY("Ready", PLAYER_READY_TO_PLAY)] | <b>Not Ready</b> | [LINKIFY_READY("Observe", PLAYER_READY_TO_OBSERVE)] \]</p>"
if(PLAYER_READY_TO_PLAY)
output += "<p>\[ <b>Ready</b> | [LINKIFY_READY("Not Ready", PLAYER_NOT_READY)] | [LINKIFY_READY("Observe", PLAYER_READY_TO_OBSERVE)] \]</p>"
if(PLAYER_READY_TO_OBSERVE)
output += "<p>\[ [LINKIFY_READY("Ready", PLAYER_READY_TO_PLAY)] | [LINKIFY_READY("Not Ready", PLAYER_NOT_READY)] | <b> Observe </b> \]</p>"
else
output += "<p><a href='byond://?src=\ref[src];manifest=1'>View the Crew Manifest</A></p>"
output += "<p><a href='byond://?src=\ref[src];late_join=1'>Join Game!</A></p>"
output += "<p><a href='byond://?src=\ref[src];observe=1'>Observe</A></p>"
output += "<p><a href='byond://?src=\ref[src];manifest=1'>View the Crew Manifest</a></p>"
output += "<p><a href='byond://?src=\ref[src];late_join=1'>Join Game!</a></p>"
output += "<p>[LINKIFY_READY("Observe", PLAYER_READY_TO_OBSERVE)]</p>"
if(!IsGuestKey(src.key))
if (SSdbcore.Connect())
@@ -65,7 +67,7 @@
output += "</center>"
//src << browse(output,"window=playersetup;size=210x240;can_close=0")
var/datum/browser/popup = new(src, "playersetup", "<div align='center'>New Player Options</div>", 220, 265)
var/datum/browser/popup = new(src, "playersetup", "<div align='center'>New Player Options</div>", 250, 265)
popup.set_window_options("can_close=0")
popup.set_content(output)
popup.open(0)
@@ -108,44 +110,25 @@
return 1
if(href_list["ready"])
if(!SSticker || SSticker.current_state <= GAME_STATE_PREGAME) // Make sure we don't ready up after the round has started
ready = text2num(href_list["ready"])
if(SSticker)
var/tready = text2num(href_list["ready"])
//Avoid updating ready if we're after PREGAME (they should use latejoin instead)
//This is likely not an actual issue but I don't have time to prove that this
//no longer is required
if(SSticker.current_state <= GAME_STATE_PREGAME)
ready = tready
//if it's post initialisation and they're trying to observe we do the needful
if(!SSticker.current_state < GAME_STATE_PREGAME && tready == PLAYER_READY_TO_OBSERVE)
ready = tready
make_me_an_observer()
return
if(href_list["refresh"])
src << browse(null, "window=playersetup") //closes the player setup window
new_player_panel()
if(href_list["observe"])
if(alert(src,"Are you sure you wish to observe? You will not be able to play this round!","Player Setup","Yes","No") == "Yes")
if(!client)
return 1
var/mob/dead/observer/observer = new()
spawning = 1
observer.started_as_observer = 1
close_spawn_windows()
var/obj/O = locate("landmark*Observer-Start")
to_chat(src, "<span class='notice'>Now teleporting.</span>")
if (O)
observer.loc = O.loc
else
to_chat(src, "<span class='notice'>Teleporting failed. The map is probably still loading...</span>")
observer.key = key
observer.client = client
observer.set_ghost_appearance()
if(observer.client && observer.client.prefs)
observer.real_name = observer.client.prefs.real_name
observer.name = observer.real_name
observer.update_icon()
observer.stop_sound_channel(CHANNEL_LOBBYMUSIC)
QDEL_NULL(mind)
qdel(src)
return 1
if(href_list["late_join"])
if(!SSticker || !SSticker.IsRoundInProgress())
if(!SSticker || !SSticker.IsRoundInProgress())
to_chat(usr, "<span class='danger'>The round is either not ready, or has already finished...</span>")
return
@@ -273,6 +256,45 @@
return
to_chat(src, "<span class='notice'>Vote successful.</span>")
//When you cop out of the round (NB: this HAS A SLEEP FOR PLAYER INPUT IN IT)
/mob/dead/new_player/proc/make_me_an_observer()
if(QDELETED(src) || !src.client)
ready = PLAYER_NOT_READY
return FALSE
var/this_is_like_playing_right = alert(src,"Are you sure you wish to observe? You will not be able to play this round!","Player Setup","Yes","No")
if(QDELETED(src) || !src.client || this_is_like_playing_right != "Yes")
ready = PLAYER_NOT_READY
src << browse(null, "window=playersetup") //closes the player setup window
new_player_panel()
return FALSE
var/mob/dead/observer/observer = new()
spawning = TRUE
observer.started_as_observer = TRUE
close_spawn_windows()
var/obj/O = locate("landmark*Observer-Start")
to_chat(src, "<span class='notice'>Now teleporting.</span>")
if (O)
observer.loc = O.loc
else
to_chat(src, "<span class='notice'>Teleporting failed. Ahelp an admin please</span>")
stack_trace("There's no freaking observer landmark available on this map or you're making observers before the map is initialised")
observer.key = key
observer.client = client
observer.set_ghost_appearance()
if(observer.client && observer.client.prefs)
observer.real_name = observer.client.prefs.real_name
observer.name = observer.real_name
observer.update_icon()
observer.stop_sound_channel(CHANNEL_LOBBYMUSIC)
QDEL_NULL(mind)
qdel(src)
return TRUE
/mob/dead/new_player/proc/IsJobAvailable(rank)
var/datum/job/job = SSjob.GetJob(rank)
if(!job)
@@ -304,13 +326,13 @@
alert(src, "An administrator has disabled late join spawning.")
return FALSE
var/arrivals_docked = TRUE
var/arrivals_docked = TRUE
if(SSshuttle.arrivals)
close_spawn_windows() //In case we get held up
if(SSshuttle.arrivals.damaged && config.arrivals_shuttle_require_safe_latejoin)
src << alert("The arrivals shuttle is currently malfunctioning! You cannot join.")
return FALSE
arrivals_docked = SSshuttle.arrivals.mode != SHUTTLE_CALL
arrivals_docked = SSshuttle.arrivals.mode != SHUTTLE_CALL
//Remove the player from the join queue if he was in one and reset the timer
SSticker.queued_players -= src
@@ -323,13 +345,13 @@
if(isliving(equip)) //Borgs get borged in the equip, so we need to make sure we handle the new mob.
character = equip
SSjob.SendToLateJoin(character)
if(!arrivals_docked)
var/obj/screen/splash/Spl = new(character.client, TRUE)
Spl.Fade(TRUE)
character.playsound_local(get_turf(character), 'sound/voice/ApproachingTG.ogg', 25)
SSjob.SendToLateJoin(character)
if(!arrivals_docked)
var/obj/screen/splash/Spl = new(character.client, TRUE)
Spl.Fade(TRUE)
character.playsound_local(get_turf(character), 'sound/voice/ApproachingTG.ogg', 25)
character.update_parallax_teleport()
SSticker.minds += character.mind
@@ -362,7 +384,6 @@
/mob/dead/new_player/proc/AddEmploymentContract(mob/living/carbon/human/employee)
//TODO: figure out a way to exclude wizards/nukeops/demons from this.
sleep(30)
for(var/C in GLOB.employmentCabinets)
var/obj/structure/filingcabinet/employment/employmentCabinet = C
if(!employmentCabinet.virgin)
@@ -457,8 +478,8 @@
if(.)
new_character.key = key //Manually transfer the key to log them in
new_character.stop_sound_channel(CHANNEL_LOBBYMUSIC)
new_character = null
qdel(src)
new_character = null
qdel(src)
/mob/dead/new_player/proc/ViewManifest()
var/dat = "<html><body>"
@@ -98,7 +98,7 @@
empty()
/obj/item/weapon/gun/energy/kinetic_accelerator/proc/empty()
cell.use(500)
cell.use(cell.charge)
update_icon()
/obj/item/weapon/gun/energy/kinetic_accelerator/proc/attempt_reload(recharge_time)
@@ -125,7 +125,7 @@
return
/obj/item/weapon/gun/energy/kinetic_accelerator/proc/reload()
cell.give(500)
cell.give(cell.maxcharge)
recharge_newshot(1)
if(!suppressed)
playsound(src.loc, 'sound/weapons/kenetic_reload.ogg', 60, 1)
@@ -175,13 +175,18 @@
var/turf/target_turf = get_turf(target)
if(!isturf(target_turf))
return
var/datum/gas_mixture/environment = target_turf.return_air()
var/pressure = environment.return_pressure()
if(pressure > 50)
name = "weakened [name]"
damage = damage * pressure_decrease
pressure_decrease_active = TRUE
. = ..()
if(.)
if(kinetic_gun)
var/list/mods = kinetic_gun.get_modkits()
for(var/obj/item/borg/upgrade/modkit/M in mods)
M.projectile_prehit(src, target, kinetic_gun)
var/datum/gas_mixture/environment = target_turf.return_air()
var/pressure = environment.return_pressure()
if(pressure > 50)
name = "weakened [name]"
damage = damage * pressure_decrease
pressure_decrease_active = TRUE
/obj/item/projectile/kinetic/on_range()
strike_thing()
@@ -270,6 +275,8 @@
/obj/item/borg/upgrade/modkit/proc/modify_projectile(obj/item/projectile/kinetic/K)
//use this one for effects you want to trigger before any damage is done at all and before damage is decreased by pressure
/obj/item/borg/upgrade/modkit/proc/projectile_prehit(obj/item/projectile/kinetic/K, atom/target, obj/item/weapon/gun/energy/kinetic_accelerator/KA)
//use this one for effects you want to trigger before mods that do damage
/obj/item/borg/upgrade/modkit/proc/projectile_strike_predamage(obj/item/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/weapon/gun/energy/kinetic_accelerator/KA)
//and this one for things that don't need to trigger before other damage-dealing mods
@@ -400,7 +407,7 @@
cost = 20
var/static/list/damage_heal_order = list(BRUTE, BURN, OXY)
/obj/item/borg/upgrade/modkit/lifesteal/projectile_strike_predamage(obj/item/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/weapon/gun/energy/kinetic_accelerator/KA)
/obj/item/borg/upgrade/modkit/lifesteal/projectile_prehit(obj/item/projectile/kinetic/K, atom/target, obj/item/weapon/gun/energy/kinetic_accelerator/KA)
if(isliving(target) && isliving(K.firer))
var/mob/living/L = target
if(L.stat == DEAD)
@@ -433,7 +440,7 @@
var/maximum_bounty = 25
var/list/bounties_reaped = list()
/obj/item/borg/upgrade/modkit/bounty/projectile_strike(obj/item/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/weapon/gun/energy/kinetic_accelerator/KA)
/obj/item/borg/upgrade/modkit/bounty/projectile_prehit(obj/item/projectile/kinetic/K, atom/target, obj/item/weapon/gun/energy/kinetic_accelerator/KA)
if(isliving(target))
var/mob/living/L = target
var/list/existing_marks = L.has_status_effect_list(STATUS_EFFECT_SYPHONMARK)
@@ -444,6 +451,10 @@
qdel(SM)
var/datum/status_effect/syphon_mark/SM = L.apply_status_effect(STATUS_EFFECT_SYPHONMARK)
SM.reward_target = src
/obj/item/borg/upgrade/modkit/bounty/projectile_strike(obj/item/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/weapon/gun/energy/kinetic_accelerator/KA)
if(isliving(target))
var/mob/living/L = target
if(bounties_reaped[L.type])
var/kill_modifier = 1
if(K.pressure_decrease_active)
@@ -561,13 +561,15 @@
/obj/effect/timestop/Initialize()
. = ..()
for(var/mob/living/M in GLOB.player_list)
for(var/obj/effect/proc_holder/spell/aoe_turf/conjure/timestop/T in M.mind.spell_list) //People who can stop time are immune to timestop
immune |= M
for(var/M in GLOB.living_mob_list)
var/mob/living/L = M
for(var/obj/effect/proc_holder/spell/aoe_turf/conjure/timestop/T in L.mind.spell_list) //People who can stop time are immune to timestop
immune |= L
timestop()
/obj/effect/timestop/proc/timestop()
set waitfor = FALSE
playsound(get_turf(src), 'sound/magic/TIMEPARADOX2.ogg', 100, 1, -1)
for(var/i in 1 to duration-1)
for(var/atom/A in orange (freezerange, src.loc))
+17 -15
View File
@@ -5,25 +5,27 @@ GLOBAL_PROTECT(reboot_mode)
return params[SERVICE_WORLD_PARAM]
/world/proc/ExportService(command)
return RunningService() && shell("python code/modules/server_tools/nudge.py \"[command]\"") == 0
return RunningService() && shell("python code/modules/server_tools/nudge.py \"[command]\"") == 0
/world/proc/IRCBroadcast(msg)
ExportService("[SERVICE_REQUEST_IRC_BROADCAST] [msg]")
/world/proc/ServiceEndProcess()
log_world("Sending shutdown request!");
sleep(1) //flush the buffers
ExportService(SERVICE_REQUEST_KILL_PROCESS)
/world/proc/ServiceEndProcess()
log_world("Sending shutdown request!");
sleep(1) //flush the buffers
ExportService(SERVICE_REQUEST_KILL_PROCESS)
//called at the exact moment the world is supposed to reboot
/world/proc/ServiceReboot()
switch(GLOB.reboot_mode)
if(REBOOT_MODE_HARD)
to_chat(src, "<span class='boldannounce'>Hard reboot triggered, you will automatically reconnect...</span>")
ServiceEndProcess()
ServiceEndProcess()
if(REBOOT_MODE_SHUTDOWN)
to_chat(src, "<span class='boldannounce'>The server is shutting down...</span>")
ServiceEndProcess()
ServiceEndProcess()
else
ExportService(SERVICE_REQUEST_WORLD_REBOOT) //just let em know
/world/proc/ServiceCommand(list/params)
var/sCK = RunningService()
@@ -35,7 +37,7 @@ GLOBAL_PROTECT(reboot_mode)
var/command = params[SERVICE_CMD_PARAM_COMMAND]
if(!command)
return "No command!"
var/static/last_irc_status = 0
switch(command)
if(SERVICE_CMD_HARD_REBOOT)
@@ -66,12 +68,12 @@ GLOBAL_PROTECT(reboot_mode)
var/status = "Admins: [allmins.len] (Active: [english_list(adm["present"])] AFK: [english_list(adm["afk"])] Stealth: [english_list(adm["stealth"])] Skipped: [english_list(adm["noflags"])]). "
status += "Players: [GLOB.clients.len] (Active: [get_active_player_count(0,1,0)]). Mode: [SSticker.mode ? SSticker.mode.name : "Not started"]."
return status
if(SERVICE_CMD_IRC_CHECK)
var/rtod = REALTIMEOFDAY
if(rtod - last_irc_status < IRC_STATUS_THROTTLE)
return
last_irc_status = rtod
return "[GLOB.clients.len] players on [SSmapping.config.map_name], Mode: [GLOB.master_mode]; Round [SSticker.HasRoundStarted() ? (SSticker.IsRoundInProgress() ? "Active" : "Finishing") : "Starting"] -- [config.server ? config.server : "byond://[address]:[port]"]"
if(SERVICE_CMD_IRC_CHECK)
var/rtod = REALTIMEOFDAY
if(rtod - last_irc_status < IRC_STATUS_THROTTLE)
return
last_irc_status = rtod
return "[GLOB.clients.len] players on [SSmapping.config.map_name], Mode: [GLOB.master_mode]; Round [SSticker.HasRoundStarted() ? (SSticker.IsRoundInProgress() ? "Active" : "Finishing") : "Starting"] -- [config.server ? config.server : "byond://[address]:[port]"]"
if(SERVICE_CMD_ADMIN_MSG)
return IrcPm(params[SERVICE_CMD_PARAM_TARGET], params[SERVICE_CMD_PARAM_MESSAGE], params[SERVICE_CMD_PARAM_SENDER])
+1
View File
@@ -14,6 +14,7 @@
languages_possible = typecacheof(list(
/datum/language/common,
/datum/language/draconic,
/datum/language/codespeak,
/datum/language/monkey,
/datum/language/beachbum,
/datum/language/narsie,
+14
View File
@@ -1128,6 +1128,20 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
item = /obj/item/device/jammer
cost = 5
/datum/uplink_item/device_tools/codespeak_manual
name = "Codespeak Manual"
desc = "Syndicate agents can be trained to use a series of codewords to comvey complex information, which sounds like random concepts and drinks to anyone listening. This manual teaches you this Codespeak. You can also hit someone else with the manual in order to teach them. One use."
item = /obj/item/weapon/codespeak_manual
cost = 2
exclude_modes = list(/datum/game_mode/nuclear)
/datum/uplink_item/device_tools/codespeak_manual_deluxe
name = "Deluxe Codespeak Manual"
desc = "Syndicate agents can be trained to use a series of codewords to comvey complex information, which sounds like random concepts and drinks to anyone listening. This manual teaches you this Codespeak. You can also hit someone else with the manual in order to teach them. This is the deluxe edition, which has unlimited uses."
cost = 8
include_modes = list(/datum/game_mode/nuclear)
// Implants
/datum/uplink_item/implants
category = "Implants"