﻿Type: Mod / Example
Name: Hand Crank Generator
Description: Adds a small manual generator to the starting items.
License: CC-BY-NC-SA 4.0 (Factorio license applies to factorio assets)
Version: 1.0.0
Release: 2016-07-12
Tested-With-Factorio-Version: 0.13.6
Category: SimpleExtension
Tags: Hotkey, Localization, Example Mod
Languages: English, Deutsch, 日本語
Download-Url: [attachment=1]HandCrankGenerator_1.0.0.zip[/attachment]
Website: ×

[spoiler=License][size=150]License[/size]
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
https://creativecommons.org/licenses/by-nc-sa/4.0/

You are free to:
Share — copy and redistribute the material in any medium or format
Adapt — remix, transform, and build upon the material
I cannot revoke these freedoms as long as you follow the license terms.

Under the following terms:
Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
NonCommercial — You may not use the material for commercial purposes.
ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.[/spoiler]

[spoiler=Long description][size=150]Long description[/size]
This is a quick mod i made after a joke on the IRC channel and while i work on my bigger mod project.
It adds a small generator that you can manually charge by cranking (pressing the hotkey) while hovering the mouse over it (same as rotating objects works).
You only get one at the start of each map and it can only be placed down once.
This might be useful for low-tech modpacks or the similarly spirited.
By default it takes 15 seconds to fully crank and then provids 20kW of power for 3 minutes, but these values can easily be changed in the config.
This mod is also intended as a small example for new modders who wish to know how hotkeys and their localization works. For this purpose the source files have more comments than usual ;).[/spoiler]

[spoiler=Pictures][size=150]Pictures[/size]
I'm not an artist so this only includes a small quick-and-dirty model. I'm open to contributions by anyone who can do better.
[attachment=0]hcg.gif[/attachment][/spoiler]

[spoiler=Version history][size=150]Version history[/size]
1.0.0 (2016-07-12): Initial feature complete totally bugfree release. YARLY.[/spoiler]

[spoiler=Config][size=150]Default Config[/size]
run_time_in_seconds           = 300   --how long it runs when fully cranked
run_time_per_crank_in_seconds = 10
crank_delay_in_ticks          = 20    --how often you can crank it
power_output_in_watts         = 20000
start_with_item_in_quickbar   = true  --if it should be in the quickbar or inventory
can_pick_up                   = false --if you want to move it again
game_speed                    = 1     --for people who don't play at default game.speed
[/spoiler]

If you have any comments/suggests/opinions about any part of the mod or the default config feel free to post them.