Here we go again

This commit is contained in:
variableundefined
2019-05-03 21:47:07 +08:00
parent 81b7fbc491
commit 6e79364b65
46 changed files with 262 additions and 2623 deletions
@@ -152,14 +152,6 @@
/obj/machinery/door/unpowered/hotel_door/autoclose()
if(!density && !operating && autoclose)
close()
/obj/machinery/door/unpowered/hotel_door/emag_act(mob/user)
if(isliving(user) && density)
var/obj/effect/hotel_controller/H
if(H.controller)
H.controller.deploy_sec(user)
..()
/obj/item/card/hotel_card
name = "Key Card"
icon_state = "guest"
@@ -283,20 +275,4 @@
spawn(300)
if(D.occupant == deadbeat)
// they still haven't checked out...
deploy_sec(deadbeat)
checkout(roomid)
/obj/effect/hotel_controller/proc/deploy_sec(mob/living/target)
if(!istype(target) || !istype(get_area(target), /area/awaymission/spacehotel))
return
var/list/secs[0]
for(var/mob/living/carbon/human/interactive/away/hotel/guard/M in get_area(src))
if(!M.retal)
secs += M
var/mob/living/carbon/human/interactive/away/hotel/guard/S = safepick(secs)
if(!S)
return
S.retal_target = target
S.retal = 1
checkout(roomid)
@@ -1,132 +0,0 @@
/mob/living/carbon/human/interactive/away/hotel
away_area = /area/awaymission/spacehotel
override_under = /obj/item/clothing/under/mafia
chattyness = SNPC_CHANCE_TALK / 4
/mob/living/carbon/human/interactive/away/hotel/Initialize(mapload)
. = ..(mapload, /datum/species/skrell)
/mob/living/carbon/human/interactive/away/hotel/doSetup()
..()
MYID.access = list(access_syndicate)
RPID.access = list(access_syndicate)
/mob/living/carbon/human/interactive/away/hotel/guard
default_job = /datum/job/officer
/mob/living/carbon/human/interactive/away/hotel/guard/doSetup()
..("Guard")
// anti-pinata cheese
var/obj/item/implant/dust/D = new /obj/item/implant/dust(src)
D.implant(src)
for(var/obj/item/I in get_all_slots())
I.flags |= NODROP
/mob/living/carbon/human/interactive/away/hotel/guard/KnockOut()
// you'll never take me alive (this triggers the implant)
emote("deathgasp")
if(stat != DEAD)
// mission failed. we'll get em next time
..()
/mob/living/carbon/human/interactive/away/hotel/chef
default_job = /datum/job/chef
away_area = /area/awaymission/spacehotel/kitchen
override_under = /obj/item/clothing/under/mafia/vest
/mob/living/carbon/human/interactive/away/hotel/bartender
default_job = /datum/job/bartender
override_under = /obj/item/clothing/under/mafia/vest
/mob/living/carbon/human/interactive/away/hotel/concierge
override_under = /obj/item/clothing/under/mafia/white
away_area = /area/awaymission/spacehotel/reception
var/list/known_guests[0]
var/obj/effect/hotel_controller/hotel
var/obj/item/card/id/last_seen_id = null
/mob/living/carbon/human/interactive/away/hotel/concierge/random()
..()
equip_or_collect(new /obj/item/clipboard(src), slot_l_hand)
/mob/living/carbon/human/interactive/away/hotel/concierge/doSetup()
..("Concierge")
/mob/living/carbon/human/interactive/away/hotel/concierge/setup_job()
favoured_types = list(/obj/item/paper, /obj/item/clipboard)
functions += list("stamping", "concierge")
restrictedJob = 1
/mob/living/carbon/human/interactive/away/hotel/concierge/proc/concierge()
if(!hotel)
hotel = hotel.controller
if(!hotel)
return
var/verbs_use = pick_list(speak_file, "verbs_use")
var/verbs_touch = pick_list(speak_file, "verbs_touch")
var/verbs_move = pick_list(speak_file, "verbs_move")
var/nouns_generic = pick_list(speak_file, "nouns_generic")
var/adjective_insult = pick_list(speak_file, "adjective_insult")
var/adjective_objects = pick_list(speak_file, "adjective_objects")
var/adjective_generic = pick_list(speak_file, "adjective_generic")
var/curse_words = pick_list(speak_file, "curse_words")
var/found = 0
for(var/mob/living/carbon/human/H in nearby - known_guests)
pointed(H)
known_guests += H
found = 1
if(found)
say("Welcome to [hotel], [nouns_generic]! Please check in by [ing_verb(verbs_move)] and [ing_verb(verbs_use)] your [adjective_objects] ID onto the table.")
return
var/obj/item/card/id
var/id_seen = 0
for(var/obj/item/card/id/I in get_area(src))
id_seen = 1
if(I != last_seen_id)
id = I
if(!id_seen)
last_seen_id = null
return
if(!id)
return
var/turf/idloc = get_turf(id)
if(!Adjacent(idloc))
tryWalk(idloc)
else
// is the last jerk that touched it over here?
var/mob/id_owner
for(var/mob/living/carbon/human/H in nearby)
if(H.ckey == id.fingerprintslast)
id_owner = H
break
if(!id_owner)
say("Whose card is this?")
pointed(id)
return
last_seen_id = id
// Checking in or out?
if(id_owner in hotel.guests)
// Check out
say ("Hope you enjoyed your [adjective_objects] stay at our [adjective_generic] hotel!")
hotel.checkout(hotel.guests[id_owner])
else
// pick a room
var/obj/machinery/door/unpowered/hotel_door/D = safepick(hotel.vacant_rooms)
if(!D)
say("Sorry, all the [adjective_objects] are occupied currently.")
else
// Check in
say("$100 per 10 minutes. The cost will be automatically [past_verb(verbs_touch)] while you're checked in.")
var/obj/item/card/hotel_card/K = hotel.checkin(D.id, id_owner, id)
if(K)
K.forceMove(idloc)
else
say("Your [adjective_insult] [curse_words] card was rejected.")
-85
View File
@@ -1,85 +0,0 @@
/mob/living/carbon/human/interactive/away
var/away_area = /area/awaymission // their overriden job area
var/override_under = null // optional type for uniform, else default for job
var/squad_member = 0 // was spawned by squad
var/home_z
/mob/living/carbon/human/interactive/away/Initialize(mapload)
. = ..()
TRAITS |= TRAIT_ROBUST
faction += "away"
/mob/living/carbon/human/interactive/away/random()
..()
// a little hacky but it should prevent doubled uniforms
if(ispath(override_under, /obj/item/clothing/under))
var/old_under = w_uniform
w_uniform = null
equip_to_slot(new override_under(src), slot_w_uniform)
qdel(old_under)
/mob/living/carbon/human/interactive/away/doSetup()
..()
var/datum/data/pda/app/messenger/M = MYPDA.find_program(/datum/data/pda/app/messenger)
M.toff = 1
/mob/living/carbon/human/interactive/away/job2area()
return away_area
/mob/living/carbon/human/interactive/away/doProcess()
if(!home_z)
home_z = get_turf(z)
if(home_z != get_turf(z))
gib()
..()
/obj/effect/spawner/snpc_squad
name = "squad spawner"
icon = 'icons/mob/screen_gen.dmi'
icon_state = "x"
density = 0
opacity = 0
invisibility = 101
var/squad_type = /mob/living/carbon/human/interactive/away
var/squad_size = 3
var/global/list/squads[0]
var/list/squad
/obj/effect/spawner/snpc_squad/New()
START_PROCESSING(SSobj, src)
squad = squads[squad_type]
if(!squad)
squad = list()
squads[squad_type] = squad
squad += src
/obj/effect/spawner/snpc_squad/Destroy()
squad = null
STOP_PROCESSING(SSobj, src)
return ..()
/obj/effect/spawner/snpc_squad/process()
// check squad memebers
var/living = 0
for(var/mob/living/carbon/human/interactive/away/A in squad)
if(!A.stat)
living++
else
// see if anyone's looking, if not, despawn
var/can_despawn = 1
for(var/mob/living/M in viewers(A, world.view + 1))
if(M.client)
living++ // dead guy that can be seen still takes up a slot
can_despawn = 0
break
if(can_despawn)
squad -= A
qdel(A)
// spawn new ones
if(living < squad_size && !length(viewers(src, world.view)))
var/mob/living/carbon/human/interactive/away/A = new squad_type(loc)
squad += A
A.squad_member = 1