extends Resource class_name MajorityJudgmentGrade """ A single grade, like 'Excellent' or 'To Reject'. Could be just an int or a string, but let's go full oriented object. Each grade will also handle its color, I think. L10N PERHAPS ALREADY DEPRECATED --------------- Supports localization (l10n). Default language is Esperanto. Videoludemuloj! ----------------------------------------------- """ # Perhaps we'll drop these shenanigans # and use tr() instead, we'll see. export(Dictionary) var localized_names:Dictionary # (WiP: perhaps not used right now, but it is set) # This is set by the gradation this grade is included in # 0: worst grade # more: better grade (up to gradation size minus one) export(int) var worth := 0 # We use a factory, since ResourceLoader won't like parameters in _init() static func make(__name): # var grade = MajorityJudgmentGrade.new() # cyclic :3 var grade = load("res://addons/majority_judgment/MajorityJudgmentGrade.gd").new() grade.set_name(__name) return grade func set_name(__name): if __name is String: __name = {'eo_EO': __name} assert(__name is Dictionary) self.localized_names = __name