Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Jan 30, 2025
2 parents b388be7 + c9ff77c commit 998c490
Show file tree
Hide file tree
Showing 11 changed files with 69 additions and 4 deletions.
1 change: 1 addition & 0 deletions _maps/cyberiad.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"map_file": "Cyberiad.dmm",
"fluff_name": "ИСН Кибериада",
"welcome_sound_override": "modular_bandastation/aesthetics_sounds/sound/welcome_sounds/welcome_cyberiad.ogg",
"main_floor": 2,
"shuttles": {
"cargo": "cargo_box",
"ferry": "ferry_fancy",
Expand Down
1 change: 1 addition & 0 deletions _maps/icebox.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"space_ruin_levels": 0,
"space_empty_levels": 0,
"planetary": 1,
"main_floor": 3,
"shuttles": {
"cargo": "cargo_box",
"ferry": "ferry_fancy",
Expand Down
1 change: 1 addition & 0 deletions _maps/nebulastation.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"map_name": "NebulaStation",
"map_path": "map_files/NebulaStation",
"map_file": "NebulaStation.dmm",
"main_floor": 2,
"shuttles": {
"cargo": "cargo_nebula",
"ferry": "ferry_nebula",
Expand Down
1 change: 1 addition & 0 deletions _maps/tramstation.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"map_name": "Tramstation",
"map_path": "map_files/tramstation",
"map_file": "tramstation.dmm",
"main_floor": 2,
"shuttles": {
"cargo": "cargo_box",
"ferry": "ferry_fancy",
Expand Down
1 change: 1 addition & 0 deletions _maps/wawastation.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"map_name": "Wawastation",
"map_path": "map_files/wawastation",
"map_file": "wawastation.dmm",
"main_floor": 1,
"shuttles": {
"cargo": "cargo_box",
"ferry": "ferry_fancy",
Expand Down
12 changes: 11 additions & 1 deletion code/datums/map_config.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
var/space_empty_levels = DEFAULT_SPACE_EMPTY_LEVELS
/// Boolean that tells us if this is a planetary station. (like IceBoxStation)
var/planetary = FALSE

///The type of mining Z-level that should be loaded.
var/minetype = "lavaland"
///If no minetype is set, this will be the blacklist file used
Expand All @@ -49,6 +49,11 @@
/// Boolean that tells SSmapping to load all away missions in the codebase.
var/load_all_away_missions = FALSE

// BANDASTATION ADDITION START - Underfloor Blobs
/// Main floor of the map. Null as default, if not specified in json
var/main_floor = null
// BANDASTATION ADDITION END - Underfloor Blobs

// BANDASTATION ADDITION START - Station Fluff
/// This name will override all other station names, like holiday or randomly generated.
/// Station name change still will work.
Expand Down Expand Up @@ -199,6 +204,11 @@
if ("load_all_away_missions" in json)
load_all_away_missions = json["load_all_away_missions"]

// BANDASTATION ADDITION START - Underfloor Blobs
if ("main_floor" in json)
main_floor = json["main_floor"]
// BANDASTATION ADDITION END - Underfloor Blobs

// BANDASTATION ADDITION START - Station Fluff
if ("fluff_name" in json)
fluff_name = json["fluff_name"]
Expand Down
6 changes: 3 additions & 3 deletions code/modules/antagonists/blob/powers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@
to_chat(src, span_warning("There is no blob adjacent to the target tile!"))
return FALSE

if(!can_buy(BLOB_EXPAND_COST))
if(!can_buy(expand_cost)) // BANDASTATION EDIT - Underfloor Blobs
return FALSE

var/attack_success
Expand All @@ -316,7 +316,7 @@
add_points(BLOB_ATTACK_REFUND)
else
to_chat(src, span_warning("There is a blob there!"))
add_points(BLOB_EXPAND_COST) //otherwise, refund all of the cost
add_points(expand_cost) //otherwise, refund all of the cost // BANDASTATION EDIT - Underfloor Blobs
else
directional_attack(tile, possible_blobs, attack_success)

Expand Down Expand Up @@ -349,7 +349,7 @@
playsound(attacker, 'sound/effects/splat.ogg', 50, TRUE)
add_points(BLOB_ATTACK_REFUND)
else
add_points(BLOB_EXPAND_COST) //if we're attacking diagonally and didn't hit anything, refund
add_points(expand_cost) //if we're attacking diagonally and didn't hit anything, refund // BANDASTATION EDIT - Underfloor Blobs
return TRUE

/** Rally spores to a location */
Expand Down
4 changes: 4 additions & 0 deletions html/changelogs/bandastation/AutoChangeLog-pr-1066.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
author: "Chorden523"
delete-after: True
changes:
- rscadd: "Добавлены наклейки на ID карту"
19 changes: 19 additions & 0 deletions modular_bandastation/_helpers220/code/unsorted.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Checks if the target's Z-level is the "main" station floor for the current map.
*
* This proc compares the Z-level of the target atom with the main station floor Z-level
* specified in the map's JSON configuration. If the target's Z-level matches the main floor,
* it returns TRUE; otherwise, it returns FALSE.
*
* @param target The atom whose Z-level is being checked.
* @return TRUE if the target is on the main station floor, FALSE otherwise.
*/
/datum/controller/subsystem/mapping/proc/is_main_station_floor(atom/target)
// If main_floor is not specified in the JSON, assume the target is ON the main floor
if(isnull(current_map.main_floor))
return TRUE

// Get Z-levels associated with the station
var/list/station_levels = levels_by_trait(ZTRAIT_STATION)

return target.z == station_levels[current_map.main_floor]
1 change: 1 addition & 0 deletions modular_bandastation/balance/_balance.dme
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "code/cargo/packs/livestock.dm"
#include "code/cargo/packs/science.dm"
#include "code/cargo/packs/security.dm"
#include "code/blob.dm"
#include "code/crew_manifest.dm"
#include "code/dynamic.dm"
#include "code/events.dm"
Expand Down
26 changes: 26 additions & 0 deletions modular_bandastation/balance/code/blob.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/mob/eye/blob
var/expand_cost = BLOB_EXPAND_COST

/mob/eye/blob/Initialize(mapload, starting_points)
. = ..()
check_station_floor()

/mob/eye/blob/Login()
. = ..()
if(!SSmapping.is_main_station_floor(src))
var/list/blob_message = list("[span_boldwarning("Поскольку Вы находитесь не на основном этаже станции, Вы получаете следующие дебаффы:")]\n")
blob_message += "1. Вам требуется больше тайлов для захвата.\n"
blob_message += "2. Вам требуется больше ресурсов для установки тайла блоба."
to_chat(src, boxed_message(blob_message.Join()))

/mob/eye/blob/proc/check_station_floor()
if(SSmapping.is_main_station_floor(src))
return
expand_cost = BLOB_EXPAND_COST * 2
blobwincount = 700

/datum/action/innate/blobpop/Activate(timer_activated = FALSE)
if(!SSmapping.is_main_station_floor(usr))
if(tgui_alert(usr, "Вы находитесь не на основном этаже станции. Появление приведёт к накладыванию дебаффа. Вы уверены?", "Появление Блоба", list("Да", "Нет")) != "Да")
return
return ..()

0 comments on commit 998c490

Please sign in to comment.