mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 02:54:41 +01:00
Proof of concept/proposal: Use icon shifting to expand range of hattable cyborgs. (#31928)
* Expand the range of cyborgs that can wear hats. * Tweak some offsets for Rovers. --------- Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
This commit is contained in:
@@ -48,7 +48,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
|
||||
see_invisible = SEE_INVISIBLE_LIVING_AI
|
||||
see_in_dark = 8
|
||||
hud_type = /datum/hud/ai
|
||||
hat_offset_y = 3
|
||||
hat_offsets = alist(SOUTH = list(0, 3), NORTH = list(0, 3), EAST = list(0, 3), WEST = list(0, 3))
|
||||
is_centered = TRUE
|
||||
can_be_hatted = TRUE
|
||||
var/list/network = list("SS13", "Mining Outpost", "Labor Camp")
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
mob_size = MOB_SIZE_SMALL
|
||||
pull_force = MOVE_FORCE_VERY_WEAK // Can only drag small items
|
||||
modules_break = FALSE
|
||||
hat_offset_y = -15
|
||||
hat_offsets = alist(SOUTH = list(0, -15), NORTH = list(0, -15), EAST = list(0, -15), WEST = list(0, -15))
|
||||
is_centered = TRUE
|
||||
can_be_hatted = TRUE
|
||||
can_wear_restricted_hats = TRUE
|
||||
|
||||
@@ -588,73 +588,81 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
|
||||
if("Engineering", "Miner_old", "JanBot2", "Medbot", "engineerrobot", "maximillion", "secborg", "Hydrobot")
|
||||
can_be_hatted = TRUE // Their base sprite USED to already come with a hat
|
||||
can_wear_restricted_hats = TRUE
|
||||
if("Rover")
|
||||
can_be_hatted = FALSE
|
||||
hat_offset_y = -1
|
||||
if("Rover") // bit of an oddball with different shapes per department
|
||||
can_be_hatted = TRUE
|
||||
switch(module.module_type)
|
||||
if("Engineer")
|
||||
hat_offsets = alist(SOUTH = list(0, -2), NORTH = list(0, 1), EAST = list(-8, -1), WEST = list(9, -1))
|
||||
if("Medical")
|
||||
hat_offsets = alist(SOUTH = list(0, -9), NORTH = list(0, -2), EAST = list(-8, -6), WEST = list(9, -6))
|
||||
if("Service")
|
||||
hat_offsets = alist(SOUTH = list(0, -7), NORTH = list(0, 1), EAST = list(-8, -4), WEST = list(9, -4))
|
||||
if("Janitor")
|
||||
hat_offsets = alist(SOUTH = list(0, -5), NORTH = list(0, -1), EAST = list(-8, -4), WEST = list(9, -4))
|
||||
if("Noble")
|
||||
can_be_hatted = TRUE
|
||||
can_wear_restricted_hats = TRUE
|
||||
hat_offset_y = 4
|
||||
hat_offsets = alist(SOUTH = list(0, 4), NORTH = list(0, 4), EAST = list(0, 4), WEST = list(0, 4))
|
||||
if("Droid_Medical")
|
||||
can_be_hatted = TRUE
|
||||
can_wear_restricted_hats = TRUE
|
||||
hat_offset_y = 4
|
||||
hat_offsets = alist(SOUTH = list(0, 4), NORTH = list(0, 4), EAST = list(0, 4), WEST = list(0, 4))
|
||||
if("Droid_Mining", "mk2", "mk3")
|
||||
can_be_hatted = TRUE
|
||||
is_centered = TRUE
|
||||
hat_offset_y = 3
|
||||
hat_offsets = alist(SOUTH = list(0, 3), NORTH = list(0, 3), EAST = list(0, 3), WEST = list(0, 3))
|
||||
if("Bloodhound", "Bloodhound_Deathsquad", "syndie_bloodhound", "Bloodhound_Combat")
|
||||
can_be_hatted = TRUE
|
||||
hat_offset_y = 1
|
||||
hat_offsets = alist(SOUTH = list(0, 1), NORTH = list(0, 1), EAST = list(0, 1), WEST = list(0, 1))
|
||||
if("Cricket")
|
||||
can_be_hatted = TRUE
|
||||
hat_offset_y = 2
|
||||
hat_offsets = alist(SOUTH = list(0, 2), NORTH = list(0, 2), EAST = list(0, 2), WEST = list(0, 2))
|
||||
if("Droid_Combat")
|
||||
can_be_hatted = TRUE
|
||||
hat_alpha = 255
|
||||
hat_offset_y = 2
|
||||
hat_offsets = alist(SOUTH = list(0, 2), NORTH = list(0, 2), EAST = list(0, 2), WEST = list(0, 2))
|
||||
if("Droid_Combat_Roll")
|
||||
can_be_hatted = TRUE
|
||||
hat_alpha = 0
|
||||
if("syndi_medi", "surgeon", "toiletbot", "custodiborg")
|
||||
can_be_hatted = TRUE
|
||||
is_centered = TRUE
|
||||
hat_offset_y = 1
|
||||
hat_offsets = alist(SOUTH = list(0, 1), NORTH = list(0, 1), EAST = list(0, 1), WEST = list(0, 1))
|
||||
if("Security", "janitorrobot", "medicalrobot")
|
||||
can_be_hatted = TRUE
|
||||
is_centered = TRUE
|
||||
can_wear_restricted_hats = TRUE
|
||||
hat_offset_y = -1
|
||||
hat_offsets = alist(SOUTH = list(0, -1), NORTH = list(0, -1), EAST = list(0, -1), WEST = list(0, -1))
|
||||
if("Brobot", "Service", "Service2", "robot_old", "securityrobot")
|
||||
can_be_hatted = TRUE
|
||||
is_centered = TRUE
|
||||
can_wear_restricted_hats = TRUE
|
||||
hat_offset_y = -1
|
||||
hat_offsets = alist(SOUTH = list(0, -1), NORTH = list(0, -1), EAST = list(0, -1), WEST = list(0, -1))
|
||||
if("Miner", "lavaland")
|
||||
can_be_hatted = TRUE
|
||||
hat_offset_y = -1
|
||||
hat_offsets = alist(SOUTH = list(0, -1), NORTH = list(0, -1), EAST = list(0, -1), WEST = list(0, -1))
|
||||
if("Standard")
|
||||
can_be_hatted = TRUE
|
||||
hat_offset_y = -3
|
||||
hat_offsets = alist(SOUTH = list(0, -3), NORTH = list(0, -3), EAST = list(0, -3), WEST = list(0, -3))
|
||||
if("Droid")
|
||||
can_be_hatted = TRUE
|
||||
is_centered = TRUE
|
||||
can_wear_restricted_hats = TRUE
|
||||
hat_offset_y = -4
|
||||
hat_offsets = alist(SOUTH = list(0, -4), NORTH = list(0, -4), EAST = list(0, -4), WEST = list(0, -4))
|
||||
if("Landmate", "syndi_engi")
|
||||
can_be_hatted = TRUE
|
||||
hat_offset_y = -7
|
||||
hat_offsets = alist(SOUTH = list(0, -7), NORTH = list(0, -7), EAST = list(0, -7), WEST = list(0, -7))
|
||||
if("Mop_Gear_Rex")
|
||||
can_be_hatted = TRUE
|
||||
hat_offset_y = -6
|
||||
hat_offsets = alist(SOUTH = list(0, -6), NORTH = list(0, -6), EAST = list(0, -6), WEST = list(0, -6))
|
||||
if("Qualified_Doctor")
|
||||
can_be_hatted = TRUE
|
||||
hat_offset_y = 3
|
||||
hat_offsets = alist(SOUTH = list(0, 3), NORTH = list(0, 3), EAST = list(0, 3), WEST = list(0, 3))
|
||||
if("Squat_Miner")
|
||||
can_be_hatted = TRUE
|
||||
if("Coffin_Miner")
|
||||
can_be_hatted = TRUE
|
||||
hat_offset_y = 3
|
||||
hat_offsets = alist(SOUTH = list(0, 3), NORTH = list(0, 3), EAST = list(0, 3), WEST = list(0, 3))
|
||||
if("Heavy_Sec")
|
||||
can_be_hatted = TRUE
|
||||
can_wear_restricted_hats = TRUE
|
||||
@@ -1089,7 +1097,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("Access denied!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
|
||||
if(istype(used, /obj/item/borg/upgrade))
|
||||
var/obj/item/borg/upgrade/U = used
|
||||
if(!opened)
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
)
|
||||
|
||||
var/obj/item/silicon_hat
|
||||
var/hat_offset_y = -3
|
||||
var/hat_offsets = alist(SOUTH = list(0, -3), NORTH = list(0, -3), EAST = list(0, -3), WEST = list(0, -3))
|
||||
/// For cyborgs with wide "heads", when false causes the hat icon to be stretched.
|
||||
var/is_centered = FALSE
|
||||
var/hat_icon_file = 'icons/mob/clothing/head.dmi'
|
||||
@@ -517,9 +517,20 @@
|
||||
if(!(hat_icon_file || hat_icon_state))
|
||||
return
|
||||
var/image/borgI = image(hat_icon_file, hat_icon_state)
|
||||
if(hat_offsets[SOUTH][1] == hat_offsets[NORTH][1] && hat_offsets[SOUTH][1] == hat_offsets[EAST][1] && hat_offsets[SOUTH][1] == hat_offsets[WEST][1] && \
|
||||
hat_offsets[SOUTH][2] == hat_offsets[NORTH][2] && hat_offsets[SOUTH][2] == hat_offsets[EAST][2] && hat_offsets[SOUTH][2] == hat_offsets[WEST][2])
|
||||
borgI.pixel_x = hat_offsets[SOUTH][1]
|
||||
borgI.pixel_y = hat_offsets[SOUTH][2]
|
||||
else
|
||||
var/icon/temp_icon = icon(borgI.icon, borgI.icon_state)
|
||||
for(var/dir in GLOB.cardinal)
|
||||
var/icon/dir_image = icon(borgI.icon, borgI.icon_state)
|
||||
dir_image.Shift(WEST, hat_offsets[dir][1])
|
||||
dir_image.Shift(NORTH, hat_offsets[dir][2])
|
||||
temp_icon.Insert(dir_image, dir = dir)
|
||||
borgI = image(temp_icon)
|
||||
borgI.alpha = hat_alpha
|
||||
borgI.color = hat_color
|
||||
borgI.pixel_y = hat_offset_y
|
||||
if(!is_centered)
|
||||
borgI.transform = matrix(1.125, 0, 0.5, 0, 1, 0)
|
||||
return borgI
|
||||
|
||||
Reference in New Issue
Block a user