Corrige le chantier terrestre
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
cfa44975d3
commit
28b0ceeee8
@ -743,7 +743,11 @@ class Planete extends Surface
|
||||
global ${$calc.'VAR'};
|
||||
}
|
||||
|
||||
if ($calc == "terrestre") {
|
||||
$outNomChamps[] = ${$calc.'VAR'}[$this->race][$modif[1]];
|
||||
} else {
|
||||
$outNomChamps[] = ${$calc.'VAR'}[$modif[1]];
|
||||
}
|
||||
$outValeurs[] = $this->{$modif[0]}[$modif[1]];
|
||||
} elseif ($modif == "force") {
|
||||
continue;
|
||||
@ -769,6 +773,11 @@ class Planete extends Surface
|
||||
}
|
||||
|
||||
foreach ($this->{$modif} as $j => $value) {
|
||||
if ($calc == "terrestre") {
|
||||
$outNomChamps[] = ${$calc.'VAR'}[$this->race][$j];
|
||||
} else {
|
||||
$outNomChamps[] = ${$calc.'VAR'}[$j];
|
||||
}
|
||||
$outNomChamps[] = ${$calc.'VAR'}[$j];
|
||||
$outValeurs[] = $value;
|
||||
}
|
||||
@ -795,7 +804,11 @@ class Planete extends Surface
|
||||
trigger_error('Impossible de trouver les données pour '.$modif[0], E_USER_ERROR);
|
||||
}
|
||||
|
||||
if ($calc == "terrestre") {
|
||||
$out[] = ${$calc.'VAR'}[$this->race][$modif[1]]." = ".$this->{$modif[0]}[$modif[1]];
|
||||
} else {
|
||||
$out[] = ${$calc.'VAR'}[$modif[1]]." = ".$this->{$modif[0]}[$modif[1]];
|
||||
}
|
||||
} elseif ($modif == "force") {
|
||||
$out[] = "timestamp = timestamp";
|
||||
} elseif (!is_array($this->{$modif}) && !is_object($this->{$modif})) {
|
||||
@ -818,11 +831,15 @@ class Planete extends Surface
|
||||
}
|
||||
|
||||
foreach ($this->{$modif} as $j => $value) {
|
||||
if ($calc == "terrestre") {
|
||||
$out[] = ${$calc.'VAR'}[$this->race][$j]." = ".$value;
|
||||
} else {
|
||||
$out[] = ${$calc.'VAR'}[$j]." = ".$value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!empty($out)) {
|
||||
$sql = "UPDATE $table_planete SET timestamp = ".time().", metal = ".$this->metal.", cristal = ".$this->cristal.", hydrogene = ".$this->hydrogene.", ".implode(', ', $out)." WHERE id = ".$this->id.";";
|
||||
if (DEBUG) {
|
||||
|
Loading…
Reference in New Issue
Block a user