stationeers.de Mod workshop · Dominik1199
DE Sign in
  1. Home
  2. IC10 academy
  3. Day 251

Day 251 of 365 · Pro · Month 9: Logistics and greenhouse

Project: warehouse management

A warehouse management counts a locker's stock by sorting class, shows resources, ores and ice separately and reports the most important minimum amount that is undercut.

Project 40 min Week 36

What you learn today

  • Count stock
  • Report minimum amounts
  • Display per class

At the end of the logistics weeks the store gets a manager: it knows how much of every class is there and speaks up before something runs out.

The plant

DevicePrefabName
lockerStructureStorageLocker“Hauptlager”
four LED displaysStructureConsoleLED5“Rohstoffe”, “Erze”, “Eis”, “Mangel”
wall lightStructureWallLight“Mangel”

Counting stock

The loop over all 30 slots reads SortingClass and Quantity per slot. There is one sum for each of the three classes; a slot only counts towards its own class:

seq tmp class ORES
select tmp tmp amount 0
add ore ore tmp

Items of other classes – tools, kits, empty cans – count nowhere.

Reporting minimum amounts

ShortageClassMinimum amount
1resources100
2ores50
3ice20
4store unreachable–

The display “Mangel” shows the most important class that is undercut. Resources are the most important, because nothing gets built without ingots. So checking goes from ice over ores to resources, and the missing store comes last of all.

Display per class

Every class has its own display. If the locker is missing, all three show −1, and “Mangel” jumps to 4.

Milestones

  1. Count resources
  2. Count ores and ice separately, leave out other classes
  3. Report minimum amounts by priority
  4. Everything there: shortage 0, light off
  5. Store missing: −1 on all displays, shortage 4
Tip

Several lockers named “Hauptlager”? Then Average readings average over all of them – the sums are no longer right. For several stores you switch to Sum and count real piece counts over all lockers with it. You then read the class per locker separately, via names of their own.

Project task

Task

Build the warehouse management following the tables. Count the amounts of the classes Resources, Ores and Ices in the 30 slots of the locker “Hauptlager” and show them on “Rohstoffe”, “Erze”, “Eis”. “Mangel” shows the most important minimum amount that is undercut (or 0), the light “Mangel” is on for every shortage. If the locker is missing: displays −1, shortage 4.

Milestones

  1. Milestone 1: count resources
  2. Milestone 2: ores and ice separately
  3. Milestone 3: shortage by priority
  4. Milestone 4: everything there
  5. Milestone 5: store missing

Hints

Hint 1

Per class: seq tmp class …, select tmp tmp amount 0, add.

Hint 2

Missing store: read the locker's PrefabHash and snan; with it set all three sums to −1.

Hint 3

Shortage: ice, ores, resources, finally the missing store – each with select short … short.

Quiz

2 questions. You pass from 60 % – the server does the grading.

Complete the day

  • Passed all milestones of the project
  • Passed the quiz with at least 60 %

Without an account progress is saved in this browser only.

Report a mistake in this lesson

Please sign in to report. Sign in

Esc
↑ ↓ selectEnter open/ opens search anywhere