Fixes clockwork sigil candidate runtime, cleans up some jobban checks with defines (#5304)
This commit is contained in:
committed by
Poojawa
parent
03b33075e5
commit
9e229691cc
@@ -2,7 +2,7 @@
|
||||
throw_speed = 1
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
var/used = 0
|
||||
var/used = FALSE
|
||||
|
||||
/obj/item/antag_spawner/proc/spawn_antag(client/C, turf/T, kind = "", datum/mind/user)
|
||||
return
|
||||
@@ -57,13 +57,13 @@
|
||||
to_chat(H, "You already used this contract!")
|
||||
return
|
||||
var/list/candidates = pollCandidatesForMob("Do you want to play as a wizard's [href_list["school"]] apprentice?", ROLE_WIZARD, null, ROLE_WIZARD, 150, src)
|
||||
if(candidates.len)
|
||||
if(LAZYLEN(candidates))
|
||||
if(used)
|
||||
to_chat(H, "You already used this contract!")
|
||||
return
|
||||
used = 1
|
||||
var/mob/dead/observer/theghost = pick(candidates)
|
||||
spawn_antag(theghost.client, get_turf(src), href_list["school"],H.mind)
|
||||
used = TRUE
|
||||
var/client/C = pick(candidates)
|
||||
spawn_antag(C, get_turf(src), href_list["school"],H.mind)
|
||||
else
|
||||
to_chat(H, "Unable to reach your apprentice! You can either attack the spellbook with the contract to refund your points, or wait and try again later.")
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
C.prefs.copy_to(M)
|
||||
M.key = C.key
|
||||
var/datum/mind/app_mind = M.mind
|
||||
|
||||
|
||||
var/datum/antagonist/wizard/apprentice/app = new()
|
||||
app.master = user
|
||||
app.school = kind
|
||||
@@ -120,12 +120,12 @@
|
||||
|
||||
to_chat(user, "<span class='notice'>You activate [src] and wait for confirmation.</span>")
|
||||
var/list/nuke_candidates = pollGhostCandidates("Do you want to play as a syndicate [borg_to_spawn ? "[lowertext(borg_to_spawn)] cyborg":"operative"]?", ROLE_OPERATIVE, null, ROLE_OPERATIVE, 150, POLL_IGNORE_SYNDICATE)
|
||||
if(nuke_candidates.len)
|
||||
if(LAZYLEN(nuke_candidates))
|
||||
if(!(check_usability(user)))
|
||||
return
|
||||
used = TRUE
|
||||
var/mob/dead/observer/theghost = pick(nuke_candidates)
|
||||
spawn_antag(theghost.client, get_turf(src), "syndieborg", user.mind)
|
||||
var/client/C = pick(nuke_candidates)
|
||||
spawn_antag(C, get_turf(src), "syndieborg", user.mind)
|
||||
do_sparks(4, TRUE, src)
|
||||
qdel(src)
|
||||
else
|
||||
@@ -187,7 +187,7 @@
|
||||
R.real_name = R.name
|
||||
|
||||
R.key = C.key
|
||||
|
||||
|
||||
var/datum/antagonist/nukeop/new_borg = new()
|
||||
new_borg.send_to_spawnpoint = FALSE
|
||||
R.mind.add_antag_datum(new_borg,creator_op.nuke_team)
|
||||
@@ -213,13 +213,13 @@
|
||||
return
|
||||
if(used)
|
||||
return
|
||||
var/list/demon_candidates = pollCandidatesForMob("Do you want to play as a [initial(demon_type.name)]?", null, null, ROLE_ALIEN, 50, src)
|
||||
if(demon_candidates.len)
|
||||
var/list/candidates = pollCandidatesForMob("Do you want to play as a [initial(demon_type.name)]?", ROLE_ALIEN, null, ROLE_ALIEN, 50, src)
|
||||
if(LAZYLEN(candidates))
|
||||
if(used)
|
||||
return
|
||||
used = 1
|
||||
var/mob/dead/observer/theghost = pick(demon_candidates)
|
||||
spawn_antag(theghost.client, get_turf(src), initial(demon_type.name),user.mind)
|
||||
used = TRUE
|
||||
var/client/C = pick(candidates)
|
||||
spawn_antag(C, get_turf(src), initial(demon_type.name),user.mind)
|
||||
to_chat(user, shatter_msg)
|
||||
to_chat(user, veil_msg)
|
||||
playsound(user.loc, 'sound/effects/glassbr1.ogg', 100, 1)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
/mob/living/simple_animal/hostile/blob
|
||||
icon = 'icons/mob/blob.dmi'
|
||||
pass_flags = PASSBLOB
|
||||
faction = list("blob")
|
||||
faction = list(ROLE_BLOB)
|
||||
bubble_icon = "blob"
|
||||
speak_emote = null //so we use verb_yell/verb_say/etc
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
|
||||
@@ -18,7 +18,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
|
||||
layer = FLY_LAYER
|
||||
|
||||
pass_flags = PASSBLOB
|
||||
faction = list("blob")
|
||||
faction = list(ROLE_BLOB)
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
var/obj/structure/blob/core/blob_core = null // The blob overmind's core
|
||||
var/blob_points = 0
|
||||
@@ -115,7 +115,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
|
||||
if(!Ablob.blob_allowed)
|
||||
continue
|
||||
|
||||
if(!("blob" in L.faction))
|
||||
if(!(ROLE_BLOB in L.faction))
|
||||
playsound(L, 'sound/effects/splat.ogg', 50, 1)
|
||||
L.death()
|
||||
new/mob/living/simple_animal/hostile/blob/blobspore(T)
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
if(!placement_override)
|
||||
if(!pop_override)
|
||||
for(var/mob/living/M in range(7, src))
|
||||
if("blob" in M.faction)
|
||||
if(ROLE_BLOB in M.faction)
|
||||
continue
|
||||
if(M.client)
|
||||
to_chat(src, "<span class='warning'>There is someone too close to place your blob core!</span>")
|
||||
return 0
|
||||
for(var/mob/living/M in view(13, src))
|
||||
if("blob" in M.faction)
|
||||
if(ROLE_BLOB in M.faction)
|
||||
continue
|
||||
if(M.client)
|
||||
to_chat(src, "<span class='warning'>Someone could see your blob core from here!</span>")
|
||||
@@ -157,7 +157,7 @@
|
||||
return
|
||||
|
||||
var/list/mob/dead/observer/candidates = pollGhostCandidates("Do you want to play as a [blob_reagent_datum.name] blobbernaut?", ROLE_BLOB, null, ROLE_BLOB, 50) //players must answer rapidly
|
||||
if(candidates.len) //if we got at least one candidate, they're a blobbernaut now.
|
||||
if(LAZYLEN(candidates)) //if we got at least one candidate, they're a blobbernaut now.
|
||||
B.max_integrity = initial(B.max_integrity) * 0.25 //factories that produced a blobbernaut have much lower health
|
||||
B.obj_integrity = min(B.obj_integrity, B.max_integrity)
|
||||
B.update_icon()
|
||||
@@ -251,7 +251,7 @@
|
||||
if(can_buy(4))
|
||||
var/attacksuccess = FALSE
|
||||
for(var/mob/living/L in T)
|
||||
if("blob" in L.faction) //no friendly/dead fire
|
||||
if(ROLE_BLOB in L.faction) //no friendly/dead fire
|
||||
continue
|
||||
if(L.stat != DEAD)
|
||||
attacksuccess = TRUE
|
||||
|
||||
@@ -250,7 +250,7 @@
|
||||
to_chat(user, "<b>Effects:</b> <span class='notice'>[scannerreport()]</span>")
|
||||
|
||||
/obj/structure/blob/attack_animal(mob/living/simple_animal/M)
|
||||
if("blob" in M.faction) //sorry, but you can't kill the blob as a blobbernaut
|
||||
if(ROLE_BLOB in M.faction) //sorry, but you can't kill the blob as a blobbernaut
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
@@ -337,12 +337,12 @@
|
||||
if(!L.client || L.client.is_afk())
|
||||
set waitfor = FALSE
|
||||
var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as a [L.name], an inactive clock cultist?", ROLE_SERVANT_OF_RATVAR, null, ROLE_SERVANT_OF_RATVAR, 50, L)
|
||||
var/mob/dead/observer/theghost = null
|
||||
if(candidates.len)
|
||||
if(LAZYLEN(candidates))
|
||||
var/client/C = pick(candidates)
|
||||
to_chat(L, "<span class='userdanger'>Your physical form has been taken over by another soul due to your inactivity! Ahelp if you wish to regain your form!</span>")
|
||||
message_admins("[key_name_admin(theghost)] has taken control of ([key_name_admin(L)]) to replace an inactive clock cultist.")
|
||||
message_admins("[key_name_admin(C)] has taken control of ([key_name_admin(L)]) to replace an inactive clock cultist.")
|
||||
L.ghostize(0)
|
||||
L.key = theghost.key
|
||||
L.key = C.key
|
||||
var/obj/effect/temp_visual/ratvar/sigil/vitality/V = new /obj/effect/temp_visual/ratvar/sigil/vitality(get_turf(src))
|
||||
animate(V, alpha = 0, transform = matrix()*2, time = 8)
|
||||
playsound(L, 'sound/magic/staff_healing.ogg', 50, 1)
|
||||
|
||||
@@ -122,9 +122,9 @@
|
||||
else if(eminence_nominee == "ghosts")
|
||||
kingmaking = TRUE
|
||||
hierophant_message("<span class='brass'><b>The eminence spire is now selecting a ghost to be the Eminence...</b></span>")
|
||||
var/list/candidates = pollGhostCandidates("Would you like to play as the servants' Eminence?", "Servant of Ratvar", null, ROLE_SERVANT_OF_RATVAR, poll_time = 100)
|
||||
var/list/candidates = pollGhostCandidates("Would you like to play as the servants' Eminence?", ROLE_SERVANT_OF_RATVAR, null, ROLE_SERVANT_OF_RATVAR, poll_time = 100)
|
||||
kingmaking = FALSE
|
||||
if(!candidates.len)
|
||||
if(!LAZYLEN(candidates))
|
||||
for(var/mob/M in servants_and_ghosts())
|
||||
M.playsound_local(M, 'sound/machines/clockcult/integration_cog_install.ogg', 50, FALSE)
|
||||
hierophant_message("<span class='brass'><b>No ghosts accepted the offer!</b> The eminence spire has been reset.</span>")
|
||||
|
||||
@@ -268,7 +268,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
"<span class='cultlarge'><i>AAAAAAAAAAAAAA-</i></span>")
|
||||
SSticker.mode.add_cultist(convertee.mind, 1)
|
||||
new /obj/item/melee/cultblade/dagger(get_turf(src))
|
||||
convertee.mind.special_role = "Cultist"
|
||||
convertee.mind.special_role = ROLE_CULTIST
|
||||
to_chat(convertee, "<span class='cult italic'><b>Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible, truth. The veil of reality has been ripped away \
|
||||
and something evil takes root.</b></span>")
|
||||
to_chat(convertee, "<span class='cult italic'><b>Assist your new compatriots in their dark dealings. Your goal is theirs, and theirs is yours. You serve the Geometer above all else. Bring it back.\
|
||||
@@ -576,13 +576,12 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
if(!mob_to_revive.client || mob_to_revive.client.is_afk())
|
||||
set waitfor = FALSE
|
||||
var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as a [mob_to_revive.name], an inactive blood cultist?", ROLE_CULTIST, null, ROLE_CULTIST, 50, mob_to_revive)
|
||||
var/mob/dead/observer/theghost = null
|
||||
if(candidates.len)
|
||||
theghost = pick(candidates)
|
||||
if(LAZYLEN(candidates))
|
||||
var/client/C = pick(candidates)
|
||||
to_chat(mob_to_revive.mind, "Your physical form has been taken over by another soul due to your inactivity! Ahelp if you wish to regain your form.")
|
||||
message_admins("[key_name_admin(theghost)] has taken control of ([key_name_admin(mob_to_revive)]) to replace an AFK player.")
|
||||
message_admins("[key_name_admin(C)] has taken control of ([key_name_admin(mob_to_revive)]) to replace an AFK player.")
|
||||
mob_to_revive.ghostize(0)
|
||||
mob_to_revive.key = theghost.key
|
||||
mob_to_revive.key = C.key
|
||||
else
|
||||
fail_invoke()
|
||||
return
|
||||
@@ -1074,4 +1073,4 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
var/obj/O = target.get_item_by_slot(slot_glasses)
|
||||
if(istype(O, /obj/item/clothing/glasses/hud/security))
|
||||
var/datum/atom_hud/AH = GLOB.huds[DATA_HUD_SECURITY_ADVANCED]
|
||||
AH.add_hud_to(target)
|
||||
AH.add_hud_to(target)
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
role_name = "morphling"
|
||||
|
||||
/datum/round_event/ghost_role/morph/spawn_role()
|
||||
var/list/candidates = get_candidates("alien", null, ROLE_ALIEN)
|
||||
var/list/candidates = get_candidates(ROLE_ALIEN, null, ROLE_ALIEN)
|
||||
if(!candidates.len)
|
||||
return NOT_ENOUGH_PLAYERS
|
||||
|
||||
|
||||
@@ -84,8 +84,8 @@
|
||||
objective2.owner = mind
|
||||
mind.objectives += objective2
|
||||
to_chat(src, "<b>Objective #2</b>: [objective2.explanation_text]")
|
||||
mind.assigned_role = "revenant"
|
||||
mind.special_role = "Revenant"
|
||||
mind.assigned_role = ROLE_REVENANT
|
||||
mind.special_role = ROLE_REVENANT
|
||||
mind.add_antag_datum(/datum/antagonist/auto_custom)
|
||||
AddSpell(new /obj/effect/proc_holder/spell/targeted/night_vision/revenant(null))
|
||||
AddSpell(new /obj/effect/proc_holder/spell/targeted/revenant_transmit(null))
|
||||
@@ -382,8 +382,8 @@
|
||||
key_of_revenant = client_to_revive.key
|
||||
if(!key_of_revenant)
|
||||
message_admins("The new revenant's old client either could not be found or is in a new, living mob - grabbing a random candidate instead...")
|
||||
var/list/candidates = pollCandidatesForMob("Do you want to be [revenant.name] (reforming)?", "revenant", null, ROLE_REVENANT, 50, revenant)
|
||||
if(!candidates.len)
|
||||
var/list/candidates = pollCandidatesForMob("Do you want to be [revenant.name] (reforming)?", ROLE_REVENANT, null, ROLE_REVENANT, 50, revenant)
|
||||
if(!LAZYLEN(candidates))
|
||||
qdel(revenant)
|
||||
message_admins("No candidates were found for the new revenant. Oh well!")
|
||||
inert = TRUE
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
message_admins("Event attempted to spawn a revenant, but there were only [deadMobs]/[REVENANT_SPAWN_THRESHOLD] dead mobs.")
|
||||
return WAITING_FOR_SOMETHING
|
||||
|
||||
var/list/candidates = get_candidates("revenant", null, ROLE_REVENANT)
|
||||
var/list/candidates = get_candidates(ROLE_REVENANT, null, ROLE_REVENANT)
|
||||
if(!candidates.len)
|
||||
return NOT_ENOUGH_PLAYERS
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
role_name = "slaughter demon"
|
||||
|
||||
/datum/round_event/ghost_role/slaughter/spawn_role()
|
||||
var/list/candidates = get_candidates("alien", null, ROLE_ALIEN)
|
||||
var/list/candidates = get_candidates(ROLE_ALIEN, null, ROLE_ALIEN)
|
||||
if(!candidates.len)
|
||||
return NOT_ENOUGH_PLAYERS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user