Merge pull request #181 from alex-gh/objective_fixes

Objective fixes
This commit is contained in:
alex-gh
2014-04-18 07:30:01 +02:00
2 changed files with 9 additions and 17 deletions
+7 -15
View File
@@ -323,22 +323,14 @@ datum/objective/hijack
return 1
datum/objective/speciesist
var/datum/species/speciesist_target = null
var/is_human = 0
find_target()
var/list/possible_targets = list()
var/mob/living/carbon/human/O = owner.current
for(var/datum/mind/possible_target in ticker.minds)
if(ishuman(possible_target.current))
var/mob/living/carbon/human/M = possible_target.current
if (M.species != O.species)
possible_targets += M.species
if(possible_targets.len > 0)
speciesist_target = pick(possible_targets)
explanation_text = "Do not allow any [speciesist_target.name]s to escape on the shuttle."
if(istype(owner.current,/mob/living/carbon/human/human))
explanation_text = "Do not allow any non-humans to escape on the shuttle."
is_human = 1
else
explanation_text = "Free Objective"
return speciesist_target
explanation_text = "Do not allow any humans to escape on the shuttle."
return 1
check_completion()
if(emergency_shuttle.location<2)
@@ -346,7 +338,7 @@ datum/objective/speciesist
var/area/shuttle = locate(/area/shuttle/escape/centcom)
for(var/mob/living/carbon/human/player in player_list)
if (player.mind)
if (player.species == speciesist_target)
if (is_human ? !istype(player,/mob/living/carbon/human/human) : istype(player,/mob/living/carbon/human/human))
if(player.stat != DEAD) //they're not dead!
if(get_turf(player) in shuttle)
return 0
+2 -2
View File
@@ -96,12 +96,12 @@
else
switch(rand(1,100))
if(1 to 25)
if(1 to 30)
var/datum/objective/assassinate/kill_objective = new
kill_objective.owner = traitor
kill_objective.find_target()
traitor.objectives += kill_objective
if(26 to 40)
if(31 to 40)
var/datum/objective/debrain/debrain_objective = new
debrain_objective.owner = traitor
debrain_objective.find_target()