Skip to content

Commit

Permalink
Revert "Add more options for liquids (#72)"
Browse files Browse the repository at this point in the history
This reverts commit cb2874b.
  • Loading branch information
toasterparty committed Jul 25, 2024
1 parent 1cc5373 commit 2f44429
Show file tree
Hide file tree
Showing 5 changed files with 275 additions and 346 deletions.
38 changes: 1 addition & 37 deletions schema/randomprime.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2863,7 +2863,7 @@
"default": false
},
"liquids": {
"description": "Add liquid volumes to this room. The bigger their size, the bigger the `tileSize` and `tileSubdivisions` values must be in order for the liquid to render properly.",
"description": "Add liquid volumes to this room.",
"type": "array",
"items": {
"type": "object",
Expand Down Expand Up @@ -2896,42 +2896,6 @@
"scale": {
"description": "The extent of the liquid volume.",
"$ref": "#/$defs/vector3Positive"
},
"morphInTime": {
"description": "Duration in which the water will be traveling to it's destination.",
"type": "number",
"minimum": 0.0,
"default": 3.0
},
"morphOutTime": {
"description": "Duration in which the water will be traveling back to it's source position.",
"type": "number",
"minimum": 0.0,
"default": 3.0
},
"tileSize": {
"description": "Specify the size of the water tiles.",
"type": "number",
"minimum": 0.0,
"default": 2.4
},
"tileSubdivisions": {
"description": "Specify the amount of tile subdivisions on the liquid.",
"type": "integer",
"minimum": 0,
"default": 6
},
"alphaInTime": {
"description": "Duration in which the water will be fading back in view.",
"type": "number",
"minimum": 0.0,
"default": 3.0
},
"alphaOutTime": {
"description": "Duration in which the water will be fading out of view.",
"type": "number",
"minimum": 0.0,
"default": 3.0
}
},
"required": [
Expand Down
26 changes: 0 additions & 26 deletions src/add_modify_obj_patches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,32 +329,6 @@ pub fn patch_add_liquid<'r>(
.as_mut_vec();
water_obj.property_data.as_water_mut().unwrap().active =
config.active.unwrap_or(true) as u8;
water_obj
.property_data
.as_water_mut()
.unwrap()
.morph_in_time = config.morph_in_time.unwrap_or(1.0);
water_obj
.property_data
.as_water_mut()
.unwrap()
.morph_out_time = config.morph_out_time.unwrap_or(1.0);
water_obj.property_data.as_water_mut().unwrap().tile_size = config.tile_size.unwrap_or(2.4);
water_obj
.property_data
.as_water_mut()
.unwrap()
.tile_subdivisions = config.tile_subdivisions.unwrap_or(6);
water_obj
.property_data
.as_water_mut()
.unwrap()
.alpha_in_time = config.alpha_in_time.unwrap_or(3.0);
water_obj
.property_data
.as_water_mut()
.unwrap()
.alpha_out_time = config.alpha_out_time.unwrap_or(3.0);
let property_data: structs::SclyProperty = water_obj.property_data;

assert!(property_data.object_type() == structs::Water::OBJECT_TYPE);
Expand Down
6 changes: 0 additions & 6 deletions src/patch_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,6 @@ pub struct WaterConfig {
pub liquid_type: String,
pub position: [f32; 3],
pub scale: [f32; 3],
pub morph_in_time: Option<f32>,
pub morph_out_time: Option<f32>,
pub tile_size: Option<f32>,
pub tile_subdivisions: Option<u32>,
pub alpha_in_time: Option<f32>,
pub alpha_out_time: Option<f32>,
}

#[derive(PartialEq, Debug, Serialize, Deserialize, Copy, Clone)]
Expand Down
Loading

0 comments on commit 2f44429

Please sign in to comment.