Skip to content

Instantly share code, notes, and snippets.

View Petethegoat's full-sized avatar
😍

Pete Goodfellow Petethegoat

😍
View GitHub Profile
local loreTable = {
["iron battle axe"] = "A mediocre battle axe, forged from low quality impure iron. No self respecting Dunmer smith would dare sell this- it has plainly been imported from another province."
}
local function loreTooltip(e)
local lore = loreTable[e.object.id]
if lore then
local loreBlock = e.tooltip:createBlock{}
loreBlock.autoHeight = true
loreBlock.width = 440
bl_info = {
"name": "Convert Face Textures to Material Textures",
"author": "Greatness7",
"location": "Object -> Search -> Convert Face Textures to Material Textures",
"description": "Convert Face Textures to Material Textures",
"category": "Object",
}
import bpy
from pathlib import Path
local menuBook_button_take = tes3ui.registerID("MenuBook_button_take")
local menuBook_button_next = tes3ui.registerID("MenuBook_button_next")
local menuBook_button_prev = tes3ui.registerID("MenuBook_button_prev")
local menuBook_page_1 = tes3ui.registerID("MenuBook_page_1")
local menuBook_page_2 = tes3ui.registerID("MenuBook_page_2")
local menuScroll_scroll = tes3ui.registerID("MenuScroll_Scroll")
local config = mwse.loadConfig("Illiterate")
if not config then
config = {
-- Tweakables
local ringScriptName = "mwseRingScript"
local cureJournalEntry = "MS_Nuccius"
local cureJournalIndex = 150 -- if the journal entry is equal to or higher than this index, cure the curse.
local tickDuration = .1 -- Tick the curse every X seconds
-- No editarino below this line unless you're pro
local ringTimer
local startingAttributes = {}
local function onKeyDown(e)
if e.keyCode == tes3.worldController.inputController.inputMaps[20].code then
journalKey = e.keyCode
tes3.worldController.inputController.inputMaps[20].code = nil
if tes3ui.findMenu(menuBook) then
tes3ui.findMenu(menuBook):findChild(menuBook_button_close):triggerEvent("mouseClick")
tes3ui.leaveMenuMode()
else
showJournalUI()
local scriptNames = {
-- Services
travel = "showTravelScript",
barter = "showBarterScript",
repair = "showRepairScript",
spells = "showSpellsScript",
training = "showTrainingScript",
spellmaking = "showSpellmakingScript",
enchanting = "showEnchantingScript",
companion = "showCompanionScript",
local function onItemTileUpdated(e)
if e.item.objectType == tes3.objectType.book then
if e.item.type == tes3.bookType.scroll then
if e.item.enchantment then
for i = 1, #e.item.enchantment.effects do
if e.item.enchantment.effects[i].id >= 0 then
-- local icon = e.element:createImage({ path = string.format("icons\\sc\\scroll_%s", e.item.enchantment.effects[i].id) })
local icon = e.element:createImage({ path = string.format("icons\\%s", e.item.enchantment.effects[i].object.icon) })
icon.consumeMouseEvents = false
icon.width = 16
local function dropPlayerItems()
local equippedItems = {}
for _, stack in pairs(tes3.player.object.equipment) do
table.insert(equippedItems, stack.object)
end
for _, object in pairs(equippedItems) do
--tes3.mobilePlayer:unequip{item = object}
end
tes3ui.forcePlayerInventoryUpdate()
int num_valid_controls = 0;
cata::optional<tripoint> vehicle_position;
cata::optional<vpart_reference> vehicle_controls;
for( const tripoint elem : m.points_in_radius( g->u.pos(), 1 ) ) {
if( const optional_vpart_position vp = m.veh_at( elem ) ) {
vehicle_controls = *vp.part_with_feature( "CONTROLS", true );
if( vehicle_controls ) {
num_valid_controls++;
vehicle_position = elem;
}
using UnityEngine;
using UnityEditor;
public class TextureArrayWizard : ScriptableWizard
{
[SerializeField] private Texture2D[] textures = null;
[MenuItem("Assets/Create/Texture Array")]
static void CreateWizard()
{