Files
Paradise/code/_onclick/observer.dm
Crazylemon64 5b0eedcee5 Refactors buildmode into submodules, and adds an "atmos" buildmode
Also makes the mode selection interface far less tedious/painful

Adds unsimulated turf overriding, and admin logging

Temporary commit for storing the sdql buildmode

Adds extra documentation

also requires a path to be selected for "advanced" and "fill" modes, now

Spaces out mode switch buttons nicer

removes need for debug rights to do a fill with mob paths

Adds a bunch of extra fancy paths

Fox Changes pt 1

Backports /tg/station changes

Fixes a double-tap issue with dclick handling of certain mobs

Also no longer shows the "selection canceled" if you haven't selected a
region for the buildmode that supports region selection

Updates buildmode stuff
2018-10-07 20:54:40 -07:00

87 lines
2.5 KiB
Plaintext

/mob/dead/observer/DblClickOn(var/atom/A, var/params)
if(client.click_intercept)
// Not doing a click intercept here, because otherwise we double-tap with the `ClickOn` proc.
// But we return here since we don't want to do regular dblclick handling
return
if(can_reenter_corpse && mind && mind.current)
if(A == mind.current || (mind.current in A)) // double click your corpse or whatever holds it
reenter_corpse() // (cloning scanner, body bag, closet, mech, etc)
return // seems legit.
// Follow !!ALL OF THE THINGS!!
if(istype(A, /atom/movable) && A != src)
ManualFollow(A)
// Otherwise jump
else
following = null
forceMove(get_turf(A))
/mob/dead/observer/ClickOn(var/atom/A, var/params)
if(client.click_intercept)
client.click_intercept.InterceptClickOn(src, params, A)
return
if(world.time <= next_move)
return
var/list/modifiers = params2list(params)
if(check_rights(R_ADMIN, 0)) // Admin click shortcuts
var/mob/M
if(modifiers["shift"] && modifiers["ctrl"])
client.debug_variables(A)
return
if(modifiers["ctrl"])
M = get_mob_in_atom_with_warning(A)
if(M)
client.holder.show_player_panel(M)
return
if(modifiers["shift"] && modifiers["middle"])
M = get_mob_in_atom_with_warning(A)
if(M)
admin_mob_info(M)
return
if(modifiers["shift"])
ShiftClickOn(A)
return
if(modifiers["alt"])
AltClickOn(A)
return
// You are responsible for checking config.ghost_interaction when you override this function
// Not all of them require checking, see below
A.attack_ghost(src)
// We don't need a fucking toggle.
/mob/dead/observer/ShiftClickOn(var/atom/A)
examinate(A)
/atom/proc/attack_ghost(mob/user as mob)
return
// ---------------------------------------
// And here are some good things for free:
// Now you can click through portals, wormholes, gateways, and teleporters while observing. -Sayu
/obj/machinery/teleport/hub/attack_ghost(mob/user as mob)
var/obj/machinery/teleport/station/S = power_station
if(S)
var/obj/machinery/computer/teleporter/com = S.teleporter_console
if(com && com.target)
user.forceMove(get_turf(com.target))
/obj/effect/portal/attack_ghost(mob/user as mob)
if(target)
user.forceMove(get_turf(target))
/obj/machinery/gateway/centerstation/attack_ghost(mob/user as mob)
if(awaygate)
user.forceMove(awaygate.loc)
else
to_chat(user, "[src] has no destination.")
/obj/machinery/gateway/centeraway/attack_ghost(mob/user as mob)
if(stationgate)
user.forceMove(stationgate.loc)
else
to_chat(user, "[src] has no destination.")