Revert "new to init (the rest of them) part 1 (#17052)" (#17084)

This reverts commit d02c67d6de.
This commit is contained in:
Cameron Lennox
2025-02-07 11:09:08 -05:00
committed by GitHub
parent 43a8a1a5a6
commit 3ac6fb4edf
18 changed files with 108 additions and 386 deletions
@@ -112,8 +112,6 @@
var/kin_type
var/energy_light = 0.25
var/energy_dark = 0.75
var/phase_gentle = TRUE
var/doing_phase = FALSE
/datum/species/shadekin/New()
..()
@@ -93,7 +93,6 @@
/mob/living/carbon/human/proc/phase_in(var/turf/T)
if(ability_flags & AB_PHASE_SHIFTED)
// var/datum/species/shadekin/SK = species
// pre-change
forceMove(T)
@@ -105,77 +104,48 @@
if(pulledby)
pulledby.stop_pulling()
stop_pulling()
canmove = FALSE
// change
canmove = FALSE
ability_flags &= ~AB_PHASE_SHIFTED
ability_flags |= AB_PHASE_SHIFTING
throwpass = FALSE
mouse_opacity = 1
name = get_visible_name()
for(var/obj/belly/B as anything in vore_organs)
B.escapable = initial(B.escapable)
//cut_overlays()
invisibility = initial(invisibility)
see_invisible = initial(see_invisible)
see_invisible_default = initial(see_invisible_default)
incorporeal_move = initial(incorporeal_move)
density = initial(density)
force_max_speed = initial(force_max_speed)
can_pull_size = initial(can_pull_size)
can_pull_mobs = initial(can_pull_mobs)
hovering = initial(hovering)
update_icon()
//Cosmetics mostly
var/obj/effect/temp_visual/shadekin/phase_in/phaseanim = new /obj/effect/temp_visual/shadekin/phase_in(src.loc)
phaseanim.pixel_y = (src.size_multiplier - 1) * 16 // Pixel shift for the animation placement
phaseanim.adjust_scale(src.size_multiplier, src.size_multiplier)
phaseanim.dir = dir
alpha = 0
addtimer(CALLBACK(src,PROC_REF(custom_emote), 1, "phases in!"), 0, TIMER_DELETE_ME)
addtimer(CALLBACK(src,PROC_REF(phase_in_finish_phase),T,original_canmove),5, TIMER_DELETE_ME)
custom_emote(1,"phases in!")
sleep(5) //The duration of the TP animation
canmove = original_canmove
alpha = initial(alpha)
remove_modifiers_of_type(/datum/modifier/shadekin_phase_vision)
/mob/living/carbon/human/proc/phase_in_finish_phase(var/turf/T,var/original_canmove)
PRIVATE_PROC(TRUE)
SHOULD_NOT_OVERRIDE(TRUE)
var/datum/species/shadekin/SK = species
//Potential phase-in vore
if(can_be_drop_pred) //Toggleable in vore panel
var/list/potentials = living_mobs(0)
if(potentials.len)
var/mob/living/target = pick(potentials)
if(istype(target) && target.devourable && target.can_be_drop_prey && vore_selected)
target.forceMove(vore_selected)
to_chat(target,span_vwarning("\The [src] phases in around you, [vore_selected.vore_verb]ing you into their [vore_selected.name]!"))
canmove = original_canmove
alpha = initial(alpha)
remove_modifiers_of_type(/datum/modifier/shadekin_phase_vision)
remove_modifiers_of_type(/datum/modifier/shadekin_phase)
ability_flags &= ~AB_PHASE_SHIFTING
//Potential phase-in vore
if(can_be_drop_pred || can_be_drop_prey) //Toggleable in vore panel
var/list/potentials = living_mobs(0)
if(potentials.len)
var/mob/living/target = pick(potentials)
if(can_be_drop_pred && istype(target) && target.devourable && target.can_be_drop_prey && vore_selected)
target.forceMove(vore_selected)
to_chat(target, span_vwarning("\The [src] phases in around you, [vore_selected.vore_verb]ing you into their [vore_selected.name]!"))
to_chat(src, span_vwarning("You phase around [target], [vore_selected.vore_verb]ing them into your [vore_selected.name]!"))
else if(can_be_drop_prey && istype(target) && devourable && target.can_be_drop_pred && target.vore_selected)
forceMove(target.vore_selected)
to_chat(target, span_vwarning("\The [src] phases into you, [target.vore_selected.vore_verb]ing them into your [target.vore_selected.name]!"))
to_chat(src, span_vwarning("You phase into [target], having them [target.vore_selected.vore_verb] you into their [target.vore_selected.name]!"))
//Affect nearby lights
var/destroy_lights = 0
ability_flags &= ~AB_PHASE_SHIFTING
//Affect nearby lights
var/destroy_lights = 0
if(SK.get_shadekin_eyecolor(src) == RED_EYES)
destroy_lights = 80
else if(SK.get_shadekin_eyecolor(src) == PURPLE_EYES)
destroy_lights = 25
if(SK.phase_gentle) // gentle case: No light destruction. Flicker in 4 tile radius once.
for(var/obj/machinery/light/L in machines)
if(L.z != z || get_dist(src,L) > 4)
continue
L.flicker(1)
src.Stun(1)
else
for(var/obj/machinery/light/L in machines)
if(L.z != z || get_dist(src,L) > 10)
continue
@@ -200,53 +170,23 @@
stop_pulling()
canmove = FALSE
var/list/allowed_implants = list(
/obj/item/implant/sizecontrol,
/obj/item/implant/compliance,
)
for(var/obj/item/organ/external/organ in organs)
for(var/obj/item/O in organ.implants)
if(is_type_in_list(O, allowed_implants))
continue
if(O == nif)
nif.unimplant(src)
O.forceMove(drop_location())
organ.implants -= O
if(!has_embedded_objects())
clear_alert("embeddedobject")
// change
ability_flags |= AB_PHASE_SHIFTED
ability_flags |= AB_PHASE_SHIFTING
throwpass = TRUE
mouse_opacity = 0
custom_emote(1,"phases out!")
name = get_visible_name()
if(l_hand)
unEquip(l_hand)
if(r_hand)
unEquip(r_hand)
if(back)
unEquip(back)
can_pull_size = 0
can_pull_mobs = MOB_PULL_NONE
hovering = TRUE
for(var/obj/belly/B as anything in vore_organs)
B.escapable = FALSE
var/obj/effect/temp_visual/shadekin/phase_out/phaseanim = new /obj/effect/temp_visual/shadekin/phase_out(src.loc)
phaseanim.pixel_y = (src.size_multiplier - 1) * 16 // Pixel shift for the animation placement
phaseanim.adjust_scale(src.size_multiplier, src.size_multiplier)
phaseanim.dir = dir
alpha = 0
add_modifier(/datum/modifier/shadekin_phase_vision)
add_modifier(/datum/modifier/shadekin_phase)
sleep(5)
invisibility = INVISIBILITY_SHADEKIN
see_invisible = INVISIBILITY_SHADEKIN
see_invisible_default = INVISIBILITY_SHADEKIN
invisibility = INVISIBILITY_LEVEL_TWO
see_invisible = INVISIBILITY_LEVEL_TWO
//cut_overlays()
update_icon()
alpha = 127
@@ -257,10 +197,6 @@
force_max_speed = TRUE
ability_flags &= ~AB_PHASE_SHIFTING
/datum/modifier/shadekin_phase
name = "Shadekin Phasing"
evasion = 100
/datum/modifier/shadekin_phase_vision
name = "Shadekin Phase Vision"
vision_flags = SEE_THRU
@@ -399,45 +335,3 @@
holder.glow_color = initial(holder.glow_color)
holder.set_light(0)
my_kin = null
/mob/living/carbon/human/proc/attack_dephase(var/turf/T = null, atom/dephaser)
var/datum/species/shadekin/SK = species
// no assigned dephase-target, just use our own
if(!T)
T = get_turf(src)
// make sure it's possible to be dephased (and we're in phase)
if(!istype(SK) || SK.doing_phase || !T.CanPass(src,T) || loc != T || !(ability_flags & AB_PHASE_SHIFTED) )
return FALSE
log_admin("[key_name_admin(src)] was stunned out of phase at [T.x],[T.y],[T.z] by [dephaser.name], last touched by [dephaser.fingerprintslast].")
message_admins("[key_name_admin(src)] was stunned out of phase at [T.x],[T.y],[T.z] by [dephaser.name], last touched by [dephaser.fingerprintslast]. (<A href='byond://?_src_=holder;[HrefToken()];adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>JMP</a>)", 1)
// start the dephase
phase_in(T)
shadekin_adjust_energy(-20) // loss of energy for the interception
// apply a little extra stun for good measure
src.Weaken(3)
//toggle proc for toggling gentle/normal phasing
/mob/living/carbon/human/proc/phase_strength_toggle()
set name = "Toggle Phase Strength"
set desc = "Toggle strength of phase. Gentle but slower, or faster but destructive to lights."
set category = "Abilities.Shadekin"
var/datum/species/shadekin/SK = species
if(!istype(SK))
to_chat(src, span_warning("Only a shadekin can use that!"))
return FALSE
if(SK.phase_gentle)
to_chat(src, span_notice("Phasing toggled to Normal. You may damage lights."))
SK.phase_gentle = 0
else
to_chat(src, span_notice("Phasing toggled to Gentle. You won't damage lights, but concentrating on that incurs a short stun."))
SK.phase_gentle = 1
/datum/modifier/shadekin_phase_vision
name = "Shadekin Phase Vision"
vision_flags = SEE_THRU
@@ -209,7 +209,6 @@
var/has_glowing_eyes = 0 // Whether the eyes are shown above all lighting
var/water_movement = 0 // How much faster or slower the species is in water
var/snow_movement = 0 // How much faster or slower the species is on snow
var/dirtslip = FALSE // If we slip over dirt or not.
var/can_space_freemove = FALSE // Can we freely move in space?
var/can_zero_g_move = FALSE // What about just in zero-g non-space?
@@ -228,8 +227,6 @@
var/vanity_base_fit //when shapeshifting using vanity_copy_to, this allows you to have add something so they can go back to their original species fit
var/mudking = FALSE // If we dirty up tiles quicker
var/vore_belly_default_variant = "H"
// Determines the organs that the species spawns with and
@@ -194,9 +194,3 @@
var_changes = list("bad_swimmer" = 1, "water_movement" = 4, "swim_mult" = 1.25)
varchange_type = TRAIT_VARCHANGE_LESS_BETTER
excludes = list(/datum/trait/positive/good_swimmer)
/datum/trait/negative/slipperydirt
name = "Dirt Vulnerability"
desc = "Even the tiniest particles of dirt give you uneasy footing, even through several layers of footwear."
cost = -5
var_changes = list("dirtslip" = TRUE)
@@ -1216,10 +1216,3 @@
else
input += "s"
return input
/datum/trait/neutral/mudking
name = "Mudking"
desc = "Somehow you are so filthy that tiles get dirty four times as quick from you walking on them."
cost = 0
var_changes = list("mudking" = TRUE)
custom_only = FALSE
@@ -62,13 +62,10 @@
true_name = "[pick("Primary","Secondary","Tertiary","Quaternary")] [rand(1000,9999)]"
. = ..()
if(!roundstart && antag)
return INITIALIZE_HINT_LATELOAD
request_player()
/mob/living/simple_mob/animal/borer/LateInitialize()
request_player()
return ..()
/mob/living/simple_mob/animal/borer/handle_special()
if(host && !stat && !host.stat)
@@ -5,11 +5,6 @@
if(!T.CanPass(src,T) || loc != T)
to_chat(src,span_warning("You can't use that here!"))
return FALSE
/*
if((get_area(src).flags & PHASE_SHIELDED))
to_chat(src,span_warning("This area is preventing you from phasing!"))
return FALSE
*/
//RS Port #658 Start
if(!client?.holder && A.flag_check(AREA_BLOCK_PHASE_SHIFT))
to_chat(src,span_warning("You can't use that here!"))
@@ -40,7 +35,6 @@
// change
ability_flags &= ~AB_PHASE_SHIFTED
throwpass = FALSE
mouse_opacity = 1
name = real_name
for(var/obj/belly/B as anything in vore_organs)
@@ -56,27 +50,38 @@
//Cosmetics mostly
flick("tp_in",src)
addtimer(CALLBACK(src,PROC_REF(custom_emote), 1, "phases in!"), 0, TIMER_DELETE_ME)
addtimer(CALLBACK(src,PROC_REF(phase_in_finish_phase),T,original_canmove),5, TIMER_DELETE_ME)
custom_emote(1,"phases in!")
sleep(5) //The duration of the TP animation
canmove = original_canmove
/mob/living/simple_mob/shadekin/proc/phase_in_finish_phase(var/turf/T,var/original_canmove)
PRIVATE_PROC(TRUE)
SHOULD_NOT_OVERRIDE(TRUE)
canmove = original_canmove
//Potential phase-in vore
if(can_be_drop_pred) //Toggleable in vore panel
var/list/potentials = living_mobs(0)
if(potentials.len)
var/mob/living/target = pick(potentials)
if(istype(target) && target.devourable && target.can_be_drop_prey && vore_selected)
target.forceMove(vore_selected)
to_chat(target,span_vwarning("\The [src] phases in around you, [vore_selected.vore_verb]ing you into their [vore_selected.name]!"))
//Potential phase-in vore
if(can_be_drop_pred) //Toggleable in vore panel
var/list/potentials = living_mobs(0)
if(potentials.len)
var/mob/living/target = pick(potentials)
if(istype(target) && target.devourable && target.can_be_drop_prey && vore_selected)
target.forceMove(vore_selected)
to_chat(target,span_vwarning("\The [src] phases in around you, [vore_selected.vore_verb]ing you into their [vore_selected.name]!"))
// Do this after the potential vore, so we get the belly
update_icon()
// Do this after the potential vore, so we get the belly
update_icon()
//Affect nearby lights
var/destroy_lights = 0
if(eye_state == RED_EYES)
destroy_lights = 80
if(eye_state == PURPLE_EYES)
destroy_lights = 25
handle_phasein_flicker()
for(var/obj/machinery/light/L in machines)
if(L.z != z || get_dist(src,L) > 10)
continue
if(prob(destroy_lights))
spawn(rand(5,25))
L.broken()
else
L.flicker(10)
/mob/living/simple_mob/shadekin/proc/phase_out(var/turf/T)
if(!(ability_flags & AB_PHASE_SHIFTED))
@@ -95,7 +100,6 @@
// change
ability_flags |= AB_PHASE_SHIFTED
throwpass = TRUE // CHOMPAdd
mouse_opacity = 0
custom_emote(1,"phases out!")
real_name = name
@@ -106,20 +110,16 @@
cut_overlays()
flick("tp_out",src)
addtimer(CALLBACK(src, PROC_REF(phase_invis_handling), original_canmove), 5, TIMER_DELETE_ME)
sleep(5)
invisibility = INVISIBILITY_LEVEL_TWO
see_invisible = INVISIBILITY_LEVEL_TWO
update_icon()
alpha = 127
/mob/living/simple_mob/shadekin/proc/phase_invis_handling(var/original_canmove)
PRIVATE_PROC(TRUE)
SHOULD_NOT_OVERRIDE(TRUE)
invisibility = INVISIBILITY_LEVEL_TWO
see_invisible = INVISIBILITY_LEVEL_TWO
update_icon()
alpha = 127
canmove = original_canmove
incorporeal_move = TRUE
density = FALSE
force_max_speed = TRUE
canmove = original_canmove
incorporeal_move = TRUE
density = FALSE
force_max_speed = TRUE
/mob/living/simple_mob/shadekin/UnarmedAttack()
if(ability_flags & AB_PHASE_SHIFTED)
@@ -161,74 +161,3 @@
visible_message(span_notice("\The [src] gently places a hand on \the [target]..."))
face_atom(target)
return TRUE
/*
/mob/living/simple_mob/shadekin/proc/dark_tunneling()
var/template_id = "dark_portal"
var/datum/map_template/shelter/template
if(!template)
template = SSmapping.shelter_templates[template_id]
if(!template)
throw EXCEPTION("Shelter template ([template_id]) not found!")
return FALSE
var/turf/deploy_location = get_turf(src)
var/status = template.check_deploy(deploy_location)
switch(status)
//Not allowed due to /area technical reasons
if(SHELTER_DEPLOY_BAD_AREA)
to_chat(src, span_warning("A tunnel to the Dark will not function in this area."))
//Anchored objects or no space
if(SHELTER_DEPLOY_BAD_TURFS, SHELTER_DEPLOY_ANCHORED_OBJECTS)
var/width = template.width
var/height = template.height
to_chat(src, span_warning("There is not enough open area for a tunnel to the Dark to form! You need to clear a [width]x[height] area!"))
if(status != SHELTER_DEPLOY_ALLOWED)
return FALSE
var/turf/T = deploy_location
var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread()
smoke.attach(T)
smoke.set_up(10, 0, T)
smoke.start()
src.visible_message(span_notice("[src] begins pulling dark energies around themselves."))
if(do_after(src, 600)) //60 seconds
playsound(src, 'sound/effects/phasein.ogg', 100, 1)
src.visible_message(span_notice("[src] finishes pulling dark energies around themselves, creating a portal."))
log_and_message_admins("[key_name_admin(src)] created a tunnel to the dark at [get_area(T)]!")
template.annihilate_plants(deploy_location)
template.load(deploy_location, centered = TRUE)
template.update_lighting(deploy_location)
ability_flags &= AB_DARK_TUNNEL
return TRUE
else
return FALSE
*/
/*
/mob/living/simple_mob/shadekin/proc/dark_maw()
var/turf/T = get_turf(src)
if(!istype(T))
to_chat(src, span_warning("You don't seem to be able to set a trap here!"))
return FALSE
else if(T.get_lumcount() >= 0.5)
to_chat(src, span_warning("There is too much light here for your trap to last!"))
return FALSE
if(do_after(src, 10))
if(ability_flags & AB_PHASE_SHIFTED)
new /obj/effect/abstract/dark_maw(loc, src, 1)
else
new /obj/effect/abstract/dark_maw(loc, src)
return TRUE
else
return FALSE
*/
@@ -78,7 +78,6 @@
var/list/shadekin_abilities
var/check_for_observer = FALSE
var/check_timer = 0
var/phase_gentle = 0
/mob/living/simple_mob/shadekin/Initialize()
//You spawned the prototype, and want a totally random one.
@@ -250,7 +249,8 @@
cut_overlays()
icon_state = ""
flick("tp_out",src)
QDEL_IN(src, 1 SECOND)
spawn(1 SECOND)
qdel(src) //Back from whence you came!
. = ..(FALSE, deathmessage)
@@ -474,27 +474,3 @@
say_maybe_target = list("...mar?")
say_got_target = list("MAR!!!")
//reactions = list("Mar?" = "Marrr!", "Mar!" = "Marrr???", "Mar." = "Marrr.")
//custom light flicker proc
/mob/living/simple_mob/shadekin/proc/handle_phasein_flicker()
if(phase_gentle) // gentle case: No light destruction. Flicker in 4 tile radius for 3s. Weaken for 3sec after
for(var/obj/machinery/light/L in machines)
if(L.z != z || get_dist(src,L) > 4)
continue
L.flicker(3)
src.Stun(3)
else //normal case. Flicker in 10 tile radius for 10s. chance to destroy light based on eye type.
var/destroy_lights = 0
if(eye_state == RED_EYES)
destroy_lights = 80
if(eye_state == PURPLE_EYES)
destroy_lights = 25
for(var/obj/machinery/light/L in machines)
if(L.z != z || get_dist(src,L) > 10)
continue
if(prob(destroy_lights))
addtimer(CALLBACK(L, TYPE_PROC_REF(/obj/machinery/light, broken)), rand(5,25), TIMER_DELETE_ME)
else
L.flicker(10)