Merge branch 'master' into upstream-merge-29611

This commit is contained in:
LetterJay
2017-08-15 18:55:12 -05:00
committed by GitHub
246 changed files with 3752 additions and 1365 deletions
+3 -2
View File
@@ -169,7 +169,7 @@
/datum/action/item_action/toggle_firemode
name = "Toggle Firemode"
/datum/action/item_action/rcl
name = "Change Cable Color"
button_icon_state = "rcl_rainbow"
@@ -490,7 +490,8 @@
var/obj/effect/proc_holder/spell/S = target
S.action = src
name = S.name
icon_icon = S.action_icon
desc = S.desc
button_icon = S.action_icon
button_icon_state = S.action_icon_state
background_icon_state = S.action_background_icon_state
button.name = name
+54
View File
@@ -100,3 +100,57 @@
if (object == GLOBAL_PROC)
return call(delegate)(arglist(calling_arguments))
return call(object, delegate)(arglist(calling_arguments))
/datum/callback_select
var/list/finished
var/pendingcount
var/total
/datum/callback_select/New(count, savereturns)
total = count
if (savereturns)
finished = new(count)
/datum/callback_select/proc/invoke_callback(index, datum/callback/callback, list/callback_args, savereturn = TRUE)
set waitfor = FALSE
if (!callback || !istype(callback))
//This check only exists because the alternative is callback_select would block forever if given invalid data
CRASH("invalid callback passed to invoke_callback")
if (!length(callback_args))
callback_args = list()
pendingcount++
var/rtn = callback.Invoke(arglist(callback_args))
pendingcount--
if (savereturn)
finished[index] = rtn
//runs a list of callbacks asynchronously, returning once all of them return.
//callbacks can be repeated.
//callbacks-args is a optional list of argument lists, in the same order as the callbacks,
// the inner lists will be sent to the callbacks when invoked() as additional args.
//can optionly save and return a list of return values, in the same order as the original list of callbacks
//resolution is the number of byond ticks between checks.
/proc/callback_select(list/callbacks, list/callback_args, savereturns = TRUE, resolution = 1)
if (!callbacks)
return
var/count = length(callbacks)
if (!count)
return
if (!callback_args)
callback_args = list()
callback_args.len = count
var/datum/callback_select/CS = new(count, savereturns)
for (var/i in 1 to count)
CS.invoke_callback(i, callbacks[i], callback_args[i], savereturns)
while(CS.pendingcount)
sleep(resolution*world.tick_lag)
return CS.finished
+20
View File
@@ -929,6 +929,26 @@
manipulate_organs(C)
href_list["datumrefresh"] = href_list["editorgans"]
else if(href_list["hallucinate"])
if(!check_rights(0))
return
var/mob/living/carbon/C = locate(href_list["hallucinate"]) in GLOB.mob_list
if(!istype(C))
to_chat(usr, "This can only be done to instances of type /mob/living/carbon")
return
var/list/hallucinations = subtypesof(/datum/hallucination)
var/result = input(usr, "Choose the hallucination to apply","Send Hallucination") as null|anything in hallucinations
if(!usr)
return
if(QDELETED(C))
to_chat(usr, "Mob doesn't exist anymore")
return
if(result)
new result(C, TRUE)
else if(href_list["makehuman"])
if(!check_rights(R_SPAWN))
return
@@ -59,4 +59,4 @@ Bonus
else
if(prob(base_message_chance))
to_chat(M, "<span class='userdanger'>[pick("Oh, your head...", "Your head pounds.", "They're everywhere! Run!", "Something in the shadows...")]</span>")
M.hallucination += (15 * power)
M.hallucination += (45 * power)
+2
View File
@@ -32,6 +32,7 @@
if(ishuman(destination))
var/mob/living/carbon/human/H = destination
H.give_genitals(TRUE)//This gives the body the genitals of this DNA. Used for any transformations based on DNA
destination.flavor_text = destination.dna.features["flavor_text"] //Update the flavor_text to use new dna text
/datum/dna/proc/copy_dna(datum/dna/new_dna)
new_dna.unique_enzymes = unique_enzymes
@@ -231,6 +232,7 @@
if(newfeatures)
dna.features = newfeatures
flavor_text = dna.features["flavor_text"] //Update the flavor_text to use new dna text
if(mrace)
set_species(mrace, icon_update=0)
+3 -3
View File
@@ -11,7 +11,7 @@
var/minetype = "lavaland"
var/list/transition_config = list(CENTCOMM = SELFLOOPING,
var/list/transition_config = list(CENTCOM = SELFLOOPING,
MAIN_STATION = CROSSLINKED,
EMPTY_AREA_1 = CROSSLINKED,
EMPTY_AREA_2 = CROSSLINKED,
@@ -115,8 +115,8 @@
return UNAFFECTED
if("MAIN_STATION")
return MAIN_STATION
if("CENTCOMM")
return CENTCOMM
if("CENTCOM")
return CENTCOM
if("MINING")
return MINING
if("EMPTY_AREA_1")
+10 -6
View File
@@ -120,6 +120,10 @@
transfer_martial_arts(new_character)
if(active || force_key_move)
new_character.key = key //now transfer the key to link the client to our new body
if(isliving(new_character)) //New humans and such are by default enabled arousal. Let's always use the new mind's prefs.
var/mob/living/L = new_character
L.canbearoused = L.client.prefs.arousable //Technically this should make taking over a character mean the body gain the new minds setting...
L.update_arousal_hud() //Removes the old icon
/datum/mind/proc/store_memory(new_text)
memory += "[new_text]<BR>"
@@ -801,11 +805,11 @@
possible_targets += possible_target.current
var/mob/def_target = null
var/objective_list[] = list(/datum/objective/assassinate, /datum/objective/protect, /datum/objective/debrain, /datum/objective/maroon)
if (objective&&(objective.type in objective_list) && objective:target)
def_target = objective:target.current
var/list/objective_list = typecacheof(list(/datum/objective/assassinate, /datum/objective/protect, /datum/objective/debrain, /datum/objective/maroon))
if (is_type_in_typecache(objective, objective_list) && objective.target)
def_target = objective.target.current
var/new_target = input("Select target:", "Objective target", def_target) as null|anything in possible_targets
var/mob/new_target = input("Select target:", "Objective target", def_target) as null|anything in possible_targets
if (!new_target)
return
@@ -813,12 +817,12 @@
if (new_target == "Free objective")
new_objective = new objective_path
new_objective.owner = src
new_objective:target = null
new_objective.target = null
new_objective.explanation_text = "Free objective"
else
new_objective = new objective_path
new_objective.owner = src
new_objective:target = new_target:mind
new_objective.target = new_target.mind
//Will display as special role if the target is set as MODE. Ninjas/commandos/nuke ops.
new_objective.update_explanation_text()
+1 -1
View File
@@ -82,7 +82,7 @@
id = "derelict4"
suffix = "derelict4.dmm"
name = "Derelict 4"
description = "Centcom ferries have never crashed, will never crash, there is no current investigation into a crashed ferry, and we will not let Internal Affairs trample over high security \
description = "CentCom ferries have never crashed, will never crash, there is no current investigation into a crashed ferry, and we will not let Internal Affairs trample over high security \
information in the name of this baseless witchhunt."
/datum/map_template/ruin/space/derelict5
+5 -5
View File
@@ -133,7 +133,7 @@
/datum/map_template/shuttle/emergency/cramped
suffix = "cramped"
name = "Secure Transport Vessel 5 (STV5)"
description = "Well, looks like Centcomm only had this ship in the area, they probably weren't expecting you to need evac for a while. \
description = "Well, looks like CentCom only had this ship in the area, they probably weren't expecting you to need evac for a while. \
Probably best if you don't rifle around in whatever equipment they were transporting. I hope you're friendly with your coworkers, because there is very little space in this thing.\n\
\n\
Contains contraband armory guns, maintenance loot, and abandoned crates!"
@@ -181,7 +181,7 @@
suffix = "supermatter"
name = "Hyperfractal Gigashuttle"
description = "\"I dunno, this seems kinda needlessly complicated.\"\n\
\"This shuttle has very a very high safety record, according to Centcom Officer Cadet Yins.\"\n\
\"This shuttle has very a very high safety record, according to CentCom Officer Cadet Yins.\"\n\
\"Are you sure?\"\n\
\"Yes, it has a safety record of N-A-N, which is apparently larger than 100%.\""
admin_notes = "Supermatter that spawns on shuttle is special anchored 'hugbox' supermatter that cannot take damage and does not take in or emit gas. \
@@ -215,7 +215,7 @@
/datum/map_template/shuttle/ferry/base
suffix = "base"
name = "transport ferry"
description = "Standard issue Box/Metastation Centcom ferry."
description = "Standard issue Box/Metastation CentCom ferry."
/datum/map_template/shuttle/ferry/meat
suffix = "meat"
@@ -267,7 +267,7 @@
/datum/map_template/shuttle/emergency/raven
suffix = "raven"
name = "Centcomm Raven Battlecruiser"
description = "The Centcomm Raven Battlecruiser is currently docked at the Centcomm ship bay awaiting a mission, this Battlecruiser has been reassigned as an emergency escape shuttle for currently unknown reasons. The Centcomm Raven Battlecruiser should comfortably fit a medium to large crew size crew and is complete with all required facitlities including a top of the range Centcomm Medical Bay."
name = "CentCom Raven Battlecruiser"
description = "The CentCom Raven Battlecruiser is currently docked at the CentCom ship bay awaiting a mission, this Battlecruiser has been reassigned as an emergency escape shuttle for currently unknown reasons. The CentCom Raven Battlecruiser should comfortably fit a medium to large crew size crew and is complete with all required facitlities including a top of the range CentCom Medical Bay."
admin_notes = "The long way home"
credit_cost = 12500