Skip to content

Commit

Permalink
EQ held fix on mobs, added coords to edit room, added checkbox for is…
Browse files Browse the repository at this point in the history
…MobScript
  • Loading branch information
LiamKenneth committed Jul 3, 2022
1 parent 06dcf1d commit 520cc45
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 1 deletion.
37 changes: 37 additions & 0 deletions src/app/World/rooms/edit-room/edit-room.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,43 @@ <h2>Room Information:</h2>
</div>
</div>
</div>
<div class="section">
<h2>Coords:</h2>
<p>
Edit coords to move room
</p>
</div>
<div class="section">
<div class="row">
<div class="col">
<mat-form-field appearance="outline" class="form-control">
<mat-label>X</mat-label>
<input matInput placeholder="X" value="" required formControlName="CoordX" />
<mat-error *ngIf="addRoomForm.get('CoordX').hasError('required')">
Coord X is required.
</mat-error>
</mat-form-field>
</div>
<div class="col">
<mat-form-field appearance="outline" class="form-control">
<mat-label>Y</mat-label>
<input matInput placeholder="Y" value="" required formControlName="CoordY" />
<mat-error *ngIf="addRoomForm.get('CoordY').hasError('required')">
Coord Y is required.
</mat-error>
</mat-form-field>
</div>
<div class="col">
<mat-form-field appearance="outline" class="form-control">
<mat-label>Z</mat-label>
<input matInput placeholder="Z" value="" required formControlName="CoordZ" />
<mat-error *ngIf="addRoomForm.get('CoordZ').hasError('required')">
Coord Z is required.
</mat-error>
</mat-form-field>
</div>
</div>
</div>
<div class="section">
<h2>Room Objects:</h2>
<p>
Expand Down
2 changes: 1 addition & 1 deletion src/app/characters/equipment/equipment.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ <h2>Equipment</h2>
</mat-select>
</mat-form-field>
</div> -->
<div class="col" *ngIf="heldItems.length">
<div class="col">
<mat-form-field appearance="outline" class="form-control">
<mat-label>Held</mat-label>
<mat-select formControlName="heldEq" placeholder="Held" (selectionChange)="heldChange($event)"
Expand Down
1 change: 1 addition & 0 deletions src/app/characters/interfaces/characters.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export interface Character {
trainer?: boolean;
events?: Events;
isMount?: Mount;
isHiddenScriptMob?: boolean;
spellList?: SpellList[];
practices?: number;
mobKills?: number;
Expand Down
11 changes: 11 additions & 0 deletions src/app/mobs/add-mob.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,7 @@ <h2>Options</h2>


</div>

<div class="col">


Expand All @@ -600,6 +601,16 @@ <h2>Options</h2>
</mat-checkbox>


</div>

<div class="col">


<mat-checkbox title="Allows scripts in rooms that have no mobs" formControlName="isHiddenScriptMob">Is
Hidden script mob
</mat-checkbox>


</div>

<div class="col">
Expand Down
1 change: 1 addition & 0 deletions src/app/mobs/add-mob.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ export class AddMobComponent implements OnInit {
shopkeeper: this.addMobForm.get('shopkeeper').value,
trainer: this.addMobForm.get('trainer').value,
isMount: this.addMobForm.get('isMount').value,
isHiddenScriptMob: this.addMobForm.get('isHiddenScriptMob').value,
spellList: []
};

Expand Down
1 change: 1 addition & 0 deletions src/app/mobs/add-mob.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export class AddMobService {
shopkeeper: [false],
trainer: [false],
isMount: [false],
isHiddenScriptMob: [false],
events: new FormGroup({
enter: new FormControl(''),
leave: new FormControl(''),
Expand Down
10 changes: 10 additions & 0 deletions src/app/mobs/edit-mob/edit-mob.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,16 @@ <h2>Options</h2>
</mat-checkbox>


</div>

<div class="col">


<mat-checkbox title="Allows scripts in rooms that have no mobs" formControlName="isHiddenScriptMob">Is
Hidden script mob
</mat-checkbox>


</div>

<div class="col">
Expand Down
2 changes: 2 additions & 0 deletions src/app/mobs/edit-mob/edit-mob.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ export class EditMobComponent extends OnDestroyMixin implements OnInit, OnDestro
shopkeeper: mob.shopkeeper,
trainer: mob.trainer,
isMount: mob?.isMount,
isHiddenScriptMob: mob?.isHiddenScriptMob,
enterEmote: mob.enterEmote,
leaveEmote: mob.leaveEmote,

Expand Down Expand Up @@ -463,6 +464,7 @@ export class EditMobComponent extends OnDestroyMixin implements OnInit, OnDestro
shopkeeper: this.addMobForm.get('shopkeeper').value,
trainer: this.addMobForm.get('trainer').value,
isMount: this.addMobForm.get('isMount').value || false,
isHiddenScriptMob: this.addMobForm.get('isHiddenScriptMob').value || false,
enterEmote: this.addMobForm.get('enterEmote').value || "",
leaveEmote: this.addMobForm.get('leaveEmote').value || "",
spellList: []
Expand Down
1 change: 1 addition & 0 deletions src/app/mobs/edit-mob/edit-mob.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export class EditMobService {
shopkeeper: new FormControl(false),
trainer: new FormControl(false),
isMount: new FormControl(false),
isHiddenScriptMob: new FormControl(false),
enterEmote: [''],
leaveEmote: [''],

Expand Down

0 comments on commit 520cc45

Please sign in to comment.