Reworked survivalist
This commit is contained in:
@@ -787,40 +787,10 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
/datum/objective/destroy/internal
|
||||
var/stolen = FALSE //Have we already eliminated this target?
|
||||
|
||||
/datum/objective/steal_five_of_type
|
||||
name = "steal five of"
|
||||
explanation_text = "Steal at least five items!"
|
||||
var/list/wanted_items = list(/obj/item)
|
||||
|
||||
/datum/objective/steal_five_of_type/New()
|
||||
..()
|
||||
wanted_items = typecacheof(wanted_items)
|
||||
|
||||
/datum/objective/steal_five_of_type/summon_guns
|
||||
name = "steal guns"
|
||||
explanation_text = "Steal at least five guns!"
|
||||
wanted_items = list(/obj/item/gun)
|
||||
|
||||
/datum/objective/steal_five_of_type/summon_magic
|
||||
name = "steal magic"
|
||||
explanation_text = "Steal at least five magical artefacts!"
|
||||
wanted_items = list(/obj/item/spellbook, /obj/item/gun/magic, /obj/item/clothing/suit/space/hardsuit/wizard, /obj/item/scrying, /obj/item/antag_spawner/contract, /obj/item/necromantic_stone)
|
||||
|
||||
/datum/objective/steal_five_of_type/check_completion()
|
||||
var/list/datum/mind/owners = get_owners()
|
||||
var/stolen_count = 0
|
||||
for(var/datum/mind/M in owners)
|
||||
if(!isliving(M.current))
|
||||
continue
|
||||
var/list/all_items = M.current.GetAllContents() //this should get things in cheesewheels, books, etc.
|
||||
for(var/obj/I in all_items) //Check for wanted items
|
||||
if(is_type_in_typecache(I, wanted_items))
|
||||
stolen_count++
|
||||
return stolen_count >= 5
|
||||
|
||||
//Created by admin tools
|
||||
/datum/objective/custom
|
||||
name = "custom"
|
||||
completable = FALSE
|
||||
|
||||
/datum/objective/custom/admin_edit(mob/admin)
|
||||
var/expl = stripped_input(admin, "Custom objective:", "Objective", explanation_text)
|
||||
@@ -998,4 +968,33 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
command_staff_only = TRUE
|
||||
|
||||
|
||||
/datum/objective/horde
|
||||
name = "horde"
|
||||
var/obj/item/horded_item = null
|
||||
|
||||
/datum/objective/horde/get_target()
|
||||
return horded_item
|
||||
|
||||
/datum/objective/horde/proc/set_target(obj/item/I)
|
||||
if(item)
|
||||
horded_item = I
|
||||
explanation_text = "Keep [I] on your person at all costs."
|
||||
return horded_item
|
||||
else
|
||||
explanation_text = "Free objective"
|
||||
return
|
||||
|
||||
/datum/objective/horde/check_completion()
|
||||
var/list/datum/mind/owners = get_owners()
|
||||
if(!horded_item)
|
||||
return TRUE
|
||||
for(var/datum/mind/M in owners)
|
||||
if(!isliving(M.current))
|
||||
continue
|
||||
|
||||
var/list/all_items = M.current.GetAllContents() //this should get things in cheesewheels, books, etc.
|
||||
|
||||
for(var/obj/I in all_items) //Check for items
|
||||
if(I == horded_item)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
name = "Survivalist"
|
||||
show_in_antagpanel = FALSE
|
||||
show_name_in_check_antagonists = TRUE
|
||||
blacklisted_quirks = list("Pacifist") // mutes are allowed
|
||||
var/greet_message = ""
|
||||
|
||||
/datum/antagonist/survivalist/proc/forge_objectives()
|
||||
@@ -19,7 +20,7 @@
|
||||
owner.announce_objectives()
|
||||
|
||||
/datum/antagonist/survivalist/guns
|
||||
greet_message = "Your own safety matters above all else, and the only way to ensure your safety is to stockpile weapons! Grab as many guns as possible, by any means necessary. Kill anyone who gets in your way."
|
||||
greet_message = "Your own safety matters above all else, and the only way to ensure your safety is to stockpile weapons! Grab as many guns as possible, and don't let anyone take them!"
|
||||
|
||||
/datum/antagonist/survivalist/guns/forge_objectives()
|
||||
var/datum/objective/steal_five_of_type/summon_guns/guns = new
|
||||
@@ -29,10 +30,10 @@
|
||||
|
||||
/datum/antagonist/survivalist/magic
|
||||
name = "Amateur Magician"
|
||||
greet_message = "Grow your newfound talent! Grab as many magical artefacts as possible, by any means necessary. Kill anyone who gets in your way."
|
||||
greet_message = "This magic stuff is... so powerful. You want more. More! They want your power. They can't have it! Don't let them have it!"
|
||||
|
||||
/datum/antagonist/survivalist/magic/forge_objectives()
|
||||
var/datum/objective/steal_five_of_type/summon_magic/magic = new
|
||||
magic.owner = owner
|
||||
objectives += magic
|
||||
..()
|
||||
..()
|
||||
|
||||
@@ -102,6 +102,12 @@ GLOBAL_VAR_INIT(summon_magic_triggered, FALSE)
|
||||
var/gun_type = pick(GLOB.summoned_guns)
|
||||
var/obj/item/gun/G = new gun_type(get_turf(H))
|
||||
G.unlock()
|
||||
var/datum/antagonist/survalist/guns/our_antag_datum = has_antag_datum(/datum/antagonist/survivalist/guns)
|
||||
if(our_antag_datum)
|
||||
var/datum/objective/horde_item/O = new()
|
||||
O.owner = H
|
||||
O.set_target(G)
|
||||
our_antag_datum.objectives += O
|
||||
playsound(get_turf(H),'sound/magic/summon_guns.ogg', 50, 1)
|
||||
|
||||
var/in_hand = H.put_in_hands(G) // not always successful
|
||||
@@ -128,6 +134,13 @@ GLOBAL_VAR_INIT(summon_magic_triggered, FALSE)
|
||||
var/obj/item/M = new magic_type(get_turf(H))
|
||||
playsound(get_turf(H),'sound/magic/summon_magic.ogg', 50, 1)
|
||||
|
||||
var/datum/antagonist/survalist/magic/our_antag_datum = has_antag_datum(/datum/antagonist/survivalist/magic)
|
||||
if(our_antag_datum)
|
||||
var/datum/objective/horde_item/O = new()
|
||||
O.owner = H
|
||||
O.set_target(M)
|
||||
our_antag_datum.objectives += O
|
||||
|
||||
var/in_hand = H.put_in_hands(M)
|
||||
|
||||
to_chat(H, "<span class='warning'>\A [M] appears [in_hand ? "in your hand" : "at your feet"]!</span>")
|
||||
|
||||
Reference in New Issue
Block a user