79 lines
2.2 KiB
C#
Raw Normal View History

2020-09-11 23:46:04 +03:00
//
// Copyright 2020 Electronic Arts Inc.
//
// The Command & Conquer Map Editor and corresponding source code 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 3 of the License, or (at your option) any later version.
// The Command & Conquer Map Editor and corresponding source code is distributed
// in the hope that it will be useful, but with permitted additional restrictions
// under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
// distributed with this program. You should have received a copy of the
// GNU General Public License along with permitted additional restrictions
// with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
using MobiusEditor.Model;
using System;
using System.Collections.Generic;
using System.Drawing;
namespace MobiusEditor.Interface
{
public enum FileType
{
None,
INI,
BIN,
MEG,
PGM
}
public enum GameType
{
None,
TiberianDawn,
2022-09-20 18:40:27 +02:00
RedAlert,
SoleSurvivor
2020-09-11 23:46:04 +03:00
}
public interface IGamePlugin : IDisposable
{
2022-09-25 12:11:59 +02:00
string Name { get; }
2020-09-11 23:46:04 +03:00
GameType GameType { get; }
2022-09-25 12:11:59 +02:00
2022-09-22 01:26:46 +02:00
bool IsMegaMap { get; }
2020-09-11 23:46:04 +03:00
Map Map { get; }
Image MapImage { get; }
IFeedBackHandler FeedBackHandler { get; set; }
2020-09-11 23:46:04 +03:00
bool Dirty { get; set; }
2022-09-25 12:11:59 +02:00
string ExtraIniText { get; set; }
2020-09-11 23:46:04 +03:00
void New(string theater);
IEnumerable<string> Load(string path, FileType fileType);
2020-09-11 23:46:04 +03:00
bool Save(string path, FileType fileType);
2023-03-10 21:45:02 +01:00
bool Save(string path, FileType fileType, Bitmap customPreview, bool dontResavePreview);
string Validate();
IEnumerable<String> AssessMapItems();
HashSet<string> GetHousesWithProduction();
int[] GetRevealRadiusForWaypoints(Map map, bool forLargeReveal);
IEnumerable<String> CheckTriggers(IEnumerable<Trigger> triggers, bool includeExternalData, bool prefixNames, bool fatalOnly, out bool fatal, bool fix, out bool wasFixed);
bool MapNameIsEmpty(string name);
2020-09-11 23:46:04 +03:00
}
}