Skip to content

Commit

Permalink
Added code for the Manufacturer name of vehicles
Browse files Browse the repository at this point in the history
The difference between this one and the original is that it adds the "Brand" name in the .lua (example: Dodge), so you dont get "unknown" in game. This is creates a file that formats the vehicle list for copy and paste. HOWEVER you may want to change the vehicle class in the output.lua
  • Loading branch information
SaavageBueno authored Jul 7, 2024
1 parent 5bb8d8a commit 940de07
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions luacreator-brand.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh

LUA_FILE="output.lua"

echo "return {" > "$LUA_FILE"

find . -name "*.ytd" | while read -r file; do
name=$(basename "$file" .ytd)
name=$(echo "$name" | sed 's/_/ /g')
brand=$(dirname "$file" | xargs dirname | xargs basename)
echo " { model = '$name', name = '$name', brand = '$brand', price = 125000, category = 'compacts', type = 'automobile', shop = 'pdm' }," >> "$LUA_FILE"
done

echo "}" >> "$LUA_FILE"

echo "Done."

0 comments on commit 940de07

Please sign in to comment.