-
Notifications
You must be signed in to change notification settings - Fork 497
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* convert sanity UI to TGUI * make ui buildable & fix data parse error * remove .tmpl file * update TGUI bundle * update TGUI bandle -the hell... * make layout more dynamic * update TGUI bundle * fix linters(?) * fix linters (now real!!)
- Loading branch information
1 parent
cee4410
commit f86f36e
Showing
15 changed files
with
338 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/datum/sanity/ui_state(mob/user) | ||
return GLOB.always_state | ||
|
||
/datum/sanity/ui_interact(mob/user, datum/tgui/ui) | ||
ui = SStgui.try_update_ui(user, src, ui) | ||
if(!ui) | ||
ui = new(user, src, "Sanity", owner.name) | ||
ui.set_autoupdate(TRUE) | ||
ui.open() | ||
|
||
/datum/sanity/ui_assets(mob/user) | ||
return list( | ||
get_asset_datum(/datum/asset/simple/sanity) | ||
) | ||
|
||
/datum/sanity/ui_data(mob/user) | ||
var/list/data = list() | ||
|
||
data["style"] = list( | ||
"value" = owner.get_total_style(), | ||
"min" = MIN_HUMAN_STYLE, | ||
"max" = MAX_HUMAN_STYLE | ||
) | ||
|
||
data["sanity"] = list( | ||
"value" = level, | ||
"max" = max_level | ||
) | ||
|
||
data["desires"] = list( | ||
"resting" = resting, | ||
"desires" = desires, | ||
"value" = insight_rest, | ||
) | ||
|
||
var/obj/item/implant/core_implant/cruciform/C = owner.get_core_implant(/obj/item/implant/core_implant/cruciform) | ||
data["righteous"] = list( | ||
"present" = C ? TRUE : FALSE, | ||
"value" = C?.righteous_life | ||
) | ||
|
||
data["insight"] = insight | ||
|
||
return data |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
export const TRAIT_DESCRIPTION = { | ||
Sanity: | ||
'Sanity is gained or lost depending on your environment. For example being around oddities increases your sanity slightly, as well as taking drugs or smoking. Seeing people die, being around blood and grime and being hurt yourself lowers your sanity.', | ||
Insight: | ||
'Insight is gained by activies such as smoking, taking drugs, hurting people or seeing them get hurt, seeing blood and grime and exploring maintenance.', | ||
Style: | ||
'Style can be gained by wearing fashionable and clean attire. Being dirty with blood or grime will decrease your style value.', | ||
Desires: | ||
'Once you have gained enough insight, you should rest. While you rest you will have certain wishes to fulfill.', | ||
Holy: 'Living righteously and actively participating in group rituals increases the amount of energy regeneration of your cruciform.', | ||
}; | ||
|
||
export const TRAIT_LABEL = { | ||
Sanity: 'Sanity level', | ||
Insight: 'Insight progress', | ||
Style: 'Current style', | ||
Desires: 'Rest progress', | ||
Holy: 'Holiness', | ||
}; | ||
|
||
export const TRAIT_ASSET = { | ||
Sanity: 'sanity.png', | ||
Insight: 'insight.png', | ||
Style: 'style.png', | ||
Desires: 'desire.png', | ||
Holy: 'kneeling.png', | ||
}; | ||
|
||
export const TRAIT_NAME = { | ||
Sanity: 'Sanity', | ||
Insight: 'Insight', | ||
Style: 'Style', | ||
Desires: 'Desires', | ||
Holy: 'Righteous life', | ||
}; |
Oops, something went wrong.