Merge latest local patches. psp
authorachurch
Sun, 30 Jan 2011 02:11:15 +0900
branchpsp
changeset 654 e9e13ea86644
parent 647 11728bf2bacc (current diff)
parent 653 54626bb54d30 (diff)
child 657 aa9b561ba573
Merge latest local patches.
--- a/game_scripts/scripts/entities/deepjelly.lua	Sat Jan 22 08:46:43 2011 +0900
+++ b/game_scripts/scripts/entities/deepjelly.lua	Sun Jan 30 02:11:15 2011 +0900
@@ -131,7 +131,7 @@
 	
 	entity_setMaxSpeed(me, v.excitedSpeed)
 	v.revertTimer = 3
-	transTime = 0.5
+	local transTime = 0.5
 	local r,g,b = getNoteColor(note)
 	bone_setColor(v.bulb, r,g,b, transTime)
 	r = (r+1.0)/2.0
--- a/game_scripts/scripts/entities/deepwhale.lua	Sat Jan 22 08:46:43 2011 +0900
+++ b/game_scripts/scripts/entities/deepwhale.lua	Sun Jan 30 02:11:15 2011 +0900
@@ -129,6 +129,8 @@
 		debugLog(string.format("curNote: %d", v.curNote))
 		if notes[v.curNote] == note then
 			v.curNote = v.curNote + 1
+		elseif notes[1] == note then
+			v.curNote = 2
 		else
 			v.curNote = 1
 		end
--- a/game_scripts/scripts/entities/finalspiritcommon.lua	Sat Jan 22 08:46:43 2011 +0900
+++ b/game_scripts/scripts/entities/finalspiritcommon.lua	Sun Jan 30 02:11:15 2011 +0900
@@ -21,7 +21,6 @@
 
 v.n = 0
 
-v.a = 0
 v.off = 0
 v.glow = 0
 v.flag = 0
@@ -184,9 +183,9 @@
 		end
 		]]--
 		
-		v.a = t + v.off
-		x = x + math.sin(v.a)*dist
-		y = y + math.cos(v.a)*dist
+		local a = t + v.off
+		x = x + math.sin(a)*dist
+		y = y + math.cos(a)*dist
 		entity_setPosition(me, entity_x(v.n)+x, entity_y(v.n)+y, 0.2)
 		
 		--[[
--- a/game_scripts/scripts/entities/forestgod.lua	Sat Jan 22 08:46:43 2011 +0900
+++ b/game_scripts/scripts/entities/forestgod.lua	Sun Jan 30 02:11:15 2011 +0900
@@ -586,7 +586,7 @@
 		fadeOutMusic(4)
 		
 	elseif entity_isState(me, STATE_SINGNOTE) then
-		v.sungNote = math.random(7)
+		v.sungNote = math.random(8)-1
 		entity_sound(me, string.format("Note%d", v.sungNote), 500, entity_getStateTime(me))
 		v.noteQuad = createQuad(string.format("Song/NoteSymbol%d", v.sungNote), 6)
 		quad_alpha(v.noteQuad, 0)
--- a/game_scripts/scripts/entities/licage.lua	Sat Jan 22 08:46:43 2011 +0900
+++ b/game_scripts/scripts/entities/licage.lua	Sun Jan 30 02:11:15 2011 +0900
@@ -262,6 +262,8 @@
 			--debugLog(string.format("curNote: %d", v.curNote))
 			if notes[v.curNote] == note then
 				v.curNote = v.curNote + 1
+			elseif notes[1] == note then
+				v.curNote = 2
 			else
 				v.curNote = 1
 			end
--- a/game_scripts/scripts/entities/simon.lua	Sat Jan 22 08:46:43 2011 +0900
+++ b/game_scripts/scripts/entities/simon.lua	Sun Jan 30 02:11:15 2011 +0900
@@ -47,10 +47,9 @@
 
 v.idolWeight = 200
 
--- note: check this against creatorform5 when its done
 local function generateSong()
 	for i=1, 10 do
-		v.song[i] = math.random(7)
+		v.song[i] = math.random(8)-1
     end
 end
 
--- a/game_scripts/scripts/include/energyslottemplate.lua	Sat Jan 22 08:46:43 2011 +0900
+++ b/game_scripts/scripts/include/energyslottemplate.lua	Sun Jan 30 02:11:15 2011 +0900
@@ -19,32 +19,33 @@
 
 v = getVars()
 
-v.chargeIDOffset = 5000
+local chargeIDOffset = 5000
+
 function init(me)
 	node_setCursorActivation(me, false)
 	if getFlag(v.flag) > 0 then
-		v.charged = true
-		v.id = getFlag(v.flag)
-		if v.id > v.chargeIDOffset then
-			v.charged = false
-			v.id = v.id - v.chargeIDOffset
+		local charged = true
+		local id = getFlag(v.flag)
+		if id > chargeIDOffset then
+			charged = false
+			id = id - chargeIDOffset
 		end
 		--[[
 		if getFlag(chargeFlag) == 0 then
-			v.charged = false
+			charged = false
 		end
 		]]--
 		
 		v.orbHolder = getEntityByID(v.holderID)		
-		v.energyOrb = getEntityByID(v.id)
+		v.energyOrb = getEntityByID(id)
 		if v.energyOrb ~= 0 and v.orbHolder ~= 0 then
 			--debugLog(string.format("%s : setting orb to %d, %d", node_getName(me), entity_x(v.orbHolder), entity_y(v.orbHolder)))
 			entity_setPosition(v.energyOrb, entity_x(v.orbHolder), entity_y(v.orbHolder))
-			if v.charged then
+			if charged then
 				entity_setState(v.energyOrb, STATE_CHARGED)
 			end
 		end
-		if v.charged then
+		if charged then
 			v.door = getEntityByID(v.doorID)
 			if v.door ~= 0 then
 				entity_setState(v.door, STATE_OPENED)
@@ -54,7 +55,7 @@
 end
 
 function activate(me)
-	if getFlag(v.flag) == 0 or getFlag(v.flag) >= v.chargeIDOffset then
+	if getFlag(v.flag) == 0 or getFlag(v.flag) >= chargeIDOffset then
 		v.energyOrb = node_getNearestEntity(me, "EnergyOrb")
 		if v.energyOrb ~= 0 then
 			if entity_isState(v.energyOrb, STATE_CHARGED) then
@@ -68,7 +69,7 @@
 				end
 			else
 				debugLog("Saving orb in slot, not charged")
-				setFlag(v.flag, entity_getID(v.energyOrb)+v.chargeIDOffset)				
+				setFlag(v.flag, entity_getID(v.energyOrb)+chargeIDOffset)				
 			end
 		else
 			debugLog("Could not find orb")