forked from tgstation/tgstation
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c07b7e8
commit 26c5fe3
Showing
22 changed files
with
417 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/// Resting for borgs, especially if we ever get more than one type | ||
#define ROBOT_REST_NORMAL 1 | ||
|
||
/// Features that a specific borg skin has | ||
#define SKIN_FEATURES "skin_features" | ||
|
||
// Icon file locations for modular borg icons | ||
/// Medical | ||
#define CYBORG_ICON_MED_TALL 'modular_doppler/big_borg_lmao/icons/tallrobot_med.dmi' | ||
/// Engineer | ||
#define CYBORG_ICON_ENG_TALL 'modular_doppler/big_borg_lmao/icons/tallrobot_eng.dmi' | ||
/// Peacekeeper | ||
#define CYBORG_ICON_PEACEKEEPER_TALL 'modular_doppler/big_borg_lmao/icons/tallrobot_pk.dmi' | ||
/// Service | ||
#define CYBORG_ICON_SERVICE_TALL 'modular_doppler/big_borg_lmao/icons/tallrobot_serv.dmi' | ||
/// Service | ||
#define CYBORG_ICON_MINING_TALL 'modular_doppler/big_borg_lmao/icons/tallrobot_mine.dmi' | ||
/// Janitor | ||
#define CYBORG_ICON_JANI_TALL 'modular_doppler/big_borg_lmao/icons/tallrobot_jani.dmi' | ||
/// Evil | ||
#define CYBORG_ICON_SYNDIE_TALL 'modular_doppler/big_borg_lmao/icons/tallrobot_syndi.dmi' | ||
/// Ninja (Evil) | ||
#define CYBORG_ICON_NINJA_TALL 'modular_doppler/big_borg_lmao/icons/tallrobot_ninja.dmi' | ||
|
||
//Defines for model features, set in the model_features list of a robot model datum. Are they a dogborg? Is the model small? etc. | ||
/// Cyborgs with unique sprites for when they get totally broken down. | ||
#define TRAIT_R_UNIQUEWRECK "unique_wreck" | ||
/// Or when tipped over. | ||
#define TRAIT_R_UNIQUETIP "unique_tip" | ||
/// 32x64 skins | ||
#define TRAIT_R_TALL "tall_borg" | ||
/// Any model small enough to reject the shrinker upgrade. | ||
#define TRAIT_R_SMALL "small_chassis" | ||
/// Any model that has a custom front panel | ||
#define TRAIT_R_UNIQUEPANEL "unique_openpanel" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
/mob/living/silicon/robot/Moved(atom/old_loc, movement_dir, forced, list/old_locs, momentum_change = TRUE) | ||
. = ..() | ||
if(robot_resting) | ||
robot_resting = FALSE | ||
on_standing_up() | ||
update_icons() | ||
|
||
/mob/living/silicon/robot/toggle_resting() | ||
robot_lay_down() | ||
|
||
/mob/living/silicon/robot/on_lying_down(new_lying_angle) | ||
if(layer == initial(layer)) //to avoid things like hiding larvas. | ||
layer = LYING_MOB_LAYER //so mob lying always appear behind standing mobs | ||
density = FALSE // We lose density and stop bumping passable dense things. | ||
if(model && model.model_features && (TRAIT_R_TALL in model.model_features)) | ||
maptext_height = 32 //Offset base chat-height value | ||
// Resting effects | ||
var/turf/sit_pos = get_turf(src) | ||
var/obj/structure/table/tabled = locate(/obj/structure/table) in sit_pos.contents | ||
if(!tabled) | ||
new /obj/effect/temp_visual/mook_dust/robot(get_turf(src)) | ||
playsound(src, 'modular_doppler/big_borg_lmao/sounds/robot_sit.ogg', 25, TRUE) | ||
return | ||
else | ||
new /obj/effect/temp_visual/mook_dust/robot/table(get_turf(src)) | ||
playsound(src, 'modular_doppler/big_borg_lmao/sounds/robot_bump.ogg', 50, TRUE) | ||
var/list/items_to_move = list() | ||
for(var/obj/item/gen_item in sit_pos.contents) | ||
if(!gen_item.anchored) | ||
items_to_move += gen_item | ||
if(items_to_move.len >= 8) | ||
break | ||
for(var/obj/item/table_contents in items_to_move) | ||
table_contents.throw_at(get_ranged_target_turf(table_contents, pick(GLOB.cardinals), range = 1), range = 1, speed = 1) | ||
|
||
/mob/living/silicon/robot/on_standing_up() | ||
if(layer == LYING_MOB_LAYER) | ||
layer = initial(layer) | ||
density = initial(density) // We were prone before, so we become dense and things can bump into us again. | ||
if(model && model.model_features && (TRAIT_R_TALL in model.model_features)) | ||
maptext_height = 48 //Offset value of tallborgs | ||
|
||
/mob/living/silicon/robot/proc/rest_style() | ||
set name = "Switch Rest Style" | ||
set category = "AI Commands" | ||
set desc = "Select your resting pose." | ||
if(!can_rest()) | ||
to_chat(src, span_warning("You can't do that!")) | ||
return | ||
robot_resting = ROBOT_REST_NORMAL | ||
on_lying_down() | ||
update_icons() | ||
|
||
/mob/living/silicon/robot/proc/robot_lay_down() | ||
set name = "Lay down" | ||
set category = "AI Commands" | ||
if(!can_rest()) | ||
to_chat(src, span_warning("You can't do that!")) | ||
return | ||
if(stat != CONSCIOUS) //Make sure we don't enable movement when not concious | ||
return | ||
if(robot_resting) | ||
to_chat(src, span_notice("You are now getting up.")) | ||
robot_resting = FALSE | ||
mobility_flags = MOBILITY_FLAGS_DEFAULT | ||
on_standing_up() | ||
else | ||
to_chat(src, span_notice("You are now laying down.")) | ||
robot_resting = robot_rest_style | ||
on_lying_down() | ||
update_icons() | ||
|
||
/mob/living/silicon/robot/update_resting() | ||
. = ..() | ||
if(can_rest()) | ||
robot_resting = FALSE | ||
update_icons() | ||
|
||
/mob/living/silicon/robot/update_module_innate() | ||
..() | ||
if(hands) | ||
hands.icon = (model.model_select_alternate_icon ? model.model_select_alternate_icon : initial(hands.icon)) | ||
|
||
/** | ||
* Safe check of the cyborg's model_features list. | ||
* | ||
* model_features is defined in modular_nova\modules\altborgs\code\modules\mob\living\silicon\robot\robot_model.dm. | ||
*/ | ||
/mob/living/silicon/robot/proc/can_rest() | ||
if(model && model.model_features && (TRAIT_R_TALL in model.model_features)) | ||
if(TRAIT_IMMOBILIZED in _status_traits) | ||
return FALSE | ||
return TRUE | ||
return FALSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/mob/living/silicon/robot | ||
var/robot_resting = FALSE | ||
var/robot_rest_style = ROBOT_REST_NORMAL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
/obj/item/robot_model | ||
var/icon/cyborg_icon_override | ||
var/sleeper_overlay | ||
var/cyborg_pixel_offset | ||
/// Alternate icon file used for this module's collapsed UI icon | ||
var/model_select_alternate_icon | ||
/// Traits unique to this model, i.e. having a unique dead sprite, being wide or being small enough to reject shrinker modules. Leverages defines in code\__DEFINES\~nova_defines\robot_defines.dm | ||
/// If a sprite overlaps above the standard height, ensure it is not overlapping icons in the selector wheel. | ||
var/list/model_features = list() | ||
|
||
/obj/item/robot_model/proc/update_tallborg() | ||
var/mob/living/silicon/robot/cyborg = robot || loc | ||
if (!istype(robot)) | ||
return | ||
if (model_features && (TRAIT_R_TALL in model_features)) | ||
cyborg.maptext_height = 48 //Runechat blabla | ||
cyborg.AddElement(/datum/element/footstep, FOOTSTEP_MOB_SHOE, 2, -6, sound_vary = TRUE) | ||
add_verb(cyborg, /mob/living/silicon/robot/proc/robot_lay_down) | ||
switch(cyborg_base_icon) | ||
if("mekamine") | ||
cyborg.AddComponent(/datum/component/robot_smoke) | ||
else | ||
cyborg.maptext_height = initial(cyborg.maptext_height) | ||
cyborg.RemoveElement(/datum/element/footstep, FOOTSTEP_MOB_SHOE, 2, -6, sound_vary = TRUE) | ||
remove_verb(cyborg, /mob/living/silicon/robot/proc/robot_lay_down) | ||
if(cyborg.GetComponent(/datum/component/robot_smoke)) | ||
qdel(cyborg.GetComponent(/datum/component/robot_smoke)) | ||
QDEL_NULL(cyborg.particles) // Removing left over particles | ||
|
||
// STANDARD | ||
/obj/item/robot_model/standard | ||
name = "Standard" | ||
borg_skins = list( | ||
"Default" = list(SKIN_ICON_STATE = "robot", SKIN_FEATURES = list(TRAIT_R_SMALL)), | ||
) | ||
|
||
// SERVICE | ||
/obj/item/robot_model/service | ||
special_light_key = null | ||
borg_skins = list( | ||
/// 32x32 Skins | ||
"Waitress" = list(SKIN_ICON_STATE = "service_f", SKIN_LIGHT_KEY = "service"), | ||
"Butler" = list(SKIN_ICON_STATE = "service_m", SKIN_LIGHT_KEY = "service"), | ||
"Bro" = list(SKIN_ICON_STATE = "brobot", SKIN_LIGHT_KEY = "service"), | ||
"Tophat" = list(SKIN_ICON_STATE = "tophat", SKIN_HAT_OFFSET = INFINITY), | ||
"Kent" = list(SKIN_ICON_STATE = "kent", SKIN_LIGHT_KEY = "medical", SKIN_HAT_OFFSET = 3), | ||
"Can" = list(SKIN_ICON_STATE = "kent", SKIN_LIGHT_KEY = "medical", SKIN_HAT_OFFSET = 3), | ||
/// 32x64 skins | ||
"Meka" = list(SKIN_ICON_STATE = "mekaserve", SKIN_ICON = CYBORG_ICON_SERVICE_TALL, SKIN_FEATURES = list(TRAIT_R_UNIQUEWRECK, TRAIT_R_UNIQUETIP, TRAIT_R_TALL), SKIN_HAT_OFFSET = 15), | ||
"Meka (Alt)" = list(SKIN_ICON_STATE = "mekaserve_alt", SKIN_LIGHT_KEY = "mekaserve", SKIN_ICON = CYBORG_ICON_SERVICE_TALL, SKIN_FEATURES = list(TRAIT_R_UNIQUEWRECK, TRAIT_R_UNIQUETIP, TRAIT_R_TALL), SKIN_HAT_OFFSET = 15), | ||
"NiKA" = list(SKIN_ICON_STATE = "fmekaserv", SKIN_ICON = CYBORG_ICON_SERVICE_TALL, SKIN_FEATURES = list(TRAIT_R_UNIQUEWRECK, TRAIT_R_UNIQUETIP, TRAIT_R_TALL), SKIN_HAT_OFFSET = 15), | ||
"NiKO" = list(SKIN_ICON_STATE = "mmekaserv", SKIN_ICON = CYBORG_ICON_SERVICE_TALL, SKIN_FEATURES = list(TRAIT_R_UNIQUEWRECK, TRAIT_R_UNIQUETIP, TRAIT_R_TALL), SKIN_HAT_OFFSET = 15), | ||
) | ||
|
||
// MINING | ||
/obj/item/robot_model/miner | ||
special_light_key = null | ||
borg_skins = list( | ||
/// 32x32 Skins | ||
"Lavaland" = list(SKIN_ICON_STATE = "miner", SKIN_LIGHT_KEY = "miner"), | ||
"Asteroid" = list(SKIN_ICON_STATE = "minerOLD", SKIN_LIGHT_KEY = "miner"), | ||
"Spider Miner" = list(SKIN_ICON_STATE = "spidermin", SKIN_LIGHT_KEY = "miner"), | ||
/// 32x64 skins | ||
"Meka" = list(SKIN_ICON_STATE = "mekamine", SKIN_ICON = CYBORG_ICON_MINING_TALL, SKIN_FEATURES = list(TRAIT_R_UNIQUEWRECK, TRAIT_R_UNIQUETIP, TRAIT_R_TALL), SKIN_HAT_OFFSET = 15), | ||
"K4T (Rookie)" = list(SKIN_ICON_STATE = "k4tmine", SKIN_ICON = CYBORG_ICON_MINING_TALL, SKIN_FEATURES = list(TRAIT_R_UNIQUEWRECK, TRAIT_R_UNIQUETIP, TRAIT_R_TALL), SKIN_HAT_OFFSET = 15), | ||
"K4T (Veteran)" = list(SKIN_ICON_STATE = "k4tmine_alt1", SKIN_ICON = CYBORG_ICON_MINING_TALL, SKIN_FEATURES = list(TRAIT_R_UNIQUEWRECK, TRAIT_R_UNIQUETIP, TRAIT_R_TALL), SKIN_HAT_OFFSET = 15), | ||
"NiKA" = list(SKIN_ICON_STATE = "fmekamine", SKIN_ICON = CYBORG_ICON_MINING_TALL, SKIN_FEATURES = list(TRAIT_R_UNIQUEWRECK, TRAIT_R_UNIQUETIP, TRAIT_R_TALL), SKIN_HAT_OFFSET = 15), | ||
"NiKO" = list(SKIN_ICON_STATE = "mmekamine", SKIN_ICON = CYBORG_ICON_MINING_TALL, SKIN_FEATURES = list(TRAIT_R_UNIQUEWRECK, TRAIT_R_UNIQUETIP, TRAIT_R_TALL), SKIN_HAT_OFFSET = 15) | ||
) | ||
|
||
// CLOWN | ||
/obj/item/robot_model/clown | ||
borg_skins = list( | ||
"Default" = list(SKIN_ICON_STATE = "clown"), | ||
) | ||
|
||
// ENGINEERING | ||
/obj/item/robot_model/engineering | ||
borg_skins = list( | ||
/// 32x32 Skins | ||
"Default" = list(SKIN_ICON_STATE = "engineer", SKIN_FEATURES = list(TRAIT_R_SMALL)), | ||
/// 32x64 Skins | ||
"Meka" = list(SKIN_ICON_STATE = "mekaengi", SKIN_ICON = CYBORG_ICON_ENG_TALL, SKIN_FEATURES = list(TRAIT_R_UNIQUEWRECK, TRAIT_R_UNIQUETIP, TRAIT_R_TALL), SKIN_HAT_OFFSET = 15), | ||
"NiKA" = list(SKIN_ICON_STATE = "fmekaeng", SKIN_ICON = CYBORG_ICON_ENG_TALL, SKIN_FEATURES = list(TRAIT_R_UNIQUEWRECK, TRAIT_R_UNIQUETIP, TRAIT_R_TALL), SKIN_HAT_OFFSET = 15), | ||
"NiKO" = list(SKIN_ICON_STATE = "mmekaeng", SKIN_ICON = CYBORG_ICON_ENG_TALL, SKIN_FEATURES = list(TRAIT_R_UNIQUEWRECK, TRAIT_R_UNIQUETIP, TRAIT_R_TALL), SKIN_HAT_OFFSET = 15) | ||
) | ||
|
||
// JANITOR | ||
/obj/item/robot_model/janitor | ||
borg_skins = list( | ||
/// 32x32 Skins | ||
"Default" = list(SKIN_ICON_STATE = "janitor"), | ||
/// 32x64 Skins | ||
"Meka" = list(SKIN_ICON_STATE = "mekajani", SKIN_ICON = CYBORG_ICON_JANI_TALL, SKIN_FEATURES = list(TRAIT_R_UNIQUEWRECK, TRAIT_R_UNIQUETIP, TRAIT_R_TALL), SKIN_HAT_OFFSET = 15), | ||
"NiKA" = list(SKIN_ICON_STATE = "fmekajani", SKIN_ICON = CYBORG_ICON_JANI_TALL, SKIN_FEATURES = list(TRAIT_R_UNIQUEWRECK, TRAIT_R_UNIQUETIP, TRAIT_R_TALL), SKIN_HAT_OFFSET = 15), | ||
"NiKO" = list(SKIN_ICON_STATE = "mmekajani", SKIN_ICON = CYBORG_ICON_JANI_TALL, SKIN_FEATURES = list(TRAIT_R_UNIQUEWRECK, TRAIT_R_UNIQUETIP, TRAIT_R_TALL), SKIN_HAT_OFFSET = 15) | ||
) | ||
|
||
// MEDICAL | ||
/obj/item/robot_model/medical | ||
borg_skins = list( | ||
/// 32x32 Skins | ||
"Machinified Doctor" = list(SKIN_ICON_STATE = "medical", SKIN_TRAITS = list(TRAIT_R_SMALL)), | ||
"Qualified Doctor" = list(SKIN_ICON_STATE = "qualified_doctor"), | ||
/// 32x64 Skins | ||
"Meka" = list(SKIN_ICON_STATE = "mekamed", SKIN_ICON = CYBORG_ICON_MED_TALL, SKIN_FEATURES = list(TRAIT_R_UNIQUEWRECK, TRAIT_R_UNIQUETIP, TRAIT_R_TALL), SKIN_HAT_OFFSET = 15), | ||
"K4T (Doc)" = list(SKIN_ICON_STATE = "k4tmed", SKIN_ICON = CYBORG_ICON_MED_TALL, SKIN_FEATURES = list(TRAIT_R_UNIQUEWRECK, TRAIT_R_UNIQUETIP, TRAIT_R_TALL), SKIN_HAT_OFFSET = 15), | ||
"K4T (Field Medic)" = list(SKIN_ICON_STATE = "k4tmed_alt1", SKIN_ICON = CYBORG_ICON_MED_TALL, SKIN_FEATURES = list(TRAIT_R_UNIQUEWRECK, TRAIT_R_UNIQUETIP, TRAIT_R_TALL), SKIN_HAT_OFFSET = 15), | ||
"NiKA" = list(SKIN_ICON_STATE = "fmekamed", SKIN_ICON = CYBORG_ICON_MED_TALL, SKIN_FEATURES = list(TRAIT_R_UNIQUEWRECK, TRAIT_R_UNIQUETIP, TRAIT_R_TALL), SKIN_HAT_OFFSET = 15), | ||
"NiKO" = list(SKIN_ICON_STATE = "mmekamed", SKIN_ICON = CYBORG_ICON_MED_TALL, SKIN_FEATURES = list(TRAIT_R_UNIQUEWRECK, TRAIT_R_UNIQUETIP, TRAIT_R_TALL), SKIN_HAT_OFFSET = 15) | ||
) | ||
|
||
// PEACEKEEPER | ||
/obj/item/robot_model/peacekeeper | ||
borg_skins = list( | ||
/// 32x32 Skins | ||
"Default" = list(SKIN_ICON_STATE = "peace"), | ||
/// 32x64 Skins | ||
"Meka" = list(SKIN_ICON_STATE = "mekapeace", SKIN_ICON = CYBORG_ICON_PEACEKEEPER_TALL, SKIN_FEATURES = list(TRAIT_R_UNIQUEWRECK, TRAIT_R_UNIQUETIP, TRAIT_R_TALL), SKIN_HAT_OFFSET = 15), | ||
"NiKA" = list(SKIN_ICON_STATE = "fmekapeace", SKIN_ICON = CYBORG_ICON_PEACEKEEPER_TALL, SKIN_FEATURES = list(TRAIT_R_UNIQUEWRECK, TRAIT_R_UNIQUETIP, TRAIT_R_TALL), SKIN_HAT_OFFSET = 15), | ||
"NiKO" = list(SKIN_ICON_STATE = "mmekapeace", SKIN_ICON = CYBORG_ICON_PEACEKEEPER_TALL, SKIN_FEATURES = list(TRAIT_R_UNIQUEWRECK, TRAIT_R_UNIQUETIP, TRAIT_R_TALL), SKIN_HAT_OFFSET = 15) | ||
) | ||
|
||
// SECURITY | ||
/obj/item/robot_model/security | ||
borg_skins = list( | ||
/// 32x32 Skins | ||
"Default" = list(SKIN_ICON_STATE = "sec"), | ||
) |
Oops, something went wrong.