From 934ef6dcd04e7a5cd2c682caa2abd26228c2527f Mon Sep 17 00:00:00 2001 From: SteelSlayer Date: Wed, 27 May 2020 18:11:40 -0500 Subject: [PATCH 01/10] guardian coms fix --- .../gamemodes/miniantags/guardian/guardian.dm | 40 +++++++++++-------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/code/game/gamemodes/miniantags/guardian/guardian.dm b/code/game/gamemodes/miniantags/guardian/guardian.dm index 126587a0c97..850c6ef57bd 100644 --- a/code/game/gamemodes/miniantags/guardian/guardian.dm +++ b/code/game/gamemodes/miniantags/guardian/guardian.dm @@ -182,15 +182,18 @@ input = stripped_input(src, "Please enter a message to tell your summoner.", "Guardian", "") else input = message - if(!input) return + if(!input) + return - for(var/mob/M in GLOB.mob_list) - if(M == summoner) - to_chat(M, "[src]: [input]") - log_say("(GUARDIAN to [key_name(M)]) [input]", src) - else if(M in GLOB.dead_mob_list && M.client && M.stat == DEAD && !isnewplayer(M)) - to_chat(M, "Guardian Communication from [src] ([ghost_follow_link(src, ghost=M)]): [input]") + // Show the message to the host and to the guardian. + to_chat(summoner, "[src]: [input]") to_chat(src, "[src]: [input]") + log_say("(GUARDIAN to [key_name(summoner)]) [input]", src) + + // Show the message to any ghosts/dead players. + for(var/mob/M in GLOB.dead_mob_list) + if(M && M.client && M.stat == DEAD && !isnewplayer(M)) + to_chat(M, "Guardian Communication from [src] ([ghost_follow_link(src, ghost=M)]): [input]") //override set to true if message should be passed through instead of going to host communication /mob/living/simple_animal/hostile/guardian/say(message, override = FALSE) @@ -208,18 +211,23 @@ set category = "Guardian" set desc = "Communicate telepathically with your guardian." var/input = stripped_input(src, "Please enter a message to tell your guardian.", "Message", "") - if(!input) return + if(!input) + return - for(var/mob/M in GLOB.mob_list) - if(istype(M, /mob/living/simple_animal/hostile/guardian)) - var/mob/living/simple_animal/hostile/guardian/G = M - if(G.summoner == src) - to_chat(G, "[src]: [input]") - log_say("(GUARDIAN to [key_name(G)]) [input]", src) + // Find the guardian in our host's contents. + var/mob/living/simple_animal/hostile/guardian/G = locate() in contents + if(!G) + return - else if(M in GLOB.dead_mob_list && M.client && M.stat == DEAD && !isnewplayer(M)) - to_chat(M, "Guardian Communication from [src] ([ghost_follow_link(src, ghost=M)]): [input]") + // Show the message to our guardian and to host. + to_chat(G, "[src]: [input]") to_chat(src, "[src]: [input]") + log_say("(GUARDIAN to [key_name(G)]) [input]", src) + + // Show the message to any ghosts/dead players. + for(var/mob/M in GLOB.dead_mob_list) + if(M && M.client && M.stat == DEAD && !isnewplayer(M)) + to_chat(M, "Guardian Communication from [src] ([ghost_follow_link(src, ghost=M)]): [input]") /mob/living/proc/guardian_recall() set name = "Recall Guardian" From dd3749f75ceca2ae909d924627f7e4aa44356003 Mon Sep 17 00:00:00 2001 From: SteelSlayer Date: Thu, 28 May 2020 13:34:58 -0500 Subject: [PATCH 02/10] say logs --- code/game/gamemodes/miniantags/guardian/guardian.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/game/gamemodes/miniantags/guardian/guardian.dm b/code/game/gamemodes/miniantags/guardian/guardian.dm index 850c6ef57bd..7c7f7a9f694 100644 --- a/code/game/gamemodes/miniantags/guardian/guardian.dm +++ b/code/game/gamemodes/miniantags/guardian/guardian.dm @@ -189,6 +189,7 @@ to_chat(summoner, "[src]: [input]") to_chat(src, "[src]: [input]") log_say("(GUARDIAN to [key_name(summoner)]) [input]", src) + create_log(SAY_LOG, "GUARDIAN to HOST: [input]", summoner) // Show the message to any ghosts/dead players. for(var/mob/M in GLOB.dead_mob_list) @@ -223,6 +224,7 @@ to_chat(G, "[src]: [input]") to_chat(src, "[src]: [input]") log_say("(GUARDIAN to [key_name(G)]) [input]", src) + create_log(SAY_LOG, "HOST to GUARDIAN: [input]", G) // Show the message to any ghosts/dead players. for(var/mob/M in GLOB.dead_mob_list) From 645dfe20520bf7398fc8601a246f6a43be62466a Mon Sep 17 00:00:00 2001 From: trololiver112 <59520813+trololiver112@users.noreply.github.com> Date: Fri, 29 May 2020 23:52:19 +0200 Subject: [PATCH 03/10] Fixes the Changeling tentacle grab logging --- code/game/gamemodes/changeling/powers/mutations.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/gamemodes/changeling/powers/mutations.dm b/code/game/gamemodes/changeling/powers/mutations.dm index d225ac6886a..707f3d57573 100644 --- a/code/game/gamemodes/changeling/powers/mutations.dm +++ b/code/game/gamemodes/changeling/powers/mutations.dm @@ -321,7 +321,7 @@ if(INTENT_GRAB) C.visible_message("[L] is grabbed by [H]'s tentacle!","A tentacle grabs you and pulls you towards [H]!") - add_attack_logs(src, C, "[src] has grabbed [C] and pulled them towards [H] with a tentacle") + add_attack_logs(H, C, "[H] grabbed [C] with a changeling tentacle") C.throw_at(get_step_towards(H,C), 8, 2, callback=CALLBACK(H, /mob/proc/tentacle_grab, C)) return 1 From 3b4bda996a431bb787e7675241f7e11f7847684c Mon Sep 17 00:00:00 2001 From: AffectedArc07 Date: Sat, 6 Jun 2020 19:59:04 +0100 Subject: [PATCH 04/10] Re-adds NTTC filtering --- code/game/machinery/tcomms/_base.dm | 2 ++ code/game/machinery/tcomms/core.dm | 37 +++++++++++++++++++++++- code/game/machinery/tcomms/nttc.dm | 7 +++++ nano/templates/tcomms_core.tmpl | 44 +++++++++++++++++++++++++++++ 4 files changed, 89 insertions(+), 1 deletion(-) diff --git a/code/game/machinery/tcomms/_base.dm b/code/game/machinery/tcomms/_base.dm index a857afcef89..7fc2ddae23b 100644 --- a/code/game/machinery/tcomms/_base.dm +++ b/code/game/machinery/tcomms/_base.dm @@ -171,6 +171,8 @@ GLOBAL_LIST_EMPTY(tcomms_machines) var/vname /// List of all channels this can be sent or recieved on var/list/zlevels = list() + /// Should this signal be re-broadcasted (Can be modified by NTTC, defaults to TRUE) + var/pass = TRUE /** * Destructor for the TCM datum. diff --git a/code/game/machinery/tcomms/core.dm b/code/game/machinery/tcomms/core.dm index 9e638913f9d..3fdae14746f 100644 --- a/code/game/machinery/tcomms/core.dm +++ b/code/game/machinery/tcomms/core.dm @@ -1,5 +1,6 @@ #define UI_TAB_CONFIG "CONFIG" #define UI_TAB_LINKS "LINKS" +#define UI_TAB_FILTER "FILTER" /** * # Telecommunications Core @@ -81,6 +82,11 @@ // Now we can run NTTC tcm = nttc.modify_message(tcm) + // If the signal shouldnt be broadcast, dont broadcast it + if(!tcm.pass) + // We still return TRUE here because the signal was handled, even though we didnt broadcast + return TRUE + // Now we generate the list of where that signal should go to tcm.zlevels = reachable_zlevels tcm.zlevels |= tcm.source_level @@ -168,6 +174,9 @@ data["entries"] += list(list("addr" = "\ref[R]", "net_id" = R.network_id, "sector" = R.loc.z, "status" = status, "status_color" = status_color)) // End the shit + if(ui_tab == UI_TAB_FILTER) + data["filtered_users"] = nttc.filtering + return data /obj/machinery/tcomms/core/Topic(href, href_list) @@ -177,7 +186,7 @@ if(href_list["tab"]) // Make sure its a valid tab - if(href_list["tab"] in list(UI_TAB_CONFIG, UI_TAB_LINKS)) + if(href_list["tab"] in list(UI_TAB_CONFIG, UI_TAB_LINKS, UI_TAB_FILTER)) ui_tab = href_list["tab"] // Check if they did a href, but only for that current tab @@ -257,9 +266,35 @@ to_chat(usr, "Successfully changed password from [link_password] to [new_password].") link_password = new_password + if(ui_tab == UI_TAB_FILTER) + if(href_list["add_filter"]) + // This is a stripped input because I did NOT come this far for this system to be abused by HTML injection + var/name_to_add = stripped_input(usr, "Enter a name to add to the filtering list", "Name Entry") + if(name_to_add == "") + return + if(name_to_add in nttc.filtering) + to_chat(usr, "ERROR: User already in filtering list.") + else + nttc.filtering |= name_to_add + log_action(usr, "has added [name_to_add] to the NTTC filter list on core with ID [network_id]", TRUE) + to_chat(usr, "Successfully added [name_to_add] to the NTTC filtering list.") + + + if(href_list["remove_filter"]) + var/name_to_remove = href_list["remove_filter"] + if(!(name_to_remove in nttc.filtering)) + to_chat(usr, "ERROR: Name does not exist in filter list. Please file an issue report.") + else + var/confirm = alert(usr, "Are you sure you want to remove [name_to_remove] from the filtering list?", "Confirm Removal", "Yes", "No") + if(confirm == "Yes") + nttc.filtering -= name_to_remove + log_action(usr, "has removed [name_to_remove] from the NTTC filter list on core with ID [network_id]", TRUE) + to_chat(usr, "Successfully removed [name_to_remove] from the NTTC filtering list.") + // Hack to speed update the nanoUI SSnanoui.update_uis(src) #undef UI_TAB_CONFIG #undef UI_TAB_LINKS +#undef UI_TAB_FILTER diff --git a/code/game/machinery/tcomms/nttc.dm b/code/game/machinery/tcomms/nttc.dm index 6ee158c6cc0..14e932dcf7f 100644 --- a/code/game/machinery/tcomms/nttc.dm +++ b/code/game/machinery/tcomms/nttc.dm @@ -153,6 +153,10 @@ var/list/job_card_styles = list( JOB_STYLE_1, JOB_STYLE_2, JOB_STYLE_3, JOB_STYLE_4 ) + + // List of people who will get blocked out of comms + var/list/filtering = list() + // Used to determine what languages are allowable for conversion. Generated during runtime. var/list/valid_languages = list("--DISABLE--") @@ -220,6 +224,9 @@ // Primary signal modification. This is where all of the variables behavior are actually implemented. /datum/nttc_configuration/proc/modify_message(datum/tcomms_message/tcm) + // Check if they should be blacklisted right off the bat. We can save CPU if the message wont even be processed + if(tcm.sender_name in filtering) + tcm.pass = FALSE // All job and coloring shit if(toggle_job_color || toggle_name_color) var/job = tcm.sender_job diff --git a/nano/templates/tcomms_core.tmpl b/nano/templates/tcomms_core.tmpl index 028f087aec8..bc083e657a7 100644 --- a/nano/templates/tcomms_core.tmpl +++ b/nano/templates/tcomms_core.tmpl @@ -1,5 +1,6 @@ {{:helper.link('Device Configuration', 'wrench', {'tab' : "CONFIG"}, data.tab == "CONFIG" ? 'selected' : '')}} {{:helper.link('Device Links', 'link', {'tab' : "LINKS"}, data.tab == "LINKS" ? 'selected' : '')}} +{{:helper.link('User Filtering', 'user-times', {'tab' : "FILTER"}, data.tab == "FILTER" ? 'selected' : '')}} {{if data.tab == "CONFIG"}}

Core Configuration

@@ -136,4 +137,47 @@ {{/for}} +{{else data.tab == "FILTER"}} + +

Filtering List

+
+
+ {{:helper.link('Add User', 'plus', {'add_filter': 1})}} +
+
+
+ + + + + + + + + + + + + {{for data.filtered_users}} + + + + + {{/for}} + +
NameRemove
{{:value}}{{:helper.link('Remove', 'times', {'remove_filter' : value}, null, 'infoButton')}}
{{/if}} From f6a3a44cb3cad69312b246fc438ad18b5697e482 Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Mon, 8 Jun 2020 19:38:12 -0400 Subject: [PATCH 05/10] Adds Swarming Component --- code/datums/components/swarming.dm | 55 +++++++++++++++++++ code/game/atoms_movable.dm | 11 ++-- code/game/mecha/mecha.dm | 2 +- code/game/objects/effects/spiders.dm | 1 + .../carbon/alien/humanoid/humanoid_defense.dm | 2 +- .../carbon/alien/larva/larva_defense.dm | 2 +- code/modules/mob/living/living.dm | 6 +- .../living/simple_animal/animal_defense.dm | 2 +- .../mob/living/simple_animal/hostile/bees.dm | 1 + .../simple_animal/hostile/mining/hivelord.dm | 1 + .../simple_animal/hostile/spaceworms.dm | 2 +- .../living/simple_animal/hostile/syndicate.dm | 7 ++- .../living/simple_animal/posessed_object.dm | 2 +- paradise.dme | 1 + 14 files changed, 79 insertions(+), 16 deletions(-) create mode 100644 code/datums/components/swarming.dm diff --git a/code/datums/components/swarming.dm b/code/datums/components/swarming.dm new file mode 100644 index 00000000000..c9d20f1f702 --- /dev/null +++ b/code/datums/components/swarming.dm @@ -0,0 +1,55 @@ +/datum/component/swarming + var/offset_x = 0 + var/offset_y = 0 + var/is_swarming = FALSE + var/list/swarm_members = list() + +/datum/component/swarming/Initialize(max_x = 24, max_y = 24) + if(!ismovableatom(parent)) + return COMPONENT_INCOMPATIBLE + offset_x = rand(-max_x, max_x) + offset_y = rand(-max_y, max_y) + + RegisterSignal(parent, COMSIG_MOVABLE_CROSSED, .proc/join_swarm) + RegisterSignal(parent, COMSIG_MOVABLE_UNCROSSED, .proc/leave_swarm) + +/datum/component/swarming/Destroy() + for(var/other in swarm_members) + var/datum/component/swarming/other_swarm = other + other_swarm.swarm_members -= src + if(!other_swarm.swarm_members.len) + other_swarm.unswarm() + swarm_members = null + return ..() + +/datum/component/swarming/proc/join_swarm(datum/source, atom/movable/AM) + var/datum/component/swarming/other_swarm = AM.GetComponent(/datum/component/swarming) + if(!other_swarm) + return + swarm() + swarm_members |= other_swarm + other_swarm.swarm() + other_swarm.swarm_members |= src + +/datum/component/swarming/proc/leave_swarm(datum/source, atom/movable/AM) + var/datum/component/swarming/other_swarm = AM.GetComponent(/datum/component/swarming) + if(!other_swarm || !(other_swarm in swarm_members)) + return + swarm_members -= other_swarm + if(!swarm_members.len) + unswarm() + other_swarm.swarm_members -= src + if(!other_swarm.swarm_members.len) + other_swarm.unswarm() + +/datum/component/swarming/proc/swarm() + var/atom/movable/owner = parent + if(!is_swarming) + is_swarming = TRUE + animate(owner, pixel_x = owner.pixel_x + offset_x, pixel_y = owner.pixel_y + offset_y, time = 2) + +/datum/component/swarming/proc/unswarm() + var/atom/movable/owner = parent + if(is_swarming) + animate(owner, pixel_x = owner.pixel_x - offset_x, pixel_y = owner.pixel_y - offset_y, time = 2) + is_swarming = FALSE diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index ac77d3d4553..9f2a0e09aee 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -233,6 +233,9 @@ SEND_SIGNAL(src, COMSIG_MOVABLE_CROSSED, AM) SEND_SIGNAL(AM, COMSIG_CROSSED_MOVABLE, src) +/atom/movable/Uncrossed(atom/movable/AM) + SEND_SIGNAL(src, COMSIG_MOVABLE_UNCROSSED, AM) + /atom/movable/Bump(atom/A, yes) //the "yes" arg is to differentiate our Bump proc from byond's, without it every Bump() call would become a double Bump(). if(A && yes) SEND_SIGNAL(src, COMSIG_MOVABLE_BUMP, A) @@ -501,7 +504,7 @@ target.fingerprintshidden += fingerprintshidden target.fingerprintslast = fingerprintslast -/atom/movable/proc/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect, end_pixel_y) +/atom/movable/proc/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect) if(!no_effect && (visual_effect_icon || used_item)) do_item_attack_animation(A, visual_effect_icon, used_item) @@ -509,10 +512,6 @@ return //don't do an animation if attacking self var/pixel_x_diff = 0 var/pixel_y_diff = 0 - var/final_pixel_y = initial(pixel_y) - if(end_pixel_y) - final_pixel_y = end_pixel_y - var/direction = get_dir(src, A) if(direction & NORTH) pixel_y_diff = 8 @@ -525,7 +524,7 @@ pixel_x_diff = -8 animate(src, pixel_x = pixel_x + pixel_x_diff, pixel_y = pixel_y + pixel_y_diff, time = 2) - animate(pixel_x = initial(pixel_x), pixel_y = final_pixel_y, time = 2) + animate(pixel_x = pixel_x - pixel_x_diff, pixel_y = pixel_y - pixel_y_diff, time = 2) /atom/movable/proc/do_item_attack_animation(atom/A, visual_effect_icon, obj/item/used_item) var/image/I diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 610436406d8..4234064874a 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -1454,7 +1454,7 @@ ..() -/obj/mecha/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect, end_pixel_y) +/obj/mecha/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect) if(!no_effect) if(selected) used_item = selected diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm index d97663759af..7af5d7a998f 100644 --- a/code/game/objects/effects/spiders.dm +++ b/code/game/objects/effects/spiders.dm @@ -98,6 +98,7 @@ pixel_x = rand(6,-6) pixel_y = rand(6,-6) START_PROCESSING(SSobj, src) + AddComponent(/datum/component/swarming) /obj/structure/spider/spiderling/Destroy() STOP_PROCESSING(SSobj, src) diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm index e7f783acd72..3174879caac 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm @@ -55,7 +55,7 @@ playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1) visible_message("[M] has attempted to disarm [src]!") -/mob/living/carbon/alien/humanoid/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect, end_pixel_y) +/mob/living/carbon/alien/humanoid/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect) if(!no_effect && !visual_effect_icon) visual_effect_icon = ATTACK_EFFECT_CLAW ..() diff --git a/code/modules/mob/living/carbon/alien/larva/larva_defense.dm b/code/modules/mob/living/carbon/alien/larva/larva_defense.dm index 69e12b6ae19..d13dab884b2 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva_defense.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva_defense.dm @@ -31,7 +31,7 @@ step_away(src, user, 15) return TRUE -/mob/living/carbon/alien/larva/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect, end_pixel_y) +/mob/living/carbon/alien/larva/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect) if(!no_effect && !visual_effect_icon) visual_effect_icon = ATTACK_EFFECT_BITE ..() diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index dfa4bb61c9d..9f768ffc76d 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -740,7 +740,8 @@ clear_alert("weightless") else throw_alert("weightless", /obj/screen/alert/weightless) - float(!has_gravity) + if(!flying) + float(!has_gravity) /mob/living/proc/float(on) if(throwing) @@ -825,8 +826,7 @@ spawn_dust() gib() -/mob/living/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect, end_pixel_y) - end_pixel_y = get_standard_pixel_y_offset(lying) +/mob/living/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect) if(!used_item) used_item = get_active_hand() ..() diff --git a/code/modules/mob/living/simple_animal/animal_defense.dm b/code/modules/mob/living/simple_animal/animal_defense.dm index 2cfc5e746dc..b42f3275997 100644 --- a/code/modules/mob/living/simple_animal/animal_defense.dm +++ b/code/modules/mob/living/simple_animal/animal_defense.dm @@ -118,7 +118,7 @@ /mob/living/simple_animal/blob_act(obj/structure/blob/B) adjustBruteLoss(20) -/mob/living/simple_animal/do_attack_animation(atom/A, visual_effect_icon, used_item, no_effect, end_pixel_y) +/mob/living/simple_animal/do_attack_animation(atom/A, visual_effect_icon, used_item, no_effect) if(!no_effect && !visual_effect_icon && melee_damage_upper) if(melee_damage_upper < 10) visual_effect_icon = ATTACK_EFFECT_PUNCH diff --git a/code/modules/mob/living/simple_animal/hostile/bees.dm b/code/modules/mob/living/simple_animal/hostile/bees.dm index c1e7548d9a3..3276416fe7f 100644 --- a/code/modules/mob/living/simple_animal/hostile/bees.dm +++ b/code/modules/mob/living/simple_animal/hostile/bees.dm @@ -60,6 +60,7 @@ /mob/living/simple_animal/hostile/poison/bees/New() ..() generate_bee_visuals() + AddComponent(/datum/component/swarming) /mob/living/simple_animal/hostile/poison/bees/Destroy() beegent = null diff --git a/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm b/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm index ca9b632e06a..a5248e98bb6 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm @@ -90,6 +90,7 @@ /mob/living/simple_animal/hostile/asteroid/hivelordbrood/Initialize(mapload) . = ..() addtimer(CALLBACK(src, .proc/death), 100) + AddComponent(/datum/component/swarming) /mob/living/simple_animal/hostile/asteroid/hivelordbrood/blood diff --git a/code/modules/mob/living/simple_animal/hostile/spaceworms.dm b/code/modules/mob/living/simple_animal/hostile/spaceworms.dm index fd569984920..07f26031ed5 100644 --- a/code/modules/mob/living/simple_animal/hostile/spaceworms.dm +++ b/code/modules/mob/living/simple_animal/hostile/spaceworms.dm @@ -335,7 +335,7 @@ //Jiggle the whole worm forwards towards the next segment -/mob/living/simple_animal/hostile/spaceWorm/do_attack_animation(atom/A, visual_effect_icon, used_item, no_effect, end_pixel_y) +/mob/living/simple_animal/hostile/spaceWorm/do_attack_animation(atom/A, visual_effect_icon, used_item, no_effect) ..() if(previousWorm) previousWorm.do_attack_animation(src) diff --git a/code/modules/mob/living/simple_animal/hostile/syndicate.dm b/code/modules/mob/living/simple_animal/hostile/syndicate.dm index 23970e88826..6f40dfe2a3f 100644 --- a/code/modules/mob/living/simple_animal/hostile/syndicate.dm +++ b/code/modules/mob/living/simple_animal/hostile/syndicate.dm @@ -349,7 +349,8 @@ icon = 'icons/mob/critter.dmi' icon_state = "viscerator_attack" icon_living = "viscerator_attack" - pass_flags = PASSTABLE + pass_flags = PASSTABLE | PASSMOB + a_intent = INTENT_HARM health = 15 maxHealth = 15 obj_damage = 0 @@ -365,3 +366,7 @@ gold_core_spawnable = HOSTILE_SPAWN del_on_death = 1 deathmessage = "is smashed into pieces!" + +/mob/living/simple_animal/hostile/viscerator/Initialize(mapload) + . = ..() + AddComponent(/datum/component/swarming) diff --git a/code/modules/mob/living/simple_animal/posessed_object.dm b/code/modules/mob/living/simple_animal/posessed_object.dm index bde995d8edb..c3cb61d5970 100644 --- a/code/modules/mob/living/simple_animal/posessed_object.dm +++ b/code/modules/mob/living/simple_animal/posessed_object.dm @@ -27,7 +27,7 @@ . += "[src] appears to be having trouble staying afloat!" -/mob/living/simple_animal/possessed_object/do_attack_animation(atom/A, visual_effect_icon, used_item, no_effect, end_pixel_y) +/mob/living/simple_animal/possessed_object/do_attack_animation(atom/A, visual_effect_icon, used_item, no_effect) ..() animate_ghostly_presence(src, -1, 20, 1) // Restart the floating animation after the attack animation, as it will be cancelled. diff --git a/paradise.dme b/paradise.dme index c137faf236f..7393d7c6bb7 100644 --- a/paradise.dme +++ b/paradise.dme @@ -302,6 +302,7 @@ #include "code\datums\components\paintable.dm" #include "code\datums\components\spawner.dm" #include "code\datums\components\squeak.dm" +#include "code\datums\components\swarming.dm" #include "code\datums\components\waddling.dm" #include "code\datums\diseases\_disease.dm" #include "code\datums\diseases\_MobProcs.dm" From c96cbd5c3e26de078ec182b0c10e3d62b102af6b Mon Sep 17 00:00:00 2001 From: mochi Date: Tue, 23 Jun 2020 20:19:11 +0200 Subject: [PATCH 06/10] Fix carbon hitby proc not returning parent result --- code/modules/mob/living/carbon/carbon_defense.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index 75bd6d2664a..e0cba0b0281 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -12,7 +12,7 @@ visible_message("[src] catches [AM]!") throw_mode_off() return TRUE - ..() + return ..() /mob/living/carbon/water_act(volume, temperature, source, method = REAGENT_TOUCH) . = ..() From 63845ef2429c417eb670bd65ff29b1cbd0f943b3 Mon Sep 17 00:00:00 2001 From: joep van der velden Date: Wed, 24 Jun 2020 14:17:56 +0200 Subject: [PATCH 07/10] Makes the assembly cooldown happen before it triggers. Stopping an infinite loop --- code/modules/assembly/assembly.dm | 6 ++---- code/modules/assembly/infrared.dm | 7 +++---- code/modules/assembly/proximity.dm | 7 +++---- code/modules/assembly/signaler.dm | 3 +-- code/modules/assembly/timer.dm | 7 +++---- 5 files changed, 12 insertions(+), 18 deletions(-) diff --git a/code/modules/assembly/assembly.dm b/code/modules/assembly/assembly.dm index 827e7893396..5fea7baa019 100644 --- a/code/modules/assembly/assembly.dm +++ b/code/modules/assembly/assembly.dm @@ -59,8 +59,7 @@ cooldown-- if(cooldown <= 0) return FALSE - spawn(10) - process_cooldown() + addtimer(CALLBACK(src, .proc/process_cooldown), 10) return TRUE /obj/item/assembly/Destroy() @@ -94,8 +93,7 @@ if(!secured || cooldown > 0) return FALSE cooldown = 2 - spawn(10) - process_cooldown() + addtimer(CALLBACK(src, .proc/process_cooldown), 10) return TRUE /obj/item/assembly/toggle_secure() diff --git a/code/modules/assembly/infrared.dm b/code/modules/assembly/infrared.dm index 19263e010ab..400b50614a6 100644 --- a/code/modules/assembly/infrared.dm +++ b/code/modules/assembly/infrared.dm @@ -127,13 +127,12 @@ /obj/item/assembly/infra/proc/trigger_beam() if(!secured || !on || cooldown > 0) return FALSE - pulse(0) + cooldown = 2 + pulse(FALSE) audible_message("[bicon(src)] *beep* *beep*", null, 3) if(first) qdel(first) - cooldown = 2 - spawn(10) - process_cooldown() + addtimer(CALLBACK(src, .proc/process_cooldown), 10) /obj/item/assembly/infra/interact(mob/user)//TODO: change this this to the wire control panel if(!secured) return diff --git a/code/modules/assembly/proximity.dm b/code/modules/assembly/proximity.dm index 7e777f235b1..caefabcb1f8 100644 --- a/code/modules/assembly/proximity.dm +++ b/code/modules/assembly/proximity.dm @@ -47,11 +47,10 @@ /obj/item/assembly/prox_sensor/proc/sense() if(!secured || !scanning || cooldown > 0) return FALSE - pulse(0) - visible_message("[bicon(src)] *beep* *beep*", "*beep* *beep*") cooldown = 2 - spawn(10) - process_cooldown() + pulse(FALSE) + visible_message("[bicon(src)] *beep* *beep*", "*beep* *beep*") + addtimer(CALLBACK(src, .proc/process_cooldown), 10) /obj/item/assembly/prox_sensor/process() if(timing && (time >= 0)) diff --git a/code/modules/assembly/signaler.dm b/code/modules/assembly/signaler.dm index f774d28921f..2759d12c21a 100644 --- a/code/modules/assembly/signaler.dm +++ b/code/modules/assembly/signaler.dm @@ -41,8 +41,7 @@ if(cooldown > 0) return FALSE cooldown = 2 - spawn(10) - process_cooldown() + addtimer(CALLBACK(src, .proc/process_cooldown), 10) signal() return TRUE diff --git a/code/modules/assembly/timer.dm b/code/modules/assembly/timer.dm index cab132ab747..5bbd9a26538 100644 --- a/code/modules/assembly/timer.dm +++ b/code/modules/assembly/timer.dm @@ -39,12 +39,11 @@ /obj/item/assembly/timer/proc/timer_end() if(!secured || cooldown > 0) return FALSE - pulse(0) + cooldown = 2 + pulse(FALSE) if(loc) loc.visible_message("[bicon(src)] *beep* *beep*", "*beep* *beep*") - cooldown = 2 - spawn(10) - process_cooldown() + addtimer(CALLBACK(src, .proc/process_cooldown), 10) /obj/item/assembly/timer/process() if(timing && (time > 0)) From 8b31c5e9584723e7e0a8ab23c09fb0d8261274ea Mon Sep 17 00:00:00 2001 From: AffectedArc07 Date: Wed, 24 Jun 2020 13:48:58 +0100 Subject: [PATCH 08/10] Allows SSinput to recover after an MC crash --- code/controllers/subsystem/input.dm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/controllers/subsystem/input.dm b/code/controllers/subsystem/input.dm index 9dd6fce1554..ecbf1471993 100644 --- a/code/controllers/subsystem/input.dm +++ b/code/controllers/subsystem/input.dm @@ -121,3 +121,8 @@ SUBSYSTEM_DEF(input) for(var/i in 1 to clients.len) var/client/C = clients[i] C.keyLoop() + +/datum/controller/subsystem/input/Recover() + macro_sets = SSinput.macro_sets + movement_keys = SSinput.movement_keys + alt_movement_keys = SSinput.alt_movement_keys From 6644033129a01b590f1142f1a1ba69a06e616bca Mon Sep 17 00:00:00 2001 From: joep van der velden Date: Wed, 24 Jun 2020 17:59:38 +0200 Subject: [PATCH 09/10] Adds whispering to the whisper verb --- code/modules/mob/living/say.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index c272952b6bf..fb633f116bd 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -336,7 +336,8 @@ proc/get_radio_key_from_channel(var/channel) var/datum/multilingual_say_piece/S = message_pieces // Yay BYOND's hilarious typecasting S.speaking.broadcast(src, S.message) return 1 - + // Log it here since it skips the default way say handles it + create_log(SAY_LOG, "(whisper) '[message]'") whisper_say(message_pieces) // for weird circumstances where you're inside an atom that is also you, like pai's From db4d44901d209062a3ca21f149ed3e07b361b774 Mon Sep 17 00:00:00 2001 From: SteelSlayer Date: Wed, 24 Jun 2020 11:33:31 -0500 Subject: [PATCH 10/10] on cross removal --- code/modules/hydroponics/grown.dm | 6 ------ code/modules/hydroponics/growninedible.dm | 7 ------- code/modules/hydroponics/plant_genes.dm | 3 --- 3 files changed, 16 deletions(-) diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index f4a6a18e417..50a7db9952b 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -154,12 +154,6 @@ T.on_consume(src, usr) ..() -/obj/item/reagent_containers/food/snacks/grown/Crossed(atom/movable/AM, oldloc) - if(seed) - for(var/datum/plant_gene/trait/T in seed.genes) - T.on_cross(src, AM) - ..() - /obj/item/reagent_containers/food/snacks/grown/after_slip(mob/living/carbon/human/H) if(!seed) return diff --git a/code/modules/hydroponics/growninedible.dm b/code/modules/hydroponics/growninedible.dm index 13263b4cc75..b27d7504847 100644 --- a/code/modules/hydroponics/growninedible.dm +++ b/code/modules/hydroponics/growninedible.dm @@ -50,13 +50,6 @@ return 1 return 0 - -/obj/item/grown/Crossed(atom/movable/AM, oldloc) - if(seed) - for(var/datum/plant_gene/trait/T in seed.genes) - T.on_cross(src, AM) - ..() - /obj/item/grown/after_slip(mob/living/carbon/human/H) if(!seed) return diff --git a/code/modules/hydroponics/plant_genes.dm b/code/modules/hydroponics/plant_genes.dm index 19209a680ad..a4c6fe7280d 100644 --- a/code/modules/hydroponics/plant_genes.dm +++ b/code/modules/hydroponics/plant_genes.dm @@ -175,9 +175,6 @@ /datum/plant_gene/trait/proc/on_consume(obj/item/reagent_containers/food/snacks/grown/G, mob/living/carbon/target) return -/datum/plant_gene/trait/proc/on_cross(obj/item/reagent_containers/food/snacks/grown/G, atom/target) - return - /datum/plant_gene/trait/proc/on_slip(obj/item/reagent_containers/food/snacks/grown/G, mob/living/carbon/target) return