Skip to content

Instantly share code, notes, and snippets.

View boformer's full-sized avatar

boformer boformer

  • Ruhr-Universität Bochum
  • Bochum, Germany
View GitHub Profile
@boformer
boformer / 0_main.dart
Last active September 3, 2023 19:40
Flutter Service Architecture
import 'package:architecture_playground/home_page.dart';
import 'package:architecture_playground/services.dart';
import 'package:flutter/material.dart';
void main() async {
// perform long-running tasks before "runApp" to display the native splash screen
final services = await Services.initialize();
runApp(ServicesProvider(
services: services,
@boformer
boformer / BuildingDataManager.cs
Last active January 18, 2023 22:17
How to load and save data with Cities Skylines' Mod API and Colossal Order's Serialization API
using System.IO;
using ColossalFramework.IO;
using ICities;
using UnityEngine;
/// <summary>
/// A simple example how to save custom data in savegames.
/// This uses 3 components:
///
/// 1. SerializableDataExtensionBase
@boformer
boformer / cel-documentation.md
Last active January 14, 2023 22:37
Custom Effect Loader Documentation
@boformer
boformer / CityBeautifierMod.cs
Last active January 4, 2023 05:51
Cities: Skylines Modding Tutorial 1: Complete Source Code
using ICities;
namespace CityBeautifier
{
public class CityBeautifierMod : IUserMod
{
public string Name => "City Beautifier";
public string Description => "Removes some ugly props";
}
@boformer
boformer / ThreadingExtension.cs
Created June 5, 2018 02:13
Update for Skylines-ControlBuildingLevelUpMod
/*
Copyright (c) 2015, Max Stark <max.stark88@web.de>
All rights reserved.
This file is part of ControlBuildingLevelUpMod, which is free
software: you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free
Software Foundation, either version 2 of the License, or (at your
option) any later version.
@boformer
boformer / Mod.cs
Created February 17, 2019 16:18
HistoricalDistrictsMod
using ColossalFramework;
using ColossalFramework.UI;
using ICities;
using UnityEngine;
namespace HistoricalDistricts
{
public class HistoricalDistrictsMod : IUserMod
{
public string Name => "Historical Districts";
@boformer
boformer / EffectsDefinition.xml
Last active August 15, 2022 20:22
CustomEffectLoader Definition File
<?xml version="1.0" encoding="utf-8"?>
<EffectsDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Effects>
<LightEffect
name="boformer.MY CUSTOM EFFECT"
type="Spot"
intensity="6.2"
range="500"
spotAngle="10"
spotLeaking="0.5"
@boformer
boformer / SubBuildingsEnabler.cs
Created November 13, 2015 17:32
Sub-Buildings Enabler Mod for Cities: Skylines
using ColossalFramework.IO;
using ColossalFramework.Packaging;
using ColossalFramework.UI;
using ICities;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Xml.Serialization;
using UnityEngine;
@boformer
boformer / Mod.cs
Last active February 13, 2022 20:46
CRP File Merger and Optimizer
/*
* Copyright 2022 Felix Schmidt
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
@boformer
boformer / Mod.cs
Last active July 15, 2021 07:22
Example Harmony 2.x Cities: Skylines Mod (Harmony provided by CitiesHarmony mod)
using ICities;
using System;
using ColossalFramework.PlatformServices;
using ColossalFramework.Plugins;
namespace HarmonyMod {
public class Mod : IUserMod {
// You can add Harmony 1.2.0.8 as a dependency, but make sure that 0Harmony.dll is not copied to the output directory!
// (0Harmony.dll is provided by CitiesHarmony workshop item)