mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-10 06:34:45 +01:00
Datumizes Wishgranter
This commit is contained in:
@@ -7,6 +7,11 @@
|
||||
#define STATIC_LIGHT 6
|
||||
#define STATIC_ENVIRON 7
|
||||
|
||||
//Power use
|
||||
#define NO_POWER_USE 0
|
||||
#define IDLE_POWER_USE 1
|
||||
#define ACTIVE_POWER_USE 2
|
||||
|
||||
//computer3 error codes, move lower in the file when it passes dev -Sayu
|
||||
#define PROG_CRASH 1 // Generic crash
|
||||
#define MISSING_PERIPHERAL 2 // Missing hardware
|
||||
|
||||
+10
-6
@@ -1217,12 +1217,8 @@
|
||||
message_admins("[key_name_admin(usr)] has given [key_name_admin(current)] an uplink")
|
||||
|
||||
else if(href_list["obj_announce"])
|
||||
var/obj_count = 1
|
||||
to_chat(current, "<BR><span class='userdanger'>Your current objectives:</span>")
|
||||
for(var/datum/objective/objective in objectives)
|
||||
to_chat(current, "<B>Objective #[obj_count]</B>: [objective.explanation_text]")
|
||||
obj_count++
|
||||
current << 'sound/ambience/alarm4.ogg'
|
||||
announce_objectives()
|
||||
SEND_SOUND(current, sound('sound/ambience/alarm4.ogg'))
|
||||
log_admin("[key_name(usr)] has announced [key_name(current)]'s objectives")
|
||||
message_admins("[key_name_admin(usr)] has announced [key_name_admin(current)]'s objectives")
|
||||
|
||||
@@ -1282,6 +1278,14 @@
|
||||
else if(A.type == datum_type)
|
||||
return A
|
||||
|
||||
/datum/mind/proc/announce_objectives()
|
||||
var/obj_count = 1
|
||||
to_chat(current, "<span class='notice'>Your current objectives:</span>")
|
||||
for(var/objective in objectives)
|
||||
var/datum/objective/O = objective
|
||||
to_chat(current, "<B>Objective #[obj_count]</B>: [O.explanation_text]")
|
||||
obj_count++
|
||||
|
||||
/datum/mind/proc/find_syndicate_uplink()
|
||||
var/list/L = current.get_contents()
|
||||
for(var/obj/item/I in L)
|
||||
|
||||
@@ -1,62 +1,42 @@
|
||||
/obj/machinery/wish_granter
|
||||
name = "Wish Granter"
|
||||
name = "wish granter"
|
||||
desc = "You're not so sure about this, anymore..."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "syndbeacon"
|
||||
|
||||
use_power = 0
|
||||
anchored = 1
|
||||
density = 1
|
||||
var/datum/mind/target
|
||||
var/list/types = list()
|
||||
var/inuse = 0
|
||||
use_power = NO_POWER_USE
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
|
||||
/obj/machinery/wish_granter/New()
|
||||
for(var/supname in all_superheroes)
|
||||
types |= supname
|
||||
..()
|
||||
var/charges = 1
|
||||
var/insisting = FALSE
|
||||
|
||||
/obj/machinery/wish_granter/attack_hand(var/mob/user as mob)
|
||||
usr.set_machine(src)
|
||||
/obj/machinery/wish_granter/attack_hand(mob/living/carbon/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(charges <= 0)
|
||||
to_chat(user, "The Wish Granter lies silent.")
|
||||
return
|
||||
|
||||
if(!istype(user, /mob/living/carbon/human))
|
||||
else if(!ishuman(user))
|
||||
to_chat(user, "You feel a dark stirring inside of the Wish Granter, something you want nothing of. Your instincts are better than any man's.")
|
||||
return
|
||||
|
||||
if(is_special_character(user))
|
||||
else if(is_special_character(user))
|
||||
to_chat(user, "Even to a heart as dark as yours, you know nothing good will come of this. Something instinctual makes you pull away.")
|
||||
return
|
||||
|
||||
if(inuse)
|
||||
to_chat(user, "Someone is already communing with the Wish Granter.")
|
||||
return
|
||||
else if(!insisting)
|
||||
to_chat(user, "Your first touch makes the Wish Granter stir, listening to you. Are you really sure you want to do this?")
|
||||
insisting = TRUE
|
||||
|
||||
to_chat(user, "The power of the Wish Granter have turned you into the superhero the station deserves. You are a masked vigilante, and answer to no man. Will you use your newfound strength to protect the innocent, or will you hunt the guilty?")
|
||||
|
||||
inuse = 1
|
||||
var/wish
|
||||
if(types.len == 1)
|
||||
wish = pick(types)
|
||||
else
|
||||
wish = input("You want to become...","Wish") as null|anything in types
|
||||
if(!wish)
|
||||
inuse=0
|
||||
return
|
||||
types -= wish
|
||||
var/mob/living/carbon/human/M = user
|
||||
var/datum/superheroes/S = all_superheroes[wish]
|
||||
if(S)
|
||||
S.create(M)
|
||||
inuse=0
|
||||
to_chat(user, "You speak. [pick("I want the station to disappear", "Humanity is corrupt, mankind must be destroyed", "I want to be rich", "I want to rule the world", "I want immortality.")]. The Wish Granter answers.")
|
||||
to_chat(user, "Your head pounds for a moment, before your vision clears. You are the avatar of the Wish Granter, and your power is LIMITLESS! And it's all yours. You need to make sure no one can take it from you. No one can know, first.")
|
||||
|
||||
//Remove the wishgranter or teleport it randomly on the station
|
||||
if(!types.len)
|
||||
to_chat(user, "The wishgranter slowly fades into mist...")
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
var/impact_area = findEventArea()
|
||||
var/turf/T = pick(get_area_turfs(impact_area))
|
||||
if(T)
|
||||
src.loc = T
|
||||
return
|
||||
charges--
|
||||
insisting = FALSE
|
||||
|
||||
user.mind.add_antag_datum(/datum/antagonist/wishgranter)
|
||||
|
||||
to_chat(user, "You have a very bad feeling about this.")
|
||||
@@ -0,0 +1,81 @@
|
||||
/datum/antagonist/wishgranter
|
||||
name = "Wishgranter Avatar"
|
||||
|
||||
/datum/antagonist/wishgranter/proc/forge_objectives()
|
||||
var/datum/objective/hijack/hijack = new
|
||||
hijack.owner = owner
|
||||
objectives += hijack
|
||||
owner.objectives |= objectives
|
||||
|
||||
/datum/antagonist/wishgranter/on_gain()
|
||||
owner.special_role = "Avatar of the Wish Granter"
|
||||
forge_objectives()
|
||||
. = ..()
|
||||
give_powers()
|
||||
|
||||
/datum/antagonist/wishgranter/greet()
|
||||
to_chat(owner.current, "<B>Your inhibitions are swept away, the bonds of loyalty broken, you are free to murder as you please!</B>")
|
||||
owner.announce_objectives()
|
||||
|
||||
/datum/antagonist/wishgranter/proc/give_powers()
|
||||
var/mob/living/carbon/human/H = owner.current
|
||||
if(!istype(H))
|
||||
return
|
||||
H.ignore_gene_stability = TRUE
|
||||
H.dna.SetSEState(HULKBLOCK, TRUE)
|
||||
genemutcheck(H, HULKBLOCK, null, MUTCHK_FORCED)
|
||||
|
||||
H.dna.SetSEState(XRAYBLOCK, TRUE)
|
||||
genemutcheck(H, XRAYBLOCK, null, MUTCHK_FORCED)
|
||||
|
||||
H.dna.SetSEState(FIREBLOCK, TRUE)
|
||||
genemutcheck(H, FIREBLOCK, null, MUTCHK_FORCED)
|
||||
|
||||
H.dna.SetSEState(COLDBLOCK, TRUE)
|
||||
genemutcheck(H, COLDBLOCK, null, MUTCHK_FORCED)
|
||||
|
||||
H.dna.SetSEState(TELEBLOCK, TRUE)
|
||||
genemutcheck(H, TELEBLOCK, null, MUTCHK_FORCED)
|
||||
|
||||
H.dna.SetSEState(INCREASERUNBLOCK, TRUE)
|
||||
genemutcheck(H, INCREASERUNBLOCK, null, MUTCHK_FORCED)
|
||||
|
||||
H.dna.SetSEState(BREATHLESSBLOCK, TRUE)
|
||||
genemutcheck(H, BREATHLESSBLOCK, null, MUTCHK_FORCED)
|
||||
|
||||
H.dna.SetSEState(REGENERATEBLOCK, TRUE)
|
||||
genemutcheck(H, REGENERATEBLOCK, null, MUTCHK_FORCED)
|
||||
|
||||
H.dna.SetSEState(SHOCKIMMUNITYBLOCK, TRUE)
|
||||
genemutcheck(H, SHOCKIMMUNITYBLOCK, null, MUTCHK_FORCED)
|
||||
|
||||
H.dna.SetSEState(SMALLSIZEBLOCK, TRUE)
|
||||
genemutcheck(H, SMALLSIZEBLOCK, null, MUTCHK_FORCED)
|
||||
|
||||
H.dna.SetSEState(SOBERBLOCK, TRUE)
|
||||
genemutcheck(H, SOBERBLOCK, null, MUTCHK_FORCED)
|
||||
|
||||
H.dna.SetSEState(PSYRESISTBLOCK, TRUE)
|
||||
genemutcheck(H, PSYRESISTBLOCK, null, MUTCHK_FORCED)
|
||||
|
||||
H.dna.SetSEState(SHADOWBLOCK, TRUE)
|
||||
genemutcheck(H, SHADOWBLOCK, null, MUTCHK_FORCED)
|
||||
|
||||
H.dna.SetSEState(CRYOBLOCK, TRUE)
|
||||
genemutcheck(H, CRYOBLOCK, null, MUTCHK_FORCED)
|
||||
|
||||
H.dna.SetSEState(EATBLOCK, TRUE)
|
||||
genemutcheck(H, EATBLOCK, null, MUTCHK_FORCED)
|
||||
|
||||
H.dna.SetSEState(JUMPBLOCK, TRUE)
|
||||
genemutcheck(H, JUMPBLOCK, null, MUTCHK_FORCED)
|
||||
|
||||
H.dna.SetSEState(SUPERFARTBLOCK, TRUE)
|
||||
genemutcheck(H, SUPERFARTBLOCK, null, MUTCHK_FORCED)
|
||||
|
||||
H.dna.SetSEState(IMMOLATEBLOCK, TRUE)
|
||||
genemutcheck(H, IMMOLATEBLOCK, null, MUTCHK_FORCED)
|
||||
|
||||
H.mutations.Add(LASER)
|
||||
H.update_mutations()
|
||||
H.update_body()
|
||||
+6
-5
@@ -239,11 +239,6 @@
|
||||
#include "code\datums\uplink_item.dm"
|
||||
#include "code\datums\vision_override.dm"
|
||||
#include "code\datums\vr.dm"
|
||||
#include "code\datums\antagonists\antag_datum.dm"
|
||||
#include "code\datums\antagonists\antag_helpers.dm"
|
||||
#include "code\datums\antagonists\antag_hud.dm"
|
||||
#include "code\datums\antagonists\antag_spawner.dm"
|
||||
#include "code\datums\antagonists\antag_team.dm"
|
||||
#include "code\datums\cache\air_alarm.dm"
|
||||
#include "code\datums\cache\apc.dm"
|
||||
#include "code\datums\cache\cache.dm"
|
||||
@@ -1135,6 +1130,12 @@
|
||||
#include "code\modules\alarm\fire_alarm.dm"
|
||||
#include "code\modules\alarm\motion_alarm.dm"
|
||||
#include "code\modules\alarm\power_alarm.dm"
|
||||
#include "code\modules\antagonists\_common\antag_datum.dm"
|
||||
#include "code\modules\antagonists\_common\antag_helpers.dm"
|
||||
#include "code\modules\antagonists\_common\antag_hud.dm"
|
||||
#include "code\modules\antagonists\_common\antag_spawner.dm"
|
||||
#include "code\modules\antagonists\_common\antag_team.dm"
|
||||
#include "code\modules\antagonists\wishgranter\wishgranter.dm"
|
||||
#include "code\modules\arcade\arcade_base.dm"
|
||||
#include "code\modules\arcade\arcade_prize.dm"
|
||||
#include "code\modules\arcade\claw_game.dm"
|
||||
|
||||
Reference in New Issue
Block a user