Skip to content

Commit

Permalink
Merge pull request #1374 from elanthia-online/map-1.1.0
Browse files Browse the repository at this point in the history
[map.lic] v1.1.0 reset cli option
  • Loading branch information
mrhoribu authored Dec 17, 2023
2 parents c822e30 + f8b878c commit 1d90c9e
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion scripts/map.lic
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ Tracks your current room on Tsoran (or other) maps
game: Gemstone
tags: core, movement, mapping
required: Lich > 5.0.1
version: 1.0.0
version: 1.1.0
changelog:
v1.1.0 (2023-12-15)
* add RESET option to set all Settings back to default
v1.0.0 (2023-08-18)
* initial release and forking from xnarost v1.0.3
=end
Expand Down Expand Up @@ -212,6 +214,17 @@ end

trouble = script.vars.any? { |var| var =~ /trouble/i }

if Script.current.vars[1] =~ /reset/i
Settings.load
Settings['keep_above'] = true
Settings['global_scale'] = 1
Settings['map_scale'] = Hash.new
Settings['window_width'] = 400
Settings['window_height'] = 300
Settings['window_position'] = [0, 0]
Settings.save
end

get_pointer = proc do |gtk_window|
gdk_window = gtk_window.window
pos = gdk_window.get_device_position(Gdk::Display.default.default_seat.pointer)
Expand Down

0 comments on commit 1d90c9e

Please sign in to comment.