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

Мека-борги #13732

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions code/game/objects/items/robot/robot_upgrades.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
return 0

R.uneq_all()
R.icon = 'icons/mob/robots.dmi'
R.icon_state = "robot"
clearlist(R.module.channels)
qdel(R.module)
Expand Down
20 changes: 20 additions & 0 deletions code/modules/mob/living/silicon/robot/robot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@
return

var/module_sprites[0] //Used to store the associations between sprite names and sprite index.
var/meka_module_sprites[0] //Used to store the associations between sprite names and sprite index.
if(module)
return

Expand All @@ -225,6 +226,8 @@
module_sprites["Acheron"] = "mechoid-Service"
module_sprites["Kodiak"] = "kodiak-service"
module_sprites["Maid"] = "kerfusMaid"
meka_module_sprites["Female"] = "fmekaserv"
meka_module_sprites["Male"] = "mmekaserv"

if("Science")
module = new /obj/item/weapon/robot_module/science(src)
Expand All @@ -247,6 +250,8 @@
module_sprites["Drone"] = "drone-miner"
module_sprites["Acheron"] = "mechoid-Miner"
module_sprites["Kodiak"] = "kodiak-miner"
meka_module_sprites["Female"] = "fmekamine"
meka_module_sprites["Male"] = "mmekamine"
give_hud(DATA_HUD_MINER)

if("Medical")
Expand All @@ -261,6 +266,8 @@
module_sprites["Drone Red"] = "drone-surgery"
module_sprites["Drone Green"] = "drone-medical"
module_sprites["Acheron"] = "mechoid-Medical"
meka_module_sprites["Female"] = "fmekamed"
meka_module_sprites["Male"] = "mmekamed"

if("Security")
if(can_be_security)
Expand All @@ -277,6 +284,8 @@
module_sprites["Acheron"] = "mechoid-Security"
module_sprites["Kodiak"] = "kodiak-sec"
module_sprites["NO ERP"] = "kerfusNoERP"
meka_module_sprites["Female"] = "fmekasec"
meka_module_sprites["Male"] = "mmekasec"
else
to_chat(src, "<span class='warning'>#Error: Safety Protocols enabled. Security module is not allowed.</span>")
return
Expand All @@ -295,6 +304,8 @@
module_sprites["Acheron"] = "mechoid-Engineering"
module_sprites["Kodiak"] = "kodiak-eng"
module_sprites["Flushed"] = "kerfusFlushed"
meka_module_sprites["Female"] = "fmekaeng"
meka_module_sprites["Male"] = "mmekaeng"

if("Janitor")
module = new /obj/item/weapon/robot_module/janitor(src)
Expand All @@ -303,6 +314,8 @@
module_sprites["Mop Gear Rex"] = "mopgearrex"
module_sprites["Drone"] = "drone-janitor"
module_sprites["Acheron"] = "mechoid-Janitor"
meka_module_sprites["Female"] = "fmekajani"
meka_module_sprites["Male"] = "mmekajani"

if("PeaceKeeper")
if(!can_be_security)
Expand All @@ -312,6 +325,8 @@
module_sprites["Marina"] = "marina-peace"
module_sprites["Sleak"] = "sleek-peace"
module_sprites["Nanotrasen"] = "kerfusNT"
meka_module_sprites["Female"] = "fmekapeace"
meka_module_sprites["Male"] = "mmekapeace"

if("Combat")
build_combat_borg()
Expand All @@ -329,12 +344,17 @@

for(var/name in module_sprites)
choose_icon[name] = image(icon = 'icons/mob/robots.dmi', icon_state = module_sprites[name])
for(var/name in meka_module_sprites)
choose_icon[name] = image(icon = 'icons/mob/tallrobots.dmi', icon_state = meka_module_sprites[name])

// Default skin of module
icon_state = module_sprites[pick(module_sprites)]
var/new_icon_state = show_radial_menu(usr, usr, choose_icon, radius = 50, tooltips = TRUE)
if(new_icon_state)
icon_state = module_sprites[new_icon_state]
if(!icon_state)
icon = 'icons/mob/tallrobots.dmi'
icon_state = meka_module_sprites[new_icon_state]

radio.config(module.channels)
radio.recalculateChannels()
Expand Down
Binary file added icons/mob/tallrobots.dmi
Binary file not shown.
Loading