(Revival) Mining bar (#31284)

* Starting rework of this

* Slight fix

* Fixing compile issues

* Updating more code

* More updates

* More updates

* Proper name

* Removing unused comsig file

* Fixing up map

* Makes components work

* Make this show up

* Specific type, maybe?

* Vault fixes, plus makes component actually process

* Say proc finally works with events now

* Calling in wrong registered thing

* Unneeded

* Ports hearing to hear component

* Area exit phrase for him too

* Actual event

* Testing this out for fun

* Some more

* Compiles

* Path

* Disambiguates this

* No more runtiming

* Some cleanliness

* Makes this parsing less rigid

* This too

* Much much less rigid

* This shouldn't be in this then

* Make it rotate

* Here

Co-authored-by: kanef <kanef9x@protonmail.com>
This commit is contained in:
kane-f
2021-11-24 17:01:18 +00:00
committed by GitHub
parent 6befd86aa8
commit 31ec6d1da2
15 changed files with 337 additions and 138 deletions

View File

@@ -1,130 +0,0 @@
// Component Signal names.
// Avoids any mishaps caused by typos.
/** Sent when a mob AI component wants to set new machine state.
* @param state mixed: The new machine state (HOSTILE_STANCE_IDLE, etc)
*/
#define COMSIG_STATE "state"
/** Sent when we've been bumped.
* @param movable /atom/movable: The bumping entity.
*/
#define COMSIG_BUMPED "bumped"
/** Sent when we've bumped someone else.
* @param movable /atom/movable: The bumped entity.
*/
#define COMSIG_BUMP "bump"
/** Sent by mob Life() tick. No arguments.
*/
#define COMSIG_LIFE "life"
/** Sent when a mob AI component has identified a new target.
* @param target /atom: The targetted entity.
*/
#define COMSIG_TARGET "target"
/** Sent when a mob wants to move or stop.
* @param dir integer: 0 to stop, NORTH/SOUTH/WEST/EAST/etc to move in that direction.
* @param loc /turf: Specify to move in the direction of that turf.
*/
#define COMSIG_MOVE "move"
/** Sent when a mob wants to take a single step.
* @param dir integer: NORTH/SOUTH/WEST/EAST/etc to move in that direction.
*/
#define COMSIG_STEP "step"
/** BLURB
* @param temp decimal: Adds value to body temperature
*/
#define COMSIG_ADJUST_BODYTEMP "add body temp" // DONE, NEEDS IMPL
/** BLURB
* @param amount decimal: Adjust bruteloss by the given amount.
*/
#define COMSIG_ADJUST_BRUTE "adjust brute loss" // DONE, NEEDS IMPL
/** BLURB
* @param target /atom: The target being attacked.
*/
#define COMSIG_ATTACKING "attacking target" // DONE
/** BLURB
* @param state boolean: Busy if true.
*/
#define COMSIG_BUSY "busy" // DONE, NEEDS IMPL
/** BLURB
* @param temp decimal: Sets body temperature to provided value, in kelvin.
*/
#define COMSIG_SET_BODYTEMP "body temp" // DONE, NEEDS IMPL
/** Sent when a component is added to the container.
* @param component /datum/component: Component being added.
*/
#define COMSIG_COMPONENT_ADDED "component added"
/** Sent when a component is being removed from the container.
* @param component /datum/component: Component being removed.
*/
#define COMSIG_COMPONENT_REMOVING "component removing"
/** Sent when a mob wants to drop the item in its active hand. No arguments.
*/
#define COMSIG_DROP "drop"
/** Sent when a mob wants to click on something.
* @param target /atom: The thing to be clicked on.
*/
#define COMSIG_CLICKON "clickon"
/** Sent when a mob wants to activate a hand which is holding a specific item.
* @param target /atom: The item in question.
*/
#define COMSIG_ACTVHANDBYITEM "actvhandbyitem"
/** Sent when a mob wants to activate an empty hand. No arguments.
*/
#define COMSIG_ACTVEMPTYHAND "actvemptyhand"
/** Sent when a mob wants to throw the item in its active hand at something.
* @param target /atom: The atom at which to throw.
*/
#define COMSIG_THROWAT "throwat"
/** Sent when a mob wants to call attack_self() on the item in its active hand. No arguments.
*/
#define COMSIG_ITMATKSELF "itmatkself"
/** Sent when a mob wants to quick-equip the item in its active hand. No arguments.
*/
#define COMSIG_EQUIPACTVHAND "equipactvhand"
/** Sent when a mob is attacking the controller.
* @param assailant /mob: The mob attacking the controller
* @param damage int: Damage done in this attack
*/
#define COMSIG_ATTACKEDBY "attacked_by"
/** Sent when a mob wants to update their current target zone.
* @param target /mob: What the mob wants to attack
* @param damagetype string: What damagetype will be used (melee, bullet, laser, etc.)
*/
#define COMSIG_GETDEFZONE "get_def_zone"
/** Sent when a mob wants whatever damage type (according to the armor list values) they may be wanting to use.
* @param user /mob: What mob in question is asking for a damage type
* @return a damage type ("melee","laser","energy", etc.)
*/
#define COMSIG_GETDAMTYPE "get_dam_type"

View File

@@ -260,6 +260,12 @@
/event/comp_ai_cmd_set_state
/event/comp_ai_cmd_get_state
/event/comp_ai_cmd_hear
/event/comp_ai_cmd_say
/event/comp_ai_cmd_specific_say
/event/comp_ai_cmd_area_enter
/event/comp_ai_cmd_area_exit
/datum
/// Associative list of type path -> list(),
/// where the type path is a descendant of /event_type.

View File

@@ -434,6 +434,8 @@ var/area/space_area
/area/Entered(atom/movable/Obj, atom/OldLoc)
var/area/oldArea = get_area(OldLoc)
if(oldArea == src)
return 1
if(project_shadows)
Obj.update_shadow()
else if(istype(oldArea) && oldArea.project_shadows)
@@ -447,6 +449,7 @@ var/area/space_area
CallHook("MobAreaChange", list("mob" = mob_in_obj, "new" = src, "old" = oldArea))
INVOKE_EVENT(src, /event/comp_ai_cmd_area_enter, "enterer" = Obj)
var/mob/M = Obj
if(istype(M))
CallHook("MobAreaChange", list("mob" = M, "new" = src, "old" = oldArea)) // /vg/ - EVENTS!
@@ -454,6 +457,7 @@ var/area/space_area
narrator.Crossed(M)
/area/Exited(atom/movable/Obj)
INVOKE_EVENT(src, /event/comp_ai_cmd_area_exit, "exiter" = Obj)
..()
/area/proc/subjectDied(target)

View File

@@ -128,7 +128,7 @@
for(var/obj/O in W.cargo) //Dump contents of stored cargo
O.forceMove(T)
W.cargo -= O
T.Entered(O)
T.Entered(O, src)
if(prob(30))
explosion(T, 0, 0, 1, 3)

View File

@@ -56,13 +56,13 @@
if(M==src.occupant)
continue
M.forceMove(get_turf(src))
M.loc.Entered(M)
M.loc.Entered(M, src)
step_rand(M)
for(var/atom/movable/A in src.cargo)
A.forceMove(get_turf(src))
var/turf/T = get_turf(A)
if(T)
T.Entered(A)
T.Entered(A, src)
step_rand(A)
..()
return

View File

@@ -458,7 +458,9 @@ var/list/barsigns = list()
sound_selection["Bike Horn"] = 'sound/items/bikehorn.ogg'
font_selection += "Wingdings"
/obj/structure/sign/double/barsign/mining
name = "Armok's Bar N Grill"
icon_state = "armokbar"
#undef PREMADE_SCREEN
#undef CUSTOM_SCREEN

View File

@@ -231,7 +231,7 @@
MOB.pulling = was_pulling
was_pulling.pulledby = MOB
if ((A && A.loc))
A.loc.Entered(A)
A.loc.Entered(A, OldLoc)
if (istype(A,/obj/item/projectile))
var/obj/item/projectile/P = A
P.reset()//fixing linear projectile movement

View File

@@ -0,0 +1,26 @@
/datum/component/ai/area_territorial
var/enter_signal
var/list/enter_args
var/exit_signal
var/list/exit_args
var/area/territory = null
/datum/component/ai/area_territorial/proc/SetArea(var/area/new_area)
if(territory)
territory.unregister_event(/event/comp_ai_cmd_area_enter, src, .proc/area_enter)
territory.unregister_event(/event/comp_ai_cmd_area_exit, src, .proc/area_exit)
territory = new_area
territory.register_event(/event/comp_ai_cmd_area_enter, src, .proc/area_enter)
territory.register_event(/event/comp_ai_cmd_area_exit, src, .proc/area_exit)
/datum/component/ai/area_territorial/proc/area_enter(var/obj/enterer)
if(isliving(enterer)) // No ghosts
INVOKE_EVENT(parent, enter_signal, enter_args)
/datum/component/ai/area_territorial/proc/area_exit(var/obj/exiter)
if(isliving(exiter)) // No ghosts
INVOKE_EVENT(parent, exit_signal, exit_args)
/datum/component/ai/area_territorial/say
enter_signal = /event/comp_ai_cmd_specific_say
exit_signal = /event/comp_ai_cmd_specific_say

View File

@@ -0,0 +1,52 @@
/datum/component/ai/conversation
var/list/messages = list()
/datum/component/ai/conversation/initialize()
parent.register_event(/event/comp_ai_cmd_say, src, .proc/cmd_say)
parent.register_event(/event/comp_ai_cmd_specific_say, src, .proc/cmd_specific_say)
return TRUE
/datum/component/ai/conversation/Destroy()
parent.unregister_event(/event/comp_ai_cmd_say, src, .proc/cmd_say)
parent.unregister_event(/event/comp_ai_cmd_specific_say, src, .proc/cmd_specific_say)
..()
/datum/component/ai/conversation/proc/cmd_say()
if(isliving(parent))
var/mob/living/M=parent
M.say("[pick(messages)]")
/datum/component/ai/conversation/proc/cmd_specific_say(var/list/to_say)
if(isliving(parent))
var/mob/living/M=parent
M.say("[pick(to_say)]")
/datum/component/ai/conversation/auto
var/speech_prob = 30
var/next_speech
var/speech_delay
var/datum/component/ai/target_finder/finder = null
/datum/component/ai/conversation/auto/initialize()
if(..())
finder = parent.get_component(/datum/component/ai/target_finder/simple_view)
active_components += src
return TRUE
/datum/component/ai/conversation/auto/Destroy()
active_components -= src
..()
/datum/component/ai/conversation/auto/process()
if(finder && next_speech < world.time && prob(speech_prob))
var/listener
for(var/mob/living/M in finder.cmd_find_targets())
if(M == src)
continue
if(M.isDead()) //No speaking to the dead
continue
listener = TRUE
break
if(listener)
next_speech = world.time+speech_delay
cmd_say()

View File

@@ -0,0 +1,43 @@
/datum/component/ai/hearing
var/hear_signal
var/list/required_messages = list()
var/list/hear_args
var/response_delay = 10
/datum/component/ai/hearing/initialize()
parent.register_event(/event/comp_ai_cmd_hear, src, .proc/on_hear)
return TRUE
/datum/component/ai/hearing/Destroy()
parent.unregister_event(/event/comp_ai_cmd_hear, src, .proc/on_hear)
..()
/datum/component/ai/hearing/proc/on_hear(var/datum/speech/speech)
var/filtered_message = speech.message
filtered_message = replacetext(filtered_message , "?" , "") //Ignores punctuation.
filtered_message = replacetext(filtered_message , "!" , "") //Ignores punctuation.
filtered_message = replacetext(filtered_message , "." , "") //Ignores punctuation.
filtered_message = replacetext(filtered_message , "," , "") //Ignores punctuation.
if(speech.speaker != parent)
if(!required_messages.len)
sleep(response_delay)
INVOKE_EVENT(parent, hear_signal, hear_args)
else
for(var/message in required_messages)
if(findtext(filtered_message,message))
sleep(response_delay)
INVOKE_EVENT(parent, hear_signal, hear_args)
return
/datum/component/ai/hearing/say
hear_signal = /event/comp_ai_cmd_say
/datum/component/ai/hearing/say_response
hear_signal = /event/comp_ai_cmd_specific_say
/datum/component/ai/hearing/say_response/time
required_messages = list("what time is it","whats the time","do you have the time")
/datum/component/ai/hearing/say_response/time/on_hear(var/datum/speech/speech)
hear_args = list("The current time is [worldtime2text()].")
..()

View File

@@ -119,6 +119,13 @@
file_path = "maps/randomvaults/mining/angie_lair.dmm"
can_rotate = TRUE
/datum/map_element/mining_surprise/mine_bar
name = "The Buried Bar"
desc = "A miner walks into a bar, Dusky says \"Sorry, you're too young to be served\"."
file_path = "maps/randomvaults/mining/bar.dmm"
can_rotate = TRUE
/datum/map_element/hoboshack
name = "Space hobo shack"
@@ -128,4 +135,4 @@
name = "Space hobo shack"
file_path = "maps/misc/hoboshack.dmm"
can_rotate = TRUE
can_rotate = TRUE

View File

@@ -244,6 +244,7 @@ var/list/headset_modes = list(
if(V.spread & SPREAD_MEMETIC)
infect_disease2(V, notes="(Memed, from [L])")
INVOKE_EVENT(src, /event/comp_ai_cmd_hear, "speech" = speech)
if(!client)
return
say_testing(src, "[src] ([src.type]) has heard a message (lang=[speech.language ? speech.language.name : "null"])")
@@ -291,7 +292,6 @@ var/list/headset_modes = list(
show_message(rendered_message, type, deaf_message, deaf_type, src)
else if (!client.prefs.no_goonchat_for_obj || length_char(speech.message) > client?.prefs.max_chat_length) // Objects : only display if no goonchat on map or if the runemessage is too small.
show_message(rendered_message, type, deaf_message, deaf_type, src)
return rendered_message
/mob/living/proc/hear_radio_only()

View File

@@ -0,0 +1,122 @@
"ab" = (/turf/simulated/wall/mineral/wood,/area/mining_bar)
"ac" = (/obj/structure/table/woodentable,/obj/item/weapon/reagent_containers/food/drinks/bottle/wine{pixel_x = 4; pixel_y = 15},/obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey{pixel_x = -8; pixel_y = 15},/obj/item/weapon/reagent_containers/food/drinks/bottle/rum{pixel_x = 13; pixel_y = 12},/obj/item/weapon/reagent_containers/food/drinks/drinkingglass{pixel_x = 2; pixel_y = 4},/turf/simulated/floor/wood,/area/mining_bar)
"ad" = (/obj/structure/table/woodentable,/obj/machinery/chem_dispenser/booze_dispenser{pixel_y = 18},/turf/simulated/floor/wood,/area/mining_bar)
"ae" = (/obj/structure/table/woodentable,/turf/simulated/floor/wood,/area/mining_bar)
"af" = (/obj/structure/closet/secure_closet/freezer/fridge,/turf/simulated/floor{dir = 8; icon_state = "barber"},/area/mining_bar)
"ag" = (/obj/structure/table,/obj/machinery/reagentgrinder,/turf/simulated/floor{dir = 8; icon_state = "barber"},/area/mining_bar)
"ah" = (/obj/structure/sink{dir = 8; pixel_x = -11},/turf/simulated/floor{dir = 8; icon_state = "barber"},/area/mining_bar)
"aj" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 4},/turf/simulated/floor{dir = 8; icon_state = "barber"},/area/mining_bar)
"ak" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{dir = 10},/turf/simulated/floor{dir = 8; icon_state = "barber"},/area/mining_bar)
"al" = (/obj/structure/closet/secure_closet/freezer/meat,/obj/structure/hanging_lantern{dir = 1},/turf/simulated/floor{dir = 8; icon_state = "barber"},/area/mining_bar)
"am" = (/obj/structure/closet/secure_closet/freezer/kitchen/mining,/turf/simulated/floor{dir = 8; icon_state = "barber"},/area/mining_bar)
"an" = (/obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden{dir = 1},/turf/simulated/floor{dir = 8; icon_state = "barber"},/area/mining_bar)
"ao" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{dir = 4},/turf/simulated/wall/mineral/wood,/area/mining_bar)
"ap" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{dir = 4},/turf/simulated/floor/carpet,/area/mining_bar)
"aq" = (/obj/structure/table/woodentable,/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{dir = 9},/obj/item/weapon/reagent_containers/food/snacks/grilledcheese,/turf/simulated/floor/wood,/area/mining_bar)
"as" = (/obj/machinery/alarm,/turf/simulated/wall/mineral/wood,/area/mining_bar)
"at" = (/obj/structure/table/woodentable,/obj/structure/hanging_lantern{dir = 1},/turf/simulated/floor/wood,/area/mining_bar)
"au" = (/obj/structure/table/woodentable,/obj/machinery/chem_dispenser/soda_dispenser{pixel_x = 0; pixel_y = 14},/turf/simulated/floor/wood,/area/mining_bar)
"av" = (/obj/structure/table/woodentable,/obj/machinery/chem_dispenser/brewer{pixel_y = 11},/turf/simulated/floor/wood,/area/mining_bar)
"aw" = (/turf/simulated/floor/plating{icon_state = "platingdmg2"},/area/mining_bar)
"ax" = (/obj/item/weapon/stool,/turf/simulated/floor/wood,/area/mining_bar)
"ay" = (/obj/structure/table,/obj/item/weapon/kitchen/rollingpin,/obj/structure/hanging_lantern{dir = 1},/turf/simulated/floor{dir = 8; icon_state = "barber"},/area/mining_bar)
"az" = (/obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden{dir = 8},/turf/simulated/floor{dir = 8; icon_state = "barber"},/area/mining_bar)
"aA" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 10},/turf/simulated/floor/carpet,/area/mining_bar)
"aB" = (/obj/structure/table,/obj/machinery/microwave,/turf/simulated/floor{dir = 8; icon_state = "barber"},/area/mining_bar)
"aC" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 6},/turf/simulated/floor/plating,/area/mining_bar)
"aE" = (/obj/machinery/atmospherics/unary/vent_pump{dir = 1; external_pressure_bound = 101.325; on = 1},/turf/simulated/floor/carpet,/area/mining_bar)
"aG" = (/obj/structure/table/woodentable,/obj/item/weapon/storage/box/drinkingglasses{pixel_x = -4; pixel_y = 13},/obj/item/weapon/storage/box/mugs{pixel_x = 10; pixel_y = 12},/obj/item/weapon/storage/box/condimentbottles{pixel_x = -3; pixel_y = -1},/obj/item/weapon/storage/box/donkpockets/random_amount{pixel_x = 10; pixel_y = -1},/turf/simulated/floor/wood,/area/mining_bar)
"aJ" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 6},/obj/structure/reagent_dispensers/beerkeg,/turf/simulated/floor{dir = 8; icon_state = "barber"},/area/mining_bar)
"aK" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 4},/turf/simulated/wall/mineral/wood,/area/mining_bar)
"aL" = (/obj/machinery/atmospherics/pipe/manifold/supply/hidden{dir = 1},/turf/simulated/floor{dir = 8; icon_state = "barber"},/area/mining_bar)
"aN" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 4},/turf/simulated/floor/plating,/area/mining_bar)
"aO" = (/obj/machinery/atmospherics/pipe/manifold/supply/hidden{dir = 4},/turf/simulated/floor/carpet,/area/mining_bar)
"aP" = (/obj/machinery/atmospherics/unary/vent_scrubber{dir = 4; on = 0; scrub_CO2 = 0; scrub_Toxins = 0},/turf/simulated/floor/carpet,/area/mining_bar)
"aQ" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{dir = 4},/mob/living/silicon/robot/NPC/dusky,/turf/simulated/floor/carpet,/area/mining_bar)
"aR" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{dir = 4},/turf/simulated/floor{dir = 8; icon_state = "barber"},/area/mining_bar)
"aS" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden,/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{dir = 4},/turf/simulated/floor/carpet,/area/mining_bar)
"aT" = (/obj/machinery/atmospherics/unary/vent_pump{dir = 1; external_pressure_bound = 101.325; on = 1},/turf/simulated/floor{dir = 8; icon_state = "barber"},/area/mining_bar)
"aU" = (/obj/machinery/atmospherics/unary/vent_scrubber{dir = 4; on = 0; scrub_CO2 = 0; scrub_Toxins = 0},/turf/simulated/floor{dir = 8; icon_state = "barber"},/area/mining_bar)
"aV" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden,/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{dir = 4},/turf/simulated/floor{dir = 8; icon_state = "barber"},/area/mining_bar)
"aW" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{dir = 9},/turf/simulated/floor{dir = 8; icon_state = "barber"},/area/mining_bar)
"aX" = (/turf/simulated/floor/plating{icon_state = "platingdmg3"},/area/mining_bar)
"aY" = (/obj/structure/table/woodentable,/obj/machinery/atmospherics/pipe/simple/supply/hidden,/turf/simulated/floor/wood,/area/mining_bar)
"aZ" = (/obj/item/weapon/stool,/obj/machinery/atmospherics/pipe/simple/supply/hidden,/turf/simulated/floor/wood,/area/mining_bar)
"ba" = (/obj/item/trash/cigbutt,/turf/simulated/floor/plating,/area/mining_bar)
"bb" = (/turf/simulated/wall/invulnerable/r_wall,/area/mining_bar)
"bc" = (/turf/simulated/floor/plating,/area/mining_bar)
"bd" = (/obj/machinery/vaporizer,/turf/simulated/floor/engine,/area/mining_bar)
"be" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 4},/obj/machinery/smartfridge/drinks,/turf/simulated/wall/mineral/wood,/area/mining_bar)
"bf" = (/obj/machinery/atmospherics/unary/tank/oxygen{starting_volume = 3200},/turf/simulated/floor/engine,/area/mining_bar)
"bg" = (/obj/abstract/map/spawner/maint,/obj/structure/rack,/obj/abstract/map/spawner/maint,/turf/simulated/floor/engine,/area/mining_bar)
"bh" = (/obj/machinery/power/terminal{dir = 8},/obj/structure/cable{d2 = 4; icon_state = "0-4"},/turf/simulated/floor/engine,/area/mining_bar)
"bi" = (/obj/structure/bed/chair/comfy/couch/left/teal{dir = 4; icon_state = "couch_left"},/turf/simulated/floor/carpet,/area/mining_bar)
"bj" = (/obj/structure/bed/chair/comfy/couch/right/teal{dir = 8},/turf/simulated/floor/carpet,/area/mining_bar)
"bk" = (/obj/machinery/atmospherics/pipe/manifold/supply/hidden{dir = 1},/turf/simulated/floor/plating,/area/mining_bar)
"bl" = (/obj/abstract/map/spawner/robot/clean,/turf/simulated/floor/wood,/area/mining_bar)
"bm" = (/obj/machinery/power/terminal{dir = 1},/obj/structure/cable{d2 = 4; icon_state = "0-4"},/obj/machinery/power/apc{dir = 1; environ = 1; equipment = 1; lighting = 1; locked = 0; name = "apc"; pixel_y = 24},/turf/simulated/floor/engine,/area/mining_bar)
"bn" = (/obj/machinery/power/battery/smes,/obj/structure/cable{d2 = 8; icon_state = "0-8"},/turf/simulated/floor/engine,/area/mining_bar)
"bo" = (/obj/structure/cable{d2 = 8; icon_state = "0-8"},/obj/machinery/power/port_gen/pacman,/turf/simulated/floor/engine,/area/mining_bar)
"bp" = (/turf/simulated/floor{dir = 8; icon_state = "barber"},/area/mining_bar)
"br" = (/turf/simulated/floor/carpet,/area/mining_bar)
"bs" = (/obj/machinery/atmospherics/pipe/manifold/supply/visible{color = "#0000B7"; dir = 8; name = "Mix pipe"},/turf/simulated/floor/engine,/area/mining_bar)
"bv" = (/obj/machinery/atmospherics/trinary/mixer{dir = 4; icon_state = "intact_on"; name = "Gas mixer (N2/O2)"; node1_concentration = 0.2; node2_concentration = 0.8; on = 1; target_pressure = 4500},/turf/simulated/floor/engine,/area/mining_bar)
"bw" = (/obj/machinery/atmospherics/pipe/simple/supply/visible{dir = 4},/turf/simulated/floor/engine,/area/mining_bar)
"bx" = (/obj/structure/bed/chair/comfy/couch/right/teal{dir = 4; icon_state = "couch_right"},/turf/simulated/floor/carpet,/area/mining_bar)
"by" = (/obj/structure/bed/chair/comfy/couch/left/teal{dir = 8},/turf/simulated/floor/carpet,/area/mining_bar)
"bz" = (/obj/machinery/door/airlock/maintenance{name = "Bar Storage"; req_access_txt = 0; req_one_access_txt = "25;28"},/turf/simulated/floor/plating,/area/mining_bar)
"bA" = (/obj/machinery/atmospherics/pipe/simple/supply/visible,/turf/simulated/floor/engine,/area/mining_bar)
"bC" = (/obj/structure/hanging_lantern{dir = 8},/turf/simulated/floor/engine,/area/mining_bar)
"bD" = (/obj/machinery/atmospherics/trinary/filter/mirrored{dir = 8; filter_type = 1; icon_state = "hintactm_off"; on = 1},/turf/simulated/floor/engine,/area/mining_bar)
"bE" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/visible{dir = 5; icon_state = "intact"},/turf/simulated/floor/engine,/area/mining_bar)
"bF" = (/obj/machinery/atmospherics/pipe/manifold/supply/visible,/turf/simulated/floor/engine,/area/mining_bar)
"bH" = (/turf/simulated/floor/engine,/area/mining_bar)
"bI" = (/obj/machinery/atmospherics/trinary/filter/mirrored{dir = 1; filter_type = 2; icon_state = "hintactm_off"; on = 1},/turf/simulated/floor/engine,/area/mining_bar)
"bJ" = (/obj/machinery/atmospherics/unary/tank/nitrogen{dir = 8},/turf/simulated/floor/engine,/area/mining_bar)
"bK" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/visible{dir = 4},/turf/simulated/floor/engine,/area/mining_bar)
"bL" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/visible,/turf/simulated/floor/engine,/area/mining_bar)
"bN" = (/obj/structure/piano/random{dir = 4; icon_state = "piano"},/turf/simulated/floor/wood,/area/mining_bar)
"bP" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/visible{dir = 10; icon_state = "intact"},/turf/simulated/floor/engine,/area/mining_bar)
"bR" = (/turf/simulated/floor/plating{icon_state = "panelscorched"; tag = "icon-panelscorched"},/area/mining_bar)
"bS" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden,/turf/simulated/floor/plating,/area/mining_bar)
"bT" = (/turf/simulated/floor/wood,/area/mining_bar)
"bU" = (/obj/machinery/atmospherics/unary/vent{dir = 1},/turf/unsimulated/floor/asteroid,/area/mine/explored)
"bV" = (/obj/structure/sign/double/barsign/mining,/turf/simulated/wall/invulnerable/r_wall,/area/mining_bar)
"bW" = (/turf/unsimulated/floor/asteroid,/area/mine/explored)
"bX" = (/turf/unsimulated/mineral/random,/area/mine/explored)
"bY" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 9; pixel_y = 0},/turf/simulated/floor/plating,/area/mining_bar)
"bZ" = (/obj/structure/window/reinforced/plasma,/obj/structure/window/reinforced/plasma{dir = 8},/obj/structure/window/reinforced/plasma{dir = 1},/obj/structure/grille,/turf/simulated/floor/plating,/area/mining_bar)
"ca" = (/turf/simulated/wall/mineral/wood,/area/mine/explored)
"cb" = (/obj/machinery/door/airlock/external,/obj/machinery/atmospherics/pipe/simple/supply/hidden,/turf/simulated/floor/plating,/area/mining_bar)
"gm" = (/obj/structure/table/woodentable,/obj/item/ashtray/bronze,/obj/item/weapon/storage/fancy/matchbox,/obj/item/trash/cigbutt/cigarbutt,/turf/simulated/floor/carpet,/area/mining_bar)
"gX" = (/obj/structure/hanging_lantern{dir = 1},/turf/unsimulated/floor/asteroid,/area/mine/explored)
"mx" = (/obj/structure/table,/obj/item/weapon/storage/toolbox/robotics,/obj/item/weapon/book/manual/robotics_cyborgs,/turf/simulated/floor/engine,/area/mining_bar)
"qv" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/visible{dir = 1; icon_state = "intact"},/turf/simulated/wall/invulnerable/r_wall,/area/mining_bar)
"qC" = (/obj/structure/window/reinforced/plasma,/obj/structure/window/reinforced/plasma{dir = 1},/obj/structure/window/reinforced/plasma{dir = 4},/obj/structure/grille,/turf/simulated/floor/plating,/area/mining_bar)
"tr" = (/obj/machinery/atmospherics/unary/vent_pump{dir = 1; external_pressure_bound = 101.325; on = 1},/turf/simulated/floor/plating,/area/mine/explored)
"Da" = (/obj/structure/window/reinforced/plasma,/obj/structure/window/reinforced/plasma{dir = 1},/obj/structure/grille,/turf/simulated/floor/plating,/area/mining_bar)
"Iz" = (/obj/structure/table,/obj/abstract/map/spawner/engi/materials,/obj/abstract/map/spawner/engi/materials,/turf/simulated/floor/engine,/area/mining_bar)
"KG" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/visible{dir = 1; icon_state = "intact"},/turf/simulated/floor/engine,/area/mining_bar)
"MH" = (/obj/machinery/recharge_station,/turf/simulated/floor/engine,/area/mining_bar)
"PG" = (/obj/structure/table,/obj/item/weapon/storage/toolbox/mechanical,/turf/simulated/floor/engine,/area/mining_bar)
"Rq" = (/obj/machinery/door/airlock/external,/turf/simulated/floor/plating,/area/mine/explored)
"TO" = (/obj/effect/glowshroom,/turf/unsimulated/floor/asteroid,/area/mine/explored)
(1,1,1) = {"
bXabababbXbXbXabababababababababbXbXbX
ababalababababababacadauavatbTabasabbX
abafbpamabaBayagabbcaCaAbraGbcaxbNabab
abahbpaJaKajajaLaNaNaOaEaPbTbcaXbcbTab
abaUakaTabaUanaVaoapaSaQaqbTbTbcawbTab
abbpazaRaRaRaWaTabaeaYaeaebcbTaXaXbcab
ababbzababababababaxaZaxaxbcbabTblbTab
bbbgbLbfbmbnbhboabbcbSbcbRbcbcbibrbjab
bbbgbLbsbwbwbvbwbebkbYbcbTbRbTbxbrbyab
bbbCbEbDbKbPbAbHbbcbabbZDaqCabgmbcabab
bbMHbHbHbHbIbFbJbbtrcabWbWbWababababbX
bbbbPGmxIzKGbdbbbbRqcabWbWbWbXbXbXbXbX
bXbbbbbbbbqvbVbbbWbWgXbWbWbWbWbXbXbXbX
bXbXbXbXbXbUbWbWbWbWbWbWTObWbWbWbWTObX
bXbXbXbXTObWbXbWbWbWbWbWbWTObWbXbWbWbX
bXbXbXbWbWbXbXbXbXbWbWbWbWbXbXbXbWbWbX
"}

View File

@@ -0,0 +1,64 @@
/area/mining_bar
name = "Armok's Bar and Grill"
icon_state = "bar"
/mob/living/silicon/robot/NPC
flags = HEAR_ALWAYS | PROXMOVE //For hearer events
/mob/living/silicon/robot/NPC/updatename()
return
/mob/living/silicon/robot/NPC/New()
..()
initialize_NPC_components()
/mob/living/silicon/robot/NPC/proc/initialize_NPC_components()
add_component(/datum/component/controller/movement/astar)
/mob/living/silicon/robot/NPC/dusky
name = "Dusky"
desc = "A little rusted at the creases, but this barbot is still happy to serve so long as the generator is running"
icon_state = "kodiak-service"
/mob/living/silicon/robot/NPC/dusky/initialize_NPC_components()
..()
var/datum/component/ai/target_finder/simple_view/SV = add_component(/datum/component/ai/target_finder/simple_view)
SV.range = 3
var/datum/component/ai/conversation/auto/C = add_component(/datum/component/ai/conversation/auto)
C.messages = list("I hear the weather on some of them planets ain't too nice to be caught out in. Especially them 'Gas Giants'.",
"Still's on the fritz again. Sorry if you're tasting pulp or ashes in your liquor.",
"I wonder if you can brew Plasma. Ought to try it if yonder miners bring in enough for a happy hour.",
"You ever hear about those 'Goliaths'? Apparently their hide's as hard as plasteel!",
"I should get a poker table...",
"You ever try glowshroom rum? I've been informed it's \[WARNING: PRODUCT RECALL - 'Glowshroom Rum' - Unsafe for human consumption\]",
"You'd think more people would show up to a bar in the middle of nowhere.",
"The time is [worldtime2text()], anyone interested in a liquid lunch?")
C.speech_delay = 25 SECONDS
C.next_speech = world.time+C.speech_delay
add_component(/datum/component/ai/hearing/say_response/dusky_hi)
add_component(/datum/component/ai/hearing/say_response/dusky_who)
add_component(/datum/component/ai/hearing/say_response/dusky_when)
add_component(/datum/component/ai/hearing/say_response/time)
var/datum/component/ai/area_territorial/say/AT = add_component(/datum/component/ai/area_territorial/say)
AT.SetArea(get_area(src))
AT.enter_args = list("Welcome to Armok's Bar and Grill. Put your plasma on the counter and bring up a seat.",
"Welcome to Armok's Bar and Grill. Have a nice stay!",
"Welcome to Armok's Bar and Grill. Don't drag the roid dirt in on them boots, leave em at the door.")
AT.exit_args = list("Seeya, space dorf","Happy trails.","Anytime, feller.")
/datum/component/ai/hearing/say_response/dusky_hi
required_messages = list("hello","hi","greetings","howdy")
hear_args = list("Howdy!","Good to see ya, friend!","Back atcha, feller!")
/datum/component/ai/hearing/say_response/dusky_who
required_messages = list("who are you","whos this","whats your name")
hear_args = list("The name's Dusky, service brand bot, built to serve you fellers the finest plasm- I mean, ethanol based beverages!")
/datum/component/ai/hearing/say_response/dusky_when
required_messages = list("how long have you been out here","when were you made","how old are you")
/datum/component/ai/hearing/say_response/dusky_when/initialize()
if(..())
hear_args = list("My production serial seems to be dated to roughly [rand(2300,2399)], ain't seen a customer in about [rand(12,120)] years.")
return TRUE

View File

@@ -29,7 +29,6 @@
#include "__DEFINES\colors.dm"
#include "__DEFINES\communications.dm"
#include "__DEFINES\component_desires.dm"
#include "__DEFINES\component_signals.dm"
#include "__DEFINES\dates.dm"
#include "__DEFINES\disease2.dm"
#include "__DEFINES\error_hander.dm"
@@ -1509,12 +1508,15 @@
#include "code\modules\clothing\under\jobs\security.dm"
#include "code\modules\cmc\crew.dm"
#include "code\modules\components\ai\ai_component.dm"
#include "code\modules\components\ai\area_territorial.dm"
#include "code\modules\components\ai\atmos.dm"
#include "code\modules\components\ai\controller.dm"
#include "code\modules\components\ai\conversation.dm"
#include "code\modules\components\ai\def_zone_handler.dm"
#include "code\modules\components\ai\door_opener.dm"
#include "code\modules\components\ai\controllers\movement.dm"
#include "code\modules\components\ai\controllers\simple_animal.dm"
#include "code\modules\components\ai\hearing.dm"
#include "code\modules\components\ai\hostile\escape_confinement.dm"
#include "code\modules\components\ai\hostile\hunt.dm"
#include "code\modules\components\ai\hostile\melee\attack_animal.dm"
@@ -2777,6 +2779,7 @@
#include "maps\randomvaults\objects.dm"
#include "maps\randomvaults\sokoban.dm"
#include "maps\randomvaults\spessmart.dm"
#include "maps\randomvaults\mining\mining_surprise_items.dm"
#include "maps\randomvaults\snaxi\snaxivault_defines.dm"
#include "maps\RandomZLevels\Academy.dm"
#include "maps\RandomZLevels\assistantChamber.dm"