Skip to content

Commit

Permalink
Merge pull request #8 from jonathan-robertson/dev
Browse files Browse the repository at this point in the history
Initial Pre-Release
  • Loading branch information
jonathan-robertson authored Apr 8, 2023
2 parents fadb5e9 + 8d0a5d2 commit 38e0726
Show file tree
Hide file tree
Showing 6 changed files with 156 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: 📦 Automated Release

on:
pull_request:
branches:
- main
types: [closed]

jobs:
release:
if: ${{ github.event.pull_request.merged }}
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v2
- name: 📦 Package data
run: |
# Edit this line if you want to include additional files
# q stands for quiet, r stands for recursive (to include all files and sub-folders in Config)
zip -qr "${{ github.event.repository.name }}.zip" *.dll Config ModInfo.xml README.md CHANGELOG.md LICENSE
version=$(sed -n '/Version/{s/.*<Version value=\"\(.*\)\"[ ]*\/>.*/\1/;p}' ModInfo.xml)
echo "version=$version" >> $GITHUB_ENV
prerelease=$([[ $version = 0* ]] && echo "true" || echo "false")
echo "prerelease=$prerelease" >> $GITHUB_ENV
# echoes for troubleshooting in case you need them
# echo "name: ${{ github.event.repository.name }}"
# echo "title: ${{ github.event.pull_request.title }}"
# echo "version: $version"
# echo "prerelease: $prerelease"
- name: 📢 Post Release
uses: ncipollo/release-action@v1
with:
tag: ${{ env.version }}
commit: main
name: ${{ github.event.pull_request.title }}
body: ${{ github.event.pull_request.body }}
generateReleaseNotes: true
artifacts: "${{ github.event.repository.name }}.zip"
prerelease: ${{ env.prerelease }}
# if you'd like to review the generated release before publishing it, enable draft mode
# draft: true
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [TODO]

- add localization for every language
- update trader restock date to days remaining
- update vending machine rental to days remaining

## [UNRELEASED]

- remove date from completed quests
- remove journal entry day learned
- remove map date
- remove trader restock date
- remove vending machine rental expiration
- update compass date
8 changes: 8 additions & 0 deletions Config/Localization.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Key,File,Type,UsedInMainMenu,NoTranslate,english,Context / Alternate Text,german,latam,french,italian,japanese,koreana,polish,brazilian,russian,turkish,schinese,tchinese,spanish
dayOfTheWeek0,UI,Value display,x,,"Monday",,,,,,,,,,,,,,
dayOfTheWeek1,UI,Value display,x,,"Tuesday",,,,,,,,,,,,,,
dayOfTheWeek2,UI,Value display,x,,"Wednesday",,,,,,,,,,,,,,
dayOfTheWeek3,UI,Value display,x,,"Thursday",,,,,,,,,,,,,,
dayOfTheWeek4,UI,Value display,x,,"Friday",,,,,,,,,,,,,,
dayOfTheWeek5,UI,Value display,x,,"Saturday",,,,,,,,,,,,,,
dayOfTheWeek6,UI,Value display,x,,"Sunday",,,,,,,,,,,,,,
22 changes: 22 additions & 0 deletions Config/XUi/windows.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<config>
<!-- compass -->
<set xpath="/windows/window[@name='windowCompass']/sprite/label/@text">[{daycolor}]{# localization('dayOfTheWeek' + (day-1)%7)}[-] {time}</set>

<!-- journal entries (no real value) -->
<remove xpath="/windows/window[@name='windowJournalEntryDescription']/panel[@name='header']/label[@text='{timestamp}']" />

<!-- map menu (no real value; duplicated info from compass) -->
<remove xpath="/windows/window[@name='mapArea']/panel[@name='content']/panel[@name='mapView']/rect[@name='content']/sprite[@name='dayTimeIcon']" />
<remove xpath="/windows/window[@name='mapArea']/panel[@name='content']/panel[@name='mapView']/rect[@name='content']/label[@name='dayTimeLabel']" />

<!-- quest menu (no real value) -->
<remove xpath="/windows/window[@name='windowQuestRewards']/panel[@name='header']/label[@text='{finishtime}']" />

<!-- trader restock date -->
<!-- TODO: find a better way -->
<remove xpath="/windows/window[@name='windowTrader']/panel[@name='header']/label[@text='{restocklabel}: {timeleft}']" />

<!-- rentable vending machine expiration date -->
<!-- TODO: find a better way -->
<remove xpath="/windows/window[@name='windowTrader']/panel[@name='content']/rect[@name='searchControls']/label[@text='{renttimeleft}']" />
</config>
9 changes: 9 additions & 0 deletions ModInfo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<xml>
<ModInfo>
<Name value="Days of the Week" />
<Description value="Replace days count in UI with a day of the week." />
<Author value="Jonathan Robertson (Kanaverum)" />
<Version value="0.1.0" />
<Website value="https://github.com/jonathan-robertson/days-of-the-week" />
</ModInfo>
</xml>
52 changes: 52 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Days of the Week

[![🧪 Tested On](https://img.shields.io/badge/🧪%20Tested%20On-A20.6%20b9-blue.svg)](https://7daystodie.com/) [![📦 Automated Release](https://github.com/jonathan-robertson/days-of-the-week/actions/workflows/release.yml/badge.svg)](https://github.com/jonathan-robertson/days-of-the-week/actions/workflows/release.yml)

- [Days of the Week](#days-of-the-week)
- [Summary](#summary)
- [Adjustments](#adjustments)
- [Sister Project](#sister-project)
- [Compatibility](#compatibility)
- [Acknowledgement](#acknowledgement)

## Summary

7 Days to Die mod: Replace days count in UI with a day of the week.

The general idea is that the total day count is relatively meaningless to most players. Most players want to know what the day *means* for them and the recurring question many admins receive on a regular basis is "how many days till blood moon?"

If you use this mod, you'll be able to say "it happens every Sunday". No math. No second-guessing. Just simple.

> ℹ️ This mod does not alter the actual days within a game or server (many components in the game rely on server/world time increasing); it simply updates how the days are presented within the UI.
### Adjustments

Element | Change
--- | ---
Compass | Days replaced with day of the week
Journal | Day read is removed
Map | Day/Time entry is removed
Quests | Date Completed is removed
Trader | Restock Date is removed
Vending | Expiration Date is removed (Rentable Vending Machines)

## Sister Project

This mod is designed to work well with another if you're using a dedicated server: [Only Seven Days](https://github.com/jonathan-robertson/only-seven-days).

## Compatibility

Environment | Compatible | Does EAC Need to be Disabled? | Who needs to install?
--- | --- | --- | ---
Dedicated Server | Yes | No | only server
Peer-to-Peer Hosting | Yes | No | only the host
Single Player | Yes | No | self (of course)

## Acknowledgement

This mod as it's currently written is only possible due to the brilliant efforts of another modder and his willingness to share what he learned:

**Shado47** developed the [Immersive Days](https://7daystodiemods.com/immersive-days-display/) mod that "Changes the day counter below the compass to go through weekdays, months, and years. Starts on January 1st, 2020".

If this sounds even better to you than this mod does, I would highly encourage you to check out Immersive Days.
> ℹ️ Just like this mod, his does not require EAC to be disabled and is able to be served from a server without any client-side downloads.

0 comments on commit 38e0726

Please sign in to comment.