Skip to content

Commit

Permalink
No Voxs!? (TauCetiStation#9173)
Browse files Browse the repository at this point in the history
  • Loading branch information
KIBORG04 authored May 17, 2022
1 parent b70e716 commit b3f14d9
Show file tree
Hide file tree
Showing 29 changed files with 213 additions and 238 deletions.
1 change: 0 additions & 1 deletion code/__DEFINES/role_preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ var/global/list/special_roles_ignore_question = list(
ROLE_CULTIST = list(IGNORE_NARSIE_SLAVE),
ROLE_BLOB = list(IGNORE_EVENT_BLOB),
ROLE_NINJA = null,
ROLE_RAIDER = null,
ROLE_SHADOWLING = null,
ROLE_ABDUCTOR = null,
ROLE_FAMILIES = null,
Expand Down
1 change: 0 additions & 1 deletion code/_globalvars/lists/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ var/global/list/roles_ingame_minute_unlock = list(
ROLE_TRAITOR = 720,
ROLE_OPERATIVE = 2160,
ROLE_CHANGELING = 2160,
ROLE_RAIDER = 4320,
ROLE_ALIEN = 1440,
ROLE_WIZARD = 2880,
ROLE_ERT = 1440,
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/mapping.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ var/global/list/blobstart = list()
var/global/list/ninjastart = list()
var/global/list/copsstart = list()
var/global/list/dealerstart = list()
var/global/list/heiststart = list()
var/global/list/eorgwarp = list()
var/global/list/cardinal = list(NORTH, SOUTH, EAST, WEST)
var/global/list/cardinalz = list(NORTH, SOUTH, EAST, WEST, UP, DOWN)
Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/logout_spawner.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
del_timer()
return ..()

/datum/component/logout_spawner/proc/logout(logout_reason)
/datum/component/logout_spawner/proc/logout(datum/source, logout_reason)
SIGNAL_HANDLER
var/mob/M = parent

Expand Down
18 changes: 3 additions & 15 deletions code/datums/mind.dm
Original file line number Diff line number Diff line change
Expand Up @@ -552,13 +552,7 @@
candidates = shuffle(candidates)

if(fac_type)
var/datum/faction/FF = find_faction_by_type(fac_type)
if(!FF)
FF = SSticker.mode.CreateFaction(fac_type, FALSE, TRUE)
FF.forgeObjectives()
if(!FF)
return FALSE

var/datum/faction/FF = create_uniq_faction(fac_type)
while(count > 0 && candidates.len)
var/mob/M = pick(candidates)
candidates -= M
Expand Down Expand Up @@ -670,10 +664,7 @@
mind.assigned_role = "Alien"

if(!isalien(src))
var/datum/faction/infestation/I = find_faction_by_type(/datum/faction/infestation)
if(!I)
I = SSticker.mode.CreateFaction(/datum/faction/infestation)
I.forgeObjectives()
var/datum/faction/infestation/I = create_uniq_faction(/datum/faction/infestation)
add_faction_member(I, src, TRUE)

//XENO HUMANOID
Expand Down Expand Up @@ -759,8 +750,5 @@
/mob/living/simple_animal/hostile/mimic/prophunt/mind_initialize()
..()

var/datum/faction/infestation/I = find_faction_by_type(/datum/faction/props)
if(!I)
I = SSticker.mode.CreateFaction(/datum/faction/props)
I.forgeObjectives()
var/datum/faction/infestation/I = create_uniq_faction(/datum/faction/props)
add_faction_member(I, src, TRUE)
65 changes: 57 additions & 8 deletions code/datums/spawners_menu/spawners.dm
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,7 @@ var/global/list/datum/spawners_cooldown = list()
cop.key = C.key

//Give antag datum
var/datum/faction/cops/faction = find_faction_by_type(/datum/faction/cops)
if(!faction)
faction = SSticker.mode.CreateFaction(/datum/faction/cops)
var/datum/faction/cops/faction = create_uniq_faction(/datum/faction/cops)

faction.roletype = roletype
add_faction_member(faction, cop, TRUE, TRUE)
Expand Down Expand Up @@ -333,9 +331,7 @@ var/global/list/datum/spawners_cooldown = list()
var/mob/living/carbon/human/new_ninja = create_space_ninja(pick(ninjastart.len ? ninjastart : latejoin))
new_ninja.key = ghost.key

var/datum/faction/ninja/N = find_faction_by_type(/datum/faction/ninja)
if(!N)
N = SSticker.mode.CreateFaction(/datum/faction/ninja)
var/datum/faction/ninja/N = create_uniq_faction(/datum/faction/ninja)
add_faction_member(N, new_ninja, FALSE)

set_ninja_objectives(new_ninja)
Expand Down Expand Up @@ -497,7 +493,7 @@ var/global/list/datum/spawners_cooldown = list()
/datum/spawner/living/podman
name = "Подмена"
id = "podman"
desc = "Подмена умерла, да здраствует подмена."
desc = "Подмена умерла, да здравствует подмена."
wiki_ref = "Podmen"

var/replicant_memory
Expand Down Expand Up @@ -614,9 +610,17 @@ var/global/list/datum/spawners_cooldown = list()

/datum/spawner/living/rat/spawn_ghost(mob/dead/observer/ghost)
. = ..()
to_chat(mob, "<B>Эта посудина теперь ваш новый дом, похазяйничайте в нём.</B>")
to_chat(mob, "<B>Эта посудина теперь ваш новый дом, похозяйничайте в нём.</B>")
to_chat(mob, "<B>(Вы можете грызть провода и лампочки).</B>")

/*
* Heist
*/
/datum/spawner/living/vox
name = "Вокс-Налётчик"
desc = "Воксы-налётчики это представители расы Воксов, птице-подобных гуманоидов, дышащих азотом. Прибыли на станцию что бы украсть что-нибудь ценное."
wiki_ref = "Vox_Raider"

/datum/spawner/spy
name = "Агент Прослушки"
id = "spy"
Expand Down Expand Up @@ -654,3 +658,48 @@ var/global/list/datum/spawners_cooldown = list()
/datum/spawner/spy/jump(mob/dead/observer/ghost)
var/jump_to = pick(espionageagent_start)
ghost.forceMove(get_turf(jump_to))

/datum/spawner/vox
name = "Вокс-Налётчик"
desc = "Воксы-налётчики это представители расы Воксов, птице-подобных гуманоидов, дышащих азотом. Прибыли на станцию что бы украсть что-нибудь ценное."
wiki_ref = "Vox_Raider"

ranks = list(ROLE_RAIDER, ROLE_GHOSTLY)
time_to_del = 5 MINUTES

/datum/spawner/vox/spawn_ghost(mob/dead/observer/ghost)
var/spawnloc = pick(global.heiststart)
global.heiststart -= spawnloc

var/datum/faction/heist/faction = create_uniq_faction(/datum/faction/heist)
var/mob/living/carbon/human/vox/event/vox = new(spawnloc)

vox.key = ghost.client.key

var/sounds = rand(2, 8)
var/newname = ""
for(var/i in 1 to sounds)
newname += pick(list("ti","hi","ki","ya","ta","ha","ka","ya","chi","cha","kah"))

vox.real_name = capitalize(newname)
vox.name = vox.real_name
vox.age = rand(5, 15) // its fucking lore
vox.add_language(LANGUAGE_VOXPIDGIN)
if(faction.members.len % 2 == 0 || prob(33)) // first vox always gets Sol, everyone else by random.
vox.add_language(LANGUAGE_SOLCOMMON)
vox.h_style = "Short Vox Quills"
vox.f_style = "Shaved"
vox.grad_style = "none"

//Now apply cortical stack.
var/obj/item/weapon/implant/cortical/I = new(vox)
I.inject(vox, BP_HEAD)

vox.equip_vox_raider()
vox.regenerate_icons()

add_faction_member(faction, vox)

/datum/spawner/vox/jump(mob/dead/observer/ghost)
var/jump_to = pick(global.heiststart)
ghost.forceMove(jump_to)
31 changes: 4 additions & 27 deletions code/game/gamemodes/factions/heist.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@

initroletype = /datum/role/vox_raider

min_roles = 4
max_roles = 6

logo_state = "raider-logo"

/datum/faction/heist/can_setup(num_players)
if(!..())
return FALSE
for(var/obj/effect/landmark/L in landmarks_list)
if(L.name == "voxstart")
return TRUE
if(global.heiststart.len)
return TRUE
return FALSE

/datum/faction/heist/forgeObjectives()
Expand All @@ -41,23 +39,8 @@
return TRUE

/datum/faction/heist/OnPostSetup()
//Build a list of spawn points.
var/list/turf/raider_spawn = list()

for(var/obj/effect/landmark/L in landmarks_list)
if(L.name == "voxstart")
raider_spawn += get_turf(L)
qdel(L)
continue

var/index = 1
for(var/datum/role/R in members)
if(index > raider_spawn.len)
index = 1

R.antag.current.forceMove(raider_spawn[index])
index++
return ..()
. = ..()
create_spawners(/datum/spawner/vox, max_roles)

/datum/faction/heist/GetScoreboard()
var/list/objectives = objective_holder.GetObjectives()
Expand All @@ -80,12 +63,6 @@

return dat

/datum/faction/heist/check_win()
if(vox_shuttle_location && (vox_shuttle_location == "start"))
return TRUE

return FALSE

/datum/faction/heist/proc/is_raider_crew_safe()
for(var/datum/role/vox_raider/V in members)
if(!V.antag.current)
Expand Down
14 changes: 14 additions & 0 deletions code/game/gamemodes/misc_faction_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,17 @@
. = SSticker.mode.CreateRole(role_type, M)
if(. && setup_role)
setup_role(., post_setup)

/proc/create_faction(faction_type, post_setup = TRUE, give_objectives = TRUE)
var/datum/faction/F = SSticker.mode.CreateFaction(faction_type, num_players(), TRUE)
if(post_setup)
F.OnPostSetup()
if(give_objectives)
F.forgeObjectives()
F.AnnounceObjectives()
return F

/proc/create_uniq_faction(faction_type, post_setup = TRUE, give_objectives = TRUE)
. = find_faction_by_type(faction_type)
if(!.)
. = create_faction(faction_type, post_setup, give_objectives)
17 changes: 0 additions & 17 deletions code/game/gamemodes/modes_declares/heist.dm

This file was deleted.

26 changes: 9 additions & 17 deletions code/game/gamemodes/modes_gameplays/blob/blobs/core.dm
Original file line number Diff line number Diff line change
Expand Up @@ -98,23 +98,15 @@ var/global/list/blob_nodes = list()
B.blob_core = src
src.overmind = B

var/datum/faction/blob_conglomerate/conglomerate = find_faction_by_type(/datum/faction/blob_conglomerate)
if(conglomerate) //Faction exists
if(!conglomerate.get_member_by_mind(B.mind)) //We are not a member yet
var/ded = TRUE
if(conglomerate.members.len)
for(var/datum/role/R in conglomerate.members)
if (R.antag.current && !(R.antag.current.is_dead()))
ded = FALSE
break
add_faction_member(conglomerate, B, !ded)

else //No faction? Make one and you're the overmind.
conglomerate = SSticker.mode.CreateFaction(/datum/faction/blob_conglomerate)
if(conglomerate)
conglomerate.OnPostSetup()
conglomerate.forgeObjectives()
add_faction_member(conglomerate, B, FALSE)
var/datum/faction/blob_conglomerate/conglomerate = create_uniq_faction(/datum/faction/blob_conglomerate)
if(!conglomerate.get_member_by_mind(B.mind)) //We are not a member yet
var/ded = TRUE
if(conglomerate.members.len)
for(var/datum/role/R in conglomerate.members)
if (R.antag.current && !(R.antag.current.is_dead()))
ded = FALSE
break
add_faction_member(conglomerate, B, !ded)

conglomerate.declared = TRUE

Expand Down
4 changes: 1 addition & 3 deletions code/game/gamemodes/modes_gameplays/ninja/space_ninja.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@
spawn(0)
S.ninitialize(10, H)

var/datum/faction/ninja/N = find_faction_by_type(/datum/faction/ninja)
if(!N)
N = SSticker.mode.CreateFaction(/datum/faction/ninja)
var/datum/faction/ninja/N = create_uniq_faction(/datum/faction/ninja)
add_faction_member(N, H, FALSE)

else
Expand Down
42 changes: 3 additions & 39 deletions code/game/gamemodes/roles/heist.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/mob/living/carbon/human/vox/event
spawner_args = list(/datum/spawner/living/vox, 2 MINUTES)

/datum/role/vox_raider
name = VOXRAIDER
id = VOXRAIDER
Expand Down Expand Up @@ -40,42 +43,3 @@
var/datum/browser/popup = new(antag.current, "window=vxrd", nwidth = 600, nheight = 300)
popup.set_content(output_text)
popup.open()

/datum/role/vox_raider/OnPostSetup(laterole)
. = ..()

var/sounds = rand(2, 8)
var/i = 0
var/newname = ""

while(i <= sounds)
i++
newname += pick(list("ti","hi","ki","ya","ta","ha","ka","ya","chi","cha","kah"))

var/mob/living/carbon/human/vox = antag.current

vox.real_name = capitalize(newname)
vox.name = vox.real_name
antag.name = vox.name
vox.age = rand(5, 15) // its fucking lore
vox.set_species(VOX)
for(var/language in vox.languages)
vox.remove_language(language)
vox.flavor_text = ""
vox.add_language(LANGUAGE_VOXPIDGIN)
if(faction.members.len % 2 == 0 || prob(33)) // first vox always gets Sol, everyone else by random.
vox.add_language(LANGUAGE_SOLCOMMON)
vox.h_style = "Short Vox Quills"
vox.f_style = "Shaved"
vox.grad_style = "none"
for(var/obj/item/organ/external/BP in vox.bodyparts)
BP.status = 0 // rejuvenate() saves prostethic limbs, so we tell it NO.
BP.rejuvenate()

//Now apply cortical stack.

var/obj/item/weapon/implant/cortical/I = new(vox)
I.inject(vox, BP_HEAD)

vox.equip_vox_raider()
vox.regenerate_icons()
Loading

0 comments on commit b3f14d9

Please sign in to comment.