Skip to content

Instantly share code, notes, and snippets.

View nurik-quotes
Панда-пёрл #5: Какая еще ложка?!
Панда-пёрл #11: До появления интернета Майн продавали на бобинах, т.к. информация о дискетах появилась на ютубе только в 1996 году.
Панда-пёрл #12: Собака... ну, которая корова!
Панда-пёрл #14: Меня зажевало!
Панда-пёрл #15: Шта?!
Панда-пёрл #19: В чем смысл вам не нравится где я туплю?
Панда-пёрл #17: Массаж массажу массазу.
Панда-пёрл #24: Не подходите! Я с сюррикенами, я с сюррикенами! Я бешенный!
Панда-пёрл #26: Хочу двигаться в сторону движения
Панда-пёрл #27: Лед тает от моего снега.
@StarCheater
StarCheater / ticking.cs
Created Jun 12, 2020
Try to get a mod for a block with rotating sides and two behaviors when the essence is standing on it.
View ticking.cs
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Sockets;
using System.Security.Cryptography.X509Certificates;
using Vintagestory.API.Client;
using Vintagestory.API.Common;
using Vintagestory.API.Common.Entities;
using Vintagestory.API.Datastructures;
using Vintagestory.API.MathTools;
@StarCheater
StarCheater / NotWorkEntityTeleport.cs
Created Jun 4, 2020
Example with no work teleport entity.
View NotWorkEntityTeleport.cs
namespace VSExampleMods
{
public class TrampolineMod : ModSystem
{
public override void Start(ICoreAPI api)
{
base.Start(api);
api.RegisterBlockClass("trampoline", typeof(TrampolineBlock));
@StarCheater
StarCheater / EntityTeleport.cs
Created Jun 4, 2020
VintageStory Teleport any Entities
View EntityTeleport.cs
public class TrampolineBlock : Block
{
public override void OnEntityCollide(IWorldAccessor world, Entity entity, BlockPos pos, BlockFacing facing,
Vec3d collideSpeed, bool isImpact)
{
base.OnEntityCollide(world, entity, pos, facing, collideSpeed, isImpact);
TrampolineBlockE be = world.BlockAccessor.GetBlockEntity(pos) as TrampolineBlockE;
if (be == null) return;
be.OnEntityCollide(entity);
}
View химреактор + выгрузка в капсулы
mods.nuclearcraft.salt_mixer.addRecipe(<liquid:sulfur>*1000,<liquid:sodium>*1000,<liquid:fluidsodiumsulfide>*2000);
mods.nuclearcraft.salt_mixer.addRecipe(<liquid:oxygen>*1000,<liquid:fluidsodiumsulfide>*1000,<liquid:fluidsodiumpersulfate>*2000);
mods.nuclearcraft.salt_mixer.addRecipe(<liquid:fluidcompressedair>*1000,<liquid:fluidsodiumsulfide>*1000,<liquid:fluidsodiumpersulfate>*2000);
mods.nuclearcraft.extractor.addRecipe(<techreborn:dynamiccell>.withTag({Fluid: {FluidName: "fluidsodiumsulfide", Amount: 1000}}),<techreborn:dynamiccell>,<liquid:fluidsodiumsulfide>*1000);
mods.nuclearcraft.extractor.addRecipe(<techreborn:dynamiccell>.withTag({Fluid: {FluidName: "fluidsodium", Amount: 1000}}),<techreborn:dynamiccell>,<liquid:fluidsodium>*1000);
mods.nuclearcraft.extractor.addRecipe(<techreborn:dynamiccell>.withTag({Fluid: {FluidName: "sodium", Amount: 1000}}),<techreborn:dynamiccell>,<liquid:sodium>*1000);
View gist:960d4c76ee68599a46e5a9cf35cacc5f
mods.techreborn.solidCanningMachine.addRecipe(<techreborn:dynamiccell>.withTag({Fluid: {FluidName: "fluidsulfur", Amount: 1000}}), <ore:dustSulfur>,<techreborn:dynamiccell>, 100, 1);
mods.techreborn.industrialGrinder.removeRecipe(<techreborn:dust:64>);
mods.techreborn.industrialGrinder.addRecipe(<techreborn:dust:64>,<techreborn:smalldust:66>*6,<techreborn:smalldust:38>*2,null,<techreborn:ore:1>,null,<liquid:water>*1000,100,128);
mods.techreborn.industrialGrinder.addRecipe(<techreborn:dust:64>,<techreborn:smalldust:66>*6,<techreborn:dust:38>*2,null,<techreborn:ore:1>,null,<liquid:fluidmercury>*1000,100,128);
View db.sql
CREATE TABLE `access_list` (
`id` INT(10) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT,
`num` TINYTEXT NULL,
`date` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`duration` INT(10) UNSIGNED ZEROFILL NULL DEFAULT NULL,
PRIMARY KEY (`id`)
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB
AUTO_INCREMENT=0
View program.cs
using System.Collections.Generic;
using System.Collections;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.Serialization;
View test.html
<section class="container form-section" id="theForm">
[[!FormIt?
&hooks=`resources`
&validate=`email:email:required`
]]
<form action="[[~[[*id]]]]" method="post">
<div class="columns">
<div class="column">
<div class="field">
<!--<label class="label">First Name</label>-->
You can’t perform that action at this time.