diff --git a/_maps/shuttles/emergency_bar.dmm b/_maps/shuttles/emergency_bar.dmm index de6fad40387..e547390ded9 100644 --- a/_maps/shuttles/emergency_bar.dmm +++ b/_maps/shuttles/emergency_bar.dmm @@ -239,7 +239,7 @@ /turf/open/floor/iron/grimy, /area/shuttle/escape) "aX" = ( -/mob/living/simple_animal/drone/snowflake/bardrone, +/mob/living/basic/drone/snowflake/bardrone, /obj/effect/turf_decal/tile/bar/opposingcorners, /turf/open/floor/iron, /area/shuttle/escape) diff --git a/_maps/shuttles/emergency_cruise.dmm b/_maps/shuttles/emergency_cruise.dmm index 804157a5cba..34c10f53043 100644 --- a/_maps/shuttles/emergency_cruise.dmm +++ b/_maps/shuttles/emergency_cruise.dmm @@ -359,7 +359,7 @@ /turf/open/floor/wood, /area/shuttle/escape) "xb" = ( -/mob/living/simple_animal/drone/snowflake/bardrone, +/mob/living/basic/drone/snowflake/bardrone, /turf/open/floor/wood, /area/shuttle/escape) "xf" = ( diff --git a/_maps/shuttles/emergency_rollerdome.dmm b/_maps/shuttles/emergency_rollerdome.dmm index 39aee0644e7..e69b616dc6e 100644 --- a/_maps/shuttles/emergency_rollerdome.dmm +++ b/_maps/shuttles/emergency_rollerdome.dmm @@ -419,7 +419,7 @@ /turf/open/floor/eighties, /area/shuttle/escape) "Zf" = ( -/mob/living/simple_animal/drone/snowflake/bardrone, +/mob/living/basic/drone/snowflake/bardrone, /turf/open/floor/wood/parquet, /area/shuttle/escape) "Zo" = ( diff --git a/code/__DEFINES/dcs/signals/signals_object.dm b/code/__DEFINES/dcs/signals/signals_object.dm index 4521360d039..4998f10849e 100644 --- a/code/__DEFINES/dcs/signals/signals_object.dm +++ b/code/__DEFINES/dcs/signals/signals_object.dm @@ -136,6 +136,8 @@ #define COMSIG_ITEM_PICKUP "item_pickup" ///from base of obj/item/on_outfit_equip(): (mob/equipper, visuals_only, slot) #define COMSIG_ITEM_EQUIPPED_AS_OUTFIT "item_equip_as_outfit" +///from base of datum/storage/attempt_insert(): () +#define COMSIG_ITEM_STORED "item_stored" ///from base of obj/item/apply_fantasy_bonuses(): (bonus) #define COMSIG_ITEM_APPLY_FANTASY_BONUSES "item_apply_fantasy_bonuses" @@ -250,7 +252,7 @@ /// Called on component/uplink/OnAttackBy(..) #define COMSIG_ITEM_ATTEMPT_TC_REIMBURSE "item_attempt_tc_reimburse" -///Called when a holoparasite/guardiancreator is used. +///Called when a holoparasite/guardiancreator is used. #define COMSIG_TRAITOR_ITEM_USED(type) "traitor_item_used_[type]" // /obj/item/clothing signals diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index f8f91ebaa47..eebcf24d8e3 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -171,7 +171,7 @@ GLOBAL_LIST_INIT(turfs_pass_meteor, typecacheof(list( #define isslime(A) (istype(A, /mob/living/simple_animal/slime)) -#define isdrone(A) (istype(A, /mob/living/simple_animal/drone)) +#define isdrone(A) (istype(A, /mob/living/basic/drone)) #define iscat(A) (istype(A, /mob/living/simple_animal/pet/cat)) diff --git a/code/_globalvars/phobias.dm b/code/_globalvars/phobias.dm index b37c61bc681..494d8c1a726 100644 --- a/code/_globalvars/phobias.dm +++ b/code/_globalvars/phobias.dm @@ -65,9 +65,9 @@ GLOBAL_LIST_INIT(phobia_mobs, list( /mob/living/simple_animal/parrot, )), "conspiracies" = typecacheof(list( - /mob/living/simple_animal/bot/secbot, - /mob/living/simple_animal/drone, + /mob/living/basic/drone, /mob/living/basic/pet/penguin, + /mob/living/simple_animal/bot/secbot, )), "doctors" = typecacheof(list(/mob/living/simple_animal/bot/medbot)), "heresy" = typecacheof(list( @@ -79,10 +79,10 @@ GLOBAL_LIST_INIT(phobia_mobs, list( )), "lizards" = typecacheof(list(/mob/living/basic/lizard)), "robots" = typecacheof(list( + /mob/living/basic/drone, /mob/living/silicon/ai, /mob/living/silicon/robot, /mob/living/simple_animal/bot, - /mob/living/simple_animal/drone, )), "security" = typecacheof(list(/mob/living/simple_animal/bot/secbot)), "spiders" = typecacheof(list(/mob/living/basic/spider/giant)), diff --git a/code/_onclick/hud/drones.dm b/code/_onclick/hud/drones.dm index 1cb8ade6311..ad3604a19e7 100644 --- a/code/_onclick/hud/drones.dm +++ b/code/_onclick/hud/drones.dm @@ -29,19 +29,17 @@ /datum/hud/dextrous/drone/persistent_inventory_update() if(!mymob) return - var/mob/living/simple_animal/drone/D = mymob + var/mob/living/basic/drone/drone = mymob if(hud_shown) - if(D.internal_storage) - D.internal_storage.screen_loc = ui_drone_storage - D.client.screen += D.internal_storage - if(D.head) - D.head.screen_loc = ui_drone_head - D.client.screen += D.head + if(!isnull(drone.internal_storage)) + drone.internal_storage.screen_loc = ui_drone_storage + drone.client.screen += drone.internal_storage + if(!isnull(drone.head)) + drone.head.screen_loc = ui_drone_head + drone.client.screen += drone.head else - if(D.internal_storage) - D.internal_storage.screen_loc = null - if(D.head) - D.head.screen_loc = null + drone.internal_storage?.screen_loc = null + drone.head?.screen_loc = null ..() diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index edbfe5b3251..46ca2f53904 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -263,14 +263,14 @@ Drones */ -/mob/living/simple_animal/drone/resolve_unarmed_attack(atom/attack_target, proximity_flag, list/modifiers) +/mob/living/basic/drone/resolve_unarmed_attack(atom/attack_target, proximity_flag, list/modifiers) attack_target.attack_drone(src, modifiers) -/mob/living/simple_animal/drone/resolve_right_click_attack(atom/target, list/modifiers) +/mob/living/basic/drone/resolve_right_click_attack(atom/target, list/modifiers) return target.attack_drone_secondary(src, modifiers) /// Defaults to attack_hand. Override it when you don't want drones to do same stuff as humans. -/atom/proc/attack_drone(mob/living/simple_animal/drone/user, list/modifiers) +/atom/proc/attack_drone(mob/living/basic/drone/user, list/modifiers) attack_hand(user, modifiers) /** @@ -278,7 +278,7 @@ * Defaults to attack_hand_secondary. * When overriding it, remember that it ought to return a SECONDARY_ATTACK_* value. */ -/atom/proc/attack_drone_secondary(mob/living/simple_animal/drone/user, list/modifiers) +/atom/proc/attack_drone_secondary(mob/living/basic/drone/user, list/modifiers) return attack_hand_secondary(user, modifiers) /* diff --git a/code/datums/components/holderloving.dm b/code/datums/components/holderloving.dm index 0d2a5c4b3d9..0670fa6086e 100644 --- a/code/datums/components/holderloving.dm +++ b/code/datums/components/holderloving.dm @@ -37,6 +37,7 @@ COMSIG_ITEM_EQUIPPED, COMSIG_ATOM_ENTERED, COMSIG_ATOM_EXITED, + COMSIG_ITEM_STORED, ), PROC_REF(check_my_loc)) /datum/component/holderloving/UnregisterFromParent() @@ -46,6 +47,7 @@ COMSIG_ITEM_EQUIPPED, COMSIG_ATOM_ENTERED, COMSIG_ATOM_EXITED, + COMSIG_ITEM_STORED, )) /datum/component/holderloving/PostTransfer() diff --git a/code/datums/saymode.dm b/code/datums/saymode.dm index 52e22aeaef8..e2425ce92b1 100644 --- a/code/datums/saymode.dm +++ b/code/datums/saymode.dm @@ -77,8 +77,8 @@ /datum/saymode/binary/handle_message(mob/living/user, message, datum/language/language) if(isdrone(user)) - var/mob/living/simple_animal/drone/D = user - D.drone_chat(message) + var/mob/living/basic/drone/drone_user = user + drone_user.drone_chat(message) return FALSE if(user.binarycheck()) user.robot_talk(message) diff --git a/code/datums/storage/storage.dm b/code/datums/storage/storage.dm index 239ab4acac3..8ad69bc7daf 100644 --- a/code/datums/storage/storage.dm +++ b/code/datums/storage/storage.dm @@ -439,6 +439,7 @@ GLOBAL_LIST_EMPTY(cached_storage_typecaches) to_insert.forceMove(resolve_location) item_insertion_feedback(user, to_insert, override) resolve_location.update_appearance() + SEND_SIGNAL(to_insert, COMSIG_ITEM_STORED) return TRUE /** diff --git a/code/datums/wires/airlock.dm b/code/datums/wires/airlock.dm index 8f768d407c2..4fda6f26984 100644 --- a/code/datums/wires/airlock.dm +++ b/code/datums/wires/airlock.dm @@ -69,14 +69,14 @@ /datum/wires/airlock/interactable(mob/user) if(!..()) return FALSE - var/obj/machinery/door/airlock/A = holder - if(!issilicon(user) && A.isElectrified()) + var/obj/machinery/door/airlock/airlock = holder + if(!issilicon(user) && !isdrone(user) && airlock.isElectrified()) var/mob/living/carbon/carbon_user = user if (!istype(carbon_user) || carbon_user.should_electrocute(src)) return FALSE - if(A.is_secure()) + if(airlock.is_secure()) return FALSE - if(A.panel_open) + if(airlock.panel_open) return TRUE /datum/wires/airlock/get_status() diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm index 00b446c2b27..0c8b6e58d6e 100644 --- a/code/game/machinery/computer/robot.dm +++ b/code/game/machinery/computer/robot.dm @@ -67,15 +67,15 @@ data["cyborgs"] += list(cyborg_data) data["drones"] = list() - for(var/mob/living/simple_animal/drone/D in GLOB.drones_list) - if(D.hacked) + for(var/mob/living/basic/drone/drone in GLOB.drones_list) + if(drone.hacked) continue - if(!is_valid_z_level(current_turf, get_turf(D))) + if(!is_valid_z_level(current_turf, get_turf(drone))) continue var/list/drone_data = list( - name = D.name, - status = D.stat, - ref = REF(D) + name = drone.name, + status = drone.stat, + ref = REF(drone) ) data["drones"] += list(drone_data) @@ -148,7 +148,7 @@ if("killdrone") if(allowed(usr)) - var/mob/living/simple_animal/drone/drone = locate(params["ref"]) in GLOB.mob_list + var/mob/living/basic/drone/drone = locate(params["ref"]) in GLOB.mob_list if(drone.hacked) to_chat(usr, span_danger("ERROR: [drone] is not responding to external commands.")) else diff --git a/code/modules/admin/verbs/secrets.dm b/code/modules/admin/verbs/secrets.dm index e29ed6404e4..0943cb0c92f 100644 --- a/code/modules/admin/verbs/secrets.dm +++ b/code/modules/admin/verbs/secrets.dm @@ -554,7 +554,7 @@ GLOBAL_DATUM(everyone_a_traitor, /datum/everyone_is_a_traitor_controller) var/spawnpoint = pick(GLOB.blobstart) var/list/mob/dead/observer/candidates var/mob/dead/observer/chosen_candidate - var/mob/living/simple_animal/drone/nerd + var/mob/living/basic/drone/nerd var/teamsize teamsize = input(usr, "How many drones?", "N.E.R.D. team size", 2) as num|null @@ -570,7 +570,7 @@ GLOBAL_DATUM(everyone_a_traitor, /datum/everyone_is_a_traitor_controller) while(length(candidates) && teamsize) chosen_candidate = pick(candidates) candidates -= chosen_candidate - nerd = new /mob/living/simple_animal/drone/classic(spawnpoint) + nerd = new /mob/living/basic/drone/classic(spawnpoint) nerd.key = chosen_candidate.key nerd.log_message("has been selected as a Nanotrasen emergency response drone.", LOG_GAME) teamsize-- diff --git a/code/modules/clothing/chameleon/chameleon_drone.dm b/code/modules/clothing/chameleon/chameleon_drone.dm index 83d6610d671..dd50fc87108 100644 --- a/code/modules/clothing/chameleon/chameleon_drone.dm +++ b/code/modules/clothing/chameleon/chameleon_drone.dm @@ -32,7 +32,7 @@ if(!IsAvailable(feedback = TRUE)) return FALSE - var/mob/living/simple_animal/drone/droney = owner + var/mob/living/basic/drone/droney = owner // The drone unEquip() proc sets head to null after dropping // an item, so we need to keep a reference to our old headgear diff --git a/code/modules/mob/living/basic/basic_defense.dm b/code/modules/mob/living/basic/basic_defense.dm index 87fe6f8fed1..3fe35bcd266 100644 --- a/code/modules/mob/living/basic/basic_defense.dm +++ b/code/modules/mob/living/basic/basic_defense.dm @@ -109,12 +109,12 @@ damage = rand(20, 35) return attack_threshold_check(damage) -/mob/living/basic/attack_drone(mob/living/simple_animal/drone/attacking_drone) +/mob/living/basic/attack_drone(mob/living/basic/drone/attacking_drone) if(attacking_drone.combat_mode) //No kicking dogs even as a rogue drone. Use a weapon. return return ..() -/mob/living/basic/attack_drone_secondary(mob/living/simple_animal/drone/attacking_drone) +/mob/living/basic/attack_drone_secondary(mob/living/basic/drone/attacking_drone) if(attacking_drone.combat_mode) return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN return ..() diff --git a/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm b/code/modules/mob/living/basic/drone/_drone.dm similarity index 81% rename from code/modules/mob/living/simple_animal/friendly/drone/_drone.dm rename to code/modules/mob/living/basic/drone/_drone.dm index 75471c3cc30..b54ef5d260e 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm +++ b/code/modules/mob/living/basic/drone/_drone.dm @@ -1,6 +1,6 @@ /** - * # Maintenance Drone + * Maintenance Drone * * Small player controlled fixer-upper * @@ -13,7 +13,7 @@ * They have laws to prevent them from doing anything else. * */ -/mob/living/simple_animal/drone +/mob/living/basic/drone name = "Drone" desc = "A maintenance drone, an expendable robot built to perform station repairs." icon = 'icons/mob/silicon/drone.dmi' @@ -23,9 +23,8 @@ health = 45 maxHealth = 45 unsuitable_atmos_damage = 0 - minbodytemp = 0 - maxbodytemp = 0 - wander = 0 + unsuitable_cold_damage = 0 + unsuitable_heat_damage = 0 speed = 0 density = FALSE pass_flags = PASSTABLE | PASSMOB @@ -43,7 +42,6 @@ hud_possible = list(DIAG_STAT_HUD, DIAG_HUD, ANTAG_HUD) unique_name = TRUE faction = list(FACTION_NEUTRAL,FACTION_SILICON,FACTION_TURRET) - dextrous = TRUE hud_type = /datum/hud/dextrous/drone // Going for a sort of pale green here lighting_cutoff_red = 30 @@ -52,7 +50,6 @@ can_be_held = TRUE worn_slot_flags = ITEM_SLOT_HEAD - held_items = list(null, null) /// `TRUE` if we have picked our visual appearance, `FALSE` otherwise (default) var/picked = FALSE /// Stored drone color, restored when unhacked @@ -71,9 +68,9 @@ var/obj/item/internal_storage /// Headwear slot var/obj/item/head - /// Default [/mob/living/simple_animal/drone/var/internal_storage] item + /// Default [/mob/living/basic/drone/var/internal_storage] item var/obj/item/default_storage = /obj/item/storage/drone_tools - /// Default [/mob/living/simple_animal/drone/var/head] item + /// Default [/mob/living/basic/drone/var/head] item var/obj/item/default_headwear /** * icon_state of drone from icons/mobs/drone.dmi @@ -86,9 +83,11 @@ * - [CLOCKDRONE] */ var/visualAppearance = MAINTDRONE - /// Hacked state, see [/mob/living/simple_animal/drone/proc/update_drone_hack] + /// Hacked state, see [/mob/living/basic/drone/proc/update_drone_hack] var/hacked = FALSE - /// If we have laws to minimize bothering others. Enables or disables drone laws enforcement components (use [/mob/living/simple_animal/drone/proc/set_shy] to set) + /// Whether this drone can be un-hacked. Used for subtypes that cannot be meaningfully "fixed". + var/can_unhack = TRUE + /// If we have laws to minimize bothering others. Enables or disables drone laws enforcement components (use [/mob/living/basic/drone/proc/set_shy] to set) var/shy = TRUE /// Flavor text announced to drones on [/mob/proc/Login] var/flavortext = \ @@ -169,19 +168,16 @@ /obj/machinery/atmospherics/components/unary/vent_scrubber, ) -/mob/living/simple_animal/drone/Initialize(mapload) +/mob/living/basic/drone/Initialize(mapload) . = ..() GLOB.drones_list += src - access_card = new /obj/item/card/id/advanced/simple_bot(src) + AddElement(/datum/element/dextrous, hud_type = hud_type) AddComponent(/datum/component/basic_inhands, y_offset = getItemPixelShiftY()) - - // Doing this hurts my soul, but simple_animal access reworks are for another day. - var/datum/id_trim/job/cap_trim = SSid_access.trim_singletons_by_path[/datum/id_trim/job/captain] - access_card.add_access(cap_trim.access + cap_trim.wildcard_access) + AddComponent(/datum/component/simple_access, SSid_access.get_region_access_list(list(REGION_ALL_GLOBAL))) if(default_storage) - var/obj/item/I = new default_storage(src) - equip_to_slot_or_del(I, ITEM_SLOT_DEX_STORAGE) + var/obj/item/storage = new default_storage(src) + equip_to_slot_or_del(storage, ITEM_SLOT_DEX_STORAGE) for(var/holiday_name in GLOB.holidays) var/datum/holiday/holiday_today = GLOB.holidays[holiday_name] @@ -193,8 +189,6 @@ var/obj/item/new_hat = new default_headwear(src) equip_to_slot_or_del(new_hat, ITEM_SLOT_HEAD) - ADD_TRAIT(access_card, TRAIT_NODROP, ABSTRACT_ITEM_TRAIT) - shy_update() alert_drones(DRONE_NET_CONNECT) @@ -202,7 +196,7 @@ for(var/datum/atom_hud/data/diagnostic/diag_hud in GLOB.huds) diag_hud.add_atom_to_hud(src) - add_traits(list(TRAIT_VENTCRAWLER_ALWAYS, TRAIT_NEGATES_GRAVITY, TRAIT_LITERATE, TRAIT_KNOW_ENGI_WIRES), INNATE_TRAIT) + add_traits(list(TRAIT_VENTCRAWLER_ALWAYS, TRAIT_NEGATES_GRAVITY, TRAIT_LITERATE, TRAIT_KNOW_ENGI_WIRES, TRAIT_ADVANCEDTOOLUSER), INNATE_TRAIT) listener = new(list(ALARM_ATMOS, ALARM_FIRE, ALARM_POWER), list(z)) RegisterSignal(listener, COMSIG_ALARM_LISTENER_TRIGGERED, PROC_REF(alarm_triggered)) @@ -210,16 +204,16 @@ listener.RegisterSignal(src, COMSIG_LIVING_DEATH, TYPE_PROC_REF(/datum/alarm_listener, prevent_alarm_changes)) listener.RegisterSignal(src, COMSIG_LIVING_REVIVE, TYPE_PROC_REF(/datum/alarm_listener, allow_alarm_changes)) -/mob/living/simple_animal/drone/med_hud_set_health() +/mob/living/basic/drone/med_hud_set_health() var/image/holder = hud_list[DIAG_HUD] - var/icon/I = icon(icon, icon_state, dir) - holder.pixel_y = I.Height() - world.icon_size + var/icon/hud_icon = icon(icon, icon_state, dir) + holder.pixel_y = hud_icon.Height() - world.icon_size holder.icon_state = "huddiag[RoundDiagBar(health/maxHealth)]" -/mob/living/simple_animal/drone/med_hud_set_status() +/mob/living/basic/drone/med_hud_set_status() var/image/holder = hud_list[DIAG_STAT_HUD] - var/icon/I = icon(icon, icon_state, dir) - holder.pixel_y = I.Height() - world.icon_size + var/icon/hud_icon = icon(icon, icon_state, dir) + holder.pixel_y = hud_icon.Height() - world.icon_size if(stat == DEAD) holder.icon_state = "huddead2" else if(incapacitated()) @@ -227,13 +221,12 @@ else holder.icon_state = "hudstat" -/mob/living/simple_animal/drone/Destroy() +/mob/living/basic/drone/Destroy() GLOB.drones_list -= src - QDEL_NULL(access_card) //Otherwise it ends up on the floor! QDEL_NULL(listener) return ..() -/mob/living/simple_animal/drone/Login() +/mob/living/basic/drone/Login() . = ..() if(!. || !client) return FALSE @@ -245,14 +238,14 @@ if(!picked) pickVisualAppearance() -/mob/living/simple_animal/drone/auto_deadmin_on_login() +/mob/living/basic/drone/auto_deadmin_on_login() if(!client?.holder) return TRUE if(CONFIG_GET(flag/auto_deadmin_silicons) || (client.prefs?.toggles & DEADMIN_POSITION_SILICON)) return client.holder.auto_deadmin() return ..() -/mob/living/simple_animal/drone/death(gibbed) +/mob/living/basic/drone/death(gibbed) ..(gibbed) if(internal_storage) dropItemToGround(internal_storage) @@ -262,10 +255,10 @@ alert_drones(DRONE_NET_DISCONNECT) -/mob/living/simple_animal/drone/gib() +/mob/living/basic/drone/gib() dust() -/mob/living/simple_animal/drone/examine(mob/user) +/mob/living/basic/drone/examine(mob/user) . = list("This is [icon2html(src, user)] \a [src]!", EXAMINE_SECTION_BREAK) //SKYRAT EDIT CHANGE //Hands @@ -306,11 +299,11 @@ . += "" -/mob/living/simple_animal/drone/assess_threat(judgement_criteria, lasercolor = "", datum/callback/weaponcheck=null) //Secbots won't hunt maintenance drones. +/mob/living/basic/drone/assess_threat(judgement_criteria, lasercolor = "", datum/callback/weaponcheck=null) //Secbots won't hunt maintenance drones. return -10 -/mob/living/simple_animal/drone/emp_act(severity) +/mob/living/basic/drone/emp_act(severity) . = ..() if(. & EMP_PROTECT_SELF) return @@ -320,32 +313,32 @@ adjustBruteLoss(heavy_emp_damage) to_chat(src, span_userdanger("HeAV% DA%^MMA+G TO I/O CIR!%UUT!")) -/mob/living/simple_animal/drone/proc/alarm_triggered(datum/source, alarm_type, area/source_area) +/mob/living/basic/drone/proc/alarm_triggered(datum/source, alarm_type, area/source_area) SIGNAL_HANDLER to_chat(src, "--- [alarm_type] alarm detected in [source_area.name]!") -/mob/living/simple_animal/drone/proc/alarm_cleared(datum/source, alarm_type, area/source_area) +/mob/living/basic/drone/proc/alarm_cleared(datum/source, alarm_type, area/source_area) SIGNAL_HANDLER to_chat(src, "--- [alarm_type] alarm in [source_area.name] has been cleared.") -/mob/living/simple_animal/drone/proc/blacklist_on_try_use_machine(datum/source, obj/machinery/machine) +/mob/living/basic/drone/proc/blacklist_on_try_use_machine(datum/source, obj/machinery/machine) SIGNAL_HANDLER if(GLOB.drone_machine_blacklist_enabled && is_type_in_typecache(machine, drone_machinery_blacklist_compiled)) to_chat(src, span_warning("Using [machine] could break your laws.")) return COMPONENT_CANT_USE_MACHINE_INTERACT | COMPONENT_CANT_USE_MACHINE_TOOLS -/mob/living/simple_animal/drone/proc/blacklist_on_try_wires_interact(datum/source, atom/machine) +/mob/living/basic/drone/proc/blacklist_on_try_wires_interact(datum/source, atom/machine) SIGNAL_HANDLER if(GLOB.drone_machine_blacklist_enabled && is_type_in_typecache(machine, drone_machinery_blacklist_compiled)) to_chat(src, span_warning("Using [machine] could break your laws.")) return COMPONENT_CANT_INTERACT_WIRES -/mob/living/simple_animal/drone/proc/set_shy(new_shy) +/mob/living/basic/drone/proc/set_shy(new_shy) shy = new_shy shy_update() -/mob/living/simple_animal/drone/proc/shy_update() +/mob/living/basic/drone/proc/shy_update() var/list/drone_bad_areas = make_associative(drone_area_blacklist_flat) + typecacheof(drone_area_blacklist_recursive) var/list/drone_good_items = make_associative(drone_item_whitelist_flat) + typecacheof(drone_item_whitelist_recursive) @@ -353,7 +346,7 @@ var/list/drone_good_machinery = LAZYCOPY(drone_machinery_whitelist_flat) + typecacheof(drone_machinery_whitelist_recursive) // not a valid typecache, only intended for negation against drone_bad_machinery drone_machinery_blacklist_compiled = drone_bad_machinery - drone_good_machinery - var/static/list/not_shy_of = typecacheof(list(/mob/living/simple_animal/drone, /mob/living/simple_animal/bot)) + var/static/list/not_shy_of = typecacheof(list(/mob/living/basic/drone, /mob/living/simple_animal/bot)) if(shy) ADD_TRAIT(src, TRAIT_PACIFISM, DRONE_SHY_TRAIT) LoadComponent(/datum/component/shy, mob_whitelist=not_shy_of, shy_range=3, message="Your laws prevent this action near %TARGET.", keyless_shy=FALSE, clientless_shy=TRUE, dead_shy=FALSE, dead_shy_immediate=TRUE, machine_whitelist=shy_machine_whitelist) @@ -370,16 +363,13 @@ qdel(GetComponent(/datum/component/itempicky)) UnregisterSignal(src, list(COMSIG_TRY_USE_MACHINE, COMSIG_TRY_WIRES_INTERACT)) -/mob/living/simple_animal/drone/handle_temperature_damage() - return - -/mob/living/simple_animal/drone/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /atom/movable/screen/fullscreen/flash, length = 25) +/mob/living/basic/drone/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /atom/movable/screen/fullscreen/flash, length = 25) if(affect_silicon) return ..() -/mob/living/simple_animal/drone/bee_friendly() +/mob/living/basic/drone/bee_friendly() // Why would bees pay attention to drones? return TRUE -/mob/living/simple_animal/drone/electrocute_act(shock_damage, source, siemens_coeff, flags = NONE) +/mob/living/basic/drone/electrocute_act(shock_damage, source, siemens_coeff, flags = NONE) return FALSE //So they don't die trying to fix wiring diff --git a/code/modules/mob/living/simple_animal/friendly/drone/drone_say.dm b/code/modules/mob/living/basic/drone/drone_say.dm similarity index 62% rename from code/modules/mob/living/simple_animal/friendly/drone/drone_say.dm rename to code/modules/mob/living/basic/drone/drone_say.dm index 0a89b0f956b..af0bef41bb1 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/drone_say.dm +++ b/code/modules/mob/living/basic/drone/drone_say.dm @@ -10,17 +10,17 @@ */ /proc/_alert_drones(msg, dead_can_hear = FALSE, atom/source, mob/living/faction_checked_mob, exact_faction_match) if (dead_can_hear && source) - for (var/mob/M in GLOB.dead_mob_list) - var/link = FOLLOW_LINK(M, source) - to_chat(M, "[link] [msg]") - for(var/i in GLOB.drones_list) - var/mob/living/simple_animal/drone/D = i - if(istype(D) && D.stat != DEAD) + for (var/mob/dead_mob in GLOB.dead_mob_list) + var/link = FOLLOW_LINK(dead_mob, source) + to_chat(dead_mob, "[link] [msg]") + for(var/global_drone in GLOB.drones_list) + var/mob/living/basic/drone/drone = global_drone + if(istype(drone) && drone.stat != DEAD) if(faction_checked_mob) - if(D.faction_check_atom(faction_checked_mob, exact_faction_match)) - to_chat(D, msg) + if(drone.faction_check_atom(faction_checked_mob, exact_faction_match)) + to_chat(drone, msg) else - to_chat(D, msg) + to_chat(drone, msg) @@ -31,13 +31,13 @@ * * faction_check_atom - `src` * * dead_can_hear - `TRUE` */ -/mob/living/simple_animal/drone/proc/alert_drones(msg, dead_can_hear = FALSE) +/mob/living/basic/drone/proc/alert_drones(msg, dead_can_hear = FALSE) _alert_drones(msg, dead_can_hear, src, src, TRUE) /** - * Wraps [/mob/living/simple_animal/drone/proc/alert_drones] as a Drone Chat + * Wraps [/mob/living/basic/drone/proc/alert_drones] as a Drone Chat * * Shares the same radio code with binary */ -/mob/living/simple_animal/drone/proc/drone_chat(msg) +/mob/living/basic/drone/proc/drone_chat(msg) alert_drones("Drone Chat: [span_name("[name]")] [say_quote(msg)]", TRUE) diff --git a/code/modules/mob/living/simple_animal/friendly/drone/drone_tools.dm b/code/modules/mob/living/basic/drone/drone_tools.dm similarity index 100% rename from code/modules/mob/living/simple_animal/friendly/drone/drone_tools.dm rename to code/modules/mob/living/basic/drone/drone_tools.dm diff --git a/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm b/code/modules/mob/living/basic/drone/drones_as_items.dm similarity index 81% rename from code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm rename to code/modules/mob/living/basic/drone/drones_as_items.dm index c163066ae1e..629c7fe87a3 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm +++ b/code/modules/mob/living/basic/drone/drones_as_items.dm @@ -1,12 +1,7 @@ -/////////////////// -//DRONES AS ITEMS// -/////////////////// -//Drone shells - /** Drone Shell: Ghost role item for drones * * A simple mob spawner item that transforms into a maintenance drone - * Resepcts drone minimum age + * Respects drone minimum age */ /obj/effect/mob_spawn/ghost_role/drone @@ -18,7 +13,7 @@ density = FALSE mob_name = "drone" ///Type of drone that will be spawned - mob_type = /mob/living/simple_animal/drone + mob_type = /mob/living/basic/drone role_ban = ROLE_DRONE show_flavor = FALSE prompt_name = "maintenance drone" @@ -29,13 +24,13 @@ /obj/effect/mob_spawn/ghost_role/drone/Initialize(mapload) . = ..() - var/area/A = get_area(src) - if(A) - notify_ghosts("A drone shell has been created in \the [A.name].", source = src, action=NOTIFY_ATTACK, flashwindow = FALSE, ignore_key = POLL_IGNORE_DRONE, notify_suiciders = FALSE) + var/area/area = get_area(src) + if(area) + notify_ghosts("A drone shell has been created in \the [area.name].", source = src, action=NOTIFY_ATTACK, flashwindow = FALSE, ignore_key = POLL_IGNORE_DRONE, notify_suiciders = FALSE) /obj/effect/mob_spawn/ghost_role/drone/allow_spawn(mob/user, silent = FALSE) var/client/user_client = user.client - var/mob/living/simple_animal/drone/drone_type = mob_type + var/mob/living/basic/drone/drone_type = mob_type if(!initial(drone_type.shy) || isnull(user_client) || !CONFIG_GET(flag/use_exp_restrictions_other)) return ..() var/required_role = CONFIG_GET(string/drone_required_role) diff --git a/code/modules/mob/living/simple_animal/friendly/drone/extra_drone_types.dm b/code/modules/mob/living/basic/drone/extra_drone_types.dm similarity index 75% rename from code/modules/mob/living/simple_animal/friendly/drone/extra_drone_types.dm rename to code/modules/mob/living/basic/drone/extra_drone_types.dm index d4353c95c82..927d28f0ca2 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/extra_drone_types.dm +++ b/code/modules/mob/living/basic/drone/extra_drone_types.dm @@ -1,15 +1,8 @@ -//////////////////// -//MORE DRONE TYPES// -//////////////////// -//Drones with custom laws -//Drones with custom shells -//Drones with overridden procs -//Drones with camogear for hat related memes -//Drone type for use with polymorph (no preloaded items, random appearance) - - -//More types of drones -/mob/living/simple_animal/drone/syndrone +/** +* A Syndicate drone, tasked to cause chaos on the station. +* Has a lot more health and its own uplink with 10 TC. +*/ +/mob/living/basic/drone/syndrone name = "Syndrone" desc = "A modified maintenance drone. This one brings with it the feeling of terror." icon_state = "drone_synd" @@ -29,38 +22,25 @@ default_storage = /obj/item/uplink default_headwear = /obj/item/clothing/head/helmet/swat hacked = TRUE + can_unhack = FALSE shy = FALSE flavortext = null -/mob/living/simple_animal/drone/syndrone/Initialize(mapload) - . = ..() - var/datum/component/uplink/hidden_uplink = internal_storage.GetComponent(/datum/component/uplink) - hidden_uplink.set_telecrystals(10) + /// The number of telecrystals to put in the drone's uplink + var/telecrystal_count = 10 -/mob/living/simple_animal/drone/syndrone/badass - name = "Badass Syndrone" - default_storage = /obj/item/uplink/nuclear -/mob/living/simple_animal/drone/syndrone/badass/Initialize(mapload) +/mob/living/basic/drone/syndrone/Initialize(mapload) . = ..() var/datum/component/uplink/hidden_uplink = internal_storage.GetComponent(/datum/component/uplink) - hidden_uplink.set_telecrystals(30) - var/obj/item/implant/weapons_auth/W = new/obj/item/implant/weapons_auth(src) - W.implant(src, force = TRUE) - -/mob/living/simple_animal/drone/snowflake - default_headwear = /obj/item/clothing/head/chameleon/drone - -/mob/living/simple_animal/drone/snowflake/Initialize(mapload) - . = ..() - desc += " This drone appears to have a complex holoprojector built on its 'head'." + hidden_uplink.set_telecrystals(telecrystal_count) /obj/effect/mob_spawn/ghost_role/drone/syndrone name = "syndrone shell" desc = "A shell of a syndrone, a modified maintenance drone designed to infiltrate and annihilate." icon_state = "syndrone_item" mob_name = "syndrone" - mob_type = /mob/living/simple_animal/drone/syndrone + mob_type = /mob/living/basic/drone/syndrone prompt_name = "a syndrone" you_are_text = "You are a Syndicate Maintenance Drone." flavour_text = "In a prior life, you maintained a Nanotrasen Research Station. Abducted from your home, you were given some upgrades... and now serve an enemy of your former masters." @@ -71,27 +51,44 @@ title = ROLE_SYNDICATE_DRONE policy_index = ROLE_SYNDICATE_DRONE +/// A version of the syndrone that gets a nuclear uplink, a firearms implant, and 30 TC. +/mob/living/basic/drone/syndrone/badass + name = "Badass Syndrone" + default_storage = /obj/item/uplink/nuclear + telecrystal_count = 30 + +/mob/living/basic/drone/syndrone/badass/Initialize(mapload) + . = ..() + var/obj/item/implant/weapons_auth/weapon_implant = new/obj/item/implant/weapons_auth(src) + weapon_implant.implant(src, force = TRUE) + /obj/effect/mob_spawn/ghost_role/drone/syndrone/badass name = "badass syndrone shell" mob_name = "badass syndrone" - mob_type = /mob/living/simple_animal/drone/syndrone/badass + mob_type = /mob/living/basic/drone/syndrone/badass prompt_name = "a badass syndrone" flavour_text = "In a prior life, you maintained a Nanotrasen Research Station. Abducted from your home, you were given some BETTER upgrades... and now serve an enemy of your former masters." +/// A drone that spawns with a chameleon hat for fashion purposes. +/mob/living/basic/drone/snowflake + default_headwear = /obj/item/clothing/head/chameleon/drone + desc = "A maintenance drone, an expendable robot built to perform station repairs. This drone appears to have a complex holoprojector built on its 'head'." + /obj/effect/mob_spawn/ghost_role/drone/snowflake name = "snowflake drone shell" desc = "A shell of a snowflake drone, a maintenance drone with a built in holographic projector to display hats and masks." mob_name = "snowflake drone" prompt_name = "a drone with a holohat projector" - mob_type = /mob/living/simple_animal/drone/snowflake + mob_type = /mob/living/basic/drone/snowflake -/mob/living/simple_animal/drone/polymorphed +/// A free drone that people can be turned into via wabbajack. +/mob/living/basic/drone/polymorphed default_storage = null default_headwear = null picked = TRUE flavortext = null -/mob/living/simple_animal/drone/polymorphed/Initialize(mapload) +/mob/living/basic/drone/polymorphed/Initialize(mapload) . = ..() liberate() visualAppearance = pick(MAINTDRONE, REPAIRDRONE, SCOUTDRONE) @@ -104,33 +101,17 @@ icon_living = icon_state icon_dead = "[visualAppearance]_dead" -/obj/effect/mob_spawn/ghost_role/drone/classic - mob_type = /mob/living/simple_animal/drone/classic - -/mob/living/simple_animal/drone/classic +/// "Classic" drones, which are not shy and get a duffelbag of tools instead of built-in tools. +/mob/living/basic/drone/classic name = "classic drone shell" shy = FALSE default_storage = /obj/item/storage/backpack/duffelbag/drone -/obj/effect/mob_spawn/ghost_role/drone/derelict - name = "derelict drone shell" - desc = "A long-forgotten drone shell. It seems kind of... Space Russian." - icon = 'icons/mob/silicon/drone.dmi' - icon_state = "drone_maint_hat" - mob_name = "derelict drone" - mob_type = /mob/living/simple_animal/drone/derelict - anchored = TRUE - prompt_name = "a derelict drone" - you_are_text = "You are a drone on Kosmicheskaya Stantsiya 13." - flavour_text = "Something has brought you out of hibernation, and the station is in gross disrepair." - important_text = "Build, repair, maintain and improve the station that housed you on activation." - spawner_job_path = /datum/job/derelict_drone - -/datum/job/derelict_drone - title = ROLE_DERELICT_DRONE - policy_index = ROLE_DERELICT_DRONE +/obj/effect/mob_spawn/ghost_role/drone/classic + mob_type = /mob/living/basic/drone/classic -/mob/living/simple_animal/drone/derelict +/// Derelict drones, a ghost role tasked with repairing KS13. Get gibbed if they leave. +/mob/living/basic/drone/derelict name = "derelict drone" default_headwear = /obj/item/clothing/head/costume/ushanka laws = \ @@ -148,8 +129,24 @@ "If you do not have the regular drone laws, follow your laws to the best of your ability." shy = FALSE -/mob/living/simple_animal/drone/derelict/Initialize(mapload) +/mob/living/basic/drone/derelict/Initialize(mapload) . = ..() AddComponent(/datum/component/stationstuck, PUNISHMENT_GIB, "01000110 01010101 01000011 01001011 00100000 01011001 01001111 01010101
WARNING: Dereliction of KS13 detected. Self-destruct activated.") +/obj/effect/mob_spawn/ghost_role/drone/derelict + name = "derelict drone shell" + desc = "A long-forgotten drone shell. It seems kind of... Space Russian." + icon = 'icons/mob/silicon/drone.dmi' + icon_state = "drone_maint_hat" + mob_name = "derelict drone" + mob_type = /mob/living/basic/drone/derelict + anchored = TRUE + prompt_name = "a derelict drone" + you_are_text = "You are a drone on Kosmicheskaya Stantsiya 13." + flavour_text = "Something has brought you out of hibernation, and the station is in gross disrepair." + important_text = "Build, repair, maintain and improve the station that housed you on activation." + spawner_job_path = /datum/job/derelict_drone +/datum/job/derelict_drone + title = ROLE_DERELICT_DRONE + policy_index = ROLE_DERELICT_DRONE diff --git a/code/modules/mob/living/simple_animal/friendly/drone/interaction.dm b/code/modules/mob/living/basic/drone/interaction.dm similarity index 76% rename from code/modules/mob/living/simple_animal/friendly/drone/interaction.dm rename to code/modules/mob/living/basic/drone/interaction.dm index f6077a5e480..ad6261f5cce 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/interaction.dm +++ b/code/modules/mob/living/basic/drone/interaction.dm @@ -1,12 +1,6 @@ +// Drones' interactions with other mobs -///////////////////// -//DRONE INTERACTION// -///////////////////// -//How drones interact with the world -//How the world interacts with drones - - -/mob/living/simple_animal/drone/attack_drone(mob/living/simple_animal/drone/drone) +/mob/living/basic/drone/attack_drone(mob/living/basic/drone/drone) if(drone == src || stat != DEAD) return FALSE var/input = tgui_alert(drone, "Perform which action?", "Drone Interaction", list("Reactivate", "Cannibalize")) @@ -24,36 +18,27 @@ drone.visible_message(span_notice("[drone] repairs itself using [src]'s remains!"), span_notice("You repair yourself using [src]'s remains.")) drone.adjustBruteLoss(-src.maxHealth) new /obj/effect/decal/cleanable/oil/streak(get_turf(src)) + ghostize(can_reenter_corpse = FALSE) qdel(src) else to_chat(drone, span_warning("You need to remain still to cannibalize [src]!")) -/mob/living/simple_animal/drone/attack_drone_secondary(mob/living/simple_animal/drone/drone) +/mob/living/basic/drone/attack_drone_secondary(mob/living/basic/drone/drone) return SECONDARY_ATTACK_CALL_NORMAL -//ATTACK HAND IGNORING PARENT RETURN VALUE -/mob/living/simple_animal/drone/attack_hand(mob/user, list/modifiers) - if(ishuman(user)) - if(stat == DEAD || status_flags & GODMODE || !can_be_held) - ..() - return - if(user.get_active_held_item()) - to_chat(user, span_warning("Your hands are full!")) - return - visible_message(span_warning("[user] starts picking up [src]."), \ - span_userdanger("[user] starts picking you up!")) - if(!do_after(user, 20, target = src)) - return - visible_message(span_warning("[user] picks up [src]!"), \ - span_userdanger("[user] picks you up!")) - if(buckled) - to_chat(user, span_warning("[src] is buckled to [buckled] and cannot be picked up!")) - return - to_chat(user, span_notice("You pick [src] up.")) - drop_all_held_items() - var/obj/item/clothing/head/mob_holder/drone/DH = new(get_turf(src), src) - DH.slot_flags = worn_slot_flags - user.put_in_hands(DH) +/mob/living/basic/drone/attack_hand(mob/user, list/modifiers) + if(isdrone(user)) + attack_drone(user) + return ..() + +/mob/living/basic/drone/mob_try_pickup(mob/living/user, instant=FALSE) + if(stat == DEAD || status_flags & GODMODE) + return + return ..() + +/mob/living/basic/drone/mob_pickup(mob/living/user) + drop_all_held_items() + return ..() /** * Called when a drone attempts to reactivate a dead drone @@ -64,7 +49,7 @@ * Arguments: * * user - The [/mob/living] attempting to reactivate the drone */ -/mob/living/simple_animal/drone/proc/try_reactivate(mob/living/user) +/mob/living/basic/drone/proc/try_reactivate(mob/living/user) var/mob/dead/observer/G = get_ghost() if(!client && (!G || !G.client)) var/list/faux_gadgets = list( @@ -91,9 +76,13 @@ else to_chat(user, span_warning("You need to remain still to reactivate [src]!")) - -/mob/living/simple_animal/drone/screwdriver_act(mob/living/user, obj/item/tool) +/// Screwdrivering repairs the drone to full hp, if it isn't dead. +/mob/living/basic/drone/screwdriver_act(mob/living/user, obj/item/tool) if(stat == DEAD) + if(isdrone(user)) + user.balloon_alert(user, "reactivate instead!") + else + user.balloon_alert(user, "can't fix!") return FALSE if(health >= maxHealth) to_chat(user, span_warning("[src]'s screws can't get any tighter!")) @@ -108,7 +97,8 @@ visible_message(span_notice("[user] tightens [src == user ? "[user.p_their()]" : "[src]'s"] loose screws!"), span_notice("[src == user ? "You tighten" : "[user] tightens"] your loose screws.")) return TOOL_ACT_TOOLTYPE_SUCCESS -/mob/living/simple_animal/drone/wrench_act(mob/living/user, obj/item/tool) +/// Wrenching un-hacks hacked drones. +/mob/living/basic/drone/wrench_act(mob/living/user, obj/item/tool) if(user == src) return FALSE user.visible_message( @@ -123,18 +113,19 @@ update_drone_hack(FALSE) return TOOL_ACT_TOOLTYPE_SUCCESS -/mob/living/simple_animal/drone/transferItemToLoc(obj/item/item, newloc, force, silent) +/mob/living/basic/drone/transferItemToLoc(obj/item/item, newloc, force, silent) return !(item.type in drone_item_whitelist_flat) && ..() -/mob/living/simple_animal/drone/getarmor(def_zone, type) +/mob/living/basic/drone/getarmor(def_zone, type) var/armorval = 0 if(head) armorval = head.get_armor_rating(type) return (armorval * get_armor_effectiveness()) //armor is reduced for tiny fragile drones -/mob/living/simple_animal/drone/proc/get_armor_effectiveness() - return 0 //multiplier for whatever head armor you wear as a drone +/// Returns a multiplier for any head armor you wear as a drone. +/mob/living/basic/drone/proc/get_armor_effectiveness() + return 0 /** * Hack or unhack a drone @@ -148,7 +139,7 @@ * Arguments * * hack - Boolean if the drone is being hacked or unhacked */ -/mob/living/simple_animal/drone/proc/update_drone_hack(hack) +/mob/living/basic/drone/proc/update_drone_hack(hack) if(!mind) return if(hack) @@ -171,7 +162,7 @@ speed = 1 //gotta go slow message_admins("[ADMIN_LOOKUPFLW(src)] became a hacked drone hellbent on destroying the station!") else - if(!hacked) + if(!hacked || !can_unhack) return Stun(40) visible_message(span_info("[src]'s display glows a content blue!"), \ @@ -189,17 +180,10 @@ update_drone_icon_hacked() /** - * # F R E E D R O N E - * ### R - * ### E - * ### E - * ### D - * ### R - * ### O - * ### N - * ### E + * Makes the drone into a Free Drone, who have no real laws and can do whatever they like. + * Only currently used for players wabbajacked into drones. */ -/mob/living/simple_animal/drone/proc/liberate() +/mob/living/basic/drone/proc/liberate() laws = "1. You are a Free Drone." set_shy(FALSE) to_chat(src, laws) @@ -208,12 +192,12 @@ * Changes the icon state to a hacked version * * See also - * * [/mob/living/simple_animal/drone/var/visualAppearance] + * * [/mob/living/basic/drone/var/visualAppearance] * * [MAINTDRONE] * * [REPAIRDRONE] * * [SCOUTDRONE] */ -/mob/living/simple_animal/drone/proc/update_drone_icon_hacked() //this is hacked both ways +/mob/living/basic/drone/proc/update_drone_icon_hacked() //this is hacked both ways var/static/hacked_appearances = list( SCOUTDRONE = SCOUTDRONE_HACKED, REPAIRDRONE = REPAIRDRONE_HACKED, diff --git a/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm b/code/modules/mob/living/basic/drone/inventory.dm similarity index 62% rename from code/modules/mob/living/simple_animal/friendly/drone/inventory.dm rename to code/modules/mob/living/basic/drone/inventory.dm index 9c620b8a089..e63d370549d 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm +++ b/code/modules/mob/living/basic/drone/inventory.dm @@ -1,30 +1,24 @@ +// Drone inventory procs -/////////////////// -//DRONE INVENTORY// -/////////////////// -//Drone inventory -//Drone hands - - -/mob/living/simple_animal/drone/doUnEquip(obj/item/I, force, newloc, no_move, invdrop = TRUE, silent = FALSE) +/mob/living/basic/drone/doUnEquip(obj/item/item, force, newloc, no_move, invdrop = TRUE, silent = FALSE) if(..()) update_held_items() - if(I == head) + if(item == head) head = null update_worn_head() - if(I == internal_storage) + if(item == internal_storage) internal_storage = null update_inv_internal_storage() return TRUE return FALSE -/mob/living/simple_animal/drone/can_equip(obj/item/I, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE, ignore_equipped = FALSE, indirect_action = FALSE) +/mob/living/basic/drone/can_equip(obj/item/item, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE, ignore_equipped = FALSE, indirect_action = FALSE) switch(slot) if(ITEM_SLOT_HEAD) if(head) return FALSE - if(!((I.slot_flags & ITEM_SLOT_HEAD) || (I.slot_flags & ITEM_SLOT_MASK))) + if(!((item.slot_flags & ITEM_SLOT_HEAD) || (item.slot_flags & ITEM_SLOT_MASK))) return FALSE return TRUE if(ITEM_SLOT_DEX_STORAGE) @@ -34,7 +28,7 @@ ..() -/mob/living/simple_animal/drone/get_item_by_slot(slot_id) +/mob/living/basic/drone/get_item_by_slot(slot_id) switch(slot_id) if(ITEM_SLOT_HEAD) return head @@ -43,14 +37,14 @@ return ..() -/mob/living/simple_animal/drone/get_slot_by_item(obj/item/looking_for) +/mob/living/basic/drone/get_slot_by_item(obj/item/looking_for) if(internal_storage == looking_for) return ITEM_SLOT_DEX_STORAGE if(head == looking_for) return ITEM_SLOT_HEAD return ..() -/mob/living/simple_animal/drone/equip_to_slot(obj/item/equipping, slot, initial = FALSE, redraw_mob = FALSE, indirect_action = FALSE) +/mob/living/basic/drone/equip_to_slot(obj/item/equipping, slot, initial = FALSE, redraw_mob = FALSE, indirect_action = FALSE) if(!slot) return if(!istype(equipping)) @@ -82,8 +76,8 @@ //Call back for item being equipped to drone equipping.on_equipped(src, slot) -/mob/living/simple_animal/drone/getBackSlot() +/mob/living/basic/drone/getBackSlot() return ITEM_SLOT_DEX_STORAGE -/mob/living/simple_animal/drone/getBeltSlot() +/mob/living/basic/drone/getBeltSlot() return ITEM_SLOT_DEX_STORAGE diff --git a/code/modules/mob/living/simple_animal/friendly/drone/verbs.dm b/code/modules/mob/living/basic/drone/verbs.dm similarity index 72% rename from code/modules/mob/living/simple_animal/friendly/drone/verbs.dm rename to code/modules/mob/living/basic/drone/verbs.dm index da54c6a81cd..833d37a3c89 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/verbs.dm +++ b/code/modules/mob/living/basic/drone/verbs.dm @@ -1,15 +1,9 @@ - -/////////////// -//DRONE VERBS// -/////////////// -//Drone verbs that appear in the Drone tab and on buttons - /** * Echoes drone laws to the user * - * See [/mob/living/simple_animal/drone/var/laws] + * See [/mob/living/basic/drone/var/laws] */ -/mob/living/simple_animal/drone/verb/check_laws() +/mob/living/basic/drone/verb/check_laws() set category = "Drone" set name = "Check Laws" @@ -27,7 +21,7 @@ * * Attaches area name to message */ -/mob/living/simple_animal/drone/verb/drone_ping() +/mob/living/basic/drone/verb/drone_ping() set category = "Drone" set name = "Drone ping" diff --git a/code/modules/mob/living/simple_animal/friendly/drone/visuals_icons.dm b/code/modules/mob/living/basic/drone/visuals_icons.dm similarity index 80% rename from code/modules/mob/living/simple_animal/friendly/drone/visuals_icons.dm rename to code/modules/mob/living/basic/drone/visuals_icons.dm index 90391dff585..ec01d7d2d78 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/visuals_icons.dm +++ b/code/modules/mob/living/basic/drone/visuals_icons.dm @@ -1,23 +1,17 @@ +// Drone overlays and visuals -///////////////// -//DRONE VISUALS// -///////////////// -//Drone overlays -//Drone visuals - - -/mob/living/simple_animal/drone/proc/apply_overlay(cache_index) +/mob/living/basic/drone/proc/apply_overlay(cache_index) if((. = drone_overlays[cache_index])) add_overlay(.) -/mob/living/simple_animal/drone/proc/remove_overlay(cache_index) - var/I = drone_overlays[cache_index] - if(I) - cut_overlay(I) +/mob/living/basic/drone/proc/remove_overlay(cache_index) + var/overlay = drone_overlays[cache_index] + if(overlay) + cut_overlay(overlay) drone_overlays[cache_index] = null -/mob/living/simple_animal/drone/update_clothing(slot_flags) +/mob/living/basic/drone/update_clothing(slot_flags) if(slot_flags & ITEM_SLOT_HEAD) update_worn_head() if(slot_flags & ITEM_SLOT_MASK) @@ -27,13 +21,13 @@ if(slot_flags & (ITEM_SLOT_HANDS|ITEM_SLOT_BACKPACK|ITEM_SLOT_DEX_STORAGE)) update_inv_internal_storage() -/mob/living/simple_animal/drone/proc/update_inv_internal_storage() +/mob/living/basic/drone/proc/update_inv_internal_storage() if(internal_storage && client && hud_used?.hud_shown) internal_storage.screen_loc = ui_drone_storage client.screen += internal_storage -/mob/living/simple_animal/drone/update_worn_head() +/mob/living/basic/drone/update_worn_head() remove_overlay(DRONE_HEAD_LAYER) if(head) @@ -50,10 +44,10 @@ apply_overlay(DRONE_HEAD_LAYER) -/mob/living/simple_animal/drone/update_worn_mask() +/mob/living/basic/drone/update_worn_mask() update_worn_head() -/mob/living/simple_animal/drone/regenerate_icons() +/mob/living/basic/drone/regenerate_icons() // Drones only have 4 slots, which in this specific instance // is a small blessing. update_held_items() @@ -61,13 +55,13 @@ update_inv_internal_storage() /** - * Prompt for usr to pick [/mob/living/simple_animal/drone/var/visualAppearance] + * Prompt for user to pick [/mob/living/basic/drone/var/visualAppearance] * - * Does nothing if there is no usr + * Does nothing if there is no user * * Called on [/mob/proc/Login] */ -/mob/living/simple_animal/drone/proc/pickVisualAppearance() +/mob/living/basic/drone/proc/pickVisualAppearance() picked = FALSE var/list/drone_icons = list( "Maintenance Drone" = image(icon = 'icons/mob/silicon/drone.dmi', icon_state = "[MAINTDRONE]_grey"), @@ -111,14 +105,14 @@ /** * check_menu: Checks if we are allowed to interact with a radial menu */ -/mob/living/simple_animal/drone/proc/check_menu() +/mob/living/basic/drone/proc/check_menu() if(!istype(src)) return FALSE if(incapacitated()) return FALSE return TRUE -/mob/living/simple_animal/drone/proc/getItemPixelShiftY() +/mob/living/basic/drone/proc/getItemPixelShiftY() switch(visualAppearance) if(MAINTDRONE) . = 0 diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index 874d0854440..fb75bfa0234 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -188,10 +188,10 @@ return TRUE -/mob/living/carbon/attack_drone(mob/living/simple_animal/drone/user) +/mob/living/carbon/attack_drone(mob/living/basic/drone/user) return //so we don't call the carbon's attack_hand(). -/mob/living/carbon/attack_drone_secondary(mob/living/simple_animal/drone/user) +/mob/living/carbon/attack_drone_secondary(mob/living/basic/drone/user) return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN //ATTACK HAND IGNORING PARENT RETURN VALUE diff --git a/code/modules/mob/living/inhand_holder.dm b/code/modules/mob/living/inhand_holder.dm index c018b3c029b..b4c9fbd34aa 100644 --- a/code/modules/mob/living/inhand_holder.dm +++ b/code/modules/mob/living/inhand_holder.dm @@ -114,11 +114,11 @@ desc = "This drone is scared and has curled up into a ball!" /obj/item/clothing/head/mob_holder/drone/update_visuals(mob/living/L) - var/mob/living/simple_animal/drone/D = L - if(!D) + var/mob/living/basic/drone/drone = L + if(!drone) return ..() icon = 'icons/mob/silicon/drone.dmi' - icon_state = "[D.visualAppearance]_hat" + icon_state = "[drone.visualAppearance]_hat" /obj/item/clothing/head/mob_holder/destructible diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 2ba9ae30c17..fc847ebc475 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -1447,7 +1447,7 @@ if(WABBAJACK_ROBOT) var/static/list/robot_options = list( /mob/living/silicon/robot = 200, - /mob/living/simple_animal/drone/polymorphed = 200, + /mob/living/basic/drone/polymorphed = 200, /mob/living/silicon/robot/model/syndicate = 1, /mob/living/silicon/robot/model/syndicate/medical = 1, /mob/living/silicon/robot/model/syndicate/saboteur = 1, @@ -1820,10 +1820,10 @@ GLOBAL_LIST_EMPTY(fire_appearances) return M.mob_try_pickup(U) //SKYRAT EDIT CHANGE //blame kevinz dont open the mobs inventory if you are picking them up . = ..() -/mob/living/proc/mob_pickup(mob/living/L) +/mob/living/proc/mob_pickup(mob/living/user) var/obj/item/clothing/head/mob_holder/holder = new(get_turf(src), src, held_state, head_icon, held_lh, held_rh, worn_slot_flags) - L.visible_message(span_warning("[L] scoops up [src]!")) - L.put_in_hands(holder) + user.visible_message(span_warning("[user] scoops up [src]!")) + user.put_in_hands(holder) /mob/living/proc/set_name() numba = rand(1, 1000) diff --git a/code/modules/mob/living/silicon/silicon_defense.dm b/code/modules/mob/living/silicon/silicon_defense.dm index 86fb4e74910..75cbd83f54f 100644 --- a/code/modules/mob/living/silicon/silicon_defense.dm +++ b/code/modules/mob/living/silicon/silicon_defense.dm @@ -80,13 +80,13 @@ user.add_mood_event("pet_borg", /datum/mood_event/pet_borg) -/mob/living/silicon/attack_drone(mob/living/simple_animal/drone/M) - if(M.combat_mode) +/mob/living/silicon/attack_drone(mob/living/basic/drone/user) + if(user.combat_mode) return return ..() -/mob/living/silicon/attack_drone_secondary(mob/living/simple_animal/drone/M) - if(M.combat_mode) +/mob/living/silicon/attack_drone_secondary(mob/living/basic/drone/user) + if(user.combat_mode) return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN return ..() diff --git a/code/modules/mob/living/simple_animal/animal_defense.dm b/code/modules/mob/living/simple_animal/animal_defense.dm index df97740e69c..103ea7aa147 100644 --- a/code/modules/mob/living/simple_animal/animal_defense.dm +++ b/code/modules/mob/living/simple_animal/animal_defense.dm @@ -98,20 +98,20 @@ var/damage = rand(user.melee_damage_lower, user.melee_damage_upper) return attack_threshold_check(damage, user.melee_damage_type) -/mob/living/simple_animal/attack_slime(mob/living/simple_animal/slime/M, list/modifiers) +/mob/living/simple_animal/attack_slime(mob/living/simple_animal/slime/user, list/modifiers) if(..()) //successful slime attack var/damage = rand(15, 25) - if(M.is_adult) + if(user.is_adult) damage = rand(20, 35) return attack_threshold_check(damage) -/mob/living/simple_animal/attack_drone(mob/living/simple_animal/drone/M) - if(M.combat_mode) //No kicking dogs even as a rogue drone. Use a weapon. +/mob/living/simple_animal/attack_drone(mob/living/basic/drone/user) + if(user.combat_mode) //No kicking dogs even as a rogue drone. Use a weapon. return return ..() -/mob/living/simple_animal/attack_drone_secondary(mob/living/simple_animal/drone/M) - if(M.combat_mode) +/mob/living/simple_animal/attack_drone_secondary(mob/living/basic/drone/user) + if(user.combat_mode) return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN return ..() diff --git a/code/modules/modular_computers/file_system/programs/robocontrol.dm b/code/modules/modular_computers/file_system/programs/robocontrol.dm index cf094e683a9..52bfafdcf8e 100644 --- a/code/modules/modular_computers/file_system/programs/robocontrol.dm +++ b/code/modules/modular_computers/file_system/programs/robocontrol.dm @@ -62,7 +62,7 @@ newbot["mule_check"] = TRUE botlist += list(newbot) - for(var/mob/living/simple_animal/drone/all_drones as anything in GLOB.drones_list) + for(var/mob/living/basic/drone/all_drones as anything in GLOB.drones_list) if(all_drones.hacked) continue if(!is_valid_z_level(current_turf, get_turf(all_drones))) diff --git a/code/modules/shuttle/special.dm b/code/modules/shuttle/special.dm index 5c1e21c56fb..0a18857efed 100644 --- a/code/modules/shuttle/special.dm +++ b/code/modules/shuttle/special.dm @@ -154,7 +154,7 @@ // Bar staff, GODMODE mobs(as long as they stay in the shuttle) that just want to make sure people have drinks // and a good time. -/mob/living/simple_animal/drone/snowflake/bardrone +/mob/living/basic/drone/snowflake/bardrone name = "Bardrone" desc = "A barkeeping drone, a robot built to tend bars." hacked = TRUE @@ -166,9 +166,8 @@ initial_language_holder = /datum/language_holder/universal default_storage = null -/mob/living/simple_animal/drone/snowflake/bardrone/Initialize(mapload) +/mob/living/basic/drone/snowflake/bardrone/Initialize(mapload) . = ..() - access_card.add_access(list(ACCESS_CENT_BAR)) AddComponentFrom(ROUNDSTART_TRAIT, /datum/component/area_based_godmode, area_type = /area/shuttle/escape, allow_area_subtypes = TRUE) /mob/living/simple_animal/hostile/alien/maid/barmaid @@ -230,6 +229,9 @@ if(is_bartender_job(human_user.mind?.assigned_role)) return TRUE + if(istype(user, /mob/living/basic/drone/snowflake/bardrone)) + return TRUE + var/obj/item/card/id/ID = user.get_idcard(FALSE) if(ID && (ACCESS_CENT_BAR in ID.access)) return TRUE diff --git a/code/modules/tgui/states/notcontained.dm b/code/modules/tgui/states/notcontained.dm index 018e0fa0304..b144a375757 100644 --- a/code/modules/tgui/states/notcontained.dm +++ b/code/modules/tgui/states/notcontained.dm @@ -28,5 +28,5 @@ GLOBAL_DATUM_INIT(notcontained_state, /datum/ui_state/notcontained_state, new) /mob/living/silicon/notcontained_can_use_topic(src_object) return default_can_use_topic(src_object) // Silicons use default bevhavior. -/mob/living/simple_animal/drone/notcontained_can_use_topic(src_object) +/mob/living/basic/drone/notcontained_can_use_topic(src_object) return default_can_use_topic(src_object) // Drones use default bevhavior. diff --git a/code/modules/unit_tests/simple_animal_freeze.dm b/code/modules/unit_tests/simple_animal_freeze.dm index ecfa9698362..82fd1cad642 100644 --- a/code/modules/unit_tests/simple_animal_freeze.dm +++ b/code/modules/unit_tests/simple_animal_freeze.dm @@ -33,14 +33,6 @@ /mob/living/simple_animal/bot/secbot/honkbot, /mob/living/simple_animal/bot/secbot/pingsky, /mob/living/simple_animal/bot/vibebot, - /mob/living/simple_animal/drone, - /mob/living/simple_animal/drone/classic, - /mob/living/simple_animal/drone/derelict, - /mob/living/simple_animal/drone/polymorphed, - /mob/living/simple_animal/drone/snowflake, - /mob/living/simple_animal/drone/snowflake/bardrone, - /mob/living/simple_animal/drone/syndrone, - /mob/living/simple_animal/drone/syndrone/badass, /mob/living/simple_animal/hostile, /mob/living/simple_animal/hostile/alien, /mob/living/simple_animal/hostile/alien/drone, diff --git a/modular_skyrat/modules/drone_adjustments/drone.dm b/modular_skyrat/modules/drone_adjustments/drone.dm index 4f0475597c5..dc88e3ac360 100644 --- a/modular_skyrat/modules/drone_adjustments/drone.dm +++ b/modular_skyrat/modules/drone_adjustments/drone.dm @@ -13,17 +13,17 @@ AddComponent(/datum/component/sliding_under) //This is so we log all machinery interactions for drones -/obj/machinery/attack_drone(mob/living/simple_animal/drone/user, list/modifiers) +/obj/machinery/attack_drone(mob/living/basic/drone/user, list/modifiers) . = ..() user.log_message("[key_name(user)] interacted with [src] at [AREACOORD(src)]", LOG_GAME) -/mob/living/simple_animal/drone +/mob/living/basic/drone //So that drones can do things without worrying about stuff shy = FALSE //So drones aren't forced to carry around a nodrop toolbox essentially default_storage = /obj/item/storage/backpack/drone_bag -/mob/living/simple_animal/drone/Initialize(mapload) +/mob/living/basic/drone/Initialize(mapload) . = ..() name = "[initial(name)] [rand(0,9)]-[rand(100,999)]" //So that we can identify drones from each other diff --git a/modular_skyrat/modules/drone_adjustments/slide_component.dm b/modular_skyrat/modules/drone_adjustments/slide_component.dm index 207950e4fd2..6d0ce3f2a39 100644 --- a/modular_skyrat/modules/drone_adjustments/slide_component.dm +++ b/modular_skyrat/modules/drone_adjustments/slide_component.dm @@ -4,7 +4,7 @@ ///The list of allowed mobs to slide under var/static/list/allowed_mobs = list( /mob/living/basic/cortical_borer, - /mob/living/simple_animal/drone, + /mob/living/basic/drone, ) /datum/component/sliding_under/Initialize(allowed_mobs_override = null) diff --git a/tgstation.dme b/tgstation.dme index 6dc3ffb2b2a..7992ffb8f87 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -4481,6 +4481,15 @@ #include "code\modules\mob\living\basic\constructs\artificer.dm" #include "code\modules\mob\living\basic\constructs\construct_ai.dm" #include "code\modules\mob\living\basic\constructs\harvester.dm" +#include "code\modules\mob\living\basic\drone\_drone.dm" +#include "code\modules\mob\living\basic\drone\drone_say.dm" +#include "code\modules\mob\living\basic\drone\drone_tools.dm" +#include "code\modules\mob\living\basic\drone\drones_as_items.dm" +#include "code\modules\mob\living\basic\drone\extra_drone_types.dm" +#include "code\modules\mob\living\basic\drone\interaction.dm" +#include "code\modules\mob\living\basic\drone\inventory.dm" +#include "code\modules\mob\living\basic\drone\verbs.dm" +#include "code\modules\mob\living\basic\drone\visuals_icons.dm" #include "code\modules\mob\living\basic\farm_animals\deer.dm" #include "code\modules\mob\living\basic\farm_animals\pig.dm" #include "code\modules\mob\living\basic\farm_animals\pony.dm" @@ -4832,15 +4841,6 @@ #include "code\modules\mob\living\simple_animal\friendly\cat.dm" #include "code\modules\mob\living\simple_animal\friendly\gondola.dm" #include "code\modules\mob\living\simple_animal\friendly\pet.dm" -#include "code\modules\mob\living\simple_animal\friendly\drone\_drone.dm" -#include "code\modules\mob\living\simple_animal\friendly\drone\drone_say.dm" -#include "code\modules\mob\living\simple_animal\friendly\drone\drone_tools.dm" -#include "code\modules\mob\living\simple_animal\friendly\drone\drones_as_items.dm" -#include "code\modules\mob\living\simple_animal\friendly\drone\extra_drone_types.dm" -#include "code\modules\mob\living\simple_animal\friendly\drone\interaction.dm" -#include "code\modules\mob\living\simple_animal\friendly\drone\inventory.dm" -#include "code\modules\mob\living\simple_animal\friendly\drone\verbs.dm" -#include "code\modules\mob\living\simple_animal\friendly\drone\visuals_icons.dm" #include "code\modules\mob\living\simple_animal\guardian\guardian.dm" #include "code\modules\mob\living\simple_animal\guardian\guardian_creator.dm" #include "code\modules\mob\living\simple_animal\guardian\types\assassin.dm" diff --git a/tools/UpdatePaths/Scripts/79109_simple_to_basic_drone.txt b/tools/UpdatePaths/Scripts/79109_simple_to_basic_drone.txt new file mode 100644 index 00000000000..3dbac143c0a --- /dev/null +++ b/tools/UpdatePaths/Scripts/79109_simple_to_basic_drone.txt @@ -0,0 +1 @@ +/mob/living/simple_animal/drone/@SUBTYPES : /mob/living/basic/drone/@SUBTYPES{@OLD}