Skip to content

Commit

Permalink
Complete move changes from test-build branch (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiuh authored Sep 6, 2024
1 parent fdb5c70 commit 97b3406
Show file tree
Hide file tree
Showing 29 changed files with 7,727 additions and 7,194 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,5 @@ MonoBehaviour:
IncludeAssetDependencies: 0
AssetBundle:
AddressableGroup:
- Enabled: 1
Type: 0
Asset:
Path: Assets
Filter:
Object: {fileID: 0}
Scene:
Type: 0
Value:
IncludeAssetDependencies: 0
AssetBundle:
AddressableGroup:
Exclude: []
icon: 391
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@ MonoBehaviour:
Title: Clear Working Place
RentCost:
cost: 5
Description: Clear Working Place
Description: 'This is a tile that connects only to working places and corridors
at all of it sides.
It will help you to create seamless space between
many working places that placed not near each other.'
inventoryViews: []
tileUnions:
- {fileID: 721046682041479169, guid: 9376253a30395b340a27ac99b7697059, type: 3}
Expand Down
11 changes: 10 additions & 1 deletion JamGame/Assets/Prefabs/CoreModels/Inside/Corridor.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,16 @@ MonoBehaviour:
Title: Corridor
RentCost:
cost: 5
Description: Corridor
Description: 'This is a tile that will help you to connect rooms one to another.
Corridor
have connections to other rooms/corridors at all of it sides.
You need
to have at least one corridor in-between two different rooms in order to have
a way for employee to walk between them.'
inventoryViews: []
tileUnions:
- {fileID: 1583034983851126799, guid: fd5a3fa9b3ec917429c3ca24c43b7bbd, type: 3}
Expand Down
10 changes: 9 additions & 1 deletion JamGame/Assets/Prefabs/CoreModels/Inside/Kitchen.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,15 @@ MonoBehaviour:
Title: Kitchen
RentCost:
cost: 10
Description: Kitchen
Description: 'At some point in the day, employee may want to eat.
He
will choose nearest kitchen room to his location.
If he will be not
able to use kitchen, his stress meter will increase.'
inventoryViews: []
tileUnions:
- {fileID: 3424363191602470855, guid: fb9e68e38a3c9e6488501276d40cfc96, type: 3}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,16 @@ MonoBehaviour:
Title: Programmer working place
RentCost:
cost: 5
Description: Programmer working place
Description: 'This is room, where you employees earning you money.
Employee
will spend some time in the day at the working place and this will generate
you money.
Every working place is assigned only to one employee. And
only assigned employee can work at place that assigned to him.'
inventoryViews: []
tileUnions:
- {fileID: 8812810329888060661, guid: 3ff911bd3b1966c4194d6c22590f49f1, type: 3}
Expand Down
10 changes: 9 additions & 1 deletion JamGame/Assets/Prefabs/CoreModels/Inside/SmokingRoom.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,15 @@ MonoBehaviour:
Title: Smoking room
RentCost:
cost: 5
Description: Smoking room
Description: 'At some point in the day, employee may want to smoke.
He
will choose nearest smoking room to his location.
If he will be not
able to use smoking room, his stress meter will increase.'
inventoryViews: []
tileUnions:
- {fileID: 1943638497325603043, guid: 1a37ca784ea9f0b46a15a79163374cfc, type: 3}
Expand Down
10 changes: 9 additions & 1 deletion JamGame/Assets/Prefabs/CoreModels/Inside/Toilet.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,15 @@ MonoBehaviour:
Title: Toilet
RentCost:
cost: 10
Description: Toilet
Description: 'At some point in the day, employee may want to go to toilet.
He
will choose nearest one to his location.
If he will be not able to
use toilet, his stress meter will increase.'
inventoryViews: []
tileUnions:
- {fileID: 3467285144550413319, guid: 56abdfd3ef820494e9f9d83c23130abc, type: 3}
Expand Down
2 changes: 1 addition & 1 deletion JamGame/Assets/Prefabs/Tiles/MeetingRoom/Left.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ MonoBehaviour:
ShowDirectionGizmo: 0
ShowPathGizmo: 0
wallSolver: {fileID: 11400000, guid: 5f5465019360c1e4eb09c38fb3fde4d2, type: 2}
marks: 0000000000000000
marks: 64000000f8010000
position: {x: 0, y: 0}
rotation: 0
WallPrefabHandlers:
Expand Down
2 changes: 1 addition & 1 deletion JamGame/Assets/Prefabs/Tiles/MeetingRoom/Right.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ MonoBehaviour:
ShowDirectionGizmo: 0
ShowPathGizmo: 0
wallSolver: {fileID: 11400000, guid: 5f5465019360c1e4eb09c38fb3fde4d2, type: 2}
marks: 0000000000000000
marks: 64000000f8010000
position: {x: 0, y: 0}
rotation: 0
WallPrefabHandlers:
Expand Down
3 changes: 1 addition & 2 deletions JamGame/Assets/Prefabs/Unions/Inside/MeetingRoom.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -1117,8 +1117,7 @@ MonoBehaviour:
maximumSize: 8
currentSize: 2
employeePerGrow: 2
incorrectMarks:
- Immutable
incorrectMarks: 64000000
--- !u!1 &3314904422526751816
GameObject:
m_ObjectHideFlags: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ MonoBehaviour:
effects: []
fullName: Glutton
icon: {fileID: 21300000, guid: db3dbe6063206d84b80f9013e5495116, type: 3}
description: This employee will eat more, but his stress meter will increase slower.
references:
version: 2
RefIds: []
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ MonoBehaviour:
effects: []
fullName: Smoker
icon: {fileID: 21300000, guid: 8e15b9c7125ccd54d9591d8f920b4ce0, type: 3}
description: "This employee will need to use smoke room some time. But will work\r
more efficiently (earn you more money)."
references:
version: 2
RefIds: []
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ MonoBehaviour:
effects: []
fullName: Workaholic
icon: {fileID: 21300000, guid: 847f3788f6fdf7d48b285baaa352dc93, type: 3}
description: "This employee will work more. But his walking speed is less that
normal\r (he is always tired)."
references:
version: 2
RefIds: []
5 changes: 5 additions & 0 deletions JamGame/Assets/Scripts/Employee/Personality/Quirk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,10 @@ public class Quirk : ScriptableObject, IPostprocessedUidHandle, IUidHandle
[SerializeField]
private Sprite icon;
public Sprite Icon => icon;

[TextArea]
[SerializeField]
private string description;
public string Description => description;
}
}
8 changes: 8 additions & 0 deletions JamGame/Assets/Scripts/Level/Boss/TaskView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,17 @@ MinEarnPerWorkingSession _
=> $"Earn at least {progress.Overall} money in a single working session",
_ => throw new NotImplementedException("This task type is not supported")
};

progressScale = progressScaleParent.GetComponentsInChildren<Image>();
UpdateProgress();
}

private void FixedUpdate()
{
UpdateProgress();
}

private void UpdateProgress()
{
Progress progress = task.Progress;

Expand Down
2 changes: 1 addition & 1 deletion JamGame/Assets/Scripts/Level/Room/CoreModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public struct GeneralRoomInfo
public string Title;
public RentCost RentCost;

[TextArea]
[TextArea(7, 50)]
public string Description;
}

Expand Down
8 changes: 7 additions & 1 deletion JamGame/Assets/Scripts/Level/Shop/Employee/CardView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,19 @@ public void TryHireEmployee()
return;
}

if (controller.TryBuyEmployee(EmployeeConfig).Success)
Result result = controller.TryBuyEmployee(EmployeeConfig);
if (result.Success)
{
coinIcon.sprite = hiredIconSprite;
hireCostLabel.gameObject.SetActive(false);
hireButton.interactable = false;
hired = true;
}
else
{
// TODO: #196
Debug.Log("Cannot hire employee: " + result.Error);
}
}

public void OnPointerEnter(PointerEventData eventData)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,15 @@ internal class DescriptionQuirkLine : MonoBehaviour
[SerializeField]
private TMP_Text nameLabel;

[Required]
[SerializeField]
private TMP_Text descriptionLabel;

public void FillData(Quirk quirk)
{
icon.sprite = quirk.Icon;
nameLabel.text = quirk.FullName;
descriptionLabel.text = quirk.Description;
}
}
}
10 changes: 5 additions & 5 deletions JamGame/Assets/Scripts/Level/Shop/Employee/DescriptionView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ public void UpdateData(CardView card)
professionLabel.text = card.EmployeeConfig.Profession;

descriptionQuirkLineParent.DestroyChildren();
if (card.EmployeeConfig.Quirks.Count == 0)
{
descriptionQuirkLineParent.gameObject.SetActive(false);
}
else

bool isQuirksExist = card.EmployeeConfig.Quirks.Count > 0;
descriptionQuirkLineParent.gameObject.SetActive(isQuirksExist);

if (isQuirksExist)
{
foreach (Quirk quirk in card.EmployeeConfig.Quirks)
{
Expand Down
6 changes: 5 additions & 1 deletion JamGame/Assets/Scripts/TileBuilder/Command.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using Common;
using Level.Room;
using TileUnion;
using UnityEngine;
Expand Down Expand Up @@ -107,8 +109,10 @@ public void Execute(TileBuilderImpl tileBuilder)

foreach (Vector2Int pos in growingInfo.PositionsToTake)
{
TileUnionImpl tileUnion = tileBuilder.GetTileUnionInPosition(pos);
IEnumerable<RoomTileLabel> marks = tileUnion.GetAllUniqueMarks();
CoreModel coreModel = tileBuilder.RemoveTileUnion(pos);
if (coreModel != null)
if (coreModel != null && !marks.Contains(RoomTileLabel.FreeSpace))
{
borrowedCoreModels.Add(coreModel);
}
Expand Down
4 changes: 2 additions & 2 deletions JamGame/Assets/Scripts/TileUnion/MeetingRoomLogics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ public int CurrentSize
private int employeePerGrow = 2;

[SerializeField]
private List<string> incorrectMarks = new();
public IEnumerable<string> IncorrectMarks => incorrectMarks;
private List<RoomTileLabel> incorrectMarks = new();
public IEnumerable<RoomTileLabel> IncorrectMarks => incorrectMarks;

private void Start()
{
Expand Down
7 changes: 2 additions & 5 deletions JamGame/Assets/Scripts/TileUnion/TileUnionImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,11 @@ public void SetGridProperties(GridProperties gridProperties)
Configuration[rotation].TilesPositions.Select(x => x + position);
public int TilesCount => tiles.Count;

public IEnumerable<string> GetAllUniqueMarks()
public IEnumerable<RoomTileLabel> GetAllUniqueMarks()
{
return tiles
.Select(x => x.Marks)
.Aggregate(
Enumerable.Empty<string>(),
(x, y) => x.Concat(y.Select(x => x.ToString()))
)
.Aggregate(Enumerable.Empty<RoomTileLabel>(), (x, y) => x.Concat(y))
.Distinct();
}

Expand Down
5,870 changes: 2,929 additions & 2,941 deletions JamGame/Assets/UI/Fonts/Sdf/Sarpanch-Bold.asset

Large diffs are not rendered by default.

Loading

0 comments on commit 97b3406

Please sign in to comment.