Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into update-to-action-buttons
This commit is contained in:
@@ -2631,8 +2631,10 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/pickedui = input(user, "Choose your UI style.", "Character Preference", UI_style) as null|anything in GLOB.available_ui_styles
|
||||
if(pickedui)
|
||||
UI_style = pickedui
|
||||
if (parent && parent.mob && parent.mob.hud_used)
|
||||
parent.mob.hud_used.update_ui_style(ui_style2icon(UI_style))
|
||||
if (pickedui && parent && parent.mob && parent.mob.hud_used)
|
||||
QDEL_NULL(parent.mob.hud_used)
|
||||
parent.mob.create_mob_hud()
|
||||
parent.mob.hud_used.show_hud(1, parent.mob)
|
||||
if("pda_style")
|
||||
var/pickedPDAStyle = input(user, "Choose your PDA style.", "Character Preference", pda_style) as null|anything in GLOB.pda_styles
|
||||
if(pickedPDAStyle)
|
||||
@@ -3007,7 +3009,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
outline_enabled = !outline_enabled
|
||||
if("outline_color")
|
||||
var/pickedOutlineColor = input(user, "Choose your outline color.", "General Preference", outline_color) as color|null
|
||||
if(pickedOutlineColor != pickedOutlineColor)
|
||||
if(pickedOutlineColor != outline_color)
|
||||
outline_color = pickedOutlineColor // nullable
|
||||
if("screentip_pref")
|
||||
var/choice = input(user, "Choose your screentip preference", "Screentipping?", screentip_pref) as null|anything in GLOB.screentip_pref_options
|
||||
|
||||
@@ -31,6 +31,12 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list(
|
||||
/obj/item/stack/marker_beacon/thirty //and they're bought in stacks of 1, 10, or 30
|
||||
amount = 30
|
||||
|
||||
/obj/item/stack/marker_beacon/cyborg
|
||||
is_cyborg = TRUE
|
||||
custom_materials = null
|
||||
source = /datum/robot_energy_storage/beacon
|
||||
cost = 1
|
||||
|
||||
/obj/item/stack/marker_beacon/Initialize(mapload)
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
/mob/living/proc/update_resting(update_mobility = TRUE)
|
||||
if(update_mobility)
|
||||
update_mobility()
|
||||
update_rest_hud_icon()
|
||||
|
||||
//Force mob to rest, does NOT do stamina damage.
|
||||
//It's really not recommended to use this proc to give feedback, hence why silent is defaulting to true.
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
if(!(m in R.held_items))
|
||||
. += m
|
||||
|
||||
/obj/item/robot_module/proc/get_or_create_estorage(var/storage_type)
|
||||
/obj/item/robot_module/proc/get_or_create_estorage(storage_type)
|
||||
for(var/datum/robot_energy_storage/S in storages)
|
||||
if(istype(S, storage_type))
|
||||
return S
|
||||
@@ -95,42 +95,9 @@
|
||||
|
||||
/obj/item/robot_module/proc/add_module(obj/item/I, nonstandard, requires_rebuild)
|
||||
rad_flags |= RAD_NO_CONTAMINATE
|
||||
if(istype(I, /obj/item/stack))
|
||||
var/obj/item/stack/S = I
|
||||
|
||||
if(is_type_in_list(S, list(/obj/item/stack/sheet/metal, /obj/item/stack/rods, /obj/item/stack/tile/plasteel)))
|
||||
if(S.custom_materials?.len && S.custom_materials[SSmaterials.GetMaterialRef(/datum/material/iron)])
|
||||
S.cost = S.custom_materials[SSmaterials.GetMaterialRef(/datum/material/iron)] * 0.25
|
||||
S.source = get_or_create_estorage(/datum/robot_energy_storage/metal)
|
||||
|
||||
else if(istype(S, /obj/item/stack/sheet/glass))
|
||||
S.cost = 500
|
||||
S.source = get_or_create_estorage(/datum/robot_energy_storage/glass)
|
||||
|
||||
else if(istype(S, /obj/item/stack/sheet/rglass/cyborg))
|
||||
var/obj/item/stack/sheet/rglass/cyborg/G = S
|
||||
G.source = get_or_create_estorage(/datum/robot_energy_storage/metal)
|
||||
G.glasource = get_or_create_estorage(/datum/robot_energy_storage/glass)
|
||||
|
||||
else if(istype(S, /obj/item/stack/medical))
|
||||
S.cost = 250
|
||||
S.source = get_or_create_estorage(/datum/robot_energy_storage/medical)
|
||||
|
||||
else if(istype(S, /obj/item/stack/cable_coil))
|
||||
S.cost = 1
|
||||
S.source = get_or_create_estorage(/datum/robot_energy_storage/wire)
|
||||
|
||||
else if(istype(S, /obj/item/stack/marker_beacon))
|
||||
S.cost = 1
|
||||
S.source = get_or_create_estorage(/datum/robot_energy_storage/beacon)
|
||||
|
||||
else if(istype(S, /obj/item/stack/packageWrap))
|
||||
S.cost = 1
|
||||
S.source = get_or_create_estorage(/datum/robot_energy_storage/wrapping_paper)
|
||||
|
||||
if(S && S.source)
|
||||
S.set_custom_materials(null)
|
||||
S.is_cyborg = 1
|
||||
var/obj/item/stack/S = I
|
||||
if(istype(I, /obj/item/stack) && !S.is_cyborg) // Now handled in the type itself
|
||||
stack_trace("Non-cyborg variant of /obj/item/stack added to a cyborg's modules.")
|
||||
|
||||
if(I.loc != src)
|
||||
I.forceMove(src)
|
||||
@@ -935,9 +902,9 @@
|
||||
/obj/item/gps/cyborg,
|
||||
/obj/item/gripper/mining,
|
||||
/obj/item/cyborg_clamp,
|
||||
/obj/item/stack/marker_beacon,
|
||||
/obj/item/stack/marker_beacon/cyborg,
|
||||
/obj/item/destTagger,
|
||||
/obj/item/stack/packageWrap,
|
||||
/obj/item/stack/packageWrap/cyborg,
|
||||
/obj/item/card/id/miningborg)
|
||||
emag_modules = list(/obj/item/borg/stun)
|
||||
ratvar_modules = list(
|
||||
@@ -1056,7 +1023,7 @@
|
||||
/obj/item/surgicaldrill,
|
||||
/obj/item/scalpel,
|
||||
/obj/item/bonesetter,
|
||||
/obj/item/stack/medical/bone_gel,
|
||||
/obj/item/stack/medical/bone_gel/cyborg,
|
||||
/obj/item/melee/transforming/energy/sword/cyborg/saw,
|
||||
/obj/item/roller/robo,
|
||||
/obj/item/card/emag,
|
||||
@@ -1191,7 +1158,7 @@
|
||||
/obj/item/surgicaldrill,
|
||||
/obj/item/scalpel,
|
||||
/obj/item/bonesetter,
|
||||
/obj/item/stack/medical/bone_gel,
|
||||
/obj/item/stack/medical/bone_gel/cyborg,
|
||||
/obj/item/melee/transforming/energy/sword/cyborg/saw,
|
||||
/obj/item/roller/robo,
|
||||
/obj/item/stack/medical/gauze/cyborg,
|
||||
|
||||
@@ -369,27 +369,6 @@
|
||||
var/msg = "<span class='smallnotice'>[src] makes eye contact with you.</span>"
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, examined_mob, msg), 3)
|
||||
|
||||
//same as above
|
||||
//note: ghosts can point, this is intended
|
||||
//visible_message will handle invisibility properly
|
||||
//overridden here and in /mob/dead/observer for different point span classes and sanity checks
|
||||
/mob/verb/pointed(atom/A as mob|obj|turf in fov_view())
|
||||
set name = "Point To"
|
||||
set category = "Object"
|
||||
|
||||
if(!src || !isturf(src.loc) || !(A in view(src.loc)))
|
||||
return FALSE
|
||||
if(istype(A, /obj/effect/temp_visual/point))
|
||||
return FALSE
|
||||
|
||||
var/tile = get_turf(A)
|
||||
if (!tile)
|
||||
return FALSE
|
||||
|
||||
new /obj/effect/temp_visual/point(A,invisibility)
|
||||
SEND_SIGNAL(src, COMSIG_MOB_POINTED, A)
|
||||
return TRUE
|
||||
|
||||
/mob/proc/can_resist()
|
||||
return FALSE //overridden in living.dm
|
||||
|
||||
|
||||
110
code/modules/point/point.dm
Normal file
110
code/modules/point/point.dm
Normal file
@@ -0,0 +1,110 @@
|
||||
#define POINT_TIME (2.5 SECONDS)
|
||||
|
||||
/**
|
||||
* Point at an atom
|
||||
*
|
||||
* Intended to enable and standardise the pointing animation for all atoms
|
||||
*
|
||||
* Not intended as a replacement for the mob verb
|
||||
*/
|
||||
/atom/movable/proc/point_at(atom/pointed_atom)
|
||||
if(!isturf(loc))
|
||||
return
|
||||
|
||||
if (pointed_atom in src)
|
||||
create_point_bubble(pointed_atom)
|
||||
return
|
||||
|
||||
var/turf/tile = get_turf(pointed_atom)
|
||||
if (!tile)
|
||||
return
|
||||
|
||||
var/turf/our_tile = get_turf(src)
|
||||
var/obj/visual = new /obj/effect/temp_visual/point(our_tile, invisibility)
|
||||
|
||||
animate(visual, pixel_x = (tile.x - our_tile.x) * world.icon_size + pointed_atom.pixel_x, pixel_y = (tile.y - our_tile.y) * world.icon_size + pointed_atom.pixel_y, time = 1.7, easing = EASE_OUT)
|
||||
|
||||
/atom/movable/proc/create_point_bubble(atom/pointed_atom)
|
||||
var/obj/effect/thought_bubble_effect = new
|
||||
|
||||
var/mutable_appearance/thought_bubble = mutable_appearance(
|
||||
'icons/effects/effects.dmi',
|
||||
"thought_bubble",
|
||||
layer = POINT_LAYER,
|
||||
appearance_flags = KEEP_APART,
|
||||
)
|
||||
|
||||
var/mutable_appearance/pointed_atom_appearance = new(pointed_atom.appearance)
|
||||
pointed_atom_appearance.blend_mode = BLEND_INSET_OVERLAY
|
||||
pointed_atom_appearance.plane = thought_bubble.plane
|
||||
pointed_atom_appearance.layer = FLOAT_LAYER
|
||||
pointed_atom_appearance.pixel_x = 0
|
||||
pointed_atom_appearance.pixel_y = 0
|
||||
thought_bubble.overlays += pointed_atom_appearance
|
||||
|
||||
var/hover_outline_index = pointed_atom.get_filter_index(HOVER_OUTLINE_FILTER)
|
||||
if (!isnull(hover_outline_index))
|
||||
pointed_atom_appearance.filters.Cut(hover_outline_index, hover_outline_index + 1)
|
||||
|
||||
thought_bubble.pixel_x = 16
|
||||
thought_bubble.pixel_y = 32
|
||||
thought_bubble.alpha = 200
|
||||
thought_bubble.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
var/mutable_appearance/point_visual = mutable_appearance(
|
||||
'icons/mob/screen_gen.dmi',
|
||||
"arrow",
|
||||
plane = thought_bubble.plane,
|
||||
)
|
||||
|
||||
thought_bubble.overlays += point_visual
|
||||
|
||||
// vis_contents is used to preserve mouse opacity
|
||||
thought_bubble_effect.appearance = thought_bubble
|
||||
vis_contents += thought_bubble_effect
|
||||
|
||||
QDEL_IN(thought_bubble_effect, POINT_TIME)
|
||||
|
||||
/obj/effect/temp_visual/point
|
||||
name = "pointer"
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "arrow"
|
||||
layer = POINT_LAYER
|
||||
duration = POINT_TIME
|
||||
|
||||
/obj/effect/temp_visual/point/Initialize(mapload, set_invis = 0)
|
||||
. = ..()
|
||||
var/atom/old_loc = loc
|
||||
abstract_move(get_turf(src))
|
||||
pixel_x = old_loc.pixel_x
|
||||
pixel_y = old_loc.pixel_y
|
||||
invisibility = set_invis
|
||||
|
||||
#undef POINT_TIME
|
||||
|
||||
/**
|
||||
* Point at an atom
|
||||
*
|
||||
* mob verbs are faster than object verbs. See
|
||||
* [this byond forum post](https://secure.byond.com/forum/?post=1326139&page=2#comment8198716)
|
||||
* for why this isn't atom/verb/pointed()
|
||||
*
|
||||
* note: ghosts can point, this is intended
|
||||
*
|
||||
* visible_message will handle invisibility properly
|
||||
*
|
||||
* overridden here and in /mob/dead/observer for different point span classes and sanity checks
|
||||
*/
|
||||
/mob/verb/pointed(atom/target as mob|obj|turf in fov_view())
|
||||
set name = "Point To"
|
||||
set category = "Object"
|
||||
|
||||
if(client && !(target in view(client.view, src)))
|
||||
return FALSE
|
||||
if(istype(target, /obj/effect/temp_visual/point))
|
||||
return FALSE
|
||||
|
||||
point_at(target)
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_MOB_POINTED, target)
|
||||
return TRUE
|
||||
@@ -517,6 +517,7 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
/obj/item/stack/cable_coil/cyborg
|
||||
is_cyborg = TRUE
|
||||
custom_materials = null
|
||||
source = /datum/robot_energy_storage/wire
|
||||
cost = 1
|
||||
|
||||
/obj/item/stack/cable_coil/cyborg/attack_self(mob/user)
|
||||
|
||||
@@ -80,12 +80,21 @@
|
||||
.slimecore .wrap {border-color: #18640E;}
|
||||
.slimecore .content {color: #6EA161; border-color: #11450B; background-color: #354E35;}
|
||||
|
||||
.operative .wrap {border-color: #1E0101;}
|
||||
.operative .content {color: #FFFFFF; border-color: #750000; background-color: #350000;}
|
||||
.operative .wrap {border-color: #13121b;}
|
||||
.operative .content {color: #b01232; border-color: #13121b; background-color: #282831;}
|
||||
|
||||
.clockwork .wrap {border-color: #170800;}
|
||||
.clockwork .content {color: #B18B25; border-color: #000000; background-color: #5F380E;}
|
||||
|
||||
.glass .wrap {border-color: #273844;}
|
||||
.glass .content {color: #5b7588; border-color: #273844; background-color: #1f252b;}
|
||||
|
||||
.trasen-knox .wrap {border-color: #998e81;}
|
||||
.trasen-knox .content {color: #3ce375; border-color: #998e81; background-color: #1e1d21;}
|
||||
|
||||
.detective .wrap {border-color: #2c0F0c;}
|
||||
.detective .content {color: #c7b08b; border-color: #2c0F0c; background-color: #221c1a;}
|
||||
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user