Skip to content

Commit

Permalink
Merge pull request #401 from dwasint/oshan-qes
Browse files Browse the repository at this point in the history
Oshan Changes
  • Loading branch information
dwasint authored Oct 1, 2023
2 parents 959c20b + 01cb0ba commit 72013d6
Show file tree
Hide file tree
Showing 27 changed files with 2,378 additions and 1,417 deletions.
3,637 changes: 2,276 additions & 1,361 deletions _maps/map_files/Oshan/oshan.dmm

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion code/__DEFINES/subsystems.dm
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@
#define INIT_ORDER_EVENTS 70
#define INIT_ORDER_IDACCESS 66
#define INIT_ORDER_JOBS 65 // Must init before atoms, to set up properly the dynamic job lists.
#define INIT_ORDER_MEDIA_TRACKS 60
#define INIT_ORDER_AI_MOVEMENT 56 //We need the movement setup
#define INIT_ORDER_AI_CONTROLLERS 55 //So the controller can get the ref
#define INIT_ORDER_TICKER 55
Expand All @@ -159,7 +160,6 @@
#define INIT_ORDER_ECONOMY 40
#define INIT_ORDER_OUTPUTS 35
#define INIT_ORDER_RESTAURANT 34
#define INIT_ORDER_MEDIA_TRACKS 33
#define INIT_ORDER_POLLUTION 32
#define INIT_ORDER_ATOMS 30
#define INIT_ORDER_LANGUAGE 25
Expand Down
9 changes: 9 additions & 0 deletions code/datums/status_effects/debuffs/fire_stacks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@

/datum/status_effect/fire_handler/on_creation(mob/living/new_owner, new_stacks, forced = FALSE)
. = ..()
var/turf/source_turf = get_turf(owner)
if(istype(source_turf, /turf/open/floor/plating/ocean))
qdel(src)
return

if(isanimal(owner))
qdel(src)
Expand Down Expand Up @@ -155,6 +159,11 @@
var/last_icon_state

/datum/status_effect/fire_handler/fire_stacks/tick(seconds_per_tick, times_fired)
var/turf/source_turf = get_turf(owner)
if(istype(source_turf, /turf/open/floor/plating/ocean))
qdel(src)
return TRUE

if(stacks <= 0)
qdel(src)
return TRUE
Expand Down
31 changes: 17 additions & 14 deletions code/game/objects/items/rcd/RWD.dm
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@

/obj/item/rwd/AltClick(mob/user)
. = ..()
if(industrial)
return
if(!radial_menu)
radial_menu = list(
"Layer 1" = image(icon = 'icons/hud/radial.dmi', icon_state = "coil-red"),
Expand Down Expand Up @@ -172,19 +174,20 @@

/// modify cable properties according to its layer
/obj/item/rwd/proc/modify_cable(obj/item/stack/cable_coil/target_cable)
switch(cable_layer)
if(CABLE_LAYER_1)
target_cable.set_cable_color(CABLE_COLOR_RED)
target_cable.target_type = /obj/structure/cable/layer1
target_cable.target_layer = CABLE_LAYER_1
if(CABLE_LAYER_2)
target_cable.set_cable_color(CABLE_COLOR_YELLOW)
target_cable.target_type = /obj/structure/cable
target_cable.target_layer = CABLE_LAYER_2
else
target_cable.set_cable_color(CABLE_COLOR_BLUE)
target_cable.target_type = /obj/structure/cable/layer3
target_cable.target_layer = CABLE_LAYER_3
if(!industrial)
switch(cable_layer)
if(CABLE_LAYER_1)
target_cable.set_cable_color(CABLE_COLOR_RED)
target_cable.target_type = /obj/structure/cable/layer1
target_cable.target_layer = CABLE_LAYER_1
if(CABLE_LAYER_2)
target_cable.set_cable_color(CABLE_COLOR_YELLOW)
target_cable.target_type = /obj/structure/cable
target_cable.target_layer = CABLE_LAYER_2
else
target_cable.set_cable_color(CABLE_COLOR_BLUE)
target_cable.target_type = /obj/structure/cable/layer3
target_cable.target_layer = CABLE_LAYER_3
return target_cable

/// get cached reference of cable which gets used over time
Expand All @@ -193,7 +196,7 @@
var/create_amount = min(30, current_amount)
if(create_amount <= 0)
return null
cable = new/obj/item/stack/cable_coil(src, create_amount)
cable = new cabletype(src, create_amount)
return modify_cable(cable)

/// check if the turf has the same cable layer as this design. If it does don't put cable here
Expand Down
15 changes: 12 additions & 3 deletions code/game/sound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,20 @@ GLOBAL_LIST_INIT(proxy_sound_channels, list(

if("[CHANNEL_LOBBYMUSIC]" in prefs.channel_volume)
vol *= prefs.channel_volume["[CHANNEL_LOBBYMUSIC]"] * 0.01
else

if((prefs && (!prefs.read_preference(/datum/preference/toggle/sound_lobby))) || CONFIG_GET(flag/disallow_title_music))
return

if(prefs && (prefs.read_preference(/datum/preference/toggle/sound_lobby)) && !CONFIG_GET(flag/disallow_title_music))
SEND_SOUND(src, sound(SSticker.login_music, repeat = 0, wait = 0, volume = vol, channel = CHANNEL_LOBBYMUSIC)) // MAD JAMS
if(!SSmedia_tracks.lobby_tracks.len || !media)
return

if(SSmedia_tracks.first_lobby_play)
SSmedia_tracks.current_lobby_track = pick(SSmedia_tracks.lobby_tracks)
SSmedia_tracks.first_lobby_play = FALSE

var/datum/media_track/T = SSmedia_tracks.current_lobby_track
media.push_music(T.url, world.time, vol * 0.01)
to_chat(src,"<span class='notice'>Lobby music: <b>[T.title]</b> by <b>[T.artist]</b>.</span>")

/proc/get_rand_frequency()
return rand(32000, 55000) //Frequency stuff only works with 45kbps oggs.
Expand Down
2 changes: 1 addition & 1 deletion code/modules/client/preferences/sounds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
if (value && isnewplayer(client.mob))
client.playtitlemusic()
else
client.mob.stop_sound_channel(CHANNEL_LOBBYMUSIC)
client.media.stop_music()

/// Controls hearing admin music
/datum/preference/toggle/sound_midi
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/dead/new_player/new_player.dm
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
observer.name = observer.real_name
observer.client.init_verbs()
observer.update_appearance()
observer.stop_sound_channel(CHANNEL_LOBBYMUSIC)
observer.client.media.stop_music()
deadchat_broadcast(" has observed.", "<b>[observer.real_name]</b>", follow_target = observer, turf_target = get_turf(observer), message_type = DEADCHAT_DEATHRATTLE)
QDEL_NULL(mind)
qdel(src)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/transform_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
landmark_loc += loc

if(client)
stop_sound_channel(CHANNEL_LOBBYMUSIC)
client.media.stop_music()

var/mob/living/silicon/ai/our_AI = new /mob/living/silicon/ai(pick(landmark_loc), null, src)
. = our_AI
Expand Down
2 changes: 1 addition & 1 deletion config/game_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ MAXFINE 2000

## Comment if you wish to enable title music playing at the lobby screen. This flag is disabled by default to facilitate better code testing on local machines.
## Do keep in mind that this flag will not affect individual player's preferences: if they opt-out on your server, it will never play for them.
DISALLOW_TITLE_MUSIC
# DISALLOW_TITLE_MUSIC

## If enabled, then when the database is disabled, all players will get tutorials.
## This is primarily useful for developing tutorials. If you have a proper DB setup, you
Expand Down
Binary file modified goon/icons/obj/mechcomp.dmi
Binary file not shown.
2 changes: 1 addition & 1 deletion monkestation/code/datums/quirks/neutral_quirks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/obj/item/organ/external/anime_bottom,
)

/datum/quirk/anime/post_add()
/datum/quirk/anime/add(client/client_source)
. = ..()
var/mob/living/carbon/human/human_holder = quirk_holder
var/datum/species/species = human_holder.dna.species
Expand Down
2 changes: 1 addition & 1 deletion monkestation/code/game/machinery/power/ptl.dm
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@

///this is called every time something enters our beams
/obj/machinery/power/transmission_laser/proc/atom_entered_beam(obj/effect/transmission_beam/triggered, atom/movable/arrived)
var/mw_power = charge * 0.000001
var/mw_power = (output_number * power_format_multi_output) * 0.000001
if(mw_power < 25)
if(isliving(arrived))
var/mob/living/arrived_living = arrived
Expand Down
4 changes: 4 additions & 0 deletions monkestation/code/game/sound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@
return GLOB.always_state

/datum/ui_module/volume_mixer/proc/set_channel_volume(channel, vol, mob/user)
if(channel == CHANNEL_LOBBYMUSIC)
if(isnewplayer(user))
user.client.media.update_volume(0.5 + (vol * 0.05))

var/sound/S = sound(null, channel = channel, volume = vol)
S.status = SOUND_UPDATE
SEND_SOUND(usr, S)
Expand Down
19 changes: 15 additions & 4 deletions monkestation/code/modules/cassettes/machines/dj_station.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ GLOBAL_VAR(dj_booth)
//tape stuff goes here
var/pl_index = 0
var/list/current_playlist = list()
var/list/current_namelist = list()

COOLDOWN_DECLARE(next_song_timer)

Expand All @@ -53,7 +54,7 @@ GLOBAL_VAR(dj_booth)
/obj/machinery/cassette/dj_station/examine(mob/user)
. = ..()
if(time_left > 0 || next_song_timer)
. += span_notice("It seems to be cooling down, you estimate it will take about [((time_left + next_song_timer) / 600)] minutes.")
. += span_notice("It seems to be cooling down, you estimate it will take about [time_left ? ((time_left * 10) + 6000) / 600 : next_song_timer - world.time / 600] minutes.")

/obj/machinery/cassette/dj_station/process(seconds_per_tick)
if(waiting_for_yield)
Expand All @@ -71,7 +72,7 @@ GLOBAL_VAR(dj_booth)
return
if((!COOLDOWN_FINISHED(src, next_song_timer)) && !broadcasting)
to_chat(user, span_notice("The [src] feels hot to the touch and needs time to cooldown."))
to_chat(user, span_info("You estimate it will take about [((time_left + next_song_timer) / 600)] minutes to cool down."))
to_chat(user, span_info("You estimate it will take about [time_left ? ((time_left * 10) + 6000) / 600 : next_song_timer - world.time / 600] minutes to cool down."))
return
start_broadcast()

Expand All @@ -98,6 +99,7 @@ GLOBAL_VAR(dj_booth)
current_song_duration = 0
pl_index = 0
current_playlist = list()
current_namelist = list()
stop_broadcast(TRUE)

/obj/machinery/cassette/dj_station/attackby(obj/item/weapon, mob/user, params)
Expand All @@ -121,6 +123,7 @@ GLOBAL_VAR(dj_booth)
current_song_duration = 0
pl_index = 0
current_playlist = list()
current_namelist = list()
insert_tape(attacked)
if(broadcasting)
stop_broadcast(TRUE)
Expand All @@ -139,6 +142,10 @@ GLOBAL_VAR(dj_booth)
for(var/song in list)
current_playlist += song

var/list/name_list = inserted_tape.song_names["[inserted_tape.flipped ? "side2" : "side1"]"]
for(var/song in name_list)
current_namelist += song

/obj/machinery/cassette/dj_station/proc/stop_broadcast(soft = FALSE)
STOP_PROCESSING(SSprocessing, src)
GLOB.dj_broadcast = FALSE
Expand All @@ -160,11 +167,15 @@ GLOBAL_VAR(dj_booth)
people_with_signals = list()

/obj/machinery/cassette/dj_station/proc/start_broadcast()
var/choice = tgui_input_number(usr, "Choose which song number to play.", "[src]", 1, length(current_playlist), 1)
var/choice = tgui_input_list(usr, "Choose which song to play.", "[src]", current_namelist)
if(!choice)
return
var/list_index = current_namelist.Find(choice)
if(!list_index)
return
GLOB.dj_broadcast = TRUE
pl_index = choice
pl_index = list_index

var/list/viable_z = SSmapping.levels_by_any_trait(list(ZTRAIT_STATION, ZTRAIT_MINING, ZTRAIT_CENTCOM))
for(var/mob/living/carbon/anything as anything in GLOB.player_list)
if(!(anything in people_with_signals))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/obj/machinery/media/proc/update_music()
update_media_source()
// Send update to clients.
for(var/mob/M in range(15))
for(var/mob/M in range(15, get_turf(src))) //15 being the max volume of the radio
if(M && M.client)
M.update_music()

Expand Down
11 changes: 1 addition & 10 deletions monkestation/code/modules/cassettes/machines/media/jukebox.dm
Original file line number Diff line number Diff line change
Expand Up @@ -130,18 +130,9 @@
/obj/machinery/media/jukebox/update_icon()
. = ..()
cut_overlays()
if(machine_stat & (NOPOWER|BROKEN) || !anchored)
if(machine_stat & BROKEN)
icon_state = "[state_base]-broken"
else
icon_state = "[state_base]-nopower"
return
icon_state = state_base
if(playing)
if(obj_flags & EMAGGED)
add_overlay("[state_base]-emagged")
else
add_overlay("[state_base]-running")
add_overlay("[state_base]-running")
if (panel_open)
add_overlay("panel_open")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@
owner << output(list2params(list(url, (world.time - start_time) / 10, volume * source_volume, balance)), "[WINDOW_ID]:SetMusic")

/datum/media_manager/proc/push_music(var/targetURL, var/targetStartTime, var/targetVolume, var/targetBalance)
if(targetVolume != source_volume)
push_volume_recalc(targetVolume)

if (url != targetURL || abs(targetStartTime - start_time) > 1)
url = targetURL
start_time = targetStartTime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ SUBSYSTEM_DEF(media_tracks)
var/list/jukebox_tracks = list()
/// Lobby music tracks
var/list/lobby_tracks = list()
///have we picked our lobby song yet?
var/first_lobby_play = TRUE
///current picked lobby song
var/datum/media_track/current_lobby_track

/datum/controller/subsystem/media_tracks/Initialize(timeofday)
load_tracks()
Expand Down
4 changes: 0 additions & 4 deletions monkestation/code/modules/donator/code/datum/loadout.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
/datum/loadout_item/suit/cirno_outfit
name = "Cirno Outfit"
item_path = /obj/item/clothing/suit/costume/cirno
donator_only = TRUE

/datum/loadout_item/head/cirno
name = "Cirno Wig"
item_path = /obj/item/clothing/head/costume/cirno
donator_only = TRUE

/datum/loadout_item/pocket_items/donator/cirno
name = "Pet Delivery Beacon - Cirno"
Expand All @@ -22,7 +20,6 @@
/datum/loadout_item/head/pot
name = "Dented Pot"
item_path = /obj/item/clothing/head/costume/pot
donator_only = TRUE

/datum/loadout_item/pocket_items/donator/spycrab
name = "Pet Delivery Beacon - Spycrab"
Expand All @@ -43,7 +40,6 @@
/datum/loadout_item/suit/shark_costume
name = "Blahaj Costume"
item_path = /obj/item/clothing/suit/hooded/shark_costume
donator_only = TRUE

//ruby_flamewing

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

//spinnermaster
/datum/store_item/suit/shark_costume
name = "Shark Costume"
name = "Blahja Costume"
item_path = /obj/item/clothing/suit/hooded/shark_costume
item_cost = 8000

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 @@ -245,12 +245,15 @@ GLOBAL_LIST_INIT(initalized_ocean_areas, list())
else if(src in SSliquids.active_ocean_turfs)
SSliquids.active_ocean_turfs -= src

/turf/open/floor/plating/ocean/attackby(obj/item/C, mob/user, params)
/turf/open/attackby(obj/item/C, mob/user, params)
. = ..()
if(istype(C, /obj/item/dousing_rod))
var/obj/item/dousing_rod/attacking_rod = C
attacking_rod.deploy(src)

/turf/open/floor/plating/ocean/attackby(obj/item/C, mob/user, params)
. = ..()

if(C.tool_behaviour == TOOL_SHOVEL || C.tool_behaviour == TOOL_MINING)
if(!can_dig(user))
return TRUE
Expand Down
2 changes: 2 additions & 0 deletions monkestation/code/modules/ocean_content/fluff/barrier.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
icon_state = "shieldw"
color = "#33FF33"

max_integrity = 1000000

mouse_opacity = MOUSE_OPACITY_TRANSPARENT
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,14 @@
color = CABLE_HEX_COLOR_CYAN
merge_type = /obj/item/stack/cable_coil/industrial
target_type = /obj/structure/cable/industrial

/obj/item/rwd
var/cabletype = /obj/item/stack/cable_coil
var/industrial = FALSE

/obj/item/rwd/industrial
name = "Industrial Rapid Cable Layer"
desc = "Industrial varient of the Rapid Cable Layer"

cabletype = /obj/item/stack/cable_coil/industrial
industrial = TRUE
Loading

0 comments on commit 72013d6

Please sign in to comment.