Merge pull request #1534 from Citadel-Station-13/SelectiveMirrorSync

Selective mirror sync
This commit is contained in:
LetterJay
2017-06-14 06:41:01 -05:00
committed by GitHub
104 changed files with 2272 additions and 1039 deletions
+48 -1
View File
@@ -1,5 +1,10 @@
/client
var/list/atom/selected_target[2]
var/obj/item/active_mousedown_item = null
var/mouseParams = ""
var/mouseLocation = null
var/mouseObject = null
var/mouseControlObject = null
/client/MouseDown(object, location, control, params)
var/delay = mob.CanMobAutoclick(object, location, params)
@@ -9,14 +14,26 @@
while(selected_target[1])
Click(selected_target[1], location, control, selected_target[2])
sleep(delay)
active_mousedown_item = mob.canMobMousedown(object, location, params)
if(active_mousedown_item)
active_mousedown_item.onMouseDown(object, location, params, mob)
/client/MouseUp(object, location, control, params)
selected_target[1] = null
if(active_mousedown_item)
active_mousedown_item.onMouseUp(object, location, params, mob)
active_mousedown_item = null
/client/MouseDrag(src_object,atom/over_object,src_location,over_location,src_control,over_control,params)
mouseParams = params
mouseLocation = over_location
mouseObject = over_object
mouseControlObject = over_control
if(selected_target[1] && over_object && over_object.IsAutoclickable())
selected_target[1] = over_object
selected_target[2] = params
if(active_mousedown_item)
active_mousedown_item.onMouseDrag(src_object, over_object, src_location, over_location, params, mob)
/mob/proc/CanMobAutoclick(object, location, params)
@@ -27,8 +44,31 @@
if(h)
. = h.CanItemAutoclick(object, location, params)
/mob/proc/canMobMousedown(object, location, params)
/mob/living/carbon/canMobMousedown(atom/object, location, params)
var/obj/item/H = get_active_held_item()
if(H)
. = H.canItemMouseDown(object, location, params)
/obj/item/proc/CanItemAutoclick(object, location, params)
/obj/item/proc/canItemMouseDown(object, location, params)
if(canMouseDown)
return src
/obj/item/proc/onMouseDown(object, location, params, mob)
return
/obj/item/proc/onMouseUp(object, location, params, mob)
return
/obj/item/proc/onMouseDrag(src_object, over_object, src_location, over_location, params, mob)
return
/obj/item
var/canMouseDown = FALSE
/obj/item/weapon/gun
var/automatic = 0 //can gun use it, 0 is no, anything above 0 is the delay between clicks in ds
@@ -42,4 +82,11 @@
. = 0
/obj/screen/click_catcher/IsAutoclickable()
. = 1
. = 1
//Please don't roast me too hard
/client/MouseMove(object,location,control,params)
mouseParams = params
mouseLocation = location
mouseObject = object
mouseControlObject = control
+7 -9
View File
@@ -361,7 +361,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
name = "Next Tier Requirements"
desc = "You shouldn't be seeing this description unless you're very fast. If you're very fast, good job!"
icon_state = "no-servants-caches"
var/static/list/scripture_states = list(SCRIPTURE_DRIVER = TRUE, SCRIPTURE_SCRIPT = FALSE, SCRIPTURE_APPLICATION = FALSE, SCRIPTURE_REVENANT = FALSE, SCRIPTURE_JUDGEMENT = FALSE)
/obj/screen/alert/clockwork/scripture_reqs/Initialize()
. = ..()
@@ -374,12 +374,11 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
/obj/screen/alert/clockwork/scripture_reqs/process()
if(GLOB.clockwork_gateway_activated)
qdel(src)
mob_viewer.clear_alert("scripturereq")
return
var/current_state
scripture_states = scripture_unlock_check()
for(var/i in scripture_states)
if(!scripture_states[i])
for(var/i in SSticker.scripture_states)
if(!SSticker.scripture_states[i])
current_state = i
break
icon_state = "no"
@@ -459,7 +458,6 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
var/servants = 0
var/validservants = 0
var/unconverted_ais_exist = get_unconverted_ais()
var/list/scripture_states = scripture_unlock_check()
var/list/textlist
for(var/mob/living/L in GLOB.living_mob_list)
if(is_servant_of_ratvar(L))
@@ -496,7 +494,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
textlist += "<b>[unconverted_ais_exist] unconverted AIs exist!</b><br>"
else
textlist += "<b>An unconverted AI exists!</b><br>"
if(scripture_states[SCRIPTURE_REVENANT])
if(SSticker.scripture_states[SCRIPTURE_REVENANT])
var/inathneq_available = GLOB.clockwork_generals_invoked["inath-neq"] <= world.time
var/sevtug_available = GLOB.clockwork_generals_invoked["sevtug"] <= world.time
var/nezbere_available = GLOB.clockwork_generals_invoked["nezbere"] <= world.time
@@ -508,9 +506,9 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
textlist += "Generals available: <b>NONE</b><br>"
else
textlist += "Generals available: <b>NONE</b><br>"
for(var/i in scripture_states)
for(var/i in SSticker.scripture_states)
if(i != SCRIPTURE_DRIVER) //ignore the always-unlocked stuff
textlist += "[i] Scripture: <b>[scripture_states[i] ? "UNLOCKED":"LOCKED"]</b><br>"
textlist += "[i] Scripture: <b>[SSticker.scripture_states[i] ? "UNLOCKED":"LOCKED"]</b><br>"
desc = textlist.Join()
..()