mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 15:17:01 +01:00
Cleanup
This commit is contained in:
@@ -1228,4 +1228,22 @@ proc/shift_proximity(atom/checker, atom/A, range, atom/B, newrange)
|
||||
if(closest_distance > distance)
|
||||
closest_distance = distance
|
||||
closest_atom = A
|
||||
return closest_atom
|
||||
return closest_atom
|
||||
|
||||
proc/pick_closest_path(value)
|
||||
var/list/matches = get_fancy_list_of_types()
|
||||
if (!isnull(value) && value!="")
|
||||
matches = filter_fancy_list(matches, value)
|
||||
|
||||
if(matches.len==0)
|
||||
return
|
||||
|
||||
var/chosen
|
||||
if(matches.len==1)
|
||||
chosen = matches[1]
|
||||
else
|
||||
chosen = input("Select an atom type", "Spawn Atom", matches[1]) as null|anything in matches
|
||||
if(!chosen)
|
||||
return
|
||||
chosen = matches[chosen]
|
||||
return chosen
|
||||
+2
-2
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
/mob/living/silicon/ai/DblClickOn(var/atom/A, params)
|
||||
if(client.click_intercept)
|
||||
if(call(client.click_intercept,"ClickOn")(src,params,A))
|
||||
if(call(client.click_intercept, "ClickOn")(src, params, A))
|
||||
return
|
||||
|
||||
if(control_disabled || stat) return
|
||||
@@ -28,7 +28,7 @@
|
||||
next_click = world.time + 1
|
||||
|
||||
if(client.click_intercept)
|
||||
if(call(client.click_intercept,"ClickOn")(src,params,A))
|
||||
if(call(client.click_intercept, "ClickOn")(src, params, A))
|
||||
return
|
||||
|
||||
if(control_disabled || stat)
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
next_click = world.time + 1
|
||||
|
||||
if(client.click_intercept)
|
||||
if(call(client.click_intercept,"ClickOn")(src,params,A))
|
||||
if(call(client.click_intercept, "ClickOn")(src, params, A))
|
||||
return
|
||||
|
||||
var/list/modifiers = params2list(params)
|
||||
|
||||
@@ -619,21 +619,7 @@ var/global/BSACooldown = 0
|
||||
if(!check_rights(R_SPAWN))
|
||||
return
|
||||
|
||||
var/list/matches = get_fancy_list_of_types()
|
||||
if (!isnull(object) && object!="")
|
||||
matches = filter_fancy_list(matches, object)
|
||||
|
||||
if(matches.len==0)
|
||||
return
|
||||
|
||||
var/chosen
|
||||
if(matches.len==1)
|
||||
chosen = matches[1]
|
||||
else
|
||||
chosen = input("Select an atom type", "Spawn Atom", matches[1]) as null|anything in matches
|
||||
if(!chosen)
|
||||
return
|
||||
chosen = matches[chosen]
|
||||
var/chosen = pick_closest_path(object)
|
||||
|
||||
if(ispath(chosen,/turf))
|
||||
var/turf/T = get_turf(usr.loc)
|
||||
|
||||
@@ -156,25 +156,6 @@
|
||||
user << "\blue Right Mouse Button on obj/mob = Select target to copy"
|
||||
user << "\blue ***********************************************************"
|
||||
|
||||
|
||||
/datum/buildmode/proc/pick_closest_path(value)
|
||||
var/list/matches = get_fancy_list_of_types()
|
||||
if (!isnull(value) && value!="")
|
||||
matches = filter_fancy_list(matches, value)
|
||||
|
||||
if(matches.len==0)
|
||||
return
|
||||
|
||||
var/chosen
|
||||
if(matches.len==1)
|
||||
chosen = matches[1]
|
||||
else
|
||||
chosen = input("Select an atom type", "Spawn Atom", matches[1]) as null|anything in matches
|
||||
if(!chosen)
|
||||
return
|
||||
chosen = matches[chosen]
|
||||
return chosen
|
||||
|
||||
/datum/buildmode/proc/change_settings(mob/user)
|
||||
switch(mode)
|
||||
if(BASIC_BUILDMODE)
|
||||
@@ -237,10 +218,6 @@
|
||||
cornerA = null
|
||||
cornerB = null
|
||||
|
||||
/datum/buildmode/proc/ClickOn(mob/user,params,A)
|
||||
world << "[user] clicking on [A]. Interceptin"
|
||||
return 1
|
||||
|
||||
/proc/togglebuildmode(mob/M in player_list)
|
||||
set name = "Toggle Build Mode"
|
||||
set category = "Special Verbs"
|
||||
@@ -255,7 +232,7 @@
|
||||
log_admin("[key_name(usr)] has entered build mode.")
|
||||
|
||||
|
||||
/datum/buildmode/ClickOn(user,params,atom/object) //Click Intercept
|
||||
/datum/buildmode/proc/ClickOn(user,params,atom/object) //Click Intercept
|
||||
var/list/pa = params2list(params)
|
||||
var/right_click = pa.Find("right")
|
||||
var/left_click = pa.Find("left")
|
||||
@@ -265,7 +242,7 @@
|
||||
. = 1
|
||||
switch(mode)
|
||||
if(BASIC_BUILDMODE)
|
||||
if(istype(object,/turf) && left_click && !alt_click && !ctrl_click )
|
||||
if(istype(object,/turf) && left_click && !alt_click && !ctrl_click)
|
||||
var/turf/T = object
|
||||
if(istype(object,/turf/space))
|
||||
T.ChangeTurf(/turf/simulated/floor/plasteel)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//ADMIN THINGS//
|
||||
////////////////
|
||||
var/datum/admins/holder = null
|
||||
var/click_intercept = null // Needs to implement ClickOn(user,params,atom) proc
|
||||
var/datum/click_intercept = null // Needs to implement ClickOn(user,params,atom) proc
|
||||
var/AI_Interact = 0
|
||||
|
||||
var/jobbancache = null //Used to cache this client's jobbans to save on DB queries
|
||||
|
||||
Reference in New Issue
Block a user