Integrate five Meshy apparatus with fitted soul poses and anchored restraints
This commit is contained in:
@@ -1,54 +1,25 @@
|
||||
extends RefCounted
|
||||
const POP=preload("res://audio/infernal_pop.wav")
|
||||
|
||||
func build(g,d):
|
||||
var root=d.device
|
||||
var wood=Color("48302f");var iron=Color("292d35");var brass=Color("a58b59")
|
||||
d["special"]={"bubbles":[],"notes":[],"liquid":null,"music":null,"players":[],"speaker_roots":[],"heat":0.0}
|
||||
preload("res://meshy_equipment.gd").new().build(g,d)
|
||||
if d.selected==4:
|
||||
d.special["seat"]=g.box(root,Vector3(0,.62,-.23),Vector3(1.05,.16,.42),wood);d.special.seat.name="ChairSeat"
|
||||
g.box(root,Vector3(0,.025,.71),Vector3(.85,.05,.45),iron)
|
||||
g.box(root,Vector3(0,1.45,-.48),Vector3(1.15,1.55,.18),wood)
|
||||
for x in [-.47,.47]:
|
||||
for z in [-.40,.20]:g.cylinder(root,Vector3(x,.29,z),.075,.58,iron)
|
||||
g.box(root,Vector3(x*1.3,1.06,.05),Vector3(.16,.14,.96),wood)
|
||||
for z in [-.32,.42]:g.line(root,Vector3(x*1.3,.68,z),Vector3(x*1.3,1.05,z),.045,iron)
|
||||
var cuff=preload("res://leather_cuff.gd").make(g,root,Vector3(x*1.3,1.15,.2),.13);cuff.rotation.x=PI/2
|
||||
for link_index in range(4):
|
||||
var link=g.torus(root,Vector3(x*1.3,1.04-link_index*.12,.2),.12,iron)
|
||||
link.scale=Vector3.ONE*.5;link.rotation.x=PI/2 if link_index%2==0 else 0
|
||||
for x in [-.23,.23]:
|
||||
var ankle=preload("res://leather_cuff.gd").make(g,root,Vector3(x,.13,.66),.095);ankle.rotation.x=PI/2
|
||||
g.line(root,Vector3(x,.13,.66),Vector3(x,.35,.38),.025,iron)
|
||||
g.box(root,Vector3(0,1.45,-.34),Vector3(1.08,.075,.04),Color("33241e"))
|
||||
g.box(root,Vector3(0,.91,.12),Vector3(1.08,.075,.045),Color("33241e"))
|
||||
for side in [-1,1]:
|
||||
var speaker_root=Node3D.new();root.add_child(speaker_root);speaker_root.name="InwardFacingSpeaker";speaker_root.position=Vector3(side*1.05,1.05,-.45)
|
||||
var direction=Vector3(0,1.05,.10)-speaker_root.position;speaker_root.rotation.y=atan2(direction.x,direction.z);d.special.speaker_roots.append(speaker_root)
|
||||
g.box(speaker_root,Vector3.ZERO,Vector3(.50,1.20,.50),iron)
|
||||
for y in [-.30,.26]:
|
||||
var speaker=g.cylinder(speaker_root,Vector3(0,y,.27),.19,.045,Color("14141c"));speaker.rotation.x=PI/2
|
||||
var rim=g.torus(speaker_root,Vector3(0,y,.30),.19,brass);rim.rotation.x=PI/2
|
||||
g.ball(speaker_root,Vector3(0,y,.31),Vector3(.12,.12,.04),Color("6c4f7d"))
|
||||
for j in range(9):g.line(speaker_root,Vector3(-.15+j*.038,y-.14,.325),Vector3(-.15+j*.038,y+.14,.325),.004,Color("4b4b52"))
|
||||
for j in range(3):
|
||||
var note=g.torus(root,Vector3(side*(.95+j*.10),2.0+j*.18,-.35),.07,Color("b38bd5"));note.hide();d.special.notes.append(note)
|
||||
var music=AudioStreamPlayer3D.new();speaker_root.add_child(music);music.position.z=.31;music.unit_size=4;music.max_distance=16
|
||||
for speaker in d.special.speaker_roots:
|
||||
var music=AudioStreamPlayer3D.new();speaker.add_child(music);music.unit_size=4;music.max_distance=16
|
||||
music.stream=POP.duplicate();music.stream.loop_mode=AudioStreamWAV.LOOP_FORWARD;music.stream.loop_end=int(music.stream.get_length()*music.stream.mix_rate)
|
||||
d.special.players.append(music)
|
||||
for j in range(3):
|
||||
var note=g.torus(root,speaker.position+Vector3(0,.25+j*.18,0),.07,Color("b38bd5"));note.hide();note.set_meta("no_walk_collision",true);d.special.notes.append(note)
|
||||
d.special.music=d.special.players[0]
|
||||
else:
|
||||
preload("res://cauldron_shell.gd").new().build(g,root)
|
||||
var liquid=preload("res://water_surface.gd").new().build(g,root,1.24,Vector3(0,1.55,0),true)
|
||||
d.special.liquid=liquid
|
||||
g.torus(root,Vector3(0,1.65,0),1.32,brass)
|
||||
for side in [-1,1]:
|
||||
var handle=g.torus(root,Vector3(side*1.48,1.15,0),.30,iron);handle.rotation.z=PI/2
|
||||
for i in range(12):
|
||||
var a=i*TAU/12
|
||||
g.ball(root,Vector3(cos(a)*1.38,1.4,sin(a)*1.38),Vector3.ONE*.07,brass)
|
||||
d.special.liquid=preload("res://water_surface.gd").new().build(g,root,1.24,Vector3(0,1.55,0),true)
|
||||
for i in range(16):
|
||||
var bubble=g.ball(root,Vector3.ZERO,Vector3.ONE*.07,Color("c2ddd9"));bubble.hide();d.special.bubbles.append(bubble)
|
||||
var bubble=g.ball(root,Vector3.ZERO,Vector3.ONE*.07,Color("c2ddd9"));bubble.hide();bubble.set_meta("no_walk_collision",true);d.special.bubbles.append(bubble)
|
||||
for i in range(10):
|
||||
var mist=MeshInstance3D.new();root.add_child(mist);var quad=QuadMesh.new();quad.size=Vector2(.38,.8);mist.mesh=quad
|
||||
var material=ShaderMaterial.new();material.shader=preload("res://steam.gdshader");material.render_priority=111;material.set_shader_parameter("phase",i*.63);mist.material_override=material
|
||||
mist.position=Vector3(sin(i*2.4)*.85,1.9,cos(i*2.4)*.85)
|
||||
d.flame=Node3D.new();root.add_child(d.flame)
|
||||
for i in range(6):
|
||||
var quad=QuadMesh.new();quad.size=Vector2(.8,.6)
|
||||
|
||||
Reference in New Issue
Block a user