mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Monkey mode now can be ended by robusting all infected monkeys (including Pun-Pun) along with leaving on the shuttle.
Admins can switch mode to one from modes game actually can run, not from hardcoded list. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1401 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -263,74 +263,18 @@ var/showadminmessages = 1
|
||||
if ((src.rank in list( "Temporary Admin", "Admin Candidate", "Trial Admin", "Badmin", "Game Admin", "Game Master" )))
|
||||
if (ticker && ticker.mode)
|
||||
return alert(usr, "The game has already started.", null, null, null, null)
|
||||
var/dat = text({"<B>What mode do you wish to play?</B><HR>
|
||||
<A href='?src=\ref[src];c_mode2=secret'>Secret</A><br>
|
||||
<A href='?src=\ref[src];c_mode2=wizard'>Wizard</A><br>
|
||||
<A href='?src=\ref[src];c_mode2=traitor'>Traitor</A><br>
|
||||
<A href='?src=\ref[src];c_mode2=meteor'>Meteor</A><br>
|
||||
<A href='?src=\ref[src];c_mode2=extended'>Extended</A><br>
|
||||
<A href='?src=\ref[src];c_mode2=nuclear'>Nuclear Emergency</A><br>
|
||||
<A href='?src=\ref[src];c_mode2=blob'>Blob</A><br>
|
||||
<A href='?src=\ref[src];c_mode2=sandbox'>Sandbox</A><br>
|
||||
<A href='?src=\ref[src];c_mode2=revolution'>Revolution</A><br>
|
||||
<A href='?src=\ref[src];c_mode2=cult'>Cult</A><br>
|
||||
<A href='?src=\ref[src];c_mode2=malfunction'>AI Malfunction</A><br>
|
||||
<A href='?src=\ref[src];c_mode2=changeling'>Changeling</A><br><br>
|
||||
Now: [master_mode]\n"})
|
||||
var/dat = {"<B>What mode do you wish to play?</B><HR>"}
|
||||
for (var/mode in config.modes)
|
||||
dat += {"<A href='?src=\ref[src];c_mode2=[mode]'>[config.mode_names[mode]]</A><br>"}
|
||||
dat += {"Now: [master_mode]"}
|
||||
usr << browse(dat, "window=c_mode")
|
||||
/*
|
||||
<A href='?src=\ref[src];c_mode2=restructuring'>Corporate Restructuring</A><br>
|
||||
<A href='?src=\ref[src];c_mode2=random'>Random</A><br>
|
||||
<A href='?src=\ref[src];c_mode2=monkey'>Monkey</A><br>
|
||||
<A href='?src=\ref[src];c_mode2=deathmatch'>Death Commando Deathmatch</A><br>
|
||||
<A href='?src=\ref[src];c_mode2=confliction'>Confliction (TESTING)</A><br>
|
||||
<A href='?src=\ref[src];c_mode2=ctf'>Capture The Flag (Beta)</A><br><br>
|
||||
|
||||
*/
|
||||
|
||||
|
||||
if (href_list["c_mode2"])
|
||||
if ((src.rank in list( "Temporary Admin", "Admin Candidate", "Trial Admin", "Badmin", "Game Admin", "Game Master" )))
|
||||
if (ticker && ticker.mode)
|
||||
return alert(usr, "The game has already started.", null, null, null, null)
|
||||
switch(href_list["c_mode2"])
|
||||
if("secret")
|
||||
master_mode = "secret"
|
||||
if("random")
|
||||
master_mode = "random"
|
||||
if("traitor")
|
||||
master_mode = "traitor"
|
||||
if("meteor")
|
||||
master_mode = "meteor"
|
||||
if("extended")
|
||||
master_mode = "extended"
|
||||
if("monkey")
|
||||
master_mode = "monkey"
|
||||
if("nuclear")
|
||||
master_mode = "nuclear"
|
||||
if("blob")
|
||||
master_mode = "blob"
|
||||
if("sandbox")
|
||||
master_mode = "sandbox"
|
||||
if("restructuring")
|
||||
master_mode = "restructuring"
|
||||
if("wizard")
|
||||
master_mode = "wizard"
|
||||
if("revolution")
|
||||
master_mode = "revolution"
|
||||
if("cult")
|
||||
master_mode = "cult"
|
||||
if("malfunction")
|
||||
master_mode = "malfunction"
|
||||
if("deathmatch")
|
||||
master_mode = "deathmatch"
|
||||
if("confliction")
|
||||
master_mode = "confliction"
|
||||
if("ctf")
|
||||
master_mode = "ctf"
|
||||
if("changeling")
|
||||
master_mode = "changeling"
|
||||
else
|
||||
master_mode = href_list["c_mode2"]
|
||||
log_admin("[key_name(usr)] set the mode as [master_mode].")
|
||||
message_admins("\blue [key_name_admin(usr)] set the mode as [master_mode].", 1)
|
||||
world << "\blue <b>The mode is now: [master_mode]</b>"
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
//var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch
|
||||
//mind.store_memory("Time of death: [tod]", 0)
|
||||
|
||||
ticker.mode.check_win()
|
||||
//src.icon_state = "dead"
|
||||
for(var/mob/M in world)
|
||||
if ((M.client && !( M.stat )))
|
||||
@@ -39,4 +40,5 @@
|
||||
spawn(50)
|
||||
if(src.client && src.stat == 2)
|
||||
src.verbs += /mob/proc/ghostize
|
||||
|
||||
return ..(gibbed)
|
||||
@@ -1,6 +1,13 @@
|
||||
#define MONKEY_MODE_RUNNING 0
|
||||
#define MONKEY_MODE_NO_RABID_LEFT 1
|
||||
#define MONKEY_MODE_SHUTTLE_CAPTURED 2
|
||||
#define MONKEY_MODE_SHUTTLE_WITH_HUMANS 3
|
||||
|
||||
|
||||
/datum/game_mode/monkey
|
||||
name = "monkey"
|
||||
config_tag = "monkey"
|
||||
var/state = MONKEY_MODE_RUNNING
|
||||
|
||||
/datum/game_mode/monkey/announce()
|
||||
world << "<B>The current game mode is - Monkey!</B>"
|
||||
@@ -20,38 +27,50 @@
|
||||
|
||||
while (amount > 0)
|
||||
var/mob/living/carbon/human/player = pick(players)
|
||||
player.monkeyize()
|
||||
var/mob/living/carbon/monkey/new_monkey = player.monkeyize()
|
||||
new_monkey << "<B>Your goal is to capture the entire human civilization and your first target is Centcom. Hijack the shuttle without humans aboard.</B>"
|
||||
|
||||
players -= player
|
||||
amount--
|
||||
|
||||
for (var/mob/living/carbon/monkey/rabid_monkey in world)
|
||||
if (!isturf(rabid_monkey.loc) || rabid_monkey.z!=1)
|
||||
continue
|
||||
rabid_monkey.contract_disease(new /datum/disease/jungle_fever,0,0)
|
||||
rabid_monkey << "<B>Your goal is to capture the entire human civilization and your first target is Centcom. Hijack the shuttle without humans aboard.</B>"
|
||||
|
||||
|
||||
/datum/game_mode/monkey/proc/is_important_monkey(var/mob/living/carbon/monkey/M as mob)
|
||||
var/turf/T = get_turf(M)
|
||||
return M.stat!=2 && istype(M.virus, /datum/disease/jungle_fever) && ( T.z==1 || istype(T.loc, /area/shuttle/escape/centcom) || istype(T.loc, /area/centcom))
|
||||
|
||||
/datum/game_mode/monkey/check_win()
|
||||
if (state==MONKEY_MODE_SHUTTLE_CAPTURED || state==MONKEY_MODE_SHUTTLE_WITH_HUMANS)
|
||||
return
|
||||
var/infected_count = 0
|
||||
for (var/mob/living/carbon/monkey/rabid_monkey in world)
|
||||
if (is_important_monkey(rabid_monkey))
|
||||
infected_count++
|
||||
if (infected_count==0)
|
||||
state = MONKEY_MODE_NO_RABID_LEFT
|
||||
|
||||
/datum/game_mode/monkey/check_finished()
|
||||
if(emergency_shuttle.location==2)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
return (emergency_shuttle.location==2) || (state>0)
|
||||
|
||||
/datum/game_mode/monkey/declare_completion()
|
||||
var/area/escape_zone = locate(/area/shuttle/escape/centcom)
|
||||
|
||||
var/monkeywin = 0
|
||||
for(var/mob/living/carbon/monkey/monkey_player in world)
|
||||
if (monkey_player.stat != 2)
|
||||
var/turf/location = get_turf(monkey_player.loc)
|
||||
if (location in escape_zone)
|
||||
monkeywin = 1
|
||||
break
|
||||
if (state != MONKEY_MODE_NO_RABID_LEFT)
|
||||
for(var/mob/living/carbon/monkey/monkey_player in world)
|
||||
if (is_important_monkey(monkey_player))
|
||||
var/turf/location = get_turf(monkey_player.loc)
|
||||
if (istype(location.loc, /area/shuttle/escape/centcom))
|
||||
monkeywin = 1
|
||||
break
|
||||
|
||||
if(monkeywin)
|
||||
for(var/mob/living/carbon/human/human_player in world)
|
||||
if (human_player.stat != 2)
|
||||
var/turf/location = get_turf(human_player.loc)
|
||||
if (istype(human_player.loc, /turf))
|
||||
if (location in escape_zone)
|
||||
if(monkeywin)
|
||||
for(var/mob/living/carbon/human/human_player in world)
|
||||
if (human_player.stat != 2)
|
||||
var/turf/location = get_turf(human_player.loc)
|
||||
if (istype(location.loc, /area/shuttle/escape/centcom))
|
||||
monkeywin = 0
|
||||
break
|
||||
|
||||
@@ -63,12 +82,17 @@
|
||||
player.monkeyize()
|
||||
for(var/mob/living/carbon/monkey/monkey_player in world)
|
||||
if (monkey_player.client)
|
||||
world << "<B>[monkey_player.key] was a monkey.</B>"
|
||||
world << "<B>[monkey_player.key] was a monkey. [monkey_player.stat == 2 ? "(DEAD)" : ""]</B>"
|
||||
sleep(50)
|
||||
else
|
||||
world << "<FONT size=3 color=red><B>The Research Staff has stopped the monkey invasion!</B></FONT>"
|
||||
for(var/mob/living/carbon/monkey/monkey_player in world)
|
||||
if (monkey_player.client)
|
||||
world << "<B>[monkey_player.key] was a monkey.</B>"
|
||||
world << "<B>[monkey_player.key] was a monkey. [monkey_player.stat == 2 ? "(DEAD)" : ""]</B>"
|
||||
|
||||
return 1
|
||||
|
||||
#undef MONKEY_MODE_RUNNING
|
||||
#undef MONKEY_MODE_NO_RABID_LEFT
|
||||
#undef MONKEY_MODE_SHUTTLE_CAPTURED
|
||||
#undef MONKEY_MODE_SHUTTLE_WITH_HUMANS
|
||||
|
||||
Reference in New Issue
Block a user