Skip to content

Commit

Permalink
Changed the 50 cent coins to be 25 cent (this means that you need to …
Browse files Browse the repository at this point in the history
…insert 2 coins into 294)
  • Loading branch information
ENDSHN committed Aug 7, 2018
1 parent 07d995e commit 53e259b
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Items.bb
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ Function InitItemTemplates()
it = CreateItemTemplate("Movie Ticket", "ticket", "GFX\items\key.b3d", "GFX\items\INVticket.jpg", "GFX\items\ticket.png", 0.002, "GFX\items\tickettexture.png","",0,1+2+8) : it\sound = 0
CreateItemTemplate("Old Badge", "badge", "GFX\items\badge.x", "GFX\items\INVoldbadge.jpg", "GFX\items\badge2.png", 0.0001, "GFX\items\badge2_tex.png","",0,1+2+8)

it = CreateItemTemplate("50 Cent Coin","50ct", "GFX\items\key.b3d", "GFX\items\INVcoin.jpg", "", 0.0005, "GFX\items\coin.png","",0,1+2+8) : it\sound = 3
it = CreateItemTemplate("25 Cent Coin","25ct", "GFX\items\key.b3d", "GFX\items\INVcoin.jpg", "", 0.0005, "GFX\items\coin.png","",0,1+2+8) : it\sound = 3
it = CreateItemTemplate("Wallet","wallet", "GFX\items\wallet.b3d", "GFX\items\INVwallet.jpg", "", 0.0005,"","",1) : it\sound = 2

CreateItemTemplate("SCP-427","scp427","GFX\items\427.b3d","GFX\items\INVscp427.jpg", "", 0.001)
Expand Down
20 changes: 10 additions & 10 deletions Main.bb
Original file line number Diff line number Diff line change
Expand Up @@ -5159,7 +5159,7 @@ Function DrawGUI()
For z% = 0 To OtherSize - 1
If OtherOpen\SecondInv[z]<>Null
Local name$=OtherOpen\SecondInv[z]\itemtemplate\tempname
If name$<>"50ct" And name$<>"coin" And name$<>"key" And name$<>"scp860" And name$<>"scp714" Then
If name$<>"25ct" And name$<>"coin" And name$<>"key" And name$<>"scp860" And name$<>"scp714" Then
isEmpty=False
Exit
EndIf
Expand Down Expand Up @@ -5392,14 +5392,14 @@ Function DrawGUI()
SelectedItem = Null
ElseIf Inventory(MouseSlot) <> SelectedItem
Select SelectedItem\itemtemplate\tempname
Case "paper","key1","key2","key3","key4","key5","key6","misc","oldpaper","badge","ticket","50ct","coin","key","scp860","scp714"
Case "paper","key1","key2","key3","key4","key5","key6","misc","oldpaper","badge","ticket","25ct","coin","key","scp860","scp714"
;[Block]
If Inventory(MouseSlot)\itemtemplate\tempname = "clipboard" Then
;Add an item to clipboard
Local added.Items = Null
Local b$ = SelectedItem\itemtemplate\tempname
Local b2$ = SelectedItem\itemtemplate\name
If (b<>"misc" And b<>"50ct" And b<>"coin" And b<>"key" And b<>"scp860" And b<>"scp714") Or (b2="Playing Card" Or b2="Mastercard") Then
If (b<>"misc" And b<>"25ct" And b<>"coin" And b<>"key" And b<>"scp860" And b<>"scp714") Or (b2="Playing Card" Or b2="Mastercard") Then
For c% = 0 To Inventory(MouseSlot)\invSlots-1
If (Inventory(MouseSlot)\SecondInv[c] = Null)
If SelectedItem <> Null Then
Expand Down Expand Up @@ -5447,7 +5447,7 @@ Function DrawGUI()
If SelectedItem <> Null Then
Inventory(MouseSlot)\SecondInv[c] = SelectedItem
Inventory(MouseSlot)\state = 1.0
If b<>"50ct" And b<>"coin" And b<>"key" And b<>"scp860" And b<>"scp714"
If b<>"25ct" And b<>"coin" And b<>"key" And b<>"scp860" And b<>"scp714"
SetAnimTime Inventory(MouseSlot)\model,3.0
EndIf
Inventory(MouseSlot)\invimg = Inventory(MouseSlot)\itemtemplate\invimg
Expand Down Expand Up @@ -5691,7 +5691,7 @@ Function DrawGUI()
;[Block]
;InvOpen = True
;[End Block]
Case "key1", "key2", "key3", "key4", "key5", "key6", "keyomni", "scp860", "hand", "hand2", "50ct"
Case "key1", "key2", "key3", "key4", "key5", "key6", "keyomni", "scp860", "hand", "hand2", "25ct"
;[Block]
DrawImage(SelectedItem\itemtemplate\invimg, GraphicWidth / 2 - ImageWidth(SelectedItem\itemtemplate\invimg) / 2, GraphicHeight / 2 - ImageHeight(SelectedItem\itemtemplate\invimg) / 2)
;[End Block]
Expand Down Expand Up @@ -9718,7 +9718,7 @@ Function Use914(item.Items, setting$, x#, y#, z#)
End Select

RemoveItem(item)
Case "Playing Card", "Coin", "50 Cent Coin"
Case "Playing Card", "Coin", "25 Cent Coin"
Select setting
Case "rough", "coarse"
d.Decals = CreateDecal(0, x, 8 * RoomScale + 0.005, z, 90, Rand(360), 0)
Expand All @@ -9735,11 +9735,11 @@ Function Use914(item.Items, setting$, x#, y#, z#)
d.Decals = CreateDecal(0, x, 8 * RoomScale + 0.005, z, 90, Rand(360), 0)
d\Size = 0.07 : ScaleSprite(d\obj, d\Size, d\Size)
Case "coarse"
it2 = CreateItem("50 Cent Coin", "50ct", x, y, z)
it2 = CreateItem("25 Cent Coin", "25ct", x, y, z)
Local it3.Items,it4.Items,it5.Items
it3 = CreateItem("50 Cent Coin", "50ct", x, y, z)
it4 = CreateItem("50 Cent Coin", "50ct", x, y, z)
it5 = CreateItem("50 Cent Coin", "50ct", x, y, z)
it3 = CreateItem("25 Cent Coin", "25ct", x, y, z)
it4 = CreateItem("25 Cent Coin", "25ct", x, y, z)
it5 = CreateItem("25 Cent Coin", "25ct", x, y, z)
EntityType (it3\collider, HIT_ITEM)
EntityType (it4\collider, HIT_ITEM)
EntityType (it5\collider, HIT_ITEM)
Expand Down
10 changes: 10 additions & 0 deletions Save.bb
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,11 @@ Function LoadGame(file$)
Local tempName$ = ReadString(f)
Local Name$ = ReadString(f)

If tempName = "50ct" Then
ittName = "25 Cent Coin"
tempName = "25ct"
EndIf

x = ReadFloat(f)
y = ReadFloat(f)
z = ReadFloat(f)
Expand Down Expand Up @@ -1779,6 +1784,11 @@ Function LoadGameQuick(file$)
Local tempName$ = ReadString(f)
Local Name$ = ReadString(f)

If tempName = "50ct" Then
ittName = "25 Cent Coin"
tempName = "25ct"
EndIf

x = ReadFloat(f)
y = ReadFloat(f)
z = ReadFloat(f)
Expand Down
28 changes: 18 additions & 10 deletions UpdateEvents.bb
Original file line number Diff line number Diff line change
Expand Up @@ -2537,20 +2537,28 @@ Function UpdateEvents()
EndIf
EndIf
Next
If SelectedItem<>Null Then
If SelectedItem\itemtemplate\tempname="50ct" Or SelectedItem\itemtemplate\tempname="coin" Then
RemoveItem(SelectedItem)
SelectedItem=Null
e\EventState2 = 1
PlaySound_Strict LoadTempSound("SFX\SCP\294\coin_drop.ogg")
Local inserted% = False
If e\EventState2 < 2 Then
If SelectedItem<>Null Then
If SelectedItem\itemtemplate\tempname="25ct" Or SelectedItem\itemtemplate\tempname="coin" Then
RemoveItem(SelectedItem)
SelectedItem=Null
e\EventState2 = e\EventState2 + 1
PlaySound_Strict LoadTempSound("SFX\SCP\294\coin_drop.ogg")
inserted = True
EndIf
EndIf
EndIf
If e\EventState2 = 1 Then
If e\EventState2 = 2 Then
Using294=temp
If Using294 Then MouseHit1=False
Else
ElseIf e\EventState2 = 1 And (Not inserted) Then
Using294=False
Msg = "You need to insert another 25 cent coin in order to use this machine."
MsgTimer = 70*5
ElseIf (Not inserted) Then
Using294=False
Msg = "You need to insert a 50 cent coin in order to use this machine."
Msg = "You need to insert two 25 cent coins in order to use this machine."
MsgTimer = 70*5
EndIf
EndIf
Expand Down Expand Up @@ -2647,7 +2655,7 @@ Function UpdateEvents()
MoveEntity it\collider,-0.4,0,-0.2
TeleportEntity(it\collider,EntityX(it\collider),EntityY(it\collider),EntityZ(it\collider),-0.02,True,10)
For i = 0 To 1
it2.Items = CreateItem("50 Cent Coin","50ct",1,1,1)
it2.Items = CreateItem("25 Cent Coin","25ct",1,1,1)
it2\Picked = True
it2\Dropped = -1
it2\itemtemplate\found=True
Expand Down

0 comments on commit 53e259b

Please sign in to comment.