Browse Source

Working on the icon based music actions.

Netuttki 3 years ago
parent
commit
6c54432dd4
4 changed files with 95 additions and 9 deletions
  1. 5 1
      locations/bedrPar.qsrc
  2. 15 5
      locations/dachain.qsrc
  3. 68 0
      locations/music_actions.qsrc
  4. 7 3
      locations/sitr.qsrc

+ 5 - 1
locations/bedrPar.qsrc

@@ -257,11 +257,13 @@ end
 if ml_guitar['carried'] = 1:
 	act 'Place the guitar next to your desk': 
 		ml_guitar['carried'] = 0
+		$ml_guitar['location'] = $curloc
 		gt 'bedrPar', 'start'
 	end
 elseif ml_guitar['hasguitar'] and ml_guitar['carried'] = 0:
 	act 'Pick up the guitar':
 		ml_guitar['carried'] = 1
+		$ml_guitar['location'] = ''
 		gt 'bedrPar', 'start'
 	end
 end
@@ -302,8 +304,10 @@ if hour > 8 and hour < 22:
 	if ml_guitar['hasguitar'] = 1:
 		act 'Play something on the guitar (10 minutes)':
 			mood += 10
+			minut += 10
+			gs 'stat'
 			'You pick up your guitar and start to play some songs you know, just for your own entertainment.'
-			'You hum along the tune, relaxing into the music, just enjoying it. When you look up a quarter of an hour has passed and you are in a much better mood.'
+			'You hum along the tune, relaxing into the music, just enjoying it. When you look up about 10 minutes has passed and you are in a much better mood.'
 		end
 	end
 

+ 15 - 5
locations/dachain.qsrc

@@ -47,17 +47,27 @@ if $args[0] = '':
 	if ml_guitar['carried'] = 1:
 		act 'Place the guitar next to your desk': 
 			ml_guitar['carried'] = 0
-			ml_guitarAtHome = 1
-			gt $loc
+			$ml_guitar['location'] = $curloc
+			gt 'daichan', ''
 		end
-	elseif ml_guitarAtHome = 1:
+	elseif ml_guitar['hasguitar'] and ml_guitar['carried'] = 0:
 		act 'Pick up the guitar':
 			ml_guitar['carried'] = 1
-			ml_guitarAtHome = 0
-			gt $loc
+			$ml_guitar['location'] = ''
+			gt 'daichan', ''
 		end
 	end
 
+	if ml_guitar['hasguitar'] = 1:
+		act 'Play something on the guitar (10 minutes)':
+			mood += 10
+			minut += 10
+			gs 'stat'
+			'You pick up your guitar and start to play some songs you know, just for your own entertainment.'
+			'You hum along the tune, relaxing into the music, just enjoying it. When you look up a quarter of an hour passed and you are in a much better mood.'
+		end
+	end
+	
 	!!Guitar practice 
 	if ml_guitar['hasguitar'] = 1 and (ml_guitar['chordbook'] = 1 or ml_guitarlesson['lessoncount'] > 0) and ml_performance['performed_minutes'] <= ml_performance['max_perform_minutes']:
 		act 'Practice guitar (0:30)': gt 'music_bedroomPractice', 'guitar'

+ 68 - 0
locations/music_actions.qsrc

@@ -0,0 +1,68 @@
+# music_actions
+
+if ARGS[0] = 'start' : 
+
+    *cla
+
+    if $location_type = 'private':
+
+        if ml_guitar['carried'] = 1:
+            act 'Place the guitar next to your desk': 
+                ml_guitar['carried'] = 0
+                ml_guitar['location'] = $ARGS[0]
+            end
+        elseif ml_guitar['location'] = $ARGS[0]:
+            act 'Pick up the guitar':
+                ml_guitar['carried'] = 1
+                ml_guitar['location'] = 'carried'
+            end
+        end
+        if $ARGS[0] = 'sitr': gt 'sitr'
+        elseif ARGS[0] = 'daichan': gt 'daichan'
+        else gt ARGS[0], 'start'
+
+    end
+
+	if ml_guitar['carried'] = 1:
+		act 'Play something on the guitar (10 minutes)':
+			mood += 10
+			minut += 10
+			gs 'stat'
+			'You pick up your guitar and start to play some songs you know, just for your own entertainment.'
+			'You hum along the tune, relaxing into the music, just enjoying it. When you look up a quarter of an hour passed and you are in a much better mood.'
+		end
+	end
+
+    if ml_online['account'] = 0 and internet > 0: 
+        act 'Set up an online music account (0:30)': gt 'music_onlinemusic', 'setupAccount'
+    end
+
+    !!Uploading recorded music if there are any not uploaded yet
+    if ml_uploadablemusic > 0 and internet > 0 and ml_online['account'] = 1:
+        if pcs_inhib < 30:
+            if pcs_inhib < 10: 
+                $diff = 'hard'
+            elseif pcs_inhib < 20: 
+                $diff = 'medium'
+            else 
+                $diff = 'easy'
+            end
+            gs 'willpower', 'skill', 'self', $diff
+
+            will_cost = (will_cost * 2) - (pcs_perform)
+            if will_cost <= pcs_willpwr:
+                act 'Upload music (<<will_cost>> Willpower)': gt 'music_onlinemusic', 'uploadmusic'
+            else	
+                act 'Upload music (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
+            end
+        end
+        act 'Upload music': gt 'music_onlinemusic', 'uploadallmusic'
+    end
+
+    if ml_uploadablemusic > 0:
+        act 'Delete old recordings': gt 'music_onlinemusic', 'deleteoldmusic'
+    end
+
+end
+
+--- music_actions ---------------------------------

+ 7 - 3
locations/sitr.qsrc

@@ -92,12 +92,14 @@ end
 if ml_guitar['carried'] = 1:
 	act 'Place the guitar next to your desk': 
 		ml_guitar['carried'] = 0
-		gt 'bedrPar', 'start'
+		$ml_guitar['location'] = $curloc
+		gt 'sitr'
 	end
-elseif ml_guitar['hasguitar'] = 1 and ml_guitar['carried'] = 0:
+elseif ml_guitar['hasguitar'] and ml_guitar['carried'] = 0:
 	act 'Pick up the guitar':
 		ml_guitar['carried'] = 1
-		gt 'bedrPar', 'start'
+		$ml_guitar['location'] = ''
+		gt 'sitr'
 	end
 end
 
@@ -137,6 +139,8 @@ if hour > 8 and hour < 22:
 	if ml_guitar['hasguitar'] = 1:
 		act 'Play something on the guitar (10 minutes)':
 			mood += 10
+			minut += 10
+			gs 'stat'
 			'You pick up your guitar and start to play some songs you know, just for your own entertainment.'
 			'You hum along the tune, relaxing into the music, just enjoying it. When you look up a quarter of an hour passed and you are in a much better mood.'
 		end