Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PORT FEAT] Borg hats #23690

Merged
merged 36 commits into from
Mar 10, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
705c8c2
Initial commit. Adds borg hats.
Dec 26, 2023
c44e1a8
No longer spam update_icons
Dec 27, 2023
e0cb7a1
Remove unused offset update
Dec 27, 2023
fb67dc4
Fixed destroyer borg icons (Fuck it, ship it)
Dec 31, 2023
a1ce9db
Borg hat examine
Jan 9, 2024
3116703
Borg hat examine
Jan 9, 2024
64e9e99
Destroyer borg fixes
Jan 21, 2024
65f0062
Requested fixes
Jan 21, 2024
435b082
Removed weird spacing
Jan 21, 2024
20f0b65
Corgis are not cyborgs
Jan 21, 2024
62f1333
Remove debugging statements
Jan 21, 2024
a0990f5
proc renaming
Jan 21, 2024
70dc5e8
Removed comments
Jan 21, 2024
cce8d04
Added documentation.
Jan 25, 2024
c9d217c
Merge remote-tracking branch 'upstream/master' into Borg-hats
Jan 29, 2024
6ad5860
Merge branch 'Borg-hats' of https://github.com/Adrer/Paradise into Bo…
Jan 29, 2024
7856738
Update code/modules/mob/living/silicon/robot/robot_mob.dm
Adrer Feb 16, 2024
4e6ba96
Update code/modules/mob/living/silicon/silicon_mob.dm
Adrer Feb 16, 2024
349ca59
Added missing sprite offset
Feb 20, 2024
5788ffe
Added comment to robot_module_hat_offset
Feb 25, 2024
a4cb046
Update code/modules/mob/living/silicon/robot/robot_mob.dm
Adrer Feb 26, 2024
ad95673
Changes to stretched_hat
Feb 28, 2024
763ec40
Merge branch 'Borg-hats' of https://github.com/Adrer/Paradise into Bo…
Feb 28, 2024
ae44d5b
Remove unnecessary user check
Feb 28, 2024
d690c8e
Guard clause time
Mar 2, 2024
fe5506c
Update code/modules/mob/living/silicon/silicon_mob.dm
Adrer Mar 3, 2024
06cb896
Update code/modules/mob/living/silicon/robot/drone/maint_drone.dm
Adrer Mar 3, 2024
2c159c2
Moved HOLOGRAM check up
Mar 3, 2024
56ce0a8
Merge branch 'Borg-hats' of https://github.com/Adrer/Paradise into Bo…
Mar 3, 2024
5c57370
Merge remote-tracking branch 'origin/master' into Borg-hats
Mar 3, 2024
528935d
I loathe DMI merge conflicts
Mar 3, 2024
fe708bd
Moved the hologram check even further up.
Mar 3, 2024
2c5792e
Merge remote-tracking branch 'upstream/master' into Borg-hats
Mar 5, 2024
6276e81
Yet more DMI conflicts
Mar 5, 2024
c6252b8
Move borg_icons back
Mar 6, 2024
09fc884
Merge remote-tracking branch 'upstream/master' into Borg-hats
Mar 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions code/modules/mob/living/silicon/ai/ai_mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
//Used with the hotkeys on 2-5 to store locations.
var/list/stored_locations = list()

hat_offset_y = 3
is_centered = TRUE
can_be_hatted = TRUE

/mob/living/silicon/ai/proc/add_ai_verbs()
verbs |= GLOB.ai_verbs_default
verbs |= silicon_subsystems
Expand Down
6 changes: 6 additions & 0 deletions code/modules/mob/living/silicon/robot/drone/maint_drone.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
/// Cooldown for law syncs
var/sync_cooldown = 0

hat_offset_y = -15
is_centered = TRUE
can_be_hatted = TRUE
can_wear_blacklisted_hats = TRUE

Adrer marked this conversation as resolved.
Show resolved Hide resolved
Adrer marked this conversation as resolved.
Show resolved Hide resolved
// We need to keep track of a few module items so we don't need to do list operations
// every time we need them. These get set in New() after the module is chosen.
var/obj/item/stack/sheet/metal/cyborg/stack_metal = null
Expand Down Expand Up @@ -126,6 +131,7 @@
overlays += "eyes-[icon_state]"
else
overlays -= "eyes"
hat_icons()

/mob/living/silicon/robot/drone/pick_module()
return
Expand Down
10 changes: 4 additions & 6 deletions code/modules/mob/living/silicon/robot/robot_inventory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -169,21 +169,20 @@
inv2.icon_state = "inv2"
inv3.icon_state = "inv3"
module_active = module_state_1
return
if(2)
if(module_active != module_state_2)
inv1.icon_state = "inv1"
inv2.icon_state = "inv2 +a"
inv3.icon_state = "inv3"
module_active = module_state_2
return
if(3)
if(module_active != module_state_3)
inv1.icon_state = "inv1"
inv2.icon_state = "inv2"
inv3.icon_state = "inv3 +a"
module_active = module_state_3
return
update_icons()

return
Adrer marked this conversation as resolved.
Show resolved Hide resolved

//deselect_module(module) - Deselects the module slot specified by "module"
Expand All @@ -195,17 +194,16 @@
if(module_active == module_state_1)
inv1.icon_state = "inv1"
module_active = null
return
if(2)
if(module_active == module_state_2)
inv2.icon_state = "inv2"
module_active = null
return
if(3)
if(module_active == module_state_3)
inv3.icon_state = "inv3"
module_active = null
return
update_icons()

return
Adrer marked this conversation as resolved.
Show resolved Hide resolved

//toggle_module(module) - Toggles the selection of the module slot specified by "module".
Expand Down
1 change: 0 additions & 1 deletion code/modules/mob/living/silicon/robot/robot_life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@
module_state_2:screen_loc = ui_inv2
if(module_state_3)
module_state_3:screen_loc = ui_inv3
update_icons()

/mob/living/silicon/robot/proc/process_locks()
if(weapon_lock)
Expand Down
19 changes: 16 additions & 3 deletions code/modules/mob/living/silicon/robot/robot_mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
scanner.Grant(src)
RegisterSignal(src, COMSIG_MOVABLE_MOVED, PROC_REF(create_trail))

robot_module_hat_offset(icon_state)

/mob/living/silicon/robot/get_radio()
return radio

Expand Down Expand Up @@ -512,6 +514,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
custom_panel = trim(names[1])

update_module_icon()
robot_module_hat_offset(icon_state)
update_icons()
SSblackbox.record_feedback("tally", "cyborg_modtype", 1, "[lowertext(selected_module)]")
notify_ai(2)
Expand All @@ -538,6 +541,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
radio.recalculateChannels()
custom_panel = null

robot_module_hat_offset(icon_state)
update_icons()
update_headlamp()

Expand All @@ -556,6 +560,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(

status_flags |= CANPUSH


//for borg hotkeys, here module refers to borg inv slot, not core module
/mob/living/silicon/robot/verb/cmd_toggle_module(module as num)
set name = "Toggle Module"
Expand Down Expand Up @@ -1089,6 +1094,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(

/mob/living/silicon/robot/update_icons()
overlays.Cut()
borg_icons()
Adrer marked this conversation as resolved.
Show resolved Hide resolved
if(stat != DEAD && !(IsParalyzed() || IsStunned() || IsWeakened() || low_power_mode)) //Not dead, not stunned.
if(custom_panel in custom_eye_names)
overlays += "eyes-[custom_panel]"
Expand All @@ -1108,7 +1114,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
overlays += "[panelprefix]-openpanel +c"
else
overlays += "[panelprefix]-openpanel -c"
borg_icons()
hat_icons()
update_fire()

/mob/living/silicon/robot/proc/borg_icons() // Exists so that robot/destroyer can override it
Expand Down Expand Up @@ -1239,6 +1245,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
if(cell) //Sanity check.
cell.forceMove(T)
cell = null
drop_hat()
qdel(src)

#define CAMERA_UPDATE_COOLDOWN 2.5 SECONDS
Expand Down Expand Up @@ -1594,8 +1601,6 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
set category = "Robot Commands"
set name = "Power Warning"



if(!is_component_functioning("power cell") || !cell || !cell.charge)
if(!start_audio_emote_cooldown(TRUE, 10 SECONDS))
to_chat(src, "<span class='warning'>The low-power capacitor for your speaker system is still recharging, please try again later.</span>")
Expand All @@ -1610,3 +1615,11 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
if(emagged || ("syndicate" in faction))
return TRUE
return FALSE

/datum/emote/flip/run_emote(mob/user, params, type_override, intentional)
. = ..()
if(isrobot(user))
var/mob/living/silicon/robot/borg = user
if(borg.drop_hat())
borg.visible_message("<span class='warning'><span class='name'>[src]</span> drops their hat!</span>",
"<span class='warning'>Your hat falls off!</span></span>")
Adrer marked this conversation as resolved.
Show resolved Hide resolved
Loading