From dc58ab2df842dc98adf13c36c2ae88454e41015c Mon Sep 17 00:00:00 2001 From: BurgerLUA <8602857+BurgerLUA@users.noreply.github.com> Date: Wed, 21 Aug 2024 12:16:19 -0700 Subject: [PATCH 01/15] Nanotrasen is revived on round end. --- code/_core/client/verbs/game.dm | 2 + code/_core/datum/ai/ai_combat.dm | 6 --- code/_core/datum/ai/ai_life.dm | 8 ++-- code/_core/datum/ai/ai_movement.dm | 4 +- code/_core/datum/damagetype/_damagetype.dm | 47 ++++++++++--------- code/_core/datum/reagent/reagent_nutrition.dm | 5 +- code/_core/mob/living/advanced/species.dm | 2 +- code/_core/mob/living/health.dm | 4 +- code/_core/world/_world.dm | 12 ++++- 9 files changed, 50 insertions(+), 40 deletions(-) diff --git a/code/_core/client/verbs/game.dm b/code/_core/client/verbs/game.dm index b8cf35a318..12e61a4d47 100644 --- a/code/_core/client/verbs/game.dm +++ b/code/_core/client/verbs/game.dm @@ -11,6 +11,8 @@ if(in_sleeper) var/choice = input("Are you sure you want to save your character and cryo? Your items and character will be saved..","Cryogenics","No") in list("Yes","No") | null if(choice == "Yes") + if(P.dead) + return FALSE var/savedata/client/mob/mobdata = MOBDATA(ckey) if(mobdata) mobdata.save_character(P) diff --git a/code/_core/datum/ai/ai_combat.dm b/code/_core/datum/ai/ai_combat.dm index 66c25bd5b5..f0b8d34dd5 100644 --- a/code/_core/datum/ai/ai_combat.dm +++ b/code/_core/datum/ai/ai_combat.dm @@ -32,12 +32,6 @@ /ai/proc/handle_attacking() - if(!can_attack) - return FALSE - - if(!objective_attack) - return FALSE - if(get_dist(owner,objective_attack) > distance_target_max) return FALSE diff --git a/code/_core/datum/ai/ai_life.dm b/code/_core/datum/ai/ai_life.dm index 81163dd0c8..0b7f6a22d4 100644 --- a/code/_core/datum/ai/ai_life.dm +++ b/code/_core/datum/ai/ai_life.dm @@ -1,12 +1,12 @@ /ai/proc/should_life() - if(!active) - return FALSE - if(!owner) qdel(src) return FALSE + if(!active) + return FALSE + if(!owner.finalized) return FALSE @@ -37,7 +37,7 @@ owner.resist() return TRUE - if(aggression > 0) + if(aggression > 0 && can_attack && objective_attack) if(!master_ai) //Find objectives only if you don't belong to a master. objective_ticks += tick_rate var/actual_objective_delay = get_objective_delay() diff --git a/code/_core/datum/ai/ai_movement.dm b/code/_core/datum/ai/ai_movement.dm index 4a3335e20d..eb34ba6a99 100644 --- a/code/_core/datum/ai/ai_movement.dm +++ b/code/_core/datum/ai/ai_movement.dm @@ -32,9 +32,9 @@ if(!objective_attack) return FALSE - if(cowardice >= 0) //RUN AWAY. + if(cowardice >= 0 || world_state >= STATE_ROUND_END) //RUN AWAY. var/health_percent = owner.health ? owner.health.health_current/owner.health.health_max : 1 - if((owner.horizontal || health_percent <= cowardice) && !length(node_path_current) && !length(astar_path_current) && get_dist(owner,objective_attack) <= VIEW_RANGE) + if((owner.horizontal || health_percent <= cowardice || world_state >= STATE_ROUND_END) && !length(node_path_current) && !length(astar_path_current) && get_dist(owner,objective_attack) <= VIEW_RANGE) owner.move_dir = get_dir(objective_attack,owner) owner.movement_flags = MOVEMENT_RUNNING return TRUE diff --git a/code/_core/datum/damagetype/_damagetype.dm b/code/_core/datum/damagetype/_damagetype.dm index e6d26f7171..d6864407a3 100644 --- a/code/_core/datum/damagetype/_damagetype.dm +++ b/code/_core/datum/damagetype/_damagetype.dm @@ -219,6 +219,11 @@ if(!allow_hostile_action(A.loyalty_tag,V)) return null + if(is_living(victim)) + var/mob/living/L = victim + if(L.has_status_effect(IMMORTAL)) + return null + var/list/new_attack_damage = attack_damage_base.Copy() if(is_living(attacker)) @@ -502,7 +507,7 @@ block_multiplier = block_data[2] var/list/damage_to_deal = get_attack_damage(use_blamed_stats ? blamed : attacker,victim,weapon,hit_object,damage_multiplier) - var/list/damage_to_deal_main = list( + var/list/damage_to_deal_core = list( BRUTE = 0, BURN = 0, TOX = 0, @@ -604,12 +609,13 @@ if(debug) log_debug("Adding [damage_type] damage into [pain_damage_to_add] pain damage.") pain_damage += pain_damage_to_add - if(length(damage_to_deal) && !length(defense_rating_victim) || !defense_rating_victim[FATIGUE] || !IS_INFINITY(defense_rating_victim[FATIGUE])) - damage_to_deal[FATIGUE] += CEILING(fatigue_damage,1) + + if(!length(defense_rating_victim) || !(defense_rating_victim[FATIGUE] && IS_INFINITY(defense_rating_victim[FATIGUE]))) + damage_to_deal_core[FATIGUE] += CEILING(fatigue_damage,1) if(debug) log_debug("Dealing [fatigue_damage] extra fatigue damage due to blocked damage.") - if(!length(defense_rating_victim) || !defense_rating_victim[FATIGUE] || !IS_INFINITY(defense_rating_victim[PAIN])) - damage_to_deal[PAIN] += CEILING(pain_damage,1) + if(!length(defense_rating_victim) || !(defense_rating_victim[PAIN] && IS_INFINITY(defense_rating_victim[PAIN]))) + damage_to_deal_core[PAIN] += CEILING(pain_damage,1) if(debug) log_debug("Dealing [pain_damage] extra pain damage due to converted damage.") var/total_damage_dealt = 0 @@ -623,10 +629,10 @@ var/list_length = length(real_damage_type) for(var/single_damage_type in real_damage_type) var/real_damage_amount = CEILING(damage_amount/list_length,1) - damage_to_deal_main[single_damage_type] += real_damage_amount + damage_to_deal_core[single_damage_type] += real_damage_amount if(debug) log_debug("Converting [damage_amount] [damage_type] damage into [real_damage_amount] [single_damage_type] damage.") else - damage_to_deal_main[real_damage_type] += CEILING(damage_amount,1) + damage_to_deal_core[real_damage_type] += CEILING(damage_amount,1) if(debug) log_debug("Converting [damage_amount] [damage_type] damage into [damage_amount] [real_damage_type] damage.") if(defense_rating_victim && defense_rating_victim["items"]) @@ -643,23 +649,23 @@ victim_was_dead = TRUE - var/physical_damage_dealt = damage_to_deal_main[BRUTE] + damage_to_deal_main[BURN] - var/chemical_damage_dealt = damage_to_deal_main[TOX] + damage_to_deal_main[OXY] + damage_to_deal_main[RAD] + var/physical_damage_dealt = damage_to_deal_core[BRUTE] + damage_to_deal_core[BURN] + var/chemical_damage_dealt = damage_to_deal_core[TOX] + damage_to_deal_core[OXY] + damage_to_deal_core[RAD] var/real_damage_dealt = physical_damage_dealt + chemical_damage_dealt - //var/mental_damage_dealt = damage_to_deal_main[SANITY] + damage_to_deal_main[MENTAL] - //var/misc_damage_dealt = damage_to_deal_main[FATIGUE] + damage_to_deal_main[PAIN] + //var/mental_damage_dealt = damage_to_deal_core[SANITY] + damage_to_deal_core[MENTAL] + //var/misc_damage_dealt = damage_to_deal_core[FATIGUE] + damage_to_deal_core[PAIN] if(total_damage_dealt > 0 && hit_object.health && victim.health) hit_object.health.adjust_loss_smart( - brute = damage_to_deal_main[BRUTE], - burn = damage_to_deal_main[BURN], - tox = damage_to_deal_main[TOX], - oxy = damage_to_deal_main[OXY], - fatigue = damage_to_deal_main[FATIGUE], - pain = damage_to_deal_main[PAIN], - rad = damage_to_deal_main[RAD], - sanity = damage_to_deal_main[SANITY], - mental = damage_to_deal_main[MENTAL], + brute = damage_to_deal_core[BRUTE], + burn = damage_to_deal_core[BURN], + tox = damage_to_deal_core[TOX], + oxy = damage_to_deal_core[OXY], + fatigue = damage_to_deal_core[FATIGUE], + pain = damage_to_deal_core[PAIN], + rad = damage_to_deal_core[RAD], + sanity = damage_to_deal_core[SANITY], + mental = damage_to_deal_core[MENTAL], update = FALSE ) @@ -788,7 +794,6 @@ victim.add_skill_xp(SKILL_BLOCK,damage_blocked_with_shield*0.1) . = TRUE - if(!victim.is_player_controlled() && attacker.is_player_controlled()) var/list/experience_gained = list() var/experience_multiplier = victim.get_xp_multiplier() * experience_mod diff --git a/code/_core/datum/reagent/reagent_nutrition.dm b/code/_core/datum/reagent/reagent_nutrition.dm index e29ea7b167..baf7204455 100644 --- a/code/_core/datum/reagent/reagent_nutrition.dm +++ b/code/_core/datum/reagent/reagent_nutrition.dm @@ -125,8 +125,9 @@ else if(amount_to_heal < 0) owner.tox_regen_buffer += amount_to_heal - if(owner.health && (nutrition_normal_amount + nutrition_quality_amount + hydration_amount) != 0 && (owner.move_mod < 3 || owner.next_move <= 0)) //Not sprinting - owner.stamina_regen_buffer += (nutrition_normal_amount + nutrition_quality_amount + hydration_amount) * . *multiplier + var/stamina_to_give = (nutrition_normal_amount + nutrition_quality_amount + hydration_amount) * . *multiplier + if(owner.health && stamina_to_give > 0) + owner.stamina_regen_buffer += stamina_to_give /reagent/nutrition/on_metabolize_blood(var/mob/living/owner,var/reagent_container/container,var/amount_to_metabolize=0,var/starting_volume=0,var/multiplier=1) . = ..() diff --git a/code/_core/mob/living/advanced/species.dm b/code/_core/mob/living/advanced/species.dm index 13bf6f2a83..4569dc76df 100644 --- a/code/_core/mob/living/advanced/species.dm +++ b/code/_core/mob/living/advanced/species.dm @@ -109,7 +109,7 @@ if(set_default || !mobdata || !length(mobdata.loaded_data["organs"])) return ..() - set_mob_data(mobdata["loaded_data"]) + set_mob_data(mobdata.loaded_data) return TRUE diff --git a/code/_core/mob/living/health.dm b/code/_core/mob/living/health.dm index f1664fa75e..14758016a0 100644 --- a/code/_core/mob/living/health.dm +++ b/code/_core/mob/living/health.dm @@ -14,7 +14,7 @@ . = ..() - var/total_bleed_damage = SAFENUM(damage_table[BLADE])*2.5 + SAFENUM(damage_table[BLUNT])*0.75 + SAFENUM(damage_table[PIERCE])*1.5 + var/total_bleed_damage = length(damage_table) ? SAFENUM(damage_table[BLADE])*2.5 + SAFENUM(damage_table[BLUNT])*0.75 + SAFENUM(damage_table[PIERCE])*1.5 : 0 var/savage_hit = health && !has_status_effect(IMMORTAL) ? damage_amount >= health.health_max*DT.savage_hit_threshold : FALSE @@ -55,7 +55,7 @@ if(dead && time_of_death + 30 <= world.time && (override_butcher || length(butcher_contents)) && is_living(attacker) && get_dist(attacker,src) <= 1) var/mob/living/L = attacker - var/blade_damage = SAFENUM(damage_table[BLADE]) + SAFENUM(damage_table[LASER]) + var/blade_damage = length(damage_table) ? SAFENUM(damage_table[BLADE]) + SAFENUM(damage_table[LASER]) : 0 var/atom/atom_to_butcher = src if(is_organ(atom_damaged)) diff --git a/code/_core/world/_world.dm b/code/_core/world/_world.dm index 38098f4a97..acbebc4eb7 100644 --- a/code/_core/world/_world.dm +++ b/code/_core/world/_world.dm @@ -186,11 +186,10 @@ var/global/world_state = STATE_STARTING if(!P.ai) log_error("Warning: Tried saving [P.get_debug_name()] without a ckey_last assigned!") continue var/savedata/client/mob/M = SSclient.ckey_to_mobdata[P.ckey_last] - if(M.save_character(P,died = P.dead)) + if(M.save_character(P)) P.to_chat(span("notice","Your character was automatically saved.")) else P.to_chat(span("danger","Save error! Your character could not be saved!")) - sleep(1) CHECK_TICK_HARD /world/proc/end(var/reason,var/shutdown=FALSE) @@ -219,6 +218,15 @@ var/global/world_state = STATE_STARTING //SSvote.create_vote(/vote/map) + for(var/mob/living/L as anything in SSliving.all_players) + if(L.loyalty_tag != "NanoTrasen") + continue + if(!L.ckey_last) + continue + L.resurrect() + L.add_status_effect(IMMORTAL) + CHECK_TICK_HARD + if(shutdown) broadcast_to_clients(span("notice","Shutting down world in [REBOOT_TIME] seconds due to [nice_reason]. Characters will be saved when the server shuts down.")) CALLBACK("shutdown_world",SECONDS_TO_DECISECONDS(REBOOT_TIME),src,src::shutdown_server()) From 2c64c8d247f2e862e2451a0ceb5963786bb37c18 Mon Sep 17 00:00:00 2001 From: me8my Date: Wed, 21 Aug 2024 20:35:40 -0500 Subject: [PATCH 02/15] Update _tutorial.dm (#690) Fixes a typo in the Tutorial's "get to work" topic --- code/_core/datum/dialogue/tutorial/_tutorial.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/_core/datum/dialogue/tutorial/_tutorial.dm b/code/_core/datum/dialogue/tutorial/_tutorial.dm index ec44eba4c2..4ae21e6d0f 100644 --- a/code/_core/datum/dialogue/tutorial/_tutorial.dm +++ b/code/_core/datum/dialogue/tutorial/_tutorial.dm @@ -120,7 +120,7 @@ dialogue_options["get to work"] = list( "In order to be a smart #1, you must be a well-equipped #2. You should first explore a little, and then head to the #3. \ - From there, you can gear up and then head #4 to help secure the planet from #6 presence.", + From there, you can gear up and then head #4 to help secure the planet from #5 presence.", "Corporate Mercenary", "Corporate Mercenary", "armory", From 45da72b5dfeb2062889edbdfc6459be017890427 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 18:36:25 -0700 Subject: [PATCH 03/15] Bump pillow from 9.3.0 to 10.0.1 in /tools/mapmerge2 (#669) Bumps [pillow](https://github.com/python-pillow/Pillow) from 9.3.0 to 10.0.1. - [Release notes](https://github.com/python-pillow/Pillow/releases) - [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst) - [Commits](https://github.com/python-pillow/Pillow/compare/9.3.0...10.0.1) --- updated-dependencies: - dependency-name: pillow dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- tools/mapmerge2/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/mapmerge2/requirements.txt b/tools/mapmerge2/requirements.txt index 34ea40c487..87b63df267 100644 --- a/tools/mapmerge2/requirements.txt +++ b/tools/mapmerge2/requirements.txt @@ -1,3 +1,3 @@ pygit2==0.27.2 bidict==0.13.1 -Pillow==9.3.0 +Pillow==10.0.1 From 9d08d1335da9d14f844fb4d0d1298c5109cf75e8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Aug 2024 07:03:53 -0700 Subject: [PATCH 04/15] Bump pillow from 10.0.1 to 10.3.0 in /tools/mapmerge2 (#691) Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.0.1 to 10.3.0. - [Release notes](https://github.com/python-pillow/Pillow/releases) - [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst) - [Commits](https://github.com/python-pillow/Pillow/compare/10.0.1...10.3.0) --- updated-dependencies: - dependency-name: pillow dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- tools/mapmerge2/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/mapmerge2/requirements.txt b/tools/mapmerge2/requirements.txt index 87b63df267..4d135ae0dc 100644 --- a/tools/mapmerge2/requirements.txt +++ b/tools/mapmerge2/requirements.txt @@ -1,3 +1,3 @@ pygit2==0.27.2 bidict==0.13.1 -Pillow==10.0.1 +Pillow==10.3.0 From d8187462d2eadf0f3dc196da0b352845a15adda8 Mon Sep 17 00:00:00 2001 From: Gboster-0 <82319946+Gboster-0@users.noreply.github.com> Date: Thu, 22 Aug 2024 16:04:39 +0200 Subject: [PATCH 05/15] boop (#689) --- code/_core/client/life.dm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/code/_core/client/life.dm b/code/_core/client/life.dm index 3fa7f1d32b..9ad48ec6b6 100644 --- a/code/_core/client/life.dm +++ b/code/_core/client/life.dm @@ -1,12 +1,13 @@ /client/proc/on_life() if(length(queued_chat_messages) && queued_chat_messages[1]) - var/list/queued_message = queued_chat_messages[1] - var/text = queued_message["text"] - var/list/targets = queued_message["output_target_list"] - for(var/target in targets) - src << output(text,target) - queued_chat_messages.Cut(1,2) + for(var/i in 1 to length(queued_chat_messages) > 20 ? 3 : 1) // If they have an excessive amount of messages, lets speed up. + var/list/queued_message = queued_chat_messages[1] + var/text = queued_message["text"] + var/list/targets = queued_message["output_target_list"] + for(var/target in targets) + src << output(text,target) + queued_chat_messages.Cut(1,2) if(mob) mob.on_life_client() @@ -82,4 +83,4 @@ else animate(src,pixel_x = 0, pixel_y = 0, time = SECONDS_TO_DECISECONDS(0.5), flags = ANIMATION_LINEAR_TRANSFORM ) */ - return TRUE \ No newline at end of file + return TRUE From 41f2f2b8dc1221bdcb5bc15c4f1634069104297d Mon Sep 17 00:00:00 2001 From: Gboster-0 <82319946+Gboster-0@users.noreply.github.com> Date: Thu, 22 Aug 2024 17:17:07 +0200 Subject: [PATCH 06/15] makes set_level() call on_level_up() (#692) --- code/_core/datum/experience/_experience.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/_core/datum/experience/_experience.dm b/code/_core/datum/experience/_experience.dm index 5e846275e8..3f323f405a 100644 --- a/code/_core/datum/experience/_experience.dm +++ b/code/_core/datum/experience/_experience.dm @@ -57,8 +57,10 @@ /experience/proc/set_level(var/level) if(!ENABLE_XP) return FALSE + var/old_level = get_current_level() experience = level_to_xp(clamp(level,1,get_max_level())) last_level = get_current_level() + on_level_up(old_level, last_level) return experience /experience/proc/get_current_level() @@ -121,4 +123,4 @@ var/mob/living/advanced/player/P = owner if(!P.prestige_count[id]) return 0 - return P.prestige_count[id] \ No newline at end of file + return P.prestige_count[id] From 872eb976aac0334ddb074f9fbdb396a027151faf Mon Sep 17 00:00:00 2001 From: Gboster-0 <82319946+Gboster-0@users.noreply.github.com> Date: Sat, 24 Aug 2024 12:39:21 +0200 Subject: [PATCH 07/15] Makes summoned bosses no longer consider nearby players as valid for blasting their music endlessly into their ears (#693) * beep * missed this subsystem --- code/_core/mob/living/_living.dm | 3 +++ code/_core/world/subsystems/boss.dm | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/code/_core/mob/living/_living.dm b/code/_core/mob/living/_living.dm index 63d4a78607..015930b902 100644 --- a/code/_core/mob/living/_living.dm +++ b/code/_core/mob/living/_living.dm @@ -663,6 +663,9 @@ if(boss) for(var/mob/living/advanced/player/P in viewers(VIEW_RANGE,src)) + if(loyalty_tag == P.loyalty_tag) + continue + for(var/obj/hud/button/boss_health/B in P.buttons) B.target_bosses |= src B.update_stats() diff --git a/code/_core/world/subsystems/boss.dm b/code/_core/world/subsystems/boss.dm index 50329d64cf..2494602bdf 100644 --- a/code/_core/world/subsystems/boss.dm +++ b/code/_core/world/subsystems/boss.dm @@ -36,6 +36,9 @@ SUBSYSTEM_DEF(bosses) var/ai/AI = L.ai if(AI.objective_attack) for(var/mob/living/advanced/player/P in viewers(L.boss_range,L)) + if(L.loyalty_tag == P.loyalty_tag) + continue + CHECK_TICK(tick_usage_max,FPS_SERVER*5) L.add_player_to_boss(P) @@ -83,4 +86,4 @@ SUBSYSTEM_DEF(bosses) players_fighting_boss -= P for(var/obj/hud/button/boss_health/B in P.buttons) B.target_bosses -= src - B.update_stats() \ No newline at end of file + B.update_stats() From dbb121e7984ca203edca396ab271b95d006dea45 Mon Sep 17 00:00:00 2001 From: me8my Date: Sat, 24 Aug 2024 05:39:48 -0500 Subject: [PATCH 08/15] Should fix the vault_02's incorrect wall (#694) * Update _tutorial.dm Fixes a typo in the Tutorial's "get to work" topic * Fixes the hole in one of the syndicate vaults Should fix the wrong wall, and wrong area on one of the tiles in one of the syndicate vault prefabs --- maps/prefabs/vault/02.dmm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/maps/prefabs/vault/02.dmm b/maps/prefabs/vault/02.dmm index fae33b6bc2..a5f7f5fd16 100644 --- a/maps/prefabs/vault/02.dmm +++ b/maps/prefabs/vault/02.dmm @@ -46,9 +46,6 @@ /obj/marker/spawning/random/vault_loot, /turf/simulated/floor/plating/syndicate, /area/mission/prefab/vault/vault_02) -"j" = ( -/turf/simulated/wall/brick/grey, -/area/dmm_suite/clear_area) "k" = ( /obj/structure/interactive/power/apc{ icon_state = "apc"; @@ -143,7 +140,7 @@ b b b b -j +b k b p From 9f9e494a7ec25424747bfcc85d797cd76f0ba169 Mon Sep 17 00:00:00 2001 From: Gboster-0 <82319946+Gboster-0@users.noreply.github.com> Date: Mon, 26 Aug 2024 21:54:20 +0200 Subject: [PATCH 09/15] no longer yoink my nutrition (#697) --- code/_core/mob/living/life.dm | 17 +++++++++-------- code/_core/world/_world.dm | 4 ++-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/code/_core/mob/living/life.dm b/code/_core/mob/living/life.dm index 80003144b4..c9790cdbc0 100644 --- a/code/_core/mob/living/life.dm +++ b/code/_core/mob/living/life.dm @@ -135,13 +135,14 @@ update_eyes() return TRUE -/mob/living/proc/rejuvenate() +/mob/living/proc/rejuvenate(var/reset_nutrition = TRUE) blood_volume = blood_volume_max if(reagents) reagents.remove_all_reagents() - nutrition_normal = initial(nutrition_normal) - nutrition_fast = initial(nutrition_fast) - nutrition_quality = initial(nutrition_quality) - hydration = max(hydration,initial(hydration)) + if(reset_nutrition) + nutrition_normal = initial(nutrition_normal) + nutrition_fast = initial(nutrition_fast) + nutrition_quality = initial(nutrition_quality) + hydration = max(hydration,initial(hydration)) intoxication = initial(intoxication) on_fire = initial(on_fire) fire_stacks = initial(fire_stacks) @@ -159,8 +160,8 @@ stamina_regen_buffer = 0 return TRUE -/mob/living/proc/resurrect() - return rejuvenate() && revive() +/mob/living/proc/resurrect(var/reset_nutrition = TRUE) + return rejuvenate(reset_nutrition) && revive() /mob/living/proc/pre_death() brute_regen_buffer = max(brute_regen_buffer,0) @@ -633,4 +634,4 @@ mob/living/proc/on_life_slow() CALLBACK_REMOVE("\ref[src]_make_unrevivable") - return TRUE \ No newline at end of file + return TRUE diff --git a/code/_core/world/_world.dm b/code/_core/world/_world.dm index acbebc4eb7..7a0eebb5d0 100644 --- a/code/_core/world/_world.dm +++ b/code/_core/world/_world.dm @@ -223,7 +223,7 @@ var/global/world_state = STATE_STARTING continue if(!L.ckey_last) continue - L.resurrect() + L.resurrect(FALSE) L.add_status_effect(IMMORTAL) CHECK_TICK_HARD @@ -236,4 +236,4 @@ var/global/world_state = STATE_STARTING SSdiscord.send_message("Round ended with [length(SSclient.all_clients)] players due to [nice_reason].") - return TRUE \ No newline at end of file + return TRUE From 4a6e64d7a24506bb717a5cc71a74156c27525627 Mon Sep 17 00:00:00 2001 From: me8my Date: Mon, 26 Aug 2024 15:44:22 -0500 Subject: [PATCH 10/15] Fixes ores (#696) Fixes the icon of ores, and fixes the value of stacks of ores --- code/_core/obj/item/material/_material.dm | 3 ++- code/_core/obj/item/material/ore.dm | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/code/_core/obj/item/material/_material.dm b/code/_core/obj/item/material/_material.dm index fd718c41bb..55c38767ec 100644 --- a/code/_core/obj/item/material/_material.dm +++ b/code/_core/obj/item/material/_material.dm @@ -50,6 +50,7 @@ /obj/item/material/get_base_value() var/material/M = SSmaterials.all_materials[material_id] . = M.value_per_unit * material_multiplier + . *= amount . = CEILING(.,1) /obj/item/material/Finalize() @@ -67,4 +68,4 @@ grinder_reagent = M.reagent grinder_reagent_amount = M.reagent_amount * material_multiplier - update_sprite() \ No newline at end of file + update_sprite() diff --git a/code/_core/obj/item/material/ore.dm b/code/_core/obj/item/material/ore.dm index 2b8e1591ed..71217e749f 100644 --- a/code/_core/obj/item/material/ore.dm +++ b/code/_core/obj/item/material/ore.dm @@ -7,7 +7,7 @@ icon_state = null amount_max = 50 - amount_max_icon = 6 + amount_max_icon = 3 material_multiplier = 1 @@ -21,7 +21,7 @@ else name = "[deunderscore(M.name)] ore" color = "#FFFFFF" - icon_state = "[M.icon_state_ore]_[min(amount_max_icon,amount)]" + icon_state = "[M.icon_state_ore]_[min(amount_max_icon,CEILING(amount/15,1))]" return ..() /* From 9d384dc77b9286fc34638484b80ab200c619b41c Mon Sep 17 00:00:00 2001 From: Gboster-0 <82319946+Gboster-0@users.noreply.github.com> Date: Thu, 29 Aug 2024 14:40:17 +0200 Subject: [PATCH 11/15] moar round-end thingies (#698) --- code/__defines/game.dm | 8 ++++-- code/_core/datum/gamemode/horde.dm | 4 +-- code/_core/datum/gamemode/mission.dm | 4 +-- code/_core/datum/vote/continue.dm | 4 +-- code/_core/world/_world.dm | 41 +++++++++++++++++++++++++--- 5 files changed, 48 insertions(+), 13 deletions(-) diff --git a/code/__defines/game.dm b/code/__defines/game.dm index c5db7fba06..e885fffd53 100644 --- a/code/__defines/game.dm +++ b/code/__defines/game.dm @@ -7,10 +7,12 @@ #define GAMEMODE_BREAK 6 #define WORLD_END_SHUTDOWN 0 -#define WORLD_END_NANOTRASEN_VICTORY 1 -#define WORLD_END_SYNDICATE_VICTORY 2 +#define WORLD_END_SYNDICATE_VICTORY 1 +#define WORLD_END_BORING_VICTORY 2 +#define WORLD_END_MINOR_NANOTRASEN_VICTORY 3 +#define WORLD_END_NANOTRASEN_VICTORY 4 #define FAILED "FAILED" #define COMPLETED "COMPLETED" #define ACTIVE "ACTIVE" -#define IMPOSSIBLE "IMPOSSIBLE" \ No newline at end of file +#define IMPOSSIBLE "IMPOSSIBLE" diff --git a/code/_core/datum/gamemode/horde.dm b/code/_core/datum/gamemode/horde.dm index b265c6dd6c..d4d7a05985 100644 --- a/code/_core/datum/gamemode/horde.dm +++ b/code/_core/datum/gamemode/horde.dm @@ -31,7 +31,7 @@ if(can_continue()) SSvote.create_vote(/vote/continue_round) else - world.end(WORLD_END_NANOTRASEN_VICTORY) + world.end() /gamemode/horde/proc/create_horde_mob(var/desired_loc) var/mob/living/L = pickweight(enemy_types_to_spawn) @@ -386,4 +386,4 @@ continue return N_start - return null \ No newline at end of file + return null diff --git a/code/_core/datum/gamemode/mission.dm b/code/_core/datum/gamemode/mission.dm index 1ba5a580c2..d36589657b 100644 --- a/code/_core/datum/gamemode/mission.dm +++ b/code/_core/datum/gamemode/mission.dm @@ -210,7 +210,7 @@ status_display_text = "VOTE" round_time_next = -1 if(allow_continue) - world.end(WORLD_END_NANOTRASEN_VICTORY) + world.end() else SSvote.create_vote(/vote/continue_round) @@ -228,4 +228,4 @@ add_objective(objectives_left[1]) objectives_left.Cut(1,2) else - stage = 5 //No objectives left! \ No newline at end of file + stage = 5 //No objectives left! diff --git a/code/_core/datum/vote/continue.dm b/code/_core/datum/vote/continue.dm index a43fde75f5..0f95475af8 100644 --- a/code/_core/datum/vote/continue.dm +++ b/code/_core/datum/vote/continue.dm @@ -7,8 +7,8 @@ /vote/continue_round/on_result(var/winner,var/list/results) if(winner == "No") - world.end(WORLD_END_NANOTRASEN_VICTORY) + world.end() else SSgamemode.active_gamemode.on_continue() - return TRUE \ No newline at end of file + return TRUE diff --git a/code/_core/world/_world.dm b/code/_core/world/_world.dm index 7a0eebb5d0..f04d868b4e 100644 --- a/code/_core/world/_world.dm +++ b/code/_core/world/_world.dm @@ -192,7 +192,7 @@ var/global/world_state = STATE_STARTING P.to_chat(span("danger","Save error! Your character could not be saved!")) CHECK_TICK_HARD -/world/proc/end(var/reason,var/shutdown=FALSE) +/world/proc/end(var/reason = FALSE, var/shutdown = FALSE) if(world_state != STATE_RUNNING) log_error("Can't end now!") @@ -202,17 +202,50 @@ var/global/world_state = STATE_STARTING world_state = STATE_ROUND_END + if(!reason) + var/gamemode/gamemode = SSgamemode.active_gamemode + var/completed_objectives = length(gamemode.crew_completed_objectives) + var/failed_objectives = length(gamemode.crew_failed_objectives) + var/total_objectives = length(gamemode.crew_active_objectives) + completed_objectives + failed_objectives + + if((completed_objectives || failed_objectives) && total_objectives) + switch((completed_objectives - (failed_objectives * 0.4)) / total_objectives) + if(-INFINITY to 0) + reason = WORLD_END_SYNDICATE_VICTORY + if(0.01 to 0.99) + reason = WORLD_END_MINOR_NANOTRASEN_VICTORY + if(1 to INFINITY) + reason = WORLD_END_NANOTRASEN_VICTORY + + else + reason = WORLD_END_BORING_VICTORY + switch(reason) if(WORLD_END_SHUTDOWN) nice_reason = "Adminbus." + + if(WORLD_END_SYNDICATE_VICTORY) + nice_reason = "Syndicate Victory" + announce("Central Command Mission Update","Fission Mailed","Mission failed, we'll get them next time.") + + if(WORLD_END_BORING_VICTORY) + nice_reason = "Neutral Victory" + announce("Central Command Mission Update","Mission... failure?","You completed no objectives, don't expect to get paid any extra for your \"work\".") + + if(WORLD_END_MINOR_NANOTRASEN_VICTORY) + nice_reason = "Minor Nanotrasen Victory" + SSpayday.stored_payday += 2500 + SSpayday.trigger_payday() + announce("Central Command Mission Update","Minor Mission Success","You completed some of the objectives without fucking up too hard, so here is a small bonus.") + if(WORLD_END_NANOTRASEN_VICTORY) nice_reason = "Nanotrasen Victory" SSpayday.stored_payday += 5000 SSpayday.trigger_payday() announce("Central Command Mission Update","Mission Success","You completed all the objectives without fucking up too hard, so here is a bonus.") - if(WORLD_END_SYNDICATE_VICTORY) - nice_reason = "Syndicate Victory" - announce("Central Command Mission Update","Fission Mailed","Mission failed, we'll get them next time.") + + else + nice_reason = reason play_sound_global('sound/meme/apcdestroyed.ogg',SSliving.all_mobs_with_clients) From 2ae79137f26124c3fc3e1f7128b6b756007c6faa Mon Sep 17 00:00:00 2001 From: Gboster-0 <82319946+Gboster-0@users.noreply.github.com> Date: Thu, 29 Aug 2024 18:45:37 +0200 Subject: [PATCH 12/15] Makes NPC's seek out players again (#700) * repairs AI * tiny fix, or not. Idk --- code/_core/datum/ai/ai_life.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/_core/datum/ai/ai_life.dm b/code/_core/datum/ai/ai_life.dm index 0b7f6a22d4..ea38aa4af5 100644 --- a/code/_core/datum/ai/ai_life.dm +++ b/code/_core/datum/ai/ai_life.dm @@ -37,7 +37,7 @@ owner.resist() return TRUE - if(aggression > 0 && can_attack && objective_attack) + if(aggression > 0 && can_attack) if(!master_ai) //Find objectives only if you don't belong to a master. objective_ticks += tick_rate var/actual_objective_delay = get_objective_delay() @@ -50,7 +50,7 @@ queue_find_new_objectives = TRUE frustration_attack = 0 - if(owner.attack_next <= world.time) + if(objective_attack && (owner.attack_next <= world.time)) handle_attacking() if(queue_find_new_objectives) @@ -229,4 +229,4 @@ set_path_node(null) set_path_astar(null) set_active(FALSE) - return TRUE \ No newline at end of file + return TRUE From fa7df4c878dca13cc1b522418a20a965b05a2014 Mon Sep 17 00:00:00 2001 From: Gboster-0 <82319946+Gboster-0@users.noreply.github.com> Date: Thu, 29 Aug 2024 21:39:33 +0200 Subject: [PATCH 13/15] Makes chemical infused bandages much better (#701) * fixes medicine overflows * le update --- .../obj/item/container/medicine/_medicine.dm | 15 +++++++-------- .../container/medicine/medicine_subtypes.dm | 18 +++++++++--------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/code/_core/obj/item/container/medicine/_medicine.dm b/code/_core/obj/item/container/medicine/_medicine.dm index 971a9efef5..3c130a2922 100644 --- a/code/_core/obj/item/container/medicine/_medicine.dm +++ b/code/_core/obj/item/container/medicine/_medicine.dm @@ -38,15 +38,15 @@ /obj/item/container/healing/Generate(var/desired_loc) . = ..() - if(reagents) reagents.volume_max = amount*reagent_max_per_amount + if(reagents) reagents.volume_max = amount * reagent_max_per_amount /obj/item/container/healing/Finalize(var/desired_loc) . = ..() - if(reagents) reagents.volume_max = amount*reagent_max_per_amount //Safety + if(reagents) reagents.volume_max = amount * reagent_max_per_amount //Safety -/obj/item/container/healing/add_item_count(var/amount_to_add,var/bypass_checks = FALSE) +/obj/item/container/healing/add_item_count(var/amount_to_add, var/bypass_checks = FALSE) . = ..() - if(reagents) reagents.volume_max = max(1,amount)*reagent_max_per_amount + if(reagents && amount) reagents.volume_max = amount * reagent_max_per_amount /obj/item/container/healing/quick(var/mob/caller,var/atom/object,location,params) @@ -98,9 +98,8 @@ P.add_skill_xp(SKILL_MEDICINE,CEILING(experience_gain,1)) if(reagents) - var/reagent_transfer = CEILING((1/amount_max)*reagents.volume_current, 1) - reagents.transfer_reagents_to(A.reagents,reagent_transfer, caller = caller) - reagents.volume_max = amount*10 + var/transfer_amount = min(reagent_max_per_amount, reagents.volume_current) + reagents.transfer_reagents_to(A.reagents, transfer_amount, caller = caller) if(caller == A.loc) caller.visible_message(span("notice","\The [caller.name] bandages their [A.name]."),span("notice","You bandage your [A.name].")) @@ -179,4 +178,4 @@ PROGRESS_BAR_CONDITIONS(caller,src,src::can_be_treated(),caller,object) return TRUE - return ..() \ No newline at end of file + return ..() diff --git a/code/_core/obj/item/container/medicine/medicine_subtypes.dm b/code/_core/obj/item/container/medicine/medicine_subtypes.dm index 4fc8247a86..f616622315 100644 --- a/code/_core/obj/item/container/medicine/medicine_subtypes.dm +++ b/code/_core/obj/item/container/medicine/medicine_subtypes.dm @@ -8,6 +8,7 @@ heal_brute_percent = 0 heal_bleeding = TRUE amount_max = 10 + reagent_max_per_amount = 10 value = 30 @@ -16,7 +17,6 @@ /obj/item/container/healing/bandage/Generate() . = ..() amount = 3 - reagents.volume_max = amount*10 /obj/item/container/healing/bandage/advanced name = "infused bandages (styptic powder)" @@ -27,7 +27,7 @@ /obj/item/container/healing/bandage/advanced/Generate() . = ..() - reagents.add_reagent(/reagent/medicine/styptic_powder,reagents.volume_max) + reagents.add_reagent(/reagent/medicine/styptic_powder, reagents.volume_max) /obj/item/container/healing/ointment name = "ointment" @@ -53,7 +53,7 @@ /obj/item/container/healing/ointment/advanced/Generate() . = ..() - reagents.add_reagent(/reagent/medicine/silver_sulfadiazine,reagents.volume_max) + reagents.add_reagent(/reagent/medicine/silver_sulfadiazine, reagents.volume_max) /obj/item/container/healing/trauma_kit name = "trauma kit" @@ -87,7 +87,7 @@ /obj/item/container/healing/trauma_kit/advanced/Generate() . = ..() - reagents.add_reagent(/reagent/medicine/styptic_powder,reagents.volume_max) + reagents.add_reagent(/reagent/medicine/styptic_powder, reagents.volume_max) /obj/item/container/healing/nanopaste name = "nanopaste" @@ -188,7 +188,7 @@ /obj/item/container/healing/burn_kit/advanced/Generate() . = ..() - reagents.add_reagent(/reagent/medicine/silver_sulfadiazine,reagents.volume_max) + reagents.add_reagent(/reagent/medicine/silver_sulfadiazine, reagents.volume_max) /obj/item/container/healing/cable name = "cable" @@ -229,7 +229,7 @@ /obj/item/container/healing/patch/brute/Generate() . = ..() - reagents.add_reagent(/reagent/medicine/styptic_powder,reagents.volume_max) + reagents.add_reagent(/reagent/medicine/styptic_powder, reagents.volume_max) /obj/item/container/healing/patch/burn name = "burn patch (Silver Sulfadiazine)" @@ -239,7 +239,7 @@ /obj/item/container/healing/patch/burn/Generate() . = ..() - reagents.add_reagent(/reagent/medicine/silver_sulfadiazine,reagents.volume_max) + reagents.add_reagent(/reagent/medicine/silver_sulfadiazine, reagents.volume_max) /obj/item/container/healing/patch/synthflesh name = "regeneration patch (Synthflesh)" @@ -249,7 +249,7 @@ /obj/item/container/healing/patch/synthflesh/Generate() . = ..() - reagents.add_reagent(/reagent/medicine/synthflesh,reagents.volume_max) + reagents.add_reagent(/reagent/medicine/synthflesh, reagents.volume_max) /obj/item/container/healing/gauze name = "gauze" @@ -268,4 +268,4 @@ /obj/item/container/healing/gauze/Generate() . = ..() - amount = 5 \ No newline at end of file + amount = 5 From 25824e8d6249c3958626fd593aac9a6d12f016ff Mon Sep 17 00:00:00 2001 From: Gboster-0 <82319946+Gboster-0@users.noreply.github.com> Date: Fri, 30 Aug 2024 08:15:58 +0200 Subject: [PATCH 14/15] boss pinpointers no longer show corpses (#702) --- code/_core/obj/item/pinpointer.dm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/_core/obj/item/pinpointer.dm b/code/_core/obj/item/pinpointer.dm index 79b97a217e..a26f06e7a0 100644 --- a/code/_core/obj/item/pinpointer.dm +++ b/code/_core/obj/item/pinpointer.dm @@ -361,9 +361,13 @@ var/list/possible_bosses = list() for(var/k in SSbosses.tracked_bosses) - var/atom/A = k + var/mob/living/A = k if(!can_track(A)) continue + if(!is_living(A)) + continue + if(A.health.health_current < 0) + continue var/name_mod = "[A.name] ([dir2text(get_dir_advanced(caller,A))], [get_dist_advanced(src,A)]m)" possible_bosses[name_mod] = A From 92805c1d85b0f3106e199a05b0b1203e13eb169f Mon Sep 17 00:00:00 2001 From: Gboster-0 <82319946+Gboster-0@users.noreply.github.com> Date: Fri, 30 Aug 2024 08:17:20 +0200 Subject: [PATCH 15/15] soulgem tweaks (#699) --- code/_core/obj/item/soulgems/_soulgem.dm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/_core/obj/item/soulgems/_soulgem.dm b/code/_core/obj/item/soulgems/_soulgem.dm index eaaebc9500..8d0d333978 100644 --- a/code/_core/obj/item/soulgems/_soulgem.dm +++ b/code/_core/obj/item/soulgems/_soulgem.dm @@ -70,9 +70,10 @@ var/turf/T = is_turf(hit_atom) ? hit_atom : get_turf(hit_atom) if(T) var/mob/living/mob_to_spawn = stored_soul_path + mob_to_spawn = new mob_to_spawn(T) + mob_to_spawn.soul_size = total_charge src.total_charge = 0 src.stored_soul_path = null - mob_to_spawn = new mob_to_spawn(T) INITIALIZE(mob_to_spawn) GENERATE(mob_to_spawn) master.add_minion(mob_to_spawn) @@ -87,6 +88,7 @@ if(is_advanced(master)) var/mob/living/advanced/A = master src.quick_equip(A,ignore_worn=TRUE,ignore_dynamic=TRUE,silent=TRUE) + update_sprite() /obj/item/soulgem/update_sprite() . = ..() @@ -152,7 +154,7 @@ if(total_charge != 0) caller.to_chat(span("warning","You need an empty soul gem in order to capture souls!")) return TRUE - if(L.soul_size > src.total_capacity) + if(initial(L.soul_size) > src.total_capacity) caller.to_chat(span("warning","This soul is too large to be contained in \the [src.name]!")) return TRUE total_charge = min(L.soul_size,total_capacity) @@ -259,4 +261,4 @@ /obj/item/soulgem/azuras_star total_capacity = SOUL_SIZE_MYSTIC do_not_consume = TRUE - value_burgerbux = 1 \ No newline at end of file + value_burgerbux = 1