瀏覽代碼

Shoes can be put on before socks. Removing socks or shoes causes stench.

tags/v0.7.0
Fen Dweller 7 年之前
父節點
當前提交
ea8a937668
共有 1 個檔案被更改,包括 60 行新增8 行删除
  1. +60
    -8
      game.js

+ 60
- 8
game.js 查看文件

@@ -2768,6 +2768,32 @@ function remove_shoes() {
footwearUpdate(); footwearUpdate();


update([line,summary,newline]); update([line,summary,newline]);

if (macro.stenchEnabled) {
remove_shoes_stench();
}
}

function remove_shoes_stench() {
let area = macro.pawStenchArea * 2;
let prey = getPrey(biome, area);
let line = describe("paw-stench", prey, macro, verbose);
let linesummary = summarize(prey.sum(), true);

let people = get_living_prey(prey.sum());

if (get_living_prey(prey.sum()) == 0)
return;

let preyMass = prey.sum_property("mass");

macro.addGrowthPoints(preyMass);

add_victim_people("paw-stench",prey);

update([line,linesummary,newline]);

macro.arouse(5);
} }


function wear_socks() { function wear_socks() {
@@ -2799,6 +2825,32 @@ function remove_socks() {
footwearUpdate(); footwearUpdate();


update([line,summary,newline]); update([line,summary,newline]);

if (macro.stenchEnabled) {
remove_socks_stench();
}
}

function remove_socks_stench() {
let area = macro.pawStenchArea * 2;
let prey = getPrey(biome, area);
let line = describe("paw-stench", prey, macro, verbose);
let linesummary = summarize(prey.sum(), true);

let people = get_living_prey(prey.sum());

if (get_living_prey(prey.sum()) == 0)
return;

let preyMass = prey.sum_property("mass");

macro.addGrowthPoints(preyMass);

add_victim_people("paw-stench",prey);

update([line,linesummary,newline]);

macro.arouse(5);
} }


function stuff_shoes() { function stuff_shoes() {
@@ -2862,23 +2914,23 @@ function footwearUpdate() {
} else { } else {
enable_button("stuff_shoes"); enable_button("stuff_shoes");
enable_button("dump_shoes"); enable_button("dump_shoes");

if (!macro.footSockEnabled || macro.footSockWorn) {
enable_button("wear_shoes");
}
enable_button("wear_shoes");
} }
} }


if (!macro.footShoeEnabled || !macro.footShoeWorn) {
if (macro.footSockEnabled) {
if (macro.footSockEnabled) {
if (!macro.footShoeEnabled || !macro.footShoeWorn) {
if (macro.footSockWorn) { if (macro.footSockWorn) {
enable_button("remove_socks"); enable_button("remove_socks");
} else { } else {
enable_button("wear_socks"); enable_button("wear_socks");
enable_button("stuff_socks");
enable_button("dump_socks");
} }
} }

if (!macro.footSockWorn) {
enable_button("stuff_socks");
enable_button("dump_socks");
}
} }
} }




Loading…
取消
儲存