Skip to content

Commit

Permalink
Merge branch 'Bubberstation:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
MosleyTheMalO authored Nov 2, 2024
2 parents fd94fc3 + f7f0374 commit a8d06a2
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 18 deletions.
56 changes: 38 additions & 18 deletions code/game/objects/structures/lavaland/ore_vent.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
desc = "An ore vent, brimming with underground ore. Scan with an advanced mining scanner to start extracting ore from it."
icon = 'icons/obj/mining_zones/terrain.dmi'
icon_state = "ore_vent"
base_icon_state = "ore_vent"
move_resist = MOVE_FORCE_EXTREMELY_STRONG
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF //This thing will take a beating.
anchored = TRUE
Expand Down Expand Up @@ -91,7 +92,7 @@

/obj/structure/ore_vent/Destroy()
SSore_generation.possible_vents -= src
node = null
reset_drone(success = FALSE)
if(tapped)
SSore_generation.processed_vents -= src
return ..()
Expand Down Expand Up @@ -266,28 +267,40 @@
* Arguments:
* - force: Set to true if you want to just skip all checks and make the vent start producing boulders.
*/
/obj/structure/ore_vent/proc/handle_wave_conclusion(force = FALSE)
/obj/structure/ore_vent/proc/handle_wave_conclusion(datum/source, force = FALSE)
SIGNAL_HANDLER

SEND_SIGNAL(src, COMSIG_VENT_WAVE_CONCLUDED)
COOLDOWN_RESET(src, wave_cooldown)
particles = null

if(QDELETED(node) && !force)
visible_message(span_danger("\the [src] creaks and groans as the mining attempt fails, and the vent closes back up."))
icon_state = initial(icon_state)
update_appearance(UPDATE_ICON_STATE)
node = null
return //Bad end, try again.
else if(!QDELETED(node) && get_turf(node) != get_turf(src) && !force)
visible_message(span_danger("The [node] detaches from the [src], and the vent closes back up!"))
icon_state = initial(icon_state)
update_appearance(UPDATE_ICON_STATE)
UnregisterSignal(node, COMSIG_MOVABLE_MOVED)
node.pre_escape(success = FALSE)
node = null
if(force)
initiate_wave_win()
return

if(QDELETED(node))
initiate_wave_loss(loss_message = "\the [src] creaks and groans as the mining attempt fails, and the vent closes back up.")
return

if(get_turf(node) != get_turf(src))
initiate_wave_loss(loss_message = "The [node] detaches from the [src], and the vent closes back up!")
return //Start over!

initiate_wave_win()

/**
* Handles reseting our ore vent to its original state so we can start over
*/
/obj/structure/ore_vent/proc/initiate_wave_loss(loss_message)
visible_message(span_danger(loss_message))
icon_state = base_icon_state
update_appearance(UPDATE_ICON_STATE)
reset_drone(success = FALSE)

/**
* Handles winning the event, gives everyone a payout and start boulder production
*/
/obj/structure/ore_vent/proc/initiate_wave_win()
tapped = TRUE //The Node Drone has survived the wave defense, and the ore vent is tapped.
SSore_generation.processed_vents += src
log_game("Ore vent [key_name_and_tag(src)] was tapped")
Expand All @@ -296,7 +309,6 @@
icon_state = icon_state_tapped
update_appearance(UPDATE_ICON_STATE)
qdel(GetComponent(/datum/component/gps))
UnregisterSignal(node, COMSIG_QDELETING)

for(var/mob/living/miner in range(7, src)) //Give the miners who are near the vent points and xp.
var/obj/item/card/id/user_id_card = miner.get_idcard(TRUE)
Expand All @@ -308,10 +320,18 @@
if(user_id_card.registered_account)
user_id_card.registered_account.mining_points += point_reward_val
user_id_card.registered_account.bank_card_talk("You have been awarded [point_reward_val] mining points for your efforts.")
node?.pre_escape() //Visually show the drone is done and flies away.
node = null
reset_drone(success = TRUE)
add_overlay(mutable_appearance('icons/obj/mining_zones/terrain.dmi', "well", ABOVE_MOB_LAYER))

/**
* Sends our node back to base and cleans up after the reference
*/
/obj/structure/ore_vent/proc/reset_drone(success)
if(!QDELETED(node))
node.pre_escape(success = success)
UnregisterSignal(node, list(COMSIG_QDELETING, COMSIG_MOVABLE_MOVED))
node = null

/**
* Called when the ore vent is tapped by a scanning device.
* Gives a readout of the ores available in the vent that gets added to the description,
Expand Down
4 changes: 4 additions & 0 deletions html/changelogs/AutoChangeLog-pr-2311.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
author: "Kingsley-95"
delete-after: True
changes:
- rscadd: "Black-Backed Jackal tail"
4 changes: 4 additions & 0 deletions html/changelogs/AutoChangeLog-pr-2320.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
author: "xPokee"
delete-after: True
changes:
- qol: "you can now toggle seeing end credits in preferences"
10 changes: 10 additions & 0 deletions modular_zubbers/code/modules/credits/credits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ GLOBAL_LIST(end_titles)

/client/proc/RollCredits()
set waitfor = FALSE
var/credit_pref = mob.client?.prefs?.read_preference(/datum/preference/toggle/see_credits)
if(!credit_pref)
return

LAZYINITLIST(credits)

Expand Down Expand Up @@ -193,6 +196,13 @@ GLOBAL_LIST(end_titles)

return titles

/// Enables the choice of players disabling seeing the credits
/datum/preference/toggle/see_credits
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "see_credits"
savefile_identifier = PREFERENCE_PLAYER
default_value = TRUE

#undef CREDIT_ROLL_SPEED
#undef CREDIT_SPAWN_SPEED
#undef CREDIT_ANIMATE_HEIGHT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
icon_state = "rattlesnake"
icon = 'modular_zubbers/icons/customization/tails.dmi'

/datum/sprite_accessory/tails/mammal/blackjackal
name = "Black-Backed Jackal"
icon_state = "blackjackal"
icon = 'modular_zubbers/icons/customization/tails.dmi'

/datum/sprite_accessory/tails/mammal/wagging/gecko
name = "Gecko"
icon_state = "gecko"
Expand Down
Binary file modified modular_zubbers/icons/customization/tails.dmi
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { CheckboxInput, FeatureToggle } from '../../base';

export const see_credits: FeatureToggle = {
name: 'See Roundend Credits',
category: 'GAMEPLAY',
description: 'When enabled, you will see the credits sequence at roundend.',
component: CheckboxInput,
};

0 comments on commit a8d06a2

Please sign in to comment.