mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
Merge pull request #4715 from Iamgoofball/FUCKMONKEY
Removes the last traces of Monkey Emergency
This commit is contained in:
@@ -231,8 +231,6 @@ Auto Patrol: []"},
|
||||
continue
|
||||
if (istype(C, /mob/living/carbon/human))
|
||||
threatlevel = src.assess_perp(C)
|
||||
else if ((istype(C, /mob/living/carbon/monkey)) && (C.client) && (ticker.mode.name == "monkey"))
|
||||
threatlevel = 4
|
||||
//src.speak(C.real_name + text(": threat: []", threatlevel))
|
||||
if (threatlevel < 4 )
|
||||
continue
|
||||
@@ -637,8 +635,6 @@ Auto Patrol: []"},
|
||||
|
||||
if (istype(C, /mob/living/carbon/human))
|
||||
src.threatlevel = src.assess_perp(C)
|
||||
else if ((istype(C, /mob/living/carbon/monkey)) && (C.client) && (ticker.mode.name == "monkey"))
|
||||
src.threatlevel = 4
|
||||
|
||||
if (!src.threatlevel)
|
||||
continue
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/igniter/attack_paw(mob/user as mob)
|
||||
if ((ticker && ticker.mode.name == "monkey"))
|
||||
return src.attack_hand(user)
|
||||
return
|
||||
|
||||
/obj/machinery/igniter/attack_hand(mob/user as mob)
|
||||
@@ -156,4 +154,4 @@
|
||||
icon_state = "launcherbtt"
|
||||
active = 0
|
||||
|
||||
return
|
||||
return
|
||||
|
||||
@@ -174,7 +174,7 @@ Class Procs:
|
||||
return 1
|
||||
if ( ! (istype(usr, /mob/living/carbon/human) || \
|
||||
istype(usr, /mob/living/silicon) || \
|
||||
istype(usr, /mob/living/carbon/monkey) && ticker && ticker.mode.name == "monkey") )
|
||||
istype(usr, /mob/living/carbon/monkey)) )
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return 1
|
||||
|
||||
@@ -216,7 +216,7 @@ Class Procs:
|
||||
return 1
|
||||
if ( ! (istype(usr, /mob/living/carbon/human) || \
|
||||
istype(usr, /mob/living/silicon) || \
|
||||
istype(usr, /mob/living/carbon/monkey) && ticker && ticker.mode.name == "monkey") )
|
||||
istype(usr, /mob/living/carbon/monkey)) )
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return 1
|
||||
/*
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
if ( ! (istype(user, /mob/living/carbon/human) || \
|
||||
istype(user, /mob/living/silicon) || \
|
||||
istype(user, /mob/living/carbon/monkey) && ticker && ticker.mode.name == "monkey") )
|
||||
istype(user, /mob/living/carbon/monkey)) )
|
||||
user << "\red You don't have the dexterity to do this!"
|
||||
return 1
|
||||
|
||||
|
||||
@@ -513,7 +513,4 @@
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/IsAdvancedToolUser()//Unless its monkey mode monkeys cant use advanced tools
|
||||
if(!ticker) return 0
|
||||
if(!ticker.mode.name == "monkey") return 0
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
|
||||
/obj/item/weapon/storage/photo_album/MouseDrop(obj/over_object as obj)
|
||||
|
||||
if((istype(usr, /mob/living/carbon/human) || (ticker && ticker.mode.name == "monkey")))
|
||||
if((istype(usr, /mob/living/carbon/human)))
|
||||
var/mob/M = usr
|
||||
if(!( istype(over_object, /obj/screen) ))
|
||||
return ..()
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
init()
|
||||
else
|
||||
area = src.loc.loc:master
|
||||
area.apc |= src
|
||||
area.apc |= src
|
||||
opened = 1
|
||||
operating = 0
|
||||
name = "[area.name] APC"
|
||||
@@ -171,7 +171,7 @@
|
||||
cell.charge = start_charge * cell.maxcharge / 100.0 // (convert percentage to actual value)
|
||||
|
||||
var/area/A = src.loc.loc
|
||||
|
||||
|
||||
|
||||
//if area isn't specified use current
|
||||
if(isarea(A) && src.areastring == null)
|
||||
@@ -913,7 +913,7 @@
|
||||
return 0
|
||||
if ( ! (istype(user, /mob/living/carbon/human) || \
|
||||
istype(user, /mob/living/silicon) || \
|
||||
istype(user, /mob/living/carbon/monkey) /*&& ticker && ticker.mode.name == "monkey"*/) )
|
||||
istype(user, /mob/living/carbon/monkey)) )
|
||||
user << "\red You don't have the dexterity to use this [src]!"
|
||||
nanomanager.close_user_uis(user, src)
|
||||
|
||||
@@ -1241,7 +1241,7 @@
|
||||
autoflag = 3
|
||||
area.poweralert(1, src)
|
||||
if(cell.charge >= 4000)
|
||||
area.poweralert(1, src)
|
||||
area.poweralert(1, src)
|
||||
else if(cell.charge < 1250 && cell.charge > 750 && longtermpower < 0) // <30%, turn off equipment
|
||||
if(autoflag != 2)
|
||||
equipment = autoset(equipment, 2)
|
||||
@@ -1307,7 +1307,7 @@
|
||||
environ = autoset(environ, 0)
|
||||
area.poweralert(0, src)
|
||||
autoflag = 0
|
||||
|
||||
|
||||
|
||||
// update icon & area power if anything changed
|
||||
|
||||
|
||||
@@ -1,131 +0,0 @@
|
||||
#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
|
||||
|
||||
#define MONKEY_MODE_MONKEYS 4
|
||||
|
||||
/datum/game_mode/monkey
|
||||
name = "monkey"
|
||||
config_tag = "monkey"
|
||||
var/state = MONKEY_MODE_RUNNING
|
||||
var/list/datum/mind/initial_monkeys = new
|
||||
|
||||
/datum/game_mode/monkey/announce()
|
||||
world << "<B>The current game mode is - Monkey!</B>"
|
||||
world << "<B>Some of your crew members have been infected by a mutageous virus!</B>"
|
||||
world << "<B>Escape on the shuttle but the humans have precedence!</B>"
|
||||
|
||||
/datum/game_mode/monkey/can_start()
|
||||
if (num_players()<2)
|
||||
return 0
|
||||
for(var/mob/new_player/P in player_list)
|
||||
if(P.client && P.ready && !jobban_isbanned(P, "Syndicate"))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/game_mode/monkey/pre_setup()
|
||||
var/list/possible_monkeys = get_players_for_role(BE_MONKEY)
|
||||
|
||||
// stop setup if no possible monkeys
|
||||
if(!possible_monkeys.len)
|
||||
return 0
|
||||
|
||||
var/num_monkeys = MONKEY_MODE_MONKEYS
|
||||
var/num_players = num_players()
|
||||
|
||||
if (num_players<=num_monkeys)
|
||||
num_monkeys = round(num_players/2)
|
||||
|
||||
for(var/j = 1 to num_monkeys)
|
||||
if (!possible_monkeys.len)
|
||||
break
|
||||
var/datum/mind/monkey = pick(possible_monkeys)
|
||||
possible_monkeys-=monkey
|
||||
initial_monkeys += monkey
|
||||
monkey.special_role = "monkey"
|
||||
|
||||
if(!initial_monkeys.len)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/datum/game_mode/monkey/post_setup()
|
||||
spawn (50)
|
||||
for (var/datum/mind/monkey in initial_monkeys)
|
||||
var/mob/living/carbon/human/H = monkey.current
|
||||
var/mob/living/carbon/monkey/new_monkey = H.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>"
|
||||
|
||||
for (var/mob/living/carbon/monkey/rabid_monkey in mob_list)
|
||||
if (!(rabid_monkey.mind in initial_monkeys) && (!isturf(rabid_monkey.loc) || rabid_monkey.z!=1))
|
||||
continue
|
||||
rabid_monkey.contract_disease(new /datum/disease/jungle_fever,1,0)
|
||||
del(initial_monkeys)
|
||||
..()
|
||||
|
||||
/datum/game_mode/monkey/proc/is_important_monkey(var/mob/living/carbon/monkey/M as mob)
|
||||
var/turf/T = get_turf(M)
|
||||
var/area/A = get_area(M)
|
||||
if(M.stat!=2)
|
||||
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
if(istype(D, /datum/disease/jungle_fever) && ( T.z==1 || is_type_in_list(A, centcom_areas)))
|
||||
return 1
|
||||
|
||||
|
||||
/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 mob_list)
|
||||
if (is_important_monkey(rabid_monkey))
|
||||
infected_count++
|
||||
if (infected_count==0)
|
||||
state = MONKEY_MODE_NO_RABID_LEFT
|
||||
|
||||
/datum/game_mode/monkey/check_finished()
|
||||
return (emergency_shuttle.location==2) || (state>0)
|
||||
|
||||
/datum/game_mode/monkey/declare_completion()
|
||||
var/monkeywin = 0
|
||||
if (state != MONKEY_MODE_NO_RABID_LEFT)
|
||||
for(var/mob/living/carbon/monkey/monkey_player in mob_list)
|
||||
if (is_important_monkey(monkey_player))
|
||||
var/area/A = get_area(monkey_player)
|
||||
if ( is_type_in_list(A, centcom_areas))
|
||||
monkeywin = 1
|
||||
break
|
||||
|
||||
if(monkeywin)
|
||||
for(var/mob/living/carbon/human/human_player in mob_list)
|
||||
if (human_player.stat != 2)
|
||||
var/area/A = get_area(human_player)
|
||||
if (istype(A, /area/shuttle/escape/centcom))
|
||||
monkeywin = 0
|
||||
break
|
||||
|
||||
if (monkeywin)
|
||||
feedback_set_details("round_end_result","win - monkey win")
|
||||
world << "<FONT size=3 color=red><B>The monkeys have won! Humanity is doomed!</B></FONT>"
|
||||
for (var/mob/living/carbon/human/player in player_list)
|
||||
spawn(rand(0,150))
|
||||
player.monkeyize()
|
||||
sleep(200)
|
||||
else
|
||||
feedback_set_details("round_end_result","loss - crew win")
|
||||
world << "<FONT size=3 color=red><B>The Research Staff has stopped the monkey invasion!</B></FONT>"
|
||||
..()
|
||||
return 1
|
||||
|
||||
|
||||
/datum/game_mode/proc/auto_declare_completion_monkey()
|
||||
for(var/mob/living/carbon/monkey/monkey_player in mob_list)
|
||||
for(var/datum/disease/D in monkey_player.viruses)
|
||||
if (istype(D, /datum/disease/jungle_fever) && monkey_player.ckey)
|
||||
world << "<B>[monkey_player.ckey] was played infested [monkey_player]. [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