Minor NanoUI/Topic cleanup

The default state handler is now assigned as the default argument value, instead of having to utilize null-checks.
This commit is contained in:
PsiOmega
2015-02-23 10:23:40 +01:00
parent a0917f442e
commit eb5e5aa0ba
2 changed files with 3 additions and 6 deletions
+1 -4
View File
@@ -16,14 +16,11 @@
var/damtype = "brute"
var/force = 0
/obj/Topic(href, href_list, var/nowindow = 0, var/datum/topic_state/custom_state)
/obj/Topic(href, href_list, var/nowindow = 0, var/datum/topic_state/custom_state = default_state)
// Calling Topic without a corresponding window open causes runtime errors
if(!nowindow && ..())
return 1
if(!custom_state)
custom_state = default_state
// In the far future no checks are made in an overriding Topic() beyond if(..()) return
// Instead any such checks are made in CanUseTopic()
var/obj/host = nano_host()