-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModuleCheck.php
More file actions
36 lines (27 loc) · 848 Bytes
/
ModuleCheck.php
File metadata and controls
36 lines (27 loc) · 848 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
include_once("sk.php");
include_once("GetPut.php");
include_once("ThingLib.php");
include_once("ProjLib.php");
include_once("HomesLib.php");
A_Check('GM');
dostaffhead("Check all Things have modules that should");
global $db, $GAME;
$Facts = Get_Factions();
$Modules = Gen_Get_Cond('Modules','Number!=0');
$TTypes = Get_ThingTypes();
$ThimgMods = [];
foreach ($Modules as $M) {
$ThingMods[$M['ThingId']] = 1;
}
$Things = Get_AllThings();
foreach ($Things as $Tid=>$T) {
if (($TTypes[$T['Type']]['Properties'] & THING_HAS_MODULES) && ( $T['BuildState']== BS_SERVICE || $T['BuildState']==BS_COMPLETE)) {
if (empty($ThingMods[$Tid])) {
echo "<a href=ThingEdit.php?id=$Tid>" . $T['Name'] . " - $Tid</a> has no modules<br>\n";
}
}
}
echo "<p>All done\n";
dotail();
?>