From 4cdb059c070833d12fa88f7da38925b40e3c99f6 Mon Sep 17 00:00:00 2001 From: Molti Date: Mon, 2 Oct 2023 17:28:21 -0500 Subject: [PATCH 01/17] everything --- .../effects/effect_system/effects_sparks.dm | 14 +- code/game/sound.dm | 2 + .../carbon/human/species_types/ethereal.dm | 4 + code/modules/mob/living/living.dm | 1 + code/modules/mob/living/living_defines.dm | 1 + code/modules/power/cable.dm | 4 + code/modules/power/power.dm | 4 + .../spells/spell_types/jaunt/wirecrawl.dm | 224 ++++++++++++++++++ yogstation.dme | 1 + 9 files changed, 253 insertions(+), 2 deletions(-) create mode 100644 code/modules/spells/spell_types/jaunt/wirecrawl.dm diff --git a/code/game/objects/effects/effect_system/effects_sparks.dm b/code/game/objects/effects/effect_system/effects_sparks.dm index 611103cbb917..313470343d19 100644 --- a/code/game/objects/effects/effect_system/effects_sparks.dm +++ b/code/game/objects/effects/effect_system/effects_sparks.dm @@ -25,6 +25,9 @@ light_power = 0.5 light_color = LIGHT_COLOR_FIRE light_flags = LIGHT_NO_LUMCOUNT + var/duration = 2 SECONDS + var/volume = 100 + var/sound = "sparks" /obj/effect/particle_effect/sparks/Initialize(mapload) ..() @@ -32,11 +35,11 @@ /obj/effect/particle_effect/sparks/LateInitialize() flick(icon_state, src) // replay the animation - playsound(src, "sparks", 100, TRUE) + playsound(src, sound, volume, TRUE) var/turf/T = loc if(isturf(T)) T.hotspot_expose(1000,100) - QDEL_IN(src, 2 SECONDS) + QDEL_IN(src, duration) /obj/effect/particle_effect/sparks/Destroy() var/turf/T = loc @@ -63,6 +66,13 @@ name = "lightning" icon_state = "electricity" +/obj/effect/particle_effect/sparks/electricity/short //used for wirecrawling + name = "lightning" + icon_state = "electricity" + duration = 8 + volume = 40 + sound = "softsparks" + /obj/effect/particle_effect/sparks/quantum name = "quantum sparks" icon_state = "quantum_sparks" diff --git a/code/game/sound.dm b/code/game/sound.dm index 6487f4aaab84..7d6f0a7691ad 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -215,6 +215,8 @@ distance_multiplier - Can be used to multiply the distance at which the sound is soundin = pick('sound/effects/creak1.ogg', 'sound/effects/creak2.ogg', 'sound/effects/creak3.ogg') if ("sparks") soundin = pick('sound/effects/sparks1.ogg','sound/effects/sparks2.ogg','sound/effects/sparks3.ogg','sound/effects/sparks4.ogg') + if ("softsparks")//doesn't have the cracking sound of sparks 4 + soundin = pick('sound/effects/sparks1.ogg','sound/effects/sparks2.ogg','sound/effects/sparks3.ogg') if ("rustle") soundin = pick('sound/effects/rustle1.ogg','sound/effects/rustle2.ogg','sound/effects/rustle3.ogg','sound/effects/rustle4.ogg','sound/effects/rustle5.ogg') if ("bodyfall") diff --git a/code/modules/mob/living/carbon/human/species_types/ethereal.dm b/code/modules/mob/living/carbon/human/species_types/ethereal.dm index 5d80ea6222d9..7aaa771f03a9 100644 --- a/code/modules/mob/living/carbon/human/species_types/ethereal.dm +++ b/code/modules/mob/living/carbon/human/species_types/ethereal.dm @@ -71,6 +71,10 @@ ethereal_light = ethereal.mob_light() spec_updatehealth(ethereal) + if(ishuman(C)) + var/datum/action/cooldown/spell/jaunt/wirecrawl/dash = new + dash.Grant(C) + /datum/species/ethereal/on_species_loss(mob/living/carbon/human/C, datum/species/new_species, pref_load) QDEL_NULL(ethereal_light) C.set_light(0) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index f9d4d573214a..a3a74332c742 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -1449,6 +1449,7 @@ else clear_fullscreen("remote_view", 0) update_pipe_vision() + update_wire_vision() /mob/living/vv_edit_var(var_name, var_value) switch(var_name) diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index 61699bdf504f..ee9e70cfed29 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -69,6 +69,7 @@ var/has_limbs = 0 //does the mob have distinct limbs?(arms,legs, chest,head) var/list/pipes_shown = list() + var/list/wires_shown = list() var/last_played_vent var/smoke_delay = FALSE //used to prevent spam with smoke reagent reaction on mob. diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 0563410f38f9..ece72e77d1c8 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -44,6 +44,8 @@ By design, d1 is the smallest direction and d2 is the highest pipe_group = "cable-[cable_color]"\ ) + var/image/wire_vision_img //specifically for wirecrawling + /obj/structure/cable/yellow cable_color = "yellow" color = "#ffff00" @@ -96,6 +98,8 @@ By design, d1 is the smallest direction and d2 is the highest if(powernet) cut_cable_from_powernet() // update the powernets GLOB.cable_list -= src //remove it from global cable list + if(wire_vision_img) + qdel(wire_vision_img) return ..() // then go ahead and delete the cable /obj/structure/cable/deconstruct(disassembled = TRUE) diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm index f3a553097b6c..dc5843f737bc 100644 --- a/code/modules/power/power.dm +++ b/code/modules/power/power.dm @@ -16,7 +16,11 @@ idle_power_usage = 0 active_power_usage = 0 + var/image/wire_vision_img //specifically for wirecrawling + /obj/machinery/power/Destroy() + if(wire_vision_img) + qdel(wire_vision_img) disconnect_from_network() return ..() diff --git a/code/modules/spells/spell_types/jaunt/wirecrawl.dm b/code/modules/spells/spell_types/jaunt/wirecrawl.dm new file mode 100644 index 000000000000..21613cce9b09 --- /dev/null +++ b/code/modules/spells/spell_types/jaunt/wirecrawl.dm @@ -0,0 +1,224 @@ +/** + * ### Blood Crawl + * + * Lets the caster enter and exit pools of blood. + */ +/datum/action/cooldown/spell/jaunt/wirecrawl + name = "Wire Crawl" + desc = "Allows you to break your body down into electricity and travel through wires." + + button_icon = 'icons/effects/effects.dmi' + button_icon_state = "electricity2" + + spell_requirements = NONE + + /// The time it takes to enter blood + var/enter_blood_time = 2 SECONDS + /// The time it takes to exit blood + var/exit_blood_time = 1 SECONDS + /// The radius around us that we look for wires in + var/enter_radius = 1 + /// If TRUE, we equip "wire crawl" hands to the jaunter to prevent using items + var/equip_wire_hands = TRUE + jaunt_type = /obj/effect/dummy/phased_mob/wirecrawl + +/datum/action/cooldown/spell/jaunt/wirecrawl/Grant(mob/grant_to) + . = ..() + RegisterSignal(grant_to, COMSIG_MOVABLE_MOVED, PROC_REF(update_status_on_signal)) + +/datum/action/cooldown/spell/jaunt/wirecrawl/Remove(mob/remove_from) + . = ..() + UnregisterSignal(remove_from, COMSIG_MOVABLE_MOVED) + +/datum/action/cooldown/spell/jaunt/wirecrawl/can_cast_spell(feedback = TRUE) + . = ..() + if(!.) + return FALSE + if(find_nearby_power(get_turf(owner))) + return TRUE + if(feedback) + to_chat(owner, span_warning("There must be a nearby power outlet!")) + return FALSE + +/datum/action/cooldown/spell/jaunt/wirecrawl/cast(mob/living/cast_on) + . = ..() + // Should always return something because we checked that in can_cast_spell before arriving here + var/obj/structure/cable/wire = find_nearby_power(get_turf(cast_on)) + do_wirecrawl(wire, cast_on) + +/// Returns a nearby blood decal, or null if there aren't any +/datum/action/cooldown/spell/jaunt/wirecrawl/proc/find_nearby_power(turf/origin) + var/machinery = FALSE + for(var/obj/machinery/power/thing in range(enter_radius, origin)) + machinery = TRUE + for(var/obj/structure/cable/thing in range(enter_radius, origin)) + if(machinery || !thing.invisibility)//only enter it if it's not covered by a tile or is connected to a power machinery + return thing + return null + +/** + * Attempts to enter or exit the passed blood pool. + * Returns TRUE if we successfully entered or exited said pool, FALSE otherwise + */ +/datum/action/cooldown/spell/jaunt/wirecrawl/proc/do_wirecrawl(obj/structure/cable/wire, mob/living/jaunter) + if(is_jaunting(jaunter)) + . = try_exit_jaunt(wire, jaunter) + else + . = try_enter_jaunt(wire, jaunter) + + if(!.) + reset_spell_cooldown() + to_chat(jaunter, span_warning("You are unable to wire crawl!")) + +/** + * Attempts to enter the passed blood pool. + * If forced is TRUE, it will override enter_blood_time. + */ +/datum/action/cooldown/spell/jaunt/wirecrawl/proc/try_enter_jaunt(obj/structure/cable/wire, mob/living/jaunter, forced = FALSE) + if(!forced) + if(enter_blood_time > 0 SECONDS) + do_sparks(5, FALSE, jaunter) + wire.visible_message(span_warning("[jaunter] starts to sink into [wire]!")) + if(!do_after(jaunter, enter_blood_time, wire)) + return FALSE + + // The actual turf we enter + var/turf/jaunt_turf = get_turf(wire) + + // Begin the jaunt + jaunter.notransform = TRUE + var/obj/effect/dummy/phased_mob/holder = enter_jaunt(jaunter, jaunt_turf) + if(!holder) + jaunter.notransform = FALSE + return FALSE + + RegisterSignal(holder, COMSIG_MOVABLE_MOVED, PROC_REF(update_status_on_signal)) + if(equip_wire_hands && iscarbon(jaunter)) + jaunter.drop_all_held_items() + // Give them some bloody hands to prevent them from doing things + var/obj/item/wirecrawl/left_hand = new(jaunter) + var/obj/item/wirecrawl/right_hand = new(jaunter) + jaunter.put_in_hands(left_hand) + jaunter.put_in_hands(right_hand) + + wire.visible_message(span_warning("[jaunter] zips into [wire]!")) + jaunter.extinguish_mob() + + jaunter.sight |= (SEE_TURFS|BLIND) + jaunter.add_wirevision(jaunt_turf) + do_sparks(10, FALSE, jaunter) + + jaunter.notransform = FALSE + return TRUE + +/** + * Attempts to Exit the passed blood pool. + * If forced is TRUE, it will override exit_blood_time, and if we're currently consuming someone. + */ +/datum/action/cooldown/spell/jaunt/wirecrawl/proc/try_exit_jaunt(obj/structure/cable/wire, mob/living/jaunter, forced = FALSE) + if(!forced) + if(jaunter.notransform) + to_chat(jaunter, span_warning("You cannot exit yet!!")) + return FALSE + + if(exit_blood_time > 0 SECONDS) + wire.visible_message(span_warning("[wire] starts to crackle...")) + do_sparks(5, FALSE, jaunter) + if(!do_after(jaunter, exit_blood_time, wire)) + return FALSE + + if(!exit_jaunt(jaunter, get_turf(wire))) + return FALSE + + jaunter.sight &= ~(SEE_TURFS|BLIND) + jaunter.remove_wirevision() + do_sparks(10, FALSE, jaunter) + + wire.visible_message(span_boldwarning("[jaunter] zips out of [wire]!")) + return TRUE + +/datum/action/cooldown/spell/jaunt/wirecrawl/on_jaunt_exited(obj/effect/dummy/phased_mob/jaunt, mob/living/unjaunter) + UnregisterSignal(jaunt, COMSIG_MOVABLE_MOVED) + if(equip_wire_hands && iscarbon(unjaunter)) + for(var/obj/item/wirecrawl/wire_hand in unjaunter.held_items) + unjaunter.temporarilyRemoveItemFromInventory(wire_hand, force = TRUE) + qdel(wire_hand) + return ..() + +/obj/effect/dummy/phased_mob/wirecrawl + name = "wire" + +/obj/effect/dummy/phased_mob/wirecrawl/phased_check(mob/living/user, direction) + var/turf/oldloc = get_turf(user) + var/obj/structure/cable/current = locate() in oldloc + if(!current || !istype(current))//if someone snips the wire you're currently in, or it gets destroyed in some way, get out + eject_jaunter() + return + + var/turf/newloc = ..() + for(var/obj/structure/cable/wire in newloc) + if(current.powernet != wire.powernet) //no jumping from one powernet to another + continue + user.update_wire_vision(newloc) + new /obj/effect/particle_effect/sparks/electricity/short(get_turf(user)) + return newloc + +//vision +/mob/living/proc/update_wire_vision(atom/new_loc = null) + . = loc + if(new_loc) + . = new_loc + remove_wirevision() + add_wirevision(.) + +/mob/living/proc/add_wirevision(var/turf/newloc) + var/obj/structure/cable/wire = locate() in newloc + if(!wire || !istype(wire) || !wire.powernet) + return + var/list/totalMembers = list() + + var/datum/powernet/P = wire.powernet + if(P) + totalMembers += P.nodes + totalMembers += P.cables + + if(!totalMembers.len) + return + + if(client) + for(var/object in totalMembers)//cables and power machinery are not the same unfortunately + if(in_view_range(client.mob, object)) + if(istype(object, /obj/structure/cable)) + var/obj/structure/cable/display = object + if(!display.wire_vision_img) + display.wire_vision_img = image(display, display.loc, layer = ABOVE_HUD_LAYER, dir = display.dir) + display.wire_vision_img.plane = ABOVE_HUD_PLANE + client.images += display.wire_vision_img + wires_shown += display.wire_vision_img + + else if(istype(object, /obj/machinery/power)) + var/obj/machinery/power/display = object + if(!display.wire_vision_img) + display.wire_vision_img = image(display, display.loc, layer = ABOVE_HUD_LAYER, dir = display.dir) + display.wire_vision_img.plane = ABOVE_HUD_PLANE + client.images += display.wire_vision_img + wires_shown += display.wire_vision_img + +/mob/living/proc/remove_wirevision() + if(client) + for(var/image/current_image in wires_shown) + client.images -= current_image + wires_shown.len = 0 + + +/obj/item/wirecrawl + name = "wire crawl" + desc = "You are unable to hold anything while in this form." + icon = 'icons/effects/effects.dmi' + icon_state = "electricity2" + item_flags = ABSTRACT | DROPDEL + +/obj/item/wirecrawl/Initialize(mapload) + . = ..() + ADD_TRAIT(src, TRAIT_NODROP, ABSTRACT_ITEM_TRAIT) + diff --git a/yogstation.dme b/yogstation.dme index 9031a6b6f81d..b0e36ce78d86 100644 --- a/yogstation.dme +++ b/yogstation.dme @@ -3523,6 +3523,7 @@ #include "code\modules\spells\spell_types\jaunt\bloodcrawl.dm" #include "code\modules\spells\spell_types\jaunt\ethereal_jaunt.dm" #include "code\modules\spells\spell_types\jaunt\shadow_walk.dm" +#include "code\modules\spells\spell_types\jaunt\wirecrawl.dm" #include "code\modules\spells\spell_types\list_target\_list_target.dm" #include "code\modules\spells\spell_types\list_target\telepathy.dm" #include "code\modules\spells\spell_types\pointed\_pointed.dm" From e7b25ce2a8134380ecc4cce4b51119ef48a7ebc0 Mon Sep 17 00:00:00 2001 From: Molti Date: Mon, 2 Oct 2023 19:04:48 -0500 Subject: [PATCH 02/17] Conduit --- code/__DEFINES/melee.dm | 1 + code/datums/martial/conduit.dm | 110 ++++++++++++++++++ .../carbon/human/species_types/ethereal.dm | 4 - .../spells/spell_types/jaunt/wirecrawl.dm | 4 +- yogstation.dme | 1 + 5 files changed, 114 insertions(+), 6 deletions(-) create mode 100644 code/datums/martial/conduit.dm diff --git a/code/__DEFINES/melee.dm b/code/__DEFINES/melee.dm index 453c235a2b56..4be9dd6be034 100644 --- a/code/__DEFINES/melee.dm +++ b/code/__DEFINES/melee.dm @@ -18,6 +18,7 @@ #define MARTIALART_ULTRAVIOLENCE "ultra violence" #define MARTIALART_BUSTERSTYLE "buster style" #define MARTIALART_WORLDBREAKER "worldbreaker" +#define MARTIALART_CONDUIT "conduit" #define MARTIALART_SPACIALLDOMINANCE "absolute spacial dominance" diff --git a/code/datums/martial/conduit.dm b/code/datums/martial/conduit.dm new file mode 100644 index 000000000000..162e17ad9c35 --- /dev/null +++ b/code/datums/martial/conduit.dm @@ -0,0 +1,110 @@ + +/datum/martial_art/conduit + name = "Conduit" + id = MARTIALART_CONDUIT + no_guns = TRUE + help_verb = /mob/living/carbon/human/proc/conduit_help + var/recalibration = /mob/living/carbon/human/proc/conduit_recalibration + var/datum/action/cooldown/spell/jaunt/wirecrawl/linked_wire + var/dashing = FALSE + COOLDOWN_DECLARE(dash_cooldown) + var/dropkick_cooldown = 5 SECONDS + +/datum/martial_art/conduit/can_use(mob/living/carbon/human/H) + if(H.stat == DEAD || H.incapacitated() || HAS_TRAIT(H, TRAIT_PACIFISM)) + return FALSE + return isethereal(H) + +/datum/martial_art/conduit/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D) + return TRUE //no disarming, you have a dropkick instead + +/datum/martial_art/conduit/proc/InterceptClickOn(mob/living/carbon/human/H, params, atom/target) + var/list/modifiers = params2list(params) + if(!can_use(H) || (modifiers["shift"] || modifiers["alt"] || modifiers["ctrl"])) + return + + if(isitem(target))//don't attack if we're clicking on our inventory + var/obj/item/thing = target + if(thing in H.get_all_contents()) + return + + if(H.get_active_held_item()) //abilities need an empty hand + return + + if(H.a_intent == INTENT_DISARM) + dropkick(H, target) + return TRUE + +/*--------------------------------------------------------------- + dropkick section +---------------------------------------------------------------*/ +/datum/martial_art/conduit/proc/dropkick(mob/living/carbon/human/H, atom/target) + if(dashing) + return + + if(!COOLDOWN_FINISHED(src, dash_cooldown)) + return + + COOLDOWN_START(src, dash_cooldown, dropkick_cooldown) + H.Knockdown(1 SECONDS, TRUE, TRUE) + dashing = TRUE + new /obj/effect/particle_effect/sparks(get_turf(H)) + H.throw_at(target, 3, 2, H, FALSE, TRUE) + +/datum/martial_art/conduit/handle_throw(atom/hit_atom, mob/living/carbon/human/A) + if(!dashing) + return FALSE + dashing = FALSE + if(hit_atom && isliving(hit_atom)) + var/mob/living/L = hit_atom + L.visible_message("[A] dropkicks [L]!", "[A] dropkicks you!") + L.Knockdown(10 SECONDS) + L.throw_at(get_edge_target_turf(get_dir(L, A)), 6, 3, A, TRUE, TRUE) + A.SetKnockdown(0) + do_sparks(4, FALSE, A) + sleep(1)//Runtime prevention (infinite bump() calls on hulks) + step_towards(A, L) + return TRUE + return FALSE +/*--------------------------------------------------------------- + training related section +---------------------------------------------------------------*/ +/mob/living/carbon/human/proc/conduit_help() + set name = "Conduit" + set desc = "Imagine all the things you would be capable of with this power." + set category = "Conduit" + var/list/combined_msg = list() + combined_msg += "You imagine all the things you would be capable of with this power." + + combined_msg += span_notice("You can travel through wires using your wirecrawl ability.") + + to_chat(usr, examine_block(combined_msg.Join("\n"))) + +/mob/living/carbon/human/proc/conduit_recalibration() + set name = "Flush Circuits" + set desc = "Flush 'clogged' circuits in order to regain lost strength." + set category = "Conduit" + var/list/combined_msg = list() + combined_msg += "You flush your circuits with excess power to reduce built up strain on your limbs." + to_chat(usr, examine_block(combined_msg.Join("\n"))) + + usr.click_intercept = usr.mind.martial_art + + +/datum/martial_art/conduit/teach(mob/living/carbon/human/H, make_temporary=0) + ..() + usr.click_intercept = src + add_verb(H, recalibration) + ADD_TRAIT(H, TRAIT_SHOCKIMMUNE, type) //walk through that fire all you like, hope you don't care about your clothes + if(!linked_wire) + linked_wire = new + linked_wire.Grant(H) + +/datum/martial_art/conduit/on_remove(mob/living/carbon/human/H) + usr.click_intercept = null + remove_verb(H, recalibration) + REMOVE_TRAIT(H, TRAIT_SHOCKIMMUNE, type) + if(linked_wire) + linked_wire.Remove(H) + return ..() + diff --git a/code/modules/mob/living/carbon/human/species_types/ethereal.dm b/code/modules/mob/living/carbon/human/species_types/ethereal.dm index 7aaa771f03a9..5d80ea6222d9 100644 --- a/code/modules/mob/living/carbon/human/species_types/ethereal.dm +++ b/code/modules/mob/living/carbon/human/species_types/ethereal.dm @@ -71,10 +71,6 @@ ethereal_light = ethereal.mob_light() spec_updatehealth(ethereal) - if(ishuman(C)) - var/datum/action/cooldown/spell/jaunt/wirecrawl/dash = new - dash.Grant(C) - /datum/species/ethereal/on_species_loss(mob/living/carbon/human/C, datum/species/new_species, pref_load) QDEL_NULL(ethereal_light) C.set_light(0) diff --git a/code/modules/spells/spell_types/jaunt/wirecrawl.dm b/code/modules/spells/spell_types/jaunt/wirecrawl.dm index 21613cce9b09..e22bc4c33914 100644 --- a/code/modules/spells/spell_types/jaunt/wirecrawl.dm +++ b/code/modules/spells/spell_types/jaunt/wirecrawl.dm @@ -13,9 +13,9 @@ spell_requirements = NONE /// The time it takes to enter blood - var/enter_blood_time = 2 SECONDS + var/enter_blood_time = 3 SECONDS /// The time it takes to exit blood - var/exit_blood_time = 1 SECONDS + var/exit_blood_time = 0 SECONDS /// The radius around us that we look for wires in var/enter_radius = 1 /// If TRUE, we equip "wire crawl" hands to the jaunter to prevent using items diff --git a/yogstation.dme b/yogstation.dme index b0e36ce78d86..f59138f3fbf3 100644 --- a/yogstation.dme +++ b/yogstation.dme @@ -684,6 +684,7 @@ #include "code\datums\mapgen\Cavegens\LavalandGenerator.dm" #include "code\datums\martial\boxing.dm" #include "code\datums\martial\buster_style.dm" +#include "code\datums\martial\conduit.dm" #include "code\datums\martial\cqc.dm" #include "code\datums\martial\flying_fang.dm" #include "code\datums\martial\hunterfu.dm" From ffeb07705ee817cc11f1808249e759c89ac2cba1 Mon Sep 17 00:00:00 2001 From: Molti Date: Mon, 2 Oct 2023 19:47:23 -0500 Subject: [PATCH 03/17] Done? --- code/datums/martial/conduit.dm | 33 +++++++++++++------ .../items/granters/martial_arts/racial.dm | 24 ++++++++++++++ .../spells/spell_types/jaunt/wirecrawl.dm | 3 ++ yogstation/code/modules/uplink/uplink_item.dm | 7 ++++ 4 files changed, 57 insertions(+), 10 deletions(-) diff --git a/code/datums/martial/conduit.dm b/code/datums/martial/conduit.dm index 162e17ad9c35..af049e42f553 100644 --- a/code/datums/martial/conduit.dm +++ b/code/datums/martial/conduit.dm @@ -35,6 +35,14 @@ dropkick(H, target) return TRUE +/*--------------------------------------------------------------- + here, have a fancy zap punch i guess +---------------------------------------------------------------*/ +/datum/martial_art/conduit/harm_act(mob/living/carbon/human/A, mob/living/D) + tesla_zap(D, 3, 20000, TESLA_MOB_DAMAGE) + D.electrocute_act(10, stun = FALSE) + return FALSE + /*--------------------------------------------------------------- dropkick section ---------------------------------------------------------------*/ @@ -47,6 +55,7 @@ COOLDOWN_START(src, dash_cooldown, dropkick_cooldown) H.Knockdown(1 SECONDS, TRUE, TRUE) + H.Immobilize(1 SECONDS, TRUE, TRUE) dashing = TRUE new /obj/effect/particle_effect/sparks(get_turf(H)) H.throw_at(target, 3, 2, H, FALSE, TRUE) @@ -59,33 +68,37 @@ var/mob/living/L = hit_atom L.visible_message("[A] dropkicks [L]!", "[A] dropkicks you!") L.Knockdown(10 SECONDS) - L.throw_at(get_edge_target_turf(get_dir(L, A)), 6, 3, A, TRUE, TRUE) - A.SetKnockdown(0) + L.throw_at(get_edge_target_turf(L, get_dir(get_turf(A), get_turf(L))), 5, 3, A, TRUE, TRUE) + L.electrocute_act(10, stun = FALSE) do_sparks(4, FALSE, A) + A.SetKnockdown(0) sleep(1)//Runtime prevention (infinite bump() calls on hulks) - step_towards(A, L) + A.SetImmobilized(0) return TRUE return FALSE /*--------------------------------------------------------------- training related section ---------------------------------------------------------------*/ -/mob/living/carbon/human/proc/conduit_help() - set name = "Conduit" - set desc = "Imagine all the things you would be capable of with this power." +/mob/living/carbon/human/proc/conduit_help()//negative flavour, i just wanted to add something to attach wirecrawling to + set name = "Focus" + set desc = "Remember what you are capable of." set category = "Conduit" var/list/combined_msg = list() - combined_msg += "You imagine all the things you would be capable of with this power." + combined_msg += "You focus your mind." + combined_msg += span_warning("Your disarm has been replaced with a short cooldown dropkick.") + combined_msg += span_warning("Your punches electrocute everyone nearby.") + combined_msg += span_notice("You are immune to getting shocked.") combined_msg += span_notice("You can travel through wires using your wirecrawl ability.") to_chat(usr, examine_block(combined_msg.Join("\n"))) /mob/living/carbon/human/proc/conduit_recalibration() - set name = "Flush Circuits" - set desc = "Flush 'clogged' circuits in order to regain lost strength." + set name = "Flicker" + set desc = "Fix click intercepts." set category = "Conduit" var/list/combined_msg = list() - combined_msg += "You flush your circuits with excess power to reduce built up strain on your limbs." + combined_msg += "You straighten yourself out, ready for more." to_chat(usr, examine_block(combined_msg.Join("\n"))) usr.click_intercept = usr.mind.martial_art diff --git a/code/game/objects/items/granters/martial_arts/racial.dm b/code/game/objects/items/granters/martial_arts/racial.dm index 473d0d32a903..c57fe1e47ae7 100644 --- a/code/game/objects/items/granters/martial_arts/racial.dm +++ b/code/game/objects/items/granters/martial_arts/racial.dm @@ -153,3 +153,27 @@ var/obj/item/reagent_containers/glass/bottle/vial/empty = new(get_turf(user)) qdel(src) user.put_in_active_hand(empty) + + +/obj/item/book/granter/martial/conduit + name = "Modified yellow slime extract" + desc = "An experimental yellow slime extract that when absorbed by an Ethereal, grants control over electrical powers." + icon = 'icons/mob/slimes.dmi' + icon_state = "yellow slime extract" + martial = /datum/martial_art/conduit + martial_name = "Conduit" + greet = span_sciradio("You have absorbed the abilities of a Conduit! You are a walking electrical storm. You can recall your abilites using Focus in the Conduit tab.") + remarks = list("Drain...", "Absorb...", "Shock...", "...") + +/obj/item/book/granter/martial/conduit/can_learn(mob/user) + if(!isethereal(user)) + to_chat(user, span_warning("Yup, that's a slime extract alright.")) + return FALSE + return ..() + +/obj/item/book/granter/martial/conduit/on_reading_finished(mob/living/carbon/user) + ..() + if(!uses) + name = "grey slime extract" + desc = "Goo extracted from a slime. Legends claim these to have \"magical powers\"." + icon_state = "grey slime extract" diff --git a/code/modules/spells/spell_types/jaunt/wirecrawl.dm b/code/modules/spells/spell_types/jaunt/wirecrawl.dm index e22bc4c33914..ef1928844189 100644 --- a/code/modules/spells/spell_types/jaunt/wirecrawl.dm +++ b/code/modules/spells/spell_types/jaunt/wirecrawl.dm @@ -11,6 +11,8 @@ button_icon_state = "electricity2" spell_requirements = NONE + antimagic_flags = NONE + panel = null /// The time it takes to enter blood var/enter_blood_time = 3 SECONDS @@ -20,6 +22,7 @@ var/enter_radius = 1 /// If TRUE, we equip "wire crawl" hands to the jaunter to prevent using items var/equip_wire_hands = TRUE + jaunt_type = /obj/effect/dummy/phased_mob/wirecrawl /datum/action/cooldown/spell/jaunt/wirecrawl/Grant(mob/grant_to) diff --git a/yogstation/code/modules/uplink/uplink_item.dm b/yogstation/code/modules/uplink/uplink_item.dm index b370d4697899..fe41419b02be 100644 --- a/yogstation/code/modules/uplink/uplink_item.dm +++ b/yogstation/code/modules/uplink/uplink_item.dm @@ -174,6 +174,13 @@ item = /obj/item/book/granter/martial/explosive_fist restricted_species = list("plasmaman") +/datum/uplink_item/race_restricted/conduit + name = "Modified yellow slime extract" + desc = "An experimental yellow slime extract that when absorbed by an Ethereal, grants control over electrical powers." + cost = 12 + item = /obj/item/book/granter/martial/conduit + restricted_species = list("ethereal") + /datum/uplink_item/race_restricted/ultra_violence name = "Version one upgrade module" desc = "A module full of forbidden techniques that will make you capable of ultimate bloodshed. \ From ab5b573c99eade41be9b51d2c78f47eec5132f80 Mon Sep 17 00:00:00 2001 From: Molti Date: Mon, 2 Oct 2023 19:48:52 -0500 Subject: [PATCH 04/17] Update conduit.dm --- code/datums/martial/conduit.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/datums/martial/conduit.dm b/code/datums/martial/conduit.dm index af049e42f553..34c3beb3623e 100644 --- a/code/datums/martial/conduit.dm +++ b/code/datums/martial/conduit.dm @@ -68,7 +68,7 @@ var/mob/living/L = hit_atom L.visible_message("[A] dropkicks [L]!", "[A] dropkicks you!") L.Knockdown(10 SECONDS) - L.throw_at(get_edge_target_turf(L, get_dir(get_turf(A), get_turf(L))), 5, 3, A, TRUE, TRUE) + L.throw_at(get_edge_target_turf(L, get_dir(get_turf(A), get_turf(L))), 5, 3, A, TRUE) L.electrocute_act(10, stun = FALSE) do_sparks(4, FALSE, A) A.SetKnockdown(0) From aa2597223a6d2756f6c677b0f11b02062dbb1133 Mon Sep 17 00:00:00 2001 From: Molti Date: Mon, 2 Oct 2023 19:55:37 -0500 Subject: [PATCH 05/17] Update conduit.dm --- code/datums/martial/conduit.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/datums/martial/conduit.dm b/code/datums/martial/conduit.dm index 34c3beb3623e..5f439774771b 100644 --- a/code/datums/martial/conduit.dm +++ b/code/datums/martial/conduit.dm @@ -39,8 +39,8 @@ here, have a fancy zap punch i guess ---------------------------------------------------------------*/ /datum/martial_art/conduit/harm_act(mob/living/carbon/human/A, mob/living/D) - tesla_zap(D, 3, 20000, TESLA_MOB_DAMAGE) - D.electrocute_act(10, stun = FALSE) + tesla_zap(D, 3, 10000, TESLA_MOB_DAMAGE) + D.electrocute_act(5, stun = FALSE) return FALSE /*--------------------------------------------------------------- From 7d30634c4ccfa3ef58bf97d41974f415662daea1 Mon Sep 17 00:00:00 2001 From: Molti Date: Mon, 2 Oct 2023 20:01:11 -0500 Subject: [PATCH 06/17] Update conduit.dm --- code/datums/martial/conduit.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/datums/martial/conduit.dm b/code/datums/martial/conduit.dm index 5f439774771b..01ada81280de 100644 --- a/code/datums/martial/conduit.dm +++ b/code/datums/martial/conduit.dm @@ -40,7 +40,7 @@ ---------------------------------------------------------------*/ /datum/martial_art/conduit/harm_act(mob/living/carbon/human/A, mob/living/D) tesla_zap(D, 3, 10000, TESLA_MOB_DAMAGE) - D.electrocute_act(5, stun = FALSE) + D.electrocute_act(10, stun = FALSE) return FALSE /*--------------------------------------------------------------- @@ -67,9 +67,9 @@ if(hit_atom && isliving(hit_atom)) var/mob/living/L = hit_atom L.visible_message("[A] dropkicks [L]!", "[A] dropkicks you!") - L.Knockdown(10 SECONDS) L.throw_at(get_edge_target_turf(L, get_dir(get_turf(A), get_turf(L))), 5, 3, A, TRUE) - L.electrocute_act(10, stun = FALSE) + L.Knockdown(5 SECONDS) + L.electrocute_act(10) do_sparks(4, FALSE, A) A.SetKnockdown(0) sleep(1)//Runtime prevention (infinite bump() calls on hulks) From 8020940db6ff65b7bab9298355aa6453d998b2b3 Mon Sep 17 00:00:00 2001 From: Molti Date: Mon, 2 Oct 2023 20:09:36 -0500 Subject: [PATCH 07/17] Update racial.dm --- code/game/objects/items/granters/martial_arts/racial.dm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/granters/martial_arts/racial.dm b/code/game/objects/items/granters/martial_arts/racial.dm index c57fe1e47ae7..67a24e1a22ee 100644 --- a/code/game/objects/items/granters/martial_arts/racial.dm +++ b/code/game/objects/items/granters/martial_arts/racial.dm @@ -163,7 +163,11 @@ martial = /datum/martial_art/conduit martial_name = "Conduit" greet = span_sciradio("You have absorbed the abilities of a Conduit! You are a walking electrical storm. You can recall your abilites using Focus in the Conduit tab.") - remarks = list("Drain...", "Absorb...", "Shock...", "...") + remarks = list("Drain...", "Absorb...", "Shock...", "Zap...", "High Voltage...") + book_sounds = list('sound/effects/sparks1.ogg','sound/effects/sparks2.ogg','sound/effects/sparks3.ogg') + +/obj/item/book/granter/martial/conduit/on_reading_start(mob/user) + to_chat(user, span_notice("You hold \the [src] directly to your chest...")) /obj/item/book/granter/martial/conduit/can_learn(mob/user) if(!isethereal(user)) From 439ab7683a8d232ab449cccdc1e4d81c1cd92ec9 Mon Sep 17 00:00:00 2001 From: Molti Date: Mon, 2 Oct 2023 21:02:02 -0500 Subject: [PATCH 08/17] no martial --- code/__DEFINES/melee.dm | 1 - code/datums/martial/conduit.dm | 123 ------------------ .../items/granters/martial_arts/racial.dm | 25 ++-- yogstation.dme | 1 - yogstation/code/modules/uplink/uplink_item.dm | 2 +- 5 files changed, 15 insertions(+), 137 deletions(-) delete mode 100644 code/datums/martial/conduit.dm diff --git a/code/__DEFINES/melee.dm b/code/__DEFINES/melee.dm index 4be9dd6be034..453c235a2b56 100644 --- a/code/__DEFINES/melee.dm +++ b/code/__DEFINES/melee.dm @@ -18,7 +18,6 @@ #define MARTIALART_ULTRAVIOLENCE "ultra violence" #define MARTIALART_BUSTERSTYLE "buster style" #define MARTIALART_WORLDBREAKER "worldbreaker" -#define MARTIALART_CONDUIT "conduit" #define MARTIALART_SPACIALLDOMINANCE "absolute spacial dominance" diff --git a/code/datums/martial/conduit.dm b/code/datums/martial/conduit.dm deleted file mode 100644 index 01ada81280de..000000000000 --- a/code/datums/martial/conduit.dm +++ /dev/null @@ -1,123 +0,0 @@ - -/datum/martial_art/conduit - name = "Conduit" - id = MARTIALART_CONDUIT - no_guns = TRUE - help_verb = /mob/living/carbon/human/proc/conduit_help - var/recalibration = /mob/living/carbon/human/proc/conduit_recalibration - var/datum/action/cooldown/spell/jaunt/wirecrawl/linked_wire - var/dashing = FALSE - COOLDOWN_DECLARE(dash_cooldown) - var/dropkick_cooldown = 5 SECONDS - -/datum/martial_art/conduit/can_use(mob/living/carbon/human/H) - if(H.stat == DEAD || H.incapacitated() || HAS_TRAIT(H, TRAIT_PACIFISM)) - return FALSE - return isethereal(H) - -/datum/martial_art/conduit/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D) - return TRUE //no disarming, you have a dropkick instead - -/datum/martial_art/conduit/proc/InterceptClickOn(mob/living/carbon/human/H, params, atom/target) - var/list/modifiers = params2list(params) - if(!can_use(H) || (modifiers["shift"] || modifiers["alt"] || modifiers["ctrl"])) - return - - if(isitem(target))//don't attack if we're clicking on our inventory - var/obj/item/thing = target - if(thing in H.get_all_contents()) - return - - if(H.get_active_held_item()) //abilities need an empty hand - return - - if(H.a_intent == INTENT_DISARM) - dropkick(H, target) - return TRUE - -/*--------------------------------------------------------------- - here, have a fancy zap punch i guess ----------------------------------------------------------------*/ -/datum/martial_art/conduit/harm_act(mob/living/carbon/human/A, mob/living/D) - tesla_zap(D, 3, 10000, TESLA_MOB_DAMAGE) - D.electrocute_act(10, stun = FALSE) - return FALSE - -/*--------------------------------------------------------------- - dropkick section ----------------------------------------------------------------*/ -/datum/martial_art/conduit/proc/dropkick(mob/living/carbon/human/H, atom/target) - if(dashing) - return - - if(!COOLDOWN_FINISHED(src, dash_cooldown)) - return - - COOLDOWN_START(src, dash_cooldown, dropkick_cooldown) - H.Knockdown(1 SECONDS, TRUE, TRUE) - H.Immobilize(1 SECONDS, TRUE, TRUE) - dashing = TRUE - new /obj/effect/particle_effect/sparks(get_turf(H)) - H.throw_at(target, 3, 2, H, FALSE, TRUE) - -/datum/martial_art/conduit/handle_throw(atom/hit_atom, mob/living/carbon/human/A) - if(!dashing) - return FALSE - dashing = FALSE - if(hit_atom && isliving(hit_atom)) - var/mob/living/L = hit_atom - L.visible_message("[A] dropkicks [L]!", "[A] dropkicks you!") - L.throw_at(get_edge_target_turf(L, get_dir(get_turf(A), get_turf(L))), 5, 3, A, TRUE) - L.Knockdown(5 SECONDS) - L.electrocute_act(10) - do_sparks(4, FALSE, A) - A.SetKnockdown(0) - sleep(1)//Runtime prevention (infinite bump() calls on hulks) - A.SetImmobilized(0) - return TRUE - return FALSE -/*--------------------------------------------------------------- - training related section ----------------------------------------------------------------*/ -/mob/living/carbon/human/proc/conduit_help()//negative flavour, i just wanted to add something to attach wirecrawling to - set name = "Focus" - set desc = "Remember what you are capable of." - set category = "Conduit" - var/list/combined_msg = list() - combined_msg += "You focus your mind." - - combined_msg += span_warning("Your disarm has been replaced with a short cooldown dropkick.") - combined_msg += span_warning("Your punches electrocute everyone nearby.") - combined_msg += span_notice("You are immune to getting shocked.") - combined_msg += span_notice("You can travel through wires using your wirecrawl ability.") - - to_chat(usr, examine_block(combined_msg.Join("\n"))) - -/mob/living/carbon/human/proc/conduit_recalibration() - set name = "Flicker" - set desc = "Fix click intercepts." - set category = "Conduit" - var/list/combined_msg = list() - combined_msg += "You straighten yourself out, ready for more." - to_chat(usr, examine_block(combined_msg.Join("\n"))) - - usr.click_intercept = usr.mind.martial_art - - -/datum/martial_art/conduit/teach(mob/living/carbon/human/H, make_temporary=0) - ..() - usr.click_intercept = src - add_verb(H, recalibration) - ADD_TRAIT(H, TRAIT_SHOCKIMMUNE, type) //walk through that fire all you like, hope you don't care about your clothes - if(!linked_wire) - linked_wire = new - linked_wire.Grant(H) - -/datum/martial_art/conduit/on_remove(mob/living/carbon/human/H) - usr.click_intercept = null - remove_verb(H, recalibration) - REMOVE_TRAIT(H, TRAIT_SHOCKIMMUNE, type) - if(linked_wire) - linked_wire.Remove(H) - return ..() - diff --git a/code/game/objects/items/granters/martial_arts/racial.dm b/code/game/objects/items/granters/martial_arts/racial.dm index 67a24e1a22ee..3fc7a99c26ba 100644 --- a/code/game/objects/items/granters/martial_arts/racial.dm +++ b/code/game/objects/items/granters/martial_arts/racial.dm @@ -155,29 +155,32 @@ user.put_in_active_hand(empty) -/obj/item/book/granter/martial/conduit +/obj/item/book/granter/action/wirecrawl name = "Modified yellow slime extract" desc = "An experimental yellow slime extract that when absorbed by an Ethereal, grants control over electrical powers." icon = 'icons/mob/slimes.dmi' icon_state = "yellow slime extract" - martial = /datum/martial_art/conduit - martial_name = "Conduit" - greet = span_sciradio("You have absorbed the abilities of a Conduit! You are a walking electrical storm. You can recall your abilites using Focus in the Conduit tab.") + granted_action = /datum/action/cooldown/spell/jaunt/wirecrawl + action_name = "Wirecrawling" remarks = list("Drain...", "Absorb...", "Shock...", "Zap...", "High Voltage...") book_sounds = list('sound/effects/sparks1.ogg','sound/effects/sparks2.ogg','sound/effects/sparks3.ogg') + var/admin = FALSE -/obj/item/book/granter/martial/conduit/on_reading_start(mob/user) +/obj/item/book/granter/action/wirecrawl/on_reading_start(mob/user) to_chat(user, span_notice("You hold \the [src] directly to your chest...")) -/obj/item/book/granter/martial/conduit/can_learn(mob/user) - if(!isethereal(user)) - to_chat(user, span_warning("Yup, that's a slime extract alright.")) - return FALSE - return ..() +/obj/item/book/granter/action/wirecrawl/can_learn(mob/user) + if(isethereal(user) || admin) + return ..() + to_chat(user, span_warning("Yup, that's a slime extract alright.")) + return FALSE -/obj/item/book/granter/martial/conduit/on_reading_finished(mob/living/carbon/user) +/obj/item/book/granter/action/wirecrawl/on_reading_finished(mob/living/carbon/user) ..() if(!uses) name = "grey slime extract" desc = "Goo extracted from a slime. Legends claim these to have \"magical powers\"." icon_state = "grey slime extract" + +/obj/item/book/granter/action/wirecrawl/admin //if someone wants to spawn it in + admin = TRUE diff --git a/yogstation.dme b/yogstation.dme index f59138f3fbf3..b0e36ce78d86 100644 --- a/yogstation.dme +++ b/yogstation.dme @@ -684,7 +684,6 @@ #include "code\datums\mapgen\Cavegens\LavalandGenerator.dm" #include "code\datums\martial\boxing.dm" #include "code\datums\martial\buster_style.dm" -#include "code\datums\martial\conduit.dm" #include "code\datums\martial\cqc.dm" #include "code\datums\martial\flying_fang.dm" #include "code\datums\martial\hunterfu.dm" diff --git a/yogstation/code/modules/uplink/uplink_item.dm b/yogstation/code/modules/uplink/uplink_item.dm index fe41419b02be..0e542e030d3d 100644 --- a/yogstation/code/modules/uplink/uplink_item.dm +++ b/yogstation/code/modules/uplink/uplink_item.dm @@ -178,7 +178,7 @@ name = "Modified yellow slime extract" desc = "An experimental yellow slime extract that when absorbed by an Ethereal, grants control over electrical powers." cost = 12 - item = /obj/item/book/granter/martial/conduit + item = /obj/item/book/granter/action/conduit restricted_species = list("ethereal") /datum/uplink_item/race_restricted/ultra_violence From 7098bea622a39dbced7ef229886c871cc7106cd9 Mon Sep 17 00:00:00 2001 From: Molti Date: Mon, 2 Oct 2023 21:08:46 -0500 Subject: [PATCH 09/17] fix --- .../objects/items/granters/martial_arts/racial.dm | 2 ++ yogstation/code/modules/uplink/uplink_item.dm | 14 +++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/code/game/objects/items/granters/martial_arts/racial.dm b/code/game/objects/items/granters/martial_arts/racial.dm index 3fc7a99c26ba..5a6f887e2e3f 100644 --- a/code/game/objects/items/granters/martial_arts/racial.dm +++ b/code/game/objects/items/granters/martial_arts/racial.dm @@ -162,6 +162,8 @@ icon_state = "yellow slime extract" granted_action = /datum/action/cooldown/spell/jaunt/wirecrawl action_name = "Wirecrawling" + drop_sound = null + pickup_sound = null remarks = list("Drain...", "Absorb...", "Shock...", "Zap...", "High Voltage...") book_sounds = list('sound/effects/sparks1.ogg','sound/effects/sparks2.ogg','sound/effects/sparks3.ogg') var/admin = FALSE diff --git a/yogstation/code/modules/uplink/uplink_item.dm b/yogstation/code/modules/uplink/uplink_item.dm index 0e542e030d3d..8fecb4497711 100644 --- a/yogstation/code/modules/uplink/uplink_item.dm +++ b/yogstation/code/modules/uplink/uplink_item.dm @@ -174,13 +174,6 @@ item = /obj/item/book/granter/martial/explosive_fist restricted_species = list("plasmaman") -/datum/uplink_item/race_restricted/conduit - name = "Modified yellow slime extract" - desc = "An experimental yellow slime extract that when absorbed by an Ethereal, grants control over electrical powers." - cost = 12 - item = /obj/item/book/granter/action/conduit - restricted_species = list("ethereal") - /datum/uplink_item/race_restricted/ultra_violence name = "Version one upgrade module" desc = "A module full of forbidden techniques that will make you capable of ultimate bloodshed. \ @@ -192,6 +185,13 @@ restricted_species = list("ipc") include_objectives = list(/datum/objective/hijack, /datum/objective/martyr, /datum/objective/nuclear) // designed around mass murder, no need to use this if you aren't allowed to do that +/datum/uplink_item/race_restricted/wirecrawl + name = "Modified yellow slime extract" + desc = "An experimental yellow slime extract that when absorbed by an Ethereal, grants control over electrical powers." + cost = 8 + item = /obj/item/book/granter/action/wirecrawl + restricted_species = list("ethereal") + /datum/uplink_item/stealthy_weapons/camera_flash name = "Camera Flash" desc = "A camera with an upgraded flashbulb. Can be used much like a handheld flash except with a longer cooldown between uses, allowing the bulb to cool down — avoiding burning out altogether." From 43a94ee5f835a33ad52bda31ce3f6f5fd3c4320a Mon Sep 17 00:00:00 2001 From: Molti Date: Mon, 2 Oct 2023 21:14:38 -0500 Subject: [PATCH 10/17] fix bug --- code/modules/spells/spell_types/jaunt/wirecrawl.dm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/code/modules/spells/spell_types/jaunt/wirecrawl.dm b/code/modules/spells/spell_types/jaunt/wirecrawl.dm index ef1928844189..2dff5aded03e 100644 --- a/code/modules/spells/spell_types/jaunt/wirecrawl.dm +++ b/code/modules/spells/spell_types/jaunt/wirecrawl.dm @@ -22,6 +22,8 @@ var/enter_radius = 1 /// If TRUE, we equip "wire crawl" hands to the jaunter to prevent using items var/equip_wire_hands = TRUE + ///keep track of the powernet we're in + var/datum/powernet/travelled jaunt_type = /obj/effect/dummy/phased_mob/wirecrawl @@ -109,6 +111,7 @@ jaunter.sight |= (SEE_TURFS|BLIND) jaunter.add_wirevision(jaunt_turf) + travelled = wire.powernet do_sparks(10, FALSE, jaunter) jaunter.notransform = FALSE @@ -160,7 +163,7 @@ var/turf/newloc = ..() for(var/obj/structure/cable/wire in newloc) - if(current.powernet != wire.powernet) //no jumping from one powernet to another + if(travelled != wire.powernet) //no jumping to a different powernet continue user.update_wire_vision(newloc) new /obj/effect/particle_effect/sparks/electricity/short(get_turf(user)) @@ -175,7 +178,11 @@ add_wirevision(.) /mob/living/proc/add_wirevision(var/turf/newloc) - var/obj/structure/cable/wire = locate() in newloc + var/obj/structure/cable/wire + for(var/obj/structure/cable/check in newloc) + if(travelled != check.powernet) //no jumping to a different powernet + continue + wire = check if(!wire || !istype(wire) || !wire.powernet) return var/list/totalMembers = list() From b7fca35ceae0fe461fce05b2b203c32254e10c24 Mon Sep 17 00:00:00 2001 From: Molti Date: Mon, 2 Oct 2023 21:22:19 -0500 Subject: [PATCH 11/17] Update wirecrawl.dm --- .../spells/spell_types/jaunt/wirecrawl.dm | 31 ++++++++----------- 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/code/modules/spells/spell_types/jaunt/wirecrawl.dm b/code/modules/spells/spell_types/jaunt/wirecrawl.dm index 2dff5aded03e..7c05783bb3b9 100644 --- a/code/modules/spells/spell_types/jaunt/wirecrawl.dm +++ b/code/modules/spells/spell_types/jaunt/wirecrawl.dm @@ -22,8 +22,6 @@ var/enter_radius = 1 /// If TRUE, we equip "wire crawl" hands to the jaunter to prevent using items var/equip_wire_hands = TRUE - ///keep track of the powernet we're in - var/datum/powernet/travelled jaunt_type = /obj/effect/dummy/phased_mob/wirecrawl @@ -92,7 +90,7 @@ // Begin the jaunt jaunter.notransform = TRUE - var/obj/effect/dummy/phased_mob/holder = enter_jaunt(jaunter, jaunt_turf) + var/obj/effect/dummy/phased_mob/wirecrawl/holder = enter_jaunt(jaunter, jaunt_turf) if(!holder) jaunter.notransform = FALSE return FALSE @@ -110,8 +108,8 @@ jaunter.extinguish_mob() jaunter.sight |= (SEE_TURFS|BLIND) - jaunter.add_wirevision(jaunt_turf) - travelled = wire.powernet + jaunter.add_wirevision(wire) + holder.travelled = wire.powernet do_sparks(10, FALSE, jaunter) jaunter.notransform = FALSE @@ -153,11 +151,13 @@ /obj/effect/dummy/phased_mob/wirecrawl name = "wire" + ///keep track of the powernet we're in + var/datum/powernet/travelled /obj/effect/dummy/phased_mob/wirecrawl/phased_check(mob/living/user, direction) var/turf/oldloc = get_turf(user) var/obj/structure/cable/current = locate() in oldloc - if(!current || !istype(current))//if someone snips the wire you're currently in, or it gets destroyed in some way, get out + if(!current || !istype(current) || !travelled)//if someone snips the wire you're currently in, or it gets destroyed in some way, get out eject_jaunter() return @@ -165,24 +165,19 @@ for(var/obj/structure/cable/wire in newloc) if(travelled != wire.powernet) //no jumping to a different powernet continue - user.update_wire_vision(newloc) + user.update_wire_vision(wire) new /obj/effect/particle_effect/sparks/electricity/short(get_turf(user)) return newloc //vision -/mob/living/proc/update_wire_vision(atom/new_loc = null) - . = loc - if(new_loc) - . = new_loc +/mob/living/proc/update_wire_vision(obj/structure/cable/wire) + if(!wire) + to_chat(src, "Error, @Molti on discord") + return remove_wirevision() - add_wirevision(.) + add_wirevision(wire) -/mob/living/proc/add_wirevision(var/turf/newloc) - var/obj/structure/cable/wire - for(var/obj/structure/cable/check in newloc) - if(travelled != check.powernet) //no jumping to a different powernet - continue - wire = check +/mob/living/proc/add_wirevision(obj/structure/cable/wire) if(!wire || !istype(wire) || !wire.powernet) return var/list/totalMembers = list() From fdb812f56a472be59880e2f7261b379a45c12c2a Mon Sep 17 00:00:00 2001 From: Molti Date: Mon, 2 Oct 2023 21:26:25 -0500 Subject: [PATCH 12/17] Update wirecrawl.dm --- code/modules/spells/spell_types/jaunt/wirecrawl.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/spells/spell_types/jaunt/wirecrawl.dm b/code/modules/spells/spell_types/jaunt/wirecrawl.dm index 7c05783bb3b9..ad370eb6e367 100644 --- a/code/modules/spells/spell_types/jaunt/wirecrawl.dm +++ b/code/modules/spells/spell_types/jaunt/wirecrawl.dm @@ -158,6 +158,7 @@ var/turf/oldloc = get_turf(user) var/obj/structure/cable/current = locate() in oldloc if(!current || !istype(current) || !travelled)//if someone snips the wire you're currently in, or it gets destroyed in some way, get out + user.remove_wirevision() eject_jaunter() return From cf7940d3a7ecab81e972bda676402b2443e93d72 Mon Sep 17 00:00:00 2001 From: Molti Date: Mon, 2 Oct 2023 22:33:55 -0500 Subject: [PATCH 13/17] Update wirecrawl.dm --- .../spells/spell_types/jaunt/wirecrawl.dm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/code/modules/spells/spell_types/jaunt/wirecrawl.dm b/code/modules/spells/spell_types/jaunt/wirecrawl.dm index ad370eb6e367..fe545569fcc9 100644 --- a/code/modules/spells/spell_types/jaunt/wirecrawl.dm +++ b/code/modules/spells/spell_types/jaunt/wirecrawl.dm @@ -154,6 +154,14 @@ ///keep track of the powernet we're in var/datum/powernet/travelled +/obj/effect/dummy/phased_mob/wirecrawl/Initialize(mapload, atom/movable/jaunter) + . = ..() + START_PROCESSING(SSprocessing, src) + +/obj/effect/dummy/phased_mob/wirecrawl/Destroy() + STOP_PROCESSING(SSprocessing, src) + return ..() + /obj/effect/dummy/phased_mob/wirecrawl/phased_check(mob/living/user, direction) var/turf/oldloc = get_turf(user) var/obj/structure/cable/current = locate() in oldloc @@ -170,6 +178,16 @@ new /obj/effect/particle_effect/sparks/electricity/short(get_turf(user)) return newloc +/obj/effect/dummy/phased_mob/wirecrawl/process(delta_time)//so if the existing wire is destroyed, they are forced out + . = ..() + var/turf/currentloc = get_turf(user) + var/obj/structure/cable/current = locate() in oldloc + if(!current || !istype(current) || !travelled)//if someone snips the wire you're currently in, or it gets destroyed in some way, get out + user.remove_wirevision() + eject_jaunter() + return + + //vision /mob/living/proc/update_wire_vision(obj/structure/cable/wire) if(!wire) From 8011167f915656132ee19c065074ce702e00f81e Mon Sep 17 00:00:00 2001 From: Molti Date: Mon, 2 Oct 2023 22:52:27 -0500 Subject: [PATCH 14/17] Update wirecrawl.dm --- .../spells/spell_types/jaunt/wirecrawl.dm | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/code/modules/spells/spell_types/jaunt/wirecrawl.dm b/code/modules/spells/spell_types/jaunt/wirecrawl.dm index fe545569fcc9..dfcb69c1df89 100644 --- a/code/modules/spells/spell_types/jaunt/wirecrawl.dm +++ b/code/modules/spells/spell_types/jaunt/wirecrawl.dm @@ -166,7 +166,6 @@ var/turf/oldloc = get_turf(user) var/obj/structure/cable/current = locate() in oldloc if(!current || !istype(current) || !travelled)//if someone snips the wire you're currently in, or it gets destroyed in some way, get out - user.remove_wirevision() eject_jaunter() return @@ -180,20 +179,24 @@ /obj/effect/dummy/phased_mob/wirecrawl/process(delta_time)//so if the existing wire is destroyed, they are forced out . = ..() - var/turf/currentloc = get_turf(user) - var/obj/structure/cable/current = locate() in oldloc + var/turf/currentloc = get_turf(jaunter) + var/obj/structure/cable/current = locate() in currentloc if(!current || !istype(current) || !travelled)//if someone snips the wire you're currently in, or it gets destroyed in some way, get out - user.remove_wirevision() eject_jaunter() return - + +/obj/effect/dummy/phased_mob/wirecrawl/eject_jaunter() + var/mob/living/ejected = jaunter + ejected.remove_wirevision() + . = ..() //vision -/mob/living/proc/update_wire_vision(obj/structure/cable/wire) - if(!wire) - to_chat(src, "Error, @Molti on discord") - return +/mob/living/proc/update_wire_vision(var/obj/structure/cable/wire) + if(!wire) //if there's no wire, grab a random one in the location + wire = locate() in get_turf(src) remove_wirevision() + if(!wire) //if there's STILL no wire, just give up + return add_wirevision(wire) /mob/living/proc/add_wirevision(obj/structure/cable/wire) From f91a9dfaab830af09519c97eaab0a7f090925566 Mon Sep 17 00:00:00 2001 From: Molti Date: Mon, 2 Oct 2023 22:58:30 -0500 Subject: [PATCH 15/17] checkflags --- code/game/objects/items/granters/martial_arts/racial.dm | 2 +- code/modules/spells/spell_types/jaunt/wirecrawl.dm | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/granters/martial_arts/racial.dm b/code/game/objects/items/granters/martial_arts/racial.dm index 5a6f887e2e3f..c2239e983833 100644 --- a/code/game/objects/items/granters/martial_arts/racial.dm +++ b/code/game/objects/items/granters/martial_arts/racial.dm @@ -156,7 +156,7 @@ /obj/item/book/granter/action/wirecrawl - name = "Modified yellow slime extract" + name = "modified yellow slime extract" desc = "An experimental yellow slime extract that when absorbed by an Ethereal, grants control over electrical powers." icon = 'icons/mob/slimes.dmi' icon_state = "yellow slime extract" diff --git a/code/modules/spells/spell_types/jaunt/wirecrawl.dm b/code/modules/spells/spell_types/jaunt/wirecrawl.dm index dfcb69c1df89..ba0ec9a5d277 100644 --- a/code/modules/spells/spell_types/jaunt/wirecrawl.dm +++ b/code/modules/spells/spell_types/jaunt/wirecrawl.dm @@ -13,6 +13,7 @@ spell_requirements = NONE antimagic_flags = NONE panel = null + check_flags = AB_CHECK_CONSCIOUS|AB_CHECK_INCAPACITATED /// The time it takes to enter blood var/enter_blood_time = 3 SECONDS From 13f044b52aad2acafd058183d7485ebd30447e58 Mon Sep 17 00:00:00 2001 From: Molti Date: Mon, 2 Oct 2023 23:09:04 -0500 Subject: [PATCH 16/17] Update racial.dm --- code/game/objects/items/granters/martial_arts/racial.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/granters/martial_arts/racial.dm b/code/game/objects/items/granters/martial_arts/racial.dm index c2239e983833..a3d890d4ad83 100644 --- a/code/game/objects/items/granters/martial_arts/racial.dm +++ b/code/game/objects/items/granters/martial_arts/racial.dm @@ -164,7 +164,7 @@ action_name = "Wirecrawling" drop_sound = null pickup_sound = null - remarks = list("Drain...", "Absorb...", "Shock...", "Zap...", "High Voltage...") + remarks = list("Shock...", "Zap...", "High Voltage...", "Dissolve...", "Dissipate...", "Red Hot...", "Spiral...", "Electro-magnetic...") book_sounds = list('sound/effects/sparks1.ogg','sound/effects/sparks2.ogg','sound/effects/sparks3.ogg') var/admin = FALSE From 5edf1f2a1a7193cf2266e9f720d1d076b758055a Mon Sep 17 00:00:00 2001 From: Molti Date: Mon, 2 Oct 2023 23:10:05 -0500 Subject: [PATCH 17/17] Update racial.dm --- code/game/objects/items/granters/martial_arts/racial.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/granters/martial_arts/racial.dm b/code/game/objects/items/granters/martial_arts/racial.dm index a3d890d4ad83..1364fdef2d1a 100644 --- a/code/game/objects/items/granters/martial_arts/racial.dm +++ b/code/game/objects/items/granters/martial_arts/racial.dm @@ -164,7 +164,7 @@ action_name = "Wirecrawling" drop_sound = null pickup_sound = null - remarks = list("Shock...", "Zap...", "High Voltage...", "Dissolve...", "Dissipate...", "Red Hot...", "Spiral...", "Electro-magnetic...") + remarks = list("Shock...", "Zap...", "High Voltage...", "Dissolve...", "Dissipate...", "Disperse...", "Red Hot...", "Spiral...", "Electro-magnetic...", "Turbo...") book_sounds = list('sound/effects/sparks1.ogg','sound/effects/sparks2.ogg','sound/effects/sparks3.ogg') var/admin = FALSE