Browse Source

Add Gliss; allow characters to have a capacity

This also fixes a bug that caused the initial value for
each attribute to be wrong if the default unit didn't match
the unit used internally.
master
Fen Dweller 5 years ago
parent
commit
a06e45b7f6
4 changed files with 1076 additions and 2 deletions
  1. +14
    -2
      macrovision.js
  2. +12
    -0
      media/attribution.js
  3. +1018
    -0
      media/characters/gliss/front.svg
  4. +32
    -0
      presets/characters.js

+ 14
- 2
macrovision.js View File

@@ -110,6 +110,11 @@ math.createUnit("multiverses", {
prefixes: "long"
});

math.createUnit("people", {
definition: "75 liters",
prefixes: "long"
});

const unitChoices = {
length: [
"meters",
@@ -138,6 +143,13 @@ const unitChoices = {
"acres",
"miles^2"
],
volume: [
"liters",
"milliliters",
"m^3",
"gallons",
"people"
],
mass: [
"kilograms",
"milligrams",
@@ -791,8 +803,6 @@ function configViewOptions(entity, view) {
input.setAttribute("type", "number");
input.setAttribute("min", 1);

setNumericInput(input, entity.views[view][key].value);

const select = document.createElement("select");
select.classList.add("options-field-unit");
select.id = "options-view-" + key + "-select"
@@ -822,6 +832,8 @@ function configViewOptions(entity, view) {
})

select.setAttribute("oldUnit", select.value);
setNumericInput(input, entity.views[view][key].toNumber(select.value));

// TODO does this ever cause a change in the world?
select.addEventListener("input", e => {


+ 12
- 0
media/attribution.js View File

@@ -9695,6 +9695,18 @@ const attributionData = {
"makar-ro"
]
},
{
prefix: "./media/characters/gliss/",
files: [
{ name: "front.svg", source: "https://www.furaffinity.net/view/18718168/" }
],
authors: [
"xanaomin"
],
owners: [
"xanaomin"
]
},
//characters
{
prefix: "./media/dildos/chance/",


+ 1018
- 0
media/characters/gliss/front.svg
File diff suppressed because it is too large
View File


+ 32
- 0
presets/characters.js View File

@@ -27,6 +27,15 @@ function makeCharacter(info, viewInfo, defaultSizes) {
base: value.weight
};
}

if (value.capacity) {
views[key].attributes.capacity = {
name: "Capacity",
power: 3,
type: "volume",
base: value.capacity
}
}
});

return createEntityMaker(info, views, defaultSizes);
@@ -22560,6 +22569,29 @@ characterMakers.push(() => makeCharacter(
]
))

characterMakers.push(() => makeCharacter(
{ name: "Gliss" },
{
front: {
height: math.unit(6.71, "feet"),
weight: math.unit(200, "lb"),
capacity: math.unit(1000000, "people"),
name: "Front",
image: {
source: "./media/characters/gliss/front.svg",
extra: 2347/2231,
bottom: 113/2462
}
},
},
[
{
name: "Normal",
height: math.unit(6.71, "feet"),
default: true
},
]
))

//characters



Loading…
Cancel
Save