Skip to content

Commit

Permalink
Merge pull request #11 from cech12/develop
Browse files Browse the repository at this point in the history
add cave generation Buttons to the Game Manager of the "SwitcherGener…
  • Loading branch information
cech12 authored Jul 31, 2016
2 parents b618ddc + 212306d commit cf27578
Show file tree
Hide file tree
Showing 20 changed files with 402 additions and 344 deletions.
2 changes: 1 addition & 1 deletion Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,19 +1,53 @@
$start
$before
proc GameOver {} {
proc GameOver {} {
$put

proc get_generate {} {
global Generate_enabled
return $Generate_enabled
}

proc set_generate {state} {
global Generate_enabled
set Generate_enabled $state
}


proc get_generate_Urwald {} {
global generate_Urwald
return $generate_Urwald
}
proc set_generate_Urwald {state} {
global generate_Urwald
set generate_Urwald $state
}

proc get_generate_Metall {} {
global generate_Metall
return $generate_Metall
}
proc set_generate_Metall {state} {
global generate_Metall
set generate_Metall $state
}

proc get_generate_Kristall {} {
global generate_Kristall
return $generate_Kristall
}
proc set_generate_Kristall {state} {
global generate_Kristall
set generate_Kristall $state
}
proc get_generate_Lava {} {
global generate_Lava
return $generate_Lava
}
proc set_generate_Lava {state} {
global generate_Lava
set generate_Lava $state
}


$end

$start
Expand All @@ -23,10 +57,89 @@ $put
method get_generate_enable {} {
return [get_generate]
}

method set_generate_enable {state} {
set_generate $state
}
}

method get_generate_Urwald_enable {} {
return [get_generate_Urwald]
}
method set_generate_Urwald_enable {state} {
set_generate_Urwald $state
}

method get_generate_Metall_enable {} {
return [get_generate_Metall]
}
method set_generate_Metall_enable {state} {
set_generate_Metall $state
}

method get_generate_Kristall_enable {} {
return [get_generate_Kristall]
}
method set_generate_Kristall_enable {state} {
set_generate_Kristall $state
}

method get_generate_Lava_enable {} {
return [get_generate_Lava]
}
method set_generate_Lava_enable {state} {
set_generate_Lava $state
}


$end


$start
$after
global zone midx temp_buffer failcount maxfailures gencount resolution act_sort_y act_sort_x
$put
generate_Urwald generate_Metall generate_Kristall generate_Lava
$end

$start
$replace
lg_tp_addtemplatesets " $zone.Std "
lg_tp_objfilter { Troll Zwerg }


switch $zone {
"Urwald" {lg_set_templategroupvalue $zone.Std.Hol 0.287;log "UUUU"}
"Metall" {lg_set_templategroupvalue $zone.Std.Hol 0.185;log "MMM"}
"Kristall" {lg_set_templategroupvalue $zone.Std.Hol 0.077;log "KKKK"}
"Lava" {lg_set_templategroupvalue $zone.Std.Hol 0.105;log "LLLL"}
}
$with
set generate_sum [expr {$generate_Urwald + $generate_Metall + $generate_Kristall + $generate_Lava}]
if { $generate_Urwald == 1 } {
lg_tp_addtemplatesets " Urwald.Std "
lg_set_templategroupvalue Urwald.Std.Hol [expr {0.287 / $generate_sum}]
}
if { $generate_Metall == 1 } {
lg_tp_addtemplatesets " Metall.Std "
lg_set_templategroupvalue Metall.Std.Hol [expr {0.185 / $generate_sum}]
}
if { $generate_Kristall == 1 } {
lg_tp_addtemplatesets " Kristall.Std "
lg_set_templategroupvalue Kristall.Std.Hol [expr {0.077 / $generate_sum}]
}
if { $generate_Lava == 1 } {
lg_tp_addtemplatesets " Lava.Std "
lg_set_templategroupvalue Lava.Std.Hol [expr {0.105 / $generate_sum}]
}
lg_tp_objfilter { Troll Zwerg }
$end

$start
$before
set zone "Urwald"
$put
set generate_Urwald 1
set generate_Metall 0
set generate_Kristall 0
set generate_Lava 0

$end
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
$start
$replace
sm_force_zone Kristall
$with
sm_force_zone Kristall

set storymgr [lindex [obj_query 0 -class StoryMgr -limit 1] 0]
if {$storymgr != 0} {
call_method $storymgr set_generate_Urwald_enable 0
call_method $storymgr set_generate_Metall_enable 0
call_method $storymgr set_generate_Kristall_enable 1
call_method $storymgr set_generate_Lava_enable 0
}
$end
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
$start
$replace
sm_force_zone Lava
$with
sm_force_zone Lava

set storymgr [lindex [obj_query 0 -class StoryMgr -limit 1] 0]
if {$storymgr != 0} {
call_method $storymgr set_generate_Urwald_enable 0
call_method $storymgr set_generate_Metall_enable 0
call_method $storymgr set_generate_Kristall_enable 0
call_method $storymgr set_generate_Lava_enable 1
}
$end
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
$start
$replace
sm_force_zone Metall
$with
sm_force_zone Metall

set storymgr [lindex [obj_query 0 -class StoryMgr -limit 1] 0]
if {$storymgr != 0} {
call_method $storymgr set_generate_Urwald_enable 0
call_method $storymgr set_generate_Metall_enable 1
call_method $storymgr set_generate_Kristall_enable 0
call_method $storymgr set_generate_Lava_enable 0
}
$end
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $after
call /scripts/misc/onlinehelputils.tcl

$put
call /scripts/text/doc/en/info_gamemanager.tcl
call /scripts/text/doc/info_gamemanager.tcl

$end

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $after
call /scripts/misc/onlinehelputils.tcl

$put
call /scripts/text/doc/en/info_gamemanager.tcl
call /scripts/text/doc/info_gamemanager.tcl

$end

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $after
call /scripts/misc/onlinehelputils.tcl

$put
call /scripts/text/doc/en/info_gamemanager.tcl
call /scripts/text/doc/info_gamemanager.tcl

$end

Expand Down
Loading

0 comments on commit cf27578

Please sign in to comment.