Permalink
Browse files

Merge branch 'master' of github.com:frogatto/frogatto

  • Loading branch information...
2 parents 824cadd + 00043dc commit 3a695bb357b9c13d366aab341bdd1f84be1b3c77 @davewx7 davewx7 committed Nov 10, 2012
Showing with 117 additions and 188 deletions.
  1. +19 −6 modules/cube_trains/data/object_prototypes/ct-cursor.cfg
  2. +4 −0 modules/cube_trains/data/object_prototypes/gui/scrolled_button_input.cfg
  3. +1 −1 modules/cube_trains/data/objects/ct-button-trains.cfg
  4. +2 −2 modules/cube_trains/data/objects/ct-cursor-edit.cfg
  5. +7 −1 modules/cube_trains/data/objects/ct-preview.cfg
  6. +1 −1 modules/cube_trains/data/objects/ct-ui-back-2.cfg
  7. +1 −0 modules/cube_trains/data/objects/ct-water-surface-5.cfg
  8. +34 −0 modules/cube_trains/data/objects/maps.txt
  9. BIN modules/cube_trains/images/experimental/cube trains/ui/brushed bronze.png
  10. BIN modules/cube_trains/images/experimental/cube trains/ui/buttons.png
  11. BIN modules/cube_trains/utils/UI.blend
  12. BIN modules/cube_trains/utils/blank plastic and metal buttons.png
  13. BIN modules/cube_trains/utils/buttons.xcf
  14. BIN modules/cube_trains/utils/large trains icon.gif
  15. BIN modules/cube_trains/utils/logo-a.png
  16. +0 −148 modules/cube_trains/utils/logo-a.svg
  17. BIN modules/cube_trains/utils/logo-a1.png
  18. +48 −29 modules/frogatto/data/objects/playable/frogatto_playable.cfg
  19. BIN modules/frogatto/sounds/slide-dirt1.wav
  20. BIN modules/frogatto/sounds/slide-dirt2.wav
  21. BIN modules/frogatto/sounds/slide-dirt3.wav
  22. BIN modules/frogatto/sounds/slide-dirt4.wav
  23. BIN modules/frogatto/sounds/slide-foliage1.wav
  24. BIN modules/frogatto/sounds/slide-foliage10.wav
  25. BIN modules/frogatto/sounds/slide-foliage2.wav
  26. BIN modules/frogatto/sounds/slide-foliage3.wav
  27. BIN modules/frogatto/sounds/slide-foliage4.wav
  28. BIN modules/frogatto/sounds/slide-foliage5.wav
  29. BIN modules/frogatto/sounds/slide-foliage6.wav
  30. BIN modules/frogatto/sounds/slide-foliage7.wav
  31. BIN modules/frogatto/sounds/slide-foliage8.wav
  32. BIN modules/frogatto/sounds/slide-foliage9.wav
  33. BIN modules/frogatto/sounds/slide-metal1.wav
  34. BIN modules/frogatto/sounds/slide-metal2.wav
  35. BIN modules/frogatto/sounds/slide-metal3.wav
  36. BIN modules/frogatto/sounds/slide-metal4.wav
  37. BIN modules/frogatto/sounds/slide-metal5.wav
  38. BIN modules/frogatto/sounds/slide-metal6.wav
  39. BIN modules/frogatto/sounds/slide-metal7.wav
  40. BIN modules/frogatto/sounds/slide-metal8.wav
  41. BIN modules/frogatto/sounds/slide-metal9.wav
@@ -164,17 +164,19 @@ foo()
] where deltaRemove = unique(delta['remove'])
where tmpAdd = delta['add'] // This must be where-defined, because it doesn't work here. ^----^. :(
where tmpDelta = delta",
-
+
+ place_piece_effect: "[
+ vars.preview.do_place_effect,
+ sound('Track-Clink${1d4}.wav', 0.15),
+ ]",
+
place_piece: "def(position_in) if(((not pieces[piece_selected] in
meta_placers(
map(at_coord(position), value.type)))
or edit_all) and map_unlocked, [
if(size(filter(pd['add'], 'pds', not pds.consts.meta)) > 0, [
clearRedo(),
apply_placement_delta(pd, position_in),
- vars.preview.do_place_effect,
- //sound('laying-track-b-2.wav', 0.7),
- sound('Track-Clink${1d4}.wav', 0.15),
],[
vars.message.add_text(head(pd.error)), //Although we may have more than one error message, we'll take take one at a time for simplicity's sake. To display all the error messages, just remove the head function.. In addition, we only display the error messages when we couldn't place a piece. This way, we'll not get pointless errors.
]),
@@ -630,7 +632,18 @@ on_render_depth_slowly: "render_depth(vars.location, 10)",
on_disable_undo_and_redo_buttons: "[set(self.vars.undoButton.animation, 'disabled'), set(self.vars.redoButton.animation, 'disabled')]",
-on_place: "place_piece(self.vars.location)",
+on_place_: "place_piece(self.vars.location)",
+on_place: "[
+ schedule(2, fire_event('place_')),
+ place_piece_effect,
+ ]",
+
+on_place_at: "[
+ place_piece_effect,
+ schedule(2, fire_event('place_at_', {'target_location':target_location})),
+ ]",
+on_place_at_: "place_piece(target_location)",
+
on_unplace: "remove_piece(self.vars.location)",
on_rebuild_all_pathing_nodes: "[
@@ -766,7 +779,7 @@ on_process: "[
if(not tmp.dragging or tmp.scrolling,
if((not handled) and vars.preview.setToGrid,
switch(mouse_button,
- 1, [if(not erase_button.pressed, place_piece(selectedGrid([mouse_x, mouse_y])),
+ 1, [if(not erase_button.pressed, fire_event('place_at', {'target_location':selectedGrid([mouse_x, mouse_y])}),
remove_piece(selectedGrid([mouse_x, mouse_y]))),
set(tmp.monitor_for_drag, null)],
2, null,
@@ -17,4 +17,8 @@ properties: {
consts: {
internal_button_offset: [0,0],
},
+
+//Fade out instead of waiting for mouse not over queue. Forgot: Won't fire second time anyway, because mouse never left.
+//on_mouse_enter: "map(range(steps), schedule(value, set(self.brightness, tween(255, 300, decimal(value)/steps)))) where steps = 20",
+
}
@@ -7,7 +7,7 @@ animation: [
"scale": 1
},
{
- "h": 25,
+ "h": 50,
"id": "normal",
"image": "experimental/cube trains/ui/buttons.png",
"w": 250,
@@ -25,8 +25,8 @@ properties: {
'toolbox' -> map(
[ 'block-5',
'windows-large-5',
- 'water-5',
- 'water-surface-5',
+ //'water-5',
+ //'water-surface-5',
'tunnel-1',
'legs-5',
'bridge-tiny-19',
@@ -10,7 +10,13 @@ properties: {
set_bright: "def(val) null",
- do_place_effect: "[schedule(2, set(self.alpha, 0)), schedule(10, set(self.alpha, self.vars.max_alpha))]",
+ do_place_effect: "[
+ schedule(3, set(self.alpha, 0)),
+ schedule(5, set(self.alpha, self.vars.max_alpha)),
+ set(self.y, self.y+10),
+ schedule(2, set(self.y, self.y+10)),
+ schedule(3, self.setToGrid(self.location)),
+ ]",
warn_colour: "def(enabled) if(not self.vars.erasing, map(all_preview_objects, set(value.blue, if(not enabled, 0, 255))))",
@@ -8,7 +8,7 @@ animation: [
"scale": 1
},
{
- rect: [312,623,745,698],
+ x:323, y:630, w:413, h:62,
"id": "normal",
"image": "experimental/cube trains/ui/brushed bronze.png",
}
@@ -11,6 +11,7 @@ properties: {
},
vars: {
group: ["water surface"],
+ encloses: 0,
},
animation: [
{
Oops, something went wrong.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Deleted file not rendered
@@ -1,148 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="500"
- height="500"
- id="svg2"
- version="1.1"
- inkscape:version="0.48.3.1 r9886"
- sodipodi:docname="logo-a.svg">
- <defs
- id="defs4">
- <inkscape:perspective
- sodipodi:type="inkscape:persp3d"
- inkscape:vp_x="108 : 260 : 1"
- inkscape:vp_y="0 : 1000 : 0"
- inkscape:vp_z="500 : 250 : 1"
- inkscape:persp3d-origin="250 : 166.66667 : 1"
- id="perspective3019" />
- </defs>
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="1"
- inkscape:cx="296.17432"
- inkscape:cy="247.6875"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- showguides="true"
- inkscape:guide-bbox="true"
- inkscape:snap-global="true"
- inkscape:window-width="1592"
- inkscape:window-height="851"
- inkscape:window-x="0"
- inkscape:window-y="0"
- inkscape:window-maximized="1"
- objecttolerance="20"
- guidetolerance="20">
- <inkscape:grid
- type="xygrid"
- id="grid2985"
- empspacing="25"
- visible="true"
- enabled="true"
- snapvisiblegridlinesonly="true" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-552.36218)">
- <path
- style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 100,75 150,0 0,125 150,0 0,200 -300,0 z"
- id="path3037"
- inkscape:connector-curvature="0"
- transform="translate(0,552.36218)"
- sodipodi:nodetypes="ccccccc" />
- <path
- style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 300,200 0,-75 -25,-25 25,-25 50,0 25,25 -25,25 0,75"
- id="path3045"
- inkscape:connector-curvature="0"
- transform="translate(0,552.36218)" />
- <path
- style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 125,100 100,0 0,100 -100,0 z"
- id="path3047"
- inkscape:connector-curvature="0"
- transform="translate(0,552.36218)" />
- <path
- sodipodi:type="arc"
- style="fill:none"
- id="path3051"
- sodipodi:cx="350"
- sodipodi:cy="400"
- sodipodi:rx="25"
- sodipodi:ry="25"
- d="m 375,400 a 25,25 0 1 1 -50,0 25,25 0 1 1 50,0 z"
- transform="translate(0,552.36218)" />
- <path
- sodipodi:type="arc"
- style="fill:none;stroke:#000000"
- id="path3056"
- sodipodi:cx="350"
- sodipodi:cy="400"
- sodipodi:rx="25"
- sodipodi:ry="25"
- d="m 375,400 a 25,25 0 1 1 -50,0 25,25 0 1 1 50,0 z"
- transform="translate(0,552.36218)" />
- <path
- sodipodi:type="arc"
- style="fill:none;stroke:#000000"
- id="path3058"
- sodipodi:cx="275"
- sodipodi:cy="400"
- sodipodi:rx="25"
- sodipodi:ry="25"
- d="m 300,400 a 25,25 0 1 1 -50,0 25,25 0 1 1 50,0 z"
- transform="translate(0,552.36218)" />
- <path
- sodipodi:type="arc"
- style="fill:none;stroke:#000000"
- id="path3060"
- sodipodi:cx="175"
- sodipodi:cy="375"
- sodipodi:rx="50"
- sodipodi:ry="50"
- d="m 225,375 a 50,50 0 1 1 -100,0 50,50 0 1 1 100,0 z"
- transform="translate(0,552.36218)" />
- <flowRoot
- xml:space="preserve"
- id="flowRoot3062"
- style="font-size:44px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;line-height:100%;letter-spacing:1.4px;word-spacing:0px;writing-mode:lr-tb;fill:#000000;fill-opacity:1;stroke:none;font-family:Nimbus Roman No9 L;-inkscape-font-specification:Nimbus Roman No9 L Bold"
- transform="translate(0,571.68998)"><flowRegion
- id="flowRegion3064"><rect
- id="rect3066"
- width="250"
- height="50"
- x="125"
- y="225"
- style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;line-height:100%;letter-spacing:1.4px;word-spacing:0px;writing-mode:lr-tb;font-family:Nimbus Roman No9 L;-inkscape-font-specification:Nimbus Roman No9 L Bold;font-size:44px" /></flowRegion><flowPara
- id="flowPara3068">Cube Trains</flowPara></flowRoot> </g>
-</svg>
Deleted file not rendered
@@ -101,19 +101,52 @@ properties: {
)
)",
- jump_sound: "def() [[if('fbr' in st, sound('jump-wood'+1d10+'.wav',0.7),
- if('ngs' in st or 'fug' in st, sound('jump-foliage'+1d8+'.wav'),
- if('nrk' in st or 'frg' in st, sound('jump-dirt'+1d9+'.wav'),
- if('crk' in st or 'dbk' in st or 'cbk' in st, sound('footstep-run-stone'+1d8+'.wav'),
- if('ins' in st or 'tnk' in st, sound('jump-wood-solid'+1d3+'.wav',0.6),
- if('ppl' in st or 'slf' in st, sound('footstep-run-metal'+1d5+'.wav',0.6)
-
-
-
- )))))),sound('JumpSoft.ogg')]
-
-
- ] where st = map(tiles_at(mid_x, mid_y + h), value.id)",
+#-------------------------- sfx for material-interactions --------------------------#
+ is_standing_on: "def(material_type) (switch(material_type,
+ 'wood', test(['fbr'], 'wood'),
+ 'foliage', test(['ngs'], 'foliage'),
+ 'dirt', test(['nrk','frg'], 'dirt'),
+ 'stone', test(['crk','dbk','cbk'], 'stone'),
+ 'wood_solid', test(['ins','tnk'], 'wood_solid'),
+ 'metal', test(['ppl','slf'], 'metal'))
+
+ ) where test = def(tile_types,object_type) if(object_type = objm, 1, if(find(tile_types, 'value', value in st), 1, 0))
+ where st = map(tiles_at(mid_x, mid_y + h), value.id)
+ where objm = level.player.standing_on.material_type",
+
+
+ slide_sound: "def() if(is_standing_on('wood'), sound('slide-dirt'+1d4+'.wav'),
+ if(is_standing_on('foliage'), sound('slide-foliage'+1d10+'.wav'),
+ if(is_standing_on('dirt'), sound('slide-dirt'+1d4+'.wav'),
+ if(is_standing_on('stone'), sound('slide-dirt'+1d4+'.wav'),
+ if(is_standing_on('wood_solid'), sound('slide-dirt'+1d4+'.wav'),
+ if(is_standing_on('metal'), sound('slide-metal'+1d9+'.wav')
+
+ ))))))",
+
+
+ jump_sound: "def() [if(is_standing_on('wood'), sound('jump-wood'+1d10+'.wav',0.7),
+ if(is_standing_on('foliage'), sound('jump-foliage'+1d8+'.wav'),
+ if(is_standing_on('dirt'), sound('jump-dirt'+1d9+'.wav'),
+ if(is_standing_on('stone'), sound('footstep-run-stone'+1d8+'.wav'),
+ if(is_standing_on('wood_solid'), sound('jump-wood-solid'+1d3+'.wav',0.6),
+ if(is_standing_on('metal'), sound('footstep-run-metal'+1d5+'.wav',0.6)
+
+ )))))),sound('JumpSoft.ogg')]",
+
+
+ footfall_sound: "def() [if(is_standing_on('wood'), sound('footstep-'+run+'wood'+if(running,1d10,1d7)+'.wav',if(running,0.7,1.0)),
+ if(is_standing_on('foliage'), sound('footstep-'+run+'foliage'+if(running,1d9,1d6)+'.wav'),
+ if(is_standing_on('dirt'), sound('footstep-'+run+'dirt'+if(running,1d9,1d10)+'.wav'),
+ if(is_standing_on('stone'), sound('footstep-'+run+'stone'+if(running,1d8,1d10)+'.wav'),
+ if(is_standing_on('wood_solid'), sound('footstep-'+run+'wood-solid'+if(running,1d7,1d8)+'.wav',0.6),
+ if(is_standing_on('metal'), sound('footstep-'+run+'metal'+if(running,1d5,1d5)+'.wav',0.8),
+
+ sound('footstep'+1d4+'.wav')))))))
+
+
+ ] where run = if(animation in ['run'],'run-','')
+ where running = (animation in ['run'])",
#-------------------------- mana --------------------------#
mana_regen_per_frame: "0.5 + if(has_item('lesser_mana_talisman'), 0.3333) + if(has_item('greater_mana_talisman'), 0.6667)",
@@ -483,7 +516,7 @@ on_end_ctrl_right: "[set(tmp.running, 0),
on_end_enter_crouch_anim: "animation('crouch')",
on_end_crouch_anim: "if(ctrl_down, animation('crouch'), animation('leave_crouch'))",
on_end_leave_crouch_anim: "stand(self)",
-on_enter_skid_anim: "if(abs(velocity_x) > 300 and (not underwater), spawn_on_ref('dust_cloud_skid', midpoint_x + 36*facing, y2 - 10, facing))",
+on_enter_skid_anim: "if(abs(velocity_x) > 300 and (not underwater), [spawn_on_ref('dust_cloud_skid', midpoint_x + 36*facing, y2 - 10, facing),slide_sound()])",
on_enter_land_anim: "if((not underwater), [spawn_on_ref('dust_cloud_skid', midpoint_x + 20*facing, y2 - 8, facing), spawn_on_ref('dust_cloud_skid', midpoint_x - 20*facing, y2 - 8, -facing)])",
on_end_roll_anim: "animation('crouch')",
on_leave_roll_anim: "stop_sound('loops/drumroll.ogg')",
@@ -521,21 +554,7 @@ on_idling: "if(tmp.idleness_level < 6,
])",
on_end_idle_eyeball_anim: "stand(self)",
on_end_idle_croak_anim: "stand(self)",
-on_footfall: "[if('fbr' in st, sound('footstep-'+run+'wood'+if(running,1d10,1d7)+'.wav',if(running,0.7,1.0)),
- if('ngs' in st or 'fug' in st, sound('footstep-'+run+'foliage'+if(running,1d9,1d6)+'.wav'),
- if('nrk' in st or 'frg' in st, sound('footstep-'+run+'dirt'+if(running,1d9,1d10)+'.wav'),
- if('crk' in st or 'dbk' in st or 'cbk' in st, sound('footstep-'+run+'stone'+if(running,1d8,1d10)+'.wav'),
- if('ins' in st or 'tnk' in st, sound('footstep-'+run+'wood-solid'+if(running,1d7,1d8)+'.wav',0.6),
- if('ppl' in st or 'slf' in st, sound('footstep-'+run+'metal'+if(running,1d5,1d5)+'.wav',0.8),
-
-
-
- sound('footstep'+1d4+'.wav')))))))
-
-
- ] where st = map(tiles_at(mid_x, mid_y + h), value.id)
- where run = if(animation in ['run'],'run-','')
- where running = (animation in ['run'])",
+on_footfall: "footfall_sound()",
on_enter_spit_anim: "[set(tmp.spit_force, 0), set(variations, filter(variations, 'v', v != 'fat'))]",
on_process_spit: "[if(ctrl_attack or ctrl_tongue, add(tmp.spit_force, 1)),maintain_locomotion()]",
on_end_spit_anim: "if(underwater, float(self), stand(self))",
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 3a695bb

Please sign in to comment.