Address comments

This commit is contained in:
mochi
2020-07-20 06:59:40 +02:00
parent c60f8761fa
commit dd5c88eb74
9 changed files with 19 additions and 15 deletions
@@ -42,7 +42,8 @@ PROCESSING_SUBSYSTEM_DEF(instruments)
if(!I.id)
qdel(I)
continue
instrument_data[I.id] = I
else
instrument_data[I.id] = I
CHECK_TICK
/**
+1 -1
View File
@@ -131,7 +131,7 @@ SUBSYSTEM_DEF(sounds)
reserved_channels -= text_channel
// push reserve index up, which makes it now on a channel that is reserved
channel_reserve_high++
// swap the reserved channel wtih the unreserved channel so the reserve index is now on an unoccupied channel and the freed channel is next to be used.
// swap the reserved channel with the unreserved channel so the reserve index is now on an unoccupied channel and the freed channel is next to be used.
channel_list.Swap(channel_reserve_high, index)
// now, an existing reserved channel will likely (exception: unreserving last reserved channel) be at index
// get it, and update position.
+1 -1
View File
@@ -22,7 +22,7 @@
return //undeads are unaffected by the spook-pocalypse.
C.Jitter(35)
C.stuttering = 20
if(!istype(H.dna.species, /datum/species/diona) && !istype(H.dna.species, /datum/species/machine) && !istype(H.dna.species, /datum/species/slime) && !istype(H.dna.species, /datum/species/golem) && !istype(H.dna.species, /datum/species/plasmaman) && !istype(H.dna.species, /datum/species/skeleton))
if(!istype(H.dna.species, /datum/species/diona) && !istype(H.dna.species, /datum/species/machine) && !istype(H.dna.species, /datum/species/slime) && !istype(H.dna.species, /datum/species/golem) && !istype(H.dna.species, /datum/species/plasmaman))
C.adjustStaminaLoss(25) //boneless humanoids don't lose the will to live
to_chat(C, "<font color='red' size='4'><B>DOOT</B></font>")
spectral_change(H)
@@ -25,7 +25,7 @@
/obj/item/instrument/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] begins to play 'Gloomy Sunday'! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (BRUTELOSS)
return BRUTELOSS
/obj/item/instrument/attack_self(mob/user)
if(!user.IsAdvancedToolUser())
@@ -170,7 +170,7 @@
w_class = WEIGHT_CLASS_TINY
force = 0
throw_speed = 3
throw_range = 15
throw_range = 7
hitsound = 'sound/items/bikehorn.ogg'
allowed_instrument_ids = "bikehorn"
+8 -4
View File
@@ -33,7 +33,7 @@
var/help = FALSE
/// Repeats left
var/repeat = 1
var/repeat = 0
/// Maximum times we can repeat
var/max_repeats = 10
@@ -135,7 +135,7 @@
tempo = sanitize_tempo(tempo)
src.parent = parent
if(instrument_ids)
allowed_instrument_ids = islist(instrument_ids)? instrument_ids : list(instrument_ids)
allowed_instrument_ids = islist(instrument_ids) ? instrument_ids : list(instrument_ids)
if(length(allowed_instrument_ids))
set_instrument(allowed_instrument_ids[1])
hearing_mobs = list()
@@ -274,7 +274,8 @@
* Converts a tempodiv to ticks to elapse before playing the next chord, taking into account our tempo.
*/
/datum/song/proc/tempodiv_to_delay(tempodiv)
return max(1, round((tempo/tempodiv) / world.tick_lag, 1))
tempodiv = tempodiv || world.tick_lag // Default to world.tick_lag in case someone's trying to be smart
return max(1, round((tempo / tempodiv) / world.tick_lag, 1))
/**
* Compiles chords.
@@ -340,7 +341,10 @@
/datum/song/proc/set_volume(volume)
src.volume = clamp(volume, max(0, min_volume), min(100, max_volume))
update_sustain()
SStgui.update_uis(parent)
// We don't want to send the whole payload (song included) just for volume
var/datum/tgui/ui = SStgui.get_open_ui(usr, parent, "main")
if(ui)
ui.push_data(list("volume" = volume), force = TRUE)
/**
* Setter for setting how low the volume has to get before a note is considered "dead" and dropped
+1 -2
View File
@@ -104,7 +104,7 @@
lines.Cut(num, num + 1)
return TRUE
if("modifyline")
var/num = round(text2num(params["line"]), 1)
var/num = round(text2num(params["line"]))
var/content = stripped_input(usr, "Enter your line: ", parent.name, lines[num], MUSIC_MAXLINECHARS)
if(!content || !in_range(parent, usr))
return
@@ -122,7 +122,6 @@
return TRUE
if("setvolume")
set_volume(round(text2num(params["new"]), 1))
return TRUE
if("setdropoffvolume")
set_dropoff_volume(round(text2num(params["new"]), 0.01))
return TRUE
+3 -3
View File
@@ -68,7 +68,7 @@ const InstrumentHelp = (properties, context) => {
</p>
<p>
<Box as="span" color="highlight">Chords</Box>
can be played simply by seperating each note
&nbsp;can be played simply by seperating each note
with a hyphen: <i>A-C#,Cn-E,E-G#,Gn-B</i>.<br />
A <Box as="span" color="highlight">pause</Box>
&nbsp;may be denoted by an empty chord: <i>C,E,,C,G</i>.
@@ -138,7 +138,7 @@ const InstrumentStatus = (properties, context) => {
<LabeledList.Item label="Playback">
<Button
selected={playing}
disabled={lines.length === 0 || repeat <= 0}
disabled={lines.length === 0 || repeat < 0}
icon="play"
content="Play"
onClick={() => act('play')}
@@ -192,7 +192,7 @@ const InstrumentStatus = (properties, context) => {
maxValue={maxVolume}
value={volume}
stepPixelSize="6"
onChange={(_e, v) => act('setvolume', {
onDrag={(_e, v) => act('setvolume', {
new: v,
})}
/>
File diff suppressed because one or more lines are too long