forked from devsam/core
- array에 +=를 phan 알아듣기 쉽게 array_merge로 - Util::array_get이 더 이상 필요없으므로 null coalescing - array로 tuple류를 반환하는 함수에 index를 포함하도록 변경 - php intelephense에게는 현재 무효 - getPost 일부 값에 int 지정 - 아이템에 id property를 없앴으므로 관련 코드 제거 - enum은 array key로 사용할 수 없으므로 \Ds\Map으로 변경 - KakaoKey PhanRedefineClass 에러 우회
47 lines
1.0 KiB
PHP
47 lines
1.0 KiB
PHP
<?php
|
|
namespace sammo;
|
|
use \sammo\iAction;
|
|
use \sammo\General;
|
|
|
|
//XXX: 아직 아이템 구현이 끝나지 않았으므로 바뀔 수 있음
|
|
class BaseItem implements iAction{
|
|
use \sammo\DefaultAction;
|
|
|
|
protected $rawName = '-';
|
|
protected $name = '-';
|
|
protected $info = '';
|
|
protected $cost = null;
|
|
protected $consumable = false;
|
|
protected $buyable = false;
|
|
protected $reqSecu = 0;
|
|
|
|
function getRawName(){
|
|
return $this->rawName;
|
|
}
|
|
|
|
public function getRawClassName(bool $shortName=true):string{
|
|
if($shortName){
|
|
return Util::getClassNameFromObj($this);
|
|
}
|
|
return static::class;
|
|
}
|
|
|
|
function getCost(){
|
|
return $this->cost;
|
|
}
|
|
function isConsumable(){
|
|
return $this->consumable;
|
|
}
|
|
|
|
function isBuyable(){
|
|
return $this->buyable;
|
|
}
|
|
|
|
function getReqSecu(){
|
|
return $this->reqSecu;
|
|
}
|
|
|
|
function tryConsumeNow(General $general, string $actionType, string $command):bool{
|
|
return false;
|
|
}
|
|
} |