Merge branch 'master' into upstream-merge-31877

This commit is contained in:
LetterJay
2017-10-28 23:57:51 -04:00
committed by GitHub
629 changed files with 207532 additions and 225684 deletions
+1
View File
@@ -1,5 +1,6 @@
/datum/antagonist/abductor
name = "Abductor"
job_rank = ROLE_ABDUCTOR
var/datum/objective_team/abductor_team/team
var/sub_role
var/outfit
+3 -7
View File
@@ -55,17 +55,13 @@ GLOBAL_LIST_EMPTY(antagonists)
if(!silent)
greet()
apply_innate_effects()
if(is_banned(owner) && replace_banned)
if(is_banned(owner.current) && replace_banned)
replace_banned_player()
/datum/antagonist/proc/is_banned(datum/mind/M)
/datum/antagonist/proc/is_banned(mob/M)
if(!M)
return FALSE
if(jobban_isbanned(M,"Syndicate"))
return TRUE
if(job_rank && jobban_isbanned(M,job_rank))
return TRUE
return FALSE
. = (jobban_isbanned(M,"Syndicate") || (job_rank && jobban_isbanned(M,job_rank)))
/datum/antagonist/proc/replace_banned_player()
set waitfor = FALSE
+2
View File
@@ -1,5 +1,6 @@
/datum/antagonist/brother
name = "Brother"
job_rank = ROLE_BROTHER
var/special_role = "blood brother"
var/datum/objective_team/brother_team/team
@@ -19,6 +20,7 @@
/datum/antagonist/brother/on_gain()
SSticker.mode.brothers += owner
owner.objectives += team.objectives
owner.special_role = special_role
finalize_brother()
return ..()
+11 -55
View File
@@ -1,7 +1,7 @@
/datum/antagonist/traitor
name = "Traitor"
var/should_specialise = TRUE //do we split into AI and human
var/base_datum_custom = ANTAG_DATUM_TRAITOR_CUSTOM //used for body transfer
job_rank = ROLE_TRAITOR
var/should_specialise = FALSE //do we split into AI and human, set to true on inital assignment only
var/ai_datum = ANTAG_DATUM_TRAITOR_AI
var/human_datum = ANTAG_DATUM_TRAITOR_HUMAN
var/special_role = "traitor"
@@ -10,71 +10,24 @@
var/should_give_codewords = TRUE
var/list/objectives_given = list()
/datum/antagonist/traitor/proc/transfer_important_variables(datum/antagonist/traitor/other)
other.silent = silent
other.employer = employer
other.special_role = special_role
other.objectives_given = objectives_given
/datum/antagonist/traitor/custom
ai_datum = ANTAG_DATUM_TRAITOR_AI_CUSTOM
human_datum = ANTAG_DATUM_TRAITOR_HUMAN_CUSTOM
/datum/antagonist/traitor/human
should_specialise = FALSE
var/should_equip = TRUE
/datum/antagonist/traitor/human/custom
silent = TRUE
should_give_codewords = FALSE
give_objectives = FALSE
should_equip = FALSE //Duplicating TCs is dangerous
/datum/antagonist/traitor/AI
should_specialise = FALSE
/datum/antagonist/traitor/AI/custom
silent = TRUE
should_give_codewords = FALSE
give_objectives = FALSE
/datum/antagonist/traitor/on_body_transfer(mob/living/old_body, mob/living/new_body)
// human <-> silicon only
if(old_body && issilicon(new_body) ^ issilicon(old_body))
silent = TRUE
owner.add_antag_datum(base_datum_custom)
for(var/datum/antagonist/traitor/new_datum in owner.antag_datums)
if(new_datum == src)
continue
transfer_important_variables(new_datum)
break
on_removal()
else
..()
/datum/antagonist/traitor/human/custom //used to give custom objectives
silent = TRUE
give_objectives = FALSE
should_give_codewords = FALSE
/datum/antagonist/traitor/AI/custom //used to give custom objectives
silent = TRUE
give_objectives = FALSE
should_give_codewords = FALSE
/datum/antagonist/traitor/proc/specialise()
silent = TRUE
if(owner.current&&isAI(owner.current))
if(owner.current && isAI(owner.current))
owner.add_antag_datum(ai_datum)
else owner.add_antag_datum(human_datum)
else
owner.add_antag_datum(human_datum)
on_removal()
/datum/antagonist/traitor/on_gain()
if(should_specialise)
specialise()
return
SSticker.mode.traitors+=owner
SSticker.mode.traitors += owner
owner.special_role = special_role
if(give_objectives)
forge_traitor_objectives()
@@ -84,7 +37,7 @@
/datum/antagonist/traitor/apply_innate_effects()
if(owner.assigned_role == "Clown")
var/mob/living/carbon/human/traitor_mob = owner.current
if(traitor_mob&&istype(traitor_mob))
if(traitor_mob && istype(traitor_mob))
if(!silent)
to_chat(traitor_mob, "Your training has allowed you to overcome your clownish nature, allowing you to wield weapons without harming yourself.")
traitor_mob.dna.remove_mutation(CLOWNMUT)
@@ -92,7 +45,7 @@
/datum/antagonist/traitor/remove_innate_effects()
if(owner.assigned_role == "Clown")
var/mob/living/carbon/human/traitor_mob = owner.current
if(traitor_mob&&istype(traitor_mob))
if(traitor_mob && istype(traitor_mob))
traitor_mob.dna.add_mutation(CLOWNMUT)
/datum/antagonist/traitor/on_removal()
@@ -248,6 +201,7 @@
yandere_two.update_explanation_text() // normally called in find_target()
add_objective(yandere_two)
.=2
/datum/antagonist/traitor/greet()
to_chat(owner.current, "<B><font size=3 color=red>You are the [owner.special_role].</font></B>")
owner.announce_objectives()
@@ -296,6 +250,8 @@
killer.add_malf_picker()
/datum/antagonist/traitor/proc/equip(var/silent = FALSE)
return
/datum/antagonist/traitor/human/equip(var/silent = FALSE)
owner.equip_traitor(employer, silent)
+2 -1
View File
@@ -85,6 +85,8 @@ GLOBAL_LIST_INIT(devil_title, list("Lord ", "Prelate ", "Count ", "Viscount ", "
GLOBAL_LIST_INIT(devil_syllable, list("hal", "ve", "odr", "neit", "ci", "quon", "mya", "folth", "wren", "geyr", "hil", "niet", "twou", "phi", "coa"))
GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master", ", the Lord of all things", ", Jr."))
/datum/antagonist/devil
name = "Devil"
job_rank = ROLE_DEVIL
//Don't delete upon mind destruction, otherwise soul re-selling will break.
delete_on_mind_deletion = FALSE
var/obligation
@@ -107,7 +109,6 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master",
/obj/effect/proc_holder/spell/targeted/conjure_item/violin,
/obj/effect/proc_holder/spell/targeted/summon_dancefloor))
var/ascendable = FALSE
name = "Devil"
/datum/antagonist/devil/New()
+2 -27
View File
@@ -5,7 +5,6 @@
#define TRAITOR_AGENT_ROLE "Syndicate External Affairs Agent"
/datum/antagonist/traitor/internal_affairs
base_datum_custom = ANTAG_DATUM_IAA_CUSTOM
human_datum = ANTAG_DATUM_IAA_HUMAN
ai_datum = ANTAG_DATUM_IAA_AI
@@ -15,7 +14,6 @@
name = "Internal Affairs Agent"
employer = "Nanotrasen"
special_role = "internal affairs agent"
base_datum_custom = ANTAG_DATUM_IAA_CUSTOM
var/syndicate = FALSE
var/last_man_standing = FALSE
var/list/datum/mind/targets_stolen
@@ -29,47 +27,24 @@
name = "Internal Affairs Agent"
employer = "Nanotrasen"
special_role = "internal affairs agent"
base_datum_custom = ANTAG_DATUM_IAA_CUSTOM
var/syndicate = FALSE
var/last_man_standing = FALSE
var/list/datum/mind/targets_stolen
/datum/antagonist/traitor/human/internal_affairs/custom
silent = TRUE
should_give_codewords = FALSE
give_objectives = FALSE
should_equip = FALSE //Duplicating TCs is dangerous
/datum/antagonist/traitor/human/internal_affairs/transfer_important_variables(datum/antagonist/traitor/human/internal_affairs/other)
..(other)
other.syndicate = syndicate
other.last_man_standing = last_man_standing
other.targets_stolen = targets_stolen
/datum/antagonist/traitor/AI/internal_affairs/transfer_important_variables(datum/antagonist/traitor/human/internal_affairs/other)
..(other)
other.syndicate = syndicate
other.last_man_standing = last_man_standing
other.targets_stolen = targets_stolen
/datum/antagonist/traitor/human/internal_affairs/proc/give_pinpointer()
if(owner && owner.current)
owner.current.apply_status_effect(/datum/status_effect/agent_pinpointer)
/datum/antagonist/traitor/human/internal_affairs/apply_innate_effects()
.=..() //in case the base is used in future
if(owner&&owner.current)
if(owner && owner.current)
give_pinpointer(owner.current)
/datum/antagonist/traitor/human/internal_affairs/remove_innate_effects()
.=..()
if(owner&&owner.current)
if(owner && owner.current)
owner.current.remove_status_effect(/datum/status_effect/agent_pinpointer)
/datum/antagonist/traitor/internal_affairs/custom
ai_datum = ANTAG_DATUM_IAA_AI_CUSTOM
human_datum = ANTAG_DATUM_IAA_HUMAN_CUSTOM
/datum/antagonist/traitor/human/internal_affairs/on_gain()
START_PROCESSING(SSprocessing, src)
.=..()
+1
View File
@@ -1,5 +1,6 @@
/datum/antagonist/ninja
name = "Ninja"
job_rank = ROLE_NINJA
var/helping_station = 0
var/give_objectives = TRUE
+2 -3
View File
@@ -157,8 +157,7 @@
/datum/antagonist/wizard/apply_innate_effects(mob/living/mob_override)
var/mob/living/M = mob_override || owner.current
if(wiz_team) //Don't bother with the icon if you're solo wizard
update_wiz_icons_added(M)
update_wiz_icons_added(M, wiz_team ? TRUE : FALSE) //Don't bother showing the icon if you're solo wizard
M.faction |= "wizard"
/datum/antagonist/wizard/remove_innate_effects(mob/living/mob_override)
@@ -250,7 +249,7 @@
owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/turf_teleport/blink(null))
owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/ethereal_jaunt(null))
/datum/antagonist/wizard/proc/update_wiz_icons_added(mob/living/wiz)
/datum/antagonist/wizard/proc/update_wiz_icons_added(mob/living/wiz,join = TRUE)
var/datum/atom_hud/antag/wizhud = GLOB.huds[ANTAG_HUD_WIZ]
wizhud.join_hud(wiz)
set_antag_hud(wiz, hud_version)
+2 -1
View File
@@ -249,7 +249,8 @@
// Otherwise, the user mob's machine var will be reset directly.
//
/proc/onclose(mob/user, windowid, atom/ref=null)
if(!user.client) return
if(!user.client)
return
var/param = "null"
if(ref)
param = "\ref[ref]"
+6
View File
@@ -24,6 +24,10 @@ Stands have a lot of procs which mimic mob procs. Rather than inserting hooks fo
## API
### Defines
1. `COMPONENT_INCOMPATIBLE` Return this from `/datum/component/Initialize` to have the component be deleted if it's applied to an incorrect type. `parent` must not be modified if this is to be returned.
### Vars
1. `/datum/var/list/datum_components` (private)
@@ -60,6 +64,7 @@ Stands have a lot of procs which mimic mob procs. Rather than inserting hooks fo
* Sends the `COMSIG_COMPONENT_ADDED` signal to the datum
* All components a datum owns are deleted with the datum
* Returns the component that was created. Or the old component in a dupe situation where `COMPONENT_DUPE_UNIQUE` was set
* If this tries to add an component to an incompatible type, the component will be deleted and the result will be `null`. This is very unperformant, try not to do it
1. `/datum/proc/LoadComponent(component_type(type), ...) -> datum/component` (public, final)
* Equivalent to calling `GetComponent(component_type)` where, if the result would be `null`, returns `AddComponent(component_type, ...)` instead
1. `/datum/proc/ComponentActivated(datum/component/C)` (abstract, async)
@@ -80,6 +85,7 @@ Stands have a lot of procs which mimic mob procs. Rather than inserting hooks fo
* Component does not exist in `parent`'s `datum_components` list yet, although `parent` is set and may be used
* Signals will not be recieved while this function is running
* Component may be deleted after this function completes without being attached
* Do not call `qdel(src)` from this function
1. `/datum/component/Destroy()` (virtual, no-sleep)
* Sends the `COMSIG_COMPONENT_REMOVING` signal to the parent datum if the `parent` isn't being qdeleted
* Properly removes the component from `parent` and cleans up references
+15 -1
View File
@@ -9,7 +9,10 @@
parent = P
var/list/arguments = args.Copy()
arguments.Cut(1, 2)
Initialize(arglist(arguments))
if(Initialize(arglist(arguments)) == COMPONENT_INCOMPATIBLE)
parent = null
qdel(src)
return
var/dm = dupe_mode
if(dm != COMPONENT_DUPE_ALLOWED)
@@ -217,3 +220,14 @@
C.OnTransfer(src)
C.parent = src
SendSignal(COMSIG_COMPONENT_ADDED, C)
/datum/proc/TransferComponents(datum/target)
var/list/dc = datum_components
if(!dc)
return
var/comps = dc[/datum/component]
if(islist(comps))
for(var/I in comps)
target.TakeComponent(I)
else
target.TakeComponent(comps)
@@ -49,7 +49,7 @@ Bonus
to_chat(M, "<span class='warning'>[pick("You hear a ringing in your ear.", "Your ears pop.")]</span>")
if(5)
if(power > 2)
var/obj/item/organ/ears/ears = M.getorganslot("ears")
var/obj/item/organ/ears/ears = M.getorganslot(ORGAN_SLOT_EARS)
if(istype(ears) && ears.ear_damage < UNHEALING_EAR_DAMAGE)
to_chat(M, "<span class='userdanger'>Your ears pop painfully and start bleeding!</span>")
ears.ear_damage = max(ears.ear_damage, UNHEALING_EAR_DAMAGE)
@@ -44,7 +44,7 @@ Bonus
if(!..())
return
var/mob/living/carbon/M = A.affected_mob
var/obj/item/organ/eyes/eyes = M.getorganslot("eye_sight")
var/obj/item/organ/eyes/eyes = M.getorganslot(ORGAN_SLOT_EYES)
if(istype(eyes))
switch(A.stage)
if(1, 2)
@@ -106,7 +106,7 @@ Bonus
if(!..())
return
var/mob/living/M = A.affected_mob
var/obj/item/organ/eyes/eyes = M.getorganslot("eye_sight")
var/obj/item/organ/eyes/eyes = M.getorganslot(ORGAN_SLOT_EYES)
if (!eyes)
return
switch(A.stage)
+4 -2
View File
@@ -95,8 +95,10 @@ STI KALY - blind
var/list/L = list()
for(var/turf/T in get_area_turfs(thearea.type))
if(T.z != affected_mob.z) continue
if(T.name == "space") continue
if(T.z != affected_mob.z)
continue
if(T.name == "space")
continue
if(!T.density)
var/clear = 1
for(var/obj/O in T)
+10
View File
@@ -1,4 +1,5 @@
#define EXPLOSION_THROW_SPEED 4
#define REEBE_HUGBOX_COEFFICIENT 0.5
GLOBAL_LIST_EMPTY(explosions)
//Against my better judgement, I will return the explosion datum
@@ -60,6 +61,13 @@ GLOBAL_LIST_EMPTY(explosions)
light_impact_range = min(GLOB.MAX_EX_LIGHT_RANGE, light_impact_range)
flash_range = min(GLOB.MAX_EX_FLASH_RANGE, flash_range)
flame_range = min(GLOB.MAX_EX_FLAME_RANGE, flame_range)
if(!ignorecap && epicenter.z == ZLEVEL_CITYOFCOGS)
devastation_range = min(GLOB.MAX_EX_DEVESTATION_RANGE * REEBE_HUGBOX_COEFFICIENT, devastation_range)
heavy_impact_range = min(GLOB.MAX_EX_HEAVY_RANGE * REEBE_HUGBOX_COEFFICIENT, heavy_impact_range)
light_impact_range = min(GLOB.MAX_EX_LIGHT_RANGE * REEBE_HUGBOX_COEFFICIENT, light_impact_range)
flash_range = min(GLOB.MAX_EX_FLASH_RANGE * REEBE_HUGBOX_COEFFICIENT, flash_range)
flame_range = min(GLOB.MAX_EX_FLAME_RANGE * REEBE_HUGBOX_COEFFICIENT, flame_range)
//DO NOT REMOVE THIS STOPLAG, IT BREAKS THINGS
//not sleeping causes us to ex_act() the thing that triggered the explosion
@@ -388,3 +396,5 @@ GLOBAL_LIST_EMPTY(explosions)
// 10 explosion power is a (1, 3, 6) explosion.
// 5 explosion power is a (0, 1, 3) explosion.
// 1 explosion power is a (0, 0, 1) explosion.
#undef REEBE_HUGBOX_COEFFICIENT
-1
View File
@@ -20,7 +20,6 @@ GLOBAL_LIST_INIT(huds, list(
ANTAG_HUD_SINTOUCHED = new/datum/atom_hud/antag/hidden(),
ANTAG_HUD_SOULLESS = new/datum/atom_hud/antag/hidden(),
ANTAG_HUD_CLOCKWORK = new/datum/atom_hud/antag(),
ANTAG_HUD_BORER = new/datum/atom_hud/antag(),
ANTAG_HUD_BROTHER = new/datum/atom_hud/antag/hidden(),
))
+16 -1
View File
@@ -6,4 +6,19 @@
end_sound = 'sound/machines/shower/shower_end.ogg'
volume = 25
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/datum/looping_sound/supermatter
mid_sounds = list('sound/machines/sm/supermatter1.ogg'=1,'sound/machines/sm/supermatter2.ogg'=1,'sound/machines/sm/supermatter3.ogg'=1)
mid_length = 6
volume = 1
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/datum/looping_sound/generator
start_sound = 'sound/machines/generator/generator_start.ogg'
start_length = 4
mid_sounds = list('sound/machines/generator/generator_mid1.ogg'=1, 'sound/machines/generator/generator_mid2.ogg'=1, 'sound/machines/generator/generator_mid3.ogg'=1)
mid_length = 4
end_sound = 'sound/machines/generator/generator_end.ogg'
volume = 40
+6 -3
View File
@@ -358,9 +358,12 @@
for (var/obj/O in oview(1, A))
if (O.density == 1)
if (O == A) continue
if (O == D) continue
if (O.opacity) continue
if (O == A)
continue
if (O == D)
continue
if (O.opacity)
continue
else
surface = O
ST = get_turf(O)
+15 -8
View File
@@ -64,6 +64,7 @@
var/mob/living/enslaved_to //If this mind's master is another mob (i.e. adamantine golems)
var/datum/language_holder/language_holder
var/unconvertable = FALSE
var/late_joiner = FALSE
/datum/mind/New(var/key)
src.key = key
@@ -232,8 +233,9 @@
/datum/mind/proc/remove_rev()
var/datum/antagonist/rev/rev = has_antag_datum(/datum/antagonist/rev)
remove_antag_datum(rev.type)
special_role = null
if(rev)
remove_antag_datum(rev.type)
special_role = null
/datum/mind/proc/remove_antag_equip()
var/list/Mob_Contents = current.get_contents()
@@ -299,7 +301,8 @@
uplink_loc = R
if (!uplink_loc)
if(!silent) to_chat(traitor_mob, "Unfortunately, [employer] wasn't able to get you an Uplink.")
if(!silent)
to_chat(traitor_mob, "Unfortunately, [employer] wasn't able to get you an Uplink.")
. = 0
else
var/obj/item/device/uplink/U = new(uplink_loc)
@@ -309,19 +312,22 @@
if(uplink_loc == R)
R.traitor_frequency = sanitize_frequency(rand(MIN_FREQ, MAX_FREQ))
if(!silent) to_chat(traitor_mob, "[employer] has cunningly disguised a Syndicate Uplink as your [R.name]. Simply dial the frequency [format_frequency(R.traitor_frequency)] to unlock its hidden features.")
if(!silent)
to_chat(traitor_mob, "[employer] has cunningly disguised a Syndicate Uplink as your [R.name]. Simply dial the frequency [format_frequency(R.traitor_frequency)] to unlock its hidden features.")
traitor_mob.mind.store_memory("<B>Radio Frequency:</B> [format_frequency(R.traitor_frequency)] ([R.name]).")
else if(uplink_loc == PDA)
PDA.lock_code = "[rand(100,999)] [pick(GLOB.phonetic_alphabet)]"
if(!silent) to_chat(traitor_mob, "[employer] has cunningly disguised a Syndicate Uplink as your [PDA.name]. Simply enter the code \"[PDA.lock_code]\" into the ringtone select to unlock its hidden features.")
if(!silent)
to_chat(traitor_mob, "[employer] has cunningly disguised a Syndicate Uplink as your [PDA.name]. Simply enter the code \"[PDA.lock_code]\" into the ringtone select to unlock its hidden features.")
traitor_mob.mind.store_memory("<B>Uplink Passcode:</B> [PDA.lock_code] ([PDA.name]).")
else if(uplink_loc == P)
P.traitor_unlock_degrees = rand(1, 360)
if(!silent) to_chat(traitor_mob, "[employer] has cunningly disguised a Syndicate Uplink as your [P.name]. Simply twist the top of the pen [P.traitor_unlock_degrees] from its starting position to unlock its hidden features.")
if(!silent)
to_chat(traitor_mob, "[employer] has cunningly disguised a Syndicate Uplink as your [P.name]. Simply twist the top of the pen [P.traitor_unlock_degrees] from its starting position to unlock its hidden features.")
traitor_mob.mind.store_memory("<B>Uplink Degrees:</B> [P.traitor_unlock_degrees] ([P.name]).")
//Link a new mobs mind to the creator of said mob. They will join any team they are currently on, and will only switch teams when their creator does.
@@ -1353,8 +1359,9 @@
/datum/mind/proc/make_Traitor()
if(!(has_antag_datum(ANTAG_DATUM_TRAITOR)))
var/datum/antagonist/traitor/traitordatum = add_antag_datum(ANTAG_DATUM_TRAITOR)
return traitordatum
var/datum/antagonist/traitor/T = new(src)
T.should_specialise = TRUE
add_antag_datum(T)
/datum/mind/proc/make_Nuke(turf/spawnloc, nuke_code, leader=0, telecrystals = TRUE)
+6 -1
View File
@@ -89,7 +89,12 @@
continue
thing.rad_act(strength)
var/static/list/blacklisted = typecacheof(list(/turf, /mob, /obj/structure/cable, /obj/machinery/atmospherics))
var/static/list/blacklisted = typecacheof(list( //These types will never be contaminated
/turf,
/mob,
/obj/structure/cable,
/obj/machinery/atmospherics
))
if(!can_contaminate || blacklisted[thing.type])
continue
if(prob((strength-RAD_MINIMUM_CONTAMINATION) * RAD_CONTAMINATION_CHANCE_COEFFICIENT * min(1/(steps*range_modifier), 1))) // Only stronk rads get to have little baby rads
+6 -2
View File
@@ -23,8 +23,12 @@
for(var/spawner_obj in GLOB.mob_spawners[spawner])
this["refs"] += "\ref[spawner_obj]"
if(!this["desc"])
var/obj/effect/mob_spawn/MS = spawner_obj
this["desc"] = MS.flavour_text
if(istype(spawner_obj, /obj/effect/mob_spawn))
var/obj/effect/mob_spawn/MS = spawner_obj
this["desc"] = MS.flavour_text
else
var/obj/O = spawner_obj
this["desc"] = O.desc
this["amount_left"] = LAZYLEN(GLOB.mob_spawners[spawner])
data["spawners"] += list(this)