Skip to content

Commit

Permalink
Make vendor machines and Jukebox work with electricity (#1447)
Browse files Browse the repository at this point in the history
* Fix vendor machines and add multiple options and stock

* Fix logging

* Add electricity consumption to VendorMachines and Jukebox

* Rename field

* Tie UseMachineOnce to tick

---------

Co-authored-by: Mechar418 <iamteapot42@gmail.com>
  • Loading branch information
David-Goru and iamteapot422 authored Jul 19, 2024
1 parent c2310ad commit 5ebfcba
Show file tree
Hide file tree
Showing 10 changed files with 318 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ GameObject:
- component: {fileID: 4294524822034227355}
- component: {fileID: 1326650896113229434}
- component: {fileID: 8174704186285038031}
- component: {fileID: 8272970134100573020}
- component: {fileID: 5978761350964980520}
m_Layer: 0
m_Name: JukeboxBlueGreen
m_TagString: Untagged
Expand Down Expand Up @@ -104,6 +106,8 @@ MonoBehaviour:
<PredictedSpawn>k__BackingField: {fileID: 0}
_networkBehaviours:
- {fileID: 8174704186285038031}
- {fileID: 8272970134100573020}
- {fileID: 5978761350964980520}
<ParentNetworkObject>k__BackingField: {fileID: 0}
<ChildNetworkObjects>k__BackingField: []
SerializedTransformProperties:
Expand All @@ -115,7 +119,7 @@ MonoBehaviour:
_initializeOrder: 0
_defaultDespawnType: 0
NetworkObserver: {fileID: 0}
<PrefabId>k__BackingField: 123
<PrefabId>k__BackingField: 155
<SpawnableCollectionId>k__BackingField: 0
_scenePathHash: 0
<SceneId>k__BackingField: 0
Expand Down Expand Up @@ -149,11 +153,46 @@ MonoBehaviour:
_componentIndexCache: 0
_addedNetworkObject: {fileID: 4294524822034227355}
_networkObjectCache: {fileID: 4294524822034227355}
_powerConsumer: {fileID: 8272970134100573020}
_songs:
- {fileID: 8300000, guid: ec8b849764a7e9147b2a565f81a1ca42, type: 3}
- {fileID: 8300000, guid: fd331e360db5fbb448e66367e41d1893, type: 3}
- {fileID: 8300000, guid: 3f51862f0b88a5243a8cceb97147489d, type: 3}
RadioOn: 0
CurrentMusic: 0
InteractionIcon: {fileID: 0}
InteractionIcon: {fileID: 21300000, guid: d1f34343e08a14e48a856e409c355f32, type: 3}
InteractionIconOn: {fileID: 0}
--- !u!114 &8272970134100573020
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6118765911134750290}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ea15f8a26dac4e4193bb75335cb9e9cd, type: 3}
m_Name:
m_EditorClassIdentifier:
_componentIndexCache: 1
_addedNetworkObject: {fileID: 4294524822034227355}
_networkObjectCache: {fileID: 4294524822034227355}
_powerConsumptionIdle: 0.5
_powerConsumptionInUse: 5
isIdle: 1
_powerStatus: 0
--- !u!114 &5978761350964980520
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6118765911134750290}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1bbc87ddd49b01f4098910ffdf858004, type: 3}
m_Name:
m_EditorClassIdentifier:
_componentIndexCache: 2
_addedNetworkObject: {fileID: 4294524822034227355}
_networkObjectCache: {fileID: 4294524822034227355}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ GameObject:
- component: {fileID: 8905492951320375787}
- component: {fileID: -8220440043154804263}
- component: {fileID: -7621784774190349983}
- component: {fileID: 8320483876716032414}
- component: {fileID: -6290800912275539549}
m_Layer: 0
m_Name: VendorHotDrinks
m_TagString: Untagged
Expand Down Expand Up @@ -123,6 +125,8 @@ MonoBehaviour:
<PredictedSpawn>k__BackingField: {fileID: 0}
_networkBehaviours:
- {fileID: 8905492951320375787}
- {fileID: 8320483876716032414}
- {fileID: -6290800912275539549}
<ParentNetworkObject>k__BackingField: {fileID: 0}
<ChildNetworkObjects>k__BackingField: []
SerializedTransformProperties:
Expand All @@ -134,7 +138,7 @@ MonoBehaviour:
_initializeOrder: 0
_defaultDespawnType: 0
NetworkObserver: {fileID: 0}
<PrefabId>k__BackingField: 2
<PrefabId>k__BackingField: 22
<SpawnableCollectionId>k__BackingField: 0
_scenePathHash: 0
<SceneId>k__BackingField: 0
Expand All @@ -154,6 +158,7 @@ MonoBehaviour:
_componentIndexCache: 0
_addedNetworkObject: {fileID: 1871071288925904272}
_networkObjectCache: {fileID: 1871071288925904272}
_powerConsumer: {fileID: 8320483876716032414}
_productsToDispense:
- Product: {fileID: 11400000, guid: edcff839a189118479387da05ec07d49, type: 2}
Stock: 5
Expand Down Expand Up @@ -183,6 +188,40 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
key: {fileID: 11400000, guid: 7018e8af24d30114db9db31cd189ab88, type: 2}
--- !u!114 &8320483876716032414
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2658310835758749969}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ea15f8a26dac4e4193bb75335cb9e9cd, type: 3}
m_Name:
m_EditorClassIdentifier:
_componentIndexCache: 1
_addedNetworkObject: {fileID: 1871071288925904272}
_networkObjectCache: {fileID: 1871071288925904272}
_powerConsumptionIdle: 0.5
_powerConsumptionInUse: 10
isIdle: 1
_powerStatus: 0
--- !u!114 &-6290800912275539549
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2658310835758749969}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1bbc87ddd49b01f4098910ffdf858004, type: 3}
m_Name:
m_EditorClassIdentifier:
_componentIndexCache: 2
_addedNetworkObject: {fileID: 1871071288925904272}
_networkObjectCache: {fileID: 1871071288925904272}
--- !u!1 &3671711954327816294
GameObject:
m_ObjectHideFlags: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ GameObject:
- component: {fileID: 8905492951320375787}
- component: {fileID: 3665146264900623842}
- component: {fileID: 8086907785789700544}
- component: {fileID: 2921440247678111929}
- component: {fileID: -119891910764691591}
m_Layer: 0
m_Name: VendorRobustSoftdrinks
m_TagString: Untagged
Expand Down Expand Up @@ -122,6 +124,8 @@ MonoBehaviour:
<PredictedSpawn>k__BackingField: {fileID: 0}
_networkBehaviours:
- {fileID: 8905492951320375787}
- {fileID: 2921440247678111929}
- {fileID: -119891910764691591}
<ParentNetworkObject>k__BackingField: {fileID: 0}
<ChildNetworkObjects>k__BackingField: []
SerializedTransformProperties:
Expand All @@ -133,7 +137,7 @@ MonoBehaviour:
_initializeOrder: 0
_defaultDespawnType: 0
NetworkObserver: {fileID: 0}
<PrefabId>k__BackingField: 2
<PrefabId>k__BackingField: 201
<SpawnableCollectionId>k__BackingField: 0
_scenePathHash: 0
<SceneId>k__BackingField: 0
Expand All @@ -153,6 +157,7 @@ MonoBehaviour:
_componentIndexCache: 0
_addedNetworkObject: {fileID: 1871071288925904272}
_networkObjectCache: {fileID: 1871071288925904272}
_powerConsumer: {fileID: 2921440247678111929}
_productsToDispense:
- Product: {fileID: 11400000, guid: dd302b5636b41bb48ba3a2cdc72cc64c, type: 2}
Stock: 10
Expand Down Expand Up @@ -194,6 +199,40 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
key: {fileID: 11400000, guid: 47931fe5cd4465941b01da33ac091ef7, type: 2}
--- !u!114 &2921440247678111929
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2658310835758749969}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ea15f8a26dac4e4193bb75335cb9e9cd, type: 3}
m_Name:
m_EditorClassIdentifier:
_componentIndexCache: 1
_addedNetworkObject: {fileID: 1871071288925904272}
_networkObjectCache: {fileID: 1871071288925904272}
_powerConsumptionIdle: 0.5
_powerConsumptionInUse: 10
isIdle: 1
_powerStatus: 0
--- !u!114 &-119891910764691591
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2658310835758749969}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1bbc87ddd49b01f4098910ffdf858004, type: 3}
m_Name:
m_EditorClassIdentifier:
_componentIndexCache: 2
_addedNetworkObject: {fileID: 1871071288925904272}
_networkObjectCache: {fileID: 1871071288925904272}
--- !u!1 &3671711954327816294
GameObject:
m_ObjectHideFlags: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ GameObject:
- component: {fileID: 8905492951320375787}
- component: {fileID: -8922800647233213677}
- component: {fileID: -7835554894700288649}
- component: {fileID: 4707002213235673783}
- component: {fileID: -6580009485370809016}
m_Layer: 0
m_Name: VendorSecTech
m_TagString: Untagged
Expand Down Expand Up @@ -207,6 +209,8 @@ MonoBehaviour:
<PredictedSpawn>k__BackingField: {fileID: 0}
_networkBehaviours:
- {fileID: 8905492951320375787}
- {fileID: 4707002213235673783}
- {fileID: -6580009485370809016}
<ParentNetworkObject>k__BackingField: {fileID: 0}
<ChildNetworkObjects>k__BackingField: []
SerializedTransformProperties:
Expand All @@ -218,7 +222,7 @@ MonoBehaviour:
_initializeOrder: 0
_defaultDespawnType: 0
NetworkObserver: {fileID: 0}
<PrefabId>k__BackingField: 2
<PrefabId>k__BackingField: 48
<SpawnableCollectionId>k__BackingField: 0
_scenePathHash: 0
<SceneId>k__BackingField: 0
Expand All @@ -238,6 +242,7 @@ MonoBehaviour:
_componentIndexCache: 0
_addedNetworkObject: {fileID: 1871071288925904272}
_networkObjectCache: {fileID: 1871071288925904272}
_powerConsumer: {fileID: 4707002213235673783}
_productsToDispense:
- Product: {fileID: 11400000, guid: ecb1cb0479842954a925e9013baf95f6, type: 2}
Stock: 5
Expand Down Expand Up @@ -273,6 +278,40 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
key: {fileID: 11400000, guid: 8519f267c36b37140af67c13d4231803, type: 2}
--- !u!114 &4707002213235673783
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2658310835758749969}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ea15f8a26dac4e4193bb75335cb9e9cd, type: 3}
m_Name:
m_EditorClassIdentifier:
_componentIndexCache: 1
_addedNetworkObject: {fileID: 1871071288925904272}
_networkObjectCache: {fileID: 1871071288925904272}
_powerConsumptionIdle: 0.5
_powerConsumptionInUse: 10
isIdle: 1
_powerStatus: 0
--- !u!114 &-6580009485370809016
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2658310835758749969}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1bbc87ddd49b01f4098910ffdf858004, type: 3}
m_Name:
m_EditorClassIdentifier:
_componentIndexCache: 2
_addedNetworkObject: {fileID: 1871071288925904272}
_networkObjectCache: {fileID: 1871071288925904272}
--- !u!1 &3671711954327816294
GameObject:
m_ObjectHideFlags: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ GameObject:
- component: {fileID: 8905492951320375787}
- component: {fileID: 6841733904447030618}
- component: {fileID: -8380432832886518514}
- component: {fileID: 8149129049948001439}
- component: {fileID: 2156158514584011666}
m_Layer: 0
m_Name: VendorYouTool
m_TagString: Untagged
Expand Down Expand Up @@ -122,6 +124,8 @@ MonoBehaviour:
<PredictedSpawn>k__BackingField: {fileID: 0}
_networkBehaviours:
- {fileID: 8905492951320375787}
- {fileID: 8149129049948001439}
- {fileID: 2156158514584011666}
<ParentNetworkObject>k__BackingField: {fileID: 0}
<ChildNetworkObjects>k__BackingField: []
SerializedTransformProperties:
Expand All @@ -133,7 +137,7 @@ MonoBehaviour:
_initializeOrder: 0
_defaultDespawnType: 0
NetworkObserver: {fileID: 0}
<PrefabId>k__BackingField: 2
<PrefabId>k__BackingField: 54
<SpawnableCollectionId>k__BackingField: 0
_scenePathHash: 0
<SceneId>k__BackingField: 0
Expand All @@ -153,6 +157,7 @@ MonoBehaviour:
_componentIndexCache: 0
_addedNetworkObject: {fileID: 1871071288925904272}
_networkObjectCache: {fileID: 1871071288925904272}
_powerConsumer: {fileID: 8149129049948001439}
_productsToDispense:
- Product: {fileID: 11400000, guid: 4d5800940a547b2419e83ec0ccd555d4, type: 2}
Stock: 5
Expand Down Expand Up @@ -188,6 +193,40 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
key: {fileID: 11400000, guid: 07ba3e874a1f2b348bad7bce50cec9dc, type: 2}
--- !u!114 &8149129049948001439
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2658310835758749969}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ea15f8a26dac4e4193bb75335cb9e9cd, type: 3}
m_Name:
m_EditorClassIdentifier:
_componentIndexCache: 1
_addedNetworkObject: {fileID: 1871071288925904272}
_networkObjectCache: {fileID: 1871071288925904272}
_powerConsumptionIdle: 0.5
_powerConsumptionInUse: 10
isIdle: 1
_powerStatus: 0
--- !u!114 &2156158514584011666
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2658310835758749969}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1bbc87ddd49b01f4098910ffdf858004, type: 3}
m_Name:
m_EditorClassIdentifier:
_componentIndexCache: 2
_addedNetworkObject: {fileID: 1871071288925904272}
_networkObjectCache: {fileID: 1871071288925904272}
--- !u!1 &3671711954327816294
GameObject:
m_ObjectHideFlags: 0
Expand Down
Loading

0 comments on commit 5ebfcba

Please sign in to comment.