Actually cleans up un-needed files. (#210)
* actually gets rid of excess files * obsolete admin files
This commit is contained in:
@@ -1,45 +0,0 @@
|
||||
var/global/clockwork_construction_value = 0 //The total value of all structures built by the clockwork cult
|
||||
var/global/clockwork_caches = 0 //How many clockwork caches exist in the world (not each individual)
|
||||
var/global/clockwork_daemons = 0 //How many daemons exist in the world
|
||||
var/global/list/clockwork_generals_invoked = list("nezbere" = FALSE, "sevtug" = FALSE, "nzcrentr" = FALSE, "inath-neq" = FALSE) //How many generals have been recently invoked
|
||||
var/global/list/all_clockwork_objects = list() //All clockwork items, structures, and effects in existence
|
||||
var/global/list/all_clockwork_mobs = list() //All clockwork SERVANTS (not creatures) in existence
|
||||
var/global/list/clockwork_component_cache = list("belligerent_eye" = 0, "vanguard_cogwheel" = 0, "guvax_capacitor" = 0, "replicant_alloy" = 0, "hierophant_ansible" = 0) //The pool of components that caches draw from
|
||||
var/global/ratvar_awakens = FALSE //If Ratvar has been summoned
|
||||
|
||||
#define SCRIPTURE_PERIPHERAL 0 //Scripture tiers; peripherals should never be used
|
||||
#define SCRIPTURE_DRIVER 1
|
||||
#define SCRIPTURE_SCRIPT 2
|
||||
#define SCRIPTURE_APPLICATION 3
|
||||
#define SCRIPTURE_REVENANT 4
|
||||
#define SCRIPTURE_JUDGEMENT 5
|
||||
|
||||
#define SLAB_PRODUCTION_TIME 600 //how long(deciseconds) slabs require to produce a single component; defaults to 1 minute
|
||||
|
||||
#define CACHE_PRODUCTION_TIME 900 //how long(deciseconds) caches require to produce a component; defaults to 1 minute 30 seconds
|
||||
|
||||
#define LOWER_PROB_PER_COMPONENT 10 //how much each component in the cache reduces the weight of getting another of that component type
|
||||
|
||||
#define MAX_COMPONENTS_BEFORE_RAND 10*LOWER_PROB_PER_COMPONENT //the number of each component, times LOWER_PROB_PER_COMPONENT, you need to have before component generation will become random
|
||||
|
||||
#define CLOCKWORK_GENERAL_COOLDOWN 3000 //how long clockwork generals go on cooldown after use, defaults to 5 minutes
|
||||
|
||||
//porselytizer defines
|
||||
#define REPLICANT_ALLOY_UNIT 100 //how much each piece of replicant alloy gives in a clockwork proselytizer
|
||||
|
||||
#define REPLICANT_STANDARD REPLICANT_ALLOY_UNIT*0.2 //how much alloy is in anything else; doesn't matter as much as the following
|
||||
|
||||
#define REPLICANT_FLOOR REPLICANT_ALLOY_UNIT*0.1 //how much alloy is in a clockwork floor, determines the cost of clockwork floor production
|
||||
|
||||
#define REPLICANT_WALL_MINUS_FLOOR REPLICANT_ALLOY_UNIT*0.4 //amount of alloy in a clockwork wall, determines the cost of clockwork wall production
|
||||
|
||||
#define REPLICANT_WALL_TOTAL REPLICANT_WALL_MINUS_FLOOR+REPLICANT_FLOOR //how much alloy is in a clockwork wall and the floor under it
|
||||
|
||||
//Ark defines
|
||||
#define GATEWAY_SUMMON_RATE 2 //the time amount the Gateway to the Celestial Derelict gets each process tick; defaults to 2 per tick
|
||||
|
||||
#define GATEWAY_REEBE_FOUND 100 //when progress is at or above this, the gateway finds reebe and begins drawing power
|
||||
|
||||
#define GATEWAY_RATVAR_COMING 250 //when progress is at or above this, ratvar has entered and is coming through the gateway
|
||||
|
||||
#define GATEWAY_RATVAR_ARRIVAL 300 //when progress is at or above this, game over ratvar's here everybody go home
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,595 +0,0 @@
|
||||
////////////////////////
|
||||
// CLOCKWORK MACHINES //
|
||||
////////////////////////
|
||||
//not-actually-machines
|
||||
|
||||
/obj/structure/clockwork/powered
|
||||
var/obj/machinery/power/apc/target_apc
|
||||
var/active = FALSE
|
||||
var/needs_power = TRUE
|
||||
var/active_icon = null //icon_state while process() is being called
|
||||
var/inactive_icon = null //icon_state while process() isn't being called
|
||||
|
||||
/obj/structure/clockwork/powered/examine(mob/user)
|
||||
..()
|
||||
if(is_servant_of_ratvar(user) || isobserver(user))
|
||||
var/powered = total_accessable_power()
|
||||
user << "<span class='[powered ? "brass":"alloy"]'>It has access to [powered == INFINITY ? "INFINITY":"[powered]"]W of power.</span>"
|
||||
|
||||
/obj/structure/clockwork/powered/Destroy()
|
||||
SSfastprocess.processing -= src
|
||||
SSobj.processing -= src
|
||||
return ..()
|
||||
|
||||
/obj/structure/clockwork/powered/process()
|
||||
var/powered = total_accessable_power()
|
||||
return powered == PROCESS_KILL ? 25 : powered //make sure we don't accidentally return the arbitrary PROCESS_KILL define
|
||||
|
||||
/obj/structure/clockwork/powered/proc/toggle(fast_process, mob/living/user)
|
||||
if(user)
|
||||
if(!is_servant_of_ratvar(user))
|
||||
return 0
|
||||
user.visible_message("<span class='notice'>[user] [active ? "dis" : "en"]ables [src].</span>", "<span class='brass'>You [active ? "dis" : "en"]able [src].</span>")
|
||||
active = !active
|
||||
if(active)
|
||||
icon_state = active_icon
|
||||
if(fast_process)
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
else
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
icon_state = inactive_icon
|
||||
if(fast_process)
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
else
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
|
||||
/obj/structure/clockwork/powered/proc/total_accessable_power() //how much power we have and can use
|
||||
if(!needs_power || ratvar_awakens)
|
||||
return INFINITY //oh yeah we've got power why'd you ask
|
||||
|
||||
var/power = 0
|
||||
power += accessable_apc_power()
|
||||
power += accessable_sigil_power()
|
||||
return power
|
||||
|
||||
/obj/structure/clockwork/powered/proc/accessable_apc_power()
|
||||
var/power = 0
|
||||
var/area/A = get_area(src)
|
||||
var/area/targetAPCA
|
||||
for(var/obj/machinery/power/apc/APC in apcs_list)
|
||||
var/area/APCA = get_area(APC)
|
||||
if(APCA == A)
|
||||
target_apc = APC
|
||||
if(target_apc)
|
||||
targetAPCA = get_area(target_apc)
|
||||
if(targetAPCA != A)
|
||||
target_apc = null
|
||||
else if(target_apc.cell)
|
||||
var/apccharge = target_apc.cell.charge
|
||||
if(apccharge >= 50)
|
||||
power += apccharge
|
||||
return power
|
||||
|
||||
/obj/structure/clockwork/powered/proc/accessable_sigil_power()
|
||||
var/power = 0
|
||||
for(var/obj/effect/clockwork/sigil/transmission/T in range(1, src))
|
||||
power += T.power_charge
|
||||
return power
|
||||
|
||||
|
||||
/obj/structure/clockwork/powered/proc/try_use_power(amount) //try to use an amount of power
|
||||
if(!needs_power || ratvar_awakens)
|
||||
return 1
|
||||
if(amount <= 0)
|
||||
return 0
|
||||
var/power = total_accessable_power()
|
||||
if(!power || power < amount)
|
||||
return 0
|
||||
return use_power(amount)
|
||||
|
||||
/obj/structure/clockwork/powered/proc/use_power(amount) //we've made sure we had power, so now we use it
|
||||
var/sigilpower = accessable_sigil_power()
|
||||
var/list/sigils_in_range = list()
|
||||
for(var/obj/effect/clockwork/sigil/transmission/T in range(1, src))
|
||||
sigils_in_range |= T
|
||||
while(sigilpower && amount >= 50)
|
||||
for(var/S in sigils_in_range)
|
||||
var/obj/effect/clockwork/sigil/transmission/T = S
|
||||
if(amount >= 50 && T.modify_charge(50))
|
||||
sigilpower -= 50
|
||||
amount -= 50
|
||||
var/apcpower = accessable_apc_power()
|
||||
while(apcpower >= 50 && amount >= 50)
|
||||
if(target_apc.cell.use(50))
|
||||
apcpower -= 50
|
||||
amount -= 50
|
||||
target_apc.update()
|
||||
target_apc.update_icon()
|
||||
else
|
||||
apcpower = 0
|
||||
if(amount)
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
|
||||
/obj/structure/clockwork/powered/proc/return_power(amount) //returns a given amount of power to all nearby sigils
|
||||
if(amount <= 0)
|
||||
return 0
|
||||
var/list/sigils_in_range = list()
|
||||
for(var/obj/effect/clockwork/sigil/transmission/T in range(1, src))
|
||||
sigils_in_range |= T
|
||||
if(!sigils_in_range.len)
|
||||
return 0
|
||||
while(amount >= 50)
|
||||
for(var/S in sigils_in_range)
|
||||
var/obj/effect/clockwork/sigil/transmission/T = S
|
||||
if(amount >= 50 && T.modify_charge(-50))
|
||||
amount -= 50
|
||||
return 1
|
||||
|
||||
|
||||
/obj/structure/clockwork/powered/mending_motor //Mending motor: A prism that consumes replicant alloy to repair nearby mechanical servants at a quick rate.
|
||||
name = "mending motor"
|
||||
desc = "A dark onyx prism, held in midair by spiraling tendrils of stone."
|
||||
clockwork_desc = "A powerful prism that rapidly repairs nearby mechanical servants and clockwork structures."
|
||||
icon_state = "mending_motor_inactive"
|
||||
active_icon = "mending_motor"
|
||||
inactive_icon = "mending_motor_inactive"
|
||||
construction_value = 20
|
||||
max_health = 150
|
||||
health = 150
|
||||
break_message = "<span class='warning'>The prism collapses with a heavy thud!</span>"
|
||||
debris = list(/obj/item/clockwork/alloy_shards, /obj/item/clockwork/component/vanguard_cogwheel)
|
||||
var/stored_alloy = 0 //2500W = 1 alloy = 100 liquified alloy
|
||||
var/max_alloy = 25000
|
||||
var/mob_cost = 200
|
||||
var/structure_cost = 250
|
||||
var/cyborg_cost = 300
|
||||
|
||||
/obj/structure/clockwork/powered/mending_motor/prefilled
|
||||
stored_alloy = 2500 //starts with 1 replicant alloy/100 liquified alloy
|
||||
|
||||
/obj/structure/clockwork/powered/mending_motor/total_accessable_power()
|
||||
. = ..()
|
||||
if(. != INFINITY)
|
||||
. += accessable_alloy_power()
|
||||
|
||||
/obj/structure/clockwork/powered/mending_motor/proc/accessable_alloy_power()
|
||||
return stored_alloy
|
||||
|
||||
/obj/structure/clockwork/powered/mending_motor/use_power(amount)
|
||||
var/alloypower = accessable_alloy_power()
|
||||
while(alloypower >= 50 && amount >= 50)
|
||||
stored_alloy -= 50
|
||||
alloypower -= 50
|
||||
amount -= 50
|
||||
return ..()
|
||||
|
||||
/obj/structure/clockwork/powered/mending_motor/examine(mob/user)
|
||||
..()
|
||||
if(is_servant_of_ratvar(user) || isobserver(user))
|
||||
user << "<span class='alloy'>It contains [stored_alloy*0.04]/[max_alloy*0.04] units of liquified alloy, which is equivalent to [stored_alloy]W/[max_alloy]W of power.</span>"
|
||||
user << "<span class='inathneq_small'>It requires [mob_cost]W to heal clockwork mobs, [structure_cost]W for clockwork structures, and [cyborg_cost]W for cyborgs.</span>"
|
||||
|
||||
/obj/structure/clockwork/powered/mending_motor/process()
|
||||
if(..() < mob_cost)
|
||||
visible_message("<span class='warning'>[src] emits an airy chuckling sound and falls dark!</span>")
|
||||
toggle()
|
||||
return
|
||||
for(var/atom/movable/M in range(5, src))
|
||||
if(isclockmob(M) || istype(M, /mob/living/simple_animal/drone/cogscarab))
|
||||
var/mob/living/simple_animal/hostile/clockwork/W = M
|
||||
var/fatigued = FALSE
|
||||
if(istype(M, /mob/living/simple_animal/hostile/clockwork/marauder))
|
||||
var/mob/living/simple_animal/hostile/clockwork/marauder/E = M
|
||||
if(E.fatigue)
|
||||
fatigued = TRUE
|
||||
if((!fatigued && W.health == W.maxHealth) || W.stat)
|
||||
continue
|
||||
if(!try_use_power(mob_cost))
|
||||
break
|
||||
W.adjustHealth(-15)
|
||||
else if(istype(M, /obj/structure/clockwork))
|
||||
var/obj/structure/clockwork/C = M
|
||||
if(C.health == C.max_health)
|
||||
continue
|
||||
if(!try_use_power(structure_cost))
|
||||
break
|
||||
C.health = min(C.health + 15, C.max_health)
|
||||
else if(issilicon(M))
|
||||
var/mob/living/silicon/S = M
|
||||
if(S.health == S.maxHealth || S.stat == DEAD || !is_servant_of_ratvar(S))
|
||||
continue
|
||||
if(!try_use_power(cyborg_cost))
|
||||
break
|
||||
S.adjustBruteLoss(-15)
|
||||
S.adjustFireLoss(-15)
|
||||
return 1
|
||||
|
||||
/obj/structure/clockwork/powered/mending_motor/attack_hand(mob/living/user)
|
||||
if(user.canUseTopic(src, BE_CLOSE))
|
||||
if(total_accessable_power() < mob_cost)
|
||||
user << "<span class='warning'>[src] needs more power or replicant alloy to function!</span>"
|
||||
return 0
|
||||
toggle(0, user)
|
||||
|
||||
/obj/structure/clockwork/powered/mending_motor/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/clockwork/component/replicant_alloy) && is_servant_of_ratvar(user))
|
||||
if(stored_alloy + 2500 > max_alloy)
|
||||
user << "<span class='warning'>[src] is too full to accept any more alloy!</span>"
|
||||
return 0
|
||||
user.whisper("Genafzhgr vagb jngre.")
|
||||
user.visible_message("<span class='notice'>[user] liquifies [I] and pours it onto [src].</span>", \
|
||||
"<span class='notice'>You liquify [src] and pour it onto [src], transferring the alloy into its reserves.</span>")
|
||||
stored_alloy = stored_alloy + 2500
|
||||
user.drop_item()
|
||||
qdel(I)
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
/obj/structure/clockwork/powered/mania_motor //Mania motor: A pair of antenna that, while active, cause braindamage and hallucinations in nearby human mobs.
|
||||
name = "mania motor"
|
||||
desc = "A pair of antenna with what appear to be sockets around the base. It reminds you of an antlion."
|
||||
clockwork_desc = "A transmitter that allows Sevtug to whisper into the minds of nearby non-servants, causing hallucinations and brain damage as long as it remains powered."
|
||||
icon_state = "mania_motor_inactive"
|
||||
active_icon = "mania_motor"
|
||||
inactive_icon = "mania_motor_inactive"
|
||||
construction_value = 20
|
||||
max_health = 80
|
||||
health = 80
|
||||
break_message = "<span class='warning'>The antenna break off, leaving a pile of shards!</span>"
|
||||
debris = list(/obj/item/clockwork/alloy_shards, /obj/item/clockwork/component/guvax_capacitor/antennae)
|
||||
var/mania_cost = 150
|
||||
var/convert_attempt_cost = 150
|
||||
var/convert_cost = 300
|
||||
|
||||
var/mania_messages = list("\"Tb ahgf.\"", "\"Gnxr n penpx ng penml.\"", "\"Znxr n ovq sbe vafnavgl.\"", "\"Trg xbbxl.\"", "\"Zbir gbjneqf znavn.\"", "\"Orpbzr orjvyqrerq.\"", "\"Jnk jvyq.\"", \
|
||||
"\"Tb ebhaq gur oraq.\"", "\"Ynaq va yhanpl.\"", "\"Gel qrzragvn.\"", "\"Fgevir gb trg n fperj ybbfr.\"")
|
||||
var/compel_messages = list("\"Pbzr pybfre.\"", "\"Nccebnpu gur genafzvggre.\"", "\"Gbhpu gur nagraanr.\"", "\"V nyjnlf unir gb qrny jvgu vqvbgf. Zbir gbjneqf gur znavn zbgbe.\"", \
|
||||
"\"Nqinapr sbejneq naq cynpr lbhe urnq orgjrra gur nagraanr - gun'g'f nyy vg'f tbbq sbe.\"", "\"Vs lbh jrer fznegre, lbh'q or bire urer nyernql.\"", "\"Zbir SBEJNEQ, lbh sbby.\"")
|
||||
var/convert_messages = list("\"Lbh jba'g qb. Tb gb fyrrc juvyr V gryy gur'fr avgjvgf ubj gb pbaireg lbh.\"", "\"Lbh ner vafhssvpvrag. V zhfg vafgehpg gur'fr vqvbgf va gur neg-bs pbairefvba.\"", \
|
||||
"\"Bu-bs pbhefr, fbzrbar jr pna'g pbaireg. Gur'fr freinagf ner sbbyf.\"", "\"Ubj uneq vf vg gb hfr n Fvtvy, naljnl? Nyy vg gnxrf vf qenttvat fbzrbar bagb vg.\"", \
|
||||
"\"Ubj qb gur'l snvy gb hfr n Fvtvy-bs Npprffvba, naljnl?\"", "\"Jul vf vg gun'g nyy freinagf ner guv'f varcg?\"", "\"Vg'f dhvgr yvxryl lbh'yy or fghpx urer sbe n juvyr.\"")
|
||||
var/close_messages = list("\"Jryy, lbh pna'g ernpu gur zbgbe sebz GUR'ER, lbh zbeba.\"", "\"Vagrerfgvat ybpngvba. V'q cersre vs lbh jrag fbzrjurer lbh pbhyq NPGHNYYL GBHPU GUR NAGRAANR!\"", \
|
||||
"\"Nznmvat. Lbh fbzrubj znantrq gb jrqtr lbhefrys fbzrjurer lbh pna'g npghnyyl ernpu gur zbgbe sebz.\"", "\"Fhpu n fubj-bs vqvbpl vf hacnenyyryrq. Creuncf V fubhyq chg lbh ba qvfcynl?\"", \
|
||||
"\"Qvq lbh qb guv'f ba checbfr? V pna'g vzntvar lbh qbvat fb nppvqragnyyl. Bu, jnvg, V pna.\"", "\"Ubj vf vg gun'g fhpu fzneg perngherf pna fgvyy qb fbzrguv'at NF FGHCVQ NF GUV'F!\"")
|
||||
|
||||
|
||||
/obj/structure/clockwork/powered/mania_motor/examine(mob/user)
|
||||
..()
|
||||
if(is_servant_of_ratvar(user) || isobserver(user))
|
||||
user << "<span class='sevtug_small'>It requires [mania_cost]W to run, and [convert_attempt_cost + convert_cost]W to convert humans adjecent to it.</span>"
|
||||
|
||||
/obj/structure/clockwork/powered/mania_motor/process()
|
||||
var/turf/T = get_turf(src)
|
||||
if(!..())
|
||||
visible_message("<span class='warning'>[src] hums loudly, then the sockets at its base fall dark!</span>")
|
||||
playsound(T, 'sound/effects/screech.ogg', 40, 1)
|
||||
toggle(0)
|
||||
return
|
||||
if(try_use_power(mania_cost))
|
||||
var/hum = get_sfx('sound/effects/screech.ogg') //like playsound, same sound for everyone affected
|
||||
for(var/mob/living/carbon/human/H in view(1, src))
|
||||
if(H.Adjacent(src) && try_use_power(convert_attempt_cost))
|
||||
if(is_eligible_servant(H) && try_use_power(convert_cost))
|
||||
H << "<span class='sevtug'>\"Lbh ner zvar-naq-uvf, abj.\"</span>"
|
||||
H.playsound_local(T, hum, 80, 1)
|
||||
add_servant_of_ratvar(H)
|
||||
else if(!H.stat)
|
||||
if(H.getBrainLoss() >= H.maxHealth)
|
||||
H.Paralyse(5)
|
||||
H << "<span class='sevtug'>[pick(convert_messages)]</span>"
|
||||
else
|
||||
H.adjustBrainLoss(100)
|
||||
H.visible_message("<span class='warning'>[H] reaches out and touches [src].</span>", "<span class='sevtug'>You touch [src] involuntarily.</span>")
|
||||
else
|
||||
visible_message("<span class='warning'>[src]'s antennae fizzle quietly.</span>")
|
||||
playsound(src, 'sound/effects/light_flicker.ogg', 50, 1)
|
||||
for(var/mob/living/carbon/human/H in range(10, src))
|
||||
if(!is_servant_of_ratvar(H) && !H.null_rod_check() && H.stat == CONSCIOUS)
|
||||
var/distance = get_dist(T, get_turf(H))
|
||||
var/falloff_distance = min((110) - distance * 10, 80)
|
||||
var/sound_distance = falloff_distance * 0.5
|
||||
var/targetbrainloss = H.getBrainLoss()
|
||||
var/targethallu = H.hallucination
|
||||
var/targetdruggy = H.druggy
|
||||
if(distance >= 4 && prob(falloff_distance))
|
||||
H << "<span class='sevtug_small'>[pick(mania_messages)]</span>"
|
||||
H.playsound_local(T, hum, sound_distance, 1)
|
||||
switch(distance)
|
||||
if(2 to 3)
|
||||
if(prob(falloff_distance))
|
||||
if(prob(falloff_distance))
|
||||
H << "<span class='sevtug_small'>[pick(mania_messages)]</span>"
|
||||
else
|
||||
H << "<span class='sevtug'>[pick(compel_messages)]</span>"
|
||||
if(targetbrainloss <= 50)
|
||||
H.adjustBrainLoss(50 - targetbrainloss) //got too close had brain eaten
|
||||
if(targetdruggy <= 150)
|
||||
H.adjust_drugginess(11)
|
||||
if(targethallu <= 150)
|
||||
H.hallucination += 11
|
||||
if(4 to 5)
|
||||
if(targetbrainloss <= 50)
|
||||
H.adjustBrainLoss(3)
|
||||
if(targetdruggy <= 120)
|
||||
H.adjust_drugginess(9)
|
||||
if(targethallu <= 120)
|
||||
H.hallucination += 9
|
||||
if(6 to 7)
|
||||
if(targetbrainloss <= 30)
|
||||
H.adjustBrainLoss(2)
|
||||
if(prob(falloff_distance) && targetdruggy <= 90)
|
||||
H.adjust_drugginess(7)
|
||||
else if(targethallu <= 90)
|
||||
H.hallucination += 7
|
||||
if(8 to 9)
|
||||
if(H.getBrainLoss() <= 10)
|
||||
H.adjustBrainLoss(1)
|
||||
if(prob(falloff_distance) && targetdruggy <= 60)
|
||||
H.adjust_drugginess(5)
|
||||
else if(targethallu <= 60)
|
||||
H.hallucination += 5
|
||||
if(10 to INFINITY)
|
||||
if(prob(falloff_distance) && targetdruggy <= 30)
|
||||
H.adjust_drugginess(3)
|
||||
else if(targethallu <= 30)
|
||||
H.hallucination += 3
|
||||
else //if it's a distance of 1 and they can't see it/aren't adjacent or they're on top of it(how'd they get on top of it and still trigger this???)
|
||||
if(targetbrainloss <= 99)
|
||||
if(prob(falloff_distance))
|
||||
if(prob(falloff_distance))
|
||||
H << "<span class='sevtug'>[pick(compel_messages)]</span>"
|
||||
else if(prob(falloff_distance))
|
||||
H << "<span class='sevtug'>[pick(close_messages)]</span>"
|
||||
else
|
||||
H << "<span class='sevtug_small'>[pick(mania_messages)]</span>"
|
||||
H.adjustBrainLoss(99 - targetbrainloss)
|
||||
if(targetdruggy <= 200)
|
||||
H.adjust_drugginess(15)
|
||||
if(targethallu <= 200)
|
||||
H.hallucination += 15
|
||||
|
||||
if(is_servant_of_ratvar(H) && (H.getBrainLoss() || H.hallucination || H.druggy)) //not an else so that newly converted servants are healed of the damage it inflicts
|
||||
H.adjustBrainLoss(-H.getBrainLoss()) //heals servants of braindamage, hallucination, and druggy
|
||||
H.hallucination = 0
|
||||
H.adjust_drugginess(-H.druggy)
|
||||
else
|
||||
visible_message("<span class='warning'>[src] hums loudly, then the sockets at its base fall dark!</span>")
|
||||
playsound(src, 'sound/effects/screech.ogg', 40, 1)
|
||||
toggle(0)
|
||||
|
||||
/obj/structure/clockwork/powered/mania_motor/attack_hand(mob/living/user)
|
||||
if(user.canUseTopic(src, BE_CLOSE))
|
||||
if(!total_accessable_power() >= mania_cost)
|
||||
user << "<span class='warning'>[src] needs more power to function!</span>"
|
||||
return 0
|
||||
toggle(0, user)
|
||||
|
||||
|
||||
|
||||
/obj/structure/clockwork/powered/interdiction_lens //Interdiction lens: A powerful artifact that constantly disrupts electronics but, if it fails to find something to disrupt, turns off.
|
||||
name = "interdiction lens"
|
||||
desc = "An ominous, double-pronged brass totem. There's a strange gemstone clasped between the pincers."
|
||||
clockwork_desc = "A powerful totem that constantly disrupts nearby electronics and funnels power into nearby Sigils of Transmission."
|
||||
icon_state = "interdiction_lens"
|
||||
construction_value = 25
|
||||
active_icon = "interdiction_lens_active"
|
||||
inactive_icon = "interdiction_lens"
|
||||
break_message = "<span class='warning'>The lens flares a blinding violet before shattering!</span>"
|
||||
break_sound = 'sound/effects/Glassbr3.ogg'
|
||||
var/recharging = 0 //world.time when the lens was last used
|
||||
var/recharge_time = 1200 //if it drains no power and affects no objects, it turns off for two minutes
|
||||
var/disabled = FALSE //if it's actually usable
|
||||
var/interdiction_range = 14 //how large an area it drains and disables in
|
||||
var/disrupt_cost = 100 //how much power to use when disabling an object
|
||||
|
||||
/obj/structure/clockwork/powered/interdiction_lens/examine(mob/user)
|
||||
..()
|
||||
user << "<span class='[recharging > world.time ? "nezbere_small":"brass"]'>Its gemstone [recharging > world.time ? "has been breached by writhing tendrils of blackness that cover the totem" \
|
||||
: "vibrates in place and thrums with power"].</span>"
|
||||
if(is_servant_of_ratvar(user) || isobserver(user))
|
||||
user << "<span class='nezbere_small'>It requires [disrupt_cost]W of power for each nearby disruptable electronic.</span>"
|
||||
user << "<span class='nezbere_small'>If it fails to both drain any power and disrupt any electronics, it will disable itself for [round(recharge_time/600, 1)] minutes.</span>"
|
||||
|
||||
/obj/structure/clockwork/powered/interdiction_lens/toggle(fast_process, mob/living/user)
|
||||
..()
|
||||
if(active)
|
||||
set_light(4,2)
|
||||
else
|
||||
set_light(0)
|
||||
|
||||
/obj/structure/clockwork/powered/interdiction_lens/attack_hand(mob/living/user)
|
||||
if(user.canUseTopic(src, BE_CLOSE))
|
||||
if(disabled)
|
||||
user << "<span class='warning'>As you place your hand on the gemstone, cold tendrils of black matter crawl up your arm. You quickly pull back.</span>"
|
||||
return 0
|
||||
if(!total_accessable_power() >= disrupt_cost)
|
||||
user << "<span class='warning'>[src] needs more power to function!</span>"
|
||||
return 0
|
||||
toggle(0, user)
|
||||
|
||||
/obj/structure/clockwork/powered/interdiction_lens/process()
|
||||
if(recharging > world.time)
|
||||
return
|
||||
if(disabled)
|
||||
visible_message("<span class='warning'>The writhing tendrils return to the gemstone, which begins to glow with power!</span>")
|
||||
flick("interdiction_lens_recharged", src)
|
||||
disabled = FALSE
|
||||
toggle(0)
|
||||
else
|
||||
var/successfulprocess = FALSE
|
||||
var/power_drained = 0
|
||||
var/list/atoms_to_test = list()
|
||||
for(var/A in spiral_range_turfs(interdiction_range, src))
|
||||
var/turf/T = A
|
||||
for(var/M in T)
|
||||
atoms_to_test |= M
|
||||
|
||||
CHECK_TICK
|
||||
|
||||
for(var/M in atoms_to_test)
|
||||
if(istype(M, /obj/machinery/power/apc))
|
||||
var/obj/machinery/power/apc/A = M
|
||||
if(A.cell && A.cell.charge)
|
||||
successfulprocess = TRUE
|
||||
playsound(A, "sparks", 50, 1)
|
||||
flick("apc-spark", A)
|
||||
power_drained += min(A.cell.charge, 100)
|
||||
A.cell.charge = max(0, A.cell.charge - 100)
|
||||
if(!A.cell.charge && !A.shorted)
|
||||
A.shorted = 1
|
||||
A.visible_message("<span class='warning'>The [A.name]'s screen blurs with static.</span>")
|
||||
A.update()
|
||||
A.update_icon()
|
||||
else if(istype(M, /obj/machinery/power/smes))
|
||||
var/obj/machinery/power/smes/S = M
|
||||
if(S.charge)
|
||||
successfulprocess = TRUE
|
||||
power_drained += min(S.charge, 500)
|
||||
S.charge = max(0, S.charge - 50000) //SMES units contain too much power and could run an interdiction lens basically forever, or provide power forever
|
||||
if(!S.charge && !S.panel_open)
|
||||
S.panel_open = TRUE
|
||||
S.icon_state = "[initial(S.icon_state)]-o"
|
||||
var/datum/effect_system/spark_spread/spks = new(get_turf(S))
|
||||
spks.set_up(10, 0, get_turf(S))
|
||||
spks.start()
|
||||
S.visible_message("<span class='warning'>[S]'s panel flies open with a flurry of sparks.</span>")
|
||||
S.update_icon()
|
||||
else if(isrobot(M))
|
||||
var/mob/living/silicon/robot/R = M
|
||||
if(!is_servant_of_ratvar(R) && R.cell && R.cell.charge)
|
||||
successfulprocess = TRUE
|
||||
power_drained += min(R.cell.charge, 200)
|
||||
R.cell.charge = max(0, R.cell.charge - 200)
|
||||
R << "<span class='warning'>ERROR: Power loss detected!</span>"
|
||||
var/datum/effect_system/spark_spread/spks = new(get_turf(R))
|
||||
spks.set_up(3, 0, get_turf(R))
|
||||
spks.start()
|
||||
|
||||
CHECK_TICK
|
||||
|
||||
if(!return_power(power_drained) || power_drained < 50) //failed to return power drained or too little power to return
|
||||
successfulprocess = FALSE
|
||||
if(try_use_power(disrupt_cost) && total_accessable_power() >= disrupt_cost) //if we can disable at least one object
|
||||
playsound(src, 'sound/items/PSHOOM.ogg', 50, 1, interdiction_range-7, 1)
|
||||
for(var/M in atoms_to_test)
|
||||
if(istype(M, /obj/machinery/light)) //cosmetic light flickering
|
||||
var/obj/machinery/light/L = M
|
||||
if(L.on)
|
||||
playsound(L, 'sound/effects/light_flicker.ogg', 50, 1)
|
||||
L.flicker(3)
|
||||
else if(istype(M, /obj/machinery/camera))
|
||||
var/obj/machinery/camera/C = M
|
||||
if(C.isEmpProof() || !C.status)
|
||||
continue
|
||||
successfulprocess = TRUE
|
||||
if(C.emped)
|
||||
continue
|
||||
if(!try_use_power(disrupt_cost))
|
||||
break
|
||||
C.emp_act(1)
|
||||
else if(istype(M, /obj/item/device/radio))
|
||||
var/obj/item/device/radio/O = M
|
||||
successfulprocess = TRUE
|
||||
if(O.emped || !O.on)
|
||||
continue
|
||||
if(!try_use_power(disrupt_cost))
|
||||
break
|
||||
O.emp_act(1)
|
||||
else if(isliving(M) || istype(M, /obj/structure/closet) || istype(M, /obj/item/weapon/storage)) //other things may have radios in them but we don't care
|
||||
var/atom/movable/A = M
|
||||
for(var/obj/item/device/radio/O in A.GetAllContents())
|
||||
successfulprocess = TRUE
|
||||
if(O.emped || !O.on)
|
||||
continue
|
||||
if(!try_use_power(disrupt_cost))
|
||||
break
|
||||
O.emp_act(1)
|
||||
|
||||
CHECK_TICK
|
||||
|
||||
if(!successfulprocess)
|
||||
visible_message("<span class='warning'>The gemstone suddenly turns horribly dark, writhing tendrils covering it!</span>")
|
||||
recharging = world.time + recharge_time
|
||||
flick("interdiction_lens_discharged", src)
|
||||
icon_state = "interdiction_lens_inactive"
|
||||
set_light(2,1)
|
||||
disabled = TRUE
|
||||
|
||||
|
||||
|
||||
/obj/structure/clockwork/powered/clockwork_obelisk
|
||||
name = "clockwork obelisk"
|
||||
desc = "A large brass obelisk hanging in midair."
|
||||
clockwork_desc = "A powerful obelisk that can send a message to all servants or open a gateway to a target servant or clockwork obelisk."
|
||||
icon_state = "obelisk_inactive"
|
||||
active_icon = "obelisk"
|
||||
inactive_icon = "obelisk_inactive"
|
||||
construction_value = 20
|
||||
max_health = 200
|
||||
health = 200
|
||||
break_message = "<span class='warning'>The obelisk falls to the ground, undamaged!</span>"
|
||||
debris = list(/obj/item/clockwork/component/hierophant_ansible/obelisk)
|
||||
var/hierophant_cost = 50 //how much it costs to broadcast with large text
|
||||
var/gateway_cost = 2000 //how much it costs to open a gateway
|
||||
var/gateway_active = FALSE
|
||||
|
||||
/obj/structure/clockwork/powered/clockwork_obelisk/New()
|
||||
..()
|
||||
toggle(1)
|
||||
|
||||
/obj/structure/clockwork/powered/clockwork_obelisk/examine(mob/user)
|
||||
..()
|
||||
if(is_servant_of_ratvar(user) || isobserver(user))
|
||||
user << "<span class='nzcrentr_small'>It requires [hierophant_cost]W to broadcast over the Hierophant Network, and [gateway_cost]W to open a Spatial Gateway.</span>"
|
||||
|
||||
/obj/structure/clockwork/powered/clockwork_obelisk/process()
|
||||
if(locate(/obj/effect/clockwork/spatial_gateway) in loc)
|
||||
icon_state = active_icon
|
||||
density = 0
|
||||
gateway_active = TRUE
|
||||
else
|
||||
icon_state = inactive_icon
|
||||
density = 1
|
||||
gateway_active = FALSE
|
||||
|
||||
/obj/structure/clockwork/powered/clockwork_obelisk/attack_hand(mob/living/user)
|
||||
if(!is_servant_of_ratvar(user) || !total_accessable_power() >= hierophant_cost)
|
||||
user << "<span class='warning'>You place your hand on the obelisk, but it doesn't react.</span>"
|
||||
return
|
||||
var/choice = alert(user,"You place your hand on the obelisk...",,"Hierophant Broadcast","Spatial Gateway","Cancel")
|
||||
switch(choice)
|
||||
if("Hierophant Broadcast")
|
||||
if(gateway_active)
|
||||
user << "<span class='warning'>The obelisk is sustaining a gateway and cannot broadcast!</span>"
|
||||
return
|
||||
var/input = stripped_input(usr, "Please choose a message to send over the Hierophant Network.", "Hierophant Broadcast", "")
|
||||
if(!input || !user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
if(gateway_active)
|
||||
user << "<span class='warning'>The obelisk is sustaining a gateway and cannot broadcast!</span>"
|
||||
return
|
||||
if(!try_use_power(hierophant_cost))
|
||||
user << "<span class='warning'>The obelisk lacks the power to broadcast!</span>"
|
||||
return
|
||||
clockwork_say(user, "Uvrebcunag Oebnqpnfg, npgvingr!")
|
||||
send_hierophant_message(user, input, "big_brass", "large_brass")
|
||||
if("Spatial Gateway")
|
||||
if(gateway_active)
|
||||
user << "<span class='warning'>The obelisk is already sustaining a gateway!</span>"
|
||||
return
|
||||
if(!try_use_power(gateway_cost))
|
||||
user << "<span class='warning'>The obelisk lacks the power to open a gateway!</span>"
|
||||
return
|
||||
if(procure_gateway(user, 100, 5, 1))
|
||||
clockwork_say(user, "Fcnpvny Tngrjnl, npgvingr!")
|
||||
else
|
||||
return_power(gateway_cost)
|
||||
if("Cancel")
|
||||
return
|
||||
@@ -1,326 +0,0 @@
|
||||
/obj/structure/clockwork/massive //For objects that are typically very large
|
||||
name = "massive construct"
|
||||
desc = "A very large construction."
|
||||
layer = MASSIVE_OBJ_LAYER
|
||||
density = FALSE
|
||||
burn_state = LAVA_PROOF
|
||||
|
||||
/obj/structure/clockwork/massive/New()
|
||||
..()
|
||||
poi_list += src
|
||||
|
||||
/obj/structure/clockwork/massive/Destroy()
|
||||
poi_list -= src
|
||||
return ..()
|
||||
|
||||
/obj/structure/clockwork/massive/celestial_gateway //The gateway to Reebe, from which Ratvar emerges
|
||||
name = "Gateway to the Celestial Derelict"
|
||||
desc = "A massive, thrumming rip in spacetime."
|
||||
clockwork_desc = "A portal to the Celestial Derelict. Massive and intimidating, it is the only thing that can both transport Ratvar and withstand the massive amount of energy he emits."
|
||||
health = 500
|
||||
max_health = 500
|
||||
mouse_opacity = 2
|
||||
icon = 'icons/effects/clockwork_effects.dmi'
|
||||
icon_state = "nothing"
|
||||
density = TRUE
|
||||
can_be_repaired = FALSE
|
||||
var/progress_in_seconds = 0 //Once this reaches GATEWAY_RATVAR_ARRIVAL, it's game over
|
||||
var/purpose_fulfilled = FALSE
|
||||
var/first_sound_played = FALSE
|
||||
var/second_sound_played = FALSE
|
||||
var/third_sound_played = FALSE
|
||||
var/obj/effect/clockwork/gateway_glow/glow
|
||||
var/obj/effect/countdown/clockworkgate/countdown
|
||||
|
||||
/obj/structure/clockwork/massive/celestial_gateway/New()
|
||||
..()
|
||||
glow = new(get_turf(src))
|
||||
countdown = new(src)
|
||||
countdown.start()
|
||||
SSshuttle.emergencyNoEscape = TRUE
|
||||
START_PROCESSING(SSobj, src)
|
||||
var/area/gate_area = get_area(src)
|
||||
for(var/M in mob_list)
|
||||
if(is_servant_of_ratvar(M) || isobserver(M))
|
||||
M << "<span class='large_brass'><b>A gateway to the Celestial Derelict has been created in [gate_area.map_name]!</b></span>"
|
||||
|
||||
/obj/structure/clockwork/massive/celestial_gateway/Destroy()
|
||||
SSshuttle.emergencyNoEscape = FALSE
|
||||
if(SSshuttle.emergency.mode == SHUTTLE_STRANDED)
|
||||
SSshuttle.emergency.mode = SHUTTLE_DOCKED
|
||||
SSshuttle.emergency.timer = world.time
|
||||
if(!purpose_fulfilled)
|
||||
priority_announce("Hostile enviroment resolved. You have 3 minutes to board the Emergency Shuttle.", null, 'sound/AI/shuttledock.ogg', "Priority")
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
if(!purpose_fulfilled)
|
||||
var/area/gate_area = get_area(src)
|
||||
for(var/M in mob_list)
|
||||
if(is_servant_of_ratvar(M) || isobserver(M))
|
||||
M << "<span class='large_brass'><b>A gateway to the Celestial Derelict has fallen at [gate_area.map_name]!</b></span>"
|
||||
world << sound(null, 0, channel = 8)
|
||||
qdel(glow)
|
||||
glow = null
|
||||
qdel(countdown)
|
||||
countdown = null
|
||||
return ..()
|
||||
|
||||
/obj/structure/clockwork/massive/celestial_gateway/destroyed()
|
||||
countdown.stop()
|
||||
visible_message("<span class='userdanger'>The [src] begins to pulse uncontrollably... you might want to run!</span>")
|
||||
world << sound('sound/effects/clockcult_gateway_disrupted.ogg', 0, channel = 8, volume = 50)
|
||||
make_glow()
|
||||
glow.icon_state = "clockwork_gateway_disrupted"
|
||||
takes_damage = FALSE
|
||||
sleep(27)
|
||||
explosion(src, 1, 3, 8, 8)
|
||||
qdel(src)
|
||||
return 1
|
||||
|
||||
/obj/structure/clockwork/massive/celestial_gateway/proc/make_glow()
|
||||
if(!glow)
|
||||
glow = new(get_turf(src))
|
||||
glow.linked_gate = src
|
||||
|
||||
/obj/structure/clockwork/massive/celestial_gateway/ex_act(severity)
|
||||
return 0 //Nice try, Toxins!
|
||||
|
||||
/obj/structure/clockwork/massive/celestial_gateway/process()
|
||||
if(!progress_in_seconds || prob(5))
|
||||
for(var/M in mob_list)
|
||||
M << "<span class='warning'><b>You hear otherworldly sounds from the [dir2text(get_dir(get_turf(M), get_turf(src)))]...</span>"
|
||||
if(!health)
|
||||
return 0
|
||||
progress_in_seconds += GATEWAY_SUMMON_RATE
|
||||
switch(progress_in_seconds)
|
||||
if(-INFINITY to GATEWAY_REEBE_FOUND)
|
||||
if(!first_sound_played)
|
||||
world << sound('sound/effects/clockcult_gateway_charging.ogg', 1, channel = 8, volume = 50)
|
||||
first_sound_played = TRUE
|
||||
make_glow()
|
||||
glow.icon_state = "clockwork_gateway_charging"
|
||||
if(GATEWAY_REEBE_FOUND to GATEWAY_RATVAR_COMING)
|
||||
if(!second_sound_played)
|
||||
world << sound('sound/effects/clockcult_gateway_active.ogg', 1, channel = 8, volume = 50)
|
||||
second_sound_played = TRUE
|
||||
make_glow()
|
||||
glow.icon_state = "clockwork_gateway_active"
|
||||
if(GATEWAY_RATVAR_COMING to GATEWAY_RATVAR_ARRIVAL)
|
||||
if(!third_sound_played)
|
||||
world << sound('sound/effects/clockcult_gateway_closing.ogg', 1, channel = 8, volume = 50)
|
||||
third_sound_played = TRUE
|
||||
make_glow()
|
||||
glow.icon_state = "clockwork_gateway_closing"
|
||||
if(GATEWAY_RATVAR_ARRIVAL to INFINITY)
|
||||
if(!purpose_fulfilled)
|
||||
countdown.stop()
|
||||
takes_damage = FALSE
|
||||
purpose_fulfilled = TRUE
|
||||
make_glow()
|
||||
animate(glow, transform = matrix() * 1.5, alpha = 255, time = 126)
|
||||
world << sound('sound/effects/ratvar_rises.ogg', 0, channel = 8) //End the sounds
|
||||
sleep(131)
|
||||
make_glow()
|
||||
animate(glow, transform = matrix() * 3, alpha = 0, time = 5)
|
||||
sleep(5)
|
||||
new/obj/structure/clockwork/massive/ratvar(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/clockwork/massive/celestial_gateway/examine(mob/user)
|
||||
icon_state = "spatial_gateway" //cheat wildly by pretending to have an icon
|
||||
..()
|
||||
icon_state = initial(icon_state)
|
||||
if(is_servant_of_ratvar(user) || isobserver(user))
|
||||
var/arrival_text = "IMMINENT"
|
||||
if(GATEWAY_RATVAR_ARRIVAL - progress_in_seconds > 0)
|
||||
arrival_text = "[round(max((GATEWAY_RATVAR_ARRIVAL - progress_in_seconds) / (GATEWAY_SUMMON_RATE * 0.5), 0), 1)]"
|
||||
user << "<span class='big'><b>Seconds until Ratvar's arrival:</b> [arrival_text]s</span>"
|
||||
switch(progress_in_seconds)
|
||||
if(-INFINITY to GATEWAY_REEBE_FOUND)
|
||||
user << "<span class='heavy_brass'>It's still opening.</span>"
|
||||
if(GATEWAY_REEBE_FOUND to GATEWAY_RATVAR_COMING)
|
||||
user << "<span class='heavy_brass'>It's reached the Celestial Derelict and is drawing power from it.</span>"
|
||||
if(GATEWAY_RATVAR_COMING to INFINITY)
|
||||
user << "<span class='heavy_brass'>Ratvar is coming through the gateway!</span>"
|
||||
else
|
||||
switch(progress_in_seconds)
|
||||
if(-INFINITY to GATEWAY_REEBE_FOUND)
|
||||
user << "<span class='warning'>It's a swirling mass of blackness.</span>"
|
||||
if(GATEWAY_REEBE_FOUND to GATEWAY_RATVAR_COMING)
|
||||
user << "<span class='warning'>It seems to be leading somewhere.</span>"
|
||||
if(GATEWAY_RATVAR_COMING to INFINITY)
|
||||
user << "<span class='warning'><b>Something is coming through!</b></span>"
|
||||
|
||||
/obj/effect/clockwork/gateway_glow //the actual appearance of the Gateway to the Celestial Derelict; an object so the edges of the gate can be clicked through.
|
||||
icon = 'icons/effects/96x96.dmi'
|
||||
icon_state = "clockwork_gateway_charging"
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
mouse_opacity = 0
|
||||
layer = MASSIVE_OBJ_LAYER
|
||||
var/obj/structure/clockwork/massive/celestial_gateway/linked_gate
|
||||
|
||||
/obj/effect/clockwork/gateway_glow/Destroy()
|
||||
if(linked_gate)
|
||||
linked_gate.glow = null
|
||||
linked_gate = null
|
||||
return ..()
|
||||
|
||||
/obj/effect/clockwork/gateway_glow/examine(mob/user)
|
||||
if(linked_gate)
|
||||
linked_gate.examine(user)
|
||||
|
||||
/obj/effect/clockwork/gateway_glow/ex_act(severity, target)
|
||||
return FALSE
|
||||
|
||||
|
||||
/obj/structure/clockwork/massive/ratvar
|
||||
name = "Ratvar, the Clockwork Justiciar"
|
||||
desc = "<span class='userdanger'>What is what is what are what real what is all a lie all a lie it's all a lie why how can what is</span>"
|
||||
clockwork_desc = "<span class='large_brass'><b><i>Ratvar, the Clockwork Justiciar, your master eternal.</i></b></span>"
|
||||
icon = 'icons/effects/512x512.dmi'
|
||||
icon_state = "ratvar"
|
||||
pixel_x = -235
|
||||
pixel_y = -248
|
||||
takes_damage = FALSE
|
||||
var/atom/prey //Whatever Ratvar is chasing
|
||||
var/clashing = FALSE //If Ratvar is FUCKING FIGHTING WITH NAR-SIE
|
||||
var/proselytize_range = 10
|
||||
|
||||
/obj/structure/clockwork/massive/ratvar/New()
|
||||
..()
|
||||
ratvar_awakens = TRUE
|
||||
for(var/obj/item/clockwork/ratvarian_spear/R in all_clockwork_objects)
|
||||
R.update_force()
|
||||
START_PROCESSING(SSobj, src)
|
||||
world << "<span class='heavy_brass'><font size=6>\"BAPR NTNVA ZL YVTUG FUNYY FUVAR NPEBFF GUVF CNGURGVP ERNYZ!!\"</font></span>"
|
||||
world << 'sound/effects/ratvar_reveal.ogg'
|
||||
var/image/alert_overlay = image('icons/effects/clockwork_effects.dmi', "ratvar_alert")
|
||||
var/area/A = get_area(src)
|
||||
notify_ghosts("The Justiciar's light calls to you! Reach out to Ratvar in [A.name] to be granted a shell to spread his glory!", null, source = src, alert_overlay = alert_overlay)
|
||||
addtimer(SSshuttle.emergency, "request", 50, FALSE, null, 0.3)
|
||||
|
||||
|
||||
/obj/structure/clockwork/massive/ratvar/Destroy()
|
||||
ratvar_awakens = FALSE
|
||||
for(var/obj/item/clockwork/ratvarian_spear/R in all_clockwork_objects)
|
||||
R.update_force()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
world << "<span class='heavy_brass'><font size=6>\"NO! I will not... be...</font> <font size=5>banished...</font> <font size=4>again...\"</font></span>"
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/clockwork/massive/ratvar/attack_ghost(mob/dead/observer/O)
|
||||
var/alertresult = alert(O, "Embrace the Justiciar's light? You can no longer be cloned!",,"Cogscarab", "Reclaimer", "No")
|
||||
if(alertresult == "No" || !O)
|
||||
return 0
|
||||
var/mob/living/simple_animal/R
|
||||
if(alertresult == "Cogscarab")
|
||||
R = new/mob/living/simple_animal/drone/cogscarab/ratvar(get_turf(src))
|
||||
R.visible_message("<span class='heavy_brass'>[R] forms, and its eyes blink open, glowing bright red!</span>")
|
||||
else
|
||||
R = new/mob/living/simple_animal/hostile/clockwork/reclaimer(get_turf(src))
|
||||
R.visible_message("<span class='heavy_brass'>[R] forms, and it emits a faint hum!</span>")
|
||||
R.key = O.key
|
||||
|
||||
|
||||
/obj/structure/clockwork/massive/ratvar/Bump(atom/A)
|
||||
forceMove(get_turf(A))
|
||||
A.ratvar_act()
|
||||
|
||||
|
||||
/obj/structure/clockwork/massive/ratvar/Process_Spacemove()
|
||||
return clashing
|
||||
|
||||
|
||||
/obj/structure/clockwork/massive/ratvar/process()
|
||||
if(clashing) //I'm a bit occupied right now, thanks
|
||||
return
|
||||
for(var/atom/A in range(proselytize_range, src))
|
||||
A.ratvar_act()
|
||||
var/dir_to_step_in = pick(cardinal)
|
||||
if(!prey)
|
||||
for(var/obj/singularity/narsie/N in poi_list)
|
||||
if(N.z == z)
|
||||
prey = N
|
||||
break
|
||||
if(!prey) //In case there's a Nar-Sie
|
||||
var/list/meals = list()
|
||||
for(var/mob/living/L in living_mob_list)
|
||||
if(L.z == z && !is_servant_of_ratvar(L) && L.mind)
|
||||
meals += L
|
||||
if(meals.len)
|
||||
prey = pick(meals)
|
||||
prey << "<span class='heavy_brass'><font size=5>\"You will do.\"</font></span>\n\
|
||||
<span class='userdanger'>Something very large and very malevolent begins lumbering its way towards you...</span>"
|
||||
prey << 'sound/effects/ratvar_reveal.ogg'
|
||||
else
|
||||
if(prob(10) || is_servant_of_ratvar(prey) || prey.z != z)
|
||||
prey << "<span class='heavy_brass'><font size=5>\"How dull. Leave me.\"</font></span>\n\
|
||||
<span class='userdanger'>You feel tremendous relief as a set of horrible eyes loses sight of you...</span>"
|
||||
prey = null
|
||||
else
|
||||
dir_to_step_in = get_dir(src, prey) //Unlike Nar-Sie, Ratvar ruthlessly chases down his target
|
||||
step(src, dir_to_step_in)
|
||||
|
||||
/obj/structure/clockwork/massive/ratvar/narsie_act()
|
||||
if(clashing)
|
||||
return 0
|
||||
clashing = TRUE
|
||||
world << "<span class='heavy_brass'><font size=5>\"[pick("BLOOD GOD!!!", "NAR-SIE!!!", "AT LAST, YOUR TIME HAS COME!")]\"</font></span>"
|
||||
world << "<span class='cult'><font size=5>\"<b>Ratvar?! How?!</b>\"</font></span>"
|
||||
for(var/obj/singularity/narsie/N in range(15, src))
|
||||
if(N.clashing)
|
||||
continue
|
||||
N.clashing = TRUE
|
||||
clash_of_the_titans(N) //IT'S TIME FOR THE BATTLE OF THE AGES
|
||||
break
|
||||
return 1
|
||||
|
||||
/obj/structure/clockwork/massive/ratvar/proc/clash_of_the_titans(obj/singularity/narsie/narsie)
|
||||
var/winner = "Undeclared"
|
||||
var/base_victory_chance = 0
|
||||
while(TRUE)
|
||||
world << 'sound/magic/clockwork/ratvar_attack.ogg'
|
||||
sleep(5.2)
|
||||
for(var/mob/M in mob_list)
|
||||
if(M.client)
|
||||
M.client.color = rgb(150, 100, 0)
|
||||
spawn(1)
|
||||
M.client.color = initial(M.client.color)
|
||||
shake_camera(M, 4, 3)
|
||||
var/r_success_modifier = (ticker.mode.servants_of_ratvar.len * 2) //2% for each cultist
|
||||
var/n_success_modifier = (ticker.mode.cult.len * 2)
|
||||
for(var/mob/living/simple_animal/hostile/construct/harvester/C in player_list)
|
||||
n_success_modifier += 2
|
||||
if(prob(base_victory_chance + r_success_modifier))
|
||||
winner = "Ratvar"
|
||||
break
|
||||
sleep(rand(2,5))
|
||||
world << 'sound/magic/clockwork/narsie_attack.ogg'
|
||||
sleep(7.4)
|
||||
for(var/mob/M in mob_list)
|
||||
if(M.client)
|
||||
M.client.color = rgb(200, 0, 0)
|
||||
spawn(1)
|
||||
M.client.color = initial(M.client.color)
|
||||
shake_camera(M, 4, 3)
|
||||
if(prob(base_victory_chance + n_success_modifier))
|
||||
winner = "Nar-Sie"
|
||||
break
|
||||
base_victory_chance++ //The clash has a higher chance of resolving each time both gods attack one another
|
||||
switch(winner)
|
||||
if("Ratvar")
|
||||
world << "<span class='heavy_brass'><font size=5>\"[pick("DIE! DIE! DIE!", "REEEEEEEEE!", "FILTH!!!", "SUFFER!!!", "EBG SBE PRAGHEVRF NF V UNIR!!")]\"</font></span>" //nar-sie get out
|
||||
world << "<span class='cult'><font size=5>\"<b>[pick("Nooooo...", "Not die. To y-", "Die. Ratv-", "Sas tyen re-")]\"</b></font></span>"
|
||||
world << 'sound/magic/clockwork/anima_fragment_attack.ogg'
|
||||
world << 'sound/magic/demon_dies.ogg'
|
||||
clashing = FALSE
|
||||
qdel(narsie)
|
||||
return 1
|
||||
if("Nar-Sie")
|
||||
world << "<span class='cult'><font size=5>\"<b>[pick("Ha.", "Ra'sha fonn dest.", "You fool. To come here.")]</b>\"</font></span>" //Broken English
|
||||
world << 'sound/magic/demon_attack1.ogg'
|
||||
world << 'sound/magic/clockwork/anima_fragment_death.ogg'
|
||||
narsie.clashing = FALSE
|
||||
qdel(src)
|
||||
return 1
|
||||
@@ -1,955 +0,0 @@
|
||||
//////////////////////////
|
||||
// CLOCKWORK STRUCTURES //
|
||||
//////////////////////////
|
||||
|
||||
/obj/structure/clockwork
|
||||
name = "meme structure"
|
||||
desc = "Some frog or something, the fuck?"
|
||||
var/clockwork_desc //Shown to servants when they examine
|
||||
icon = 'icons/obj/clockwork_objects.dmi'
|
||||
icon_state = "rare_pepe"
|
||||
anchored = 1
|
||||
density = 1
|
||||
opacity = 0
|
||||
layer = BELOW_OBJ_LAYER
|
||||
var/max_health = 100 //All clockwork structures have health that can be removed via attacks
|
||||
var/health = 100
|
||||
var/repair_amount = 5 //how much a proselytizer can repair each cycle
|
||||
var/can_be_repaired = TRUE //if a proselytizer can repair it at all
|
||||
var/takes_damage = TRUE //If the structure can be damaged
|
||||
var/break_message = "<span class='warning'>The frog isn't a meme after all!</span>" //The message shown when a structure breaks
|
||||
var/break_sound = 'sound/magic/clockwork/anima_fragment_death.ogg' //The sound played when a structure breaks
|
||||
var/list/debris = list(/obj/item/clockwork/alloy_shards) //Parts left behind when a structure breaks
|
||||
var/construction_value = 0 //How much value the structure contributes to the overall "power" of the structures on the station
|
||||
|
||||
/obj/structure/clockwork/New()
|
||||
..()
|
||||
clockwork_construction_value += construction_value
|
||||
all_clockwork_objects += src
|
||||
|
||||
/obj/structure/clockwork/Destroy()
|
||||
clockwork_construction_value -= construction_value
|
||||
all_clockwork_objects -= src
|
||||
return ..()
|
||||
|
||||
/obj/structure/clockwork/proc/destroyed()
|
||||
if(!takes_damage)
|
||||
return 0
|
||||
for(var/I in debris)
|
||||
new I (get_turf(src))
|
||||
visible_message(break_message)
|
||||
playsound(src, break_sound, 50, 1)
|
||||
qdel(src)
|
||||
return 1
|
||||
|
||||
/obj/structure/clockwork/burn()
|
||||
SSobj.burning -= src
|
||||
if(takes_damage)
|
||||
playsound(src, 'sound/items/Welder.ogg', 100, 1)
|
||||
visible_message("<span class='warning'>[src] is warped by the heat!</span>")
|
||||
take_damage(rand(50, 100), BURN)
|
||||
|
||||
/obj/structure/clockwork/proc/take_damage(amount, damage_type)
|
||||
if(!amount || !damage_type || !damage_type in list(BRUTE, BURN))
|
||||
return 0
|
||||
if(takes_damage)
|
||||
health = max(0, health - amount)
|
||||
if(!health)
|
||||
destroyed()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/structure/clockwork/narsie_act()
|
||||
if(take_damage(rand(25, 50), BRUTE) && src) //if we still exist
|
||||
var/previouscolor = color
|
||||
color = "#960000"
|
||||
animate(src, color = previouscolor, time = 8)
|
||||
|
||||
/obj/structure/clockwork/ex_act(severity)
|
||||
var/damage = 0
|
||||
switch(severity)
|
||||
if(1)
|
||||
damage = max_health //100% max health lost
|
||||
if(2)
|
||||
damage = max_health * rand(0.5, 0.7) //50-70% max health lost
|
||||
if(3)
|
||||
damage = max_health * rand(0.1, 0.3) //10-30% max health lost
|
||||
if(damage)
|
||||
take_damage(damage, BRUTE)
|
||||
|
||||
/obj/structure/clockwork/examine(mob/user)
|
||||
var/can_see_clockwork = is_servant_of_ratvar(user) || isobserver(user)
|
||||
if(can_see_clockwork && clockwork_desc)
|
||||
desc = clockwork_desc
|
||||
..()
|
||||
desc = initial(desc)
|
||||
if(takes_damage)
|
||||
var/servant_message = "It is at <b>[health]/[max_health]</b> integrity"
|
||||
var/other_message = "It seems pristine and undamaged"
|
||||
var/heavily_damaged = FALSE
|
||||
var/healthpercent = (health/max_health) * 100
|
||||
if(healthpercent >= 100)
|
||||
other_message = "It seems pristine and undamaged"
|
||||
else if(healthpercent >= 50)
|
||||
other_message = "It looks slightly dented"
|
||||
else if(healthpercent >= 25)
|
||||
other_message = "It appears heavily damaged"
|
||||
heavily_damaged = TRUE
|
||||
else if(healthpercent >= 0)
|
||||
other_message = "It's falling apart"
|
||||
heavily_damaged = TRUE
|
||||
user << "<span class='[heavily_damaged ? "alloy":"brass"]'>[can_see_clockwork ? "[servant_message]":"[other_message]"][heavily_damaged ? "!":"."]</span>"
|
||||
|
||||
/obj/structure/clockwork/bullet_act(obj/item/projectile/P)
|
||||
. = ..()
|
||||
visible_message("<span class='danger'>[src] is hit by \a [P]!</span>")
|
||||
playsound(src, P.hitsound, 50, 1)
|
||||
take_damage(P.damage, P.damage_type)
|
||||
|
||||
/obj/structure/clockwork/proc/attack_generic(mob/user, damage = 0, damage_type = BRUTE) //used by attack_alien, attack_animal, and attack_slime
|
||||
user.do_attack_animation(src)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.visible_message("<span class='danger'>[user] smashes into [src]!</span>")
|
||||
take_damage(damage, damage_type)
|
||||
|
||||
/obj/structure/clockwork/attack_alien(mob/living/user)
|
||||
playsound(src, 'sound/weapons/bladeslice.ogg', 50, 1)
|
||||
attack_generic(user, 15)
|
||||
|
||||
/obj/structure/clockwork/attack_animal(mob/living/simple_animal/M)
|
||||
if(!M.melee_damage_upper)
|
||||
return
|
||||
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
|
||||
attack_generic(M, M.melee_damage_upper, M.melee_damage_type)
|
||||
|
||||
/obj/structure/clockwork/attack_slime(mob/living/simple_animal/slime/user)
|
||||
if(!user.is_adult)
|
||||
return
|
||||
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
|
||||
attack_generic(user, rand(10, 15))
|
||||
|
||||
/obj/structure/clockwork/attacked_by(obj/item/I, mob/living/user)
|
||||
. = ..()
|
||||
if(I.force && takes_damage)
|
||||
playsound(src, I.hitsound, 50, 1)
|
||||
take_damage(I.force, I.damtype)
|
||||
|
||||
/obj/structure/clockwork/mech_melee_attack(obj/mecha/M)
|
||||
if(..())
|
||||
playsound(src, 'sound/weapons/punch4.ogg', 50, 1)
|
||||
take_damage(M.force, M.damtype)
|
||||
|
||||
/obj/structure/clockwork/cache //Tinkerer's cache: Stores components for later use.
|
||||
name = "tinkerer's cache"
|
||||
desc = "A large brass spire with a flaming hole in its center."
|
||||
clockwork_desc = "A brass container capable of storing a large amount of components.\n\
|
||||
Shares components with all other caches and will gradually generate components if near a Clockwork Wall."
|
||||
icon_state = "tinkerers_cache"
|
||||
construction_value = 10
|
||||
break_message = "<span class='warning'>The cache's fire winks out before it falls in on itself!</span>"
|
||||
max_health = 80
|
||||
health = 80
|
||||
var/wall_generation_cooldown
|
||||
var/wall_found = FALSE //if we've found a wall and finished our windup delay
|
||||
|
||||
/obj/structure/clockwork/cache/New()
|
||||
..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
clockwork_caches++
|
||||
set_light(2,1)
|
||||
|
||||
/obj/structure/clockwork/cache/Destroy()
|
||||
clockwork_caches--
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/structure/clockwork/cache/destroyed()
|
||||
if(takes_damage)
|
||||
for(var/I in src)
|
||||
var/atom/movable/A = I
|
||||
A.forceMove(get_turf(src)) //drop any daemons we have
|
||||
return ..()
|
||||
|
||||
/obj/structure/clockwork/cache/process()
|
||||
for(var/turf/closed/wall/clockwork/C in orange(1, src))
|
||||
if(!wall_found)
|
||||
wall_found = TRUE
|
||||
wall_generation_cooldown = world.time + CACHE_PRODUCTION_TIME
|
||||
visible_message("<span class='warning'>[src] starts to whirr in the presence of [C]...</span>")
|
||||
break
|
||||
if(wall_generation_cooldown <= world.time)
|
||||
wall_generation_cooldown = world.time + CACHE_PRODUCTION_TIME
|
||||
generate_cache_component()
|
||||
playsound(C, 'sound/magic/clockwork/fellowship_armory.ogg', rand(15, 20), 1, -3, 1, 1)
|
||||
visible_message("<span class='warning'>Something clunks around inside of [src]...</span>")
|
||||
break
|
||||
|
||||
/obj/structure/clockwork/cache/attackby(obj/item/I, mob/living/user, params)
|
||||
if(!is_servant_of_ratvar(user))
|
||||
return ..()
|
||||
if(istype(I, /obj/item/clockwork/component))
|
||||
var/obj/item/clockwork/component/C = I
|
||||
clockwork_component_cache[C.component_id]++
|
||||
user << "<span class='notice'>You add [C] to [src].</span>"
|
||||
user.drop_item()
|
||||
qdel(C)
|
||||
return 1
|
||||
else if(istype(I, /obj/item/clockwork/slab))
|
||||
var/obj/item/clockwork/slab/S = I
|
||||
clockwork_component_cache["belligerent_eye"] += S.stored_components["belligerent_eye"]
|
||||
clockwork_component_cache["vanguard_cogwheel"] += S.stored_components["vanguard_cogwheel"]
|
||||
clockwork_component_cache["guvax_capacitor"] += S.stored_components["guvax_capacitor"]
|
||||
clockwork_component_cache["replicant_alloy"] += S.stored_components["replicant_alloy"]
|
||||
clockwork_component_cache["hierophant_ansible"] += S.stored_components["hierophant_ansible"]
|
||||
S.stored_components["belligerent_eye"] = 0
|
||||
S.stored_components["vanguard_cogwheel"] = 0
|
||||
S.stored_components["guvax_capacitor"] = 0
|
||||
S.stored_components["replicant_alloy"] = 0
|
||||
S.stored_components["hierophant_ansible"] = 0
|
||||
user.visible_message("<span class='notice'>[user] empties [S] into [src].</span>", "<span class='notice'>You offload your slab's components into [src].</span>")
|
||||
return 1
|
||||
else if(istype(I, /obj/item/clockwork/daemon_shell))
|
||||
var/component_type
|
||||
switch(alert(user, "Will this daemon produce a specific type of component or produce randomly?.", , "Specific Type", "Random Component"))
|
||||
if("Specific Type")
|
||||
switch(input(user, "Choose a component type.", name) as null|anything in list("Belligerent Eyes", "Vanguard Cogwheels", "Guvax Capacitors", "Replicant Alloys", "Hierophant Ansibles"))
|
||||
if("Belligerent Eyes")
|
||||
component_type = "belligerent_eye"
|
||||
if("Vanguard Cogwheels")
|
||||
component_type = "vanguard_cogwheel"
|
||||
if("Guvax Capacitors")
|
||||
component_type = "guvax_capacitor"
|
||||
if("Replicant Alloys")
|
||||
component_type = "replicant_alloy"
|
||||
if("Hierophant Ansibles")
|
||||
component_type = "hierophant_ansibles"
|
||||
if(!user || !user.canUseTopic(src) || !user.canUseTopic(I))
|
||||
return 0
|
||||
var/obj/item/clockwork/tinkerers_daemon/D = new(src)
|
||||
D.cache = src
|
||||
D.specific_component = component_type
|
||||
user.visible_message("<span class='notice'>[user] spins the cogwheel on [I] and puts it into [src].</span>", \
|
||||
"<span class='notice'>You activate the daemon and put it into [src]. It will now produce a component every twenty seconds.</span>")
|
||||
user.drop_item()
|
||||
qdel(I)
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/clockwork/cache/attack_hand(mob/user)
|
||||
if(!is_servant_of_ratvar(user))
|
||||
return 0
|
||||
var/list/possible_components = list()
|
||||
if(clockwork_component_cache["belligerent_eye"])
|
||||
possible_components += "Belligerent Eye"
|
||||
if(clockwork_component_cache["vanguard_cogwheel"])
|
||||
possible_components += "Vanguard Cogwheel"
|
||||
if(clockwork_component_cache["guvax_capacitor"])
|
||||
possible_components += "Guvax Capacitor"
|
||||
if(clockwork_component_cache["replicant_alloy"])
|
||||
possible_components += "Replicant Alloy"
|
||||
if(clockwork_component_cache["hierophant_ansible"])
|
||||
possible_components += "Hierophant Ansible"
|
||||
if(!possible_components.len)
|
||||
user << "<span class='warning'>[src] is empty!</span>"
|
||||
return 0
|
||||
var/component_to_withdraw = input(user, "Choose a component to withdraw.", name) as null|anything in possible_components
|
||||
if(!user || !user.canUseTopic(src) || !component_to_withdraw)
|
||||
return 0
|
||||
var/obj/item/clockwork/component/the_component
|
||||
switch(component_to_withdraw)
|
||||
if("Belligerent Eye")
|
||||
if(clockwork_component_cache["belligerent_eye"])
|
||||
the_component = new/obj/item/clockwork/component/belligerent_eye(get_turf(src))
|
||||
clockwork_component_cache["belligerent_eye"]--
|
||||
if("Vanguard Cogwheel")
|
||||
if(clockwork_component_cache["vanguard_cogwheel"])
|
||||
the_component = new/obj/item/clockwork/component/vanguard_cogwheel(get_turf(src))
|
||||
clockwork_component_cache["vanguard_cogwheel"]--
|
||||
if("Guvax Capacitor")
|
||||
if(clockwork_component_cache["guvax_capacitor"])
|
||||
the_component = new/obj/item/clockwork/component/guvax_capacitor(get_turf(src))
|
||||
clockwork_component_cache["guvax_capacitor"]--
|
||||
if("Replicant Alloy")
|
||||
if(clockwork_component_cache["replicant_alloy"])
|
||||
the_component = new/obj/item/clockwork/component/replicant_alloy(get_turf(src))
|
||||
clockwork_component_cache["replicant_alloy"]--
|
||||
if("Hierophant Ansible")
|
||||
if(clockwork_component_cache["hierophant_ansible"])
|
||||
the_component = new/obj/item/clockwork/component/hierophant_ansible(get_turf(src))
|
||||
clockwork_component_cache["hierophant_ansible"]--
|
||||
if(the_component)
|
||||
user.visible_message("<span class='notice'>[user] withdraws [the_component] from [src].</span>", "<span class='notice'>You withdraw [the_component] from [src].</span>")
|
||||
user.put_in_hands(the_component)
|
||||
return 1
|
||||
|
||||
/obj/structure/clockwork/cache/examine(mob/user)
|
||||
..()
|
||||
if(is_servant_of_ratvar(user) || isobserver(user))
|
||||
user << "<b>Stored components:</b>"
|
||||
user << "<span class='neovgre_small'><i>Belligerent Eyes:</i> [clockwork_component_cache["belligerent_eye"]]</span>"
|
||||
user << "<span class='inathneq_small'><i>Vanguard Cogwheels:</i> [clockwork_component_cache["vanguard_cogwheel"]]</span>"
|
||||
user << "<span class='sevtug_small'><i>Guvax Capacitors:</i> [clockwork_component_cache["guvax_capacitor"]]</span>"
|
||||
user << "<span class='nezbere_small'><i>Replicant Alloys:</i> [clockwork_component_cache["replicant_alloy"]]</span>"
|
||||
user << "<span class='nzcrentr_small'><i>Hierophant Ansibles:</i> [clockwork_component_cache["hierophant_ansible"]]</span>"
|
||||
|
||||
|
||||
/obj/structure/clockwork/ocular_warden //Ocular warden: Low-damage, low-range turret. Deals constant damage to whoever it makes eye contact with.
|
||||
name = "ocular warden"
|
||||
desc = "A large brass eye with tendrils trailing below it and a wide red iris."
|
||||
clockwork_desc = "A stalwart turret that will deal sustained damage to any non-faithful it sees."
|
||||
icon_state = "ocular_warden"
|
||||
health = 25
|
||||
max_health = 25
|
||||
construction_value = 15
|
||||
layer = HIGH_OBJ_LAYER
|
||||
break_message = "<span class='warning'>The warden's eye gives a glare of utter hate before falling dark!</span>"
|
||||
debris = list(/obj/item/clockwork/component/belligerent_eye/blind_eye)
|
||||
burn_state = LAVA_PROOF
|
||||
var/damage_per_tick = 3
|
||||
var/sight_range = 3
|
||||
var/mob/living/target
|
||||
var/list/idle_messages = list(" sulkily glares around.", " lazily drifts from side to side.", " looks around for something to burn.", " slowly turns in circles.")
|
||||
|
||||
/obj/structure/clockwork/ocular_warden/New()
|
||||
..()
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
|
||||
/obj/structure/clockwork/ocular_warden/Destroy()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
return ..()
|
||||
|
||||
/obj/structure/clockwork/ocular_warden/examine(mob/user)
|
||||
..()
|
||||
user << "<span class='brass'>[target ? "<b>It's fixated on [target]!</b>" : "Its gaze is wandering aimlessly."]</span>"
|
||||
|
||||
/obj/structure/clockwork/ocular_warden/process()
|
||||
var/list/validtargets = acquire_nearby_targets()
|
||||
if(ratvar_awakens && (damage_per_tick == initial(damage_per_tick) || sight_range == initial(sight_range))) //Massive buff if Ratvar has returned
|
||||
damage_per_tick = 10
|
||||
sight_range = 5
|
||||
if(target)
|
||||
if(!(target in validtargets))
|
||||
lose_target()
|
||||
else
|
||||
if(!target.null_rod_check())
|
||||
target.adjustFireLoss(!iscultist(target) ? damage_per_tick : damage_per_tick * 2) //Nar-Sian cultists take additional damage
|
||||
if(ratvar_awakens && target)
|
||||
target.adjust_fire_stacks(damage_per_tick)
|
||||
target.IgniteMob()
|
||||
setDir(get_dir(get_turf(src), get_turf(target)))
|
||||
if(!target)
|
||||
if(validtargets.len)
|
||||
target = pick(validtargets)
|
||||
visible_message("<span class='warning'>[src] swivels to face [target]!</span>")
|
||||
target << "<span class='heavy_brass'>\"I SEE YOU!\"</span>\n<span class='userdanger'>[src]'s gaze [ratvar_awakens ? "melts you alive" : "burns you"]!</span>"
|
||||
if(target.null_rod_check() && !ratvar_awakens)
|
||||
target << "<span class='warning'>Your artifact glows hotly against you, protecting you from the warden's gaze!</span>"
|
||||
else if(prob(0.5)) //Extremely low chance because of how fast the subsystem it uses processes
|
||||
if(prob(50))
|
||||
visible_message("<span class='notice'>[src][pick(idle_messages)]</span>")
|
||||
else
|
||||
setDir(pick(cardinal))//Random rotation
|
||||
|
||||
/obj/structure/clockwork/ocular_warden/proc/acquire_nearby_targets()
|
||||
. = list()
|
||||
for(var/mob/living/L in viewers(sight_range, src)) //Doesn't attack the blind
|
||||
if(!is_servant_of_ratvar(L) && !L.stat && L.mind && !(L.disabilities & BLIND) && !L.null_rod_check())
|
||||
. += L
|
||||
|
||||
/obj/structure/clockwork/ocular_warden/proc/lose_target()
|
||||
if(!target)
|
||||
return 0
|
||||
target = null
|
||||
visible_message("<span class='warning'>[src] settles and seems almost disappointed.</span>")
|
||||
return 1
|
||||
|
||||
|
||||
/obj/structure/clockwork/shell
|
||||
construction_value = 0
|
||||
anchored = 0
|
||||
density = 0
|
||||
takes_damage = FALSE
|
||||
burn_state = LAVA_PROOF
|
||||
var/mobtype = /mob/living/simple_animal/hostile/clockwork
|
||||
var/spawn_message = " is an error and you should yell at whoever spawned this shell."
|
||||
|
||||
/obj/structure/clockwork/shell/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/device/mmi/posibrain/soul_vessel))
|
||||
if(!is_servant_of_ratvar(user))
|
||||
..()
|
||||
return 0
|
||||
var/obj/item/device/mmi/posibrain/soul_vessel/S = I
|
||||
if(!S.brainmob)
|
||||
user << "<span class='warning'>[S] hasn't trapped a spirit! Turn it on first.</span>"
|
||||
return 0
|
||||
if(S.brainmob && (!S.brainmob.client || !S.brainmob.mind))
|
||||
user << "<span class='warning'>[S]'s trapped spirit appears inactive!</span>"
|
||||
return 0
|
||||
user.visible_message("<span class='notice'>[user] places [S] in [src], where it fuses to the shell.</span>", "<span class='brass'>You place [S] in [src], fusing it to the shell.</span>")
|
||||
var/mob/living/simple_animal/A = new mobtype(get_turf(src))
|
||||
A.visible_message("<span class='brass'>[src][spawn_message]</span>")
|
||||
S.brainmob.mind.transfer_to(A)
|
||||
add_servant_of_ratvar(A, TRUE)
|
||||
user.drop_item()
|
||||
qdel(S)
|
||||
qdel(src)
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/clockwork/shell/cogscarab
|
||||
name = "cogscarab shell"
|
||||
desc = "A small brass shell with a cube-shaped receptable in its center. It gives off an aura of obsessive perfectionism."
|
||||
clockwork_desc = "A dormant receptable that, when powered with a soul vessel, will become a weak construct with an inbuilt proselytizer."
|
||||
icon_state = "clockdrone_shell"
|
||||
mobtype = /mob/living/simple_animal/drone/cogscarab
|
||||
spawn_message = "'s eyes blink open, glowing bright red."
|
||||
|
||||
/obj/structure/clockwork/shell/fragment //Anima fragment: Useless on its own, but can accept an active soul vessel to create a powerful construct.
|
||||
name = "fragment shell"
|
||||
desc = "A massive brass shell with a small cube-shaped receptable in its center. It gives off an aura of contained power."
|
||||
clockwork_desc = "A dormant receptable that, when powered with a soul vessel, will become a powerful construct."
|
||||
icon_state = "anime_fragment"
|
||||
mobtype = /mob/living/simple_animal/hostile/clockwork/fragment
|
||||
spawn_message = " whirs and rises from the ground on a flickering jet of reddish fire."
|
||||
|
||||
|
||||
/obj/structure/clockwork/wall_gear
|
||||
name = "massive gear"
|
||||
icon_state = "wall_gear"
|
||||
climbable = TRUE
|
||||
max_health = 50
|
||||
health = 50
|
||||
desc = "A massive brass gear. You could probably secure or unsecure it with a wrench, or just climb over it."
|
||||
clockwork_desc = "A massive brass gear. You could probably secure or unsecure it with a wrench, just climb over it, or proselytize it into replicant alloy."
|
||||
break_message = "<span class='warning'>The gear breaks apart into shards of alloy!</span>"
|
||||
debris = list(/obj/item/clockwork/alloy_shards)
|
||||
|
||||
/obj/structure/clockwork/wall_gear/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/wrench))
|
||||
default_unfasten_wrench(user, I, 10)
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
/obj/structure/clockwork/wall_gear/examine(mob/user)
|
||||
..()
|
||||
user << "<span class='notice'>[src] is [anchored ? "secured to the floor":"mobile, and not secured"].</span>"
|
||||
|
||||
///////////////////////
|
||||
// CLOCKWORK EFFECTS //
|
||||
///////////////////////
|
||||
|
||||
/obj/effect/clockwork
|
||||
name = "meme machine"
|
||||
desc = "Still don't know what it is."
|
||||
var/clockwork_desc = "A fabled artifact from beyond the stars. Contains concentrated meme essence." //Shown to clockwork cultists instead of the normal description
|
||||
icon = 'icons/effects/clockwork_effects.dmi'
|
||||
icon_state = "ratvars_flame"
|
||||
anchored = 1
|
||||
density = 0
|
||||
opacity = 0
|
||||
burn_state = LAVA_PROOF
|
||||
|
||||
/obj/effect/clockwork/New()
|
||||
..()
|
||||
all_clockwork_objects += src
|
||||
|
||||
/obj/effect/clockwork/Destroy()
|
||||
all_clockwork_objects -= src
|
||||
return ..()
|
||||
|
||||
/obj/effect/clockwork/examine(mob/user)
|
||||
if((is_servant_of_ratvar(user) || isobserver(user)) && clockwork_desc)
|
||||
desc = clockwork_desc
|
||||
..()
|
||||
desc = initial(desc)
|
||||
|
||||
/obj/effect/clockwork/judicial_marker //Judicial marker: Created by the judicial visor. After three seconds, stuns any non-servants nearby and damages Nar-Sian cultists.
|
||||
name = "judicial marker"
|
||||
desc = "You get the feeling that you shouldn't be standing here."
|
||||
clockwork_desc = "A sigil that will soon erupt and smite any unenlightened nearby."
|
||||
icon = 'icons/effects/96x96.dmi'
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
layer = BELOW_MOB_LAYER
|
||||
var/mob/user
|
||||
|
||||
/obj/effect/clockwork/judicial_marker/New(loc, caster)
|
||||
..()
|
||||
user = caster
|
||||
playsound(src, 'sound/magic/MAGIC_MISSILE.ogg', 50, 1, 1, 1)
|
||||
flick("judicial_marker", src)
|
||||
addtimer(src, "burstanim", 16, FALSE)
|
||||
|
||||
/obj/effect/clockwork/judicial_marker/proc/burstanim()
|
||||
layer = ABOVE_ALL_MOB_LAYER
|
||||
flick("judicial_explosion", src)
|
||||
addtimer(src, "judicialblast", 13, FALSE)
|
||||
|
||||
/obj/effect/clockwork/judicial_marker/proc/judicialblast()
|
||||
var/targetsjudged = 0
|
||||
playsound(src, 'sound/effects/explosionfar.ogg', 100, 1, 1, 1)
|
||||
for(var/mob/living/L in range(1, src))
|
||||
if(is_servant_of_ratvar(L))
|
||||
continue
|
||||
if(L.null_rod_check())
|
||||
var/obj/item/I = L.null_rod_check()
|
||||
L.visible_message("<span class='warning'>Strange energy flows into [L]'s [I.name]!</span>", \
|
||||
"<span class='userdanger'>Your [I.name] shields you from [src]!</span>")
|
||||
continue
|
||||
if(!iscultist(L))
|
||||
L.visible_message("<span class='warning'>[L] is struck by a judicial explosion!</span>", \
|
||||
"<span class='userdanger'>[!issilicon(L) ? "An unseen force slams you into the ground!" : "ERROR: Motor servos disabled by external source!"]</span>")
|
||||
L.Weaken(8)
|
||||
else
|
||||
L.visible_message("<span class='warning'>[L] is struck by a judicial explosion!</span>", \
|
||||
"<span class='heavy_brass'>\"Keep an eye out, filth.\"</span>\n<span class='userdanger'>A burst of heat crushes you against the ground!</span>")
|
||||
L.Weaken(4) //half the stun, but sets cultists on fire
|
||||
L.adjust_fire_stacks(2)
|
||||
L.IgniteMob()
|
||||
targetsjudged++
|
||||
L.adjustBruteLoss(10)
|
||||
user << "<span class='brass'><b>[targetsjudged ? "Successfully judged <span class='neovgre'>[targetsjudged]</span>":"Judged no"] heretic[!targetsjudged || targetsjudged > 1 ? "s":""].</b></span>"
|
||||
QDEL_IN(src, 3) //so the animation completes properly
|
||||
|
||||
/obj/effect/clockwork/judicial_marker/ex_act(severity)
|
||||
return
|
||||
|
||||
/obj/effect/clockwork/spatial_gateway //Spatial gateway: A usually one-way rift to another location.
|
||||
name = "spatial gateway"
|
||||
desc = "A gently thrumming tear in reality."
|
||||
clockwork_desc = "A gateway in reality."
|
||||
icon_state = "spatial_gateway"
|
||||
density = 1
|
||||
var/sender = TRUE //If this gateway is made for sending, not receiving
|
||||
var/both_ways = FALSE
|
||||
var/lifetime = 25 //How many deciseconds this portal will last
|
||||
var/uses = 1 //How many objects or mobs can go through the portal
|
||||
var/obj/effect/clockwork/spatial_gateway/linked_gateway //The gateway linked to this one
|
||||
|
||||
/obj/effect/clockwork/spatial_gateway/New()
|
||||
..()
|
||||
spawn(1)
|
||||
if(!linked_gateway)
|
||||
qdel(src)
|
||||
return 0
|
||||
if(both_ways)
|
||||
clockwork_desc = "A gateway in reality. It can both send and receive objects."
|
||||
else
|
||||
clockwork_desc = "A gateway in reality. It can only [sender ? "send" : "receive"] objects."
|
||||
QDEL_IN(src, lifetime)
|
||||
|
||||
//set up a gateway with another gateway
|
||||
/obj/effect/clockwork/spatial_gateway/proc/setup_gateway(obj/effect/clockwork/spatial_gateway/gatewayB, set_duration, set_uses, two_way)
|
||||
if(!gatewayB || !set_duration || !uses)
|
||||
return 0
|
||||
linked_gateway = gatewayB
|
||||
gatewayB.linked_gateway = src
|
||||
if(two_way)
|
||||
both_ways = TRUE
|
||||
gatewayB.both_ways = TRUE
|
||||
else
|
||||
sender = TRUE
|
||||
gatewayB.sender = FALSE
|
||||
gatewayB.density = FALSE
|
||||
lifetime = set_duration
|
||||
gatewayB.lifetime = set_duration
|
||||
uses = set_uses
|
||||
gatewayB.uses = set_uses
|
||||
return 1
|
||||
|
||||
/obj/effect/clockwork/spatial_gateway/examine(mob/user)
|
||||
..()
|
||||
if(is_servant_of_ratvar(user) || isobserver(user))
|
||||
user << "<span class='brass'>It has [uses] uses remaining.</span>"
|
||||
|
||||
/obj/effect/clockwork/spatial_gateway/attack_hand(mob/living/user)
|
||||
if(user.pulling && user.a_intent == "grab" && isliving(user.pulling))
|
||||
var/mob/living/L = user.pulling
|
||||
if(L.buckled || L.anchored || L.has_buckled_mobs())
|
||||
return 0
|
||||
user.visible_message("<span class='warning'>[user] shoves [L] into [src]!</span>", "<span class='danger'>You shove [L] into [src]!</span>")
|
||||
user.stop_pulling()
|
||||
pass_through_gateway(L)
|
||||
return 1
|
||||
if(!user.canUseTopic(src))
|
||||
return 0
|
||||
user.visible_message("<span class='warning'>[user] climbs through [src]!</span>", "<span class='danger'>You brace yourself and step through [src]...</span>")
|
||||
pass_through_gateway(user)
|
||||
return 1
|
||||
|
||||
/obj/effect/clockwork/spatial_gateway/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/weapon/nullrod))
|
||||
user.visible_message("<span class='warning'>[user] dispels [src] with [I]!</span>", "<span class='danger'>You close [src] with [I]!</span>")
|
||||
qdel(linked_gateway)
|
||||
qdel(src)
|
||||
return 1
|
||||
if(istype(I, /obj/item/clockwork/slab))
|
||||
user << "<span class='heavy_brass'>\"I don't think you want to drop your slab into that\".\n\"If you really want to, try throwing it.\"</span>"
|
||||
return 1
|
||||
if(user.drop_item())
|
||||
user.visible_message("<span class='warning'>[user] drops [I] into [src]!</span>", "<span class='danger'>You drop [I] into [src]!</span>")
|
||||
pass_through_gateway(I)
|
||||
..()
|
||||
|
||||
/obj/effect/clockwork/spatial_gateway/Bumped(atom/A)
|
||||
..()
|
||||
if(isliving(A) || istype(A, /obj/item))
|
||||
pass_through_gateway(A)
|
||||
|
||||
/obj/effect/clockwork/spatial_gateway/proc/pass_through_gateway(atom/movable/A)
|
||||
if(!linked_gateway)
|
||||
qdel(src)
|
||||
return 0
|
||||
if(!sender)
|
||||
visible_message("<span class='warning'>[A] bounces off of [src]!</span>")
|
||||
return 0
|
||||
if(!uses)
|
||||
return 0
|
||||
if(isliving(A))
|
||||
var/mob/living/user = A
|
||||
user << "<span class='warning'><b>You pass through [src] and appear elsewhere!</b></span>"
|
||||
linked_gateway.visible_message("<span class='warning'>A shape appears in [linked_gateway] before emerging!</span>")
|
||||
playsound(src, 'sound/effects/EMPulse.ogg', 50, 1)
|
||||
playsound(linked_gateway, 'sound/effects/EMPulse.ogg', 50, 1)
|
||||
transform = matrix() * 1.5
|
||||
animate(src, transform = matrix() / 1.5, time = 10)
|
||||
linked_gateway.transform = matrix() * 1.5
|
||||
animate(linked_gateway, transform = matrix() / 1.5, time = 10)
|
||||
A.forceMove(get_turf(linked_gateway))
|
||||
uses = max(0, uses - 1)
|
||||
linked_gateway.uses = max(0, linked_gateway.uses - 1)
|
||||
spawn(10)
|
||||
if(!uses)
|
||||
qdel(src)
|
||||
qdel(linked_gateway)
|
||||
return 1
|
||||
|
||||
/obj/effect/clockwork/general_marker
|
||||
name = "general marker"
|
||||
desc = "Some big guy. For you."
|
||||
clockwork_desc = "One of Ratvar's generals."
|
||||
alpha = 200
|
||||
layer = MASSIVE_OBJ_LAYER
|
||||
|
||||
/obj/effect/clockwork/general_marker/New()
|
||||
..()
|
||||
playsound(src, 'sound/magic/clockwork/invoke_general.ogg', 50, 0)
|
||||
animate(src, alpha = 0, time = 10)
|
||||
QDEL_IN(src, 10)
|
||||
|
||||
/obj/effect/clockwork/general_marker/nezbere
|
||||
name = "Nezbere, the Brass Eidolon"
|
||||
desc = "A towering colossus clad in nigh-impenetrable brass armor. Its gaze is stern yet benevolent, even upon you."
|
||||
clockwork_desc = "One of Ratvar's four generals. Nezbere is responsible for the design, testing, and creation of everything in Ratvar's domain."
|
||||
icon = 'icons/effects/340x428.dmi'
|
||||
icon_state = "nezbere"
|
||||
pixel_x = -154
|
||||
pixel_y = -198
|
||||
|
||||
/obj/effect/clockwork/general_marker/sevtug
|
||||
name = "Sevtug, the Formless Pariah"
|
||||
desc = "A sinister cloud of purple energy. Looking at it gives you a headache."
|
||||
clockwork_desc = "One of Ratvar's four generals. Sevtug taught him how to manipulate minds and is one of his oldest allies."
|
||||
icon = 'icons/effects/211x247.dmi'
|
||||
icon_state = "sevtug"
|
||||
pixel_x = -89
|
||||
pixel_y = -107
|
||||
|
||||
/obj/effect/clockwork/general_marker/nzcrentr
|
||||
name = "Nzcrentr, the Forgotten Arbiter"
|
||||
desc = "A terrifying war machine crackling with limitless energy."
|
||||
clockwork_desc = "One of Ratvar's four generals. Nzcrentr is the result of Neovgre - Nezbere's finest war machine, commandeerable only be a mortal - fusing with its pilot and driving her \
|
||||
insane. Nzcrentr seeks out any and all sentient life to slaughter it for sport."
|
||||
icon = 'icons/effects/254x361.dmi'
|
||||
icon_state = "nzcrentr"
|
||||
pixel_x = -111
|
||||
pixel_y = -164
|
||||
|
||||
/obj/effect/clockwork/general_marker/inathneq
|
||||
name = "Inath-Neq, the Resonant Cogwheel"
|
||||
desc = "A humanoid form blazing with blue fire. It radiates an aura of kindness and caring."
|
||||
clockwork_desc = "One of Ratvar's four generals. Before her current form, Inath-Neq was a powerful warrior priestess commanding the Resonant Cogs, a sect of Ratvarian warriors renowned for \
|
||||
their prowess. After a lost battle with Nar-Sian cultists, Inath-Neq was struck down and stated in her dying breath, \
|
||||
\"The Resonant Cogs shall not fall silent this day, but will come together to form a wheel that shall never stop turning.\" Ratvar, touched by this, granted Inath-Neq an eternal body and \
|
||||
merged her soul with those of the Cogs slain with her on the battlefield."
|
||||
icon = 'icons/effects/187x381.dmi'
|
||||
icon_state = "inath-neq"
|
||||
pixel_x = -77
|
||||
pixel_y = -174
|
||||
|
||||
|
||||
/obj/effect/clockwork/sigil //Sigils: Rune-like markings on the ground with various effects.
|
||||
name = "sigil"
|
||||
desc = "A strange set of markings drawn on the ground."
|
||||
clockwork_desc = "A sigil of some purpose."
|
||||
icon_state = "sigil"
|
||||
layer = LOW_OBJ_LAYER
|
||||
alpha = 50
|
||||
burn_state = FIRE_PROOF
|
||||
burntime = 1
|
||||
var/affects_servants = FALSE
|
||||
var/stat_affected = CONSCIOUS
|
||||
|
||||
/obj/effect/clockwork/sigil/attack_hand(mob/user)
|
||||
if(iscarbon(user) && !user.stat && (!is_servant_of_ratvar(user) || (is_servant_of_ratvar(user) && user.a_intent == "harm")))
|
||||
user.visible_message("<span class='warning'>[user] stamps out [src]!</span>", "<span class='danger'>You stomp on [src], scattering it into thousands of particles.</span>")
|
||||
qdel(src)
|
||||
return 1
|
||||
..()
|
||||
|
||||
/obj/effect/clockwork/sigil/Crossed(atom/movable/AM)
|
||||
..()
|
||||
if(isliving(AM))
|
||||
var/mob/living/L = AM
|
||||
if(L.stat <= stat_affected)
|
||||
if((!is_servant_of_ratvar(L) || (is_servant_of_ratvar(L) && affects_servants)) && L.mind)
|
||||
if(L.null_rod_check())
|
||||
var/obj/item/I = L.null_rod_check()
|
||||
L.visible_message("<span class='warning'>[L]'s [I.name] protects them from [src]'s effects!</span>", "<span class='userdanger'>Your [I.name] protects you!</span>")
|
||||
return
|
||||
sigil_effects(L)
|
||||
return 1
|
||||
|
||||
/obj/effect/clockwork/sigil/proc/sigil_effects(mob/living/L)
|
||||
|
||||
/obj/effect/clockwork/sigil/transgression //Sigil of Transgression: Stuns and flashes the first non-servant to walk on it. Nar-Sian cultists are damaged and knocked down for about twice the stun
|
||||
name = "dull sigil"
|
||||
desc = "A dull, barely-visible golden sigil. It's as though light was carved into the ground."
|
||||
icon = 'icons/effects/clockwork_effects.dmi'
|
||||
clockwork_desc = "A sigil that will stun the first non-servant to cross it. Nar-Sie's dogs will be knocked down."
|
||||
icon_state = "sigildull"
|
||||
color = "#FAE48C"
|
||||
|
||||
/obj/effect/clockwork/sigil/transgression/sigil_effects(mob/living/L)
|
||||
var/target_flashed = L.flash_eyes()
|
||||
for(var/mob/living/M in viewers(5, src))
|
||||
if(!is_servant_of_ratvar(M) && M != L)
|
||||
M.flash_eyes()
|
||||
if(iscultist(L))
|
||||
L << "<span class='heavy_brass'>\"Watch your step, wretch.\"</span>"
|
||||
L.adjustBruteLoss(10)
|
||||
L.Weaken(4)
|
||||
L.visible_message("<span class='warning'>[src] appears around [L] in a burst of light!</span>", \
|
||||
"<span class='userdanger'>[target_flashed ? "An unseen force":"The glowing sigil around you"] holds you in place!</span>")
|
||||
L.Stun(3)
|
||||
PoolOrNew(/obj/effect/overlay/temp/ratvar/sigil/transgression, get_turf(src))
|
||||
qdel(src)
|
||||
return 1
|
||||
|
||||
/obj/effect/clockwork/sigil/submission //Sigil of Submission: After a short time, converts any non-servant standing on it. Knocks down and silences them for five seconds afterwards.
|
||||
name = "ominous sigil"
|
||||
desc = "A luminous golden sigil. Something about it really bothers you."
|
||||
clockwork_desc = "A sigil that will enslave the first person to cross it, provided they remain on it for five seconds."
|
||||
icon_state = "sigilsubmission"
|
||||
color = "#FAE48C"
|
||||
alpha = 125
|
||||
stat_affected = UNCONSCIOUS
|
||||
var/convert_time = 50
|
||||
var/glow_light = 2 //soft light
|
||||
var/glow_falloff = 1
|
||||
var/delete_on_finish = TRUE
|
||||
var/sigil_name = "Sigil of Submission"
|
||||
var/glow_type
|
||||
|
||||
/obj/effect/clockwork/sigil/submission/New()
|
||||
..()
|
||||
set_light(glow_light,glow_falloff)
|
||||
|
||||
/obj/effect/clockwork/sigil/submission/proc/post_channel(mob/living/L)
|
||||
|
||||
/obj/effect/clockwork/sigil/submission/sigil_effects(mob/living/L)
|
||||
visible_message("<span class='warning'>[src] begins to glow a piercing magenta!</span>")
|
||||
animate(src, color = "#AF0AAF", time = convert_time)
|
||||
var/obj/effect/overlay/temp/ratvar/sigil/glow
|
||||
if(glow_type)
|
||||
glow = PoolOrNew(glow_type, get_turf(src))
|
||||
animate(glow, alpha = 255, time = convert_time)
|
||||
var/I = 0
|
||||
while(I < convert_time && get_turf(L) == get_turf(src))
|
||||
I++
|
||||
sleep(1)
|
||||
if(get_turf(L) != get_turf(src))
|
||||
if(glow)
|
||||
qdel(glow)
|
||||
animate(src, color = initial(color), time = 20)
|
||||
visible_message("<span class='warning'>[src] slowly stops glowing!</span>")
|
||||
return 0
|
||||
post_channel(L)
|
||||
if(is_eligible_servant(L))
|
||||
L << "<span class='heavy_brass'>\"You belong to me now.\"</span>"
|
||||
add_servant_of_ratvar(L)
|
||||
L.Weaken(3) //Completely defenseless for about five seconds - mainly to give them time to read over the information they've just been presented with
|
||||
L.Stun(3)
|
||||
if(iscarbon(L))
|
||||
var/mob/living/carbon/C = L
|
||||
C.silent += 5
|
||||
var/message = "[sigil_name] in [get_area(src)] <span class='sevtug'>[is_servant_of_ratvar(L) ? "successfully converted" : "failed to convert"]</span>"
|
||||
for(var/M in mob_list)
|
||||
if(isobserver(M))
|
||||
var/link = FOLLOW_LINK(M, L)
|
||||
M << "[link] <span class='heavy_brass'>[message] [L.real_name]!</span>"
|
||||
else if(is_servant_of_ratvar(M))
|
||||
if(M == L)
|
||||
M << "<span class='heavy_brass'>[message] you!</span>"
|
||||
else
|
||||
M << "<span class='heavy_brass'>[message] [L.real_name]!</span>"
|
||||
if(delete_on_finish)
|
||||
qdel(src)
|
||||
else
|
||||
animate(src, color = initial(color), time = 20)
|
||||
visible_message("<span class='warning'>[src] slowly stops glowing!</span>")
|
||||
return 1
|
||||
|
||||
/obj/effect/clockwork/sigil/submission/accession //Sigil of Accession: After a short time, converts any non-servant standing on it though implants. Knocks down and silences them for five seconds afterwards.
|
||||
name = "terrifying sigil"
|
||||
desc = "A luminous brassy sigil. Something about it makes you want to flee."
|
||||
clockwork_desc = "A sigil that will enslave any person who crosses it, provided they remain on it for five seconds. \n\
|
||||
It can convert a mindshielded target once before disppearing, but can convert any number of non-implanted targets."
|
||||
icon_state = "sigiltransgression"
|
||||
color = "#A97F1B"
|
||||
alpha = 200
|
||||
glow_light = 4 //bright light
|
||||
glow_falloff = 3
|
||||
delete_on_finish = FALSE
|
||||
sigil_name = "Sigil of Accession"
|
||||
glow_type = /obj/effect/overlay/temp/ratvar/sigil/accession
|
||||
|
||||
/obj/effect/clockwork/sigil/submission/accession/post_channel(mob/living/L)
|
||||
if(isloyal(L))
|
||||
delete_on_finish = TRUE
|
||||
L.visible_message("<span class='warning'>[L] visibly trembles!</span>", \
|
||||
"<span class='sevtug'>Lbh jvyy or zvar-naq-uvf. Guvf chal gevaxrg jvyy abg fgbc zr.</span>")
|
||||
for(var/obj/item/weapon/implant/mindshield/M in L)
|
||||
if(M.implanted)
|
||||
qdel(M)
|
||||
|
||||
/obj/effect/clockwork/sigil/transmission
|
||||
name = "suspicious sigil"
|
||||
desc = "A glowing orange sigil. The air around it feels staticky."
|
||||
clockwork_desc = "A sigil that will serve as a battery for clockwork structures. Use Volt Void while standing on it to charge it."
|
||||
icon_state = "sigiltransmission"
|
||||
color = "#EC8A2D"
|
||||
alpha = 50
|
||||
var/power_charge = 2500 //starts with 2500W by default
|
||||
|
||||
/obj/effect/clockwork/sigil/transmission/examine(mob/user)
|
||||
..()
|
||||
if(is_servant_of_ratvar(user) || isobserver(user))
|
||||
user << "<span class='[power_charge ? "brass":"alloy"]'>It is storing [power_charge]W of power.</span>"
|
||||
|
||||
/obj/effect/clockwork/sigil/transmission/sigil_effects(mob/living/L)
|
||||
if(power_charge)
|
||||
L << "<span class='brass'>You feel a slight, static shock.</span>"
|
||||
return 1
|
||||
|
||||
/obj/effect/clockwork/sigil/transmission/New()
|
||||
..()
|
||||
alpha = min(initial(alpha) + power_charge*0.02, 255)
|
||||
|
||||
/obj/effect/clockwork/sigil/transmission/proc/modify_charge(amount)
|
||||
if(power_charge - amount < 0)
|
||||
return 0
|
||||
power_charge -= amount
|
||||
alpha = min(initial(alpha) + power_charge*0.02, 255)
|
||||
return 1
|
||||
|
||||
/obj/effect/clockwork/sigil/vitality
|
||||
name = "comforting sigil"
|
||||
desc = "A faint blue sigil. Looking at it makes you feel protected."
|
||||
clockwork_desc = "A sigil that will drain non-servants that remain on it. Servants that remain on it will be healed if it has any vitality drained."
|
||||
icon_state = "sigilvitality"
|
||||
color = "#123456"
|
||||
alpha = 75
|
||||
affects_servants = TRUE
|
||||
stat_affected = DEAD
|
||||
var/vitality = 0
|
||||
var/base_revive_cost = 20
|
||||
var/sigil_active = FALSE
|
||||
var/animation_number = 3 //each cycle increments this by 1, at 4 it produces an animation and resets
|
||||
|
||||
/obj/effect/clockwork/sigil/vitality/examine(mob/user)
|
||||
..()
|
||||
if(is_servant_of_ratvar(user) || isobserver(user))
|
||||
user << "<span class='[vitality ? "inathneq_small":"alloy"]'>It is storing [vitality] units of vitality.</span>"
|
||||
user << "<span class='inathneq_small'>It requires at least [base_revive_cost] units of vitality to revive dead servants, in addition to any damage the servant has.</span>"
|
||||
|
||||
/obj/effect/clockwork/sigil/vitality/sigil_effects(mob/living/L)
|
||||
if(L.suiciding || sigil_active || !is_servant_of_ratvar(L) && L.stat == DEAD)
|
||||
return 0
|
||||
visible_message("<span class='warning'>[src] begins to glow bright blue!</span>")
|
||||
animate(src, alpha = 255, time = 10)
|
||||
sleep(10)
|
||||
sigil_active = TRUE
|
||||
//as long as they're still on the sigil and are either not a servant or they're a servant AND it has remaining vitality
|
||||
while(L && (!is_servant_of_ratvar(L) && L.stat != DEAD || (is_servant_of_ratvar(L) && vitality)) && get_turf(L) == get_turf(src))
|
||||
if(animation_number >= 4)
|
||||
PoolOrNew(/obj/effect/overlay/temp/ratvar/sigil/vitality, get_turf(src))
|
||||
animation_number = 0
|
||||
animation_number++
|
||||
if(!is_servant_of_ratvar(L))
|
||||
var/vitality_drained = L.adjustToxLoss(1.5)
|
||||
if(vitality_drained)
|
||||
vitality += vitality_drained
|
||||
else
|
||||
break
|
||||
else
|
||||
var/clone_to_heal = L.getCloneLoss()
|
||||
var/tox_to_heal = L.getToxLoss()
|
||||
var/burn_to_heal = L.getFireLoss()
|
||||
var/brute_to_heal = L.getBruteLoss()
|
||||
var/oxy_to_heal = L.getOxyLoss()
|
||||
var/total_damage = clone_to_heal + tox_to_heal + burn_to_heal + brute_to_heal + oxy_to_heal
|
||||
if(L.stat == DEAD)
|
||||
var/revival_cost = base_revive_cost + total_damage - oxy_to_heal //ignores oxygen damage
|
||||
var/mob/dead/observer/ghost = L.get_ghost(TRUE)
|
||||
if(ghost)
|
||||
if(vitality >= revival_cost)
|
||||
ghost.reenter_corpse()
|
||||
L.revive(1, 1)
|
||||
playsound(L, 'sound/magic/Staff_Healing.ogg', 50, 1)
|
||||
L.visible_message("<span class='warning'>[L] suddenly gets back up, their mouth dripping blue ichor!</span>", "<span class='inathneq'>\"Lbh jvyy or bxnl, puvyq.\"</span>")
|
||||
vitality -= revival_cost
|
||||
break
|
||||
else
|
||||
break
|
||||
if(!total_damage)
|
||||
break
|
||||
var/vitality_for_cycle = min(vitality, 3)
|
||||
|
||||
if(clone_to_heal && vitality_for_cycle)
|
||||
var/healing = min(vitality_for_cycle, clone_to_heal)
|
||||
vitality_for_cycle -= healing
|
||||
L.adjustCloneLoss(-healing)
|
||||
vitality -= healing
|
||||
|
||||
if(tox_to_heal && vitality_for_cycle)
|
||||
var/healing = min(vitality_for_cycle, tox_to_heal)
|
||||
vitality_for_cycle -= healing
|
||||
L.adjustToxLoss(-healing)
|
||||
vitality -= healing
|
||||
|
||||
if(burn_to_heal && vitality_for_cycle)
|
||||
var/healing = min(vitality_for_cycle, burn_to_heal)
|
||||
vitality_for_cycle -= healing
|
||||
L.adjustFireLoss(-healing)
|
||||
vitality -= healing
|
||||
|
||||
if(brute_to_heal && vitality_for_cycle)
|
||||
var/healing = min(vitality_for_cycle, brute_to_heal)
|
||||
vitality_for_cycle -= healing
|
||||
L.adjustBruteLoss(-healing)
|
||||
vitality -= healing
|
||||
|
||||
if(oxy_to_heal && vitality_for_cycle)
|
||||
var/healing = min(vitality_for_cycle, oxy_to_heal)
|
||||
vitality_for_cycle -= healing
|
||||
L.adjustOxyLoss(-healing)
|
||||
vitality -= healing
|
||||
sleep(2)
|
||||
|
||||
animation_number = initial(animation_number)
|
||||
sigil_active = FALSE
|
||||
animate(src, alpha = initial(alpha), time = 20)
|
||||
visible_message("<span class='warning'>[src] slowly stops glowing!</span>")
|
||||
@@ -1,178 +0,0 @@
|
||||
//sends messages via hierophant
|
||||
/proc/send_hierophant_message(mob/user, message, name_span = "heavy_brass", message_span = "brass", user_title = "Servant")
|
||||
if(!user || !message || !ticker || !ticker.mode)
|
||||
return 0
|
||||
var/parsed_message = "<span class='[name_span]'>[user_title ? "[user_title] ":""][findtextEx(user.name, user.real_name) ? user.name : "[user.real_name] (as [user.name])"]: </span><span class='[message_span]'>\"[message]\"</span>"
|
||||
for(var/M in mob_list)
|
||||
if(isobserver(M))
|
||||
var/link = FOLLOW_LINK(M, user)
|
||||
M << "[link] [parsed_message]"
|
||||
else if(is_servant_of_ratvar(M))
|
||||
M << parsed_message
|
||||
return 1
|
||||
|
||||
//Function Call action: Calls forth a Ratvarian spear.
|
||||
/datum/action/innate/function_call
|
||||
name = "Function Call"
|
||||
button_icon_state = "ratvarian_spear"
|
||||
background_icon_state = "bg_clock"
|
||||
check_flags = AB_CHECK_RESTRAINED|AB_CHECK_STUNNED|AB_CHECK_CONSCIOUS
|
||||
|
||||
/datum/action/innate/function_call/IsAvailable()
|
||||
if(!is_servant_of_ratvar(owner))
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/datum/action/innate/function_call/Activate()
|
||||
if(owner.l_hand && owner.r_hand)
|
||||
usr << "<span class='warning'>You need an empty to hand to call forth your spear!</span>"
|
||||
return 0
|
||||
owner.visible_message("<span class='warning'>A strange spear materializes in [usr]'s hands!</span>", "<span class='brass'>You call forth your spear!</span>")
|
||||
var/obj/item/clockwork/ratvarian_spear/R = new(get_turf(usr))
|
||||
owner.put_in_hands(R)
|
||||
for(var/datum/action/innate/function_call/F in owner.actions) //Removes any bound Ratvarian spears
|
||||
qdel(F)
|
||||
return 1
|
||||
|
||||
//allows a mob to select a target to gate to
|
||||
/atom/movable/proc/procure_gateway(mob/living/invoker, time_duration, gateway_uses, two_way)
|
||||
var/list/possible_targets = list()
|
||||
var/list/teleportnames = list()
|
||||
var/list/duplicatenamecount = list()
|
||||
|
||||
for(var/obj/structure/clockwork/powered/clockwork_obelisk/O in all_clockwork_objects)
|
||||
if(!O.Adjacent(invoker) && O != src && (O.z <= ZLEVEL_SPACEMAX)) //don't list obelisks that we're next to
|
||||
var/area/A = get_area(O)
|
||||
var/locname = initial(A.name)
|
||||
var/resultkey = "[locname] [O.name]"
|
||||
if(resultkey in teleportnames) //why the fuck did you put two obelisks in the same area
|
||||
duplicatenamecount[resultkey]++
|
||||
resultkey = "[resultkey] ([duplicatenamecount[resultkey]])"
|
||||
else
|
||||
teleportnames.Add(resultkey)
|
||||
duplicatenamecount[resultkey] = 1
|
||||
possible_targets[resultkey] = O
|
||||
|
||||
for(var/mob/living/L in living_mob_list)
|
||||
if(!L.stat && is_servant_of_ratvar(L) && !L.Adjacent(invoker) && L != invoker && (L.z <= ZLEVEL_SPACEMAX)) //People right next to the invoker can't be portaled to, for obvious reasons
|
||||
var/resultkey = "[L.name] ([L.real_name])"
|
||||
if(resultkey in teleportnames)
|
||||
duplicatenamecount[resultkey]++
|
||||
resultkey = "[resultkey] ([duplicatenamecount[resultkey]])"
|
||||
else
|
||||
teleportnames.Add(resultkey)
|
||||
duplicatenamecount[resultkey] = 1
|
||||
possible_targets[resultkey] = L
|
||||
|
||||
if(!possible_targets.len)
|
||||
invoker << "<span class='warning'>There are no other eligible targets for a Spatial Gateway!</span>"
|
||||
return 0
|
||||
var/input_target_key = input(invoker, "Choose a target to form a rift to.", "Spatial Gateway") as null|anything in possible_targets
|
||||
var/atom/movable/target = possible_targets[input_target_key]
|
||||
if(!target || !invoker.canUseTopic(src, BE_CLOSE))
|
||||
return 0
|
||||
var/istargetobelisk = istype(target, /obj/structure/clockwork/powered/clockwork_obelisk)
|
||||
if(istargetobelisk)
|
||||
gateway_uses *= 2
|
||||
time_duration *= 2
|
||||
invoker.visible_message("<span class='warning'>The air in front of [invoker] ripples before suddenly tearing open!</span>", \
|
||||
"<span class='brass'>With a word, you rip open a [two_way ? "two-way":"one-way"] rift to [input_target_key]. It will last for [time_duration / 10] seconds and has [gateway_uses] use[gateway_uses > 1 ? "s" : ""].</span>")
|
||||
var/obj/effect/clockwork/spatial_gateway/S1 = new(istype(src, /obj/structure/clockwork/powered/clockwork_obelisk) ? get_turf(src) : get_step(get_turf(invoker), invoker.dir))
|
||||
var/obj/effect/clockwork/spatial_gateway/S2 = new(istargetobelisk ? get_turf(target) : get_step(get_turf(target), target.dir))
|
||||
|
||||
//Set up the portals now that they've spawned
|
||||
S1.setup_gateway(S2, time_duration, gateway_uses, two_way)
|
||||
S2.visible_message("<span class='warning'>The air in front of [target] ripples before suddenly tearing open!</span>")
|
||||
return 1
|
||||
|
||||
/proc/scripture_unlock_check(scripture_tier) //check if the selected scripture tier is unlocked
|
||||
var/servants = 0
|
||||
var/unconverted_ai_exists = FALSE
|
||||
for(var/mob/living/M in living_mob_list)
|
||||
if(is_servant_of_ratvar(M) && (ishuman(M) || issilicon(M)))
|
||||
servants++
|
||||
for(var/mob/living/silicon/ai/ai in living_mob_list)
|
||||
if(!is_servant_of_ratvar(ai) && ai.client)
|
||||
unconverted_ai_exists = TRUE
|
||||
switch(scripture_tier)
|
||||
if(SCRIPTURE_DRIVER)
|
||||
return 1
|
||||
if(SCRIPTURE_SCRIPT)
|
||||
if(servants >= 5 && clockwork_caches)
|
||||
return 1 //5 or more non-brain servants and any number of clockwork caches
|
||||
if(SCRIPTURE_APPLICATION)
|
||||
if(servants >= 8 && clockwork_caches >= 3 && clockwork_construction_value >= 75)
|
||||
return 1 //8 or more non-brain servants, 3+ clockwork caches, and at least 75 CV
|
||||
if(SCRIPTURE_REVENANT)
|
||||
if(servants >= 10 && clockwork_caches >= 4 && clockwork_construction_value >= 150)
|
||||
return 1 //10 or more non-brain servants, 4+ clockwork caches, and at least 150 CV
|
||||
if(SCRIPTURE_JUDGEMENT)
|
||||
if(servants >= 12 && clockwork_caches >= 5 && clockwork_construction_value >= 250 && !unconverted_ai_exists)
|
||||
return 1 //12 or more non-brain servants, 5+ clockwork caches, at least 250 CV, and there are no living, non-servant ais
|
||||
return 0
|
||||
|
||||
/proc/generate_cache_component(specific_component_id) //generates a component in the global component cache, either random based on lowest or a specific component
|
||||
if(specific_component_id)
|
||||
clockwork_component_cache[specific_component_id]++
|
||||
else
|
||||
var/component_to_generate = get_weighted_component_id()
|
||||
clockwork_component_cache[component_to_generate]++
|
||||
|
||||
/proc/get_weighted_component_id(obj/item/clockwork/slab/storage_slab) //returns a chosen component id based on the lowest amount of that component
|
||||
if(storage_slab)
|
||||
return pickweight(list("belligerent_eye" = max(MAX_COMPONENTS_BEFORE_RAND - LOWER_PROB_PER_COMPONENT*(clockwork_component_cache["belligerent_eye"] + storage_slab.stored_components["belligerent_eye"]), 1), \
|
||||
"vanguard_cogwheel" = max(MAX_COMPONENTS_BEFORE_RAND - LOWER_PROB_PER_COMPONENT*(clockwork_component_cache["vanguard_cogwheel"] + storage_slab.stored_components["vanguard_cogwheel"]), 1), \
|
||||
"guvax_capacitor" = max(MAX_COMPONENTS_BEFORE_RAND - LOWER_PROB_PER_COMPONENT*(clockwork_component_cache["guvax_capacitor"] + storage_slab.stored_components["guvax_capacitor"]), 1), \
|
||||
"replicant_alloy" = max(MAX_COMPONENTS_BEFORE_RAND - LOWER_PROB_PER_COMPONENT*(clockwork_component_cache["replicant_alloy"] + storage_slab.stored_components["replicant_alloy"]), 1), \
|
||||
"hierophant_ansible" = max(MAX_COMPONENTS_BEFORE_RAND - LOWER_PROB_PER_COMPONENT*(clockwork_component_cache["hierophant_ansible"] + storage_slab.stored_components["hierophant_ansible"]), 1)))
|
||||
|
||||
return pickweight(list("belligerent_eye" = max(MAX_COMPONENTS_BEFORE_RAND - LOWER_PROB_PER_COMPONENT*clockwork_component_cache["belligerent_eye"], 1), \
|
||||
"vanguard_cogwheel" = max(MAX_COMPONENTS_BEFORE_RAND - LOWER_PROB_PER_COMPONENT*clockwork_component_cache["vanguard_cogwheel"], 1), \
|
||||
"guvax_capacitor" = max(MAX_COMPONENTS_BEFORE_RAND - LOWER_PROB_PER_COMPONENT*clockwork_component_cache["guvax_capacitor"], 1), \
|
||||
"replicant_alloy" = max(MAX_COMPONENTS_BEFORE_RAND - LOWER_PROB_PER_COMPONENT*clockwork_component_cache["replicant_alloy"], 1), \
|
||||
"hierophant_ansible" = max(MAX_COMPONENTS_BEFORE_RAND - LOWER_PROB_PER_COMPONENT*clockwork_component_cache["hierophant_ansible"], 1)))
|
||||
|
||||
/proc/clockwork_say(atom/movable/AM, message, whisper=FALSE)
|
||||
// When servants invoke ratvar's power, they speak in ways that non
|
||||
// servants do not comprehend.
|
||||
// Our ratvarian chants are stored in their ratvar forms
|
||||
|
||||
var/list/spans = list(SPAN_ROBOT)
|
||||
|
||||
var/old_languages_spoken = AM.languages_spoken
|
||||
AM.languages_spoken = HUMAN //anyone who can understand HUMAN will hear weird shitty ratvar speak, otherwise it'll get starred out
|
||||
if(isliving(AM))
|
||||
var/mob/living/L = AM
|
||||
if(!whisper)
|
||||
L.say(message, "clock", spans)
|
||||
else
|
||||
L.whisper(message)
|
||||
else
|
||||
AM.say(message)
|
||||
AM.languages_spoken = old_languages_spoken
|
||||
|
||||
/*
|
||||
|
||||
The Ratvarian Language
|
||||
|
||||
In the lore of the Servants of Ratvar, the Ratvarian tongue is a timeless language and full of power. It sounds like gibberish, much like Nar-Sie's language, but is in fact derived from
|
||||
aforementioned language, and may induce miracles when spoken in the correct way with an amplifying tool (similar to runes used by the Nar-Sian cult).
|
||||
|
||||
While the canon states that the language of Ratvar and his servants is incomprehensible to the unenlightened as it is a derivative of the most ancient known language, in reality it is
|
||||
actually very simple. To translate a plain English sentence to Ratvar's tongue, simply move all of the letters thirteen places ahead, starting from "a" if the end of the alphabet is reached.
|
||||
This cipher is known as "rot13" for "rotate 13 places" and there are many sites online that allow instant translation between English and rot13 - one of the benefits is that moving the translated
|
||||
sentence thirteen places ahead changes it right back to plain English.
|
||||
|
||||
There are, however, a few parts of the Ratvarian tongue that aren't typical and are implemented for fluff reasons. Some words may have apostrophes, hyphens, and spaces, making the plain
|
||||
English translation apparent but disjoined (for instance, "Oru`byq zl-cbjre!" translates directly to "Beh'old my-power!") although this can be ignored without impacting overall quality. When
|
||||
translating from Ratvar's tongue to plain English, simply remove the disjointments and use the finished sentence. This would make "Oru`byq zl-cbjre!" into "Behold my power!" after removing the
|
||||
abnormal spacing, hyphens, and grave accents.
|
||||
|
||||
List of nuances:
|
||||
|
||||
- Any time the word "of" occurs, it is linked to the previous word by a hyphen. If it is the first word, nothing is done. (i.e. "V nz-bs Ratvar." directly translates to "I am-of Ratvar.")
|
||||
- Although "Ratvar" translates to "Engine" in English, the word "Ratvar" is used regardless of language as it is a proper noun.
|
||||
- The same rule applies to Ratvar's four generals: Nezbere (Armorer), Sevtug (Fright), Nzcrentr (Amperage), and Inath-Neq (Vangu-Ard), although these words can be used in proper context if one is
|
||||
not referring to the four generals and simply using the words themselves.
|
||||
|
||||
*/
|
||||
@@ -1,319 +0,0 @@
|
||||
|
||||
/obj/item/clockwork/clockwork_proselytizer //Clockwork proselytizer (yes, that's a real word): Converts applicable objects to Ratvarian variants.
|
||||
name = "clockwork proselytizer"
|
||||
desc = "An odd, L-shaped device that hums with energy."
|
||||
clockwork_desc = "A device that allows the replacing of mundane objects with Ratvarian variants. It requires liquified Replicant Alloy to function."
|
||||
icon_state = "clockwork_proselytizer"
|
||||
w_class = 3
|
||||
force = 5
|
||||
flags = NOBLUDGEON
|
||||
var/stored_alloy = 0 //Requires this to function; each chunk of replicant alloy provides REPLICANT_ALLOY_UNIT
|
||||
var/max_alloy = REPLICANT_ALLOY_UNIT * 10
|
||||
var/uses_alloy = TRUE
|
||||
var/metal_to_alloy = FALSE
|
||||
var/repairing = null //what we're currently repairing, if anything
|
||||
|
||||
/obj/item/clockwork/clockwork_proselytizer/preloaded
|
||||
stored_alloy = REPLICANT_WALL_MINUS_FLOOR+REPLICANT_WALL_TOTAL
|
||||
|
||||
/obj/item/clockwork/clockwork_proselytizer/scarab
|
||||
name = "scarab proselytizer"
|
||||
clockwork_desc = "A cogscarab's internal proselytizer. It can only be successfully used by a cogscarab and requires liquified Replicant Alloy to function."
|
||||
metal_to_alloy = TRUE
|
||||
item_state = "nothing"
|
||||
w_class = 1
|
||||
var/debug = FALSE
|
||||
|
||||
/obj/item/clockwork/clockwork_proselytizer/scarab/proselytize(atom/target, mob/living/user)
|
||||
if(!debug && !isdrone(user))
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/item/clockwork/clockwork_proselytizer/scarab/debug
|
||||
clockwork_desc = "A cogscarab's internal proselytizer. It can convert nearly any object into a Ratvarian variant."
|
||||
uses_alloy = FALSE
|
||||
debug = TRUE
|
||||
|
||||
/obj/item/clockwork/clockwork_proselytizer/examine(mob/living/user)
|
||||
..()
|
||||
if(is_servant_of_ratvar(user) || isobserver(user))
|
||||
user << "<span class='brass'>Can be used to convert walls, floors, windows, airlocks, windoors, and grilles to clockwork variants.</span>"
|
||||
user << "<span class='brass'>Can also form some objects into Replicant Alloy, as well as reform Clockwork Walls into Clockwork Floors, and vice versa.</span>"
|
||||
if(metal_to_alloy)
|
||||
user << "<span class='alloy'>It can convert rods, metal, and plasteel to liquified replicant alloy at a low rate.</span>"
|
||||
if(uses_alloy)
|
||||
user << "<span class='alloy'>It has [stored_alloy]/[max_alloy] units of liquified alloy stored.</span>"
|
||||
user << "<span class='alloy'>Use it on a Tinkerer's Cache, strike it with Replicant Alloy, or attack Replicant Alloy with it to add additional liquified alloy.</span>"
|
||||
user << "<span class='alloy'>Use it in-hand to remove stored liquified alloy.</span>"
|
||||
|
||||
/obj/item/clockwork/clockwork_proselytizer/attack_self(mob/living/user)
|
||||
if(is_servant_of_ratvar(user) && uses_alloy)
|
||||
if(!can_use_alloy(REPLICANT_ALLOY_UNIT))
|
||||
user << "<span class='warning'>[src] [stored_alloy ? "Lacks enough":"Contains no"] alloy to reform[stored_alloy ? "":" any"] into solidified alloy!</span>"
|
||||
return
|
||||
modify_stored_alloy(-REPLICANT_ALLOY_UNIT)
|
||||
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
new/obj/item/clockwork/component/replicant_alloy(user.loc)
|
||||
user << "<span class='brass'>You force [stored_alloy ? "some":"all"] of the alloy in [src]'s compartments to reform and solidify. \
|
||||
It now contains [stored_alloy]/[max_alloy] units of liquified alloy.</span>"
|
||||
|
||||
/obj/item/clockwork/clockwork_proselytizer/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/clockwork/component/replicant_alloy) && is_servant_of_ratvar(user) && uses_alloy)
|
||||
if(!can_use_alloy(-REPLICANT_ALLOY_UNIT))
|
||||
user << "<span class='warning'>[src]'s replicant alloy compartments are full!</span>"
|
||||
return 0
|
||||
modify_stored_alloy(REPLICANT_ALLOY_UNIT)
|
||||
playsound(user, 'sound/machines/click.ogg', 50, 1)
|
||||
user << "<span class='brass'>You force [I] to liquify and pour it into [src]'s compartments. It now contains [stored_alloy]/[max_alloy] units of liquified alloy.</span>"
|
||||
user.drop_item()
|
||||
qdel(I)
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/clockwork/clockwork_proselytizer/afterattack(atom/target, mob/living/user, proximity_flag, params)
|
||||
if(!target || !user || !proximity_flag)
|
||||
return 0
|
||||
if(!is_servant_of_ratvar(user))
|
||||
return ..()
|
||||
proselytize(target, user)
|
||||
|
||||
/obj/item/clockwork/clockwork_proselytizer/proc/modify_stored_alloy(amount)
|
||||
if(can_use_alloy(0)) //Ratvar makes it free
|
||||
amount = 0
|
||||
stored_alloy = Clamp(stored_alloy + amount, 0, max_alloy)
|
||||
return 1
|
||||
|
||||
/obj/item/clockwork/clockwork_proselytizer/proc/can_use_alloy(amount)
|
||||
if(ratvar_awakens || !uses_alloy)
|
||||
return TRUE
|
||||
if(!amount) //functions thus as a check for if ratvar is up/it doesn't use alloy if no amount is provided
|
||||
return FALSE
|
||||
if(stored_alloy - amount < 0)
|
||||
return FALSE
|
||||
if(stored_alloy - amount > max_alloy)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/clockwork/clockwork_proselytizer/proc/proselytize(atom/target, mob/living/user)
|
||||
if(!target || !user)
|
||||
return 0
|
||||
var/target_type = target.type
|
||||
var/list/proselytize_values = target.proselytize_vals(user, src) //relevant values for proselytizing stuff, given as an associated list
|
||||
if(proselytize_values == TRUE) //if we get true, fail, but don't send a message for whatever reason
|
||||
return 0
|
||||
if(!islist(proselytize_values))
|
||||
user << "<span class='warning'>[target] cannot be proselytized!</span>"
|
||||
return 0
|
||||
if(repairing)
|
||||
user << "<span class='warning'>You are currently repairing [repairing] with [src]!</span>"
|
||||
return 0
|
||||
if(!uses_alloy)
|
||||
proselytize_values["alloy_cost"] = 0
|
||||
|
||||
if(!can_use_alloy(proselytize_values["alloy_cost"]))
|
||||
if(stored_alloy - proselytize_values["alloy_cost"] < 0)
|
||||
user << "<span class='warning'>You need [proselytize_values["alloy_cost"]] liquified alloy to proselytize [target]!</span>"
|
||||
else if(stored_alloy - proselytize_values["alloy_cost"] > max_alloy)
|
||||
user << "<span class='warning'>You have too much liquified alloy stored to proselytize [target]!</span>"
|
||||
return 0
|
||||
|
||||
if(can_use_alloy(0)) //Ratvar makes it faster
|
||||
proselytize_values["operation_time"] *= 0.5
|
||||
|
||||
user.visible_message("<span class='warning'>[user]'s [name] begins tearing apart [target]!</span>", "<span class='brass'>You begin proselytizing [target]...</span>")
|
||||
playsound(target, 'sound/machines/click.ogg', 50, 1)
|
||||
if(proselytize_values["operation_time"] && !do_after(user, proselytize_values["operation_time"], target = target))
|
||||
return 0
|
||||
if(!can_use_alloy(proselytize_values["alloy_cost"])) //Check again to prevent bypassing via spamclick
|
||||
return 0
|
||||
if(!target || target.type != target_type)
|
||||
return 0
|
||||
if(repairing)
|
||||
return 0
|
||||
user.visible_message("<span class='warning'>[user]'s [name] disgorges a chunk of metal and shapes it over what's left of [target]!</span>", \
|
||||
"<span class='brass'>You proselytize [target].</span>")
|
||||
playsound(target, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
var/new_thing_type = proselytize_values["new_obj_type"]
|
||||
if(isturf(target))
|
||||
var/turf/T = target
|
||||
T.ChangeTurf(new_thing_type)
|
||||
else
|
||||
if(proselytize_values["dir_in_new"])
|
||||
new new_thing_type(get_turf(target), proselytize_values["spawn_dir"])
|
||||
else
|
||||
var/atom/A = new new_thing_type(get_turf(target))
|
||||
A.setDir(proselytize_values["spawn_dir"])
|
||||
qdel(target)
|
||||
modify_stored_alloy(-proselytize_values["alloy_cost"])
|
||||
return 1
|
||||
|
||||
//if a valid target, returns an associated list in this format;
|
||||
//list("operation_time" = 15, "new_obj_type" = /obj/structure/window/reinforced/clockwork, "alloy_cost" = 5, "spawn_dir" = dir, "dir_in_new" = TRUE)
|
||||
//otherwise, return literally any non-list thing but preferably FALSE
|
||||
//returning TRUE won't produce the "cannot be proselytized" message and will still prevent proselytizing
|
||||
|
||||
/atom/proc/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
|
||||
return FALSE
|
||||
|
||||
/turf/closed/wall/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
|
||||
return list("operation_time" = 50, "new_obj_type" = /turf/closed/wall/clockwork, "alloy_cost" = REPLICANT_WALL_TOTAL, "spawn_dir" = SOUTH)
|
||||
|
||||
/turf/closed/wall/r_wall/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
|
||||
return FALSE
|
||||
|
||||
/turf/closed/wall/clockwork/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
|
||||
return list("operation_time" = 50, "new_obj_type" = /turf/open/floor/clockwork, "alloy_cost" = -REPLICANT_WALL_MINUS_FLOOR, "spawn_dir" = SOUTH)
|
||||
|
||||
/turf/open/floor/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
|
||||
return list("operation_time" = 30, "new_obj_type" = /turf/open/floor/clockwork, "alloy_cost" = REPLICANT_FLOOR, "spawn_dir" = SOUTH)
|
||||
|
||||
/turf/open/floor/clockwork/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
|
||||
for(var/obj/O in src)
|
||||
if(O.density && !O.CanPass(user, src, 5))
|
||||
user << "<span class='warning'>Something is in the way, preventing you from proselytizing [src] into a clockwork wall.</span>"
|
||||
return FALSE
|
||||
return list("operation_time" = 100, "new_obj_type" = /turf/closed/wall/clockwork, "alloy_cost" = REPLICANT_WALL_MINUS_FLOOR, "spawn_dir" = SOUTH)
|
||||
|
||||
/obj/item/stack/rods/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
|
||||
if(!proselytizer.metal_to_alloy)
|
||||
return 0
|
||||
var/prosel_costtime = -amount
|
||||
return list("operation_time" = -prosel_costtime, "new_obj_type" = /obj/effect/overlay/temp/ratvar/beam/itemconsume, "alloy_cost" = prosel_costtime, "spawn_dir" = SOUTH)
|
||||
|
||||
/obj/item/stack/sheet/metal/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
|
||||
if(!proselytizer.metal_to_alloy)
|
||||
return 0
|
||||
var/prosel_costtime = -amount*2
|
||||
return list("operation_time" = -prosel_costtime, "new_obj_type" = /obj/effect/overlay/temp/ratvar/beam/itemconsume, "alloy_cost" = prosel_costtime, "spawn_dir" = SOUTH)
|
||||
|
||||
/obj/item/stack/sheet/plasteel/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
|
||||
if(!proselytizer.metal_to_alloy)
|
||||
return 0
|
||||
var/prosel_costtime = -amount*3
|
||||
return list("operation_time" = -prosel_costtime, "new_obj_type" = /obj/effect/overlay/temp/ratvar/beam/itemconsume, "alloy_cost" = prosel_costtime, "spawn_dir" = SOUTH)
|
||||
|
||||
/obj/machinery/door/airlock/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
|
||||
var/doortype = /obj/machinery/door/airlock/clockwork
|
||||
if(glass)
|
||||
doortype = /obj/machinery/door/airlock/clockwork/brass
|
||||
return list("operation_time" = 40, "new_obj_type" = doortype, "alloy_cost" = REPLICANT_WALL_TOTAL, "spawn_dir" = dir)
|
||||
|
||||
/obj/machinery/door/airlock/clockwork/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
|
||||
return FALSE
|
||||
|
||||
/obj/structure/window/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
|
||||
var/windowtype = /obj/structure/window/reinforced/clockwork
|
||||
var/new_dir = TRUE
|
||||
var/prosel_time = 15
|
||||
var/prosel_cost = REPLICANT_FLOOR
|
||||
if(fulltile)
|
||||
windowtype = /obj/structure/window/reinforced/clockwork/fulltile
|
||||
new_dir = FALSE
|
||||
prosel_time = 30
|
||||
prosel_cost = REPLICANT_STANDARD
|
||||
return list("operation_time" = prosel_time, "new_obj_type" = windowtype, "alloy_cost" = prosel_cost, "spawn_dir" = dir, "dir_in_new" = new_dir)
|
||||
|
||||
/obj/structure/window/reinforced/clockwork/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/door/window/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
|
||||
return list("operation_time" = 30, "new_obj_type" = /obj/machinery/door/window/clockwork, "alloy_cost" = REPLICANT_STANDARD, "spawn_dir" = dir, "dir_in_new" = TRUE)
|
||||
|
||||
/obj/machinery/door/window/clockwork/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
|
||||
return FALSE
|
||||
|
||||
/obj/structure/grille/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
|
||||
var/grilletype = /obj/structure/grille/ratvar
|
||||
var/prosel_time = 15
|
||||
if(destroyed)
|
||||
grilletype = /obj/structure/grille/ratvar/broken
|
||||
prosel_time = 5
|
||||
return list("operation_time" = prosel_time, "new_obj_type" = grilletype, "alloy_cost" = 0, "spawn_dir" = dir)
|
||||
|
||||
/obj/structure/grille/ratvar/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
|
||||
return FALSE
|
||||
|
||||
/obj/structure/clockwork/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
|
||||
. = TRUE
|
||||
if(proselytizer.repairing) //no spamclicking for fast repairs, bucko
|
||||
user << "<span class='warning'>You are already repairing [proselytizer.repairing] with [proselytizer]!</span>"
|
||||
return
|
||||
if(!can_be_repaired)
|
||||
user << "<span class='warning'>[src] cannot be repaired with a proselytizer!</span>"
|
||||
return
|
||||
if(health == max_health)
|
||||
user << "<span class='warning'>[src] is at maximum integrity!</span>"
|
||||
return
|
||||
var/amount_to_heal = max_health - health
|
||||
var/healing_for_cycle = min(amount_to_heal, repair_amount)
|
||||
if(!proselytizer.can_use_alloy(0))
|
||||
healing_for_cycle = min(healing_for_cycle, proselytizer.stored_alloy)
|
||||
var/proselytizer_cost = healing_for_cycle*2
|
||||
if(!proselytizer.can_use_alloy(proselytizer_cost))
|
||||
user << "<span class='warning'>You need more liquified alloy to repair [src]!</span>"
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user]'s [proselytizer.name] starts covering [src] in black liquid metal...</span>", \
|
||||
"<span class='alloy'>You start repairing [src]...</span>")
|
||||
//hugeass while because we need to re-check after the do_after
|
||||
proselytizer.repairing = src
|
||||
while(proselytizer && user && src && health != max_health)
|
||||
amount_to_heal = max_health - health
|
||||
if(!amount_to_heal)
|
||||
break
|
||||
healing_for_cycle = min(amount_to_heal, repair_amount)
|
||||
if(!proselytizer.can_use_alloy(0))
|
||||
healing_for_cycle = min(healing_for_cycle, proselytizer.stored_alloy)
|
||||
proselytizer_cost = healing_for_cycle*2
|
||||
if(!proselytizer.can_use_alloy(proselytizer_cost) || !do_after(user, proselytizer_cost, target = src) || !proselytizer || !proselytizer.can_use_alloy(proselytizer_cost))
|
||||
break
|
||||
amount_to_heal = max_health - health
|
||||
if(!amount_to_heal)
|
||||
break
|
||||
healing_for_cycle = min(amount_to_heal, repair_amount)
|
||||
if(!proselytizer.can_use_alloy(0))
|
||||
healing_for_cycle = min(healing_for_cycle, proselytizer.stored_alloy)
|
||||
proselytizer_cost = healing_for_cycle*2
|
||||
if(!proselytizer.can_use_alloy(proselytizer_cost))
|
||||
break
|
||||
health += healing_for_cycle
|
||||
proselytizer.modify_stored_alloy(-proselytizer_cost)
|
||||
playsound(src, 'sound/machines/click.ogg', 50, 1)
|
||||
|
||||
if(proselytizer)
|
||||
proselytizer.repairing = null
|
||||
if(user)
|
||||
user.visible_message("<span class='notice'>[user]'s [proselytizer.name] stops covering [src] with black liquid metal.</span>", \
|
||||
"<span class='alloy'>You finish repairing [src]. It is now at <b>[health]/[max_health]</b> integrity.</span>")
|
||||
return
|
||||
|
||||
/obj/structure/clockwork/cache/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
|
||||
. = ..()
|
||||
if(proselytizer.can_use_alloy(0) || proselytizer.stored_alloy + REPLICANT_ALLOY_UNIT > proselytizer.max_alloy)
|
||||
user << "<span class='warning'>[proselytizer]'s containers of liquified alloy are full!</span>"
|
||||
return
|
||||
if(!clockwork_component_cache["replicant_alloy"])
|
||||
user << "<span class='warning'>There is no Replicant Alloy in the global component cache!</span>"
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] places the end of [proselytizer] in the hole in [src]...</span>", \
|
||||
"<span class='notice'>You start filling [proselytizer] with liquified alloy...</span>")
|
||||
//hugeass check because we need to re-check after the do_after
|
||||
while(proselytizer && proselytizer.uses_alloy && proselytizer.stored_alloy + REPLICANT_ALLOY_UNIT <= proselytizer.max_alloy && clockwork_component_cache["replicant_alloy"] \
|
||||
&& do_after(user, 10, target = src) \
|
||||
&& proselytizer && proselytizer.uses_alloy && proselytizer.stored_alloy + REPLICANT_ALLOY_UNIT <= proselytizer.max_alloy && clockwork_component_cache["replicant_alloy"])
|
||||
proselytizer.modify_stored_alloy(REPLICANT_ALLOY_UNIT)
|
||||
clockwork_component_cache["replicant_alloy"]--
|
||||
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(proselytizer && user)
|
||||
user.visible_message("<span class='notice'>[user] removes [proselytizer] from the hole in [src], apparently satisfied.</span>", \
|
||||
"<span class='brass'>You finish filling [proselytizer] with liquified alloy. It now contains [proselytizer.stored_alloy]/[proselytizer.max_alloy] units of liquified alloy.</span>")
|
||||
return
|
||||
|
||||
/obj/structure/clockwork/wall_gear/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
|
||||
return list("operation_time" = 10, "new_obj_type" = /obj/effect/overlay/temp/ratvar/beam/itemconsume, "alloy_cost" = -REPLICANT_WALL_MINUS_FLOOR, "spawn_dir" = SOUTH)
|
||||
|
||||
/obj/item/clockwork/alloy_shards/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
|
||||
return list("operation_time" = 5, "new_obj_type" = /obj/effect/overlay/temp/ratvar/beam/itemconsume, "alloy_cost" = -REPLICANT_STANDARD, "spawn_dir" = SOUTH)
|
||||
|
||||
/obj/item/clockwork/component/replicant_alloy/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
|
||||
return list("operation_time" = 0, "new_obj_type" = /obj/effect/overlay/temp/ratvar/beam/itemconsume, "alloy_cost" = -REPLICANT_ALLOY_UNIT, "spawn_dir" = SOUTH)
|
||||
@@ -1,476 +0,0 @@
|
||||
|
||||
var/global/list/global_handofgod_traptypes = list()
|
||||
var/global/list/global_handofgod_structuretypes = list()
|
||||
|
||||
#define CONDUIT_RANGE 15
|
||||
|
||||
|
||||
/datum/game_mode
|
||||
var/list/datum/mind/red_deities = list()
|
||||
var/list/datum/mind/red_deity_prophets = list()
|
||||
var/list/datum/mind/red_deity_followers = list()
|
||||
|
||||
var/list/datum/mind/blue_deities = list()
|
||||
var/list/datum/mind/blue_deity_prophets = list()
|
||||
var/list/datum/mind/blue_deity_followers = list()
|
||||
|
||||
var/list/datum/mind/unassigned_followers = list() //for roundstart team assigning
|
||||
var/list/datum/mind/assigned_to_red = list()
|
||||
var/list/datum/mind/assigned_to_blue = list()
|
||||
|
||||
|
||||
/datum/game_mode/hand_of_god
|
||||
name = "hand of god"
|
||||
config_tag = "handofgod"
|
||||
antag_flag = ROLE_HOG_CULTIST //Followers use ROLE_HOG_CULTIST, Gods are picked later on with ROLE_HOG_GOD
|
||||
|
||||
required_players = 10
|
||||
required_enemies = 3
|
||||
recommended_enemies = 3
|
||||
restricted_jobs = list("Chaplain","AI", "Cyborg", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel")
|
||||
|
||||
|
||||
/datum/game_mode/hand_of_god/announce()
|
||||
world << "<B>The current game mode is - Hand of God!</B>"
|
||||
world << "<B>Two cults are onboard the station, seeking to overthrow the other, and anyone who stands in their way.</B>"
|
||||
world << "<B>Followers</B> - Complete your deity's objectives. Convert crewmembers to your cause by using your deity's nexus. Remember - there is no you, there is only the cult."
|
||||
world << "<B>Prophets</B> - Command your cult by the will of your deity. You are a high-value target, so be careful!"
|
||||
world << "<B>Personnel</B> - Do not let any cult succeed in its mission. Mindshield implants and holy water will revert them to neutral, hopefully nonviolent crew."
|
||||
|
||||
|
||||
/////////////
|
||||
//Pre setup//
|
||||
/////////////
|
||||
|
||||
/datum/game_mode/hand_of_god/pre_setup()
|
||||
if(config.protect_roles_from_antagonist)
|
||||
restricted_jobs += protected_jobs
|
||||
|
||||
if(config.protect_assistant_from_antagonist)
|
||||
restricted_jobs += "Assistant"
|
||||
|
||||
for(var/F in 1 to recommended_enemies)
|
||||
if(!antag_candidates.len)
|
||||
break
|
||||
var/datum/mind/follower = pick_n_take(antag_candidates)
|
||||
unassigned_followers += follower
|
||||
follower.restricted_roles = restricted_jobs
|
||||
log_game("[follower.key] (ckey) has been selected as a follower, however teams have not been decided yet.")
|
||||
|
||||
while(unassigned_followers.len > (required_enemies / 2))
|
||||
var/datum/mind/chosen = pick_n_take(unassigned_followers)
|
||||
add_hog_follower(chosen,"red")
|
||||
|
||||
while(unassigned_followers.len)
|
||||
var/datum/mind/chosen = pick_n_take(unassigned_followers)
|
||||
add_hog_follower(chosen,"blue")
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
//////////////
|
||||
//Post Setup//
|
||||
//////////////
|
||||
|
||||
//Pick a follower to uplift into a god
|
||||
/datum/game_mode/hand_of_god/post_setup()
|
||||
|
||||
//Find viable red god
|
||||
var/list/red_god_possibilities = get_players_for_role(ROLE_HOG_GOD)
|
||||
red_god_possibilities &= red_deity_followers //followers only
|
||||
if(!red_god_possibilities.len) //No candidates? just pick any follower regardless of prefs
|
||||
red_god_possibilities = red_deity_followers
|
||||
|
||||
//Make red god
|
||||
var/datum/mind/red_god = pick_n_take(red_god_possibilities)
|
||||
if(red_god)
|
||||
red_god.current.become_god("red")
|
||||
remove_hog_follower(red_god,0)
|
||||
add_god(red_god,"red")
|
||||
|
||||
//Find viable blue god
|
||||
var/list/blue_god_possibilities = get_players_for_role(ROLE_HOG_GOD)
|
||||
blue_god_possibilities &= blue_deity_followers //followers only
|
||||
if(!blue_god_possibilities.len) //No candidates? just pick any follower regardless of prefs
|
||||
blue_god_possibilities = blue_deity_followers
|
||||
|
||||
//Make blue god
|
||||
var/datum/mind/blue_god = pick_n_take(blue_god_possibilities)
|
||||
if(blue_god)
|
||||
blue_god.current.become_god("blue")
|
||||
remove_hog_follower(blue_god,0)
|
||||
add_god(blue_god,"blue")
|
||||
|
||||
|
||||
//Forge objectives
|
||||
//This is done here so that both gods exist
|
||||
if(red_god)
|
||||
ticker.mode.forge_deity_objectives(red_god)
|
||||
if(blue_god)
|
||||
ticker.mode.forge_deity_objectives(blue_god)
|
||||
|
||||
|
||||
..()
|
||||
|
||||
///////////////////
|
||||
//Objective Procs//
|
||||
///////////////////
|
||||
|
||||
/datum/game_mode/proc/forge_deity_objectives(datum/mind/deity)
|
||||
switch(rand(1,100))
|
||||
if(1 to 30)
|
||||
var/datum/objective/deicide/deicide = new
|
||||
deicide.owner = deity
|
||||
if(deicide.find_target())//Hard to kill the other god if there is none
|
||||
deity.objectives += deicide
|
||||
|
||||
if(!(locate(/datum/objective/escape_followers) in deity.objectives))
|
||||
var/datum/objective/escape_followers/recruit = new
|
||||
recruit.owner = deity
|
||||
deity.objectives += recruit
|
||||
recruit.gen_amount_goal(8, 12)
|
||||
|
||||
if(31 to 60)
|
||||
var/datum/objective/sacrifice_prophet/sacrifice = new
|
||||
sacrifice.owner = deity
|
||||
deity.objectives += sacrifice
|
||||
|
||||
if(!(locate(/datum/objective/escape_followers) in deity.objectives))
|
||||
var/datum/objective/escape_followers/recruit = new
|
||||
recruit.owner = deity
|
||||
deity.objectives += recruit
|
||||
recruit.gen_amount_goal(8, 12)
|
||||
|
||||
if(61 to 85)
|
||||
var/datum/objective/build/build = new
|
||||
build.owner = deity
|
||||
deity.objectives += build
|
||||
build.gen_amount_goal(8, 16)
|
||||
|
||||
var/datum/objective/sacrifice_prophet/sacrifice = new
|
||||
sacrifice.owner = deity
|
||||
deity.objectives += sacrifice
|
||||
|
||||
if(!(locate(/datum/objective/escape_followers) in deity.objectives))
|
||||
var/datum/objective/escape_followers/recruit = new
|
||||
recruit.owner = deity
|
||||
deity.objectives += recruit
|
||||
recruit.gen_amount_goal(8, 12)
|
||||
|
||||
else
|
||||
if (!locate(/datum/objective/follower_block) in deity.objectives)
|
||||
var/datum/objective/follower_block/block = new
|
||||
block.owner = deity
|
||||
deity.objectives += block
|
||||
|
||||
///////////////
|
||||
//Greet procs//
|
||||
///////////////
|
||||
|
||||
/datum/game_mode/proc/greet_hog_follower(datum/mind/follower_mind,colour)
|
||||
if(follower_mind in blue_deity_prophets || follower_mind in red_deity_prophets)
|
||||
follower_mind.current << "<span class='danger'><B>You have been appointed as the prophet of the [colour] deity! You are the only one who can communicate with your deity at will. Guide your followers, but be wary, for many will want you dead.</span>"
|
||||
else if(colour)
|
||||
follower_mind.current << "<span class='danger'><B>You are a follower of the [colour] cult's deity!</span>"
|
||||
else
|
||||
follower_mind.current << "<span class='danger'><B>You are a follower of a cult's deity!</span>"
|
||||
|
||||
|
||||
/////////////////
|
||||
//Convert procs//
|
||||
/////////////////
|
||||
|
||||
/datum/game_mode/proc/add_hog_follower(datum/mind/follower_mind, colour = "No Colour")
|
||||
var/mob/living/carbon/human/H = follower_mind.current
|
||||
if(isloyal(H))
|
||||
H << "<span class='danger'>Your mindshield implant blocked the influence of the [colour] deity. </span>"
|
||||
return 0
|
||||
if((follower_mind in red_deity_followers) || (follower_mind in red_deity_prophets) || (follower_mind in blue_deity_followers) || (follower_mind in blue_deity_prophets))
|
||||
H << "<span class='danger'>You already belong to a deity. Your strong faith has blocked out the conversion attempt by the followers of the [colour] deity.</span>"
|
||||
return 0
|
||||
var/obj/item/weapon/nullrod/N = H.null_rod_check()
|
||||
if(N)
|
||||
H << "<span class='danger'>Your holy weapon prevented the [colour] deity from brainwashing you.</span>"
|
||||
return 0
|
||||
|
||||
if(colour == "red")
|
||||
red_deity_followers += follower_mind
|
||||
if(colour == "blue")
|
||||
blue_deity_followers += follower_mind
|
||||
|
||||
H.faction |= "[colour] god"
|
||||
follower_mind.current << "<span class='danger'><FONT size = 3>You are now a follower of the [colour] deity! Follow your deity's prophet in order to complete your deity's objectives. Convert crewmembers to your cause by using your deity's nexus. And remember - there is no you, there is only the cult.</FONT></span>"
|
||||
update_hog_icons_added(follower_mind, colour)
|
||||
follower_mind.special_role = "Hand of God: [capitalize(colour)] Follower"
|
||||
follower_mind.current.attack_log += "\[[time_stamp()]\] <font color='red'>Has been converted to the [colour] follower cult!</font>"
|
||||
return 1
|
||||
|
||||
|
||||
/datum/game_mode/proc/add_god(datum/mind/god_mind, colour = "No Colour")
|
||||
remove_hog_follower(god_mind, announce = 0)
|
||||
if(colour == "red")
|
||||
red_deities += god_mind
|
||||
if(colour == "blue")
|
||||
blue_deities += god_mind
|
||||
god_mind.current.attack_log += "\[[time_stamp()]\] <font color='red'>Has been made into a [colour] deity!</font>"
|
||||
god_mind.special_role = "Hand of God: [colour] God"
|
||||
update_hog_icons_added(god_mind, colour)
|
||||
|
||||
//////////////////
|
||||
//Deconvert proc//
|
||||
//////////////////
|
||||
|
||||
/datum/game_mode/proc/remove_hog_follower(datum/mind/follower_mind, announce = 1)//deconverts both
|
||||
follower_mind.remove_hog_follower_prophet()
|
||||
update_hog_icons_removed(follower_mind,"red")
|
||||
update_hog_icons_removed(follower_mind,"blue")
|
||||
|
||||
if(follower_mind.current)
|
||||
var/mob/living/carbon/human/H = follower_mind.current
|
||||
H.faction -= "red god"
|
||||
H.faction -= "blue god"
|
||||
|
||||
if(announce)
|
||||
follower_mind.current.attack_log += "\[[time_stamp()]\] <font color='red'>Has been deconverted from a deity's cult!</font>"
|
||||
follower_mind.current << "<span class='danger'><b>Your mind has been cleared from the brainwashing the followers have done to you. Now you serve yourself and the crew.</b></span>"
|
||||
for(var/mob/living/M in view(follower_mind.current))
|
||||
M << "[follower_mind.current] looks like their faith is shattered. They're no longer a cultist!"
|
||||
|
||||
|
||||
|
||||
//////////////////////
|
||||
// Mob helper procs //
|
||||
//////////////////////
|
||||
|
||||
/proc/is_handofgod_god(A)
|
||||
if(istype(A, /mob/camera/god))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/proc/is_handofgod_bluecultist(A)
|
||||
if(ishuman(A))
|
||||
var/mob/living/carbon/human/H = A
|
||||
if(H.mind)
|
||||
if(H.mind in ticker.mode.blue_deity_followers|ticker.mode.blue_deity_prophets)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/proc/is_handofgod_redcultist(A)
|
||||
if(ishuman(A))
|
||||
var/mob/living/carbon/human/H = A
|
||||
if(H.mind)
|
||||
if(H.mind in ticker.mode.red_deity_followers|ticker.mode.red_deity_prophets)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/proc/is_handofgod_blueprophet(A)
|
||||
if(ishuman(A))
|
||||
var/mob/living/carbon/human/H = A
|
||||
if(H.mind)
|
||||
if(H.mind in ticker.mode.blue_deity_prophets)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/proc/is_handofgod_redprophet(A)
|
||||
if(ishuman(A))
|
||||
var/mob/living/carbon/human/H = A
|
||||
if(H.mind)
|
||||
if(H.mind in ticker.mode.red_deity_prophets)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
/proc/is_handofgod_cultist(A) //any of them what so ever, blue, red, hot pink, whatever.
|
||||
if(is_handofgod_redcultist(A))
|
||||
return 1
|
||||
if(is_handofgod_bluecultist(A))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/proc/is_handofgod_prophet(A) //any of them what so ever, blue, red, hot pink, whatever
|
||||
if(ishuman(A))
|
||||
var/mob/living/carbon/human/H = A
|
||||
if(H.mind)
|
||||
if(H.mind in ticker.mode.blue_deity_prophets|ticker.mode.red_deity_prophets)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/mob/camera/god/proc/is_handofgod_myprophet(A)
|
||||
if(!ishuman(A))
|
||||
return 0
|
||||
var/mob/living/carbon/human/H = A
|
||||
if(!H.mind)
|
||||
return 0
|
||||
if(side == "red")
|
||||
if(H.mind in ticker.mode.red_deity_prophets)
|
||||
return 1
|
||||
else if(side == "blue")
|
||||
if(H.mind in ticker.mode.blue_deity_prophets)
|
||||
return 1
|
||||
|
||||
|
||||
/mob/camera/god/proc/is_handofgod_myfollowers(mob/A)
|
||||
if(!ishuman(A))
|
||||
return 0
|
||||
var/mob/living/carbon/human/H = A
|
||||
if(!H.mind)
|
||||
return 0
|
||||
if(side == "red")
|
||||
if(H.mind in ticker.mode.red_deity_prophets|ticker.mode.red_deity_followers)
|
||||
return 1
|
||||
else if(side == "blue")
|
||||
if(H.mind in ticker.mode.blue_deity_prophets|ticker.mode.blue_deity_followers)
|
||||
return 1
|
||||
|
||||
//////////////////////
|
||||
//Roundend Reporting//
|
||||
//////////////////////
|
||||
|
||||
|
||||
/datum/game_mode/hand_of_god/declare_completion()
|
||||
if(red_deities.len)
|
||||
var/text = "<BR><font size=3 color='red'><B>The red cult:</b></font>"
|
||||
for(var/datum/mind/red_god in red_deities)
|
||||
var/godwin = 1
|
||||
|
||||
text += "<BR><B>[red_god.key]</B> was the red deity, <B>[red_god.name]</B> ("
|
||||
if(red_god.current)
|
||||
if(red_god.current.stat == DEAD)
|
||||
text += "died"
|
||||
else
|
||||
text += "survived"
|
||||
else
|
||||
text += "ceased existing"
|
||||
text += ")"
|
||||
if(red_deity_prophets.len)
|
||||
for(var/datum/mind/red_prophet in red_deity_prophets)
|
||||
text += "<BR>The red prophet was <B>[red_prophet.name]</B> (<B>[red_prophet.key]</B>)"
|
||||
else
|
||||
text += "<BR>the red prophet was killed for their beliefs."
|
||||
|
||||
text += "<BR><B>Red follower count: </B> [red_deity_followers.len]"
|
||||
text += "<BR><B>Red followers:</B> "
|
||||
for(var/datum/mind/player in red_deity_followers)
|
||||
text += "[player.name] ([player.key]), "
|
||||
|
||||
var/objectives = ""
|
||||
if(red_god.objectives.len)
|
||||
var/count = 1
|
||||
for(var/datum/objective/O in red_god.objectives)
|
||||
if(O.check_completion())
|
||||
objectives += "<BR><B>Objective #[count]</B>: [O.explanation_text] <font color='green'><B>Success!</B></font>"
|
||||
feedback_add_details("god_objective","[O.type]|SUCCESS")
|
||||
else
|
||||
objectives += "<BR><B>Objective #[count]</B>: [O.explanation_text] <font color='red'><B>Fail.</B></font>"
|
||||
feedback_add_details("god_objective","[O.type]|FAIL")
|
||||
godwin = 0
|
||||
count++
|
||||
|
||||
text += objectives
|
||||
|
||||
if(godwin)
|
||||
text += "<BR><font color='green'><B>The red cult and deity were successful!</B></font>"
|
||||
feedback_add_details("god_success","SUCCESS")
|
||||
else
|
||||
text += "<br><font color='red'><B>The red cult and deity have failed!</B></font>"
|
||||
feedback_add_details("god_success","FAIL")
|
||||
|
||||
text += "<BR>"
|
||||
|
||||
world << text
|
||||
|
||||
if(blue_deities.len)
|
||||
var/text = "<BR><font size=3 color='red'><B>The blue cult:</b></font>"
|
||||
for(var/datum/mind/blue_god in blue_deities)
|
||||
var/godwin = 1
|
||||
|
||||
text += "<BR><B>[blue_god.key]</B> was the blue deity, <B>[blue_god.name]</B> ("
|
||||
if(blue_god.current)
|
||||
if(blue_god.current.stat == DEAD)
|
||||
text += "died"
|
||||
else
|
||||
text += "survived"
|
||||
else
|
||||
text += "ceased existing"
|
||||
text += ")"
|
||||
if(blue_deity_prophets.len)
|
||||
for(var/datum/mind/blue_prophet in blue_deity_prophets)
|
||||
text += "<BR>The blue prophet was <B>[blue_prophet.name]</B> (<B>[blue_prophet.key]</B>)"
|
||||
else
|
||||
text += "<BR>the blue prophet was killed for their beliefs."
|
||||
|
||||
text += "<BR><B>Blue follower count: </B> [blue_deity_followers.len]"
|
||||
text += "<BR><B>Blue followers:</B> "
|
||||
for(var/datum/mind/player in blue_deity_followers)
|
||||
text += "[player.name] ([player.key])"
|
||||
|
||||
var/objectives = ""
|
||||
if(blue_god.objectives.len)
|
||||
var/count = 1
|
||||
for(var/datum/objective/O in blue_god.objectives)
|
||||
if(O.check_completion())
|
||||
objectives += "<BR><B>Objective #[count]</B>: [O.explanation_text] <font color='green'><B>Success!</B></font>"
|
||||
feedback_add_details("god_objective","[O.type]|SUCCESS")
|
||||
else
|
||||
objectives += "<BR><B>Objective #[count]</B>: [O.explanation_text] <font color='red'><B>Fail.</B></font>"
|
||||
feedback_add_details("god_objective","[O.type]|FAIL")
|
||||
godwin = 0
|
||||
count++
|
||||
|
||||
text += objectives
|
||||
|
||||
if(godwin)
|
||||
text += "<BR><font color='green'><B>The blue cult and deity were successful!</B></font>"
|
||||
feedback_add_details("god_success","SUCCESS")
|
||||
else
|
||||
text += "<BR><font color='red'><B>The blue cult and deity have failed!</B></font>"
|
||||
feedback_add_details("god_success","FAIL")
|
||||
|
||||
text += "<BR>"
|
||||
|
||||
world << text
|
||||
|
||||
..()
|
||||
return 1
|
||||
|
||||
|
||||
/datum/game_mode/proc/update_hog_icons_added(datum/mind/hog_mind,side)
|
||||
var/hud_key
|
||||
var/rank = 0
|
||||
if(side == "red")
|
||||
hud_key = ANTAG_HUD_HOG_RED
|
||||
if(is_handofgod_redprophet(hog_mind.current))
|
||||
rank = 1
|
||||
|
||||
else if(side == "blue")
|
||||
hud_key = ANTAG_HUD_HOG_BLUE
|
||||
if(is_handofgod_blueprophet(hog_mind.current))
|
||||
rank = 1
|
||||
|
||||
if(is_handofgod_god(hog_mind.current))
|
||||
rank = 2
|
||||
|
||||
if(hud_key)
|
||||
var/datum/atom_hud/antag/hog_hud = huds[hud_key]
|
||||
hog_hud.join_hud(hog_mind.current)
|
||||
set_antag_hud(hog_mind.current, "hog-[side]-[rank]")
|
||||
|
||||
|
||||
/datum/game_mode/proc/update_hog_icons_removed(datum/mind/hog_mind,side)
|
||||
var/hud_key
|
||||
if(side == "red")
|
||||
hud_key = ANTAG_HUD_HOG_RED
|
||||
else if(side == "blue")
|
||||
hud_key = ANTAG_HUD_HOG_BLUE
|
||||
|
||||
if(hud_key)
|
||||
var/datum/atom_hud/antag/hog_hud = huds[hud_key]
|
||||
hog_hud.leave_hud(hog_mind.current)
|
||||
set_antag_hud(hog_mind.current,null)
|
||||
@@ -1,28 +0,0 @@
|
||||
/* Prophet's innate godspeak */
|
||||
/datum/action/innate/godspeak
|
||||
name = "Godspeak"
|
||||
button_icon_state = "godspeak"
|
||||
check_flags = AB_CHECK_CONSCIOUS
|
||||
var/mob/camera/god/god = null
|
||||
|
||||
/datum/action/innate/godspeak/IsAvailable()
|
||||
if(..())
|
||||
if(god)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/action/innate/godspeak/Activate()
|
||||
var/msg = input(owner,"Speak to your god","Godspeak","") as null|text
|
||||
if(!msg)
|
||||
return
|
||||
var/rendered = "<font color='[god.side]'><span class='game say'><i>Prophet [owner]:</i> <span class='message'>[msg]</span></span>"
|
||||
god << rendered
|
||||
owner << rendered
|
||||
for(var/mob/M in mob_list)
|
||||
if(isobserver(M))
|
||||
var/link = FOLLOW_LINK(M, owner)
|
||||
M << "[link] [rendered]"
|
||||
|
||||
/datum/action/innate/godspeak/Destroy()
|
||||
god = null
|
||||
return ..()
|
||||
@@ -1,290 +0,0 @@
|
||||
|
||||
/mob/camera/god
|
||||
name = "deity" //Auto changes to the player's deity name/random name
|
||||
real_name = "deity"
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "marker"
|
||||
invisibility = 60
|
||||
see_in_dark = 0
|
||||
see_invisible = 55
|
||||
sight = SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
|
||||
languages_spoken = ALL
|
||||
languages_understood = ALL
|
||||
hud_possible = list(ANTAG_HUD)
|
||||
mouse_opacity = 0 //can't be clicked
|
||||
|
||||
var/faith = 100 //For initial prophet appointing/stupid purchase
|
||||
var/max_faith = 100
|
||||
var/side = "neutral" //Red or Blue for the gamemode
|
||||
var/obj/structure/divine/nexus/god_nexus = null //The source of the god's power in this realm, kill it and the god is kill
|
||||
var/nexus_required = FALSE //If the god dies from losing it's nexus, defaults to off so that gods don't instantly die at roundstart
|
||||
var/followers_required = 0 //Same as above
|
||||
var/alive_followers = 0
|
||||
var/list/structures = list()
|
||||
var/list/conduits = list()
|
||||
var/prophets_sacrificed_in_name = 0
|
||||
var/image/ghostimage = null //For observer with darkness off visiblity
|
||||
var/list/prophets = list()
|
||||
var/datum/action/innate/godspeak/speak2god
|
||||
|
||||
/mob/camera/god/New()
|
||||
..()
|
||||
update_icons()
|
||||
build_hog_construction_lists()
|
||||
|
||||
//Force nexuses after 15 minutes in hand of god mode
|
||||
if(ticker && ticker.mode && ticker.mode.name == "hand of god")
|
||||
addtimer(src, "forceplacenexus", 9000, FALSE)
|
||||
|
||||
|
||||
//Rebuilds the list based on the gamemode's lists
|
||||
//As they are the most accurate each tick
|
||||
/mob/camera/god/proc/get_my_followers()
|
||||
switch(side)
|
||||
if("red")
|
||||
. = ticker.mode.red_deity_followers|ticker.mode.red_deity_prophets
|
||||
if("blue")
|
||||
. = ticker.mode.blue_deity_followers|ticker.mode.blue_deity_prophets
|
||||
else
|
||||
. = list()
|
||||
|
||||
|
||||
/mob/camera/god/Destroy()
|
||||
var/list/followers = get_my_followers()
|
||||
for(var/datum/mind/F in followers)
|
||||
if(F.current)
|
||||
F.current << "<span class='danger'>Your god is DEAD!</span>"
|
||||
for(var/X in prophets)
|
||||
speak2god.Remove(X)
|
||||
ghost_darkness_images -= ghostimage
|
||||
updateallghostimages()
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
/mob/camera/god/proc/forceplacenexus()
|
||||
if(god_nexus)
|
||||
return
|
||||
|
||||
if(ability_cost(0,1,0))
|
||||
place_nexus()
|
||||
|
||||
else
|
||||
if(blobstart.len) //we're on invalid turf, try to pick from blobstart
|
||||
loc = pick(blobstart)
|
||||
place_nexus() //if blobstart fails, places on dense turf, but better than nothing
|
||||
src << "<span class='danger'>You failed to place your nexus, and it has been placed for you!</span>"
|
||||
|
||||
|
||||
/mob/camera/god/update_icons()
|
||||
icon_state = "[initial(icon_state)]-[side]"
|
||||
|
||||
if(ghostimage)
|
||||
ghost_darkness_images -= ghostimage
|
||||
|
||||
ghostimage = image(src.icon,src,src.icon_state)
|
||||
ghost_darkness_images |= ghostimage
|
||||
updateallghostimages()
|
||||
|
||||
|
||||
/mob/camera/god/Stat()
|
||||
..()
|
||||
if(statpanel("Status"))
|
||||
if(god_nexus)
|
||||
stat("Nexus health: ", god_nexus.health)
|
||||
stat("Followers: ", alive_followers)
|
||||
stat("Faith: ", "[faith]/[max_faith]")
|
||||
|
||||
|
||||
/mob/camera/god/Login()
|
||||
..()
|
||||
sync_mind()
|
||||
src << "<span class='notice'>You are a deity!</span>"
|
||||
src << "You are a deity and are worshipped by a cult! You are rather weak right now, but that will change as you gain more followers."
|
||||
src << "You will need to place an anchor to this world, a <b>Nexus</b>, in two minutes. If you don't, one will be placed immediately below you."
|
||||
src << "Your <b>Follower</b> count determines how many people believe in you and are a part of your cult."
|
||||
src << "Your <b>Nexus Integrity</b> tells you the condition of your nexus. If your nexus is destroyed, you will die. Place your Nexus on a safe, isolated place, that is still accessible to your followers."
|
||||
src << "Your <b>Faith</b> is used to interact with the world. This will regenerate on its own, and it goes faster when you have more followers and power pylons."
|
||||
src << "The first thing you should do after placing your nexus is to <b>appoint a prophet</b>. Only prophets can hear you talk, unless you use an expensive power."
|
||||
update_health_hud()
|
||||
|
||||
|
||||
/mob/camera/god/update_health_hud()
|
||||
if(god_nexus && hud_used && hud_used.healths)
|
||||
hud_used.healths.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'> <font color='lime'>[god_nexus.health] </font></div>"
|
||||
|
||||
|
||||
/mob/camera/god/proc/add_faith(faith_amt)
|
||||
if(faith_amt)
|
||||
faith = round(Clamp(faith+faith_amt, 0, max_faith))
|
||||
if(hud_used && hud_used.deity_power_display)
|
||||
hud_used.deity_power_display.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'> <font color='cyan'>[faith] </font></div>"
|
||||
|
||||
|
||||
|
||||
/mob/camera/god/proc/place_nexus()
|
||||
if(god_nexus || (z != 1))
|
||||
return 0
|
||||
|
||||
var/obj/structure/divine/nexus/N = new(get_turf(src))
|
||||
N.assign_deity(src)
|
||||
god_nexus = N
|
||||
nexus_required = TRUE
|
||||
verbs -= /mob/camera/god/verb/constructnexus
|
||||
//verbs += /mob/camera/god/verb/movenexus //Translocators have no sprite
|
||||
update_health_hud()
|
||||
|
||||
var/area/A = get_area(src)
|
||||
if(A)
|
||||
var/areaname = A.name
|
||||
var/list/followers = get_my_followers()
|
||||
for(var/datum/mind/F in followers)
|
||||
if(F.current)
|
||||
F.current << "<span class='boldnotice'>Your god's nexus is in \the [areaname]</span>"
|
||||
|
||||
|
||||
/mob/camera/god/verb/freeturret()
|
||||
set category = "Deity"
|
||||
set name = "Free Turret (0)"
|
||||
set desc = "Place a single turret, for 0 faith."
|
||||
|
||||
if(!ability_cost(0,1,1))
|
||||
return
|
||||
var/obj/structure/divine/defensepylon/DP = new(get_turf(src))
|
||||
DP.assign_deity(src)
|
||||
verbs -= /mob/camera/god/verb/freeturret
|
||||
|
||||
|
||||
|
||||
/mob/camera/god/proc/update_followers()
|
||||
alive_followers = 0
|
||||
var/list/all_followers = get_my_followers()
|
||||
for(var/datum/mind/F in all_followers)
|
||||
if(F.current && F.current.stat != DEAD)
|
||||
alive_followers++
|
||||
|
||||
if(hud_used && hud_used.deity_follower_display)
|
||||
hud_used.deity_follower_display.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'> <font color='red'>[alive_followers] </font></div>"
|
||||
|
||||
|
||||
/mob/camera/god/proc/check_death()
|
||||
if(!alive_followers)
|
||||
src << "<span class='userdanger'>You no longer have any followers. You shudder as you feel your existence cease...</span>"
|
||||
if(god_nexus && !qdeleted(god_nexus))
|
||||
god_nexus.visible_message("<span class='danger'>\The [src] suddenly disappears!</span>")
|
||||
qdel(god_nexus)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/mob/camera/god/say(msg)
|
||||
if(!msg)
|
||||
return
|
||||
if(client)
|
||||
if(client.prefs.muted & MUTE_IC)
|
||||
src << "You cannot send IC messages (muted)."
|
||||
return
|
||||
if(src.client.handle_spam_prevention(msg,MUTE_IC))
|
||||
return
|
||||
if(stat)
|
||||
return
|
||||
|
||||
god_speak(msg)
|
||||
|
||||
|
||||
/mob/camera/god/proc/god_speak(msg)
|
||||
log_say("Hand of God: [capitalize(side)] God/[key_name(src)] : [msg]")
|
||||
msg = trim(copytext(sanitize(msg), 1, MAX_MESSAGE_LEN))
|
||||
if(!msg)
|
||||
return
|
||||
|
||||
msg = say_quote(msg, get_spans())
|
||||
var/rendered = "<font color='[src.side]'><i><span class='game say'>Divine Telepathy,</i> <span class='name'>[name]</span> <span class='message'>[msg]</span></span></font>"
|
||||
src << rendered
|
||||
|
||||
for(var/mob/M in mob_list)
|
||||
if(is_handofgod_myfollowers(M))
|
||||
M << rendered
|
||||
if(isobserver(M))
|
||||
var/link = FOLLOW_LINK(M, src)
|
||||
M << "[link] [rendered]"
|
||||
|
||||
|
||||
/mob/camera/god/emote(act,m_type = 1 ,msg = null)
|
||||
return
|
||||
|
||||
|
||||
/mob/camera/god/Move(NewLoc, Dir = 0)
|
||||
loc = NewLoc
|
||||
|
||||
|
||||
|
||||
/mob/camera/god/Topic(href, href_list)
|
||||
if(href_list["create_structure"])
|
||||
if(!ability_cost(75,1,1))
|
||||
return
|
||||
|
||||
var/obj/structure/divine/construct_type = text2path(href_list["create_structure"]) //it's a path but we need to initial() some vars
|
||||
if(!construct_type)
|
||||
return
|
||||
|
||||
add_faith(-75)
|
||||
var/obj/structure/divine/construction_holder/CH = new(get_turf(src))
|
||||
CH.assign_deity(src)
|
||||
CH.setup_construction(construct_type)
|
||||
CH.visible_message("<span class='notice'>[src] has created a transparent, unfinished [initial(construct_type.name)]. It can be finished by adding materials.</span>")
|
||||
src << "<span class='boldnotice'>You may click a construction site to cancel it, but only faith is refunded.</span>"
|
||||
structure_construction_ui(src)
|
||||
return
|
||||
|
||||
if(href_list["place_trap"])
|
||||
if(!ability_cost(20,1,1))
|
||||
return
|
||||
|
||||
var/atom/trap_type = text2path(href_list["place_trap"])
|
||||
if(!trap_type)
|
||||
return
|
||||
|
||||
src << "You lay \a [initial(trap_type.name)]"
|
||||
add_faith(-20)
|
||||
new trap_type(get_turf(src))
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
|
||||
/mob/camera/god/proc/structure_construction_ui(mob/camera/god/user)
|
||||
var/dat = ""
|
||||
for(var/t in global_handofgod_structuretypes)
|
||||
if(global_handofgod_structuretypes[t])
|
||||
var/obj/structure/divine/apath = global_handofgod_structuretypes[t]
|
||||
dat += "<center><B>[capitalize(t)]</B></center><BR>"
|
||||
var/imgstate = initial(apath.autocolours) ? "[initial(apath.icon_state)]-[side]" : "[initial(apath.icon_state)]"
|
||||
var/icon/I = icon('icons/obj/hand_of_god_structures.dmi',imgstate)
|
||||
var/img_component = lowertext(t)
|
||||
//I hate byond, but atleast it autocaches these so it's only 1*number_of_structures worth of actual calls
|
||||
user << browse_rsc(I,"hog_structure-[img_component].png")
|
||||
dat += "<center><img src='hog_structure-[img_component].png' height=64 width=64></center>"
|
||||
dat += "Description: [initial(apath.desc)]<BR>"
|
||||
dat += "<center><a href='?src=\ref[src];create_structure=[apath]'>Construct [capitalize(t)]</a></center><BR><BR>"
|
||||
|
||||
var/datum/browser/popup = new(src, "structures","Construct Structure",350,500)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
|
||||
/mob/camera/god/proc/trap_construction_ui(mob/camera/god/user)
|
||||
var/dat = ""
|
||||
for(var/t in global_handofgod_traptypes)
|
||||
if(global_handofgod_traptypes[t])
|
||||
var/obj/structure/divine/trap/T = global_handofgod_traptypes[t]
|
||||
dat += "<center><B>[capitalize(t)]</B></center><BR>"
|
||||
var/icon/I = icon('icons/obj/hand_of_god_structures.dmi',"[initial(T.icon_state)]")
|
||||
var/img_component = lowertext(t)
|
||||
user << browse_rsc(I,"hog_trap-[img_component].png")
|
||||
dat += "<center><img src='hog_trap-[img_component].png' height=64 width=64></center>"
|
||||
dat += "Description: [initial(T.desc)]<BR>"
|
||||
dat += "<center><a href='?src=\ref[src];place_trap=[T]'>Place [capitalize(t)]</a></center><BR><BR>"
|
||||
|
||||
var/datum/browser/popup = new(src, "traps", "Place Trap",350,500)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
@@ -1,306 +0,0 @@
|
||||
/obj/item/weapon/banner
|
||||
name = "banner"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "banner"
|
||||
item_state = "banner"
|
||||
desc = "A banner with Nanotrasen's logo on it."
|
||||
var/moralecooldown = 0
|
||||
var/moralewait = 600
|
||||
|
||||
|
||||
/obj/item/weapon/banner/attack_self(mob/living/carbon/human/user)
|
||||
if(moralecooldown + moralewait > world.time)
|
||||
return
|
||||
var/side = ""
|
||||
if(is_handofgod_redcultist(user))
|
||||
side = "red"
|
||||
else if (is_handofgod_bluecultist(user))
|
||||
side = "blue"
|
||||
|
||||
if(!side)
|
||||
return
|
||||
user << "<span class='notice'>You increase the morale of your fellows!</span>"
|
||||
moralecooldown = world.time
|
||||
|
||||
for(var/mob/living/carbon/human/H in range(4,get_turf(src)))
|
||||
if((side == "red") && is_handofgod_redcultist(H) || (side == "blue") && is_handofgod_bluecultist(H))
|
||||
H << "<span class='notice'>Your morale is increased by [user]'s banner!</span>"
|
||||
H.adjustBruteLoss(-15)
|
||||
H.adjustFireLoss(-15)
|
||||
H.AdjustStunned(-2)
|
||||
H.AdjustWeakened(-2)
|
||||
H.AdjustParalysis(-2)
|
||||
|
||||
|
||||
/obj/item/weapon/banner/red
|
||||
name = "red banner"
|
||||
icon_state = "banner-red"
|
||||
item_state = "banner-red"
|
||||
desc = "A banner with the logo of the red deity."
|
||||
|
||||
/obj/item/weapon/banner/red/examine(mob/user)
|
||||
..()
|
||||
if(is_handofgod_redcultist(user))
|
||||
user << "A banner representing our might against the heretics. We may use it to increase the morale of our fellow members!"
|
||||
else if(is_handofgod_bluecultist(user))
|
||||
user << "A heretical banner that should be destroyed posthaste."
|
||||
|
||||
|
||||
/obj/item/weapon/banner/blue
|
||||
name = "blue banner"
|
||||
icon_state = "banner-blue"
|
||||
item_state = "banner-blue"
|
||||
desc = "A banner with the logo of the blue deity"
|
||||
|
||||
/obj/item/weapon/banner/blue/examine(mob/user)
|
||||
..()
|
||||
|
||||
if(is_handofgod_redcultist(user))
|
||||
user << "A heretical banner that should be destroyed posthaste."
|
||||
else if(is_handofgod_bluecultist(user))
|
||||
user << "A banner representing our might against the heretics. We may use it to increase the morale of our fellow members!"
|
||||
|
||||
|
||||
/obj/item/weapon/storage/backpack/bannerpack
|
||||
name = "nanotrasen banner backpack"
|
||||
desc = "It's a backpack with lots of extra room. A banner with Nanotrasen's logo is attached, that can't be removed."
|
||||
max_combined_w_class = 27 //6 more then normal, for the tradeoff of declaring yourself an antag at all times.
|
||||
icon_state = "bannerpack"
|
||||
|
||||
|
||||
/obj/item/weapon/storage/backpack/bannerpack/red
|
||||
name = "red banner backpack"
|
||||
desc = "It's a backpack with lots of extra room. A red banner is attached, that can't be removed."
|
||||
icon_state = "bannerpack-red"
|
||||
|
||||
|
||||
/obj/item/weapon/storage/backpack/bannerpack/blue
|
||||
name = "blue banner backpack"
|
||||
desc = "It's a backpack with lots of extra room. A blue banner is attached, that can't be removed."
|
||||
icon_state = "bannerpack-blue"
|
||||
|
||||
|
||||
|
||||
//this is all part of one item set
|
||||
/obj/item/clothing/suit/armor/plate/crusader
|
||||
name = "Crusader's Armour"
|
||||
icon_state = "crusader"
|
||||
w_class = 4 //bulky
|
||||
slowdown = 2.0 //gotta pretend we're balanced.
|
||||
body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
|
||||
armor = list(melee = 50, bullet = 50, laser = 50, energy = 40, bomb = 60, bio = 0, rad = 0)
|
||||
|
||||
/obj/item/clothing/suit/armor/plate/crusader/red
|
||||
icon_state = "crusader-red"
|
||||
|
||||
/obj/item/clothing/suit/armor/plate/crusader/blue
|
||||
icon_state = "crusader-blue"
|
||||
|
||||
/obj/item/clothing/suit/armor/plate/crusader/examine(mob/user)
|
||||
..()
|
||||
if(!is_handofgod_cultist(user))
|
||||
user << "Armour that's comprised of metal and cloth."
|
||||
else
|
||||
user << "Armour that was used to protect from backstabs, gunshots, explosives, and lasers. The original wearers of this type of armour were trying to avoid being murdered. Since they're not around anymore, you're not sure if they were successful or not."
|
||||
|
||||
|
||||
/obj/item/clothing/head/helmet/plate/crusader
|
||||
name = "Crusader's Hood"
|
||||
icon_state = "crusader"
|
||||
w_class = 3 //normal
|
||||
flags_inv = HIDEHAIR|HIDEEARS|HIDEFACE
|
||||
armor = list(melee = 50, bullet = 50, laser = 50, energy = 40, bomb = 60, bio = 0, rad = 0)
|
||||
|
||||
/obj/item/clothing/head/helmet/plate/crusader/blue
|
||||
icon_state = "crusader-blue"
|
||||
|
||||
/obj/item/clothing/head/helmet/plate/crusader/red
|
||||
icon_state = "crusader-red"
|
||||
|
||||
|
||||
/obj/item/clothing/head/helmet/plate/crusader/examine(mob/user)
|
||||
..()
|
||||
if(!is_handofgod_cultist(user))
|
||||
user << "A brownish hood."
|
||||
else
|
||||
user << "A hood that's very protective, despite being made of cloth. Due to the tendency of the wearer to be targeted for assassinations, being protected from being shot in the face was very important.."
|
||||
|
||||
|
||||
|
||||
//Prophet helmet
|
||||
/obj/item/clothing/head/helmet/plate/crusader/prophet
|
||||
name = "Prophet's Hat"
|
||||
alternate_worn_icon = 'icons/mob/large-worn-icons/64x64/head.dmi'
|
||||
flags = 0
|
||||
armor = list(melee = 60, bullet = 60, laser = 60, energy = 50, bomb = 70, bio = 50, rad = 50) //religion protects you from disease and radiation, honk.
|
||||
worn_x_dimension = 64
|
||||
worn_y_dimension = 64
|
||||
var/side = "neither"
|
||||
|
||||
/obj/item/clothing/head/helmet/plate/crusader/prophet/equipped(mob/living/carbon/user, slot)
|
||||
var/faithful = 0
|
||||
if(slot == slot_head)
|
||||
switch(side)
|
||||
if("blue")
|
||||
faithful = is_handofgod_bluecultist(user)
|
||||
if("red")
|
||||
faithful = is_handofgod_redcultist(user)
|
||||
else
|
||||
faithful = 1
|
||||
if(!faithful)
|
||||
user << "<span class='danger'>Your mind is assaulted by a vast power, furious at your desecration!</span>"
|
||||
user.emote("scream")
|
||||
user.adjustFireLoss(10)
|
||||
user.unEquip(src)
|
||||
user.head = null
|
||||
user.update_inv_head()
|
||||
src.screen_loc = null
|
||||
user.Weaken(1)
|
||||
|
||||
/obj/item/clothing/head/helmet/plate/crusader/prophet/red
|
||||
icon_state = "prophet-red"
|
||||
side = "red"
|
||||
|
||||
|
||||
/obj/item/clothing/head/helmet/plate/crusader/prophet/blue
|
||||
icon_state = "prophet-blue"
|
||||
side = "blue"
|
||||
|
||||
|
||||
/obj/item/clothing/head/helmet/plate/crusader/prophet/examine(mob/user)
|
||||
..()
|
||||
if(!is_handofgod_cultist(user))
|
||||
user << "A brownish, religious-looking hat."
|
||||
else
|
||||
user << "A hat bestowed upon a prophet of gods and demigods."
|
||||
user << "This hat belongs to the [side] god."
|
||||
|
||||
|
||||
|
||||
//Structure conversion staff
|
||||
/obj/item/weapon/godstaff
|
||||
name = "godstaff"
|
||||
icon_state = "godstaff-red"
|
||||
var/mob/camera/god/god = null
|
||||
var/staffcooldown = 0
|
||||
var/staffwait = 30
|
||||
|
||||
/obj/item/weapon/godstaff/examine(mob/user)
|
||||
..()
|
||||
if(!is_handofgod_cultist(user))
|
||||
user << "It's a stick..?"
|
||||
else
|
||||
user << "A powerful staff capable of changing the allegiance of god/demigod structures."
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/godstaff/attack_self(mob/living/carbon/user)
|
||||
if((god && !god.is_handofgod_myprophet(user)) || !god)
|
||||
user << "<span class='danger'>YOU ARE NOT THE CHOSEN ONE!</span>"
|
||||
return
|
||||
if(!(istype(user.head, /obj/item/clothing/head/helmet/plate/crusader/prophet)))
|
||||
user << "<span class='warning'>Your connection to your diety isn't strong enough! You must wear your big hat!</span>"
|
||||
return
|
||||
if(staffcooldown + staffwait > world.time)
|
||||
return
|
||||
user.visible_message("[user] chants deeply and waves their staff")
|
||||
if(do_after(user, 20,1,src))
|
||||
for(var/obj/structure/divine/R in orange(3,user))
|
||||
user.say("Grant us true sight my god!")
|
||||
if(istype(R, /obj/structure/divine/nexus)|| istype(R, /obj/structure/divine/trap))
|
||||
continue
|
||||
R.visible_message("<span class='danger'>[R] suddenly appears!</span>")
|
||||
R.invisibility = 0
|
||||
R.alpha = initial(R.alpha)
|
||||
R.density = initial(R.density)
|
||||
R.activate()
|
||||
staffcooldown = world.time
|
||||
|
||||
/obj/item/weapon/godstaff/red
|
||||
icon_state = "godstaff-red"
|
||||
|
||||
/obj/item/weapon/godstaff/blue
|
||||
icon_state = "godstaff-blue"
|
||||
|
||||
|
||||
|
||||
/obj/item/clothing/gloves/plate
|
||||
name = "Plate Gauntlets"
|
||||
icon_state = "crusader"
|
||||
siemens_coefficient = 0
|
||||
cold_protection = HANDS
|
||||
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
|
||||
heat_protection = HANDS
|
||||
max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT
|
||||
|
||||
|
||||
/obj/item/clothing/gloves/plate/red
|
||||
icon_state = "crusader-red"
|
||||
|
||||
/obj/item/clothing/gloves/plate/blue
|
||||
icon_state = "crusader-blue"
|
||||
|
||||
|
||||
/obj/item/clothing/gloves/plate/examine(mob/user)
|
||||
..()
|
||||
if(!is_handofgod_cultist(user))
|
||||
usr << "They're like gloves, but made of metal."
|
||||
else
|
||||
usr << "Protective gloves that are also blessed to protect from heat and shock."
|
||||
|
||||
|
||||
/obj/item/clothing/shoes/plate
|
||||
name = "Plate Boots"
|
||||
icon_state = "crusader"
|
||||
w_class = 3 //normal
|
||||
armor = list(melee = 50, bullet = 50, laser = 50, energy = 40, bomb = 60, bio = 0, rad = 0) //does this even do anything on boots?
|
||||
flags = NOSLIP
|
||||
cold_protection = FEET
|
||||
min_cold_protection_temperature = SHOES_MIN_TEMP_PROTECT
|
||||
heat_protection = FEET
|
||||
max_heat_protection_temperature = SHOES_MAX_TEMP_PROTECT
|
||||
|
||||
|
||||
/obj/item/clothing/shoes/plate/red
|
||||
icon_state = "crusader-red"
|
||||
|
||||
/obj/item/clothing/shoes/plate/blue
|
||||
icon_state = "crusader-blue"
|
||||
|
||||
|
||||
/obj/item/clothing/shoes/plate/examine(mob/user)
|
||||
..()
|
||||
if(!is_handofgod_cultist(user))
|
||||
usr << "Metal boots, they look heavy."
|
||||
else
|
||||
usr << "Heavy boots that are blessed for sure footing. You'll be safe from being taken down by the heresy that is the banana peel."
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/itemset/crusader
|
||||
name = "Crusader's Armour Set" //i can't into ck2 references
|
||||
desc = "This armour is said to be based on the armor of kings on another world thousands of years ago, who tended to assassinate, conspire, and plot against everyone who tried to do the same to them. Some things never change."
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/itemset/crusader/blue/New()
|
||||
..()
|
||||
contents = list()
|
||||
sleep(1)
|
||||
new /obj/item/clothing/suit/armor/plate/crusader/blue(src)
|
||||
new /obj/item/clothing/head/helmet/plate/crusader/blue(src)
|
||||
new /obj/item/clothing/gloves/plate/blue(src)
|
||||
new /obj/item/clothing/shoes/plate/blue(src)
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/itemset/crusader/red/New()
|
||||
..()
|
||||
contents = list()
|
||||
sleep(1)
|
||||
new /obj/item/clothing/suit/armor/plate/crusader/red(src)
|
||||
new /obj/item/clothing/head/helmet/plate/crusader/red(src)
|
||||
new /obj/item/clothing/gloves/plate/red(src)
|
||||
new /obj/item/clothing/shoes/plate/red(src)
|
||||
|
||||
|
||||
/obj/item/weapon/claymore/hog
|
||||
force = 30
|
||||
armour_penetration = 15
|
||||
@@ -1,129 +0,0 @@
|
||||
|
||||
/datum/objective/build
|
||||
dangerrating = 15
|
||||
martyr_compatible = 1
|
||||
|
||||
|
||||
/datum/objective/build/proc/gen_amount_goal(lower, upper)
|
||||
target_amount = rand(lower, upper)
|
||||
explanation_text = "Build [target_amount] shrines."
|
||||
return target_amount
|
||||
|
||||
|
||||
/datum/objective/build/check_completion()
|
||||
if(!owner || !owner.current)
|
||||
return 0
|
||||
|
||||
var/shrines = 0
|
||||
if(is_handofgod_god(owner.current))
|
||||
var/mob/camera/god/G = owner.current
|
||||
for(var/obj/structure/divine/shrine/S in G.structures)
|
||||
S++
|
||||
|
||||
return (shrines >= target_amount)
|
||||
|
||||
|
||||
|
||||
/datum/objective/deicide
|
||||
dangerrating = 20
|
||||
martyr_compatible = 1
|
||||
|
||||
/datum/objective/deicide/check_completion()
|
||||
if(target)
|
||||
if(target.current) //Gods are deleted when they lose
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
/datum/objective/deicide/find_target()
|
||||
if(!owner || !owner.current)
|
||||
return
|
||||
|
||||
if(is_handofgod_god(owner.current))
|
||||
var/mob/camera/god/G = owner.current
|
||||
if(G.side == "red")
|
||||
if(ticker.mode.blue_deities.len)
|
||||
target = ticker.mode.blue_deities[1]
|
||||
if(G.side == "blue")
|
||||
if(ticker.mode.red_deities.len)
|
||||
target = ticker.mode.red_deities[1]
|
||||
if(!target)
|
||||
return 0
|
||||
update_explanation_text()
|
||||
|
||||
/datum/objective/deicide/update_explanation_text()
|
||||
..()
|
||||
if(target && target.current)
|
||||
explanation_text = "Phase [target.name], the false god, out of this plane of existence.."
|
||||
else
|
||||
explanation_text = "Free Objective"
|
||||
|
||||
|
||||
|
||||
/datum/objective/follower_block
|
||||
explanation_text = "Do not allow any followers of the false god to escape on the station's shuttle alive."
|
||||
dangerrating = 25
|
||||
martyr_compatible = 1
|
||||
|
||||
/datum/objective/follower_block/check_completion()
|
||||
var/side = "ABORT"
|
||||
if(is_handofgod_redcultist(owner.current))
|
||||
side = "red"
|
||||
else if(is_handofgod_bluecultist(owner.current))
|
||||
side = "blue"
|
||||
if(side == "ABORT")
|
||||
return 0
|
||||
|
||||
var/area/A = SSshuttle.emergency.areaInstance
|
||||
|
||||
for(var/mob/living/player in player_list)
|
||||
if(player.mind && player.stat != DEAD && get_area(player) == A)
|
||||
if(side == "red")
|
||||
if(is_handofgod_bluecultist(player))
|
||||
return 0
|
||||
else if(side == "blue")
|
||||
if(is_handofgod_redcultist(player))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
/datum/objective/escape_followers
|
||||
dangerrating = 5
|
||||
|
||||
|
||||
/datum/objective/escape_followers/proc/gen_amount_goal(lower,upper)
|
||||
target_amount = rand(lower,upper)
|
||||
explanation_text = "Your will must surpass this station. Having [target_amount] followers escape on the shuttle or pods will allow that."
|
||||
return target_amount
|
||||
|
||||
|
||||
/datum/objective/escape_followers/check_completion()
|
||||
var/escaped = 0
|
||||
if(is_handofgod_god(owner.current))
|
||||
var/mob/camera/god/G = owner.current
|
||||
if(G.side == "red")
|
||||
for(var/datum/mind/follower_mind in ticker.mode.red_deity_followers)
|
||||
if(follower_mind.current && follower_mind.current.stat != DEAD)
|
||||
if(follower_mind.current.onCentcom())
|
||||
escaped++
|
||||
|
||||
if(G.side == "blue")
|
||||
for(var/datum/mind/follower_mind in ticker.mode.blue_deity_followers)
|
||||
if(follower_mind.current && follower_mind.current.stat != DEAD)
|
||||
if(follower_mind.current.onCentcom())
|
||||
escaped++
|
||||
|
||||
return (escaped >= target_amount)
|
||||
|
||||
|
||||
/datum/objective/sacrifice_prophet
|
||||
explanation_text = "A false prophet is preaching their god's faith on the station. Sacrificing them will show the mortals who the true god is."
|
||||
dangerrating = 10
|
||||
|
||||
|
||||
/datum/objective/sacrifice_prophet/check_completion()
|
||||
var/mob/camera/god/G = owner.current
|
||||
if(istype(G))
|
||||
return G.prophets_sacrificed_in_name
|
||||
return 0
|
||||
@@ -1,363 +0,0 @@
|
||||
/mob/camera/god/proc/ability_cost(cost = 0,structures = 0, requires_conduit = 0, can_place_near_enemy_nexus = 0)
|
||||
if(faith < cost)
|
||||
src << "<span class='danger'>You lack the faith!</span>"
|
||||
return 0
|
||||
|
||||
if(structures)
|
||||
if(!isturf(loc) || istype(loc, /turf/open/space))
|
||||
src << "<span class='danger'>Your structure would just float away, you need stable ground!</span>"
|
||||
return 0
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
if(T)
|
||||
if(T.density)
|
||||
src << "<span class='danger'>There is something blocking your structure!</span>"
|
||||
return 0
|
||||
|
||||
for(var/atom/movable/AM in T)
|
||||
if(AM == src)
|
||||
continue
|
||||
if(AM.density)
|
||||
src << "<span class='danger'>There is something blocking your structure!</span>"
|
||||
return 0
|
||||
|
||||
if(requires_conduit)
|
||||
//Organised this way as there can be multiple conduits, so it's more likely to be a conduit check.
|
||||
var/valid = 0
|
||||
|
||||
for(var/obj/structure/divine/conduit/C in conduits)
|
||||
if(get_dist(src, C) <= CONDUIT_RANGE)
|
||||
valid++
|
||||
break
|
||||
|
||||
if(!valid)
|
||||
if(get_dist(src, god_nexus) <= CONDUIT_RANGE)
|
||||
valid++
|
||||
|
||||
if(!valid)
|
||||
src << "<span class='danger'>You must be near your Nexus or a Conduit to do this!</span>"
|
||||
return 0
|
||||
|
||||
if(!can_place_near_enemy_nexus)
|
||||
var/datum/mind/enemy
|
||||
switch(side)
|
||||
if("red")
|
||||
if(ticker.mode.blue_deities.len)
|
||||
enemy = ticker.mode.blue_deities[1]
|
||||
if("blue")
|
||||
if(ticker.mode.red_deities.len)
|
||||
enemy = ticker.mode.red_deities[1]
|
||||
|
||||
if(enemy && is_handofgod_god(enemy.current))
|
||||
var/mob/camera/god/enemy_god = enemy.current
|
||||
if(enemy_god.god_nexus && (get_dist(src,enemy_god.god_nexus) <= CONDUIT_RANGE*2))
|
||||
src << "<span class='danger'>You are too close to the other god's stronghold!</span>"
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/mob/camera/god/verb/returntonexus()
|
||||
set category = "Deity"
|
||||
set name = "Goto Nexus"
|
||||
set desc = "Teleports you to your next instantly."
|
||||
|
||||
if(god_nexus)
|
||||
Move(get_turf(god_nexus))
|
||||
else
|
||||
src << "You don't even have a Nexus, construct one."
|
||||
|
||||
|
||||
/mob/camera/god/verb/jumptofollower()
|
||||
set category = "Deity"
|
||||
set name = "Jump to Follower"
|
||||
set desc = "Teleports you to one of your followers."
|
||||
var/list/following = list()
|
||||
if(side == "red")
|
||||
following = ticker.mode.red_deity_followers|ticker.mode.red_deity_prophets
|
||||
else if(side == "blue")
|
||||
following = ticker.mode.blue_deity_followers|ticker.mode.blue_deity_prophets
|
||||
else
|
||||
src << "You are unaligned, and thus do not have followers"
|
||||
return
|
||||
|
||||
var/datum/mind/choice = input("Choose a follower","Jump to Follower") as null|anything in following
|
||||
if(choice && choice.current)
|
||||
Move(get_turf(choice.current))
|
||||
|
||||
|
||||
/mob/camera/god/verb/newprophet()
|
||||
set category = "Deity"
|
||||
set name = "Appoint Prophet (100)"
|
||||
set desc = "Appoint one of your followers as your Prophet, who can hear your words"
|
||||
|
||||
var/list/following = list()
|
||||
|
||||
if(!ability_cost(100))
|
||||
return
|
||||
if(side == "red")
|
||||
var/datum/mind/old_proph = locate() in ticker.mode.red_deity_prophets
|
||||
if(old_proph && old_proph.current && old_proph.current.stat != DEAD)
|
||||
src << "You can only have one prophet alive at a time."
|
||||
return
|
||||
else
|
||||
following = ticker.mode.red_deity_followers
|
||||
else if(side == "blue")
|
||||
var/datum/mind/old_proph = locate() in ticker.mode.blue_deity_prophets
|
||||
if(old_proph && old_proph.current && old_proph.current.stat != DEAD)
|
||||
src << "You can only have one prophet alive at a time."
|
||||
return
|
||||
else
|
||||
following = ticker.mode.blue_deity_followers
|
||||
|
||||
else
|
||||
src << "You are unalligned, and thus do not have prophets"
|
||||
return
|
||||
|
||||
var/datum/mind/choice = input("Choose a follower to make into your prophet","Prophet Uplifting") as null|anything in following
|
||||
if(choice && choice.current && choice.current.stat != DEAD)
|
||||
src << "You choose [choice.current] as your prophet."
|
||||
choice.make_Handofgod_prophet(side)
|
||||
speak2god = new()
|
||||
speak2god.god = src
|
||||
speak2god.Grant(choice.current)
|
||||
|
||||
//Prophet gear
|
||||
var/mob/living/carbon/human/H = choice.current
|
||||
var/popehat = null
|
||||
var/popestick = null
|
||||
var/success = ""
|
||||
switch(side)
|
||||
if("red")
|
||||
popehat = /obj/item/clothing/head/helmet/plate/crusader/prophet/red
|
||||
popestick = /obj/item/weapon/godstaff/red
|
||||
if("blue")
|
||||
popehat = /obj/item/clothing/head/helmet/plate/crusader/prophet/blue
|
||||
popestick = /obj/item/weapon/godstaff/blue
|
||||
|
||||
if(popehat)
|
||||
var/obj/item/clothing/head/helmet/plate/crusader/prophet/P = new popehat()
|
||||
|
||||
if(H.equip_to_slot_if_possible(P,slot_in_backpack,0,1,1))
|
||||
success = "It is in your backpack."
|
||||
else
|
||||
H.unEquip(H.head)
|
||||
H.equip_to_slot_or_del(P,slot_head)
|
||||
success = "It is on your head."
|
||||
|
||||
if(success)
|
||||
H << "<span class='boldnotice'>A powerful hat has been bestowed upon you, you will need to wear it to utilize your staff fully.</span>"
|
||||
H << "<span class='boldnotice'>[success]</span>"
|
||||
|
||||
if(popestick)
|
||||
var/obj/item/weapon/godstaff/G = new popestick()
|
||||
G.god = src
|
||||
if(!H.equip_to_slot_if_possible(G,slot_in_backpack,0,1,1))
|
||||
if(!H.put_in_hands(G))
|
||||
G.loc = get_turf(H)
|
||||
success = "It is on the floor..."
|
||||
else
|
||||
success = "It is in your hands..."
|
||||
else
|
||||
success = "It is in your backpack..."
|
||||
|
||||
if(success)
|
||||
H << "<span class='boldnotice'>A powerful staff has been bestowed upon you, you can use this to convert the false god's structures!</span>"
|
||||
H << "<span class='boldnotice'>[success]</span>"
|
||||
//end prophet gear
|
||||
|
||||
add_faith(-100)
|
||||
|
||||
|
||||
/mob/camera/god/verb/talk(msg as text)
|
||||
set category = "Deity"
|
||||
set name = "Talk to Anyone (20)"
|
||||
set desc = "Allows you to send a message to anyone, regardless of their faith."
|
||||
if(!ability_cost(20))
|
||||
return
|
||||
var/mob/choice = input("Choose who you wish to talk to", "Talk to ANYONE") as null|anything in mob_list
|
||||
if(choice)
|
||||
var/original = msg
|
||||
msg = "<B>You hear a voice coming from everywhere and nowhere... <i>[msg]</i></B>"
|
||||
choice << msg
|
||||
src << "You say the following to [choice], [original]"
|
||||
add_faith(-20)
|
||||
|
||||
|
||||
/mob/camera/god/verb/smite()
|
||||
set category = "Deity"
|
||||
set name = "Smite (40)"
|
||||
set desc = "Hits anything under you with a moderate amount of damage."
|
||||
|
||||
if(!ability_cost(40,0,1))
|
||||
return
|
||||
if(!range(7,god_nexus))
|
||||
src << "You lack the strength to smite this far from your nexus."
|
||||
return
|
||||
|
||||
var/has_smitten = 0 //Hast thou been smitten, infidel?
|
||||
for(var/mob/living/L in get_turf(src))
|
||||
L.adjustFireLoss(20)
|
||||
L.adjustBruteLoss(20)
|
||||
L << "<span class='danger'><B>You feel the wrath of [name]!<B></span>"
|
||||
has_smitten = 1
|
||||
if(has_smitten)
|
||||
add_faith(-40)
|
||||
|
||||
|
||||
/mob/camera/god/verb/disaster()
|
||||
set category = "Deity"
|
||||
set name = "Invoke Disaster (300)" //difficult to reach without lots of followers
|
||||
set desc = "Tug at the fibres of reality itself and bend it to your whims!"
|
||||
|
||||
if(!ability_cost(300,0,1))
|
||||
return
|
||||
|
||||
var/event = pick(/datum/round_event/meteor_wave, /datum/round_event/communications_blackout, /datum/round_event/radiation_storm, /datum/round_event/carp_migration,
|
||||
/datum/round_event/spacevine, /datum/round_event/vent_clog, /datum/round_event/wormholes)
|
||||
if(event)
|
||||
new event()
|
||||
add_faith(-300)
|
||||
|
||||
|
||||
/mob/camera/god/verb/constructnexus()
|
||||
set category = "Deity"
|
||||
set name = "Construct Nexus"
|
||||
set desc = "Instantly creates your nexus, You can only do this once, make sure you're happy with it!"
|
||||
|
||||
if(!ability_cost(0,1,0))
|
||||
return
|
||||
|
||||
place_nexus()
|
||||
|
||||
|
||||
/* //Transolocators have no sprite
|
||||
/mob/camera/god/verb/movenexus()
|
||||
set category = "Deity"
|
||||
set name = "Relocate Nexus (50)"
|
||||
set desc = "Instantly relocates your nexus to an existing translocator belonging to your faith, this destroys the translocator in the process"
|
||||
|
||||
if(ability_cost(50,0,0) && god_nexus)
|
||||
var/list/translocators = list()
|
||||
var/list/used_keys = list()
|
||||
for(var/obj/structure/divine/translocator/T in structures)
|
||||
translocators["[T.name] ([get_area(T)])"] = T
|
||||
|
||||
if(!translocators.len)
|
||||
src << "<span class='warning'>You have no translocators!</span>"
|
||||
return
|
||||
|
||||
var/picked = input(src,"Choose a translocator","Relocate Nexus") as null|anything in translocators
|
||||
if(!picked || !translocators[picked])
|
||||
return
|
||||
|
||||
var/obj/structure/divine/translocator/T = translocators[T]
|
||||
var/turf/Tturf = get_turf(T)
|
||||
god_nexus.loc = T
|
||||
translocators[picked] = null
|
||||
add_faith(-50)
|
||||
qdel(T)
|
||||
*/
|
||||
|
||||
/mob/camera/god/verb/construct_structures()
|
||||
set category = "Deity"
|
||||
set name = "Construct Structure (75)"
|
||||
set desc = "Create the foundation of a divine object."
|
||||
|
||||
if(!ability_cost(75,1,1))
|
||||
return
|
||||
|
||||
structure_construction_ui(src)
|
||||
|
||||
|
||||
/mob/camera/god/verb/construct_traps()
|
||||
set category = "Deity"
|
||||
set name = "Construct Trap (20)"
|
||||
set desc = "Creates a ward or trap."
|
||||
|
||||
if(!ability_cost(20,1,1))
|
||||
return
|
||||
|
||||
trap_construction_ui(src)
|
||||
|
||||
|
||||
|
||||
/mob/camera/god/verb/construct_items()
|
||||
set category = "Deity"
|
||||
set name = "Construct Items (20)"
|
||||
set desc = "Construct some items for your followers"
|
||||
|
||||
if(!ability_cost(20,1,1))
|
||||
return
|
||||
|
||||
var/list/item_types = list("claymore sword" = /obj/item/weapon/claymore/hog)
|
||||
if(side == "red")
|
||||
item_types["red banner"] = /obj/item/weapon/banner/red
|
||||
item_types["red bannerbackpack"] = /obj/item/weapon/storage/backpack/bannerpack/red
|
||||
item_types["red armour"] = /obj/item/weapon/storage/box/itemset/crusader/red
|
||||
|
||||
else if(side == "blue")
|
||||
item_types["blue banner"] = /obj/item/weapon/banner/blue
|
||||
item_types["blue bannerbackpack"] = /obj/item/weapon/storage/backpack/bannerpack/blue
|
||||
item_types["blue armour"] = /obj/item/weapon/storage/box/itemset/crusader/blue
|
||||
|
||||
|
||||
var/item = input("Choose what you wish to create.", "Divine Items") as null|anything in item_types
|
||||
if(!item || !item_types[item] || !ability_cost(20,1,1))
|
||||
return
|
||||
|
||||
src << "You produce \a [item]"
|
||||
add_faith(-20)
|
||||
|
||||
var/itemtype = item_types[item]
|
||||
new itemtype (get_turf(src))
|
||||
|
||||
|
||||
|
||||
/mob/camera/god/verb/veil_structures()
|
||||
set category = "Deity"
|
||||
set name = "Veil Structures (20)"
|
||||
set desc = "Hide your structures from sight and touch, but prevent yourself from using them."
|
||||
|
||||
if(!ability_cost(20,1,1))
|
||||
return
|
||||
|
||||
src << "You focus your powers and start dragging your influence into the spiritual plane."
|
||||
for(var/mob/M in orange(3,src))//Yes I know this is terrible, but visible message doesnt work for this
|
||||
M << "<span class='warning'>The air begins to shimmer...</span>"
|
||||
if(do_after(src, 30, 0, src))
|
||||
for(var/obj/structure/divine/R in orange(3,src))
|
||||
if(istype(R, /obj/structure/divine/nexus)|| istype(R, /obj/structure/divine/trap)||(src.side != R.side))
|
||||
continue
|
||||
R.visible_message("<span class='danger'>[R] fades away.</span>")
|
||||
R.invisibility = 55
|
||||
R.alpha = 100 //To help ghosts distinguish hidden structures
|
||||
R.density = 0
|
||||
R.deactivate()
|
||||
src << "You hide your influence from view"
|
||||
add_faith(-20)
|
||||
|
||||
|
||||
/mob/camera/god/verb/reveal_structures()
|
||||
set category = "Deity"
|
||||
set name = "Reveal Structures (20)"
|
||||
set desc = "Make your structures visible again and allow them to be used."
|
||||
|
||||
if(!ability_cost(20,1,1))
|
||||
return
|
||||
|
||||
src << "You focus your powers and start dragging your influence into the material plane."
|
||||
for(var/mob/M in orange(3,src))//Yes I know this is terrible, but visible message doesnt work for this
|
||||
M << "<span class='warning'>The air begins to shimmer...</span>"
|
||||
if(do_after(src, 40, 0, src))
|
||||
for(var/obj/structure/divine/R in orange(3,src))
|
||||
if(istype(R, /obj/structure/divine/nexus)|| istype(R, /obj/structure/divine/trap)||(src.side != R.side))
|
||||
continue
|
||||
R.visible_message("<span class='danger'>[R] suddenly appears!</span>")
|
||||
R.invisibility = 0
|
||||
R.alpha = initial(R.alpha)
|
||||
R.density = initial(R.density)
|
||||
R.activate()
|
||||
src << "You bring your influence into view"
|
||||
add_faith(-20)
|
||||
|
||||
@@ -1,658 +0,0 @@
|
||||
|
||||
/proc/build_hog_construction_lists()
|
||||
if(global_handofgod_traptypes.len && global_handofgod_structuretypes.len)
|
||||
return
|
||||
|
||||
var/list/types = subtypesof(/obj/structure/divine) - /obj/structure/divine/trap
|
||||
for(var/T in types)
|
||||
var/obj/structure/divine/D = T
|
||||
if(initial(D.constructable))
|
||||
if(initial(D.trap))
|
||||
global_handofgod_traptypes[initial(D.name)] = T
|
||||
else
|
||||
global_handofgod_structuretypes[initial(D.name)] = T
|
||||
|
||||
/obj/structure/divine
|
||||
name = "divine construction site"
|
||||
icon = 'icons/obj/hand_of_god_structures.dmi'
|
||||
desc = "An unfinished divine building"
|
||||
anchored = 1
|
||||
density = 1
|
||||
var/constructable = TRUE
|
||||
var/trap = FALSE
|
||||
var/metal_cost = 0
|
||||
var/glass_cost = 0
|
||||
var/lesser_gem_cost = 0
|
||||
var/greater_gem_cost = 0
|
||||
var/mob/camera/god/deity
|
||||
var/side = "neutral" //"blue" or "red", also used for colouring structures when construction is started by a deity
|
||||
var/health = 100
|
||||
var/maxhealth = 100
|
||||
var/deactivated = 0 //Structures being hidden can't be used. Mainly to prevent invisible defense pylons.
|
||||
var/autocolours = TRUE //do we colour to our side?
|
||||
|
||||
/obj/structure/divine/New()
|
||||
..()
|
||||
|
||||
/obj/structure/divine/proc/deactivate()
|
||||
deactivated = 1
|
||||
|
||||
/obj/structure/divine/proc/activate()
|
||||
deactivated = 0
|
||||
|
||||
|
||||
/obj/structure/divine/proc/update_icons()
|
||||
if(autocolours)
|
||||
icon_state = "[initial(icon_state)]-[side]"
|
||||
|
||||
|
||||
/obj/structure/divine/Destroy()
|
||||
if(deity)
|
||||
deity.structures -= src
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
/obj/structure/divine/attackby(obj/item/I, mob/user)
|
||||
|
||||
//Structure conversion/capture
|
||||
if(istype(I, /obj/item/weapon/godstaff))
|
||||
if(!is_handofgod_cultist(user))
|
||||
user << "<span class='notice'>You're not quite sure what the hell you're even doing.</span>"
|
||||
return
|
||||
var/obj/item/weapon/godstaff/G = I
|
||||
if(G.god && deity != G.god)
|
||||
assign_deity(G.god, alert_old_deity = TRUE)
|
||||
visible_message("<span class='boldnotice'>\The [src] has been captured by [user]!</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/divine/attacked_by(obj/item/I, mob/living/user)
|
||||
..()
|
||||
take_damage(I.force, I.damtype, 1)
|
||||
|
||||
/obj/structure/divine/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(sound_effect)
|
||||
if(damage)
|
||||
playsound(loc, 'sound/weapons/smash.ogg', 50, 1)
|
||||
else
|
||||
playsound(loc, 'sound/weapons/tap.ogg', 50, 1)
|
||||
if(BURN)
|
||||
if(sound_effect)
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
else
|
||||
return
|
||||
health -= damage
|
||||
if(!health)
|
||||
visible_message("<span class='danger'>\The [src] was destroyed!</span>")
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/divine/bullet_act(obj/item/projectile/P)
|
||||
. = ..()
|
||||
take_damage(P.damage, P.damage_type, 0)
|
||||
|
||||
|
||||
/obj/structure/divine/attack_alien(mob/living/carbon/alien/humanoid/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
add_hiddenprint(user)
|
||||
visible_message("<span class='warning'>\The [user] slashes at [src]!</span>")
|
||||
playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
|
||||
take_damage(20, BRUTE, 0)
|
||||
|
||||
/obj/machinery/attack_animal(mob/living/simple_animal/M)
|
||||
M.changeNext_move(CLICK_CD_MELEE)
|
||||
M.do_attack_animation(src)
|
||||
if(M.melee_damage_upper > 0)
|
||||
M.visible_message("<span class='danger'>[M.name] smashes against \the [src.name].</span>",\
|
||||
"<span class='danger'>You smash against the [src.name].</span>")
|
||||
take_damage(rand(M.melee_damage_lower,M.melee_damage_upper), M.melee_damage_type, 1)
|
||||
|
||||
|
||||
/obj/structure/divine/proc/assign_deity(mob/camera/god/new_deity, alert_old_deity = TRUE)
|
||||
if(!new_deity)
|
||||
return 0
|
||||
if(deity)
|
||||
if(alert_old_deity)
|
||||
deity << "<span class='danger'><B>Your [name] was captured by [new_deity]'s cult!</B></span>"
|
||||
deity.structures -= src
|
||||
deity = new_deity
|
||||
deity.structures |= src
|
||||
side = deity.side
|
||||
update_icons()
|
||||
return 1
|
||||
|
||||
|
||||
/obj/structure/divine/construction_holder
|
||||
alpha = 125
|
||||
constructable = FALSE
|
||||
var/obj/structure/divine/construction_result = /obj/structure/divine //a path, but typed to /obj/structure/divine for initial()
|
||||
|
||||
|
||||
|
||||
/obj/structure/divine/construction_holder/assign_deity(mob/camera/god/new_deity, alert_old_deity = TRUE)
|
||||
if(..())
|
||||
color = side
|
||||
|
||||
|
||||
/obj/structure/divine/construction_holder/attack_god(mob/camera/god/user)
|
||||
if(user.side == side && construction_result)
|
||||
user.add_faith(75)
|
||||
visible_message("<span class='danger'>[user] has cancelled \the [initial(construction_result.name)]")
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/divine/construction_holder/proc/setup_construction(construct_type)
|
||||
if(ispath(construct_type))
|
||||
construction_result = construct_type
|
||||
name = "[initial(construction_result.name)] construction site "
|
||||
icon_state = initial(construction_result.icon_state)
|
||||
metal_cost = initial(construction_result.metal_cost)
|
||||
glass_cost = initial(construction_result.glass_cost)
|
||||
lesser_gem_cost = initial(construction_result.lesser_gem_cost)
|
||||
greater_gem_cost = initial(construction_result.greater_gem_cost)
|
||||
desc = "An unfinished [initial(construction_result.name)]."
|
||||
|
||||
|
||||
/obj/structure/divine/construction_holder/attackby(obj/item/I, mob/user)
|
||||
if(!I || !user)
|
||||
return 0
|
||||
|
||||
if(istype(I, /obj/item/stack/sheet/metal))
|
||||
var/obj/item/stack/sheet/metal/M = I
|
||||
if(metal_cost)
|
||||
var/spend = min(metal_cost, M.amount)
|
||||
user << "<span class='notice'>You add [spend] metal to \the [src]."
|
||||
metal_cost = max(0, metal_cost - spend)
|
||||
M.use(spend)
|
||||
check_completion()
|
||||
else
|
||||
user << "<span class='notice'>\The [src] does not require any more metal!"
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/sheet/glass/G = I
|
||||
if(glass_cost)
|
||||
var/spend = min(glass_cost, G.amount)
|
||||
user << "<span class='notice'>You add [spend] glass to \the [src]."
|
||||
glass_cost = max(0, glass_cost - spend)
|
||||
G.use(spend)
|
||||
check_completion()
|
||||
else
|
||||
user << "<span class='notice'>\The [src] does not require any more glass!"
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/stack/sheet/lessergem))
|
||||
var/obj/item/stack/sheet/lessergem/LG = I
|
||||
if(lesser_gem_cost)
|
||||
var/spend = min(lesser_gem_cost, LG.amount)
|
||||
user << "<span class='notice'>You add [spend] lesser gems to \the [src]."
|
||||
lesser_gem_cost = max(0, lesser_gem_cost - spend)
|
||||
LG.use(spend)
|
||||
check_completion()
|
||||
else
|
||||
user << "<span class='notice'>\The [src] does not require any more lesser gems!"
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/stack/sheet/greatergem))
|
||||
var/obj/item/stack/sheet/greatergem/GG = I //GG!
|
||||
if(greater_gem_cost)
|
||||
var/spend = min(greater_gem_cost, GG.amount)
|
||||
user << "<span class='notice'>You add [spend] greater gems to \the [src]."
|
||||
greater_gem_cost = max(0, greater_gem_cost - spend)
|
||||
GG.use(spend)
|
||||
check_completion()
|
||||
else
|
||||
user << "<span class='notice'>\The [src] does not require any more greater gems!"
|
||||
return
|
||||
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/divine/construction_holder/proc/check_completion()
|
||||
if(!metal_cost && !glass_cost && !lesser_gem_cost && !greater_gem_cost)
|
||||
visible_message("<span class='notice'>\The [initial(construction_result.name)] is complete!</span>")
|
||||
var/obj/structure/divine/D = new construction_result (get_turf(src))
|
||||
D.assign_deity(deity)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/divine/construction_holder/examine(mob/user)
|
||||
..()
|
||||
|
||||
if(metal_cost || glass_cost || lesser_gem_cost || greater_gem_cost)
|
||||
user << "To finish construction it requires the following materials:"
|
||||
if(metal_cost)
|
||||
user << "[metal_cost] metal <IMG CLASS=icon SRC=icons/obj/items.dmi ICONSTATE='sheet-metal'>"
|
||||
if(glass_cost)
|
||||
user << "[glass_cost] glass <IMG CLASS=icon SRC=icons/obj/items.dmi ICONSTATE='sheet-glass'>"
|
||||
if(lesser_gem_cost)
|
||||
user << "[lesser_gem_cost] lesser gems <IMG CLASS=icon SRC=icons/obj/items.dmi ICONSTATE='sheet-lessergem'>"
|
||||
if(greater_gem_cost)
|
||||
user << "[greater_gem_cost] greater gems <IMG CLASS=icon SRC=icons/obj/items.dmi ICONSTATE='sheet-greatergem'>"
|
||||
|
||||
|
||||
/obj/structure/divine/nexus
|
||||
name = "nexus"
|
||||
desc = "It anchors a deity to this world. It radiates an unusual aura. Cultists protect this at all costs. It looks well protected from explosive shock."
|
||||
icon_state = "nexus"
|
||||
health = 500
|
||||
maxhealth = 500
|
||||
constructable = FALSE
|
||||
var/faith_regen_rate = 1
|
||||
var/list/powerpylons = list()
|
||||
|
||||
|
||||
/obj/structure/divine/nexus/ex_act()
|
||||
return
|
||||
|
||||
/obj/structure/divine/nexus/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(sound_effect)
|
||||
if(damage)
|
||||
playsound(loc, 'sound/weapons/smash.ogg', 50, 1)
|
||||
else
|
||||
playsound(loc, 'sound/weapons/tap.ogg', 50, 1)
|
||||
if(BURN)
|
||||
if(sound_effect)
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
else
|
||||
return
|
||||
health -= damage
|
||||
if(deity)
|
||||
deity.update_health_hud()
|
||||
if(!health)
|
||||
if(!qdeleted(deity) && deity.nexus_required)
|
||||
deity << "<span class='danger'>Your nexus was destroyed. You feel yourself fading...</span>"
|
||||
qdel(deity)
|
||||
visible_message("<span class='danger'>\The [src] was destroyed!</span>")
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/divine/nexus/New()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
|
||||
/obj/structure/divine/nexus/process()
|
||||
if(deity)
|
||||
deity.update_followers()
|
||||
deity.add_faith(faith_regen_rate + (powerpylons.len / 5) + (deity.alive_followers / 3))
|
||||
deity.max_faith = initial(deity.max_faith) + (deity.alive_followers*10) //10 followers = 100 max faith, so disaster() at around 20 followers
|
||||
deity.check_death()
|
||||
|
||||
|
||||
/obj/structure/divine/nexus/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/divine/conduit
|
||||
name = "conduit"
|
||||
desc = "It allows a deity to extend their reach. Their powers are just as potent near a conduit as a nexus."
|
||||
icon_state = "conduit"
|
||||
health = 150
|
||||
maxhealth = 150
|
||||
metal_cost = 10
|
||||
glass_cost = 5
|
||||
|
||||
|
||||
/obj/structure/divine/conduit/assign_deity(mob/camera/god/new_deity, alert_old_deity = TRUE)
|
||||
if(deity)
|
||||
deity.conduits -= src
|
||||
..()
|
||||
if(deity)
|
||||
deity.conduits += src
|
||||
|
||||
/obj/structure/divine/conduit/deactivate()
|
||||
..()
|
||||
if(deity)
|
||||
deity.conduits -= src
|
||||
|
||||
/obj/structure/divine/conduit/activate()
|
||||
..()
|
||||
if(deity)
|
||||
deity.conduits += src
|
||||
|
||||
/* //No good sprites, and not enough items to make it viable yet
|
||||
/obj/structure/divine/forge
|
||||
name = "forge"
|
||||
desc = "A forge fueled by divine might, it allows the creation of sacred and powerful artifacts. It requires common materials to craft objects."
|
||||
icon_state = "forge"
|
||||
health = 250
|
||||
maxhealth = 250
|
||||
density = 0
|
||||
maxhealth = 250
|
||||
metal_cost = 40
|
||||
*/
|
||||
|
||||
/obj/structure/divine/convertaltar
|
||||
name = "conversion altar"
|
||||
desc = "An altar dedicated to a deity. Cultists can \"forcefully teach\" their non-aligned crewmembers to join their side and take up their deity."
|
||||
icon_state = "convertaltar"
|
||||
density = 0
|
||||
metal_cost = 10
|
||||
can_buckle = 1
|
||||
|
||||
|
||||
/obj/structure/divine/convertaltar/attack_hand(mob/living/user)
|
||||
..()
|
||||
if(deactivated)
|
||||
return
|
||||
var/mob/living/carbon/human/H = locate() in get_turf(src)
|
||||
if(!is_handofgod_cultist(user))
|
||||
user << "<span class='notice'>You try to use it, but unfortunately you don't know any rituals.</span>"
|
||||
return
|
||||
if(!H)
|
||||
return
|
||||
if(!H.mind)
|
||||
user << "<span class='danger'>Only sentients may serve your deity.</span>"
|
||||
return
|
||||
if((side == "red" && is_handofgod_redcultist(user) && !is_handofgod_redcultist(H)) || (side == "blue" && is_handofgod_bluecultist(user) && !is_handofgod_bluecultist(H)))
|
||||
user << "<span class='notice'>You invoke the conversion ritual.</span>"
|
||||
ticker.mode.add_hog_follower(H.mind, side)
|
||||
else
|
||||
user << "<span class='notice'>You invoke the conversion ritual.</span>"
|
||||
user << "<span class='danger'>But the altar ignores your words...</span>"
|
||||
|
||||
|
||||
/obj/structure/divine/sacrificealtar
|
||||
name = "sacrificial altar"
|
||||
desc = "An altar designed to perform blood sacrifice for a deity. The cultists performing the sacrifice will gain a powerful material to use in their forge. Sacrificing a prophet will yield even better results."
|
||||
icon_state = "sacrificealtar"
|
||||
density = 0
|
||||
metal_cost = 15
|
||||
can_buckle = 1
|
||||
|
||||
|
||||
/obj/structure/divine/sacrificealtar/attack_hand(mob/living/user)
|
||||
..()
|
||||
if(deactivated)
|
||||
return
|
||||
var/mob/living/L = locate() in get_turf(src)
|
||||
if(!is_handofgod_cultist(user))
|
||||
user << "<span class='notice'>You try to use it, but unfortunately you don't know any rituals.</span>"
|
||||
return
|
||||
if(!L)
|
||||
return
|
||||
if((side == "red" && is_handofgod_redcultist(user)) || (side == "blue" && is_handofgod_bluecultist(user)))
|
||||
if((side == "red" && is_handofgod_redcultist(L)) || (side == "blue" && is_handofgod_bluecultist(L)))
|
||||
user << "<span class='danger'>You cannot sacrifice a fellow cultist.</span>"
|
||||
return
|
||||
user << "<span class='notice'>You attempt to sacrifice [L] by invoking the sacrificial ritual.</span>"
|
||||
sacrifice(L)
|
||||
else
|
||||
user << "<span class='notice'>You attempt to sacrifice [L] by invoking the sacrificial ritual.</span>"
|
||||
user << "<span class='danger'>But the altar ignores your words...</span>"
|
||||
|
||||
|
||||
/obj/structure/divine/sacrificealtar/proc/sacrifice(mob/living/L)
|
||||
if(!L)
|
||||
L = locate() in get_turf(src)
|
||||
if(L)
|
||||
if(ismonkey(L))
|
||||
var/luck = rand(1,4)
|
||||
if(luck > 3)
|
||||
new /obj/item/stack/sheet/lessergem(get_turf(src))
|
||||
|
||||
else if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
|
||||
//Sacrifice altars can't teamkill
|
||||
if(side == "red" && is_handofgod_redcultist(H))
|
||||
return
|
||||
else if(side == "blue" && is_handofgod_bluecultist(H))
|
||||
return
|
||||
|
||||
if(is_handofgod_prophet(H))
|
||||
new /obj/item/stack/sheet/greatergem(get_turf(src))
|
||||
if(deity)
|
||||
deity.prophets_sacrificed_in_name++
|
||||
else
|
||||
new /obj/item/stack/sheet/lessergem(get_turf(src))
|
||||
|
||||
else if(isAI(L) || istype(L, /mob/living/carbon/alien/humanoid/royal/queen))
|
||||
new /obj/item/stack/sheet/greatergem(get_turf(src))
|
||||
else
|
||||
new /obj/item/stack/sheet/lessergem(get_turf(src))
|
||||
L.gib()
|
||||
|
||||
|
||||
/obj/structure/divine/healingfountain
|
||||
name = "healing fountain"
|
||||
desc = "A fountain containing the waters of life... or death, depending on where your allegiances lie."
|
||||
icon_state = "fountain"
|
||||
metal_cost = 10
|
||||
glass_cost = 5
|
||||
autocolours = FALSE
|
||||
var/time_between_uses = 1800
|
||||
var/last_process = 0
|
||||
var/cult_only = TRUE
|
||||
|
||||
/obj/structure/divine/healingfountain/anyone
|
||||
desc = "A fountain containing the waters of life."
|
||||
cult_only = FALSE
|
||||
|
||||
/obj/structure/divine/healingfountain/attack_hand(mob/living/user)
|
||||
if(deactivated)
|
||||
return
|
||||
if(last_process + time_between_uses > world.time)
|
||||
user << "<span class='notice'>The fountain appears to be empty.</span>"
|
||||
return
|
||||
last_process = world.time
|
||||
if(!is_handofgod_cultist(user) && cult_only)
|
||||
user << "<span class='danger'><B>The water burns!</b></spam>"
|
||||
user.reagents.add_reagent("hell_water",20)
|
||||
else
|
||||
user << "<span class='notice'>The water feels warm and soothing as you touch it. The fountain immediately dries up shortly afterwards.</span>"
|
||||
user.reagents.add_reagent("godblood",20)
|
||||
update_icons()
|
||||
addtimer(src, "update_icons", time_between_uses)
|
||||
|
||||
|
||||
/obj/structure/divine/healingfountain/update_icons()
|
||||
if(last_process + time_between_uses > world.time)
|
||||
icon_state = "fountain"
|
||||
else
|
||||
icon_state = "fountain-[side]"
|
||||
|
||||
|
||||
/obj/structure/divine/powerpylon
|
||||
name = "power pylon"
|
||||
desc = "A pylon which increases the deity's rate it can influence the world."
|
||||
icon_state = "powerpylon"
|
||||
density = 1
|
||||
health = 30
|
||||
maxhealth = 30
|
||||
metal_cost = 5
|
||||
glass_cost = 15
|
||||
|
||||
|
||||
/obj/structure/divine/powerpylon/New()
|
||||
..()
|
||||
if(deity && deity.god_nexus)
|
||||
deity.god_nexus.powerpylons += src
|
||||
|
||||
|
||||
/obj/structure/divine/powerpylon/Destroy()
|
||||
if(deity && deity.god_nexus)
|
||||
deity.god_nexus.powerpylons -= src
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/divine/powerpylon/deactivate()
|
||||
..()
|
||||
if(deity)
|
||||
deity.god_nexus.powerpylons -= src
|
||||
|
||||
/obj/structure/divine/powerpylon/activate()
|
||||
..()
|
||||
if(deity)
|
||||
deity.god_nexus.powerpylons += src
|
||||
|
||||
/obj/structure/divine/defensepylon
|
||||
name = "defense pylon"
|
||||
desc = "A pylon which is blessed to withstand many blows, and fire strong bolts at nonbelievers. A god can toggle it."
|
||||
icon_state = "defensepylon"
|
||||
health = 150
|
||||
maxhealth = 150
|
||||
metal_cost = 25
|
||||
glass_cost = 30
|
||||
var/obj/machinery/porta_turret/defensepylon_internal_turret/pylon_gun
|
||||
|
||||
|
||||
/obj/structure/divine/defensepylon/New()
|
||||
..()
|
||||
pylon_gun = new(src)
|
||||
pylon_gun.base = src
|
||||
pylon_gun.faction = list("[side] god")
|
||||
|
||||
|
||||
/obj/structure/divine/defensepylon/Destroy()
|
||||
qdel(pylon_gun) //just in case
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/divine/defensepylon/examine(mob/user)
|
||||
..()
|
||||
user << "<span class='notice'>\The [src] looks [pylon_gun.on ? "on" : "off"].</span>"
|
||||
|
||||
|
||||
/obj/structure/divine/defensepylon/assign_deity(mob/camera/god/new_deity, alert_old_deity = TRUE)
|
||||
if(..() && pylon_gun)
|
||||
pylon_gun.faction = list("[side] god")
|
||||
pylon_gun.side = side
|
||||
|
||||
/obj/structure/divine/defensepylon/attack_god(mob/camera/god/user)
|
||||
if(user.side == side)
|
||||
if(deactivated)
|
||||
user << "You need to reveal it first!"
|
||||
return
|
||||
pylon_gun.on = !pylon_gun.on
|
||||
icon_state = (pylon_gun.on) ? "defensepylon-[side]" : "defensepylon"
|
||||
|
||||
/obj/structure/divine/defensepylon/deactivate()
|
||||
..()
|
||||
pylon_gun.on = 0
|
||||
icon_state = (pylon_gun.on) ? "defensepylon-[side]" : "defensepylon"
|
||||
|
||||
/obj/structure/divine/defensepylon/activate()
|
||||
..()
|
||||
pylon_gun.on = 1
|
||||
icon_state = (pylon_gun.on) ? "defensepylon-[side]" : "defensepylon"
|
||||
|
||||
//This sits inside the defensepylon, to avoid copypasta
|
||||
/obj/machinery/porta_turret/defensepylon_internal_turret
|
||||
name = "defense pylon"
|
||||
desc = "A plyon which is blessed to withstand many blows, and fire strong bolts at nonbelievers."
|
||||
icon = 'icons/obj/hand_of_god_structures.dmi'
|
||||
installation = null
|
||||
always_up = 1
|
||||
use_power = 0
|
||||
has_cover = 0
|
||||
health = 200
|
||||
projectile = /obj/item/projectile/beam/pylon_bolt
|
||||
eprojectile = /obj/item/projectile/beam/pylon_bolt
|
||||
shot_sound = 'sound/weapons/emitter2.ogg'
|
||||
eshot_sound = 'sound/weapons/emitter2.ogg'
|
||||
base_icon_state = "defensepylon"
|
||||
active_state = ""
|
||||
off_state = ""
|
||||
faction = null
|
||||
emp_vunerable = 0
|
||||
var/side = "neutral"
|
||||
|
||||
/obj/machinery/porta_turret/defensepylon_internal_turret/setup()
|
||||
return
|
||||
|
||||
/obj/machinery/porta_turret/defensepylon_internal_turret/shootAt(atom/movable/target)
|
||||
var/obj/item/projectile/A = ..()
|
||||
if(A)
|
||||
A.color = side
|
||||
|
||||
/obj/machinery/porta_turret/defensepylon_internal_turret/assess_perp(mob/living/carbon/human/perp)
|
||||
if(perp.handcuffed) //dishonourable to kill somebody who might be converted.
|
||||
return 0
|
||||
var/badtarget = 0
|
||||
switch(side)
|
||||
if("blue")
|
||||
badtarget = is_handofgod_bluecultist(perp)
|
||||
if("red")
|
||||
badtarget = is_handofgod_redcultist(perp)
|
||||
else
|
||||
badtarget = 1
|
||||
if(badtarget)
|
||||
return 0
|
||||
return 10
|
||||
|
||||
|
||||
|
||||
/obj/item/projectile/beam/pylon_bolt
|
||||
name = "divine bolt"
|
||||
icon_state = "greyscale_bolt"
|
||||
damage = 15
|
||||
|
||||
|
||||
/obj/structure/divine/shrine
|
||||
name = "shrine"
|
||||
desc = "A shrine dedicated to a deity."
|
||||
icon_state = "shrine"
|
||||
metal_cost = 15
|
||||
glass_cost = 15
|
||||
|
||||
|
||||
/obj/structure/divine/shrine/assign_deity(mob/camera/god/new_deity, alert_old_deity = TRUE)
|
||||
if(..())
|
||||
name = "shrine to [new_deity.name]"
|
||||
desc = "A shrine dedicated to [new_deity.name]"
|
||||
|
||||
|
||||
|
||||
|
||||
//Functional, but need sprites
|
||||
/*
|
||||
/obj/structure/divine/translocator
|
||||
name = "translocator"
|
||||
desc = "A powerful structure, made with a greater gem. It allows a deity to move their nexus to where this stands"
|
||||
icon_state = "translocator"
|
||||
health = 100
|
||||
maxhealth = 100
|
||||
metal_cost = 20
|
||||
glass_cost = 20
|
||||
greater_gem_cost = 1
|
||||
|
||||
|
||||
/obj/structure/divine/lazarusaltar
|
||||
name = "lazarus altar"
|
||||
desc = "A very powerful altar capable of bringing life back to the recently deceased, made with a greater gem. It can revive anyone and will heal virtually all wounds, but they are but a shell of their former self."
|
||||
icon_state = "lazarusaltar"
|
||||
density = 0
|
||||
health = 100
|
||||
maxhealth = 100
|
||||
metal_cost = 20
|
||||
greater_gem_cost = 1
|
||||
|
||||
|
||||
/obj/structure/divine/lazarusaltar/attack_hand(mob/living/user)
|
||||
var/mob/living/L = locate() in get_turf(src)
|
||||
if(!is_handofgod_culstist(user))
|
||||
user << "<span class='notice'>You try to use it, but unfortunately you don't know any rituals.</span>"
|
||||
return
|
||||
if(!L)
|
||||
return
|
||||
|
||||
if((side == "red" && is_handofgod_redcultist(user))) || (side == "blue" && is_handofgod_bluecultist(user)))
|
||||
user << "<span class='notice'>You attempt to revive [L] by invoking the rebirth ritual.</span>"
|
||||
L.revive()
|
||||
L.adjustCloneLoss(50)
|
||||
L.adjustStaminaLoss(100)
|
||||
else
|
||||
user << "<span class='notice'>You attempt to revive [L] by invoking the rebirth ritual.</span>"
|
||||
user << "<span class='danger'>But the altar ignores your words...</span>"
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,109 +0,0 @@
|
||||
|
||||
/obj/structure/divine/trap
|
||||
name = "IT'S A TARP"
|
||||
desc = "stepping on me is a guaranteed bad day"
|
||||
icon_state = "trap"
|
||||
density = 0
|
||||
alpha = 30 //initially quite hidden when not "recharging"
|
||||
health = 20
|
||||
maxhealth = 20
|
||||
trap = TRUE
|
||||
autocolours = FALSE
|
||||
var/last_trigger = 0
|
||||
var/time_between_triggers = 600 //takes a minute to recharge
|
||||
|
||||
|
||||
/obj/structure/divine/trap/Crossed(atom/movable/AM)
|
||||
if(last_trigger + time_between_triggers > world.time)
|
||||
return
|
||||
alpha = initial(alpha)
|
||||
if(isliving(AM))
|
||||
var/mob/living/L = AM
|
||||
last_trigger = world.time
|
||||
alpha = 200
|
||||
trap_effect(L)
|
||||
animate(src, alpha = initial(alpha), time = time_between_triggers)
|
||||
|
||||
|
||||
/obj/structure/divine/trap/examine(mob/user)
|
||||
..()
|
||||
if(!isliving(user)) //bad ghosts, stop trying to powergame from beyond the grave
|
||||
return
|
||||
user << "You reveal a trap!"
|
||||
alpha = 200
|
||||
animate(src, alpha = initial(alpha), time = time_between_triggers)
|
||||
|
||||
|
||||
/obj/structure/divine/trap/proc/trap_effect(mob/living/L)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/divine/trap/stun
|
||||
name = "shock trap"
|
||||
desc = "A trap that will shock you, it will burn your flesh and render you immobile, You'd better avoid it."
|
||||
icon_state = "trap-shock"
|
||||
|
||||
|
||||
/obj/structure/divine/trap/stun/trap_effect(mob/living/L)
|
||||
L << "<span class='danger'><B>You are paralyzed from the intense shock!</B></span>"
|
||||
L.Weaken(5)
|
||||
var/turf/Lturf = get_turf(L)
|
||||
new /obj/effect/particle_effect/sparks/electricity(Lturf)
|
||||
new /obj/effect/particle_effect/sparks(Lturf)
|
||||
|
||||
|
||||
/obj/structure/divine/trap/fire
|
||||
name = "flame trap"
|
||||
desc = "A trap that will set you ablaze. You'd better avoid it."
|
||||
icon_state = "trap-fire"
|
||||
|
||||
|
||||
/obj/structure/divine/trap/fire/trap_effect(mob/living/L)
|
||||
L << "<span class='danger'><B>Spontaneous combustion!</B></span>"
|
||||
L.Weaken(1)
|
||||
var/turf/Lturf = get_turf(L)
|
||||
new /obj/effect/hotspot(Lturf)
|
||||
new /obj/effect/particle_effect/sparks(Lturf)
|
||||
|
||||
|
||||
/obj/structure/divine/trap/chill
|
||||
name = "frost trap"
|
||||
desc = "A trap that will chill you to the bone. You'd better avoid it."
|
||||
icon_state = "trap-frost"
|
||||
|
||||
|
||||
/obj/structure/divine/trap/chill/trap_effect(mob/living/L)
|
||||
L << "<span class='danger'><B>You're frozen solid!</B></span>"
|
||||
L.Weaken(1)
|
||||
L.bodytemperature -= 300
|
||||
new /obj/effect/particle_effect/sparks(get_turf(L))
|
||||
|
||||
|
||||
/obj/structure/divine/trap/damage
|
||||
name = "earth trap"
|
||||
desc = "A trap that will summon a small earthquake, just for you. You'd better avoid it."
|
||||
icon_state = "trap-earth"
|
||||
|
||||
|
||||
/obj/structure/divine/trap/damage/trap_effect(mob/living/L)
|
||||
L << "<span class='danger'><B>The ground quakes beneath your feet!</B></span>"
|
||||
L.Weaken(5)
|
||||
L.adjustBruteLoss(35)
|
||||
var/turf/Lturf = get_turf(L)
|
||||
new /obj/effect/particle_effect/sparks(Lturf)
|
||||
new /obj/structure/flora/rock(Lturf)
|
||||
|
||||
|
||||
/obj/structure/divine/trap/ward
|
||||
name = "divine ward"
|
||||
desc = "A divine barrier, It looks like you could destroy it with enough effort, or wait for it to dissipate..."
|
||||
icon_state = "ward"
|
||||
health = 150
|
||||
maxhealth = 150
|
||||
density = 1
|
||||
time_between_triggers = 1200 //Exists for 2 minutes
|
||||
|
||||
|
||||
/obj/structure/divine/trap/ward/New()
|
||||
..()
|
||||
QDEL_IN(src, time_between_triggers)
|
||||
@@ -1,62 +0,0 @@
|
||||
/proc/gibs(atom/location, list/viruses, datum/dna/MobDNA)
|
||||
new /obj/effect/gibspawner/generic(location,viruses,MobDNA)
|
||||
|
||||
/proc/hgibs(atom/location, list/viruses, datum/dna/MobDNA)
|
||||
new /obj/effect/gibspawner/human(location,viruses,MobDNA)
|
||||
|
||||
/proc/xgibs(atom/location, list/viruses)
|
||||
new /obj/effect/gibspawner/xeno(location,viruses)
|
||||
|
||||
/proc/robogibs(atom/location, list/viruses)
|
||||
new /obj/effect/gibspawner/robot(location,viruses)
|
||||
|
||||
/obj/effect/gibspawner
|
||||
var/sparks = 0 //whether sparks spread on Gib()
|
||||
var/virusProb = 20 //the chance for viruses to spread on the gibs
|
||||
var/list/gibtypes = list()
|
||||
var/list/gibamounts = list()
|
||||
var/list/gibdirections = list() //of lists
|
||||
|
||||
/obj/effect/gibspawner/New(location, var/list/viruses, var/datum/dna/MobDNA)
|
||||
..()
|
||||
|
||||
Gib(loc,viruses,MobDNA)
|
||||
|
||||
/obj/effect/gibspawner/proc/Gib(atom/location, list/viruses = list(), datum/dna/MobDNA = null)
|
||||
if(gibtypes.len != gibamounts.len || gibamounts.len != gibdirections.len)
|
||||
world << "<span class='danger'>Gib list length mismatch!</span>"
|
||||
return
|
||||
|
||||
var/obj/effect/decal/cleanable/blood/gibs/gib = null
|
||||
|
||||
if(sparks)
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(2, 1, location)
|
||||
s.start()
|
||||
|
||||
for(var/i = 1, i<= gibtypes.len, i++)
|
||||
if(gibamounts[i])
|
||||
for(var/j = 1, j<= gibamounts[i], j++)
|
||||
var/gibType = gibtypes[i]
|
||||
gib = new gibType(location)
|
||||
if(istype(location,/mob/living/carbon))
|
||||
var/mob/living/carbon/digester = location
|
||||
digester.stomach_contents += gib
|
||||
|
||||
if(viruses.len > 0)
|
||||
for(var/datum/disease/D in viruses)
|
||||
if(prob(virusProb))
|
||||
var/datum/disease/viruus = D.Copy(1)
|
||||
gib.viruses += viruus
|
||||
viruus.holder = gib
|
||||
|
||||
if(MobDNA)
|
||||
gib.blood_DNA[MobDNA.unique_enzymes] = MobDNA.blood_type
|
||||
else if(istype(src, /obj/effect/gibspawner/generic)) // Probably a monkey
|
||||
gib.blood_DNA["Non-human DNA"] = "A+"
|
||||
var/list/directions = gibdirections[i]
|
||||
if(istype(loc,/turf))
|
||||
if(directions.len)
|
||||
gib.streak(directions)
|
||||
|
||||
qdel(src)
|
||||
@@ -1,25 +0,0 @@
|
||||
/obj/item/device/boobytrap
|
||||
name = "booby trap"
|
||||
desc = null //Different examine for traitors
|
||||
item_state = "electronic"
|
||||
icon_state = "boobytrap"
|
||||
w_class = 1
|
||||
throw_range = 4
|
||||
throw_speed = 1
|
||||
flags = NOBLUDGEON
|
||||
force = 3
|
||||
attack_verb = list("trapped", "rused", "tricked")
|
||||
materials = list(MAT_METAL=50, MAT_GLASS=30)
|
||||
origin_tech = "syndicate=1;combat=3;engineering=3"
|
||||
|
||||
/obj/item/device/boobytrap/proc/blow()
|
||||
explosion(src.loc,0,0,2,4,flame_range = 4)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/device/boobytrap/examine(mob/user)
|
||||
..()
|
||||
if(user.mind in ticker.mode.traitors) //No nuke ops because the device is excluded from nuclear
|
||||
user << "A small device used to rig lockers and boxes with an explosive surprise. \
|
||||
To use, simply attach it to a box or a locker."
|
||||
else
|
||||
user << "A suspicious array of delicate wires and parts."
|
||||
@@ -1,35 +0,0 @@
|
||||
/obj/item/modkit
|
||||
name = "modification kit"
|
||||
desc = "A one-use kit, which enables kinetic accelerators to retain their \
|
||||
charge when away from a bioelectric source, renders them immune to \
|
||||
interference with other accelerators, as well as allowing less \
|
||||
dextrous races to use the tool."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "modkit"
|
||||
origin_tech = "programming=2;materials=2;magnets=4"
|
||||
var/uses = 1
|
||||
|
||||
/obj/item/modkit/afterattack(obj/item/weapon/gun/energy/kinetic_accelerator/C, mob/user)
|
||||
..()
|
||||
if(!uses)
|
||||
qdel(src)
|
||||
return
|
||||
if(!istype(C))
|
||||
user << "<span class='warning'>This kit can only modify kinetic \
|
||||
accelerators!</span>"
|
||||
return ..()
|
||||
// RIP the 'improved improved improved improved kinetic accelerator
|
||||
if(C.holds_charge && C.unique_frequency)
|
||||
user << "<span class='warning'>This kinetic accelerator already has \
|
||||
these upgrades.</span>"
|
||||
return ..()
|
||||
|
||||
user <<"<span class='notice'>You modify the [C], adjusting the trigger \
|
||||
guard and internal capacitor.</span>"
|
||||
C.name = "improved [C.name]"
|
||||
C.holds_charge = TRUE
|
||||
C.unique_frequency = TRUE
|
||||
C.trigger_guard = TRIGGER_GUARD_ALLOW_ALL
|
||||
uses--
|
||||
if(!uses)
|
||||
qdel(src)
|
||||
@@ -1,167 +0,0 @@
|
||||
|
||||
/*
|
||||
/tg/station13 /datum Pool:
|
||||
---------------------------------
|
||||
By RemieRichards
|
||||
|
||||
Creation/Deletion is laggy, so let's reduce reuse and recycle!
|
||||
|
||||
Usage:
|
||||
|
||||
To get a object, just call
|
||||
- PoolOrNew(type, arg) if you only want to pass one argument to New(), usually loc
|
||||
- PoolOrNew(type, list) if you want to pass multiple arguments to New()
|
||||
|
||||
To put a object back in the pool, call PlaceInPool(object)
|
||||
This will call destroy on the object, set its loc to null,
|
||||
and reset all of its vars to their default
|
||||
|
||||
You can override your object's destroy to return QDEL_HINT_PUTINPOOL
|
||||
to ensure its always placed in this pool (this will only be acted on if qdel calls destroy, and destroy will not get called twice)
|
||||
|
||||
For almost all pooling purposes, it is better to use the QDEL hint than to pool it directly with PlaceInPool
|
||||
|
||||
*/
|
||||
|
||||
#define MAINTAINING_OBJECT_POOL_COUNT 500
|
||||
|
||||
var/global/list/GlobalPool = list()
|
||||
|
||||
//You'll be using this proc 90% of the time.
|
||||
//It grabs a type from the pool if it can
|
||||
//And if it can't, it creates one
|
||||
//The pool is flexible and will expand to fit
|
||||
//The new created atom when it eventually
|
||||
//Goes into the pool
|
||||
|
||||
//Second argument can be a single arg
|
||||
//Or a list of arguments
|
||||
//Either way it gets passed to new
|
||||
|
||||
/proc/PoolOrNew(get_type,second_arg)
|
||||
if(!get_type)
|
||||
return
|
||||
|
||||
. = GetFromPool(get_type,second_arg)
|
||||
|
||||
if(!.)
|
||||
if(ispath(get_type))
|
||||
if(islist(second_arg))
|
||||
. = new get_type (arglist(second_arg))
|
||||
else
|
||||
. = new get_type (second_arg)
|
||||
|
||||
|
||||
/proc/GetFromPool(get_type,second_arg)
|
||||
if(!get_type)
|
||||
return
|
||||
|
||||
if(isnull(GlobalPool[get_type]))
|
||||
return
|
||||
|
||||
if(length(GlobalPool[get_type]) == 0)
|
||||
return
|
||||
|
||||
var/datum/pooled = pop(GlobalPool[get_type])
|
||||
if(pooled)
|
||||
pooled.gc_destroyed = null
|
||||
|
||||
var/atom/movable/AM
|
||||
if(istype(pooled, /atom/movable))
|
||||
AM = pooled
|
||||
|
||||
if(islist(second_arg))
|
||||
if(AM)
|
||||
AM.loc = second_arg[1] //we need to do loc setting explicetly before even calling New() to replicate new()'s behavior
|
||||
pooled.New(arglist(second_arg))
|
||||
|
||||
else
|
||||
if(AM)
|
||||
AM.loc = second_arg
|
||||
pooled.New(second_arg)
|
||||
|
||||
return pooled
|
||||
|
||||
|
||||
/proc/PlaceInPool(datum/diver, destroy = 1)
|
||||
if(!istype(diver))
|
||||
return
|
||||
|
||||
if(diver in GlobalPool[diver.type])
|
||||
return
|
||||
|
||||
if(!GlobalPool[diver.type])
|
||||
GlobalPool[diver.type] = list()
|
||||
|
||||
GlobalPool[diver.type] |= diver
|
||||
|
||||
if(destroy)
|
||||
diver.Destroy()
|
||||
|
||||
diver.gc_destroyed = 1
|
||||
|
||||
diver.ResetVars()
|
||||
|
||||
var/list/exclude = list("animate_movement", "contents", "loc", "locs", "parent_type", "vars", "verbs", "type", "gc_destroyed")
|
||||
var/list/pooledvariables = list()
|
||||
//thanks to clusterfack @ /vg/station for these two procs
|
||||
/datum/proc/createVariables()
|
||||
pooledvariables[type] = new/list()
|
||||
var/list/exclude = global.exclude + args
|
||||
|
||||
for(var/key in vars)
|
||||
if(key in exclude)
|
||||
continue
|
||||
if(islist(vars[key]))
|
||||
pooledvariables[type][key] = list()
|
||||
else
|
||||
pooledvariables[type][key] = initial(vars[key])
|
||||
|
||||
/datum/proc/ResetVars()
|
||||
if(!pooledvariables[type])
|
||||
createVariables(args)
|
||||
|
||||
for(var/key in pooledvariables[type])
|
||||
if (islist(pooledvariables[type][key]))
|
||||
vars[key] = list()
|
||||
else
|
||||
vars[key] = pooledvariables[type][key]
|
||||
|
||||
/atom/movable/ResetVars()
|
||||
..()
|
||||
loc = null
|
||||
contents = initial(contents) //something is really wrong if this object still has stuff in it by this point
|
||||
|
||||
/image/ResetVars()
|
||||
..()
|
||||
loc = null
|
||||
|
||||
/proc/returnToPool(const/datum/D)
|
||||
ASSERT(D)
|
||||
|
||||
if(istype(D, /atom/movable) && length(GlobalPool[D.type]) > MAINTAINING_OBJECT_POOL_COUNT)
|
||||
#ifdef DEBUG_DATUM_POOL
|
||||
to_chat(world, text("DEBUG_DATUM_POOL: returnToPool([]) exceeds [] discarding...", D.type, MAINTAINING_OBJECT_POOL_COUNT))
|
||||
#endif
|
||||
|
||||
qdel(D)
|
||||
return
|
||||
|
||||
if(isnull(GlobalPool[D.type]))
|
||||
GlobalPool[D.type] = list()
|
||||
|
||||
D.Destroy()
|
||||
D.ResetVars()
|
||||
|
||||
#ifdef DEBUG_DATUM_POOL
|
||||
if(D in GlobalPool[D.type])
|
||||
to_chat(world, text("returnToPool has been called twice for the same datum of type [] time to panic.", D.type))
|
||||
#endif
|
||||
|
||||
GlobalPool[D.type] |= D
|
||||
|
||||
#ifdef DEBUG_DATUM_POOL
|
||||
to_chat(world, text("DEBUG_DATUM_POOL: returnToPool([]) [] left.", D.type, length(GlobalPool[D.type])))
|
||||
#endif
|
||||
|
||||
#undef MAINTAINING_OBJECT_POOL_COUNT
|
||||
@@ -1,127 +0,0 @@
|
||||
//ASTEROID FLOORS
|
||||
/turf/open/floor/plasteel/asteroid/warning
|
||||
icon = 'icons/turf/floors/warning.dmi'
|
||||
icon_state = "asteroid_warn"
|
||||
/turf/open/floor/plasteel/asteroid/warning/side
|
||||
icon_state = "asteroid_warn_side"
|
||||
/turf/open/floor/plasteel/asteroid/warning/corner
|
||||
icon_state = "asteroid_warn_corner"
|
||||
/turf/open/floor/plasteel/asteroid/warning/end
|
||||
icon_state = "asteroid_warn_end"
|
||||
|
||||
/turf/open/floor/plasteel/airless/asteroid/warning
|
||||
icon = 'icons/turf/floors/warning.dmi'
|
||||
icon_state = "asteroid_warn"
|
||||
/turf/open/floor/plasteel/airless/asteroid/warning/side
|
||||
icon_state = "asteroid_warn_side"
|
||||
/turf/open/floor/plasteel/airless/asteroid/warning/corner
|
||||
icon_state = "asteroid_warn_corner"
|
||||
/turf/open/floor/plasteel/airless/asteroid/warning/end
|
||||
icon_state = "asteroid_warn_end"
|
||||
|
||||
/turf/open/floor/plating/astplate/warning
|
||||
icon = 'icons/turf/floors/warning.dmi'
|
||||
icon_state = "astplate_warn"
|
||||
/turf/open/floor/plating/astplate/warning/corner
|
||||
icon_state = "astplate_warn_corner"
|
||||
/turf/open/floor/plating/astplate/warning/side
|
||||
icon_state = "astplate_warn_side"
|
||||
/turf/open/floor/plating/astplate/warning/end
|
||||
icon_state = "astplate_warn_end"
|
||||
|
||||
/turf/open/floor/plating/airless/astplate/warning
|
||||
icon = 'icons/turf/floors/warning.dmi'
|
||||
icon_state = "astplate_warn"
|
||||
/turf/open/floor/plating/airless/astplate/warning/corner
|
||||
icon_state = "astplate_warn_corner"
|
||||
/turf/open/floor/plating/airless/astplate/warning/side
|
||||
icon_state = "astplate_warn_side"
|
||||
/turf/open/floor/plating/airless/astplate/warning/end
|
||||
icon_state = "astplate_warn_end"
|
||||
|
||||
|
||||
//PLASTEEL
|
||||
/turf/open/floor/plasteel/warning
|
||||
icon = 'icons/turf/floors/warning.dmi'
|
||||
icon_state = "plasteel_warn"
|
||||
/turf/open/floor/plasteel/warning/corner
|
||||
icon_state = "plasteel_warn_corner"
|
||||
/turf/open/floor/plasteel/warning/side
|
||||
icon_state = "plasteel_warn_side"
|
||||
/turf/open/floor/plasteel/warning/end
|
||||
icon_state = "plasteel_warn_end"
|
||||
|
||||
/turf/open/floor/plasteel/airless/warning
|
||||
icon = 'icons/turf/floors/warning.dmi'
|
||||
icon_state = "plasteel_warn"
|
||||
/turf/open/floor/plasteel/airless/warning/corner
|
||||
icon_state = "plasteel_warn_corner"
|
||||
/turf/open/floor/plasteel/airless/warning/side
|
||||
icon_state = "plasteel_warn_side"
|
||||
/turf/open/floor/plasteel/airless/warning/end
|
||||
icon_state = "plasteel_warn_end"
|
||||
|
||||
//PLASTEEL WHITE
|
||||
/turf/open/floor/plasteel/warnwhite
|
||||
icon = 'icons/turf/floors/warning.dmi'
|
||||
icon_state = "white_warn"
|
||||
/turf/open/floor/plasteel/warnwhite/corner
|
||||
icon_state = "white_warn_corner"
|
||||
/turf/open/floor/plasteel/warnwhite/side
|
||||
icon_state = "white_warn_side"
|
||||
/turf/open/floor/plasteel/warnwhite/end
|
||||
icon_state = "white_warn_end"
|
||||
|
||||
/turf/open/floor/plasteel/airless/warnwhite
|
||||
icon = 'icons/turf/floors/warning.dmi'
|
||||
icon_state = "white_warn"
|
||||
/turf/open/floor/plasteel/airless/warnwhite/corner
|
||||
icon_state = "white_warn_corner"
|
||||
/turf/open/floor/plasteel/airless/warnwhite/side
|
||||
icon_state = "white_warn_side"
|
||||
/turf/open/floor/plasteel/airless/warnwhite/end
|
||||
icon_state = "white_warn_end"
|
||||
|
||||
|
||||
//PLASTEEL BLACK
|
||||
/turf/open/floor/plasteel/darkwarning
|
||||
icon = 'icons/turf/floors/warning.dmi'
|
||||
icon_state = "black_warn"
|
||||
/turf/open/floor/plasteel/darkwarning/corner
|
||||
icon_state = "black_warn_corner"
|
||||
/turf/open/floor/plasteel/darkwarning/side
|
||||
icon_state = "black_warn_side"
|
||||
/turf/open/floor/plasteel/darkwarning/end
|
||||
icon_state = "black_warn_end"
|
||||
|
||||
/turf/open/floor/plasteel/airless/darkwarning
|
||||
icon = 'icons/turf/floors/warning.dmi'
|
||||
icon_state = "black_warn"
|
||||
/turf/open/floor/plasteel/airless/darkwarning/corner
|
||||
icon_state = "black_warn_corner"
|
||||
/turf/open/floor/plasteel/airless/darkwarning/side
|
||||
icon_state = "black_warn_side"
|
||||
/turf/open/floor/plasteel/airless/darkwarning/end
|
||||
icon_state = "black_warn_end"
|
||||
|
||||
|
||||
//PLATING
|
||||
/turf/open/floor/plating/warnplate
|
||||
icon = 'icons/turf/floors/warning.dmi'
|
||||
icon_state = "plating_warn"
|
||||
/turf/open/floor/plating/warnplate/corner
|
||||
icon_state = "plating_warn_corner"
|
||||
/turf/open/floor/plating/warnplate/side
|
||||
icon_state = "plating_warn_side"
|
||||
/turf/open/floor/plating/warnplate/end
|
||||
icon_state = "plating_warn_end"
|
||||
|
||||
/turf/open/floor/plating/airless/warnplate
|
||||
icon = 'icons/turf/floors/warning.dmi'
|
||||
icon_state = "plating_warn"
|
||||
/turf/open/floor/plating/airless/warnplate/corner
|
||||
icon_state = "plating_warn_corner"
|
||||
/turf/open/floor/plating/airless/warnplate/side
|
||||
icon_state = "plating_warn_side"
|
||||
/turf/open/floor/plating/airless/warnplate/end
|
||||
icon_state = "plating_warn_end"
|
||||
@@ -1,189 +0,0 @@
|
||||
/turf/closed/wall/mineral
|
||||
name = "mineral wall"
|
||||
desc = "This shouldn't exist"
|
||||
icon_state = ""
|
||||
var/last_event = 0
|
||||
var/active = null
|
||||
canSmoothWith = null
|
||||
smooth = SMOOTH_TRUE
|
||||
|
||||
/turf/closed/wall/mineral/gold
|
||||
name = "gold wall"
|
||||
desc = "A wall with gold plating. Swag!"
|
||||
icon = 'icons/turf/walls/gold_wall.dmi'
|
||||
icon_state = "gold"
|
||||
walltype = "gold"
|
||||
mineral = "gold"
|
||||
sheet_type = /obj/item/stack/sheet/mineral/gold
|
||||
//var/electro = 1
|
||||
//var/shocked = null
|
||||
explosion_block = 0 //gold is a soft metal you dingus.
|
||||
canSmoothWith = list(/turf/closed/wall/mineral/gold, /obj/structure/falsewall/gold)
|
||||
|
||||
/turf/closed/wall/mineral/silver
|
||||
name = "silver wall"
|
||||
desc = "A wall with silver plating. Shiny!"
|
||||
icon = 'icons/turf/walls/silver_wall.dmi'
|
||||
icon_state = "silver"
|
||||
walltype = "silver"
|
||||
mineral = "silver"
|
||||
sheet_type = /obj/item/stack/sheet/mineral/silver
|
||||
//var/electro = 0.75
|
||||
//var/shocked = null
|
||||
canSmoothWith = list(/turf/closed/wall/mineral/silver, /obj/structure/falsewall/silver)
|
||||
|
||||
/turf/closed/wall/mineral/diamond
|
||||
name = "diamond wall"
|
||||
desc = "A wall with diamond plating. You monster."
|
||||
icon = 'icons/turf/walls/diamond_wall.dmi'
|
||||
icon_state = "diamond"
|
||||
walltype = "diamond"
|
||||
mineral = "diamond"
|
||||
sheet_type = /obj/item/stack/sheet/mineral/diamond
|
||||
slicing_duration = 200 //diamond wall takes twice as much time to slice
|
||||
explosion_block = 3
|
||||
canSmoothWith = list(/turf/closed/wall/mineral/diamond, /obj/structure/falsewall/diamond)
|
||||
|
||||
/turf/closed/wall/mineral/diamond/thermitemelt(mob/user)
|
||||
return
|
||||
|
||||
/turf/closed/wall/mineral/clown
|
||||
name = "bananium wall"
|
||||
desc = "A wall with bananium plating. Honk!"
|
||||
icon = 'icons/turf/walls/bananium_wall.dmi'
|
||||
icon_state = "bananium"
|
||||
walltype = "bananium"
|
||||
mineral = "bananium"
|
||||
sheet_type = /obj/item/stack/sheet/mineral/bananium
|
||||
canSmoothWith = list(/turf/closed/wall/mineral/clown, /obj/structure/falsewall/clown)
|
||||
|
||||
/turf/closed/wall/mineral/sandstone
|
||||
name = "sandstone wall"
|
||||
desc = "A wall with sandstone plating. Rough."
|
||||
icon = 'icons/turf/walls/sandstone_wall.dmi'
|
||||
icon_state = "sandstone"
|
||||
walltype = "sandstone"
|
||||
mineral = "sandstone"
|
||||
sheet_type = /obj/item/stack/sheet/mineral/sandstone
|
||||
explosion_block = 0
|
||||
canSmoothWith = list(/turf/closed/wall/mineral/sandstone, /obj/structure/falsewall/sandstone)
|
||||
|
||||
/turf/closed/wall/mineral/uranium
|
||||
name = "uranium wall"
|
||||
desc = "A wall with uranium plating. This is probably a bad idea."
|
||||
icon = 'icons/turf/walls/uranium_wall.dmi'
|
||||
icon_state = "uranium"
|
||||
walltype = "uranium"
|
||||
mineral = "uranium"
|
||||
sheet_type = /obj/item/stack/sheet/mineral/uranium
|
||||
canSmoothWith = list(/turf/closed/wall/mineral/uranium, /obj/structure/falsewall/uranium)
|
||||
|
||||
/turf/closed/wall/mineral/uranium/proc/radiate()
|
||||
if(!active)
|
||||
if(world.time > last_event+15)
|
||||
active = 1
|
||||
radiation_pulse(get_turf(src), 3, 3, 4, 0)
|
||||
for(var/turf/closed/wall/mineral/uranium/T in orange(1,src))
|
||||
T.radiate()
|
||||
last_event = world.time
|
||||
active = null
|
||||
return
|
||||
return
|
||||
|
||||
/turf/closed/wall/mineral/uranium/attack_hand(mob/user)
|
||||
radiate()
|
||||
..()
|
||||
|
||||
/turf/closed/wall/mineral/uranium/attackby(obj/item/weapon/W, mob/user, params)
|
||||
radiate()
|
||||
..()
|
||||
|
||||
/turf/closed/wall/mineral/uranium/Bumped(AM as mob|obj)
|
||||
radiate()
|
||||
..()
|
||||
|
||||
/turf/closed/wall/mineral/plasma
|
||||
name = "plasma wall"
|
||||
desc = "A wall with plasma plating. This is definitely a bad idea."
|
||||
icon = 'icons/turf/walls/plasma_wall.dmi'
|
||||
icon_state = "plasma"
|
||||
walltype = "plasma"
|
||||
mineral = "plasma"
|
||||
sheet_type = /obj/item/stack/sheet/mineral/plasma
|
||||
thermal_conductivity = 0.04
|
||||
canSmoothWith = list(/turf/closed/wall/mineral/plasma, /obj/structure/falsewall/plasma)
|
||||
|
||||
/turf/closed/wall/mineral/plasma/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(W.is_hot() > 300)//If the temperature of the object is over 300, then ignite
|
||||
message_admins("Plasma wall ignited by [key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Plasma wall ignited by [key_name(user)] in ([x],[y],[z])")
|
||||
ignite(W.is_hot())
|
||||
return
|
||||
..()
|
||||
|
||||
/turf/closed/wall/mineral/plasma/proc/PlasmaBurn(temperature)
|
||||
new /obj/structure/girder(src)
|
||||
src.ChangeTurf(/turf/open/floor/plasteel)
|
||||
var/turf/open/T = src
|
||||
T.atmos_spawn_air("plasma=400;TEMP=1000")
|
||||
|
||||
/turf/closed/wall/mineral/plasma/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)//Doesn't fucking work because walls don't interact with air :(
|
||||
if(exposed_temperature > 300)
|
||||
PlasmaBurn(exposed_temperature)
|
||||
|
||||
/turf/closed/wall/mineral/plasma/proc/ignite(exposed_temperature)
|
||||
if(exposed_temperature > 300)
|
||||
PlasmaBurn(exposed_temperature)
|
||||
|
||||
/turf/closed/wall/mineral/plasma/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(istype(Proj,/obj/item/projectile/beam))
|
||||
PlasmaBurn(2500)
|
||||
else if(istype(Proj,/obj/item/projectile/ion))
|
||||
PlasmaBurn(500)
|
||||
..()
|
||||
|
||||
|
||||
/turf/closed/wall/mineral/wood
|
||||
name = "wooden wall"
|
||||
desc = "A wall with wooden plating. Stiff."
|
||||
icon = 'icons/turf/walls/wood_wall.dmi'
|
||||
icon_state = "wood"
|
||||
walltype = "wood"
|
||||
mineral = "wood"
|
||||
sheet_type = /obj/item/stack/sheet/mineral/wood
|
||||
hardness = 70
|
||||
explosion_block = 0
|
||||
canSmoothWith = list(/turf/closed/wall/mineral/wood, /obj/structure/falsewall/wood)
|
||||
|
||||
/turf/closed/wall/mineral/iron
|
||||
name = "rough metal wall"
|
||||
desc = "A wall with rough metal plating."
|
||||
icon = 'icons/turf/walls/iron_wall.dmi'
|
||||
icon_state = "iron"
|
||||
walltype = "iron"
|
||||
mineral = "rods"
|
||||
sheet_type = /obj/item/stack/rods
|
||||
canSmoothWith = list(/turf/closed/wall/mineral/iron, /obj/structure/falsewall/iron)
|
||||
|
||||
/turf/closed/wall/mineral/snow
|
||||
name = "packed snow wall"
|
||||
desc = "A wall made of densely packed snow blocks."
|
||||
icon = 'icons/turf/walls/snow_wall.dmi'
|
||||
icon_state = "snow"
|
||||
walltype = "snow"
|
||||
mineral = "snow"
|
||||
hardness = 80
|
||||
sheet_type = /obj/item/stack/sheet/mineral/snow
|
||||
canSmoothWith = null
|
||||
|
||||
/turf/closed/wall/mineral/abductor
|
||||
name = "alien wall"
|
||||
desc = "A wall with alien alloy plating."
|
||||
icon = 'icons/turf/walls/abductor_wall.dmi'
|
||||
icon_state = "abductor"
|
||||
walltype = "abductor"
|
||||
mineral = "abductor"
|
||||
sheet_type = /obj/item/stack/sheet/mineral/abductor
|
||||
slicing_duration = 200 //alien wall takes twice as much time to slice
|
||||
explosion_block = 3
|
||||
canSmoothWith = list(/turf/closed/wall/mineral/abductor, /obj/structure/falsewall/abductor)
|
||||
@@ -1,196 +0,0 @@
|
||||
/turf/closed/wall/mineral/cult
|
||||
name = "runed metal wall"
|
||||
desc = "A cold metal wall engraved with indecipherable symbols. Studying them causes your head to pound."
|
||||
icon = 'icons/turf/walls/cult_wall.dmi'
|
||||
icon_state = "cult"
|
||||
walltype = "cult"
|
||||
builtin_sheet = null
|
||||
canSmoothWith = null
|
||||
|
||||
/turf/closed/wall/mineral/cult/New()
|
||||
PoolOrNew(/obj/effect/overlay/temp/cult/turf, src)
|
||||
..()
|
||||
|
||||
/turf/closed/wall/mineral/cult/break_wall()
|
||||
new/obj/item/stack/sheet/runed_metal(get_turf(src), 1)
|
||||
return (new /obj/structure/girder/cult(src))
|
||||
|
||||
/turf/closed/wall/mineral/cult/devastate_wall()
|
||||
new/obj/item/stack/sheet/runed_metal(get_turf(src), 1)
|
||||
|
||||
/turf/closed/wall/mineral/cult/narsie_act()
|
||||
return
|
||||
|
||||
/turf/closed/wall/mineral/cult/ratvar_act()
|
||||
..()
|
||||
if(istype(src, /turf/closed/wall/mineral/cult)) //if we haven't changed type
|
||||
var/previouscolor = color
|
||||
color = "#FAE48C"
|
||||
animate(src, color = previouscolor, time = 8)
|
||||
|
||||
/turf/closed/wall/mineral/cult/artificer
|
||||
name = "runed stone wall"
|
||||
desc = "A cold stone wall engraved with indecipherable symbols. Studying them causes your head to pound."
|
||||
|
||||
/turf/closed/wall/mineral/cult/artificer/break_wall()
|
||||
PoolOrNew(/obj/effect/overlay/temp/cult/turf, get_turf(src))
|
||||
return null //excuse me we want no runed metal here
|
||||
|
||||
/turf/closed/wall/mineral/cult/artificer/devastate_wall()
|
||||
PoolOrNew(/obj/effect/overlay/temp/cult/turf, get_turf(src))
|
||||
|
||||
//Clockwork wall: Causes nearby tinkerer's caches to generate components.
|
||||
/turf/closed/wall/clockwork
|
||||
name = "clockwork wall"
|
||||
desc = "A huge chunk of warm metal. The clanging of machinery emanates from within."
|
||||
icon = 'icons/turf/walls/clockwork_wall.dmi'
|
||||
icon_state = "clockwork_wall"
|
||||
canSmoothWith = list(/turf/closed/wall/clockwork)
|
||||
smooth = SMOOTH_MORE
|
||||
explosion_block = 2
|
||||
|
||||
/turf/closed/wall/clockwork/New()
|
||||
..()
|
||||
PoolOrNew(/obj/effect/overlay/temp/ratvar/wall, src)
|
||||
PoolOrNew(/obj/effect/overlay/temp/ratvar/beam, src)
|
||||
clockwork_construction_value += 5
|
||||
|
||||
/turf/closed/wall/clockwork/Destroy()
|
||||
clockwork_construction_value -= 5
|
||||
..()
|
||||
|
||||
/turf/closed/wall/clockwork/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = I
|
||||
if(!WT.isOn())
|
||||
return 0
|
||||
user.visible_message("<span class='notice'>[user] begins slowly breaking down [src]...</span>", "<span class='notice'>You begin painstakingly destroying [src]...</span>")
|
||||
if(!do_after(user, 120 / WT.toolspeed, target = src))
|
||||
return 0
|
||||
if(!WT.remove_fuel(1, user))
|
||||
return 0
|
||||
user.visible_message("<span class='notice'>[user] breaks apart [src]!</span>", "<span class='notice'>You break apart [src]!</span>")
|
||||
dismantle_wall()
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
/turf/closed/wall/clockwork/ratvar_act()
|
||||
return 0
|
||||
|
||||
/turf/closed/wall/clockwork/narsie_act()
|
||||
..()
|
||||
if(istype(src, /turf/closed/wall/clockwork)) //if we haven't changed type
|
||||
var/previouscolor = color
|
||||
color = "#960000"
|
||||
animate(src, color = previouscolor, time = 8)
|
||||
|
||||
/turf/closed/wall/clockwork/dismantle_wall(devastated=0, explode=0)
|
||||
if(devastated)
|
||||
devastate_wall()
|
||||
ChangeTurf(/turf/open/floor/plating)
|
||||
else
|
||||
playsound(src, 'sound/items/Welder.ogg', 100, 1)
|
||||
var/newgirder = break_wall()
|
||||
if(newgirder) //maybe we want a gear!
|
||||
transfer_fingerprints_to(newgirder)
|
||||
ChangeTurf(/turf/open/floor/clockwork)
|
||||
|
||||
for(var/obj/O in src) //Eject contents!
|
||||
if(istype(O,/obj/structure/sign/poster))
|
||||
var/obj/structure/sign/poster/P = O
|
||||
P.roll_and_drop(src)
|
||||
else
|
||||
O.loc = src
|
||||
|
||||
/turf/closed/wall/clockwork/break_wall()
|
||||
return new/obj/structure/clockwork/wall_gear(src)
|
||||
|
||||
/turf/closed/wall/clockwork/devastate_wall()
|
||||
new/obj/item/clockwork/alloy_shards(src)
|
||||
|
||||
|
||||
/turf/closed/wall/vault
|
||||
icon = 'icons/turf/walls.dmi'
|
||||
icon_state = "rockvault"
|
||||
|
||||
/turf/closed/wall/ice
|
||||
icon = 'icons/turf/walls/icedmetal_wall.dmi'
|
||||
icon_state = "iced"
|
||||
desc = "A wall covered in a thick sheet of ice."
|
||||
walltype = "iced"
|
||||
canSmoothWith = null
|
||||
hardness = 35
|
||||
slicing_duration = 150 //welding through the ice+metal
|
||||
|
||||
/turf/closed/wall/rust
|
||||
name = "rusted wall"
|
||||
desc = "A rusted metal wall."
|
||||
icon = 'icons/turf/walls/rusty_wall.dmi'
|
||||
icon_state = "arust"
|
||||
walltype = "arust"
|
||||
hardness = 45
|
||||
|
||||
/turf/closed/wall/r_wall/rust
|
||||
name = "rusted reinforced wall"
|
||||
desc = "A huge chunk of rusted reinforced metal."
|
||||
icon = 'icons/turf/walls/rusty_reinforced_wall.dmi'
|
||||
icon_state = "rrust"
|
||||
walltype = "rrust"
|
||||
hardness = 15
|
||||
|
||||
/turf/closed/wall/shuttle
|
||||
name = "wall"
|
||||
icon = 'icons/turf/shuttle.dmi'
|
||||
icon_state = "wall"
|
||||
walltype = "shuttle"
|
||||
smooth = SMOOTH_FALSE
|
||||
|
||||
/turf/closed/wall/shuttle/proc/update_icon()
|
||||
..()
|
||||
|
||||
/turf/closed/wall/shuttle/smooth
|
||||
name = "wall"
|
||||
icon = 'icons/turf/walls/shuttle_wall.dmi'
|
||||
icon_state = "shuttle"
|
||||
walltype = "shuttle"
|
||||
smooth = SMOOTH_MORE|SMOOTH_DIAGONAL
|
||||
canSmoothWith = list(/turf/closed/wall/shuttle/smooth, /obj/structure/window/shuttle, /obj/structure/shuttle/engine)
|
||||
|
||||
/turf/closed/wall/shuttle/smooth/nodiagonal
|
||||
smooth = SMOOTH_MORE
|
||||
icon_state = "shuttle_nd"
|
||||
|
||||
/turf/closed/wall/shuttle/smooth/overspace
|
||||
icon_state = "overspace"
|
||||
fixed_underlay = list("space"=1)
|
||||
|
||||
//sub-type to be used for interior shuttle walls
|
||||
//won't get an underlay of the destination turf on shuttle move
|
||||
/turf/closed/wall/shuttle/interior/copyTurf(turf/T)
|
||||
if(T.type != type)
|
||||
T.ChangeTurf(type)
|
||||
if(underlays.len)
|
||||
T.underlays = underlays
|
||||
if(T.icon_state != icon_state)
|
||||
T.icon_state = icon_state
|
||||
if(T.icon != icon)
|
||||
T.icon = icon
|
||||
if(T.color != color)
|
||||
T.color = color
|
||||
if(T.dir != dir)
|
||||
T.setDir(dir)
|
||||
T.transform = transform
|
||||
return T
|
||||
|
||||
/turf/closed/wall/shuttle/copyTurf(turf/T)
|
||||
. = ..()
|
||||
T.transform = transform
|
||||
|
||||
|
||||
//why don't shuttle walls habe smoothwall? now i gotta do rotation the dirty way <- DOUBLE GOOFBALL FOR NOT CALLING PARENT
|
||||
/turf/closed/wall/shuttle/shuttleRotate(rotation)
|
||||
if(smooth)
|
||||
return ..()
|
||||
var/matrix/M = transform
|
||||
M.Turn(rotation)
|
||||
transform = M
|
||||
@@ -1,228 +0,0 @@
|
||||
/turf/closed/wall/r_wall
|
||||
name = "reinforced wall"
|
||||
desc = "A huge chunk of reinforced metal used to separate rooms."
|
||||
icon = 'icons/turf/walls/reinforced_wall.dmi'
|
||||
icon_state = "r_wall"
|
||||
opacity = 1
|
||||
density = 1
|
||||
|
||||
walltype = "rwall"
|
||||
|
||||
var/d_state = 0
|
||||
hardness = 10
|
||||
sheet_type = /obj/item/stack/sheet/plasteel
|
||||
explosion_block = 2
|
||||
|
||||
/turf/closed/wall/r_wall/break_wall()
|
||||
builtin_sheet.loc = src
|
||||
return (new /obj/structure/girder/reinforced(src))
|
||||
|
||||
/turf/closed/wall/r_wall/devastate_wall()
|
||||
builtin_sheet.loc = src
|
||||
new /obj/item/stack/sheet/metal(src, 2)
|
||||
|
||||
/turf/closed/wall/r_wall/attack_animal(mob/living/simple_animal/M)
|
||||
M.changeNext_move(CLICK_CD_MELEE)
|
||||
M.do_attack_animation(src)
|
||||
if(M.environment_smash == 3)
|
||||
dismantle_wall(1)
|
||||
playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1)
|
||||
M << "<span class='notice'>You smash through the wall.</span>"
|
||||
else
|
||||
M << "<span class='warning'>This wall is far too strong for you to destroy.</span>"
|
||||
|
||||
/turf/closed/wall/r_wall/try_destroy(obj/item/weapon/W, mob/user, turf/T)
|
||||
if(istype(W, /obj/item/weapon/pickaxe/drill/jackhammer))
|
||||
var/obj/item/weapon/pickaxe/drill/jackhammer/D = W
|
||||
user << "<span class='notice'>You begin to smash though the [name]...</span>"
|
||||
if(do_after(user, 50, target = src))
|
||||
if( !istype(src, /turf/closed/wall/r_wall) || !user || !W || !T )
|
||||
return 1
|
||||
if( user.loc == T && user.get_active_hand() == W )
|
||||
D.playDigSound()
|
||||
visible_message("<span class='warning'>[user] smashes through the [name] with the [D.name]!</span>", "<span class='italics'>You hear the grinding of metal.</span>")
|
||||
dismantle_wall()
|
||||
return 1
|
||||
else if(istype(W, /obj/item/stack/sheet/metal) && d_state)
|
||||
var/obj/item/stack/sheet/metal/MS = W
|
||||
if (MS.get_amount() < 1)
|
||||
user << "<span class='warning'>You need one sheet of metal to repair the wall!</span>"
|
||||
return 1
|
||||
user << "<span class='notice'>You begin patching-up the wall with \a [MS]...</span>"
|
||||
if (do_after(user, max(20*d_state,100), target = src))//time taken to repair is proportional to the damage! (max 10 seconds)
|
||||
if(loc == null || MS.get_amount() < 1)
|
||||
return 1
|
||||
MS.use(1)
|
||||
src.d_state = 0
|
||||
src.icon_state = "r_wall"
|
||||
queue_smooth_neighbors(src)
|
||||
user << "<span class='notice'>You repair the last of the damage.</span>"
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/turf/closed/wall/r_wall/try_decon(obj/item/weapon/W, mob/user, turf/T)
|
||||
//DECONSTRUCTION
|
||||
switch(d_state)
|
||||
if(0)
|
||||
if (istype(W, /obj/item/weapon/wirecutters))
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
src.d_state = 1
|
||||
update_icon()
|
||||
user << "<span class='notice'>You cut the outer grille.</span>"
|
||||
return 1
|
||||
|
||||
if(1)
|
||||
if (istype(W, /obj/item/weapon/screwdriver))
|
||||
user << "<span class='notice'>You begin removing the support lines...</span>"
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
|
||||
if(do_after(user, 40, target = src))
|
||||
if( !istype(src, /turf/closed/wall/r_wall) || !user || !W || !T )
|
||||
return 1
|
||||
|
||||
if( d_state == 1 && user.loc == T && user.get_active_hand() == W )
|
||||
src.d_state = 2
|
||||
update_icon()
|
||||
user << "<span class='notice'>You remove the support lines.</span>"
|
||||
return 1
|
||||
|
||||
//REPAIRING (replacing the outer grille for cosmetic damage)
|
||||
else if(istype(W, /obj/item/stack/sheet/metal))
|
||||
var/obj/item/stack/sheet/metal/O = W
|
||||
if (O.use(1))
|
||||
src.d_state = 0
|
||||
update_icon()
|
||||
src.icon_state = "r_wall"
|
||||
user << "<span class='notice'>You replace the outer grille.</span>"
|
||||
else
|
||||
user << "<span class='warning'>Report this to a coder: metal stack had less than one sheet in it when trying to repair wall</span>"
|
||||
return 1
|
||||
return 1
|
||||
|
||||
if(2)
|
||||
if( istype(W, /obj/item/weapon/weldingtool) )
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if( WT.remove_fuel(0,user) )
|
||||
|
||||
user << "<span class='notice'>You begin slicing through the metal cover...</span>"
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
|
||||
if(do_after(user, 60, target = src))
|
||||
if( !istype(src, /turf/closed/wall/r_wall) || !user || !WT || !WT.isOn() || !T )
|
||||
return 0
|
||||
|
||||
if( d_state == 2 && user.loc == T && user.get_active_hand() == WT )
|
||||
src.d_state = 3
|
||||
update_icon()
|
||||
user << "<span class='notice'>You press firmly on the cover, dislodging it.</span>"
|
||||
return 1
|
||||
|
||||
if( istype(W, /obj/item/weapon/gun/energy/plasmacutter) )
|
||||
|
||||
user << "<span class='notice'>You begin slicing through the metal cover...</span>"
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
|
||||
if(do_after(user, 60, target = src))
|
||||
if( !istype(src, /turf/closed/wall/r_wall) || !user || !W || !T )
|
||||
return 1
|
||||
|
||||
if( d_state == 2 && user.loc == T && user.get_active_hand() == W )
|
||||
src.d_state = 3
|
||||
update_icon()
|
||||
user << "<span class='notice'>You press firmly on the cover, dislodging it.</span>"
|
||||
return 1
|
||||
|
||||
if(3)
|
||||
if (istype(W, /obj/item/weapon/crowbar))
|
||||
|
||||
user << "<span class='notice'>You struggle to pry off the cover...</span>"
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
|
||||
if(do_after(user, 100, target = src))
|
||||
if( !istype(src, /turf/closed/wall/r_wall) || !user || !W || !T )
|
||||
return 1
|
||||
|
||||
if( d_state == 3 && user.loc == T && user.get_active_hand() == W )
|
||||
src.d_state = 4
|
||||
update_icon()
|
||||
user << "<span class='notice'>You pry off the cover.</span>"
|
||||
return 1
|
||||
|
||||
if(4)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
|
||||
user << "<span class='notice'>You start loosening the anchoring bolts which secure the support rods to their frame...</span>"
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
|
||||
if(do_after(user, 40, target = src))
|
||||
if( !istype(src, /turf/closed/wall/r_wall) || !user || !W || !T )
|
||||
return 1
|
||||
|
||||
if( d_state == 4 && user.loc == T && user.get_active_hand() == W )
|
||||
src.d_state = 5
|
||||
update_icon()
|
||||
user << "<span class='notice'>You remove the bolts anchoring the support rods.</span>"
|
||||
return 1
|
||||
|
||||
if(5)
|
||||
if( istype(W, /obj/item/weapon/weldingtool) )
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if( WT.remove_fuel(0,user) )
|
||||
|
||||
user << "<span class='notice'>You begin slicing through the support rods...</span>"
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
|
||||
if(do_after(user, 100, target = src))
|
||||
if( !istype(src, /turf/closed/wall/r_wall) || !user || !WT || !WT.isOn() || !T )
|
||||
return 1
|
||||
|
||||
if( d_state == 5 && user.loc == T && user.get_active_hand() == WT )
|
||||
src.d_state = 6
|
||||
update_icon()
|
||||
user << "<span class='notice'>You slice through the support rods.</span>"
|
||||
return 1
|
||||
|
||||
if( istype(W, /obj/item/weapon/gun/energy/plasmacutter) )
|
||||
|
||||
user << "<span class='notice'>You begin slicing through the support rods...</span>"
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
|
||||
if(do_after(user, 70, target = src))
|
||||
if( !istype(src, /turf/closed/wall/r_wall) || !user || !W || !T )
|
||||
return 1
|
||||
|
||||
if( d_state == 5 && user.loc == T && user.get_active_hand() == W )
|
||||
src.d_state = 6
|
||||
update_icon()
|
||||
user << "<span class='notice'>You slice through the support rods.</span>"
|
||||
return 1
|
||||
|
||||
if(6)
|
||||
if( istype(W, /obj/item/weapon/crowbar) )
|
||||
|
||||
user << "<span class='notice'>You struggle to pry off the outer sheath...</span>"
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
|
||||
if(do_after(user, 100, target = src))
|
||||
if( !istype(src, /turf/closed/wall/r_wall) || !user || !W || !T )
|
||||
return 1
|
||||
|
||||
if( user.loc == T && user.get_active_hand() == W )
|
||||
user << "<span class='notice'>You pry off the outer sheath.</span>"
|
||||
dismantle_wall()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/turf/closed/wall/r_wall/proc/update_icon()
|
||||
if(d_state)
|
||||
icon_state = "r_wall-[d_state]"
|
||||
smooth = SMOOTH_FALSE
|
||||
clear_smooth_overlays()
|
||||
else
|
||||
smooth = SMOOTH_TRUE
|
||||
icon_state = ""
|
||||
|
||||
/turf/closed/wall/r_wall/singularity_pull(S, current_size)
|
||||
if(current_size >= STAGE_FIVE)
|
||||
if(prob(30))
|
||||
dismantle_wall()
|
||||
@@ -1,79 +0,0 @@
|
||||
/client/verb/looc(msg as text)
|
||||
set name = "LOOC"
|
||||
set desc = "Local OOC, seen only by those in view."
|
||||
set category = "OOC"
|
||||
|
||||
if(say_disabled) //This is here to try to identify lag problems
|
||||
usr << "\red Speech is currently admin-disabled."
|
||||
return
|
||||
|
||||
if(!mob) return
|
||||
if(IsGuestKey(key))
|
||||
src << "Guests may not use OOC."
|
||||
return
|
||||
|
||||
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
|
||||
if(!msg) return
|
||||
|
||||
if(!(prefs.toggles & CHAT_OOC))
|
||||
src << "\red You have OOC muted."
|
||||
return
|
||||
|
||||
if(!holder)
|
||||
if(!ooc_allowed)
|
||||
src << "\red OOC is globally muted"
|
||||
return
|
||||
if(!dooc_allowed && (mob.stat == DEAD))
|
||||
usr << "\red OOC for dead mobs has been turned off."
|
||||
return
|
||||
if(prefs.muted & MUTE_OOC)
|
||||
src << "\red You cannot use OOC (muted)."
|
||||
return
|
||||
if(handle_spam_prevention(msg,MUTE_OOC))
|
||||
return
|
||||
if(findtext(msg, "byond://"))
|
||||
src << "<B>Advertising other servers is not allowed.</B>"
|
||||
log_admin("[key_name(src)] has attempted to advertise in LOOC: [msg]")
|
||||
return
|
||||
|
||||
log_ooc("(LOCAL) [mob.name]/[key] : [msg]")
|
||||
|
||||
var/list/heard = get_hearers_in_view(7, get_top_level_mob(src.mob))
|
||||
for(var/mob/M in heard)
|
||||
if(!M.client)
|
||||
continue
|
||||
var/client/C = M.client
|
||||
if (C in admins)
|
||||
continue //they are handled after that
|
||||
|
||||
if (istype(M,/mob/dead/observer))
|
||||
continue //Also handled later.
|
||||
|
||||
if(C.prefs.toggles & CHAT_OOC)
|
||||
// var/display_name = src.key
|
||||
// if(holder)
|
||||
// if(holder.fakekey)
|
||||
// if(C.holder)
|
||||
// display_name = "[holder.fakekey]/([src.key])"
|
||||
// else
|
||||
// display_name = holder.fakekey
|
||||
C << "<font color='#6699CC'><span class='ooc'><span class='prefix'>LOOC:</span> <EM>[src.mob.name]:</EM> <span class='message'>[msg]</span></span></font>"
|
||||
|
||||
for(var/client/C in admins)
|
||||
if(C.prefs.toggles & CHAT_OOC)
|
||||
var/prefix = "(R)LOOC"
|
||||
if (C.mob in heard)
|
||||
prefix = "LOOC"
|
||||
C << "<font color='#6699CC'><span class='ooc'><span class='prefix'>[prefix]:</span> <EM>[src.key]/[src.mob.name]:</EM> <span class='message'>[msg]</span></span></font>"
|
||||
|
||||
for(var/mob/dead/observer/G in world)
|
||||
if(!G.client)
|
||||
continue
|
||||
var/client/C = G.client
|
||||
if (C in admins)
|
||||
continue //handled earlier.
|
||||
if(C.prefs.toggles & CHAT_OOC)
|
||||
var/prefix = "(G)LOOC"
|
||||
if (C.mob in heard)
|
||||
prefix = "LOOC"
|
||||
C << "<font color='#6699CC'><span class='ooc'><span class='prefix'>[prefix]:</span> <EM>[src.key]/[src.mob.name]:</EM> <span class='message'>[msg]</span></span></font>"
|
||||
@@ -1,176 +0,0 @@
|
||||
/client/verb/ooc(msg as text)
|
||||
set name = "OOC" //Gave this shit a shorter name so you only have to time out "ooc" rather than "ooc message" to use it --NeoFite
|
||||
set category = "OOC"
|
||||
|
||||
if(say_disabled) //This is here to try to identify lag problems
|
||||
usr << "<span class='danger'>Speech is currently admin-disabled.</span>"
|
||||
return
|
||||
|
||||
if(!mob)
|
||||
return
|
||||
if(IsGuestKey(key))
|
||||
src << "Guests may not use OOC."
|
||||
return
|
||||
|
||||
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
|
||||
if(!msg)
|
||||
return
|
||||
|
||||
if(!(prefs.chat_toggles & CHAT_OOC))
|
||||
src << "<span class='danger'>You have OOC muted.</span>"
|
||||
return
|
||||
|
||||
if(!holder)
|
||||
if(!ooc_allowed)
|
||||
src << "<span class='danger'>OOC is globally muted.</span>"
|
||||
return
|
||||
if(!dooc_allowed && (mob.stat == DEAD))
|
||||
usr << "<span class='danger'>OOC for dead mobs has been turned off.</span>"
|
||||
return
|
||||
if(prefs.muted & MUTE_OOC)
|
||||
src << "<span class='danger'>You cannot use OOC (muted).</span>"
|
||||
return
|
||||
if(src.mob)
|
||||
if(jobban_isbanned(src.mob, "OOC"))
|
||||
src << "<span class='danger'>You have been banned from OOC.</span>"
|
||||
return
|
||||
if(handle_spam_prevention(msg,MUTE_OOC))
|
||||
return
|
||||
if(findtext(msg, "byond://"))
|
||||
src << "<B>Advertising other servers is not allowed.</B>"
|
||||
log_admin("[key_name(src)] has attempted to advertise in OOC: [msg]")
|
||||
message_admins("[key_name_admin(src)] has attempted to advertise in OOC: [msg]")
|
||||
return
|
||||
|
||||
var/raw_msg = msg
|
||||
|
||||
msg = emoji_parse(msg)
|
||||
|
||||
if((copytext(msg, 1, 2) in list(".",";",":","#")) || (findtext(lowertext(copytext(msg, 1, 5)), "say")))
|
||||
if(alert("Your message \"[raw_msg]\" looks like it was meant for in game communication, say it in OOC?", "Meant for OOC?", "No", "Yes") != "Yes")
|
||||
return
|
||||
|
||||
log_ooc("[mob.name]/[key] : [raw_msg]")
|
||||
|
||||
var/keyname = key
|
||||
if(prefs.unlock_content)
|
||||
if(prefs.toggles & MEMBER_PUBLIC)
|
||||
keyname = "<font color='[prefs.ooccolor ? prefs.ooccolor : normal_ooc_colour]'><img style='width:9px;height:9px;' class=icon src=\ref['icons/member_content.dmi'] iconstate=blag>[keyname]</font>"
|
||||
|
||||
for(var/client/C in clients)
|
||||
if(C.prefs.chat_toggles & CHAT_OOC)
|
||||
if(holder)
|
||||
if(!holder.fakekey || C.holder)
|
||||
if(check_rights_for(src, R_ADMIN))
|
||||
C << "<span class='adminooc'>[config.allow_admin_ooccolor && prefs.ooccolor ? "<font color=[prefs.ooccolor]>" :"" ]<span class='prefix'>OOC:</span> <EM>[keyname][holder.fakekey ? "/([holder.fakekey])" : ""]:</EM> <span class='message'>[msg]</span></span></font>"
|
||||
else
|
||||
C << "<span class='adminobserverooc'><span class='prefix'>OOC:</span> <EM>[keyname][holder.fakekey ? "/([holder.fakekey])" : ""]:</EM> <span class='message'>[msg]</span></span>"
|
||||
else
|
||||
C << "<font color='[normal_ooc_colour]'><span class='ooc'><span class='prefix'>OOC:</span> <EM>[holder.fakekey ? holder.fakekey : key]:</EM> <span class='message'>[msg]</span></span></font>"
|
||||
else if(!(key in C.prefs.ignoring))
|
||||
C << "<font color='[normal_ooc_colour]'><span class='ooc'><span class='prefix'>OOC:</span> <EM>[keyname]:</EM> <span class='message'>[msg]</span></span></font>"
|
||||
|
||||
/proc/toggle_ooc(toggle = null)
|
||||
if(toggle != null) //if we're specifically en/disabling ooc
|
||||
if(toggle != ooc_allowed)
|
||||
ooc_allowed = toggle
|
||||
else
|
||||
return
|
||||
else //otherwise just toggle it
|
||||
ooc_allowed = !ooc_allowed
|
||||
world << "<B>The OOC channel has been globally [ooc_allowed ? "enabled" : "disabled"].</B>"
|
||||
|
||||
var/global/normal_ooc_colour = OOC_COLOR
|
||||
|
||||
/client/proc/set_ooc(newColor as color)
|
||||
set name = "Set Player OOC Color"
|
||||
set desc = "Modifies player OOC Color"
|
||||
set category = "Fun"
|
||||
normal_ooc_colour = sanitize_ooccolor(newColor)
|
||||
|
||||
/client/proc/reset_ooc()
|
||||
set name = "Reset Player OOC Color"
|
||||
set desc = "Returns player OOC Color to default"
|
||||
set category = "Fun"
|
||||
normal_ooc_colour = OOC_COLOR
|
||||
|
||||
/client/verb/colorooc()
|
||||
set name = "Set Your OOC Color"
|
||||
set category = "Preferences"
|
||||
|
||||
if(!holder || check_rights_for(src, R_ADMIN))
|
||||
if(!is_content_unlocked())
|
||||
return
|
||||
|
||||
var/new_ooccolor = input(src, "Please select your OOC color.", "OOC color", prefs.ooccolor) as color|null
|
||||
if(new_ooccolor)
|
||||
prefs.ooccolor = sanitize_ooccolor(new_ooccolor)
|
||||
prefs.save_preferences()
|
||||
feedback_add_details("admin_verb","OC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
/client/verb/resetcolorooc()
|
||||
set name = "Reset Your OOC Color"
|
||||
set desc = "Returns your OOC Color to default"
|
||||
set category = "Preferences"
|
||||
|
||||
if(!holder || check_rights_for(src, R_ADMIN))
|
||||
if(!is_content_unlocked())
|
||||
return
|
||||
|
||||
prefs.ooccolor = initial(prefs.ooccolor)
|
||||
prefs.save_preferences()
|
||||
|
||||
//Checks admin notice
|
||||
/client/verb/admin_notice()
|
||||
set name = "Adminnotice"
|
||||
set category = "Admin"
|
||||
set desc ="Check the admin notice if it has been set"
|
||||
|
||||
if(admin_notice)
|
||||
src << "<span class='boldnotice'>Admin Notice:</span>\n \t [admin_notice]"
|
||||
else
|
||||
src << "<span class='notice'>There are no admin notices at the moment.</span>"
|
||||
|
||||
/client/verb/motd()
|
||||
set name = "MOTD"
|
||||
set category = "OOC"
|
||||
set desc ="Check the Message of the Day"
|
||||
|
||||
if(join_motd)
|
||||
src << "<div class=\"motd\">[join_motd]</div>"
|
||||
else
|
||||
src << "<span class='notice'>The Message of the Day has not been set.</span>"
|
||||
|
||||
/client/proc/self_notes()
|
||||
set name = "View Admin Notes"
|
||||
set category = "OOC"
|
||||
set desc = "View the notes that admins have written about you"
|
||||
|
||||
if(!config.see_own_notes)
|
||||
usr << "<span class='notice'>Sorry, that function is not enabled on this server.</span>"
|
||||
return
|
||||
|
||||
show_note(usr, null, 1)
|
||||
|
||||
/client/proc/ignore_key(client)
|
||||
var/client/C = client
|
||||
if(C.key in prefs.ignoring)
|
||||
prefs.ignoring -= C.key
|
||||
else
|
||||
prefs.ignoring |= C.key
|
||||
src << "You are [(C.key in prefs.ignoring) ? "now" : "no longer"] ignoring [C.key] on the OOC channel."
|
||||
prefs.save_preferences()
|
||||
|
||||
/client/verb/select_ignore()
|
||||
set name = "Ignore"
|
||||
set category = "OOC"
|
||||
set desc ="Ignore a player's messages on the OOC channel"
|
||||
|
||||
var/selection = input("Please, select a player!", "Ignore", null, null) as null|anything in sortKey(clients)
|
||||
if(!selection)
|
||||
return
|
||||
if(selection == src)
|
||||
src << "You can't ignore yourself."
|
||||
return
|
||||
ignore_key(selection)
|
||||
@@ -1,179 +0,0 @@
|
||||
/mob/var/suiciding = 0
|
||||
|
||||
/mob/living/carbon/human/verb/suicide()
|
||||
set hidden = 1
|
||||
if(!canSuicide())
|
||||
return
|
||||
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
|
||||
if(!canSuicide())
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
suiciding = 1
|
||||
log_game("[key_name(src)] (job: [job ? "[job]" : "None"]) commited suicide at [get_area(src)].")
|
||||
message_admins("[key_name(src)] (job: [job ? "[job]" : "None"]) commited suicide at [get_area(src)].")
|
||||
var/obj/item/held_item = get_active_hand()
|
||||
if(held_item)
|
||||
var/damagetype = held_item.suicide_act(src)
|
||||
if(damagetype)
|
||||
if(damagetype & SHAME)
|
||||
adjustStaminaLoss(200)
|
||||
suiciding = 0
|
||||
return
|
||||
var/damage_mod = 0
|
||||
for(var/T in list(BRUTELOSS, FIRELOSS, TOXLOSS, OXYLOSS))
|
||||
damage_mod += (T & damagetype) ? 1 : 0
|
||||
damage_mod = max(1, damage_mod)
|
||||
|
||||
//Do 200 damage divided by the number of damage types applied.
|
||||
if(damagetype & BRUTELOSS)
|
||||
adjustBruteLoss(200/damage_mod)
|
||||
|
||||
if(damagetype & FIRELOSS)
|
||||
adjustFireLoss(200/damage_mod)
|
||||
|
||||
if(damagetype & TOXLOSS)
|
||||
adjustToxLoss(200/damage_mod)
|
||||
|
||||
if(damagetype & OXYLOSS)
|
||||
adjustOxyLoss(200/damage_mod)
|
||||
|
||||
//If something went wrong, just do normal oxyloss
|
||||
if(!(damagetype & (BRUTELOSS | FIRELOSS | TOXLOSS | OXYLOSS) ))
|
||||
adjustOxyLoss(max(200 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
|
||||
|
||||
death(0)
|
||||
return
|
||||
|
||||
var/suicide_message = pick("[src] is attempting to bite \his tongue off! It looks like \he's trying to commit suicide.", \
|
||||
"[src] is jamming \his thumbs into \his eye sockets! It looks like \he's trying to commit suicide.", \
|
||||
"[src] is twisting \his own neck! It looks like \he's trying to commit suicide.", \
|
||||
"[src] is holding \his breath! It looks like \he's trying to commit suicide.")
|
||||
|
||||
visible_message("<span class='danger'>[suicide_message]</span>", "<span class='userdanger'>[suicide_message]</span>")
|
||||
|
||||
adjustOxyLoss(max(200 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
|
||||
death(0)
|
||||
|
||||
/mob/living/carbon/brain/verb/suicide()
|
||||
set hidden = 1
|
||||
if(!canSuicide())
|
||||
return
|
||||
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
|
||||
if(!canSuicide())
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
suiciding = 1
|
||||
visible_message("<span class='danger'>[src]'s brain is growing dull and lifeless. It looks like it's lost the will to live.</span>", \
|
||||
"<span class='userdanger'>[src]'s brain is growing dull and lifeless. It looks like it's lost the will to live.</span>")
|
||||
spawn(50)
|
||||
death(0)
|
||||
|
||||
/mob/living/carbon/monkey/verb/suicide()
|
||||
set hidden = 1
|
||||
if(!canSuicide())
|
||||
return
|
||||
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
|
||||
if(!canSuicide())
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
suiciding = 1
|
||||
//instead of killing them instantly, just put them at -175 health and let 'em gasp for a while
|
||||
visible_message("<span class='danger'>[src] is attempting to bite \his tongue. It looks like \he's trying to commit suicide.</span>", \
|
||||
"<span class='userdanger'>[src] is attempting to bite \his tongue. It looks like \he's trying to commit suicide.</span>")
|
||||
adjustOxyLoss(max(200- getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
|
||||
death(0)
|
||||
|
||||
/mob/living/silicon/ai/verb/suicide()
|
||||
set hidden = 1
|
||||
if(!canSuicide())
|
||||
return
|
||||
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
|
||||
if(!canSuicide())
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
suiciding = 1
|
||||
visible_message("<span class='danger'>[src] is powering down. It looks like \he's trying to commit suicide.</span>", \
|
||||
"<span class='userdanger'>[src] is powering down. It looks like \he's trying to commit suicide.</span>")
|
||||
//put em at -175
|
||||
adjustOxyLoss(max(maxHealth * 2 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
|
||||
death(0)
|
||||
|
||||
/mob/living/silicon/robot/verb/suicide()
|
||||
set hidden = 1
|
||||
if(!canSuicide())
|
||||
return
|
||||
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
|
||||
if(!canSuicide())
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
suiciding = 1
|
||||
visible_message("<span class='danger'>[src] is powering down. It looks like \he's trying to commit suicide.</span>", \
|
||||
"<span class='userdanger'>[src] is powering down. It looks like \he's trying to commit suicide.</span>")
|
||||
//put em at -175
|
||||
adjustOxyLoss(max(maxHealth * 2 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
|
||||
death(0)
|
||||
|
||||
/mob/living/silicon/pai/verb/suicide()
|
||||
set category = "pAI Commands"
|
||||
set desc = "Kill yourself and become a ghost (You will receive a confirmation prompt)"
|
||||
set name = "pAI Suicide"
|
||||
var/answer = input("REALLY kill yourself? This action can't be undone.", "Suicide", "No") in list ("Yes", "No")
|
||||
if(answer == "Yes")
|
||||
card.removePersonality()
|
||||
var/turf/T = get_turf(src.loc)
|
||||
T.visible_message("<span class='notice'>[src] flashes a message across its screen, \"Wiping core files. Please acquire a new personality to continue using pAI device functions.\"</span>", "<span class='notice'>[src] bleeps electronically.</span>")
|
||||
death(0)
|
||||
else
|
||||
src << "Aborting suicide attempt."
|
||||
|
||||
/mob/living/carbon/alien/humanoid/verb/suicide()
|
||||
set hidden = 1
|
||||
if(!canSuicide())
|
||||
return
|
||||
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
|
||||
if(!canSuicide())
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
suiciding = 1
|
||||
visible_message("<span class='danger'>[src] is thrashing wildly! It looks like \he's trying to commit suicide.</span>", \
|
||||
"<span class='userdanger'>[src] is thrashing wildly! It looks like \he's trying to commit suicide.</span>", \
|
||||
"<span class='italics'>You hear thrashing.</span>")
|
||||
//put em at -175
|
||||
adjustOxyLoss(max(200 - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
|
||||
death(0)
|
||||
|
||||
/mob/living/simple_animal/verb/suicide()
|
||||
set hidden = 1
|
||||
if(!canSuicide())
|
||||
return
|
||||
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
|
||||
if(!canSuicide())
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
suiciding = 1
|
||||
visible_message("<span class='danger'>[src] begins to fall down. It looks like \he's lost the will to live.</span>", \
|
||||
"<span class='userdanger'>[src] begins to fall down. It looks like \he's lost the will to live.</span>")
|
||||
death(0)
|
||||
|
||||
|
||||
/mob/living/proc/canSuicide()
|
||||
if(stat == CONSCIOUS)
|
||||
if(mental_dominator)
|
||||
src << "<span class='warning'>This body's force of will is too strong! You can't break it enough to murder them.</span>"
|
||||
if(mind_control_holder)
|
||||
mind_control_holder << "<span class='userdanger'>Through tremendous force of will, you stop a suicide attempt!</span>"
|
||||
return 0
|
||||
return 1
|
||||
else if(stat == DEAD)
|
||||
src << "You're already dead!"
|
||||
else if(stat == UNCONSCIOUS)
|
||||
src << "You need to be conscious to suicide!"
|
||||
return
|
||||
|
||||
/mob/living/carbon/canSuicide()
|
||||
if(!..())
|
||||
return
|
||||
if(!canmove || restrained()) //just while I finish up the new 'fun' suiciding verb. This is to prevent metagaming via suicide
|
||||
src << "You can't commit suicide whilst restrained! ((You can type Ghost instead however.))"
|
||||
return
|
||||
return 1
|
||||
@@ -1,85 +0,0 @@
|
||||
/client/verb/who()
|
||||
set name = "Who"
|
||||
set category = "OOC"
|
||||
|
||||
var/msg = "<b>Current Players:</b>\n"
|
||||
|
||||
var/list/Lines = list()
|
||||
|
||||
if(holder)
|
||||
if (check_rights(R_ADMIN,0) && isobserver(src.mob))//If they have +ADMIN and are a ghost they can see players IC names and statuses.
|
||||
var/mob/dead/observer/G = src.mob
|
||||
if(!G.started_as_observer)//If you aghost to do this, KorPhaeron will deadmin you in your sleep.
|
||||
log_admin("[key_name(usr)] checked advanced who in-round")
|
||||
for(var/client/C in clients)
|
||||
var/entry = "\t[C.key]"
|
||||
if(C.holder && C.holder.fakekey)
|
||||
entry += " <i>(as [C.holder.fakekey])</i>"
|
||||
if (isnewplayer(C.mob))
|
||||
entry += " - <font color='darkgray'><b>In Lobby</b></font>"
|
||||
else
|
||||
entry += " - Playing as [C.mob.real_name]"
|
||||
switch(C.mob.stat)
|
||||
if(UNCONSCIOUS)
|
||||
entry += " - <font color='darkgray'><b>Unconscious</b></font>"
|
||||
if(DEAD)
|
||||
if(isobserver(C.mob))
|
||||
var/mob/dead/observer/O = C.mob
|
||||
if(O.started_as_observer)
|
||||
entry += " - <font color='gray'>Observing</font>"
|
||||
else
|
||||
entry += " - <font color='black'><b>DEAD</b></font>"
|
||||
else
|
||||
entry += " - <font color='black'><b>DEAD</b></font>"
|
||||
if(is_special_character(C.mob))
|
||||
entry += " - <b><font color='red'>Antagonist</font></b>"
|
||||
entry += " (<A HREF='?_src_=holder;adminmoreinfo=\ref[C.mob]'>?</A>)"
|
||||
Lines += entry
|
||||
else//If they don't have +ADMIN, only show hidden admins
|
||||
for(var/client/C in clients)
|
||||
var/entry = "\t[C.key]"
|
||||
if(C.holder && C.holder.fakekey)
|
||||
entry += " <i>(as [C.holder.fakekey])</i>"
|
||||
Lines += entry
|
||||
else
|
||||
for(var/client/C in clients)
|
||||
if(C.holder && C.holder.fakekey)
|
||||
Lines += C.holder.fakekey
|
||||
else
|
||||
Lines += C.key
|
||||
|
||||
for(var/line in sortList(Lines))
|
||||
msg += "[line]\n"
|
||||
|
||||
msg += "<b>Total Players: [length(Lines)]</b>"
|
||||
src << msg
|
||||
|
||||
/client/verb/adminwho()
|
||||
set category = "Admin"
|
||||
set name = "Adminwho"
|
||||
|
||||
var/msg = "<b>Current Admins:</b>\n"
|
||||
if(holder)
|
||||
for(var/client/C in admins)
|
||||
msg += "\t[C] is a [C.holder.rank]"
|
||||
|
||||
if(C.holder.fakekey)
|
||||
msg += " <i>(as [C.holder.fakekey])</i>"
|
||||
|
||||
if(isobserver(C.mob))
|
||||
msg += " - Observing"
|
||||
else if(istype(C.mob,/mob/new_player))
|
||||
msg += " - Lobby"
|
||||
else
|
||||
msg += " - Playing"
|
||||
|
||||
if(C.is_afk())
|
||||
msg += " (AFK)"
|
||||
msg += "\n"
|
||||
else
|
||||
for(var/client/C in admins)
|
||||
if(!C.holder.fakekey)
|
||||
msg += "\t[C] is a [C.holder.rank]\n"
|
||||
msg += "<span class='info'>Adminhelps are also sent to IRC. If no admins are available in game adminhelp anyways and an admin on IRC will see it and respond.</span>"
|
||||
src << msg
|
||||
|
||||
Reference in New Issue
Block a user