Skip to content

Commit 4f3105e

Browse files
initial 1.3 update
1 parent 17523da commit 4f3105e

22 files changed

+700
-722
lines changed

About/About.xml

+23-38
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,29 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
22
<ModMetaData>
3-
<name>Follow Me</name>
4-
<author>Fluffy</author>
5-
<url>https://ludeon.com/forums/index.php?topic=16120</url>
6-
<description>Gives the camera tracking capabilities.
3+
<name>Follow Me!</name>
4+
<author>Fluffy</author>
5+
<packageId>Fluffy.FollowMe</packageId>
6+
<description>Gives the camera tracking capabilities.
77

8-
&lt;size=24&gt;Features&lt;/size&gt;
9-
Press the ‘Home’ key (default, can be changed with in-game keybinding settings) while any colonist, enemy, animal or item is selected, and the camera will follow them (including furniture and plants - but they tend to not move much). Alternatively, you can click with the middle mouse button on colonists in the Colonist Bar on top of the screen to toggle following.
8+
&lt;size=28&gt;Features&lt;/size&gt;
109

11-
&lt;b&gt;Does not require a new save game&lt;/b&gt;
12-
Can safely be enabled/disabled in ongoing saves.
13-
14-
&lt;size=24&gt;Contributors&lt;/size&gt;
15-
16-
SkullyWag: Help with/nagging about updates
17-
Raccoon: German translation
18-
AlexSchrod: Screen edge &amp; Camera jump detection
19-
duduluu: Chinese translations
20-
Proxyer: Japanese Translation
21-
Oleksii Bespalov: Fix bug in settings persistance
22-
Jorge Martínez: Spanish translations
23-
xProtosx: Russian translation
10+
Press the 'Home' key (default, can be changed with in-game keybinding settings) while any colonist, enemy, animal or item is selected, and the camera will follow them (including furniture and plants - but they tend to not move much). Alternatively, you can click with the middle mouse button on colonists in the Colonist Bar on top of the screen to toggle following.
2411

25-
&lt;size=24&gt;Version&lt;/size&gt;
26-
This is version 4.9.98, for RimWorld 1.2.2753.
27-
28-
</description>
29-
<supportedVersions>
30-
<li>1.2</li>
31-
</supportedVersions>
32-
<packageId>fluffy.followme</packageId>
33-
<modDependencies>
34-
<li>
35-
<packageId>brrainz.harmony</packageId>
36-
<displayName>Harmony</displayName>
37-
<steamWorkshopUrl>steam://url/CommunityFilePage/2009463077</steamWorkshopUrl>
38-
<downloadUrl>https://github.com/pardeike/HarmonyRimWorld/releases/latest</downloadUrl>
39-
</li>
40-
</modDependencies>
41-
<loadAfter>
42-
<li>brrainz.harmony</li>
43-
</loadAfter>
12+
&lt;b&gt;Does not require a new save game&lt;/b&gt;
13+
Can safely be enabled/disabled in ongoing saves.</description>
14+
<url>https://github.com/fluffy-mods/FollowMe</url>
15+
<supportedVersions>
16+
<li>1.3</li>
17+
</supportedVersions>
18+
<modDependencies>
19+
<li>
20+
<packageId>brrainz.harmony</packageId>
21+
<displayName>Harmony</displayName>
22+
<steamWorkshopUrl>steam://url/CommunityFilePage/2009463077</steamWorkshopUrl>
23+
<downloadUrl>https://github.com/pardeike/HarmonyRimWorld/releases/latest</downloadUrl>
24+
</li>
25+
</modDependencies>
26+
<loadAfter>
27+
<li>brrainz.harmony</li>
28+
</loadAfter>
4429
</ModMetaData>

About/dependencies.json

-13
This file was deleted.

Assemblies/BetterKeybinding.dll

512 Bytes
Binary file not shown.

Assemblies/FollowMe!.dll

-19 KB
Binary file not shown.

Assemblies/FollowMe.dll

20.5 KB
Binary file not shown.

News/4_4_87.xml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<Defs>
3+
<HugsLib.UpdateFeatureDef>
4+
<modNameReadable>Follow Me</modNameReadable>
5+
<modIdentifier>fluffy.followme</modIdentifier>
6+
<defName>Follow_Me_4_4_87</defName>
7+
<assemblyVersion>4.5.88</assemblyVersion>
8+
<content>
9+
|img:4_4_87_keybinds
10+
|The keybindings for following and cinematic cameras are now much more configurable. Look for them in Follow Me!'s options page. Click the curent binding to change it, and you can now also use modifier keys (Alt, Shift, etc.) as well as mouse buttons!
11+
|Note that existing keybindings for Follow Me! have been reset to the default 'Home' to toggle following, and 'End' to loop over Cinematic Cameras.
12+
</content>
13+
</HugsLib.UpdateFeatureDef>
14+
</Defs>

News/4_4_87_keybinds.png

5.79 KB
Loading

Readme.md

+16-18
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,43 @@
1-
[![RimWorld 1.2](https://img.shields.io/badge/RimWorld-1.2-brightgreen.svg)](http://rimworldgame.com/)
2-
31
Gives the camera tracking capabilities.
42

53
![Features](https://banners.karel-kroeze.nl/title/Features.png)
64
Press the 'Home' key (default, can be changed with in-game keybinding settings) while any colonist, enemy, animal or item is selected, and the camera will follow them (including furniture and plants - but they tend to not move much). Alternatively, you can click with the middle mouse button on colonists in the Colonist Bar on top of the screen to toggle following.
75

86
**Does not require a new save game**
97
Can safely be enabled/disabled in ongoing saves.
8+
![Contributors](https://banners.karel-kroeze.nl/title/Contributors.png)
9+
Proxyer: [Update Japanese Translation for 4.8.94 (#34)](https://github.com/fluffy-mods/FollowMe/commit/3a95353), [Pull request: Update Japanese Translation for v4.5.90 (#29)](https://github.com/fluffy-mods/FollowMe/commit/65c0025), [Update Japanese Translation for v3.4.71 (#24)](https://github.com/fluffy-mods/FollowMe/commit/17d5289), [Update Japanese translation](https://github.com/fluffy-mods/FollowMe/commit/bda44d8), [Japanese Translation](https://github.com/fluffy-mods/FollowMe/commit/6e9507f)
10+
xProtosx: [Add Russian Language (#27)](https://github.com/fluffy-mods/FollowMe/commit/0f8f7b1)
11+
Jorge Martínez: [Added Spanish and Latin Spanish translations (#25)](https://github.com/fluffy-mods/FollowMe/commit/4e32b03)
12+
Oleksii Bespalov: [save settings](https://github.com/fluffy-mods/FollowMe/commit/eef73a6)
13+
Kroeze: [&#x27;Release v0.18.2.2 [nolog]&#x27;](https://github.com/fluffy-mods/FollowMe/commit/722c71a)
14+
duduluu: [Add Chinese translations (#9)](https://github.com/fluffy-mods/FollowMe/commit/75a5a6f)
1015

11-
![Contributors](https://banners.karel-kroeze.nl/title/Contributors.png)
12-
- SkullyWag: Help with/nagging about updates
13-
- Raccoon: German translation
14-
- AlexSchrod: Screen edge & Camera jump detection
15-
- duduluu: Chinese translations
16-
- Proxyer: Japanese Translation
17-
- Oleksii Bespalov: Fix bug in settings persistance
18-
- Jorge Martínez: Spanish translations
19-
- xProtosx: Russian translation
2016

2117
![Think you found a bug?](https://banners.karel-kroeze.nl/title/Think%20you%20found%20a%20bug%3F.png)
18+
2219
Please read [this guide](http://steamcommunity.com/sharedfiles/filedetails/?id=725234314) before creating a bug report,
2320
and then create a bug report [here](https://github.com/fluffy-mods/FollowMe/issues)
2421

2522
![Older versions](https://banners.karel-kroeze.nl/title/Older%20versions.png)
23+
2624
All current and past versions of this mod can be downloaded from [GitHub](https://github.com/fluffy-mods/FollowMe/releases).
2725

2826
![License](https://banners.karel-kroeze.nl/title/License.png)
27+
2928
All original code in this mod is licensed under the [MIT license](https://opensource.org/licenses/MIT). Do what you want, but give me credit.
3029
All original content (e.g. text, imagery, sounds) in this mod is licensed under the [CC-BY-SA 4.0 license](http://creativecommons.org/licenses/by-sa/4.0/).
3130

32-
Parts of the code in this mod, and some content may be licensed by their original authors. If this is the case, the original author & license will either be given in the source code, or be in a LICENSE file next to the content. Please do not decompile my mods, but use the original source code available on [GitHub](https://github.com/fluffy-mods/FollowMe/), so license information in the source code is preserved.
31+
Parts of the code in this mod, and some of the content may be licensed by their original authors. If this is the case, the original author & license will either be given in the source code, or be in a LICENSE file next to the content. Please do not decompile my mods, but use the original source code available on [GitHub](https://github.com/fluffy-mods/FollowMe/), so license information in the source code is preserved.
32+
3333

34-
[![Supporters](https://banners.karel-kroeze.nl/donations.png)](https://ko-fi.com/fluffymods)
3534

3635
![Are you enjoying my mods?](https://banners.karel-kroeze.nl/title/Are%20you%20enjoying%20my%20mods%3F.png)
37-
Become a supporter and show your appreciation by buying me a coffee (or contribute towards a nice single malt).
3836

39-
[![Buy Me a Coffee](http://i.imgur.com/EjWiUwx.gif)](https://ko-fi.com/fluffymods)
37+
Become a supporter and show your appreciation by buying me a coffee (or contribute towards a nice single malt).
4038

41-
[![I Have a Black Dog](https://i.ibb.co/ss59Rwy/New-Project-2.png)](https://www.youtube.com/watch?v=XiCrniLQGYc)
39+
[![Supporters](https://banners.karel-kroeze.nl/donations.png)](https://ko-fi.com/fluffymods)
4240

41+
[![Buy Me a Coffee](https://i.imgur.com/6P7Ap79.gif)](https://ko-fi.com/fluffymods)
4342

44-
![Version](https://banners.karel-kroeze.nl/title/Version.png)
45-
This is version 4.9.98, for RimWorld 1.2.2753.
43+
[![I Have a Black Dog](https://i.ibb.co/ss59Rwy/New-Project-2.png)](https://www.youtube.com/watch?v=XiCrniLQGYc)

Source/.vs/FollowMe!/v14/.suo

-54.5 KB
Binary file not shown.

Source/Cinematics/CinematicCamera.cs

+38-44
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// CinematicCamera.cs
1+
// CinematicCamera.cs
22
// Copyright Karel Kroeze, -2019
33

44
using System;
@@ -8,10 +8,8 @@
88
using UnityEngine;
99
using Verse;
1010

11-
namespace FollowMe
12-
{
13-
public class CinematicCamera : Def
14-
{
11+
namespace FollowMe {
12+
public class CinematicCamera: Def {
1513
private Thing _currentSubject;
1614
private readonly Dictionary<Thing, int> _pastSubjects = new Dictionary<Thing, int>();
1715
private int _ticksOfFame;
@@ -22,72 +20,68 @@ public class CinematicCamera : Def
2220
public Type interestWorkerType;
2321
public IntRange secondsOfFame = new IntRange( 5, 15 );
2422

25-
public InterestWorker Worker
26-
{
27-
get
28-
{
29-
if ( _worker == null )
30-
_worker = (InterestWorker) Activator.CreateInstance( interestWorkerType );
23+
public InterestWorker Worker {
24+
get {
25+
if (_worker == null) {
26+
_worker = (InterestWorker) Activator.CreateInstance(interestWorkerType);
27+
}
28+
3129
return _worker;
3230
}
3331
}
3432

35-
public virtual Thing Subject
36-
{
33+
public virtual Thing Subject {
3734
get => _currentSubject;
38-
protected set
39-
{
40-
_currentSubject = value;
35+
protected set {
36+
_currentSubject = value;
4137
_pastSubjects[value] = Find.TickManager.TicksAbs;
42-
FollowMe.TryStartFollow( value );
38+
FollowMe.TryStartFollow(value);
4339
}
4440
}
4541

46-
public virtual void Start()
47-
{
48-
Messages.Message( "Fluffy.FollowMe.CameraStart".Translate( LabelCap ), MessageTypeDefOf.PositiveEvent,
49-
false );
42+
public virtual void Start() {
43+
Messages.Message("Fluffy.FollowMe.CameraStart".Translate(LabelCap), MessageTypeDefOf.PositiveEvent,
44+
false);
5045
FollowNewSubject();
5146
}
5247

53-
public virtual void Stop( bool notify = true )
54-
{
55-
Messages.Message( "Fluffy.FollowMe.CameraStop".Translate( LabelCap ), MessageTypeDefOf.NeutralEvent,
56-
false );
48+
public virtual void Stop(bool notify = true) {
49+
Messages.Message("Fluffy.FollowMe.CameraStop".Translate(LabelCap), MessageTypeDefOf.NeutralEvent,
50+
false);
5751
_currentSubject = null;
58-
_ticksOfFame = -1;
52+
_ticksOfFame = -1;
5953
_pastSubjects.Clear();
6054
}
6155

62-
public virtual void Tick()
63-
{
64-
if ( _ticksOfFame-- <= 0 )
56+
public virtual void Tick() {
57+
if (_ticksOfFame-- <= 0) {
6558
FollowNewSubject();
59+
}
6660
}
6761

68-
public virtual void FollowNewSubject()
69-
{
70-
var targets = Find.CurrentMap.listerThings
62+
public virtual void FollowNewSubject() {
63+
IEnumerable<Thing> targets = Find.CurrentMap.listerThings
7164
.ThingsInGroup( Worker.PotentiallyInteresting )
7265
.Where( t => t != Subject && Worker.Interesting( t ) );
73-
if ( !targets.Any() )
74-
CinematicCameraManager.Stop( "Fluffy.FollowMe.Cinematics.NoValidTargets".Translate() );
75-
var target = targets.MaxBy( t => Worker.InterestFor( t ) * CooldownFactor( t ) );
66+
if (!targets.Any()) {
67+
CinematicCameraManager.Stop("Fluffy.FollowMe.Cinematics.NoValidTargets".Translate());
68+
}
69+
70+
Thing target = targets.MaxBy( t => Worker.InterestFor( t ) * CooldownFactor( t ) );
7671

7772
Subject = target;
78-
_ticksOfFame = Rand.Range( GenTicks.TicksPerRealSecond * secondsOfFame.min,
79-
GenTicks.TicksPerRealSecond * secondsOfFame.max );
73+
_ticksOfFame = Rand.Range(GenTicks.TicksPerRealSecond * secondsOfFame.min,
74+
GenTicks.TicksPerRealSecond * secondsOfFame.max);
8075
}
8176

82-
public virtual float CooldownFactor( Thing thing )
83-
{
84-
var lastSpotlight = 0;
85-
if ( _pastSubjects.ContainsKey( thing ) )
77+
public virtual float CooldownFactor(Thing thing) {
78+
int lastSpotlight = 0;
79+
if (_pastSubjects.ContainsKey(thing)) {
8680
lastSpotlight = _pastSubjects[thing];
81+
}
8782

88-
89-
return Mathf.Min( Find.TickManager.TicksAbs - lastSpotlight, fameCooldown * GenTicks.TicksPerRealSecond ) /
83+
return Mathf.Min(Find.TickManager.TicksAbs - lastSpotlight, fameCooldown * GenTicks.TicksPerRealSecond) /
9084
fameCooldown * GenTicks.TicksPerRealSecond;
9185
}
9286
}
93-
}
87+
}

0 commit comments

Comments
 (0)