-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disabled IFID reset option. (I had intended to disable this before the previous version, but forgot.) Changed how spool list is saved, such that order of spools is saved while maintaining ability to merge json files together. Changed overview table to alternate between two different colors each row. Added edit button to playscreen so that an encounter reached during playtesting can be loaded more quickly and easily. Deleted antagonist-selection menu from encounter editor scene. (It had been invisible, but now I've simply removed it completely.) Implemented greatly improved interface for drag-and-drop lists that have built in context menus. The lists for options, reactions, and effects now all use this interface. Different context menus are shown depending on whether the author right-clicked on an item or in the empty space of the list. Set compiler to remove console.log calls from interpreter when exporting storyworld in release mode. Exporting in debug mode will leave them in. Changed interpreter to use customized popup dialog in place of window confirm calls. Also fixed some bugs involving saving and loading games. First, characters were not being saved and reloaded properly, and second, saving a game when "the end" screen had been reached, then reloading, was loading the most recent encounter instead of the end. Both issues should now be solved. Removed saved game journal entry feature in interpreter. Removed some unused code from interpreter. The editor had a bug that caused a storyworld's modified_time to be updated upon loading it from a project file. Loading numerical values, such as earliest and latest turns, into spinboxes activates the "value_changed" signal. This can be fixed fully upon porting SweepWeave to Godot 4, as Godot 4 has new functions that one can call to set range interface values without triggering their value_changed signals, but in the meantime the interface elements for changing an encounter's earliest and latest turns have simply been deleted. I'm not sure if the bug can still occur under some circumstances, but I can worry about porting SweepWeave to Godot 4 another time. Added new option to help menu to let authors check for updates to SweepWeave. Updated gui theming for popup windows. Popup windows will now be centered upon popup. Changed default relationship model to use depth 1 properties for pTraits. Reorganized files.
- Loading branch information
1 parent
44e050d
commit 999df4f
Showing
69 changed files
with
1,456 additions
and
1,235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
extends Object | ||
class_name Clipboard | ||
|
||
var storyworld = null | ||
#Clipboard system variables: | ||
var clipped_copies = [] #Copies of the clipped data. | ||
var clipped_originals = [] #References to the original objects that were clipped. | ||
enum clipboard_task_types {NONE, CUT, COPY} | ||
var clipboard_task = clipboard_task_types.NONE | ||
enum clippable_item_types {OPTION, REACTION, EFFECT} | ||
|
||
func _init(): | ||
pass | ||
|
||
func clear(): | ||
clipped_originals.clear() | ||
for item in clipped_copies: | ||
item.clear() | ||
item.call_deferred("free") | ||
clipped_copies.clear() | ||
clipboard_task = clipboard_task_types.NONE | ||
|
||
func clip(items): | ||
clear() | ||
clipped_originals = items | ||
for item in items: | ||
if (item is Option): | ||
var copy = Option.new(null, "", "") | ||
copy.set_as_copy_of(item, false) | ||
clipped_copies.append(copy) | ||
elif (item is Reaction): | ||
var copy = Reaction.new(null, "", "") | ||
copy.set_as_copy_of(item, false) | ||
clipped_copies.append(copy) | ||
elif (item is BNumberEffect): | ||
var copy = BNumberEffect.new() | ||
copy.set_as_copy_of(item) | ||
clipped_copies.append(copy) | ||
elif (item is SpoolEffect): | ||
var copy = SpoolEffect.new() | ||
copy.set_as_copy_of(item) | ||
clipped_copies.append(copy) | ||
|
||
func cut(items): | ||
clip(items) | ||
clipboard_task = clipboard_task_types.CUT | ||
|
||
func copy(items): | ||
clip(items) | ||
clipboard_task = clipboard_task_types.COPY | ||
|
||
func log_update(encounter = null): | ||
#If encounter == null, then the project as a whole is being updated, rather than a specific encounter, or an encounter has been added, deleted, or duplicated. | ||
if (null != encounter): | ||
encounter.log_update() | ||
storyworld.log_update() | ||
OS.set_window_title("SweepWeave - " + storyworld.storyworld_title + "*") | ||
storyworld.project_saved = false | ||
emit_signal("refresh_encounter_list") | ||
|
||
func delete_clipped_originals(): | ||
if (clipped_originals.empty()): | ||
return | ||
for item in clipped_originals: | ||
if (item is Option): | ||
storyworld.delete_option_from_scripts(item) | ||
if (null != item.encounter): | ||
item.encounter.options.erase(item) | ||
item.encounter.wordcount() | ||
log_update(item.encounter) | ||
item.clear() | ||
item.call_deferred("free") | ||
emit_signal("refresh_graphview") | ||
elif (item is Reaction): | ||
storyworld.delete_reaction_from_scripts(item) | ||
if (null != item.option): | ||
item.option.reactions.erase(item) | ||
item.option.encounter.wordcount() | ||
log_update(item.option.encounter) | ||
item.clear() | ||
item.call_deferred("free") | ||
emit_signal("refresh_graphview") | ||
elif (item is BNumberEffect): | ||
if (null != item.cause): | ||
item.cause.after_effects.erase(item) | ||
log_update(item.cause.option.encounter) | ||
item.clear() | ||
item.call_deferred("free") | ||
elif (item is SpoolEffect): | ||
if (null != item.cause): | ||
item.cause.after_effects.erase(item) | ||
log_update(item.cause.option.encounter) | ||
item.clear() | ||
item.call_deferred("free") | ||
clipped_originals.clear() | ||
|
||
func paste(): | ||
var items_to_paste = [] | ||
if (null == storyworld or !(storyworld is Storyworld)): | ||
#Cannot create new items without a storyworld to tie them to. | ||
return items_to_paste | ||
for item in clipped_copies: | ||
if (item is Option): | ||
var copy = storyworld.create_new_generic_option(null) | ||
copy.set_as_copy_of(item, false) | ||
items_to_paste.append(copy) | ||
elif (item is Reaction): | ||
var copy = storyworld.create_new_generic_reaction(null) | ||
copy.set_as_copy_of(item, false) | ||
items_to_paste.append(copy) | ||
elif (item is BNumberEffect): | ||
var copy = BNumberEffect.new() | ||
copy.set_as_copy_of(item) | ||
items_to_paste.append(copy) | ||
elif (item is SpoolEffect): | ||
var copy = SpoolEffect.new() | ||
copy.set_as_copy_of(item) | ||
items_to_paste.append(copy) | ||
return items_to_paste |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.