Compare commits

..

No commits in common. "e71115be849d74589ad451c91e259071c9406094" and "dc8e3a7902eb6de935580eaf50345409e06bc8b6" have entirely different histories.

7 changed files with 11 additions and 30 deletions

View file

@ -241,6 +241,7 @@ bus = &"Crash"
[node name="NoInputTimer" type="Timer" parent="CharacterBody_Car"]
wait_time = 15.0
one_shot = true
autostart = true
[connection signal="timeout" from="CharacterBody_Car/resetTimer" to="CharacterBody_Car" method="_on_reset_timer_timeout"]
[connection signal="timeout" from="CharacterBody_Car/collisionEnableTimer" to="CharacterBody_Car" method="_on_collision_enable_timer_timeout"]

View file

@ -122,6 +122,7 @@ collision_mask = 4
[node name="CollisionShape2D" type="CollisionShape2D" parent="area_cp3"]
position = Vector2(6807.55, 249.841)
rotation = 0.23911
scale = Vector2(1, 1)
shape = SubResource("RectangleShape2D_j11df")
[node name="area_cp4" type="Area2D" parent="."]

View file

@ -110,7 +110,6 @@ var finalTime=-1
func _ready() -> void:
collision_shape.disabled=true #disable collisions on start. also to avoid collision when initially setting position
finalTime=-1
no_input_timer.wait_time=Gamestate.getRemoveCarsTimeout()
func _physics_process(delta: float) -> void:
@ -254,7 +253,7 @@ func get_input(delta:float):
if key_accelerator_pressed:
no_input_timer.stop()
else:
if Gamestate.getRemoveCarsTimeout()>0 and no_input_timer.is_stopped() and !no_input_timeout_flag: #reset timer
if no_input_timer.is_stopped() and !no_input_timeout_flag: #reset timer
no_input_timer.start()
if key_accelerator_pressed:

View file

@ -10,8 +10,6 @@ func _ready() -> void:
config.set_value("video", "fullscreen", false)
config.set_value("general", "remove_cars_timeout", 15)
config.save(SETTINGS_FILE_PATH)
else:
config.load(SETTINGS_FILE_PATH)
@ -23,13 +21,6 @@ func save_video_setting(key: String, value):
func get_video_setting(key: String):
return config.get_value("video", key)
func save_general_setting(key: String, value):
config.set_value("general", key,value)
config.save(SETTINGS_FILE_PATH)
func get_general_setting(key: String):
return config.get_value("general", key)
func get_keywhitelist_setting():
var keywhitelist=[]
if config.get_value("keywhitelist", "enabled"):

View file

@ -16,8 +16,6 @@ var map_scene_name_postfix=".tscn"
var rounds=3
var remove_cars_timeout=true
var automatic_map_change_in_start=5
var automatic_map_change_in=automatic_map_change_in_start #change map when this reaches 0
@ -30,14 +28,6 @@ func setRounds(r):
print("Rounds set to "+str(r))
rounds=r
func getRemoveCarsTimeout():
return remove_cars_timeout
func setRemoveCarsTimeout(s):
print("remove_cars_timeout set to "+str(s))
remove_cars_timeout=s
func getSelectedMap(): #return only short map name "00"
return map_scene_name

View file

@ -16,7 +16,6 @@ func _ready():
btn_fullscreen.button_pressed=DisplayServer.window_get_mode(0)==DisplayServer.WINDOW_MODE_FULLSCREEN #toogle fullscreen switch to correct init state
btn_fullscreen.button_pressed=ConfigFileHandler.get_video_setting("fullscreen")
Gamestate.setRemoveCarsTimeout(ConfigFileHandler.get_general_setting("remove_cars_timeout"))
keywhitelist=ConfigFileHandler.get_keywhitelist_setting() #empty list if disabled
btn_save_whitelist.disabled=keywhitelist.size()>0 #whitelist enabled, then disable save whitelist button