Adds Abduction Mode

This commit is contained in:
AnturK
2015-04-13 18:40:15 +02:00
parent 77cd7476a1
commit 6fa8e5f02d
31 changed files with 1565 additions and 51 deletions
+12
View File
@@ -480,6 +480,18 @@
dat += "<td><A href='?priv_msg=[M.ckey]'>PM</A></td></tr>"
dat += "</table>"
if(ticker.mode.abductors.len)
dat += "<br><table cellspacing=5><tr><td><B>Abductors</B></td><td></td><td></td></tr>"
for(var/datum/mind/abductor in ticker.mode.abductors)
var/mob/M = abductor.current
if(M)
dat += "<tr><td><a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(logged out)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?priv_msg=[M.ckey]'>PM</A></td>"
dat += "<td><A HREF='?_src_=holder;traitor=\ref[M]'>Show Objective</A></td></tr>"
else
dat += "<tr><td><i>Abductor not found!</i></td></tr>"
dat += "</table>"
if(istype(ticker.mode, /datum/game_mode/blob))
var/datum/game_mode/blob/mode = ticker.mode
dat += "<br><table cellspacing=5><tr><td><B>Blob</B></td><td></td><td></td></tr>"
+5
View File
@@ -74,6 +74,11 @@
log_admin("[key_name(usr)] created a emergency response team.")
if(!src.makeEmergencyresponseteam())
usr << "<span class='danger'>Unfortunatly there were not enough candidates available.</span>"
if("14")
message_admins("[key_name(usr)] created abductor team.")
log_admin("[key_name(usr)] created abductor team.")
if(!src.makeAbductorTeam())
usr << "<span class='danger'>Unfortunatly there were not enough candidates available.</span>"
else if(href_list["forceevent"])
var/datum/round_event_control/E = locate(href_list["forceevent"]) in SSevent.control
@@ -22,6 +22,7 @@ client/proc/one_click_antag()
<a href='?src=\ref[src];makeAntag=7'>Make Nuke Team (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=10'>Make Deathsquad (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=13'>Make Emergency Response Team (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=14'>Make Abductor Team (Requires Ghosts)</a><br>
"}
/* These dont work just yet
Ninja, aliens and deathsquad I have not looked into yet
@@ -541,6 +542,61 @@ client/proc/one_click_antag()
return
//Abductors
/datum/admins/proc/makeAbductorTeam()
var/list/mob/dead/observer/candidates = list()
var/time_passed = world.time
for(var/mob/dead/observer/G in player_list)
spawn(0)
switch(alert(G,"Do you wish to be considered for Abductor Team?","Please answer in 30 seconds!","Yes","No"))
if("Yes")
if((world.time-time_passed)>300)//If more than 30 game seconds passed.
return
candidates += G
if("No")
return
else
return
sleep(300)
for(var/mob/dead/observer/G in candidates)
if(!G.key)
candidates.Remove(G)
if(candidates.len >= 2)
//Oh god why we can't have static functions
var/teams_finished = round(ticker.mode.abductors.len / 2)
var/number = teams_finished + 1
var/datum/game_mode/abduction/temp = new
var/agent_mind = pick(candidates)
candidates -= agent_mind
var/scientist_mind = pick(candidates)
var/mob/living/carbon/human/agent=makeBody(agent_mind)
var/mob/living/carbon/human/scientist=makeBody(scientist_mind)
agent_mind = agent.mind
scientist_mind = scientist.mind
temp.scientists.len = number
temp.agents.len = number
temp.abductors.len = 2*number
temp.team_objectives.len = number
temp.team_names.len = number
temp.scientists[number] = scientist_mind
temp.agents[number] = agent_mind
temp.abductors = list(agent_mind,scientist_mind)
temp.make_abductor_team(number)
temp.post_setup_team(number)
ticker.mode.abductors += temp.abductors
return 1
else
return
/datum/admins/proc/makeBody(var/mob/dead/observer/G_found) // Uses stripped down and bastardized code from respawn character
if(!G_found || !G_found.key) return
+3 -2
View File
@@ -17,7 +17,8 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set
"ninja", //10
"monkey" = /datum/game_mode/monkey, //11
"gangster" = /datum/game_mode/gang, //12
"shadowling" = /datum/game_mode/shadowling //13
"shadowling" = /datum/game_mode/shadowling, //13
"abductor" = /datum/game_mode/abduction //14
)
@@ -888,4 +889,4 @@ datum/preferences
character.backbag = backbag
character.update_body()
character.update_hair()
character.update_hair()
@@ -49,4 +49,6 @@
var/list/organs = list() //Gets filled up in the constructor (human.dm, New() proc.
var/datum/martial_art/martial_art = null
var/datum/martial_art/martial_art = null
var/name_override //For temporary visible name changes
@@ -39,6 +39,8 @@
/mob/living/carbon/human/get_visible_name()
var/face_name = get_face_name("")
var/id_name = get_id_name("")
if(name_override)
return name_override
if(face_name)
if(id_name && (id_name != face_name))
return "[face_name] (as [id_name])"
@@ -1,12 +1,5 @@
// This code handles different species in the game.
#define SPECIES_LAYER 26
#define BODY_BEHIND_LAYER 25
#define BODY_LAYER 24
#define BODY_ADJ_LAYER 23
#define HAIR_LAYER 9
#define BODY_FRONT_LAYER 2
#define TINT_IMPAIR 2
#define TINT_BLIND 3
@@ -1279,13 +1272,6 @@
H.AddLuminosity(-3)
H.update_fire()
#undef SPECIES_LAYER
#undef BODY_BEHIND_LAYER
#undef BODY_LAYER
#undef BODY_ADJ_LAYER
#undef HAIR_LAYER
#undef BODY_FRONT_LAYER
#undef HUMAN_MAX_OXYLOSS
#undef HUMAN_CRIT_MAX_OXYLOSS
@@ -317,3 +317,29 @@
id = "zombie"
sexes = 0
meat = /obj/item/weapon/reagent_containers/food/snacks/meat/slab/human/mutant/zombie
/datum/species/abductor
name = "Abductor"
id = "abductor"
darksight = 3
say_mod = "gibbers"
sexes = 0
invis_sight = SEE_INVISIBLE_LEVEL_ONE
specflags = list(NOBLOOD,NOBREATH)
var/scientist = 0 // vars to not pollute spieces list with castes
var/agent = 0
var/team = 1
/datum/species/abductor/handle_speech(message)
//Hacks
var/mob/living/carbon/human/user = usr
for(var/mob/living/carbon/human/H in mob_list)
if(H.dna.species.id != "abductor")
continue
else
var/datum/species/abductor/target_spec = H.dna.species
if(target_spec.team == team)
H << "<i><font color=#800080><b>[user.name]:</b> [message]</font></i>"
//return - technically you can add more aliens to a team
return ""
@@ -626,6 +626,14 @@ Please contact me on #coderbus IRC. ~Carnie x
var/standing = image("icon"=female_clothing_icons["[t_color]_s"], "layer"=-layer)
return(standing)
/mob/living/carbon/human/proc/get_overlays_copy(var/list/unwantedLayers)
var/list/out = new
for(var/i=1;i<=TOTAL_LAYERS;i++)
if(overlays_standing[i])
if(i in unwantedLayers)
continue
out += overlays_standing[i]
return out
//Human Overlays Indexes/////////
#undef SPECIES_LAYER
+3
View File
@@ -442,6 +442,9 @@ proc/is_special_character(mob/M) // returns 1 for special characters and 2 for h
if("monkey")
if(M.viruses && (locate(/datum/disease/transformation/jungle_fever) in M.viruses))
return 2
if("abductor")
if(M.mind in ticker.mode.abductors)
return 2
return 1
return 0
+6
View File
@@ -8,6 +8,12 @@
if(locate(S.type) in M.surgeries)
continue
if(S.user_species_restricted)
if(!istype(user, /mob/living/carbon/human))
continue
var/mob/living/carbon/human/doc = user
if(!(doc.dna.species.id in S.user_species_ids))
continue
if(S.target_must_be_dead && M.stat != DEAD)
continue
if(S.target_must_be_fat && !(M.disabilities & FAT))
+2 -1
View File
@@ -9,7 +9,8 @@
var/target_must_be_fat = 0 //Needs to be fat
var/requires_organic_chest = 0 //Prevents you from performing an operation on Robotic chests***
var/has_multi_loc = 0 //Multiple locations - RR
var/user_species_restricted = 0 //Surgery only performable BY species
var/list/user_species_ids
/datum/surgery/proc/next_step(mob/user, mob/living/carbon/target)
if(step_in_progress) return