mirror of
https://github.com/Aurorastation/Aurora-Old.git
synced 2026-08-24 13:16:18 +01:00
Initial Commit
This commit is contained in:
@@ -0,0 +1,141 @@
|
||||
/*
|
||||
/datum/game_mode/ctf
|
||||
name = "ctf"
|
||||
config_tag = "ctf"
|
||||
|
||||
/datum/game_mode/ctf/announce()
|
||||
world << "<B>The current game mode is - Capture the Flag!</B>"
|
||||
world << "<B>Capture the other teams flag and bring it back to your base!</B>"
|
||||
world << "Respawn is on"
|
||||
|
||||
/datum/game_mode/ctf/pre_setup()
|
||||
|
||||
config.allow_ai = 0
|
||||
var/list/mobs = list()
|
||||
var/total_mobs
|
||||
for(var/mob/living/carbon/human/M in world)
|
||||
if (M.client)
|
||||
mobs += M
|
||||
total_mobs++
|
||||
|
||||
var/obj/R = locate("landmark*Red-Spawn")
|
||||
var/obj/G = locate("landmark*Green-Spawn")
|
||||
|
||||
var/mob_check
|
||||
for(var/mob/living/carbon/human/M in mobs)
|
||||
if(!M)
|
||||
continue
|
||||
mob_check++
|
||||
if(mob_check <= total_mobs/2) //add to red team else to green
|
||||
spawn()
|
||||
if(M.client)
|
||||
M << "You are in the Red Team!"
|
||||
del(M.wear_suit)
|
||||
M.w_uniform = new /obj/item/clothing/under/color/red(M)
|
||||
M.w_uniform.layer = 20
|
||||
del(M.shoes)
|
||||
M.wear_suit = new /obj/item/clothing/suit/armor/tdome/red(M)
|
||||
M.wear_suit.layer = 20
|
||||
M.shoes = new /obj/item/clothing/shoes/black(M)
|
||||
M.shoes.layer = 20
|
||||
M.wear_mask = new /obj/item/clothing/mask/gas/emergency(M)
|
||||
M.wear_mask.layer = 20
|
||||
M.gloves = new /obj/item/clothing/gloves/swat(M)
|
||||
M.gloves.layer = 20
|
||||
M.glasses = new /obj/item/clothing/glasses/thermal(M)
|
||||
M.glasses.layer = 20
|
||||
var/obj/item/device/radio/headset/H = new /obj/item/device/radio/headset(M)
|
||||
H.set_frequency(1465)
|
||||
M.w_radio = H
|
||||
M.w_radio.layer = 20
|
||||
var/obj/item/weapon/tank/air/O = new /obj/item/weapon/tank/air(M)
|
||||
M.back = O
|
||||
M.back.layer = 20
|
||||
M.internal = O
|
||||
|
||||
del(M.wear_id)
|
||||
var/obj/item/weapon/card/id/W = new(M)
|
||||
W.name = "[M.real_name]'s ID card (Red Team)"
|
||||
W.access = access_red
|
||||
W.assignment = "Red Team"
|
||||
W.registered_name = M.real_name
|
||||
M.wear_id = W
|
||||
M.wear_id.layer = 20
|
||||
if(R)
|
||||
M.loc = R.loc
|
||||
else
|
||||
world << "No red team spawn point detected"
|
||||
M.client.team = "Red"
|
||||
else
|
||||
spawn()
|
||||
if(M.client)
|
||||
M << "You are in the Green Team!"
|
||||
del(M.wear_suit)
|
||||
M.w_uniform = new /obj/item/clothing/under/color/green(M)
|
||||
M.w_uniform.layer = 20
|
||||
del(M.shoes)
|
||||
M.wear_suit = new /obj/item/clothing/suit/armor/tdome/green(M)
|
||||
M.wear_suit.layer = 20
|
||||
M.shoes = new /obj/item/clothing/shoes/black(M)
|
||||
M.shoes.layer = 20
|
||||
M.wear_mask = new /obj/item/clothing/mask/gas/emergency(M)
|
||||
M.wear_mask.layer = 20
|
||||
M.gloves = new /obj/item/clothing/gloves/swat(M)
|
||||
M.gloves.layer = 20
|
||||
M.glasses = new /obj/item/clothing/glasses/thermal(M)
|
||||
M.glasses.layer = 20
|
||||
var/obj/item/device/radio/headset/H = new /obj/item/device/radio/headset(M)
|
||||
H.set_frequency(1449)
|
||||
M.w_radio = H
|
||||
M.w_radio.layer = 20
|
||||
var/obj/item/weapon/tank/air/O = new /obj/item/weapon/tank/air(M)
|
||||
M.back = O
|
||||
M.back.layer = 20
|
||||
M.internal = O
|
||||
|
||||
del(M.wear_id)
|
||||
var/obj/item/weapon/card/id/W = new(M)
|
||||
W.name = "[M.real_name]'s ID card (Green Team)"
|
||||
W.access = access_green
|
||||
W.assignment = "Green Team"
|
||||
W.registered_name = M.real_name
|
||||
M.wear_id = W
|
||||
M.wear_id.layer = 20
|
||||
if(G)
|
||||
M.loc = G.loc
|
||||
else
|
||||
world << "No green team spawn point detected"
|
||||
M.client.team = "Green"
|
||||
|
||||
|
||||
/datum/game_mode/ctf/post_setup()
|
||||
abandon_allowed = 1
|
||||
setup_game()
|
||||
|
||||
spawn (50)
|
||||
var/obj/L = locate("landmark*Red-Flag")
|
||||
if (L)
|
||||
new /obj/item/weapon/ctf_flag/red(L.loc)
|
||||
else
|
||||
world << "No red flag spawn point detected"
|
||||
|
||||
L = locate("landmark*Green-Flag")
|
||||
if (L)
|
||||
new /obj/item/weapon/ctf_flag/green(L.loc)
|
||||
else
|
||||
world << "No green flag spawn point detected"
|
||||
|
||||
L = locate("landmark*The-Red-Team")
|
||||
if (L)
|
||||
new /obj/machinery/red_injector(L.loc)
|
||||
else
|
||||
world << "No red team spawn injector point detected"
|
||||
|
||||
L = locate("landmark*The-Green-Team")
|
||||
if (L)
|
||||
new /obj/machinery/green_injector(L.loc)
|
||||
else
|
||||
world << "No green team injector spawn point detected"
|
||||
..()
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,139 @@
|
||||
/obj/item/weapon/ctf_flag
|
||||
name = "Flag"
|
||||
desc = "Its a flag"
|
||||
w_class = 5
|
||||
icon = 'flags.dmi'
|
||||
icon_state = "flag_neutral"
|
||||
item_state = "paper"
|
||||
|
||||
/obj/item/weapon/ctf_flag/red
|
||||
name = "The Red Flag"
|
||||
desc = "Catch dat fukken flag"
|
||||
icon_state = "flag_red"
|
||||
|
||||
/obj/item/weapon/ctf_flag/green
|
||||
name = "The Green Flag"
|
||||
desc = "Catch dat fukken flag"
|
||||
icon_state = "flag_green"
|
||||
|
||||
/obj/item/weapon/ctf_flag/New()
|
||||
..()
|
||||
spawn(200)
|
||||
process()
|
||||
return
|
||||
|
||||
/obj/item/weapon/ctf_flag/process()
|
||||
if(istype(src, /obj/item/weapon/ctf_flag/green))
|
||||
var/obj/L = locate("landmark*Green-Flag")
|
||||
if(locate("landmark*Green-Flag", src))
|
||||
spawn(200)
|
||||
process()
|
||||
return
|
||||
else if(!src.check_if_equipped() && L)
|
||||
new /obj/item/weapon/ctf_flag/green(L.loc)
|
||||
del(src)
|
||||
if(istype(src, /obj/item/weapon/ctf_flag/red))
|
||||
var/obj/L = locate("landmark*Red-Flag")
|
||||
if(locate("landmark*Red-Flag", src))
|
||||
spawn(200)
|
||||
process()
|
||||
return
|
||||
else if(!src.check_if_equipped() && L)
|
||||
new /obj/item/weapon/ctf_flag/red(L.loc)
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/ctf_flag/proc/check_if_equipped()
|
||||
var/equipped = 0
|
||||
for(var/mob/M in living_mob_list)
|
||||
if(M &&!M.stat)
|
||||
var/list/L = M.get_contents()
|
||||
if(src in L)
|
||||
equipped = 1
|
||||
break
|
||||
return equipped
|
||||
|
||||
/obj/machinery/red_injector
|
||||
name = "Red Team Flag Injector"
|
||||
desc = "Insert flag here"
|
||||
anchored = 1
|
||||
density = 1
|
||||
var/score = 0
|
||||
var/operating = 0
|
||||
icon = 'flags.dmi'
|
||||
icon_state = "red_injector"
|
||||
/*
|
||||
/obj/machinery/red_injector/ex_act(severity)
|
||||
return
|
||||
|
||||
/obj/machinery/red_injector/attackby(var/obj/item/weapon/ctf_flag/C, mob/user)
|
||||
if(src.operating)
|
||||
user << "Cannot put a flag in right now"
|
||||
return
|
||||
src.operating = 1
|
||||
if(istype(C, /obj/item/weapon/ctf_flag/green))
|
||||
if(locate("landmark*Red-Flag", /obj/item/weapon/ctf_flag/red))
|
||||
src.score++
|
||||
world << "<B>[user.real_name] has scored for the red team!</B>"
|
||||
if(ticker.mode.name == "ctf")
|
||||
ticker.red_score++
|
||||
var/obj/L = locate("landmark*Green-Flag")
|
||||
if (L)
|
||||
del(C)
|
||||
new /obj/item/weapon/ctf_flag/green(L.loc)
|
||||
else
|
||||
world << "No green flag spawn point detected"
|
||||
if(src.score >= 15)
|
||||
world << "<FONT size = 3><B>The Red Team has won!</B></FONT>"
|
||||
world << "<B>They have scored [score] times with the flag!</B>"
|
||||
sleep(300)
|
||||
world.Reboot()
|
||||
else
|
||||
user << "\red You need to have your flag in the beginning position!"
|
||||
else if(istype(C, /obj/item/weapon/ctf_flag/red))
|
||||
world << "<B>[user.real_name] has tried to score with their own flag! Idiot!</B>"
|
||||
src.operating = 0
|
||||
return
|
||||
*/
|
||||
/obj/machinery/green_injector
|
||||
name = "Green Team Flag Injector"
|
||||
desc = "Insert flag here"
|
||||
anchored = 1
|
||||
density = 1
|
||||
var/operating = 0
|
||||
var/score = 0
|
||||
icon = 'flags.dmi'
|
||||
icon_state = "green_injector"
|
||||
|
||||
/obj/machinery/green_injector/ex_act(severity)
|
||||
return
|
||||
/*
|
||||
/obj/machinery/green_injector/attackby(var/obj/item/weapon/ctf_flag/C, mob/user)
|
||||
if(src.operating)
|
||||
user << "Cannot put a flag in right now"
|
||||
return
|
||||
src.operating = 1
|
||||
if(istype(C, /obj/item/weapon/ctf_flag/red))
|
||||
if(locate("landmark*Green-Flag", /obj/item/weapon/ctf_flag/green))
|
||||
src.score++
|
||||
world << "<B>[user.real_name] has scored for the green team!</B>"
|
||||
if(ticker.mode.name == "ctf")
|
||||
ticker.green_score++
|
||||
var/obj/L = locate("landmark*Red-Flag")
|
||||
if (L)
|
||||
del(C)
|
||||
new /obj/item/weapon/ctf_flag/red(L.loc)
|
||||
else
|
||||
world << "No red flag spawn point detected"
|
||||
if(src.score >= 15)
|
||||
world << "<FONT size = 3><B>The Green Team has won!</B></FONT>"
|
||||
world << "<B>They have scored [score] times with the flag!</B>"
|
||||
sleep(300)
|
||||
world.Reboot()
|
||||
else
|
||||
user << "\red You need to have your flag in the beginning position!"
|
||||
else if(istype(C, /obj/item/weapon/ctf_flag/green))
|
||||
world << "<B>[user.real_name] has tried to score with their own flag! Idiot!</B>"
|
||||
src.operating = 0
|
||||
return
|
||||
*/
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
/datum/game_mode/deathmatch
|
||||
name = "deathmatch"
|
||||
config_tag = "deathmatch"
|
||||
var/startedat
|
||||
var/const/gamelength = 15 * 600 // 1/10 second
|
||||
|
||||
announce()
|
||||
world << "<B>The current game mode is - Death Commando Deathmatch!</B>"
|
||||
world << "<B>Just kill everyone else. They're gonna try to kill you, after all. Respawning is enabled.</B>"
|
||||
|
||||
post_setup()
|
||||
startedat = world.realtime
|
||||
abandon_allowed = 1
|
||||
setup_game()
|
||||
|
||||
// TODO: DEFERRED Make this massively cleaner. It should hook before spawning, not after.
|
||||
var/list/mobs = list()
|
||||
for(var/mob/living/carbon/human/M in world)
|
||||
if (M.client)
|
||||
mobs += M
|
||||
for(var/mob/living/carbon/human/M in mobs)
|
||||
spawn()
|
||||
if(M.client)
|
||||
for(var/obj/item/weapon/W in list(M.wear_suit, M.w_uniform, M.r_store, M.l_store, M.wear_id, M.belt,
|
||||
M.gloves, M.glasses, M.head, M.ears, M.shoes, M.wear_mask, M.back,
|
||||
M.handcuffed, M.r_hand, M.l_hand))
|
||||
M.u_equip(W)
|
||||
del(W)
|
||||
|
||||
var/randomname = "Killiam Shakespeare"
|
||||
if(commando_names.len)
|
||||
randomname = pick(commando_names)
|
||||
commando_names -= randomname
|
||||
var/newname = input(M,"You are a death commando. Would you like to change your name?", "Character Creation", randomname)
|
||||
if(!length(newname))
|
||||
newname = randomname
|
||||
newname = strip_html(newname,40)
|
||||
|
||||
M.real_name = newname
|
||||
M.name = newname // there are WAY more things than this to change, I'm almost certain
|
||||
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/color/black(M), slot_w_uniform)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/swat_suit/death_commando(M), slot_wear_suit)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/death_commando(M), slot_wear_mask)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(M), slot_gloves)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal(M), slot_glasses)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle(M), slot_l_hand)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/m_pill/cyanide(M), slot_l_store)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/flashbang(M), slot_r_store)
|
||||
|
||||
var/obj/item/weapon/tank/air/O = new(M)
|
||||
M.equip_to_slot_or_del(O, slot_back)
|
||||
M.internal = O
|
||||
|
||||
var/obj/item/weapon/card/id/W = new(M)
|
||||
W.access = get_all_accesses()
|
||||
W.name = "[newname]'s ID card (Death Commando)"
|
||||
W.assignment = "Death Commando"
|
||||
W.registered_name = newname
|
||||
M.equip_to_slot_or_del(W, slot_wear_id)
|
||||
..()
|
||||
|
||||
check_win()
|
||||
return 1
|
||||
*/
|
||||
@@ -0,0 +1,131 @@
|
||||
#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
|
||||
@@ -0,0 +1,77 @@
|
||||
/datum/game_mode/restructuring
|
||||
name = "Corporate Restructuring"
|
||||
config_tag = "restructuring"
|
||||
/*
|
||||
/datum/game_mode/restructuring/announce()
|
||||
world << "\red <B>GLOBAL TRANSMISSION FROM HEAD OFFICE: A CORPORATE RESTRUCTURING IS TO TAKE PLACE</B>"
|
||||
world << "\red <B>Stay tuned for further news; note that we do care for our employees and any layoffs will be dealt with discretion and compassion</B>"
|
||||
|
||||
|
||||
/datum/game_mode/restructuring/post_setup()
|
||||
setup_game()
|
||||
var/list/mobs = get_mob_list()
|
||||
while (mobs.len == 0)
|
||||
sleep 30
|
||||
mobs = get_mob_list()
|
||||
spawn (120)
|
||||
pick_target()
|
||||
..()
|
||||
|
||||
/datum/game_mode/restructuring/proc/pick_target(who)
|
||||
var/mob/target
|
||||
var/mob/target_desc
|
||||
|
||||
if (!who)
|
||||
target = pick(get_mob_list())
|
||||
target_desc = get_target_desc(target)
|
||||
world << "\red <B>HEAD OFFICE: [target_desc] is accused of attempting to start a Union and is now considered a threat to the station. Terminate the employee immediately.</b>"
|
||||
else
|
||||
target = who
|
||||
target_desc = get_target_desc(target)
|
||||
world << "\red <B>HEAD OFFICE: [target_desc] is accused of fornicating with staff of the same sex. Terminate the employee immediately.</b>"
|
||||
ticker.target = target
|
||||
|
||||
target.store_memory("Head office has ordered your downsizing. Ruh roh", 0)
|
||||
|
||||
for(var/mob/living/silicon/ai/M in world)
|
||||
M << "These are your laws now:"
|
||||
M.set_zeroth_law("[target_desc] is not human.")
|
||||
M.show_laws()
|
||||
|
||||
/datum/game_mode/restructuring/check_win()
|
||||
var/list/left_alive = get_mob_list()
|
||||
if (left_alive.len == 1)
|
||||
var/thewinner = the_winner()
|
||||
world << "\red <B>HEAD OFFICE: Thanks to his superior brown-nosing abilities, [thewinner] has been promoted to senior management! Congratulations!"
|
||||
return 1
|
||||
else if (left_alive.len == 0)
|
||||
world << "\red <B>HEAD OFFICE: Cost cutting measures have achieved 100% efficiency. Thank you for understanding our position during this volatile economic downturn."
|
||||
return 1
|
||||
else
|
||||
if(ticker.target.stat != 2)
|
||||
return 0
|
||||
world << "\red <B>HEAD OFFICE: It seems we have made a mistake in our paperwork. The previous target for termination was chosen based on race, sex, and/or religious beliefs, which is against company policy. Please cancel previous termination request."
|
||||
pick_target()
|
||||
return 0
|
||||
|
||||
/datum/game_mode/restructuring/proc/get_mob_list()
|
||||
var/list/mobs = list()
|
||||
for(var/mob/M in world)
|
||||
if (M.stat<2 && M.client && istype(M, /mob/living/carbon/human))
|
||||
mobs += M
|
||||
return mobs
|
||||
|
||||
/datum/game_mode/restructuring/proc/the_winner()
|
||||
for(var/mob/M in world)
|
||||
if (M.stat<2 && M.client && istype(M, /mob/living/carbon/human))
|
||||
return M.name
|
||||
|
||||
/datum/game_mode/restructuring/proc/get_target_desc(mob/target) //return a useful string describing the target
|
||||
var/targetrank = null
|
||||
for(var/datum/data/record/R in data_core.general)
|
||||
if (R.fields["name"] == target.real_name)
|
||||
targetrank = R.fields["rank"]
|
||||
if(!targetrank)
|
||||
return "[target.name]"
|
||||
return "[target.name] the [targetrank]"
|
||||
*/
|
||||
@@ -0,0 +1,289 @@
|
||||
// RUBY MODE
|
||||
// There is a weapon of some sort that spawns on the station
|
||||
// It calls out to crew members in an effort to find a wielder
|
||||
// The wielder is made an abomination - they're given a grotesque mask and special powers
|
||||
// The Abomination wins by murdering the entire crew, then himself
|
||||
// The crew wins by destroying the weapon
|
||||
|
||||
|
||||
/datum/game_mode/ruby
|
||||
name = "ruby"
|
||||
config_tag = "ruby"
|
||||
|
||||
var/datum/mind/abomination
|
||||
var/finished = 0
|
||||
var/abominationwins = 0
|
||||
var/winnerkey
|
||||
var/obj/macguffin
|
||||
var/list/killed = list()
|
||||
var/respawns = 0
|
||||
|
||||
|
||||
|
||||
/datum/game_mode/ruby/post_setup()
|
||||
var/list/possible_abominations = get_possible_abominations()
|
||||
|
||||
if(possible_abominations.len>0)
|
||||
abomination = pick(possible_abominations)
|
||||
/*
|
||||
if(istype(ruby))
|
||||
abomination.special_role = "abomination"
|
||||
if(wizardstart.len == 0)
|
||||
wizard.current << "<B>\red A starting location for you could not be found, please report this bug!</B>"
|
||||
else
|
||||
var/starting_loc = pick(wizardstart)
|
||||
wizard.current.loc = starting_loc
|
||||
|
||||
for (var/obj/effect/landmark/A in world)
|
||||
if (A.name == "Teleport-Scroll")
|
||||
new /obj/item/weapon/teleportation_scroll(A.loc)
|
||||
del(A)
|
||||
continue
|
||||
*/
|
||||
..()
|
||||
|
||||
/datum/game_mode/ruby/check_finished()
|
||||
if(!macguffin || abominationwins)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/datum/game_mode/ruby/declare_completion()
|
||||
if(abominationwins)
|
||||
feedback_set_details("round_end_result","win - abomination win")
|
||||
world << "<B>The Abomination has murdered the station and sacrificed himself to Cjopaze!</B> (played by [winnerkey])"
|
||||
else
|
||||
feedback_set_details("round_end_result","loss - abomination killed")
|
||||
world << "<B>The Abomination has been stopped and Cjopaze's influence resisted! The station lives another day,</B>"
|
||||
if(killed.len > 0)
|
||||
world << "Those who were sacrificed shall be remembered: "
|
||||
for(var/mob/M in killed)
|
||||
if(M)
|
||||
world << "[M.real_name]"
|
||||
/*
|
||||
for(var/datum/mind/traitor in traitors)
|
||||
var/traitorwin = 1
|
||||
var/traitor_name
|
||||
|
||||
if(traitor.current)
|
||||
traitor_name = "[traitor.current.real_name] (played by [traitor.key])"
|
||||
else
|
||||
traitor_name = "[traitor.key] (character destroyed)"
|
||||
|
||||
world << "<B>The syndicate traitor was [traitor_name]</B>"
|
||||
var/count = 1
|
||||
for(var/datum/objective/objective in traitor.objectives)
|
||||
if(objective.check_completion())
|
||||
world << "<B>Objective #[count]</B>: [objective.explanation_text] \green <B>Success</B>"
|
||||
else
|
||||
world << "<B>Objective #[count]</B>: [objective.explanation_text] \red Failed"
|
||||
traitorwin = 0
|
||||
count++
|
||||
|
||||
if(traitorwin)
|
||||
world << "<B>The traitor was successful!<B>"
|
||||
else
|
||||
world << "<B>The traitor has failed!<B>"
|
||||
*/
|
||||
..()
|
||||
return 1
|
||||
|
||||
|
||||
/datum/game_mode/ruby/proc/spawn_macguffin()
|
||||
|
||||
/datum/game_mode/ruby/proc/get_possible_abominations()
|
||||
|
||||
|
||||
/mob/proc/make_abomination()
|
||||
src.see_in_dark = 20
|
||||
src.verbs += /client/proc/planar_shift
|
||||
src.verbs += /client/proc/vile_ressurection
|
||||
src.verbs += /client/proc/defile_corpse
|
||||
src.verbs += /client/proc/summon_weapon
|
||||
src.verbs += /client/proc/sacrifice_self
|
||||
src.verbs += /client/proc/hunt
|
||||
src.verbs += /client/proc/howl
|
||||
var/datum/game_mode/ruby/rmode = ticker.mode
|
||||
rmode.abomination = src.mind
|
||||
return
|
||||
|
||||
|
||||
/client/proc/planar_shift()
|
||||
set name = "Planar Shift"
|
||||
set category = "Abomination"
|
||||
// This is a pretty shitty way to do this. Should use the spell_holder method from Wizard mode
|
||||
/*
|
||||
if(!usr.incorporeal_move)
|
||||
usr.sight |= SEE_MOBS
|
||||
usr.sight |= SEE_OBJS
|
||||
usr.sight |= SEE_TURFS
|
||||
//usr.density = 0
|
||||
usr.incorporeal_move = 1
|
||||
else
|
||||
usr.sight &= ~SEE_MOBS
|
||||
usr.sight &= ~SEE_TURFS
|
||||
usr.sight &= ~SEE_OBJS
|
||||
usr.density = 1
|
||||
usr.incorporeal_move = 0
|
||||
src.verbs -= /client/proc/planar_shift
|
||||
spawn(300) src.verbs += /client/proc/planar_shift
|
||||
*/
|
||||
|
||||
/client/proc/vile_ressurection()
|
||||
set name = "Vile Ressurection"
|
||||
set category = "Abomination"
|
||||
if(src.mob.stat != 2 || !src.mob)
|
||||
return
|
||||
if(ticker.mode:respawns > 0)
|
||||
// spawn a new body
|
||||
ticker.mode:respawns -= 1
|
||||
else
|
||||
// nope
|
||||
|
||||
/client/proc/defile_corpse(var/mob/living/carbon/human/H in view())
|
||||
set name = "Defile Corpse"
|
||||
set category = "Abomination"
|
||||
if(istype(H, /mob/living/carbon/human))
|
||||
var/datum/game_mode/ruby/rmode = ticker.mode
|
||||
rmode.killed.Add(H)
|
||||
ticker.mode:respawns += 1
|
||||
var/fluffmessage = pick("\red <B>[usr] rips the flesh from [H]'s corpse and plucks their eyes from their sockets!</B>", "\red <B>[usr] does unspeakable things to [H]'s corpse!</B>", "\red <B>[usr] binds [H]'s corpse with their own entrails!</B>")
|
||||
usr.visible_message(fluffmessage)
|
||||
// play sound
|
||||
|
||||
/client/proc/summon_weapon()
|
||||
set name = "Summon Weapon"
|
||||
set category = "Abomination"
|
||||
|
||||
for(var/obj/item/weapon/rubyweapon/w in world)
|
||||
if(istype(w, /obj/item/weapon/rubyweapon))
|
||||
if(istype(w.loc, /mob))
|
||||
var/mob/M = w.loc
|
||||
M.drop_item()
|
||||
w.loc = usr.loc
|
||||
else
|
||||
w.loc = usr.loc
|
||||
src.verbs -= /client/proc/summon_weapon
|
||||
spawn(300) src.verbs += /client/proc/summon_weapon
|
||||
return
|
||||
|
||||
/client/proc/sacrifice_self()
|
||||
set name = "Sacrifice Self"
|
||||
set category = "Abomination"
|
||||
set desc = "Everything must come to an end. After you have freed them, you must free yourself."
|
||||
|
||||
for(var/mob/living/carbon/human/H in player_list)
|
||||
if(!H.client || H.client == src)
|
||||
continue
|
||||
src << "Your work is not done. You will not find release until they are all free."
|
||||
return
|
||||
usr.gib(1)
|
||||
ticker.mode:abominationwins = 1
|
||||
|
||||
/client/proc/hunt()
|
||||
set name = "Hunt"
|
||||
set category = "Abomination"
|
||||
set desc = ""
|
||||
|
||||
var/list/candidates = list()
|
||||
|
||||
for(var/mob/living/carbon/human/H in player_list)
|
||||
if(!H.client || H.client == src) continue
|
||||
//if(!H.client) continue
|
||||
candidates.Add(H)
|
||||
|
||||
usr.visible_message(text("\red <B>[usr]'s flesh ripples and parts, revealing dozens of eyes poking from its surface. They all glance wildly around for a few moments before receding again.</B>"))
|
||||
|
||||
var/mob/living/carbon/human/H = pick(candidates)
|
||||
|
||||
if(!H) return
|
||||
|
||||
var/filename="crmap[ckey].tmp"
|
||||
var/html="<html><body bgcolor=black><table border=0 cellspacing=0 cellpadding=0>"
|
||||
var/denytypes[0]
|
||||
var/tilesizex=32
|
||||
var/tilesizey=32
|
||||
//If the temp. file exists, delete it
|
||||
src << browse("<h2>Sensing prey...</h2>", "window=hunt")
|
||||
if (fexists(filename)) fdel(filename)
|
||||
|
||||
//Display everything in the world
|
||||
for (var/y=H.y-3,y<=H.y+3,y++)
|
||||
html+="</tr><tr>"
|
||||
text2file(html,filename)
|
||||
html=""
|
||||
sleep(-1)
|
||||
//for (var/x=H.x-5,x<=H.x+5,x++)
|
||||
for(var/x=H.x-3, x<=H.x+3, x++)
|
||||
//Turfs
|
||||
var/turf/T=locate(x,y,H.z)
|
||||
if (!T) continue
|
||||
var/icon/I=icon(T.icon,T.icon_state)
|
||||
var/imgstring=replacetext("[T.type]-[T.icon_state]","/","_")
|
||||
|
||||
//Movable atoms
|
||||
for (var/atom/movable/A in T)
|
||||
//Make sure it's allowed to be displayed
|
||||
var/allowed=1
|
||||
for (var/X in denytypes)
|
||||
if (istype(A,X))
|
||||
allowed=0
|
||||
break
|
||||
if (!allowed) continue
|
||||
|
||||
if (A.icon) I.Blend(icon(A.icon,A.icon_state,A.dir),ICON_OVERLAY)
|
||||
imgstring+=replacetext("__[A.type]_[A.icon_state]","/","_")
|
||||
|
||||
//Output it
|
||||
src << browse_rsc(I,"[imgstring].dmi")
|
||||
html+="<td><img src=\"[imgstring].dmi\" width=[tilesizex] height=[tilesizey]></td>"
|
||||
|
||||
text2file("</table></body></html>",filename)
|
||||
|
||||
//Display it
|
||||
src << browse(file(filename),"window=hunt")
|
||||
|
||||
|
||||
|
||||
/client/proc/howl() // This is just a way for the Abomination to make the game more atmospheric periodically.
|
||||
set name = "Howl"
|
||||
set category = "Abomination"
|
||||
set desc = ""
|
||||
|
||||
usr.visible_message(text("\red <B>[usr]'s form warbles and distorts before settling back into its grotesque shape once more.</B>"))
|
||||
// Play a random spooky sound - maybe cause some visual, non-mechanical effects to appear at random for a few seconds.
|
||||
|
||||
src.verbs -= /client/proc/howl
|
||||
spawn(rand(300,1800)) src.verbs += /client/proc/howl
|
||||
|
||||
/obj/item/weapon/rubyweapon
|
||||
desc = ""
|
||||
name = "wepon"
|
||||
icon_state = "wepon"
|
||||
w_class = 3.0
|
||||
throwforce = 60.0
|
||||
throw_speed = 2
|
||||
throw_range = 20
|
||||
force = 24.0
|
||||
var/mob/owner
|
||||
|
||||
proc/check_owner()
|
||||
if(!owner)
|
||||
sleep(300)
|
||||
if(!owner)
|
||||
spawn() search_for_new_owner()
|
||||
else
|
||||
spawn(1800) check_owner()
|
||||
|
||||
proc/search_for_new_owner()
|
||||
var/list/possible_owners = list()
|
||||
for(var/mob/living/carbon/human/H in mob_list)
|
||||
possible_owners.Add(H)
|
||||
|
||||
var/mob/living/carbon/human/H = pick(possible_owners)
|
||||
// Send message to H
|
||||
// Take a snapshot of the item's location, browse it to H
|
||||
spawn(rand(600,1800)) search_for_new_owner()
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
// Blow all lights nearby
|
||||
Reference in New Issue
Block a user