12/21 modernizations from TG live (#103)

* sync (#3)

* shuttle auto call

* Merge /vore into /master (#39)

* progress

* Compile errors fixed

No idea if it's test worthy tho as conflicts with race overhaul and
narky removal.

* Update admins.txt

* efforts continue

Fuck grab code, seriously

* grab code is cancer

* Execute the Narkism

Do not hesitate.

Show no mercy.

* holy shit grab code is awful

* have I bitched about grab code

My bitching, let me show you it

* código de agarre es una mierda

No really it is

* yeah I don't even know anymore.

* Lolnope. Fuck grab code

* I'm not even sure what to fix anymore

* Self eating is not an acceptable fate

* Taste the void, son.

* My code doesn't pass it's own sanity check.

Maybe it's a sign of things to come.

* uncommented and notes

* It Works and I Don't Know Why (#38)

* shuttle auto call

* it works and I don't know why

* Subsystem 12/21

Most Recent TG subsystem folder

* globalvars 12/21

Tossed out the flavor_misc and parallax files

* Onclick 12/21

as well as .dme updates

* _defines 12/21

ommited old _MC.dm

* _HELPERS 12/21

Preserved snowflake placement of furry sprites

* _defeines/genetics

reapplied narkism holdover for snowflake races.

* Oops forgot mutant colors

* modules porting 12/21 + Sounds/icons

Admin, Client and most of mob life files ommitted

* enviroment file

* Admin optimizations

ahelp log system kept

* Mob ports 12/21

Flavor text preserved

* datums ported 12/21

* Game ported 12/21

* batch of duplicate fixes/dogborg work

Dogborgs need to be modernized to refractored borg standards.

* moar fixes

* Maps and futher compile fixes
This commit is contained in:
Poojawa
2016-12-22 03:57:55 -06:00
committed by GitHub
parent f5e143a452
commit cf59ac1c3d
2215 changed files with 707445 additions and 87041 deletions
+218
View File
@@ -0,0 +1,218 @@
/obj/structure/flora/ash
gender = PLURAL
layer = PROJECTILE_HIT_THRESHHOLD_LAYER //sporangiums up don't shoot
icon = 'icons/obj/lavaland/ash_flora.dmi'
icon_state = "l_mushroom"
name = "large mushrooms"
desc = "A number of large mushrooms, covered in a faint layer of ash and what can only be spores."
var/harvested_name = "shortened mushrooms"
var/harvested_desc = "Some quickly regrowing mushrooms, formerly known to be quite large."
var/needs_sharp_harvest = TRUE
var/harvest = /obj/item/weapon/reagent_containers/food/snacks/ash_flora/shavings
var/harvest_amount_low = 1
var/harvest_amount_high = 3
var/harvest_time = 60
var/harvest_message_low = "You pick a mushroom, but fail to collect many shavings from its cap."
var/harvest_message_med = "You pick a mushroom, carefully collecting the shavings from its cap."
var/harvest_message_high = "You harvest and collect shavings from several mushroom caps."
var/harvested = FALSE
var/base_icon
var/regrowth_time_low = 4800
var/regrowth_time_high = 8400
/obj/structure/flora/ash/New()
..()
base_icon = "[icon_state][rand(1, 4)]"
icon_state = base_icon
if(prob(15))
harvest(null, TRUE)
/obj/structure/flora/ash/proc/harvest(user, no_drop)
if(harvested)
return 0
if(!no_drop)
var/rand_harvested = rand(harvest_amount_low, harvest_amount_high)
if(rand_harvested)
if(user)
var/msg = harvest_message_med
if(rand_harvested == harvest_amount_low)
msg = harvest_message_low
else if(rand_harvested == harvest_amount_high)
msg = harvest_message_high
user << "<span class='notice'>[msg]</span>"
for(var/i in 1 to rand_harvested)
new harvest(get_turf(src))
icon_state = "[base_icon]p"
name = harvested_name
desc = harvested_desc
harvested = TRUE
addtimer(src, "regrow", rand(regrowth_time_low, regrowth_time_high))
return 1
/obj/structure/flora/ash/proc/regrow()
icon_state = base_icon
name = initial(name)
desc = initial(desc)
harvested = FALSE
/obj/structure/flora/ash/attackby(obj/item/weapon/W, mob/user, params)
if(!harvested && needs_sharp_harvest && W.sharpness)
user.visible_message("<span class='notice'>[user] starts to harvest from [src] with [W].</span>","<span class='notice'>You begin to harvest from [src] with [W].</span>")
if(do_after(user, harvest_time, target = src))
harvest(user)
else
return ..()
/obj/structure/flora/ash/attack_hand(mob/user)
if(!harvested && !needs_sharp_harvest)
user.visible_message("<span class='notice'>[user] starts to harvest from [src].</span>","<span class='notice'>You begin to harvest from [src].</span>")
if(do_after(user, harvest_time, target = src))
harvest(user)
else
..()
/obj/structure/flora/ash/tall_shroom //exists only so that the spawning check doesn't allow these spawning near other things
regrowth_time_low = 4200
/obj/structure/flora/ash/leaf_shroom
icon_state = "s_mushroom"
name = "leafy mushrooms"
desc = "A number of mushrooms, each of which surrounds a greenish sporangium with a number of leaf-like structures."
harvested_name = "leafless mushrooms"
harvested_desc = "A bunch of formerly-leafed mushrooms, with their sporangiums exposed. Scandalous?"
harvest = /obj/item/weapon/reagent_containers/food/snacks/ash_flora/mushroom_leaf
needs_sharp_harvest = FALSE
harvest_amount_high = 4
harvest_time = 20
harvest_message_low = "You pluck a single, suitable leaf."
harvest_message_med = "You pluck a number of leaves, leaving a few unsuitable ones."
harvest_message_high = "You pluck quite a lot of suitable leaves."
regrowth_time_low = 2400
regrowth_time_high = 6000
/obj/structure/flora/ash/cap_shroom
icon_state = "r_mushroom"
name = "tall mushrooms"
desc = "Several mushrooms, the larger of which have a ring of conks at the midpoint of their stems."
harvested_name = "small mushrooms"
harvested_desc = "Several small mushrooms near the stumps of what likely were larger mushrooms."
harvest = /obj/item/weapon/reagent_containers/food/snacks/ash_flora/mushroom_cap
harvest_amount_high = 4
harvest_time = 50
harvest_message_low = "You slice the cap off of a mushroom."
harvest_message_med = "You slice off a few conks from the larger mushrooms."
harvest_message_high = "You slice off a number of caps and conks from these mushrooms."
regrowth_time_low = 3000
regrowth_time_high = 5400
/obj/structure/flora/ash/stem_shroom
icon_state = "t_mushroom"
name = "numerous mushrooms"
desc = "A large number of mushrooms, some of which have long, fleshy stems. They're radiating light!"
luminosity = 1
harvested_name = "tiny mushrooms"
harvested_desc = "A few tiny mushrooms around larger stumps. You can already see them growing back."
harvest = /obj/item/weapon/reagent_containers/food/snacks/ash_flora/mushroom_stem
harvest_amount_high = 4
harvest_time = 40
harvest_message_low = "You pick and slice the cap off of a mushroom, leaving the stem."
harvest_message_med = "You pick and decapitate several mushrooms for their stems."
harvest_message_high = "You acquire a number of stems from these mushrooms."
regrowth_time_low = 3000
regrowth_time_high = 6000
/obj/structure/flora/ash/cacti
icon_state = "cactus"
name = "fruiting cacti"
desc = "Several prickly cacti, brimming with ripe fruit and covered in a thin layer of ash."
harvested_name = "cacti"
harvested_desc = "A bunch of prickly cacti. You can see fruits slowly growing beneath the covering of ash."
harvest = /obj/item/weapon/reagent_containers/food/snacks/ash_flora/cactus_fruit
needs_sharp_harvest = FALSE
harvest_amount_high = 2
harvest_time = 10
harvest_message_low = "You pick a cactus fruit."
harvest_message_med = "You pick several cactus fruit." //shouldn't show up, because you can't get more than two
harvest_message_high = "You pick a pair of cactus fruit."
regrowth_time_low = 4800
regrowth_time_high = 7200
/obj/structure/flora/ash/cacti/Crossed(mob/AM)
if(ishuman(AM) && has_gravity(loc) && prob(70))
var/mob/living/carbon/human/H = AM
if(!H.shoes && !H.lying) //ouch, my feet.
var/picked_def_zone = pick("l_leg", "r_leg")
var/obj/item/bodypart/O = H.get_bodypart(picked_def_zone)
if(!istype(O) || (PIERCEIMMUNE in H.dna.species.species_traits))
return
H.apply_damage(rand(3, 6), BRUTE, picked_def_zone)
H.Weaken(2)
H.visible_message("<span class='danger'>[H] steps on a cactus!</span>", \
"<span class='userdanger'>You step on a cactus!</span>")
/obj/item/weapon/reagent_containers/food/snacks/ash_flora
name = "mushroom shavings"
desc = "Some shavings from a tall mushroom. With enough, might serve as a bowl."
icon = 'icons/obj/lavaland/ash_flora.dmi'
icon_state = "mushroom_shavings"
list_reagents = list("sugar" = 3, "ethanol" = 2, "stabilizing_agent" = 3, "minttoxin" = 2)
w_class = WEIGHT_CLASS_TINY
resistance_flags = FLAMMABLE
obj_integrity = 100
max_integrity = 100
/obj/item/weapon/reagent_containers/food/snacks/ash_flora/New()
..()
pixel_x = rand(-4, 4)
pixel_y = rand(-4, 4)
/obj/item/weapon/reagent_containers/food/snacks/ash_flora/shavings //for actual crafting
/obj/item/weapon/reagent_containers/food/snacks/ash_flora/mushroom_leaf
name = "mushroom leaf"
desc = "A leaf, from a mushroom."
list_reagents = list("nutriment" = 3, "vitfro" = 2, "nicotine" = 2)
icon_state = "mushroom_leaf"
/obj/item/weapon/reagent_containers/food/snacks/ash_flora/mushroom_cap
name = "mushroom cap"
desc = "The cap of a large mushroom."
list_reagents = list("mindbreaker" = 2, "entpoly" = 4, "mushroomhallucinogen" = 2)
icon_state = "mushroom_cap"
/obj/item/weapon/reagent_containers/food/snacks/ash_flora/mushroom_stem
name = "mushroom stem"
desc = "A long mushroom stem. It's slightly glowing."
list_reagents = list("tinlux" = 2, "vitamin" = 1, "space_drugs" = 1)
icon_state = "mushroom_stem"
luminosity = 1
/obj/item/weapon/reagent_containers/food/snacks/ash_flora/cactus_fruit
name = "cactus fruit"
list_reagents = list("vitamin" = 2, "nutriment" = 2, "vitfro" = 4)
desc = "A cactus fruit covered in a thick, reddish skin. And some ash."
icon_state = "cactus_fruit"
/obj/item/mushroom_bowl
name = "mushroom bowl"
desc = "A bowl made out of mushrooms. Not food, though it might have contained some at some point."
icon = 'icons/obj/lavaland/ash_flora.dmi'
icon_state = "mushroom_bowl"
w_class = WEIGHT_CLASS_SMALL
resistance_flags = FLAMMABLE
obj_integrity = 200
max_integrity = 200
//what you can craft with these things
/datum/crafting_recipe/mushroom_bowl
name = "Mushroom Bowl"
result = /obj/item/weapon/reagent_containers/food/drinks/mushroom_bowl
reqs = list(/obj/item/weapon/reagent_containers/food/snacks/ash_flora/shavings = 5)
time = 30
category = CAT_PRIMAL
+280 -58
View File
@@ -4,7 +4,7 @@
name = "necropolis chest"
desc = "It's watching you closely."
icon_state = "necrocrate"
burn_state = LAVA_PROOF
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
/obj/structure/closet/crate/necropolis/tendril
desc = "It's watching you suspiciously."
@@ -48,7 +48,7 @@
if(16)
new /obj/item/weapon/guardiancreator(src)
if(17)
new /obj/item/stack/sheet/runed_metal/fifty(src)
new /obj/item/borg/upgrade/modkit/aoe/turfs/andmobs(src)
if(18)
new /obj/item/device/warp_cube/red(src)
if(19)
@@ -83,24 +83,21 @@
user << "<span class='warning'>The wisp has gone missing!</span>"
return
if(wisp.loc == src)
user << "<span class='notice'>You release the wisp. It begins to \
bob around your head.</span>"
user << "<span class='notice'>You release the wisp. It begins to bob around your head.</span>"
user.sight |= SEE_MOBS
icon_state = "lantern"
wisp.orbit(user, 20)
feedback_add_details("wisp_lantern","F") // freed
else
user << "<span class='notice'>You return the wisp to the lantern.\
</span>"
user << "<span class='notice'>You return the wisp to the lantern.</span>"
if(wisp.orbiting)
var/atom/A = wisp.orbiting
if(istype(A, /mob/living))
var/atom/A = wisp.orbiting.orbiting
if(isliving(A))
var/mob/living/M = A
M.sight &= ~SEE_MOBS
M << "<span class='notice'>Your vision returns to \
normal.</span>"
M << "<span class='notice'>Your vision returns to normal.</span>"
wisp.stop_orbit()
wisp.loc = src
@@ -116,8 +113,7 @@
if(wisp.loc == src)
qdel(wisp)
else
wisp.visible_message("<span class='notice'>[wisp] has a sad \
feeling for a moment, then it passes.</span>")
wisp.visible_message("<span class='notice'>[wisp] has a sad feeling for a moment, then it passes.</span>")
..()
//Wisp Lantern
@@ -193,19 +189,23 @@
weaken = 3
var/chain
/obj/item/ammo_casing/magic/hook/ready_proj(atom/target, mob/living/user, quiet, zone_override = "")
/obj/item/projectile/hook/fire(setAngle)
if(firer)
chain = firer.Beam(src, icon_state = "chain", time = INFINITY, maxdistance = INFINITY)
..()
var/obj/item/projectile/hook/P = BB
spawn(1)
P.chain = P.Beam(user,icon_state="chain",icon = 'icons/obj/lavaland/artefacts.dmi',time=1000, maxdistance = 30)
/obj/item/projectile/hook/on_hit(atom/target)
. = ..()
if(isliving(target))
var/mob/living/L = target
L.visible_message("<span class='danger'>[L] is snagged by [firer]'s hook!</span>")
L.forceMove(get_turf(firer))
qdel(chain)
if(!L.anchored)
L.visible_message("<span class='danger'>[L] is snagged by [firer]'s hook!</span>")
L.forceMove(get_turf(firer))
/obj/item/projectile/hook/Destroy()
qdel(chain)
return ..()
//Immortality Talisman
/obj/item/device/immortality_talisman
@@ -213,8 +213,12 @@
desc = "A dread talisman that can render you completely invulnerable."
icon = 'icons/obj/lavaland/artefacts.dmi'
icon_state = "talisman"
actions_types = list(/datum/action/item_action/immortality)
var/cooldown = 0
/datum/action/item_action/immortality
name = "Immortality"
/obj/item/device/immortality_talisman/Destroy(force)
if(force)
. = ..()
@@ -225,7 +229,7 @@
if(cooldown < world.time)
feedback_add_details("immortality_talisman","U") // usage
cooldown = world.time + 600
user.visible_message("<span class='danger'>[user] vanishes from reality, leaving a a hole in their place!</span>")
user.visible_message("<span class='danger'>[user] vanishes from reality, leaving a a hole in [user.p_their()] place!</span>")
var/obj/effect/immortality_talisman/Z = new(get_turf(src.loc))
Z.name = "hole in reality"
Z.desc = "It's shaped an awful lot like [user.name]."
@@ -244,7 +248,6 @@
/obj/effect/immortality_talisman
icon_state = "blank"
icon = 'icons/effects/effects.dmi'
burn_state = LAVA_PROOF
var/can_destroy = FALSE
/obj/effect/immortality_talisman/attackby()
@@ -271,7 +274,7 @@
name = "paradox bag"
desc = "Somehow, it's in two places at once."
max_combined_w_class = 60
max_w_class = 3
max_w_class = WEIGHT_CLASS_NORMAL
//External
@@ -334,11 +337,7 @@
var/obj/screen/inventory/hand/H = over_object
if(!M.unEquip(src))
return
switch(H.slot_id)
if(slot_r_hand)
M.put_in_r_hand(src)
if(slot_l_hand)
M.put_in_l_hand(src)
M.put_in_hand(src, H.held_index)
add_fingerprint(usr)
@@ -351,7 +350,7 @@
icon_state = "goliath_boat"
icon = 'icons/obj/lavaland/dragonboat.dmi'
keytype = /obj/item/weapon/oar
burn_state = LAVA_PROOF
resistance_flags = LAVA_PROOF | FIRE_PROOF
/obj/vehicle/lavaboat/relaymove(mob/user, direction)
var/turf/next = get_step(src, direction)
@@ -370,8 +369,8 @@
item_state = "rods"
desc = "Not to be confused with the kind Research hassles you for."
force = 12
w_class = 3
burn_state = LAVA_PROOF
w_class = WEIGHT_CLASS_NORMAL
resistance_flags = LAVA_PROOF | FIRE_PROOF
/datum/crafting_recipe/oar
name = "goliath bone oar"
@@ -470,7 +469,7 @@
if(2)
new /obj/item/weapon/lava_staff(src)
if(3)
new /obj/item/weapon/spellbook/oneuse/fireball(src)
new /obj/item/weapon/spellbook/oneuse/sacredflame(src)
new /obj/item/weapon/gun/magic/wand/fireball(src)
if(4)
new /obj/item/weapon/dragons_blood(src)
@@ -482,7 +481,7 @@
item_state = "spectral"
flags = CONDUCT
sharpness = IS_SHARP
w_class = 4
w_class = WEIGHT_CLASS_BULKY
force = 1
throwforce = 1
hitsound = 'sound/effects/ghost2.ogg'
@@ -510,7 +509,7 @@
return
user << "You call out for aid, attempting to summon spirits to your side."
notify_ghosts("[user] is raising their [src], calling for your help!",
notify_ghosts("[user] is raising [user.p_their()] [src], calling for your help!",
enter_link="<a href=?src=\ref[src];orbit=1>(Click to help)</a>",
source = user, action=NOTIFY_ORBIT)
@@ -530,8 +529,16 @@
var/turf/T = get_turf(src)
var/list/contents = T.GetAllContents()
var/mob/dead/observer/current_spirits = list()
for(var/mob/dead/observer/G in dead_mob_list)
if(G.orbiting in contents)
var/list/orbiters = list()
for(var/thing in contents)
var/atom/A = thing
if (A.orbiters)
orbiters += A.orbiters
for(var/thing in orbiters)
var/datum/orbit/O = thing
if (isobserver(O.orbiter))
var/mob/dead/observer/G = O.orbiter
ghost_counter++
G.invisibility = 0
current_spirits |= G
@@ -574,14 +581,18 @@
switch(random)
if(1)
user << "<span class='danger'>Other than tasting terrible, nothing really happens.</span>"
user << "<span class='danger'>Your appearence morphs to that of a very small humanoid ash dragon! You get to look like a freak without the cool abilities.</span>"
H.dna.features = list("mcolor" = "A02720", "tail_lizard" = "Dark Tiger", "tail_human" = "None", "snout" = "Sharp", "horns" = "Curled", "ears" = "None", "wings" = "None", "frills" = "None", "spines" = "Long", "body_markings" = "Dark Tiger Body", "legs" = "Digitigrade Legs")
H.eye_color = "fee5a3"
H.set_species(/datum/species/lizard)
if(2)
user << "<span class='danger'>Your flesh begins to melt! Miraculously, you seem fine otherwise.</span>"
H.set_species(/datum/species/skeleton)
if(3)
user << "<span class='danger'>You don't feel so good...</span>"
message_admins("[key_name_admin(user)](<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) has started transforming into a dragon via dragon's blood.")
H.ForceContractDisease(new /datum/disease/transformation/dragon(0))
user << "<span class='danger'>Power courses through you! You can now shift your form at will."
if(user.mind)
var/obj/effect/proc_holder/spell/targeted/shapeshift/dragon/D = new
user.mind.AddSpell(D)
if(4)
user << "<span class='danger'>You feel like you could walk straight through lava now.</span>"
H.weather_immunities |= "lava"
@@ -615,14 +626,18 @@
item_state = "staffofstorms"
icon = 'icons/obj/guns/magic.dmi'
slot_flags = SLOT_BACK
item_state = "staffofstorms"
w_class = 4
w_class = WEIGHT_CLASS_BULKY
force = 25
damtype = BURN
burn_state = LAVA_PROOF
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
hitsound = 'sound/weapons/sear.ogg'
var/turf_type = /turf/open/floor/plating/lava/smooth
var/cooldown = 200
var/transform_string = "lava"
var/reset_turf_type = /turf/open/floor/plating/asteroid/basalt
var/reset_string = "basalt"
var/create_cooldown = 100
var/create_delay = 30
var/reset_cooldown = 50
var/timer = 0
var/banned_turfs
@@ -639,15 +654,36 @@
return
if(target in view(user.client.view, get_turf(user)))
var/turf/T = get_turf(target)
message_admins("[key_name_admin(user)] fired the lava staff at (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>[get_area(target)] ([T.x], [T.y], [T.z])</a>).")
log_game("[key_name(user)] fired the lava staff at [get_area(target)] ([T.x], [T.y], [T.z]).")
var/turf/open/O = target
user.visible_message("<span class='danger'>[user] turns \the [O] into lava!</span>")
O.ChangeTurf(turf_type)
playsound(get_turf(src),'sound/magic/Fireball.ogg', 200, 1)
timer = world.time + cooldown
var/turf/open/T = get_turf(target)
if(!istype(T))
return
if(!istype(T, turf_type))
var/obj/effect/overlay/temp/lavastaff/L = PoolOrNew(/obj/effect/overlay/temp/lavastaff, T)
L.alpha = 0
animate(L, alpha = 255, time = create_delay)
user.visible_message("<span class='danger'>[user] points [src] at [T]!</span>")
timer = world.time + create_delay + 1
if(do_after(user, create_delay, target = T))
user.visible_message("<span class='danger'>[user] turns \the [T] into [transform_string]!</span>")
message_admins("[key_name_admin(user)] fired the lava staff at [get_area(target)]. [ADMIN_COORDJMP(T)]")
log_game("[key_name(user)] fired the lava staff at [get_area(target)] [COORD(T)].")
T.ChangeTurf(turf_type)
timer = world.time + create_cooldown
qdel(L)
else
timer = world.time
qdel(L)
return
else
user.visible_message("<span class='danger'>[user] turns \the [T] into [reset_string]!</span>")
T.ChangeTurf(reset_turf_type)
timer = world.time + reset_cooldown
playsound(T,'sound/magic/Fireball.ogg', 200, 1)
/obj/effect/overlay/temp/lavastaff
icon_state = "lavastaff_warn"
duration = 50
///Bubblegum
@@ -674,11 +710,11 @@
var/loot = rand(1,3)
switch(loot)
if(1)
new /obj/item/weapon/antag_spawner/slaughter_demon(src)
if(2)
new /obj/item/mayhem(src)
if(3)
if(2)
new /obj/item/blood_contract(src)
if(3)
new /obj/item/weapon/gun/magic/staff/spellblade(src)
/obj/item/blood_contract
name = "blood contract"
@@ -692,7 +728,7 @@
if(used)
return
used = TRUE
var/choice = input(user,"Who do you want dead?","Pick Reinforcement") as null|anything in player_list
var/choice = input(user,"Who do you want dead?","Choose Your Victim") as null|anything in player_list
if(!(isliving(choice)))
user << "[choice] is already dead!"
@@ -708,7 +744,7 @@
survive.owner = L.mind
L.mind.objectives += survive
L << "<span class='userdanger'>You've been marked for death! Don't let the demons get you!</span>"
L.color = "#FF0000"
L.add_atom_colour("#FF0000", ADMIN_COLOUR_PRIORITY)
spawn()
var/obj/effect/mine/pickup/bloodbath/B = new(L)
B.mineEffect(L)
@@ -716,7 +752,193 @@
for(var/mob/living/carbon/human/H in player_list)
if(H == L)
continue
H << "<span class='userdanger'>You have an overwhelming desire to kill [L]. They have been marked red! Go kill them!</span>"
H.equip_to_slot_or_del(new /obj/item/weapon/kitchen/knife/butcher(H), slot_l_hand)
H << "<span class='userdanger'>You have an overwhelming desire to kill [L]. [L.p_they(TRUE)] [L.p_have()] been marked red! Go kill [L.p_them()]!</span>"
H.put_in_hands_or_del(new /obj/item/weapon/kitchen/knife/butcher(H))
qdel(src)
//Hierophant
/obj/item/weapon/hierophant_staff
name = "Hierophant's staff"
desc = "A large club with intense magic power infused into it."
icon_state = "hierophant_staff"
item_state = "hierophant_staff"
icon = 'icons/obj/guns/magic.dmi'
slot_flags = SLOT_BACK
w_class = WEIGHT_CLASS_BULKY
force = 20
hitsound = "swing_hit"
//hitsound = 'sound/weapons/sonic_jackhammer.ogg'
actions_types = list(/datum/action/item_action/vortex_recall, /datum/action/item_action/toggle_unfriendly_fire)
var/cooldown_time = 20 //how long the cooldown between non-melee ranged attacks is
var/chaser_cooldown = 101 //how long the cooldown between firing chasers at mobs is
var/chaser_timer = 0 //what our current chaser cooldown is
var/timer = 0 //what our current cooldown is
var/blast_range = 3 //how long the cardinal blast's walls are
var/obj/effect/hierophant/rune //the associated rune we teleport to
var/teleporting = FALSE //if we ARE teleporting
var/friendly_fire_check = FALSE //if the blasts we make will consider our faction against the faction of hit targets
/obj/item/weapon/hierophant_staff/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
..()
var/turf/T = get_turf(target)
if(!T || timer > world.time)
return
timer = world.time + CLICK_CD_MELEE //by default, melee attacks only cause melee blasts, and have an accordingly short cooldown
if(proximity_flag)
addtimer(src, "aoe_burst", 0, TIMER_NORMAL, T, user)
add_logs(user, target, "fired 3x3 blast at", src)
else
if(ismineralturf(target) && get_dist(user, target) < 6) //target is minerals, we can hit it(even if we can't see it)
addtimer(src, "cardinal_blasts", 0, TIMER_NORMAL, T, user)
timer = world.time + cooldown_time
else if(target in view(5, get_turf(user))) //if the target is in view, hit it
timer = world.time + cooldown_time
if(isliving(target) && chaser_timer <= world.time) //living and chasers off cooldown? fire one!
chaser_timer = world.time + chaser_cooldown
PoolOrNew(/obj/effect/overlay/temp/hierophant/chaser, list(get_turf(user), user, target, 1.5, friendly_fire_check))
add_logs(user, target, "fired a chaser at", src)
else
addtimer(src, "cardinal_blasts", 0, TIMER_NORMAL, T, user) //otherwise, just do cardinal blast
add_logs(user, target, "fired cardinal blast at", src)
else
user << "<span class='warning'>That target is out of range!</span>" //too far away
/obj/item/weapon/hierophant_staff/ui_action_click(mob/user, action)
if(istype(action, /datum/action/item_action/toggle_unfriendly_fire)) //toggle friendly fire...
friendly_fire_check = !friendly_fire_check
user << "<span class='warning'>You toggle friendly fire [friendly_fire_check ? "off":"on"]!</span>"
return
if(!user.is_holding(src)) //you need to hold the staff to teleport
user << "<span class='warning'>You need to hold the staff in your hands to [rune ? "teleport with it":"create a rune"]!</span>"
return
if(!rune)
if(isturf(user.loc))
user.visible_message("<span class='hierophant_warning'>[user] holds [src] carefully in front of [user.p_them()], moving it in a strange pattern...</span>", \
"<span class='notice'>You start creating a hierophant rune to teleport to...</span>")
timer = world.time + 51
if(do_after(user, 50, target = user))
var/turf/T = get_turf(user)
playsound(T,'sound/magic/Blind.ogg', 200, 1, -4)
PoolOrNew(/obj/effect/overlay/temp/hierophant/telegraph/teleport, list(T, user))
var/obj/effect/hierophant/H = new/obj/effect/hierophant(T)
rune = H
user.update_action_buttons_icon()
user.visible_message("<span class='hierophant_warning'>[user] creates a strange rune beneath [user.p_them()]!</span>", \
"<span class='hierophant'>You create a hierophant rune, which you can teleport yourself and any allies to at any time!</span>\n\
<span class='notice'>You can remove the rune to place a new one by striking it with the staff.</span>")
else
timer = world.time
else
user << "<span class='warning'>You need to be on solid ground to produce a rune!</span>"
return
if(get_dist(user, rune) <= 2) //rune too close abort
user << "<span class='warning'>You are too close to the rune to teleport to it!</span>"
return
if(is_blocked_turf(get_turf(rune)))
user << "<span class='warning'>The rune is blocked by something, preventing teleportation!</span>"
return
teleporting = TRUE //start channel
user.update_action_buttons_icon()
user.visible_message("<span class='hierophant_warning'>[user] starts to glow faintly...</span>")
timer = world.time + 50
if(do_after(user, 40, target = user) && rune)
var/turf/T = get_turf(rune)
var/turf/source = get_turf(user)
if(is_blocked_turf(T))
teleporting = FALSE
user << "<span class='warning'>The rune is blocked by something, preventing teleportation!</span>"
user.update_action_buttons_icon()
return
PoolOrNew(/obj/effect/overlay/temp/hierophant/telegraph, list(T, user))
PoolOrNew(/obj/effect/overlay/temp/hierophant/telegraph, list(source, user))
playsound(T,'sound/magic/blink.ogg', 200, 1)
//playsound(T,'sound/magic/Wand_Teleport.ogg', 200, 1)
playsound(source,'sound/magic/blink.ogg', 200, 1)
//playsound(source,'sound/machines/AirlockOpen.ogg', 200, 1)
if(!do_after(user, 3, target = user) || !rune) //no walking away shitlord
teleporting = FALSE
if(user)
user.update_action_buttons_icon()
return
if(is_blocked_turf(T))
teleporting = FALSE
user << "<span class='warning'>The rune is blocked by something, preventing teleportation!</span>"
user.update_action_buttons_icon()
return
add_logs(user, rune, "teleported self from ([source.x],[source.y],[source.z]) to")
PoolOrNew(/obj/effect/overlay/temp/hierophant/telegraph/teleport, list(T, user))
PoolOrNew(/obj/effect/overlay/temp/hierophant/telegraph/teleport, list(source, user))
for(var/t in RANGE_TURFS(1, T))
var/obj/effect/overlay/temp/hierophant/blast/B = PoolOrNew(/obj/effect/overlay/temp/hierophant/blast, list(t, user, TRUE)) //blasts produced will not hurt allies
B.damage = 30
for(var/t in RANGE_TURFS(1, source))
var/obj/effect/overlay/temp/hierophant/blast/B = PoolOrNew(/obj/effect/overlay/temp/hierophant/blast, list(t, user, TRUE)) //but absolutely will hurt enemies
B.damage = 30
for(var/mob/living/L in range(1, source))
addtimer(src, "teleport_mob", 0, TIMER_NORMAL, source, L, T, user) //regardless, take all mobs near us along
sleep(6) //at this point the blasts detonate
else
timer = world.time
teleporting = FALSE
if(user)
user.update_action_buttons_icon()
/obj/item/weapon/hierophant_staff/proc/teleport_mob(turf/source, mob/M, turf/target, mob/user)
var/turf/turf_to_teleport_to = get_step(target, get_dir(source, M)) //get position relative to caster
if(!turf_to_teleport_to || is_blocked_turf(turf_to_teleport_to))
return
animate(M, alpha = 0, time = 2, easing = EASE_OUT) //fade out
sleep(1)
if(!M)
return
M.visible_message("<span class='hierophant_warning'>[M] fades out!</span>")
sleep(2)
if(!M)
return
M.forceMove(turf_to_teleport_to)
sleep(1)
if(!M)
return
animate(M, alpha = 255, time = 2, easing = EASE_IN) //fade IN
sleep(1)
if(!M)
return
M.visible_message("<span class='hierophant_warning'>[M] fades in!</span>")
if(user != M)
add_logs(user, M, "teleported", null, "from ([source.x],[source.y],[source.z])")
/obj/item/weapon/hierophant_staff/proc/cardinal_blasts(turf/T, mob/living/user) //fire cardinal cross blasts with a delay
if(!T)
return
PoolOrNew(/obj/effect/overlay/temp/hierophant/telegraph/cardinal, list(T, user))
playsound(T,'sound/magic/blink.ogg', 200, 1)
//playsound(T,'sound/effects/bin_close.ogg', 200, 1)
sleep(2)
PoolOrNew(/obj/effect/overlay/temp/hierophant/blast, list(T, user, friendly_fire_check))
for(var/d in cardinal)
addtimer(src, "blast_wall", 0, TIMER_NORMAL, T, d, user)
/obj/item/weapon/hierophant_staff/proc/blast_wall(turf/T, dir, mob/living/user) //make a wall of blasts blast_range tiles long
if(!T)
return
var/range = blast_range
var/turf/previousturf = T
var/turf/J = get_step(previousturf, dir)
for(var/i in 1 to range)
if(!J)
return
PoolOrNew(/obj/effect/overlay/temp/hierophant/blast, list(J, user, friendly_fire_check))
previousturf = J
J = get_step(previousturf, dir)
/obj/item/weapon/hierophant_staff/proc/aoe_burst(turf/T, mob/living/user) //make a 3x3 blast around a target
if(!T)
return
PoolOrNew(/obj/effect/overlay/temp/hierophant/telegraph, list(T, user))
playsound(T,'sound/magic/blink.ogg', 200, 1)
//playsound(T,'sound/effects/bin_close.ogg', 200, 1)
sleep(2)
for(var/t in RANGE_TURFS(1, T))
PoolOrNew(/obj/effect/overlay/temp/hierophant/blast, list(t, user, friendly_fire_check))
+2 -2
View File
@@ -22,7 +22,7 @@
/obj/structure/stacklifter/attack_hand(mob/user as mob)
if(in_use)
user << "Its already in use - wait a bit."
user << "It's already in use - wait a bit."
return
else
in_use = 1
@@ -60,7 +60,7 @@
/obj/structure/weightlifter/attack_hand(mob/user as mob)
if(in_use)
user << "Its already in use - wait a bit."
user << "It's already in use - wait a bit."
return
else
in_use = 1