Fixes clockwork sigil candidate runtime, cleans up some jobban checks with defines (#5304)

This commit is contained in:
CitadelStationBot
2018-02-05 04:23:09 -06:00
committed by Poojawa
parent 03b33075e5
commit 9e229691cc
73 changed files with 196 additions and 214 deletions
+2 -2
View File
@@ -48,7 +48,7 @@ GLOBAL_VAR(changeling_team_objective_type) //If this is not null, we hand our th
var/datum/mind/changeling = pick(antag_candidates)
antag_candidates -= changeling
changelings += changeling
changeling.special_role = "Changeling"
changeling.special_role = ROLE_CHANGELING
changeling.restricted_roles = restricted_jobs
return 1
else
@@ -82,7 +82,7 @@ GLOBAL_VAR(changeling_team_objective_type) //If this is not null, we hand our th
return
if(changelings.len <= (changelingcap - 2) || prob(100 - (csc * 2)))
if(ROLE_CHANGELING in character.client.prefs.be_special)
if(!jobban_isbanned(character, ROLE_CHANGELING) && !jobban_isbanned(character, "Syndicate"))
if(!jobban_isbanned(character, ROLE_CHANGELING) && !jobban_isbanned(character, ROLE_SYNDICATE))
if(age_check(character.client))
if(!(character.job in restricted_jobs))
character.mind.make_Changling()
@@ -49,7 +49,7 @@
var/datum/mind/changeling = pick(possible_changelings)
antag_candidates -= changeling
possible_changelings -= changeling
changeling.special_role = "Changeling"
changeling.special_role = ROLE_CHANGELING
changelings += changeling
changeling.restricted_roles = restricted_jobs
return ..()
@@ -69,7 +69,7 @@
return
if(changelings.len <= (changelingcap - 2) || prob(100 / (csc * 4)))
if(ROLE_CHANGELING in character.client.prefs.be_special)
if(!jobban_isbanned(character, ROLE_CHANGELING) && !jobban_isbanned(character, "Syndicate"))
if(!jobban_isbanned(character, ROLE_CHANGELING) && !jobban_isbanned(character, ROLE_SYNDICATE))
if(age_check(character.client))
if(!(character.job in restricted_jobs))
character.mind.make_Changling()
+2 -2
View File
@@ -158,8 +158,8 @@ Credit where due:
var/datum/mind/servant = pick(antag_candidates)
servants_to_serve += servant
antag_candidates -= servant
servant.assigned_role = "Servant of Ratvar"
servant.special_role = "Servant of Ratvar"
servant.assigned_role = ROLE_SERVANT_OF_RATVAR
servant.special_role = ROLE_SERVANT_OF_RATVAR
starter_servants--
ark_time = 30 + round((roundstart_player_count / 5)) //In minutes, how long the Ark will wait before activation
ark_time = min(ark_time, 35) //35 minute maximum for the activation timer
+1 -1
View File
@@ -77,7 +77,7 @@
var/datum/mind/cultist = pick(antag_candidates)
antag_candidates -= cultist
cultists_to_cult += cultist
cultist.special_role = "Cultist"
cultist.special_role = ROLE_CULTIST
cultist.restricted_roles = restricted_jobs
log_game("[cultist.key] (ckey) has been selected as a cultist")
+2 -2
View File
@@ -301,7 +301,7 @@
for(var/mob/dead/new_player/player in players)
if(player.client && player.ready == PLAYER_READY_TO_PLAY)
if(role in player.client.prefs.be_special)
if(!jobban_isbanned(player, "Syndicate") && !jobban_isbanned(player, role)) //Nodrak/Carn: Antag Job-bans
if(!jobban_isbanned(player, ROLE_SYNDICATE) && !jobban_isbanned(player, role)) //Nodrak/Carn: Antag Job-bans
if(age_check(player.client)) //Must be older than the minimum age
candidates += player.mind // Get a list of all the people who want to be the antagonist for this round
@@ -315,7 +315,7 @@
for(var/mob/dead/new_player/player in players)
if(player.client && player.ready == PLAYER_READY_TO_PLAY)
if(!(role in player.client.prefs.be_special)) // We don't have enough people who want to be antagonist, make a separate list of people who don't want to be one
if(!jobban_isbanned(player, "Syndicate") && !jobban_isbanned(player, role)) //Nodrak/Carn: Antag Job-bans
if(!jobban_isbanned(player, ROLE_SYNDICATE) && !jobban_isbanned(player, role)) //Nodrak/Carn: Antag Job-bans
drafted += player.mind
if(restricted_jobs)
+1 -1
View File
@@ -154,7 +154,7 @@
W.implant(H)
var/obj/item/implant/explosive/E = new/obj/item/implant/explosive(H)
E.implant(H)
H.faction |= "syndicate"
H.faction |= ROLE_SYNDICATE
H.update_icons()
/datum/outfit/syndicate/full
+1 -1
View File
@@ -79,7 +79,7 @@
return
if((SSticker.mode.traitors.len + pre_traitors.len) <= (traitorcap - 2) || prob(100 / (tsc * 2)))
if(ROLE_TRAITOR in character.client.prefs.be_special)
if(!jobban_isbanned(character, ROLE_TRAITOR) && !jobban_isbanned(character, "Syndicate"))
if(!jobban_isbanned(character, ROLE_TRAITOR) && !jobban_isbanned(character, ROLE_SYNDICATE))
if(age_check(character.client))
if(!(character.job in restricted_jobs))
add_latejoin_traitor(character.mind)
+2 -2
View File
@@ -21,8 +21,8 @@
/datum/game_mode/wizard/pre_setup()
var/datum/mind/wizard = pick(antag_candidates)
wizards += wizard
wizard.assigned_role = "Wizard"
wizard.special_role = "Wizard"
wizard.assigned_role = ROLE_WIZARD
wizard.special_role = ROLE_WIZARD
log_game("[wizard.key] (ckey) has been selected as a Wizard") //TODO: Move these to base antag datum
if(GLOB.wizardstart.len == 0)
to_chat(wizard.current, "<span class='boldannounce'>A starting location for you could not be found, please report this bug!</span>")
@@ -570,7 +570,7 @@
stun_projectile_sound = 'sound/weapons/gunshot.ogg'
icon_state = "syndie_off"
base_icon_state = "syndie"
faction = "syndicate"
faction = ROLE_SYNDICATE
emp_vunerable = 0
desc = "A ballistic machine gun auto-turret."
+20 -26
View File
@@ -125,23 +125,29 @@
else
qdel(src) //How?
/obj/item/grenade/plastic/proc/shout_syndicate_crap(mob/M)
if(!M)
return
var/message_say = "FOR NO RAISIN!"
if(M.mind)
var/datum/mind/UM = M
if(UM.has_antag_datum(/datum/antagonist/nukeop) || UM.has_antag_datum(/datum/antagonist/traitor))
message_say = "FOR THE SYNDICATE!"
else if(UM.has_antag_datum(/datum/antagonist/changeling))
message_say = "FOR THE HIVE!"
else if(UM.has_antag_datum(/datum/antagonist/cult))
message_say = "FOR NAR-SIE!"
else if(UM.has_antag_datum(/datum/antagonist/clockcult))
message_say = "FOR RATVAR!"
else if(UM.has_antag_datum(/datum/antagonist/rev))
message_say = "VIVA LA REVOLUTION!"
M.say(message_say)
/obj/item/grenade/plastic/suicide_act(mob/user)
message_admins("[ADMIN_LOOKUPFLW(user)] suicided with [src] at [ADMIN_COORDJMP(user)]",0,1)
log_game("[key_name(user)] suicided with [src] at [COORD(user)]")
user.visible_message("<span class='suicide'>[user] activates [src] and holds it above [user.p_their()] head! It looks like [user.p_theyre()] going out with a bang!</span>")
var/message_say = "FOR NO RAISIN!"
if(user.mind)
if(user.mind.special_role)
var/role = lowertext(user.mind.special_role)
if(role == "traitor" || role == "syndicate")
message_say = "FOR THE SYNDICATE!"
else if(role == "changeling")
message_say = "FOR THE HIVE!"
else if(role == "cultist")
message_say = "FOR NAR-SIE!"
else if(is_revolutionary(user))
message_say = "VIVA LA REVOLUTION!"
user.say(message_say)
shout_syndicate_crap(user)
explosion(user,0,2,0) //Cheap explosion imitation because putting prime() here causes runtimes
user.gib(1, 1)
qdel(src)
@@ -176,19 +182,7 @@
/obj/item/grenade/plastic/c4/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] activates the [src.name] and holds it above [user.p_their()] head! It looks like [user.p_theyre()] going out with a bang!</span>")
var/message_say = "FOR NO RAISIN!"
if(user.mind)
if(user.mind.special_role)
var/role = lowertext(user.mind.special_role)
if(role == "traitor" || role == "syndicate")
message_say = "FOR THE SYNDICATE!"
else if(role == "changeling")
message_say = "FOR THE HIVE!"
else if(role == "cultist")
message_say = "FOR NAR-SIE!"
else if(is_revolutionary(user))
message_say = "VIVA LA REVOLUTION!"
user.say(message_say)
shout_syndicate_crap(user)
target = user
message_admins("[ADMIN_LOOKUPFLW(user)] suicided with [name] at [ADMIN_COORDJMP(src)]",0,1)
message_admins("[key_name(user)] suicided with [name] at ([x],[y],[z])")
+2 -3
View File
@@ -241,14 +241,13 @@
possessed = TRUE
var/list/mob/dead/observer/candidates = pollGhostCandidates("Do you want to play as the spirit of [user.real_name]'s blade?", ROLE_PAI, null, FALSE, 100, POLL_IGNORE_POSSESSED_BLADE)
var/mob/dead/observer/theghost = null
if(LAZYLEN(candidates))
theghost = pick(candidates)
var/client/C = pick(candidates)
var/mob/living/simple_animal/shade/S = new(src)
S.real_name = name
S.name = name
S.ckey = theghost.ckey
S.ckey = C.ckey
S.status_flags |= GODMODE
S.language_holder = user.language_holder.copy(S)
var/input = stripped_input(S,"What are you named?", ,"", MAX_NAME_LEN)
@@ -411,7 +411,7 @@
id = /obj/item/card/id
/datum/outfit/syndicate_empty/post_equip(mob/living/carbon/human/H)
H.faction |= "syndicate"
H.faction |= ROLE_SYNDICATE
/obj/effect/mob_spawn/human/syndicate/battlecruiser
name = "Syndicate Battlecruiser Ship Operative"