Add journal reimplementation, update for Solstice update

This commit is contained in:
Vinyl Darkscratch 2017-03-30 02:22:48 -07:00
parent c1f3e9889d
commit 08b90de8d1
44 changed files with 319 additions and 67 deletions

View file

@ -25,6 +25,10 @@ Thanks to [hunternet93](https://github.com/hunternet93) for the macOS and Linux
* pixman
* zlib (only ruby bindings)
* OpenGL header (alternatively GLES2 with `DEFINES+=GLES2_HEADER`)
* Ruby (make sure to use 2.3 on macOS due to a formatting bug)
* Python 3 (journal reimplementation only)
* Qt5 (journal reimplementation only)
* PyQt5 (journal reimplementation only)
*OneShot* employs Qt's qmake build system, so you'll need to install that beforehand. (The cmake build hasn't been maintained since the fork.)

View file

@ -0,0 +1,34 @@
"""
This is a setup.py script generated by py2applet
Usage:
python3 setup-unix-remake.py py2app
"""
from setuptools import setup
APP = ['journal.py']
APP_NAME = "_______"
DATA_FILES = ["images"]
OPTIONS = {
'argv_emulation': True,
# 'plist': {
# 'CFBundleName': APP_NAME,
# 'CFBundleDisplayName': APP_NAME,
# 'CFBundleGetInfoString': "You only have one shot.",
# 'CFBundleIdentifier': 'com.oneshot-game.hunternet93.journal-remake',
# 'CFBundleVersion': '1.0',
# 'CFBundleShortVersionString': '1.0',
# 'LSApplicationCategoryType': 'public.app-category.games',
# 'LSMinimumSystemVersion': '10.7',
# 'NSHumanReadableCopyright': u"Copyright © 2017, hunternet93 and Vinyl Darkscratch, MIT License. https://github.com/hunternet93/OneShot-Journal"
# }
}
setup(
name=APP_NAME,
app=APP,
data_files=DATA_FILES,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)

89
journal/unix-remake/.gitignore vendored Normal file
View file

@ -0,0 +1,89 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# IPython Notebook
.ipynb_checkpoints
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# dotenv
.env
# virtualenv
venv/
ENV/
# Spyder project settings
.spyderproject
# Rope project settings
.ropeproject

View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2017 Isaac Smith
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -0,0 +1,22 @@
OneShot Journal
===============
This is a Linux-compatible reimplementation of the Author's Journal, a element in the game [OneShot](http://oneshot-game.com).
Usage
-----
This journal requires PyQt5 to run. On Debian/Ubuntu-based systems, install via the following command:
sudo apt-get install python3-pyqt5
This will install PyQt5 and all necessary files. Next, extract the images from the original OneShot journal program using the instructions in the following section, then use the following command to start the journal:
python3 journal.py
Start OneShot and play normally.
Extracting the images
---------------------
First, aquire a copy of the Windows-version journal executable. Next, download [ResourcesExtract](http://www.nirsoft.net/utils/resources_extract.html) and run it, either via Wine or from a Windows install. Set the filename to the journal executable and the destination to the images directory in your local copy of this repo. Set the program to extract only bitmaps, then press Start. Once extraction completes run the included Python script `renameandconvert.py` (requires ImageMagick), which will create the required PNGs.

View file

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 510 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 548 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 KiB

View file

@ -0,0 +1,78 @@
import os
import sys
import time
from PyQt5.QtCore import Qt, QThread, pyqtSignal, QRect, QRectF, QTimer
from PyQt5.QtWidgets import QApplication, QWidget, QLabel
from PyQt5.QtGui import QIcon, QPixmap, QPainter
pipe_path = '/tmp/oneshot-pipe'
try: base_path = sys._MEIPASS
except AttributeError: base_path = os.path.abspath('.')
class WatchPipe(QThread):
change_image = pyqtSignal(str)
def run(self):
while True:
if os.path.exists(pipe_path): break
else: time.sleep(0.1)
pipe = open(pipe_path, 'r')
pipe.flush()
while True:
message = os.read(pipe.fileno(), 256)
if len(message) > 0:
self.change_image.emit(message.decode())
time.sleep(0.05)
class Journal(QWidget):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.label = QLabel(self)
self.change_image('default')
self.setWindowFlags(self.windowFlags())
self.setAttribute(Qt.WA_TranslucentBackground)
self.setWindowTitle('OneShot Journal')
self.setMinimumSize(800, 600)
self.setMaximumSize(800, 600)
self.setGeometry(0, 0, 800, 600)
self.show()
def change_image(self, name):
self.pixmap = QPixmap(os.path.join(base_path, 'images', '{}.png'.format(name)))
self.label.setPixmap(self.pixmap)
class Niko(QWidget):
def __init__(self, *args, **kwargs):
self.start_x, self.start_y = kwargs['start_x'], kwargs['start_y']
del kwargs['start_x'], kwargs['start_y']
super().__init__(*args, **kwargs)
self.frames = [QPixmap(os.path.join(base_path, 'images', 'niko{}.png'.format(n)) for n in range(1,4))]
self.setBackgroundRole(QPalette.Base)
self.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
if __name__ == '__main__':
app = QApplication(sys.argv)
if len(sys.argv) == 3:
# "Niko-leaves-the-screen" mode
x, y = int(sys.argv[1]), int(sys.argv[2])
else:
# Author's Journal mode
journal = Journal()
thread = WatchPipe()
thread.change_image.connect(journal.change_image)
thread.start()
app.exec_()

View file

@ -0,0 +1,3 @@
import os
for filename in os.listdir('images'):
if filename[-4:] == '.bmp': os.system("convert images/{} -alpha on -transparent '#00ff00' images/{}.png".format(filename, filename.strip('_')[:-4].lower()))

View file

@ -2,7 +2,7 @@
TEMPLATE = app
QT =
TARGET = oneshot
TARGET = OneShot
DEPENDPATH += src shader assets
INCLUDEPATH += . src
@ -42,7 +42,7 @@ unix {
#CONFIG -= app_bundle
INCLUDEPATH += $$QMAKE_MAC_SDK_PATH/System/Library/Frameworks/OpenAL.framework/Versions/A/Headers
LIBS += -framework OpenAL
QMAKE_LFLAGS += -L/usr/local/opt/ruby21/lib -L/usr/local/opt/openal-soft/lib
QMAKE_LFLAGS += -L/usr/local/opt/ruby@2.3/lib -L/usr/local/opt/openal-soft/lib
}
!macx: {
PKGCONFIG += openal zlib

View file

@ -2,6 +2,7 @@ SAVE_FILE_NAME = Oneshot::SAVE_PATH + '/save.dat'
PERMA_FLAGS_NAME = Oneshot::SAVE_PATH + '/p-settings.dat'
FAKE_SAVE_NAME = Oneshot::GAME_PATH + '/Oneshot/save_progress.oneshot'
def erase_game
File.delete(SAVE_FILE_NAME) unless !File.exists?(SAVE_FILE_NAME)
end
@ -42,31 +43,31 @@ def save
write_save(SAVE_FILE_NAME)
write_perma_flags(PERMA_FLAGS_NAME)
Dir.mkdir(Oneshot::SAVE_PATH + "\\save_backups") unless File.exists?(Oneshot::SAVE_PATH + "\\save_backups")
Dir.mkdir(Oneshot::SAVE_PATH + "/save_backups") unless File.exists?(Oneshot::SAVE_PATH + "/save_backups")
i = 5
while i > 0
#delete save5.bk if it exists
if File.exists?(Oneshot::SAVE_PATH + "\\save_backups\\save" + i.to_s + ".bk")
File.delete(Oneshot::SAVE_PATH + "\\save_backups\\save" + i.to_s + ".bk")
if File.exists?(Oneshot::SAVE_PATH + "/save_backups/save" + i.to_s + ".bk")
File.delete(Oneshot::SAVE_PATH + "/save_backups/save" + i.to_s + ".bk")
end
#delete p-settings5.bk if it exists
if File.exists?(Oneshot::SAVE_PATH + "\\save_backups\\p-settings" + i.to_s + ".bk")
File.delete(Oneshot::SAVE_PATH + "\\save_backups\\p-settings" + i.to_s + ".bk")
if File.exists?(Oneshot::SAVE_PATH + "/save_backups/p-settings" + i.to_s + ".bk")
File.delete(Oneshot::SAVE_PATH + "/save_backups/p-settings" + i.to_s + ".bk")
end
#rename save4.bk to save5.bk if save4.bk exists
if File.exists?(Oneshot::SAVE_PATH + "\\save_backups\\save" + (i-1).to_s + ".bk")
File.rename(Oneshot::SAVE_PATH + "\\save_backups\\save" + (i-1).to_s + ".bk", Oneshot::SAVE_PATH + "\\save_backups\\save" + i.to_s + ".bk" )
if File.exists?(Oneshot::SAVE_PATH + "/save_backups/save" + (i-1).to_s + ".bk")
File.rename(Oneshot::SAVE_PATH + "/save_backups/save" + (i-1).to_s + ".bk", Oneshot::SAVE_PATH + "/save_backups/save" + i.to_s + ".bk" )
end
#rename p-settings4.bk to p-settings5.bk if save4.bk exists
if File.exists?(Oneshot::SAVE_PATH + "\\save_backups\\p-settings" + (i-1).to_s + ".bk")
File.rename(Oneshot::SAVE_PATH + "\\save_backups\\p-settings" + (i-1).to_s + ".bk", Oneshot::SAVE_PATH + "\\save_backups\\p-settings" + i.to_s + ".bk" )
if File.exists?(Oneshot::SAVE_PATH + "/save_backups/p-settings" + (i-1).to_s + ".bk")
File.rename(Oneshot::SAVE_PATH + "/save_backups/p-settings" + (i-1).to_s + ".bk", Oneshot::SAVE_PATH + "/save_backups/p-settings" + i.to_s + ".bk" )
end
i -= 1
end
write_save(Oneshot::SAVE_PATH + "\\save_backups\\save1.bk")
write_perma_flags(Oneshot::SAVE_PATH + "\\save_backups\\p-settings1.bk")
write_save(Oneshot::SAVE_PATH + "/save_backups/save1.bk")
write_perma_flags(Oneshot::SAVE_PATH + "/save_backups/p-settings1.bk")
end
@ -166,7 +167,7 @@ def load_perma_flags
puts "oops: #{e.message}"
EdText.err("p-settings.dat corrupt. Attempting to load backup.")
for i in 1..6
if !File.exists?(Oneshot::SAVE_PATH + "\\save_backups\\p-settings" + (i).to_s + ".bk")
if !File.exists?(Oneshot::SAVE_PATH + "/save_backups/p-settings" + (i).to_s + ".bk")
EdText.err("All p-settings backups corrupt! Deleting corrupt p-settings file and shutting down.")
File.delete(PERMA_FLAGS_NAME)
Oneshot.allow_exit true
@ -174,7 +175,7 @@ def load_perma_flags
break
end
begin
read_perma_flags(Oneshot::SAVE_PATH + "\\save_backups\\p-settings" + (i).to_s + ".bk")
read_perma_flags(Oneshot::SAVE_PATH + "/save_backups/p-settings" + (i).to_s + ".bk")
break
rescue TypeError => e2
puts "oops: #{e2.message}"
@ -213,7 +214,7 @@ def real_load
puts "oops: #{e.message}"
EdText.err("save.dat corrupt. Attempting to load backup.")
for i in 1..6
if !File.exists?(Oneshot::SAVE_PATH + "\\save_backups\\save" + (i).to_s + ".bk")
if !File.exists?(Oneshot::SAVE_PATH + "/save_backups/save" + (i).to_s + ".bk")
EdText.err("All save backups corrupt! Deleting corrupt save and shutting down.")
File.delete(SAVE_FILE_NAME)
Oneshot.allow_exit true
@ -221,7 +222,7 @@ def real_load
break
end
begin
load(Oneshot::SAVE_PATH + "\\save_backups\\save" + (i).to_s + ".bk")
load(Oneshot::SAVE_PATH + "/save_backups/save" + (i).to_s + ".bk")
break
rescue TypeError => e2
puts "oops: #{e2.message}"

View file

@ -375,7 +375,7 @@ module Script
def self.copy_journal
Dir.mkdir(Oneshot::GAME_PATH) unless File.exists?(Oneshot::GAME_PATH)
Dir.mkdir(Oneshot::GAME_PATH + "/Oneshot") unless File.exists?(Oneshot::GAME_PATH + "/Oneshot")
if File.exists?(Oneshot::JOURNAL)
begin #if File.exists?(Oneshot::JOURNAL)
File.open(Oneshot::JOURNAL, "rb") do |input|
File.open(Oneshot::GAME_PATH + "/Oneshot/" + Oneshot::JOURNAL,"wb") do |output|
while buff = input.read(4096)
@ -398,12 +398,12 @@ module Script
end
def self.create_boxes
Dir.mkdir(Oneshot::DOCS_PATH + "\\My Games") unless File.exists?(Oneshot::DOCS_PATH + "\\My Games")
Dir.mkdir(Oneshot::DOCS_PATH + "\\My Games\\Oneshot") unless File.exists?(Oneshot::DOCS_PATH + "\\My Games\\Oneshot")
Dir.mkdir(Oneshot::DOCS_PATH + "\\My Games\\Oneshot\\Portal1") unless File.exists?(Oneshot::DOCS_PATH + "\\My Games\\Oneshot\\Portal1")
Dir.mkdir(Oneshot::DOCS_PATH + "\\My Games\\Oneshot\\Portal2") unless File.exists?(Oneshot::DOCS_PATH + "\\My Games\\Oneshot\\Portal2")
Dir.mkdir(Oneshot::DOCS_PATH + "\\My Games\\Oneshot\\Portal3") unless File.exists?(Oneshot::DOCS_PATH + "\\My Games\\Oneshot\\Portal3")
Dir.mkdir(Oneshot::DOCS_PATH + "\\My Games\\Oneshot\\BigPortal") unless File.exists?(Oneshot::DOCS_PATH + "\\My Games\\Oneshot\\BigPortal")
Dir.mkdir(Oneshot::GAME_PATH) unless File.exists?(Oneshot::GAME_PATH)
Dir.mkdir(Oneshot::GAME_PATH + "/Oneshot") unless File.exists?(Oneshot::GAME_PATH + "/Oneshot")
Dir.mkdir(Oneshot::GAME_PATH + "/Oneshot/Portal1") unless File.exists?(Oneshot::GAME_PATH + "/Oneshot/Portal1")
Dir.mkdir(Oneshot::GAME_PATH + "/Oneshot/Portal2") unless File.exists?(Oneshot::GAME_PATH + "/Oneshot/Portal2")
Dir.mkdir(Oneshot::GAME_PATH + "/Oneshot/Portal3") unless File.exists?(Oneshot::GAME_PATH + "/Oneshot/Portal3")
Dir.mkdir(Oneshot::GAME_PATH + "/Oneshot/BigPortal") unless File.exists?(Oneshot::GAME_PATH + "/Oneshot/BigPortal")
end
def self.delete_if_exists(f_name)
@ -412,25 +412,25 @@ module Script
def self.clear_boxes
for i in 1..3
portal_path = Oneshot::DOCS_PATH + "\\My Games\\Oneshot\\Portal" + i.to_s
portal_path = Oneshot::GAME_PATH + "/Oneshot/Portal" + i.to_s
case i
when 1
delete_if_exists(portal_path + "\\blue_npc_prototype.png")
delete_if_exists(portal_path + "\\proto1.png")
delete_if_exists(portal_path + "\\keyB.txt")
delete_if_exists(portal_path + "/blue_npc_prototype.png")
delete_if_exists(portal_path + "/proto1.png")
delete_if_exists(portal_path + "/keyB.txt")
when 2
delete_if_exists(portal_path + "\\green_npc_cedric.png")
delete_if_exists(portal_path + "\\cedric.png")
delete_if_exists(portal_path + "\\keyG.txt")
delete_if_exists(portal_path + "/green_npc_cedric.png")
delete_if_exists(portal_path + "/cedric.png")
delete_if_exists(portal_path + "/keyG.txt")
when 3
delete_if_exists(portal_path + "\\red_rue.png")
delete_if_exists(portal_path + "\\rue.png")
delete_if_exists(portal_path + "\\keyR.txt")
delete_if_exists(portal_path + "/red_rue.png")
delete_if_exists(portal_path + "/rue.png")
delete_if_exists(portal_path + "/keyR.txt")
end
end
delete_if_exists(Oneshot::DOCS_PATH + "\\My Games\\Oneshot\\BigPortal\\keyB.txt")
delete_if_exists(Oneshot::DOCS_PATH + "\\My Games\\Oneshot\\BigPortal\\keyG.txt")
delete_if_exists(Oneshot::DOCS_PATH + "\\My Games\\Oneshot\\BigPortal\\keyR.txt")
delete_if_exists(Oneshot::GAME_PATH + "/Oneshot/BigPortal/keyB.txt")
delete_if_exists(Oneshot::GAME_PATH + "/Oneshot/BigPortal/keyG.txt")
delete_if_exists(Oneshot::GAME_PATH + "/Oneshot/BigPortal/keyR.txt")
end
def self.copy_file(src, dst)
@ -454,71 +454,71 @@ module Script
end
def self.put_key_in_box(numb)
portal_path = Oneshot::DOCS_PATH + "\\My Games\\Oneshot\\Portal" + numb.to_s
portal_path = Oneshot::GAME_PATH + "/Oneshot/Portal" + numb.to_s
case numb
when 1
copy_file("Graphics\\Characters\\blue_npc_prototype.png", portal_path + "\\blue_npc_prototype.png")
copy_file("Graphics\\Faces\\proto1.png", portal_path + "\\proto1.png")
write_key(portal_path + "\\keyB.txt", PROTO_TEXT)
copy_file("Graphics/Characters/blue_npc_prototype.png", portal_path + "/blue_npc_prototype.png")
copy_file("Graphics/Faces/proto1.png", portal_path + "/proto1.png")
write_key(portal_path + "/keyB.txt", PROTO_TEXT)
when 2
copy_file("Graphics\\Characters\\green_npc_cedric.png", portal_path + "\\green_npc_cedric.png")
copy_file("Graphics\\Faces\\cedric.png", portal_path + "\\cedric.png")
write_key(portal_path + "\\keyG.txt", CEDRIC_TEXT)
copy_file("Graphics/Characters/green_npc_cedric.png", portal_path + "/green_npc_cedric.png")
copy_file("Graphics/Faces/cedric.png", portal_path + "/cedric.png")
write_key(portal_path + "/keyG.txt", CEDRIC_TEXT)
when 3
copy_file("Graphics\\Characters\\red_rue.png", portal_path + "\\red_rue.png")
copy_file("Graphics\\Faces\\rue.png", portal_path + "\\rue.png")
write_key(portal_path + "\\keyR.txt", RUE_TEXT)
copy_file("Graphics/Characters/red_rue.png", portal_path + "/red_rue.png")
copy_file("Graphics/Faces/rue.png", portal_path + "/rue.png")
write_key(portal_path + "/keyR.txt", RUE_TEXT)
end
end
def self.password1
copy_file("Graphics\\Fogs\\_\\scenario1\\pw1.png", Oneshot::DOCS_PATH + "\\ONESHOT_password1.png")
copy_file("Graphics\\Fogs\\_\\scenario1\\pw2.png", Oneshot::DOCS_PATH + "\\ONESHOT_password2.png")
copy_file("Graphics\\Fogs\\_\\scenario1\\pw3.png", Oneshot::DOCS_PATH + "\\ONESHOT_password3.png")
copy_file("Graphics\\Fogs\\_\\scenario1\\pw4.png", Oneshot::DOCS_PATH + "\\ONESHOT_password4.png")
copy_file("Graphics/Fogs/_/scenario1/pw1.png", Oneshot::DOCS_PATH + "/ONESHOT_password1.png")
copy_file("Graphics/Fogs/_/scenario1/pw2.png", Oneshot::DOCS_PATH + "/ONESHOT_password2.png")
copy_file("Graphics/Fogs/_/scenario1/pw3.png", Oneshot::DOCS_PATH + "/ONESHOT_password3.png")
copy_file("Graphics/Fogs/_/scenario1/pw4.png", Oneshot::DOCS_PATH + "/ONESHOT_password4.png")
end
def self.password2
copy_file("Graphics\\Fogs\\_\\scenario2\\pw1.png", Oneshot::DOCS_PATH + "\\ONESHOT_password1.png")
copy_file("Graphics\\Fogs\\_\\scenario2\\pw2.png", Oneshot::DOCS_PATH + "\\ONESHOT_password2.png")
copy_file("Graphics\\Fogs\\_\\scenario2\\pw3.png", Oneshot::DOCS_PATH + "\\ONESHOT_password3.png")
copy_file("Graphics\\Fogs\\_\\scenario2\\pw4.png", Oneshot::DOCS_PATH + "\\ONESHOT_password4.png")
copy_file("Graphics/Fogs/_/scenario2/pw1.png", Oneshot::DOCS_PATH + "/ONESHOT_password1.png")
copy_file("Graphics/Fogs/_/scenario2/pw2.png", Oneshot::DOCS_PATH + "/ONESHOT_password2.png")
copy_file("Graphics/Fogs/_/scenario2/pw3.png", Oneshot::DOCS_PATH + "/ONESHOT_password3.png")
copy_file("Graphics/Fogs/_/scenario2/pw4.png", Oneshot::DOCS_PATH + "/ONESHOT_password4.png")
end
=begin
def self.take_key_out_of_box(numb)
if File.exists?(Oneshot::DOCS_PATH + "\\My Games\\Oneshot\\Box" + numb.to_s + "\\key" + numb.to_s + ".png")
File.delete(Oneshot::DOCS_PATH + "\\My Games\\Oneshot\\Box" + numb.to_s + "\\key" + numb.to_s + ".png")
if File.exists?(Oneshot::GAME_PATH + "/Oneshot/Box" + numb.to_s + "/key" + numb.to_s + ".png")
File.delete(Oneshot::GAME_PATH + "/Oneshot/Box" + numb.to_s + "/key" + numb.to_s + ".png")
end
if File.exists?(Oneshot::DOCS_PATH + "\\My Games\\Oneshot\\BigBox\\key" + numb.to_s + ".png")
File.delete(Oneshot::DOCS_PATH + "\\My Games\\Oneshot\\BigBox\\key" + numb.to_s + ".png")
if File.exists?(Oneshot::GAME_PATH + "/Oneshot/BigBox/key" + numb.to_s + ".png")
File.delete(Oneshot::GAME_PATH + "/Oneshot/BigBox/key" + numb.to_s + ".png")
end
end
=end
def self.is_key_in_box(numb)
portal_path = Oneshot::DOCS_PATH + "\\My Games\\Oneshot\\Portal" + numb.to_s
portal_path = Oneshot::GAME_PATH + "/Oneshot/Portal" + numb.to_s
case numb
when 1
return File.exists?(portal_path + "\\keyB.txt")
return File.exists?(portal_path + "/keyB.txt")
when 2
return File.exists?(portal_path + "\\keyG.txt")
return File.exists?(portal_path + "/keyG.txt")
when 3
return File.exists?(portal_path + "\\keyR.txt")
return File.exists?(portal_path + "/keyR.txt")
end
return false
end
def self.is_key_in_bigbox(numb)
portal_path = Oneshot::DOCS_PATH + "\\My Games\\Oneshot\\BigPortal"
portal_path = Oneshot::GAME_PATH + "/Oneshot/BigPortal"
case numb
when 1
return File.exists?(portal_path + "\\keyB.txt")
return File.exists?(portal_path + "/keyB.txt")
when 2
return File.exists?(portal_path + "\\keyG.txt")
return File.exists?(portal_path + "/keyG.txt")
when 3
return File.exists?(portal_path + "\\keyR.txt")
return File.exists?(portal_path + "/keyR.txt")
end
return false
end