Quote from: Florius on September 06, 2015, 07:07:20 AMLOL. I fixed it and compile.Quote from: V10 on September 06, 2015, 06:48:36 AM
There version compiled for v12, with sources.
http://v10.name/files/Pawn%20State%20Icons.rar
Where did you get that from?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Pages1
#1
Outdated / Re: [A11b] Pawn State Icons (v04c) 22.07.2015
September 06, 2015, 01:14:22 PM #2
Outdated / Re: [A11b] Pawn State Icons (v04c) 22.07.2015
September 06, 2015, 06:48:36 AM
There version compiled for v12, with sources.
http://v10.name/files/Pawn%20State%20Icons.rar
http://v10.name/files/Pawn%20State%20Icons.rar
#3
Help / Re: Hooking game\sound events
July 20, 2014, 10:23:42 AMQuote from: mrofa on July 19, 2014, 04:32:04 PMNope.
LetterStack is a hook for letter stuff

There no functions for give me callback on letter recieved by game.
Code Select
public static LetterStack LetterStack
{
get
{
return Map.letterStack;
}
}
Code Select
namespace Verse
{
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using UnityEngine;
using Verse.Sound;
public class LetterStack : Saveable
{
[CompilerGenerated]
private static Predicate<Letter> <>f__am$cache2;
private float lastTopYInt;
private List<Letter> letters = new List<Letter>();
private const float LettersBottomY = 350f;
public const float LetterSpacing = 12f;
public void ExposeData()
{
Scribe_Collections.LookList<Letter>(ref this.letters, "letters", LookMode.Deep, null);
}
public void LettersOnGUI()
{
float topY = (Screen.height - 350f) - 30f;
for (int i = this.letters.Count - 1; i >= 0; i--)
{
this.letters[i].DrawButtonAt(topY);
topY -= 42f;
}
this.lastTopYInt = topY;
}
public void LettersUpdate()
{
if (<>f__am$cache2 == null)
{
<>f__am$cache2 = l => !l.Valid;
}
this.letters.RemoveAll(<>f__am$cache2);
}
public void ReceiveLetter(Letter let)
{
SoundDef.Named("LetterArrive").PlayOneShotOnCamera();
this.letters.Add(let);
let.arrivalTime = Time.time;
}
public void RemoveLetter(Letter let)
{
this.letters.Remove(let);
}
public float LastTopY
{
get
{
return this.lastTopYInt;
}
}
}
}
#4
Help / Re: Hooking game\sound events
July 19, 2014, 04:25:36 PMQuote from: mrofa on July 19, 2014, 02:01:56 PMhttp://en.wikipedia.org/wiki/Hooking
Sorry mate my english and codding sux and im completly have no idea what you want then
But you could try check out solarflare and raid incidents in ilspy
#5
Help / Re: Hooking game\sound events
July 19, 2014, 04:10:57 AMQuote from: mrofa on July 18, 2014, 05:39:32 PMnope =)
I did give you the hook
You give code for call event, not hook.
#6
Help / Re: Hooking game\sound events
July 18, 2014, 12:11:27 PM
Something like this:
public void myDelegate(SoundDef soundDef)
{
// Here my code
}
SoundClass.HookEvent("LetterArrive", myDelegate);
If this game has beeen writen in c++, I can easily hook function SoundDef.PlayOneShot by ms detours, but in c# it very hard. Maybe game have internal functions for hooking events?
public void myDelegate(SoundDef soundDef)
{
// Here my code
}
SoundClass.HookEvent("LetterArrive", myDelegate);
If this game has beeen writen in c++, I can easily hook function SoundDef.PlayOneShot by ms detours, but in c# it very hard. Maybe game have internal functions for hooking events?
#7
Help / Re: Hooking game\sound events
July 18, 2014, 12:07:25 PMQuote from: mrofa on July 18, 2014, 11:56:48 AMThis code show how to initiate a sound event.
I think thatCode Selectprivate static readonly SoundDef HitGroundSound = SoundDef.Named("BulletImpactGround");
Boomerang.HitGroundSound.PlayOneShot(base.Position);
I need to hook event (LetterArrive) and do something if event has been started.
#8
Help / Hooking game\sound events
July 18, 2014, 11:50:33 AM
Hi all.
I good known C#.
I trying to create mod.
How I can hook game or sound events like LetterArrive?
I good known C#.
I trying to create mod.
How I can hook game or sound events like LetterArrive?
Pages1
