mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-21 20:11:04 +01:00
Blueprints Rework (#18947)
Reworks blueprints to use an eye component for area selection and changing. Blueprints will now work on whichever overmap site they spawn on if overmap is enabled, though currently they have only been added to the Horizon. Adds shuttle-modifying blueprints for altering shuttle areas and exoplanet outpost blueprints for creating areas on exoplanets. A set of outpost blueprints and a lockbox containing blueprints for the Horizon's shuttles have been added to the CE's locker. Moves eye creation to a component. Ported from: https://github.com/NebulaSS13/Nebula/pull/465 https://github.com/NebulaSS13/Nebula/pull/564 https://github.com/NebulaSS13/Nebula/pull/3046
This commit is contained in:
@@ -83,6 +83,9 @@
|
||||
return B.ClickOn(A, params)
|
||||
|
||||
var/list/modifiers = params2list(params)
|
||||
if(modifiers["right"])
|
||||
RightClickOn(A)
|
||||
return TRUE
|
||||
if(modifiers["shift"] && modifiers["ctrl"])
|
||||
CtrlShiftClickOn(A)
|
||||
return TRUE
|
||||
@@ -306,6 +309,12 @@
|
||||
/mob/proc/TurfAdjacent(var/turf/T)
|
||||
return T.AdjacentQuick(src)
|
||||
|
||||
/mob/proc/RightClickOn(atom/A)
|
||||
A.RightClick(src)
|
||||
|
||||
/atom/proc/RightClick(mob/user)
|
||||
return
|
||||
|
||||
/*
|
||||
Control+Shift click
|
||||
Unused except for AI
|
||||
|
||||
@@ -10,6 +10,12 @@
|
||||
#define AB_CHECK_ALIVE 8
|
||||
#define AB_CHECK_INSIDE 16
|
||||
|
||||
///Eye action targets the parent datum.
|
||||
#define PARENT_TARGET 0
|
||||
///Eye action targets the eye mob itself.
|
||||
#define EYE_TARGET 1
|
||||
///Eye action targets the eye component.
|
||||
#define COMPONENT_TARGET 2
|
||||
|
||||
/datum/action
|
||||
var/name = "Generic Action"
|
||||
@@ -288,6 +294,31 @@
|
||||
to_chat(usr, SPAN_NOTICE("You press the button on the exterior of \the [target_clothing]."))
|
||||
target_clothing.action_circuit.activate_pin(1)
|
||||
|
||||
/datum/action/eye
|
||||
action_type = AB_GENERIC
|
||||
check_flags = AB_CHECK_LYING|AB_CHECK_STUNNED
|
||||
///The type of /mob/abstract/eye used by the action.
|
||||
var/eye_type = /mob/abstract/eye
|
||||
///The relevant owner of the proc to be called by the eye action.
|
||||
var/target_type = PARENT_TARGET
|
||||
|
||||
/datum/action/eye/New(var/datum/component/eye/eye_component)
|
||||
if(!istype(eye_component))
|
||||
crash_with("Attempted to generate eye action [src], but no eye component was provided!")
|
||||
switch(target_type)
|
||||
if(PARENT_TARGET)
|
||||
return ..(eye_component.parent)
|
||||
if(EYE_TARGET)
|
||||
return ..(eye_component.component_eye)
|
||||
if(COMPONENT_TARGET)
|
||||
return ..(eye_component)
|
||||
else
|
||||
crash_with("Attempted to generate eye action [src] but an improper target_type ([target_type]) was defined.")
|
||||
|
||||
/datum/action/eye/CheckRemoval(mob/living/user)
|
||||
if(!user.eyeobj || !istype(user.eyeobj, eye_type))
|
||||
return TRUE
|
||||
|
||||
#undef AB_WEST_OFFSET
|
||||
#undef AB_NORTH_OFFSET
|
||||
#undef AB_MAX_COLUMNS
|
||||
|
||||
@@ -151,3 +151,9 @@
|
||||
|
||||
/obj/screen/fullscreen/teleport
|
||||
icon_state = "teleport"
|
||||
|
||||
/obj/screen/fullscreen/blueprints
|
||||
icon = 'icons/effects/blueprints.dmi'
|
||||
icon_state = "base"
|
||||
screen_loc = ui_entire_screen
|
||||
alpha = 100
|
||||
|
||||
Reference in New Issue
Block a user