Revert "Merge branch 'master' of https://github.com/PolarisSS13/Polaris into NanoGrade"

This reverts commit 6bb5409349, reversing
changes made to f6a83d5ee0.
This commit is contained in:
SinTwo
2016-08-15 12:58:00 -04:00
parent 6bb5409349
commit eabefc538a
325 changed files with 3375 additions and 41824 deletions
-12
View File
@@ -1,12 +0,0 @@
/**
* tgui state: admin_state
*
* Checks that the user is an admin, end-of-story.
**/
/var/global/datum/ui_state/admin_state/tg_admin_state = new()
/datum/ui_state/admin_state/can_use_topic(src_object, mob/user)
if(check_rights(R_ADMIN, 0, user))
return UI_INTERACTIVE
return UI_CLOSE
-12
View File
@@ -1,12 +0,0 @@
/**
* tgui state: conscious_state
*
* Only checks if the user is conscious.
**/
/var/global/datum/ui_state/conscious_state/tg_conscious_state = new()
/datum/ui_state/conscious_state/can_use_topic(src_object, mob/user)
if(user.stat == CONSCIOUS)
return UI_INTERACTIVE
return UI_CLOSE
-12
View File
@@ -1,12 +0,0 @@
/**
* tgui state: contained_state
*
* Checks that the user is inside the src_object.
**/
/var/global/datum/ui_state/contained_state/tg_contained_state = new()
/datum/ui_state/contained_state/can_use_topic(atom/src_object, mob/user)
if(!src_object.contains(user))
return UI_CLOSE
return user.shared_ui_interaction(src_object)
@@ -1,12 +0,0 @@
/**
* tgui state: deep_inventory_state
*
* Checks that the src_object is in the user's deep (backpack, box, toolbox, etc) inventory.
**/
/var/global/datum/ui_state/deep_inventory_state/tg_deep_inventory_state = new()
/datum/ui_state/deep_inventory_state/can_use_topic(src_object, mob/user)
if(!user.contains(src_object))
return UI_CLOSE
return user.shared_ui_interaction(src_object)
-55
View File
@@ -1,55 +0,0 @@
/**
* tgui state: default_state
*
* Checks a number of things -- mostly physical distance for humans and view for robots.
**/
/var/global/datum/ui_state/default/tg_default_state = new()
/datum/ui_state/default/can_use_topic(src_object, mob/user)
return user.tg_default_can_use_topic(src_object) // Call the individual mob-overriden procs.
/mob/proc/tg_default_can_use_topic(src_object)
return UI_CLOSE // Don't allow interaction by default.
/mob/living/tg_default_can_use_topic(src_object)
. = shared_ui_interaction(src_object)
if(. > UI_CLOSE && loc)
. = min(., loc.contents_ui_distance(src_object, src)) // Check the distance...
if(. == UI_INTERACTIVE) // Non-human living mobs can only look, not touch.
return UI_UPDATE
/mob/living/carbon/human/tg_default_can_use_topic(src_object)
. = shared_ui_interaction(src_object)
if(. > UI_CLOSE)
. = min(., shared_living_ui_distance(src_object)) // Check the distance...
// Derp a bit if we have brain loss.
if(prob(getBrainLoss()))
return UI_UPDATE
/mob/living/silicon/robot/tg_default_can_use_topic(src_object)
. = shared_ui_interaction(src_object)
if(. <= UI_DISABLED)
return
// Robots can interact with anything they can see.
if(get_dist(src, src_object) <= client.view)
return UI_INTERACTIVE
return UI_DISABLED // Otherwise they can keep the UI open.
/mob/living/silicon/ai/tg_default_can_use_topic(src_object)
. = shared_ui_interaction(src_object)
if(. < UI_INTERACTIVE)
return
// The AI can interact with anything it can see nearby, or with cameras.
if((get_dist(src, src_object) <= client.view) || cameranet.checkTurfVis(get_turf_pixel(src_object)))
return UI_INTERACTIVE
return UI_CLOSE
/mob/living/silicon/pai/tg_default_can_use_topic(src_object)
// pAIs can only use themselves and the owner's radio.
if((src_object == src || src_object == radio) && !stat)
return UI_INTERACTIVE
else
return ..()
-20
View File
@@ -1,20 +0,0 @@
/**
* tgui state: hands_state
*
* Checks that the src_object is in the user's hands.
**/
/var/global/datum/ui_state/hands_state/tg_hands_state = new()
/datum/ui_state/hands_state/can_use_topic(src_object, mob/user)
. = user.shared_ui_interaction(src_object)
if(. > UI_CLOSE)
return min(., user.hands_can_use_topic(src_object))
/mob/proc/hands_can_use_topic(src_object)
return UI_CLOSE
/mob/living/hands_can_use_topic(src_object)
if(src_object in get_both_hands(src))
return UI_INTERACTIVE
return UI_CLOSE
-12
View File
@@ -1,12 +0,0 @@
/**
* tgui state: inventory_state
*
* Checks that the src_object is in the user's top-level (hand, ear, pocket, belt, etc) inventory.
**/
/var/global/datum/ui_state/inventory_state/tg_inventory_state = new()
/datum/ui_state/inventory_state/can_use_topic(src_object, mob/user)
if(!(src_object in user))
return UI_CLOSE
return user.shared_ui_interaction(src_object)
-26
View File
@@ -1,26 +0,0 @@
/**
* tgui state: notcontained_state
*
* Checks that the user is not inside src_object, and then makes the default checks.
**/
/var/global/datum/ui_state/notcontained_state/tg_notcontained_state = new()
/datum/ui_state/notcontained_state/can_use_topic(atom/src_object, mob/user)
. = user.shared_ui_interaction(src_object)
if(. > UI_CLOSE)
return min(., user.notcontained_can_use_topic(src_object))
/mob/proc/notcontained_can_use_topic(src_object)
return UI_CLOSE
/mob/living/notcontained_can_use_topic(atom/src_object)
if(src_object.contains(src))
return UI_CLOSE // Close if we're inside it.
return tg_default_can_use_topic(src_object)
/mob/living/silicon/notcontained_can_use_topic(src_object)
return tg_default_can_use_topic(src_object) // Silicons use default bevhavior.
/mob/living/simple_animal/drone/notcontained_can_use_topic(src_object)
return tg_default_can_use_topic(src_object) // Drones use default bevhavior.
-24
View File
@@ -1,24 +0,0 @@
/**
* tgui state: physical_state
*
* Short-circuits the default state to only check physical distance.
**/
/var/global/datum/ui_state/physical/tg_physical_state = new()
/datum/ui_state/physical/can_use_topic(src_object, mob/user)
. = user.shared_ui_interaction(src_object)
if(. > UI_CLOSE)
return min(., user.physical_can_use_topic(src_object))
/mob/proc/physical_can_use_topic(src_object)
return UI_CLOSE
/mob/living/physical_can_use_topic(src_object)
return shared_living_ui_distance(src_object)
/mob/living/silicon/physical_can_use_topic(src_object)
return max(UI_UPDATE, shared_living_ui_distance(src_object)) // Silicons can always see.
/mob/living/silicon/ai/physical_can_use_topic(src_object)
return UI_UPDATE // AIs are not physical.
-12
View File
@@ -1,12 +0,0 @@
/**
* tgui state: self_state
*
* Only checks that the user and src_object are the same.
**/
/var/global/datum/ui_state/self_state/tg_self_state = new()
/datum/ui_state/self_state/can_use_topic(src_object, mob/user)
if(src_object != user)
return UI_CLOSE
return user.shared_ui_interaction(src_object)
-14
View File
@@ -1,14 +0,0 @@
/**
* tgui state: z_state
*
* Only checks that the Z-level of the user and src_object are the same.
**/
/var/global/datum/ui_state/z_state/tg_z_state = new()
/datum/ui_state/z_state/can_use_topic(src_object, mob/user)
var/turf/turf_obj = get_turf(src_object)
var/turf/turf_usr = get_turf(user)
if(turf_obj && turf_usr && turf_obj.z == turf_usr.z)
return UI_INTERACTIVE
return UI_CLOSE