April sync (#360)
* Maps and things no code/icons * helpers defines globalvars * Onclick world.dm orphaned_procs * subsystems Round vote and shuttle autocall done here too * datums * Game folder * Admin - chatter modules * clothing - mining * modular computers - zambies * client * mob level 1 * mob stage 2 + simple_animal * silicons n brains * mob stage 3 + Alien/Monkey * human mobs * icons updated * some sounds * emitter y u no commit * update tgstation.dme * compile fixes * travis fixes Also removes Fast digest mode, because reasons. * tweaks for travis Mentors are broke again Also fixes Sizeray guns * oxygen loss fix for vore code. * removes unused code * some code updates * bulk fixes * further fixes * outside things * whoops. * Maint bar ported * GLOBs.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
var/mob/living/ranged_ability_user
|
||||
var/ranged_clickcd_override = -1
|
||||
|
||||
var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin verb for now
|
||||
GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for the badmin verb for now
|
||||
|
||||
/obj/effect/proc_holder/Destroy()
|
||||
if(ranged_ability_user)
|
||||
@@ -133,7 +133,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
|
||||
return 0
|
||||
|
||||
var/turf/T = get_turf(user)
|
||||
if(T.z == ZLEVEL_CENTCOM && (!centcom_cancast || ticker.mode.name == "ragin' mages")) //Certain spells are not allowed on the centcom zlevel
|
||||
if(T.z == ZLEVEL_CENTCOM && (!centcom_cancast || SSticker.mode.name == "ragin' mages")) //Certain spells are not allowed on the centcom zlevel
|
||||
to_chat(user, "<span class='notice'>You can't cast this spell here.</span>")
|
||||
return 0
|
||||
|
||||
@@ -329,6 +329,8 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
|
||||
adjust_var(user, holder_var_type, -holder_var_amount)
|
||||
|
||||
/obj/effect/proc_holder/spell/proc/adjust_var(mob/living/target = usr, type, amount) //handles the adjustment of the var when the spell is used. has some hardcoded types
|
||||
if (!istype(target))
|
||||
return
|
||||
switch(type)
|
||||
if("bruteloss")
|
||||
target.adjustBruteLoss(amount)
|
||||
|
||||
@@ -24,12 +24,12 @@
|
||||
var/A = null
|
||||
|
||||
if(!randomise_selection)
|
||||
A = input("Area to teleport to", "Teleport", A) as null|anything in teleportlocs
|
||||
A = input("Area to teleport to", "Teleport", A) as null|anything in GLOB.teleportlocs
|
||||
else
|
||||
A = pick(teleportlocs)
|
||||
A = pick(GLOB.teleportlocs)
|
||||
if(!A)
|
||||
return
|
||||
var/area/thearea = teleportlocs[A]
|
||||
var/area/thearea = GLOB.teleportlocs[A]
|
||||
|
||||
return thearea
|
||||
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
for(var/mob/living/carbon/human/H in targets)
|
||||
if(!H.mind)
|
||||
continue
|
||||
for(var/datum/objective/sintouched/A in H.mind.objectives)
|
||||
if(locate(/datum/objective/sintouched) in H.mind.objectives)
|
||||
continue
|
||||
H.influenceSin()
|
||||
H.Weaken(2)
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
qdel(holder)
|
||||
if(!QDELETED(target))
|
||||
if(mobloc.density)
|
||||
for(var/direction in alldirs)
|
||||
for(var/direction in GLOB.alldirs)
|
||||
var/turf/T = get_step(mobloc, direction)
|
||||
if(T)
|
||||
if(target.Move(T))
|
||||
|
||||
@@ -17,124 +17,139 @@
|
||||
cooldown_min = 10
|
||||
include_user = 1
|
||||
|
||||
var/obj/marked_item
|
||||
var/mob/living/current_body
|
||||
var/resurrections = 0
|
||||
var/existence_stops_round_end = 0
|
||||
|
||||
action_icon_state = "skeleton"
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/lichdom/New()
|
||||
if(initial(ticker.mode.round_ends_with_antag_death))
|
||||
existence_stops_round_end = 1
|
||||
ticker.mode.round_ends_with_antag_death = 0
|
||||
..()
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/lichdom/Destroy()
|
||||
for(var/datum/mind/M in ticker.mode.wizards) //Make sure no other bones are about
|
||||
for(var/obj/effect/proc_holder/spell/S in M.spell_list)
|
||||
if(istype(S,/obj/effect/proc_holder/spell/targeted/lichdom) && S != src)
|
||||
return ..()
|
||||
if(existence_stops_round_end)
|
||||
ticker.mode.round_ends_with_antag_death = 1
|
||||
..()
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/lichdom/cast(list/targets,mob/user = usr)
|
||||
for(var/mob/M in targets)
|
||||
var/list/hand_items = list()
|
||||
if(iscarbon(M))
|
||||
hand_items = list(M.get_active_held_item(),M.get_inactive_held_item())
|
||||
|
||||
if(marked_item && !stat_allowed) //sanity, shouldn't happen without badminry
|
||||
marked_item = null
|
||||
if(!hand_items.len)
|
||||
to_chat(M, "<span class='caution'>You must hold an item you wish to make your phylactery...</span>")
|
||||
return
|
||||
|
||||
if(stat_allowed) //Death is not my end!
|
||||
if(M.stat == CONSCIOUS && iscarbon(M))
|
||||
to_chat(M, "<span class='notice'>You aren't dead enough to revive!</span>" )
|
||||
charge_counter = charge_max
|
||||
return
|
||||
var/obj/item/marked_item
|
||||
|
||||
if(!marked_item || QDELETED(marked_item)) //Wait nevermind
|
||||
to_chat(M, "<span class='warning'>Your phylactery is gone!</span>")
|
||||
return
|
||||
for(var/obj/item in hand_items)
|
||||
// I ensouled the nuke disk once. But it's probably a really
|
||||
// mean tactic, so probably should discourage it.
|
||||
if(ABSTRACT in item.flags || NODROP in item.flags || HAS_SECONDARY_FLAG(item, STATIONLOVING))
|
||||
continue
|
||||
marked_item = item
|
||||
to_chat(M, "<span class='warning'>You begin to focus your very being into [item]...</span>")
|
||||
break
|
||||
|
||||
var/turf/user_turf = get_turf(M)
|
||||
var/turf/item_turf = get_turf(marked_item)
|
||||
if(!marked_item)
|
||||
to_chat(M, "<span class='warning'>None of the items you hold are suitable for emplacement of your fragile soul.</span>")
|
||||
return
|
||||
|
||||
if(user_turf.z != item_turf.z)
|
||||
to_chat(M, "<span class='warning'>Your phylactery is out of range!</span>")
|
||||
return
|
||||
playsound(user, 'sound/effects/pope_entry.ogg', 100)
|
||||
|
||||
if(isobserver(M))
|
||||
var/mob/dead/observer/O = M
|
||||
O.reenter_corpse()
|
||||
if(!do_after(M, 50, needhand=FALSE, target=marked_item))
|
||||
to_chat(M, "<span class='warning'>Your soul snaps back to your body as you stop ensouling [marked_item]!</span>")
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/lich = new /mob/living/carbon/human(item_turf)
|
||||
marked_item.name = "ensouled [marked_item.name]"
|
||||
marked_item.desc += "\nA terrible aura surrounds this item, its very existence is offensive to life itself..."
|
||||
marked_item.add_atom_colour("#003300", ADMIN_COLOUR_PRIORITY)
|
||||
|
||||
lich.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal/magic(lich), slot_shoes)
|
||||
lich.equip_to_slot_or_del(new /obj/item/clothing/under/color/black(lich), slot_w_uniform)
|
||||
lich.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/black(lich), slot_wear_suit)
|
||||
lich.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/black(lich), slot_head)
|
||||
new /obj/item/phylactery(marked_item, M.mind)
|
||||
|
||||
lich.real_name = M.mind.name
|
||||
M.mind.transfer_to(lich)
|
||||
lich.hardset_dna(null,null,lich.real_name,null,/datum/species/skeleton)
|
||||
to_chat(lich, "<span class='warning'>Your bones clatter and shutter as you are pulled back into this world!</span>")
|
||||
charge_max += 600
|
||||
var/mob/old_body = current_body
|
||||
var/turf/body_turf = get_turf(old_body)
|
||||
current_body = lich
|
||||
lich.Weaken(10+10*resurrections)
|
||||
++resurrections
|
||||
if(old_body && old_body.loc)
|
||||
if(iscarbon(old_body))
|
||||
var/mob/living/carbon/C = old_body
|
||||
for(var/obj/item/W in C)
|
||||
C.dropItemToGround(W)
|
||||
for(var/X in C.internal_organs)
|
||||
var/obj/item/organ/I = X
|
||||
I.Remove(C)
|
||||
I.forceMove(body_turf)
|
||||
var/wheres_wizdo = dir2text(get_dir(body_turf, item_turf))
|
||||
if(wheres_wizdo)
|
||||
old_body.visible_message("<span class='warning'>Suddenly [old_body.name]'s corpse falls to pieces! You see a strange energy rise from the remains, and speed off towards the [wheres_wizdo]!</span>")
|
||||
body_turf.Beam(item_turf,icon_state="lichbeam",time=10+10*resurrections,maxdistance=INFINITY)
|
||||
old_body.dust()
|
||||
to_chat(M, "<span class='userdanger'>With a hideous feeling of emptiness you watch in horrified fascination as skin sloughs off bone! Blood boils, nerves disintegrate, eyes boil in their sockets! As your organs crumble to dust in your fleshless chest you come to terms with your choice. You're a lich!</span>")
|
||||
M.set_species(/datum/species/skeleton)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
H.dropItemToGround(H.w_uniform)
|
||||
H.dropItemToGround(H.wear_suit)
|
||||
H.dropItemToGround(H.head)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/black(H), slot_wear_suit)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/black(H), slot_head)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/color/black(H), slot_w_uniform)
|
||||
|
||||
if(!marked_item) //linking item to the spell
|
||||
message = "<span class='warning'>"
|
||||
for(var/obj/item in hand_items)
|
||||
if(ABSTRACT in item.flags || NODROP in item.flags)
|
||||
continue
|
||||
marked_item = item
|
||||
to_chat(M, "<span class='warning'>You begin to focus your very being into the [item.name]...</span>")
|
||||
break
|
||||
// you only get one phylactery.
|
||||
M.mind.RemoveSpell(src)
|
||||
|
||||
if(!marked_item)
|
||||
to_chat(M, "<span class='caution'>You must hold an item you wish to make your phylactery...</span>")
|
||||
return
|
||||
if(!do_after(M, 50, needhand=FALSE, target=marked_item))
|
||||
to_chat(M, "<span class='warning'>Your soul snaps back to your body as you stop ensouling [marked_item.name]!</span>")
|
||||
marked_item = null
|
||||
return
|
||||
|
||||
name = "RISE!"
|
||||
desc = "Rise from the dead! You will reform at the location of your phylactery and your old body will crumble away."
|
||||
charge_max = 1800 //3 minute cooldown, if you rise in sight of someone and killed again, you're probably screwed.
|
||||
charge_counter = 1800
|
||||
stat_allowed = 1
|
||||
marked_item.name = "ensouled [marked_item.name]"
|
||||
marked_item.desc += "\nA terrible aura surrounds this item, its very existence is offensive to life itself..."
|
||||
marked_item.add_atom_colour("#003300", ADMIN_COLOUR_PRIORITY)
|
||||
poi_list |= marked_item
|
||||
/obj/item/phylactery
|
||||
name = "phylactery"
|
||||
desc = "Stores souls. Revives liches. Also repels mosquitos."
|
||||
icon = 'icons/obj/projectiles.dmi'
|
||||
icon_state = "bluespace"
|
||||
color = "#003300"
|
||||
light_color = "#003300"
|
||||
var/lon_range = 3
|
||||
var/resurrections = 0
|
||||
var/datum/mind/mind
|
||||
var/respawn_time = 1800
|
||||
|
||||
to_chat(M, "<span class='userdanger'>With a hideous feeling of emptiness you watch in horrified fascination as skin sloughs off bone! Blood boils, nerves disintegrate, eyes boil in their sockets! As your organs crumble to dust in your fleshless chest you come to terms with your choice. You're a lich!</span>")
|
||||
M.set_species(/datum/species/skeleton)
|
||||
current_body = M.mind.current
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
H.dropItemToGround(H.wear_suit)
|
||||
H.dropItemToGround(H.head)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/black(H), slot_wear_suit)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/black(H), slot_head)
|
||||
var/static/active_phylacteries = 0
|
||||
|
||||
/obj/item/phylactery/Initialize(mapload, datum/mind/newmind)
|
||||
..()
|
||||
mind = newmind
|
||||
name = "phylactery of [mind.name]"
|
||||
|
||||
active_phylacteries++
|
||||
GLOB.poi_list |= src
|
||||
START_PROCESSING(SSobj, src)
|
||||
set_light(lon_range)
|
||||
if(initial(SSticker.mode.round_ends_with_antag_death))
|
||||
SSticker.mode.round_ends_with_antag_death = FALSE
|
||||
|
||||
/obj/item/phylactery/Destroy(force=FALSE)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
active_phylacteries--
|
||||
GLOB.poi_list -= src
|
||||
if(!active_phylacteries)
|
||||
SSticker.mode.round_ends_with_antag_death = initial(SSticker.mode.round_ends_with_antag_death)
|
||||
. = ..()
|
||||
|
||||
/obj/item/phylactery/process()
|
||||
if(QDELETED(mind))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(!mind.current || (mind.current && mind.current.stat == DEAD))
|
||||
addtimer(CALLBACK(src, .proc/rise), respawn_time, TIMER_UNIQUE)
|
||||
|
||||
/obj/item/phylactery/proc/rise()
|
||||
if(mind.current && mind.current.stat != DEAD)
|
||||
return "[mind] already has a living body: [mind.current]"
|
||||
|
||||
var/turf/item_turf = get_turf(src)
|
||||
if(!item_turf)
|
||||
return "[src] is not at a turf? NULLSPACE!?"
|
||||
|
||||
var/mob/old_body = mind.current
|
||||
var/mob/living/carbon/human/lich = new(item_turf)
|
||||
|
||||
lich.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal/magic(lich), slot_shoes)
|
||||
lich.equip_to_slot_or_del(new /obj/item/clothing/under/color/black(lich), slot_w_uniform)
|
||||
lich.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/black(lich), slot_wear_suit)
|
||||
lich.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/black(lich), slot_head)
|
||||
|
||||
lich.real_name = mind.name
|
||||
mind.transfer_to(lich)
|
||||
mind.grab_ghost(force=TRUE)
|
||||
lich.hardset_dna(null,null,lich.real_name,null,/datum/species/skeleton)
|
||||
to_chat(lich, "<span class='warning'>Your bones clatter and shutter as you are pulled back into this world!</span>")
|
||||
var/turf/body_turf = get_turf(old_body)
|
||||
lich.Weaken(10+10*resurrections)
|
||||
resurrections++
|
||||
if(old_body && old_body.loc)
|
||||
if(iscarbon(old_body))
|
||||
var/mob/living/carbon/C = old_body
|
||||
for(var/obj/item/W in C)
|
||||
C.dropItemToGround(W)
|
||||
for(var/X in C.internal_organs)
|
||||
var/obj/item/organ/I = X
|
||||
I.Remove(C)
|
||||
I.forceMove(body_turf)
|
||||
var/wheres_wizdo = dir2text(get_dir(body_turf, item_turf))
|
||||
if(wheres_wizdo)
|
||||
old_body.visible_message("<span class='warning'>Suddenly [old_body.name]'s corpse falls to pieces! You see a strange energy rise from the remains, and speed off towards the [wheres_wizdo]!</span>")
|
||||
body_turf.Beam(item_turf,icon_state="lichbeam",time=10+10*resurrections,maxdistance=INFINITY)
|
||||
old_body.dust()
|
||||
|
||||
|
||||
return "Respawn of [mind] successful."
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
to_chat(user, "<B>You summoned [summon_type ? "magic" : "guns"]!</B>")
|
||||
message_admins("[key_name_admin(user, 1)] summoned [summon_type ? "magic" : "guns"]!")
|
||||
log_game("[key_name(user)] summoned [summon_type ? "magic" : "guns"]!")
|
||||
for(var/mob/living/carbon/human/H in player_list)
|
||||
for(var/mob/living/carbon/human/H in GLOB.player_list)
|
||||
if(H.stat == 2 || !(H.client)) continue
|
||||
if(H.mind)
|
||||
if(H.mind.special_role == "Wizard" || H.mind.special_role == "apprentice" || H.mind.special_role == "survivalist") continue
|
||||
if(prob(survivor_probability) && !(H.mind in ticker.mode.traitors))
|
||||
ticker.mode.traitors += H.mind
|
||||
if(prob(survivor_probability) && !(H.mind in SSticker.mode.traitors))
|
||||
SSticker.mode.traitors += H.mind
|
||||
if(!summon_type)
|
||||
var/datum/objective/steal_five_of_type/summon_guns/guns = new
|
||||
guns.owner = H.mind
|
||||
@@ -203,17 +203,17 @@
|
||||
|
||||
|
||||
/proc/summonevents()
|
||||
if(!SSevent.wizardmode)
|
||||
SSevent.frequency_lower = 600 //1 minute lower bound
|
||||
SSevent.frequency_upper = 3000 //5 minutes upper bound
|
||||
SSevent.toggleWizardmode()
|
||||
SSevent.reschedule()
|
||||
if(!SSevents.wizardmode)
|
||||
SSevents.frequency_lower = 600 //1 minute lower bound
|
||||
SSevents.frequency_upper = 3000 //5 minutes upper bound
|
||||
SSevents.toggleWizardmode()
|
||||
SSevents.reschedule()
|
||||
|
||||
else //Speed it up
|
||||
SSevent.frequency_upper -= 600 //The upper bound falls a minute each time, making the AVERAGE time between events lessen
|
||||
if(SSevent.frequency_upper < SSevent.frequency_lower) //Sanity
|
||||
SSevent.frequency_upper = SSevent.frequency_lower
|
||||
SSevents.frequency_upper -= 600 //The upper bound falls a minute each time, making the AVERAGE time between events lessen
|
||||
if(SSevents.frequency_upper < SSevents.frequency_lower) //Sanity
|
||||
SSevents.frequency_upper = SSevents.frequency_lower
|
||||
|
||||
SSevent.reschedule()
|
||||
message_admins("Summon Events intensifies, events will now occur every [SSevent.frequency_lower / 600] to [SSevent.frequency_upper / 600] minutes.")
|
||||
SSevents.reschedule()
|
||||
message_admins("Summon Events intensifies, events will now occur every [SSevents.frequency_lower / 600] to [SSevents.frequency_upper / 600] minutes.")
|
||||
log_game("Summon Events was increased!")
|
||||
|
||||
@@ -27,7 +27,10 @@
|
||||
for(var/path in possible_shapes)
|
||||
var/mob/living/simple_animal/A = path
|
||||
animal_list[initial(A.name)] = path
|
||||
shapeshift_type = input(M, "Choose Your Animal Form!", "It's Morphing Time!", null) as anything in animal_list
|
||||
var/new_shapeshift_type = input(M, "Choose Your Animal Form!", "It's Morphing Time!", null) as null|anything in animal_list
|
||||
if(shapeshift_type)
|
||||
return
|
||||
shapeshift_type = new_shapeshift_type
|
||||
if(!shapeshift_type) //If you aren't gonna decide I am!
|
||||
shapeshift_type = pick(animal_list)
|
||||
shapeshift_type = animal_list[shapeshift_type]
|
||||
@@ -80,4 +83,4 @@
|
||||
shapeshift_type = /mob/living/simple_animal/hostile/megafauna/dragon/lesser
|
||||
list/current_shapes = list(/mob/living/simple_animal/hostile/megafauna/dragon/lesser)
|
||||
list/current_casters = list()
|
||||
list/possible_shapes = list(/mob/living/simple_animal/hostile/megafauna/dragon/lesser)
|
||||
list/possible_shapes = list(/mob/living/simple_animal/hostile/megafauna/dragon/lesser)
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
turf_steps[pick_n_take(turfs)] = pick_n_take(turfs)
|
||||
if(turfs.len > 0)
|
||||
var/turf/loner = pick(turfs)
|
||||
turf_steps[loner] = pick(Z_TURFS(user.z))
|
||||
var/area/A = get_area(user)
|
||||
turf_steps[loner] = get_turf(pick(A.contents))
|
||||
|
||||
perform(turf_steps,user=user)
|
||||
|
||||
@@ -44,7 +45,10 @@
|
||||
var/obj/effect/cross_action/spacetime_dist/STD0 = new /obj/effect/cross_action/spacetime_dist(T0)
|
||||
var/obj/effect/cross_action/spacetime_dist/STD1 = new /obj/effect/cross_action/spacetime_dist(T1)
|
||||
STD0.linked_dist = STD1
|
||||
STD0.add_overlay(T1.photograph())
|
||||
STD1.linked_dist = STD0
|
||||
STD1.add_overlay(T0.photograph())
|
||||
STD1.set_light(4, 30, "#c9fff5")
|
||||
effects += STD0
|
||||
effects += STD1
|
||||
|
||||
@@ -63,16 +67,16 @@
|
||||
/obj/effect/cross_action/spacetime_dist
|
||||
name = "spacetime distortion"
|
||||
desc = "A distortion in spacetime. You can hear faint music..."
|
||||
icon_state = "wave1"
|
||||
color = "#8A2BE2"
|
||||
icon_state = ""
|
||||
var/obj/effect/cross_action/spacetime_dist/linked_dist
|
||||
var/busy = FALSE
|
||||
var/sound
|
||||
var/walks_left = 50 //prevents the game from hanging in extreme cases (such as minigun fire)
|
||||
|
||||
/obj/effect/cross_action/spacetime_dist/New()
|
||||
/obj/effect/cross_action/spacetime_dist/Initialize(mapload)
|
||||
..()
|
||||
sound = "sound/guitar/[safepick(guitar_notes)]"
|
||||
sound = "sound/guitar/[safepick(GLOB.guitar_notes)]"
|
||||
dir = pick(GLOB.cardinal)
|
||||
|
||||
/obj/effect/cross_action/spacetime_dist/proc/walk_link(atom/movable/AM)
|
||||
if(linked_dist && walks_left > 0)
|
||||
|
||||
Reference in New Issue
Block a user