Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grah #352

Merged
merged 38 commits into from
Sep 20, 2023
Merged

grah #352

Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
5ac33fa
grah
dwasint Sep 14, 2023
6940d50
fixed
dwasint Sep 14, 2023
b029317
Update ocean_generator.dm
dwasint Sep 14, 2023
65c665a
Update ocean_generator.dm
dwasint Sep 14, 2023
e27b08b
Update ocean_generator.dm
dwasint Sep 14, 2023
d0d292a
Update ocean_generator.dm
dwasint Sep 14, 2023
0c0d36a
better recalc volume, lag fixes for liquids, oceans aren't as all pow…
dwasint Sep 14, 2023
024552c
fixes client comsig sending for living
dwasint Sep 14, 2023
9ef9035
liquid protection fpr exposer
dwasint Sep 14, 2023
257d649
fixes valid_territory, kerpow, trench map, adds stomper stuff
dwasint Sep 16, 2023
f888072
cargo mass buying fix, fixes being sent to detroit if you are a on th…
dwasint Sep 16, 2023
02d8c67
trench map color changes, dousing rod rapid change
dwasint Sep 16, 2023
21af2a1
Update tgstation.dme
dwasint Sep 16, 2023
73269b3
fissures are no a lavalike entity
dwasint Sep 16, 2023
4b9ef03
oops
dwasint Sep 16, 2023
0c8e51c
fixes lighting
dwasint Sep 16, 2023
c844035
fixes oshan day night cycle
dwasint Sep 16, 2023
2501520
elevator fix
dwasint Sep 16, 2023
2e01ecd
this is why i need pings, this took way longer than it should
dwasint Sep 16, 2023
89379c2
Update _particle_weather.dm
dwasint Sep 16, 2023
5c770dd
Merge branch 'master' into sounds
dwasint Sep 16, 2023
07e640e
Update sunlight_object.dm
dwasint Sep 16, 2023
7faff0d
blocks weathering if on a shuttle area because shuttle code scraping …
dwasint Sep 16, 2023
7f6190b
fixes emissive eyes, fixes beard offsets
dwasint Sep 17, 2023
9543e66
Revert "fixes emissive eyes, fixes beard offsets"
dwasint Sep 17, 2023
eb641a5
Update hotspot_controller.dm
dwasint Sep 17, 2023
326d1dd
admin message on cassette review lets admins look over rejected ones …
dwasint Sep 17, 2023
15c9b01
Update chicken_behaviors.dm
dwasint Sep 17, 2023
36260d5
Update chicken_behaviors.dm
dwasint Sep 17, 2023
b8e575f
Update Oshan.dmm
dwasint Sep 18, 2023
e7e6465
dumb to basic
dwasint Sep 18, 2023
57e2ff4
clown_disbelief
dwasint Sep 19, 2023
6f331b2
should fix pirate summoning
dwasint Sep 19, 2023
1f9d6cb
Update bloodysoles.dm
dwasint Sep 19, 2023
967cfa7
Revert "Update bloodysoles.dm"
dwasint Sep 19, 2023
e68ad26
fixes
dwasint Sep 19, 2023
985b3b0
this is a needed change
dwasint Sep 19, 2023
3f095a4
new doors
dwasint Sep 19, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions code/__DEFINES/liquids.dm
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@

#define SUBMERGEMENT_PERCENT(carbon, liquids) min(1,(!MOBILITY_STAND ? liquids.liquid_group.group_overlay_state+LYING_DOWN_SUBMERGEMENT_STATE_BONUS : liquids.liquid_group.group_overlay_state)/TOTAL_LIQUID_STATES)

#define LIQUID_PROTECTION "liquid_protection"

GLOBAL_LIST_INIT(liquid_blacklist, list(
/datum/reagent/sorium,
/datum/reagent/liquid_dark_matter
Expand Down
1 change: 1 addition & 0 deletions code/modules/clothing/spacesuits/_spacesuits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
equip_delay_other = 80
resistance_flags = NONE
actions_types = list(/datum/action/item_action/toggle_spacesuit)
clothing_traits = list(LIQUID_PROTECTION)
var/temperature_setting = BODYTEMP_NORMAL /// The default temperature setting
var/obj/item/stock_parts/cell/cell = /obj/item/stock_parts/cell/high /// If this is a path, this gets created as an object in Initialize.
var/cell_cover_open = FALSE /// Status of the cell cover on the suit
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/mob_movement.dm
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
if(mob.control_object)
return Move_object(direct)
if(!isliving(mob))
SEND_SIGNAL(src, COMSIG_MOB_CLIENT_MOVED_CLIENT_SEND, direct)
SEND_SIGNAL(src, COMSIG_MOB_CLIENT_MOVED_CLIENT_SEND, direct, new_loc)
return mob.Move(new_loc, direct)
if(mob.stat == DEAD)
mob.ghostize()
Expand Down Expand Up @@ -156,7 +156,7 @@
// At this point we've moved the client's attached mob. This is one of the only ways to guess that a move was done
// as a result of player input and not because they were pulled or any other magic.
SEND_SIGNAL(mob, COMSIG_MOB_CLIENT_MOVED, direct, old_dir)
SEND_SIGNAL(src, COMSIG_MOB_CLIENT_MOVED_CLIENT_SEND, direct)
SEND_SIGNAL(src, COMSIG_MOB_CLIENT_MOVED_CLIENT_SEND, direct, new_loc)

var/atom/movable/P = mob.pulling
if(P && !ismob(P) && P.density)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
if (client?.media && !client.media.forced)
client.media.recalc_volume()

/datum/media_manager/proc/recalc_volume()
/datum/media_manager/proc/recalc_volume(datum/source, direction, turf/new_loc)
if(!(owner.prefs))
return

Expand All @@ -213,8 +213,8 @@

var/obj/machinery/media/M = A.media_source
if(M && M.playing)
var/dist = get_dist(owner.mob, M)
var/x_dist = -(owner.mob.x - M.x) * 10
var/dist = get_dist(new_loc, M)
var/x_dist = -(new_loc.x - M.x) * 10

targetVolume = max(0, M.volume - (dist * 0.1))
targetBalance = x_dist
Expand Down
2 changes: 1 addition & 1 deletion monkestation/code/modules/liquids/liquid_controller.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ SUBSYSTEM_DEF(liquids)

LG.build_turf_reagent()
LG.process_cached_edges()
LG.process_group()
LG.process_group(TRUE)
if(populate_evaporation && LG.expected_turf_height < LIQUID_STATE_ANKLES && LG.evaporates)
for(var/tur in LG.members)
var/turf/listed_turf = tur
Expand Down
15 changes: 4 additions & 11 deletions monkestation/code/modules/liquids/liquid_groups.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ GLOBAL_VAR_INIT(liquid_debug_colors, FALSE)
var/group_temperature = 300
///the generated color used to apply coloring to all the members
var/group_color
///a variable to forcibly trigger a recount of our reagents
var/updated_total = FALSE
///have we failed a process? if so we are added to a death check so it will gracefully die on its own
var/failed_death_check = FALSE
///the burn power of our group, used to determine how strong we burn each process_fire()
Expand Down Expand Up @@ -101,7 +99,6 @@ GLOBAL_VAR_INIT(liquid_debug_colors, FALSE)
members[T] = TRUE
T.liquids.liquid_group = src
reagents.maximum_volume += 1000 /// each turf will hold 1000 units plus the base amount spread across the group
updated_total = TRUE
if(group_color)
T.liquids.color = group_color
process_group()
Expand All @@ -121,7 +118,6 @@ GLOBAL_VAR_INIT(liquid_debug_colors, FALSE)
if(!members.len)
qdel(src)
return
updated_total = TRUE
process_group()

/datum/liquid_group/proc/remove_all()
Expand All @@ -148,7 +144,6 @@ GLOBAL_VAR_INIT(liquid_debug_colors, FALSE)

total_reagent_volume = reagents.total_volume
reagents_per_turf = total_reagent_volume / length(members)
updated_total = TRUE

qdel(otherg)
process_group()
Expand All @@ -164,7 +159,7 @@ GLOBAL_VAR_INIT(liquid_debug_colors, FALSE)
failed_death_check = TRUE

///PROCESSING
/datum/liquid_group/proc/process_group()
/datum/liquid_group/proc/process_group(from_SS = FALSE)
if(merging)
return
if(!members || !members.len) // this ideally shouldn't exist, ideally groups would die before they got to this point but alas here we are
Expand All @@ -185,8 +180,7 @@ GLOBAL_VAR_INIT(liquid_debug_colors, FALSE)
cached_temperature_shift =((math_cache.return_temperature() * max(1, math_cache.total_moles())) + ((group_temperature * max(1, (total_reagent_volume * 0.025))))) / (max(1, (total_reagent_volume * 0.025)) + max(1, math_cache.total_moles()))
temperature_shift_needs_action = TRUE

if(total_reagent_volume != reagents.total_volume || updated_total)
updated_total = FALSE
if(from_SS)
total_reagent_volume = reagents.total_volume
reagents.handle_reactions()

Expand Down Expand Up @@ -293,7 +287,6 @@ GLOBAL_VAR_INIT(liquid_debug_colors, FALSE)
reagents.remove_any(amount, TRUE)
if(remover)
check_liquid_removal(remover, amount)
updated_total = TRUE
total_reagent_volume = reagents.total_volume
reagents_per_turf = total_reagent_volume / members.len
expected_turf_height = CEILING(reagents_per_turf, 1) / LIQUID_HEIGHT_DIVISOR
Expand All @@ -305,14 +298,12 @@ GLOBAL_VAR_INIT(liquid_debug_colors, FALSE)
reagents.remove_reagent(reagent_type.type, amount)
if(remover)
check_liquid_removal(remover, amount)
updated_total = TRUE
total_reagent_volume = reagents.total_volume

/datum/liquid_group/proc/transfer_to_atom(obj/effect/abstract/liquid_turf/remover, amount, atom/transfer_target, transfer_method = INGEST)
reagents.trans_to(transfer_target, amount, methods = transfer_method)
if(remover)
check_liquid_removal(remover, amount)
updated_total = TRUE
total_reagent_volume = reagents.total_volume

/datum/liquid_group/proc/move_liquid_group(obj/effect/abstract/liquid_turf/member)
Expand Down Expand Up @@ -732,6 +723,8 @@ GLOBAL_VAR_INIT(liquid_debug_colors, FALSE)
/datum/liquid_group/proc/expose_atom(atom/target, modifier = 0, method)
if(!turf_reagents)
return
if(HAS_TRAIT(target, LIQUID_PROTECTION))
return
turf_reagents.expose(target, method, liquid = TRUE)

/datum/liquid_group/proc/spread_liquid(turf/new_turf, turf/source_turf)
Expand Down
5 changes: 4 additions & 1 deletion monkestation/code/modules/liquids/liquid_ocean.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ GLOBAL_LIST_INIT(initalized_ocean_areas, list())

/area/ocean/dark
base_lighting_alpha = 0

/area/ruin/ocean
has_gravity = TRUE

Expand Down Expand Up @@ -77,7 +78,7 @@ GLOBAL_LIST_INIT(initalized_ocean_areas, list())
light_power = 0.75

var/static/obj/effect/abstract/ocean_overlay/static_overlay
var/static/list/ocean_reagents = list(/datum/reagent/water = 100)
var/static/list/ocean_reagents = list(/datum/reagent/water = 10)
var/ocean_temp = T20C
var/list/ocean_turfs = list()
var/list/open_turfs = list()
Expand Down Expand Up @@ -490,10 +491,12 @@ GLOBAL_LIST_INIT(the_lever, list())
base_lighting_alpha = 0
//map_generator = /datum/map_generator/ocean_generator
map_generator = /datum/map_generator/cave_generator/trench
area_flags = VALID_TERRITORY | UNIQUE_AREA | CAVES_ALLOWED | FLORA_ALLOWED | MOB_SPAWN_ALLOWED | MEGAFAUNA_SPAWN_ALLOWED
dwasint marked this conversation as resolved.
Show resolved Hide resolved


/area/ocean/generated_above
map_generator = /datum/map_generator/ocean_generator
area_flags = VALID_TERRITORY | UNIQUE_AREA | CAVES_ALLOWED | FLORA_ALLOWED | MOB_SPAWN_ALLOWED

/turf/open/floor/plating/ocean/pit
name = "pit"
Expand Down
22 changes: 0 additions & 22 deletions monkestation/code/modules/liquids/ocean_generator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,6 @@
string_gen = rustg_cnoise_generate("[initial_closed_chance]", "[smoothing_iterations]", "[birth_limit]", "[death_limit]", "[world.maxx]", "[world.maxy]") //Generate the raw CA data

// Area var pullouts to make accessing in the loop faster
var/flora_allowed = (generate_in.area_flags & FLORA_ALLOWED) && length(flora_spawn_list)
var/feature_allowed = (generate_in.area_flags & FLORA_ALLOWED) && length(feature_spawn_list)
var/mobs_allowed = (generate_in.area_flags & MOB_SPAWN_ALLOWED) && length(mob_spawn_list)
var/megas_allowed = (generate_in.area_flags & MEGAFAUNA_SPAWN_ALLOWED) && length(megafauna_spawn_list)

Expand All @@ -208,26 +206,6 @@
var/spawned_something = FALSE

///Spawning isn't done in procs to save on overhead on the 60k turfs we're going through.
//FLORA SPAWNING HERE
if(flora_allowed && prob(flora_spawn_chance))
var/flora_type = pick(flora_spawn_list)
new flora_type(new_turf)
spawned_something = TRUE

//FEATURE SPAWNING HERE
if(feature_allowed && prob(feature_spawn_chance))
var/can_spawn = TRUE

var/atom/picked_feature = pick(feature_spawn_list)

for(var/obj/structure/existing_feature in range(7, new_turf))
if(istype(existing_feature, picked_feature))
can_spawn = FALSE
break

if(can_spawn)
new picked_feature(new_turf)
spawned_something = TRUE

//MOB SPAWNING HERE
if(mobs_allowed && !spawned_something && prob(mob_spawn_chance))
Expand Down
2 changes: 1 addition & 1 deletion monkestation/code/modules/liquids/tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
for(var/turf/open/floor/plating/ocean/listed_ocean as anything in SSliquids.ocean_turfs)
if(!rebuilt)
listed_ocean.ocean_reagents = list()
listed_ocean.ocean_reagents[chosen_reagent] = 100
listed_ocean.ocean_reagents[chosen_reagent] = 10
listed_ocean.static_overlay.mix_colors(listed_ocean.ocean_reagents)
for(var/area/ocean/ocean_types in GLOB.initalized_ocean_areas)
ocean_types.base_lighting_color = listed_ocean.static_overlay.color
Expand Down
Loading