npm updated, fixed saving PvP settings for zones
This commit is contained in:
@ -173,6 +173,7 @@ function save() {
|
||||
width: zoneEditorStore.zone.width,
|
||||
height: zoneEditorStore.zone.height,
|
||||
tiles: zoneTiles,
|
||||
pvp: zoneEditorStore.zone.pvp,
|
||||
zoneEventTiles: toRaw(zoneEventTiles.value).map((tile) => ({
|
||||
id: tile.id,
|
||||
zoneId: tile.zoneId,
|
||||
@ -192,10 +193,6 @@ function save() {
|
||||
|
||||
gameStore.connection?.emit('gm:zone_editor:zone:update', data)
|
||||
|
||||
gameStore.connection?.emit('gm:zone_editor:zone:request', { zoneId: zoneEditorStore.zone.id }, (response: Zone) => {
|
||||
zoneEditorStore.setZone(response)
|
||||
})
|
||||
|
||||
if (zoneEditorStore.isSettingsModalShown) {
|
||||
zoneEditorStore.toggleSettingsModal()
|
||||
}
|
||||
|
@ -22,7 +22,10 @@
|
||||
</div>
|
||||
<div class="w-full flex flex-col mb-5">
|
||||
<label class="mb-1.5 font-titles" for="name">PVP enabled</label>
|
||||
<input class="input-cyan max-w-64" name="name" id="name" />
|
||||
<select class="input-cyan" name="pvp" id="pvp">
|
||||
<option :value="false">No</option>
|
||||
<option :value="true">Yes</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn-cyan px-4 py-1.5 min-w-24" type="submit">Save</button>
|
||||
|
@ -22,9 +22,9 @@
|
||||
</div>
|
||||
<div class="w-full flex flex-col mb-5">
|
||||
<label class="mb-1.5 font-titles" for="pvp">PVP enabled</label>
|
||||
<select class="input-cyan" name="pvp" id="pvp">
|
||||
<option value="0">No</option>
|
||||
<option value="1">Yes</option>
|
||||
<select v-model="pvp" class="input-cyan" name="pvp" id="pvp">
|
||||
<option :value="false">No</option>
|
||||
<option :value="true">Yes</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@ -44,6 +44,7 @@ const zoneEditorStore = useZoneEditorStore()
|
||||
const name = ref(zoneEditorStore.zone?.name)
|
||||
const width = ref(zoneEditorStore.zone?.width)
|
||||
const height = ref(zoneEditorStore.zone?.height)
|
||||
const pvp = ref(zoneEditorStore.zone?.pvp)
|
||||
|
||||
watch(name, (value) => {
|
||||
zoneEditorStore.setZoneName(value)
|
||||
@ -56,4 +57,8 @@ watch(width, (value) => {
|
||||
watch(height, (value) => {
|
||||
zoneEditorStore.setZoneHeight(value)
|
||||
})
|
||||
|
||||
watch(pvp, (value) => {
|
||||
zoneEditorStore.setZonePvp(value)
|
||||
})
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user