This commit is contained in:
Segey Lapin
2021-12-24 23:56:10 +03:00
parent d401cf1090
commit f62e7fa720
113 changed files with 198252 additions and 412103 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.
+32
View File
@@ -0,0 +1,32 @@
extends MeshInstance
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
call("spawn_everything")
func spawn_everything():
for k in get_children():
if k.name.begins_with("spawn_"):
if k.name.begins_with("spawn_player"):
if scenario.castle1_captured:
scenario.emit_signal("spawn_player", k.global_transform)
else:
k.add_to_group("spawn")
if k.name.begins_with("spawn_courtmaid"):
k.add_to_group("female")
k.add_to_group("courtmaid")
k.set_meta("roster", ["castle1", "courtroom"])
if k.name.begins_with("spawn_mystress"):
k.add_to_group("female")
k.add_to_group("mystress")
k.set_meta("roster", ["castle1", "courtroom"])
if k.name.begins_with("spawn_tied_male"):
k.add_to_group("male")
k.add_to_group("captured")
k.set_meta("roster", ["castle1", "courtroom"])
print("SPAWN!! ", k.name)
+7
View File
@@ -0,0 +1,7 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://objects/courtroom.scn" type="PackedScene" id=1]
[ext_resource path="res://objects/courtroom.gd" type="Script" id=2]
[node name="courtroom" instance=ExtResource( 1 )]
script = ExtResource( 2 )
Binary file not shown.
Binary file not shown.
+25 -24
View File
@@ -1,7 +1,7 @@
extends Spatial
const tile_size = 8
const palace_size = 8
const palace_size = 12
const layers = 4
func _ready():
@@ -25,10 +25,10 @@ func _ready():
var xform = Transform(Basis(), Vector3(x, voffset, z))
if i > 0 && i < palace_size - 1:
if j > 0 && j < palace_size - 1:
call_deferred("place", ct, xform)
call("place", ct, xform)
if i in [0, palace_size - 1] || j in [0, palace_size - 1]:
if (j == palace_size / 2.0 || i != palace_size / 2.0):
call_deferred("place", "foundation_tile", xform)
call("place", "foundation_tile", xform)
else:
var ct = "room_tile"
var tower_angles = {
@@ -60,31 +60,32 @@ func _ready():
xform.basis = Basis().rotated(Vector3.UP, tower_angles[i][j])
if layer == layers - 1:
var twr = "tower_roof_tile"
call_deferred("place", twr, xform)
call("place", twr, xform)
else:
var tw = "tower_walls_tile"
call_deferred("place", tw, xform)
call("place", tw, xform)
var st = "stairs_tile"
call_deferred("place", st, xform)
call("place", st, xform)
if layer == 1:
var tfl = "tower_floor_tile"
call_deferred("place", tfl, xform)
call("place", tfl, xform)
call("place", "courtroom", Transform(Basis(), Vector3(-2, 0, 0)))
var car = Spatial.new()
car.add_to_group("spawn")
car.add_to_group("keep")
car.add_to_group("car")
add_child(car)
car.global_transform.origin = Vector3(-3, 0, -3)
for e in range(5):
var major_f = Spatial.new()
major_f.add_to_group("spawn")
if e == 0:
major_f.add_to_group("male")
else:
major_f.add_to_group("female")
major_f.add_to_group("keep")
add_child(major_f)
major_f.global_transform = Transform(Basis(), Vector3(cos(PI / 3 * e) * 2.0, 0, sin(PI / 3 * e) * 2.0) + Vector3(10.0, 0, 0))
car.global_transform.origin = Vector3(-5, 0, -5)
# for e in range(5):
# var major_f = Spatial.new()
# major_f.add_to_group("spawn")
# if e == 0:
# major_f.add_to_group("male")
# else:
# major_f.add_to_group("female")
# major_f.add_to_group("keep")
# add_child(major_f)
# major_f.global_transform = Transform(Basis(), Vector3(cos(PI / 3 * e) * 2.0, 0, sin(PI / 3 * e) * 2.0) + Vector3(10.0, 0, 0))
print("PALACE done")
func place(obj: String, where: Transform):
@@ -93,19 +94,19 @@ func place(obj: String, where: Transform):
func spawn_wall(layer:int, i: int, j: int, xform: Transform):
if layer == layers - 1:
var rt = "roof_tile"
call_deferred("place", rt, xform)
call("place", rt, xform)
elif (j != palace_size / 2.0 && i != palace_size / 2.0)|| layer > 2:
var ct = "room_tile"
call_deferred("place", ct, xform)
call("place", ct, xform)
elif (j == palace_size / 2.0 && i != palace_size / 2.0) && layer == 1:
var ent = "entry_tile"
call_deferred("place", ent, xform)
call("place", ent, xform)
elif (j != palace_size / 2.0 && i == palace_size / 2.0) && layer == 1:
var gw = "gate_bottom_tile"
call_deferred("place", gw, xform)
call("place", gw, xform)
elif (j != palace_size / 2.0 && i == palace_size / 2.0) && layer == 2:
var gw = "gate_top_tile"
call_deferred("place", gw, xform)
call("place", gw, xform)
elif (j == palace_size / 2.0 && i != palace_size / 2.0) && layer == 2:
var ct = "room_tile"
call_deferred("place", ct, xform)
call("place", ct, xform)
+1080 -2
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -20,6 +20,7 @@ nodes/use_legacy_names=false
materials/location=1
materials/storage=1
materials/keep_on_reimport=true
meshes/octahedral_compression=true
meshes/compress=true
meshes/ensure_tangents=true
meshes/storage=0
Binary file not shown.
Binary file not shown.
+1
View File
@@ -20,6 +20,7 @@ nodes/use_legacy_names=false
materials/location=1
materials/storage=1
materials/keep_on_reimport=true
meshes/octahedral_compression=true
meshes/compress=true
meshes/ensure_tangents=true
meshes/storage=0
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.