Skip to content

Instantly share code, notes, and snippets.

@dannythehacker
Forked from iwanPlays/Ravenfield Gold
Created September 27, 2022 23:05
Show Gist options
  • Save dannythehacker/29a3bce603cf9c3d516f51394d28cc04 to your computer and use it in GitHub Desktop.
Save dannythehacker/29a3bce603cf9c3d516f51394d28cc04 to your computer and use it in GitHub Desktop.

Revisions

  1. @iwanPlays iwanPlays created this gist Sep 4, 2017.
    39 changes: 39 additions & 0 deletions Ravenfield Gold
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,39 @@
    BlipBloop's Gold Mod code
    with iwanPlays' modifications

    WEAPON:
    START:

    for (int i = 0; i < base.GetComponentsInChildren<MeshRenderer>().Length; i++)
    {
    for (int j = 0; j < base.GetComponentsInChildren<MeshRenderer>()[i].materials.Length; j++)
    {
    base.GetComponentsInChildren<MeshRenderer>()[i].materials[j].color = new Color(0.99f, 0.85f, 0f);
    }
    }

    VEHICLE:

    DAMAGE:

    for (int i = 0; i < base.GetComponentsInChildren<MeshRenderer>().Length; i++)
    {
    for (int j = 0; j < base.GetComponentsInChildren<MeshRenderer>()[i].materials.Length; j++)
    {
    base.GetComponentsInChildren<MeshRenderer>()[i].materials[j].color = new Color(0.99f, 0.85f, 0f);
    }
    }

    ACTOR:
    DAMAGE:

    Material[] materials = this.skinnedRenderer.materials;
    materials[this.actorMaterialIndex] = new Material(Shader.Find("Specular"));
    this.skinnedRenderer.materials = materials;
    this.skinnedRendererRagdoll.materials = materials;
    this.skinnedRenderer.material.color = new Color(0.99f, 0.85f, 0f);
    this.skinnedRendererRagdoll.material.color = new Color(0.99f, 0.85f, 0f);
    for (int i = 0; i < base.gameObject.GetComponentsInParent<MeshRenderer>().Length; i++)
    {
    base.gameObject.GetComponentsInParent<MeshRenderer>()[i].material.color = new Color(0.99f, 0.85f, 0f);
    }