mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-26 10:03:45 +00:00
Herp derp forgot to uncheck a file.
Holograms added, though I won't be surprised if they're buggy. We'll see. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@708 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
42
code/modules/mob/living/silicon/aihologram/aihologram.dm
Normal file
42
code/modules/mob/living/silicon/aihologram/aihologram.dm
Normal file
@@ -0,0 +1,42 @@
|
||||
/mob/living/silicon/aihologram/New()
|
||||
..()
|
||||
if(parent_ai)
|
||||
src.name = parent_ai:name
|
||||
src.real_name = parent_ai:real_name
|
||||
|
||||
/mob/living/silicon/aihologram/Stat()
|
||||
..()
|
||||
statpanel("Status")
|
||||
if (src.client.statpanel == "Status")
|
||||
if(emergency_shuttle.online && emergency_shuttle.location < 2)
|
||||
var/timeleft = emergency_shuttle.timeleft()
|
||||
if (timeleft)
|
||||
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
|
||||
|
||||
/mob/living/silicon/aihologram/proc/ai_roster()
|
||||
set category = "AI Commands"
|
||||
set name = "Show Crew Manifest"
|
||||
|
||||
var/dat = "<html><head><title>Crew Roster</title></head><body><b>Crew Roster:</b><br><br>"
|
||||
|
||||
for (var/datum/data/record/t in data_core.general)
|
||||
dat += "[t.fields["name"]] - [t.fields["rank"]]<br>"
|
||||
|
||||
dat += "</body></html>"
|
||||
|
||||
src << browse(dat, "window=airoster")
|
||||
onclose(src, "airoster")
|
||||
|
||||
/mob/living/silicon/aihologram/ex_act(severity) //something immaterial is immune to bombs and everything else, really
|
||||
return
|
||||
|
||||
/mob/living/silicon/aihologram/meteorhit(obj/O as obj)
|
||||
return
|
||||
|
||||
/mob/living/silicon/aihologram/bullet_act(flag)
|
||||
return
|
||||
|
||||
/mob/living/silicon/aihologram/proc/back_to_ai()
|
||||
set category = "AI Commands"
|
||||
set name = "Return To AI"
|
||||
del(src)
|
||||
4
code/modules/mob/living/silicon/aihologram/death.dm
Normal file
4
code/modules/mob/living/silicon/aihologram/death.dm
Normal file
@@ -0,0 +1,4 @@
|
||||
/mob/living/silicon/aihologram/Del() //can't "die" per se, so it's only Del()
|
||||
if(parent_ai)
|
||||
parent_ai:client = src.client //parent_ai is always an ai mob, so : is okay
|
||||
..()
|
||||
451
code/modules/mob/living/silicon/aihologram/emote.dm
Normal file
451
code/modules/mob/living/silicon/aihologram/emote.dm
Normal file
@@ -0,0 +1,451 @@
|
||||
/mob/living/silicon/aihologram/emote(var/act)
|
||||
var/param = null
|
||||
|
||||
if (findtext(act, "-", 1, null))
|
||||
var/t1 = findtext(act, "-", 1, null)
|
||||
param = copytext(act, t1 + 1, length(act) + 1)
|
||||
act = copytext(act, 1, t1)
|
||||
|
||||
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
|
||||
var/m_type = 1
|
||||
|
||||
for (var/obj/item/weapon/implant/I in src)
|
||||
if (I.implanted)
|
||||
I.trigger(act, src)
|
||||
|
||||
var/message
|
||||
|
||||
switch(act)
|
||||
if ("airguitar")
|
||||
if (!src.restrained())
|
||||
message = "<B>[src]</B> is strumming the air and headbanging like a safari chimp."
|
||||
m_type = 1
|
||||
|
||||
if ("blink")
|
||||
message = "<B>[src]</B> blinks."
|
||||
m_type = 1
|
||||
|
||||
if ("blink_r")
|
||||
message = "<B>[src]</B> blinks rapidly."
|
||||
m_type = 1
|
||||
|
||||
if ("bow")
|
||||
if (!src.buckled)
|
||||
var/M = null
|
||||
if (param)
|
||||
for (var/mob/A in view(null, null))
|
||||
if (param == A.name)
|
||||
M = A
|
||||
break
|
||||
if (!M)
|
||||
param = null
|
||||
|
||||
if (param)
|
||||
message = "<B>[src]</B> bows to [param]."
|
||||
else
|
||||
message = "<B>[src]</B> bows."
|
||||
m_type = 1
|
||||
|
||||
if ("custom")
|
||||
var/input = input("Choose an emote to display.")
|
||||
var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable")
|
||||
if (input2 == "Visible")
|
||||
m_type = 1
|
||||
else if (input2 == "Hearable")
|
||||
if (src.miming)
|
||||
return
|
||||
m_type = 2
|
||||
else
|
||||
alert("Unable to use this emote, must be either hearable or visible.")
|
||||
return
|
||||
message = "<B>[src]</B> [input]"
|
||||
|
||||
|
||||
if ("salute")
|
||||
if (!src.buckled)
|
||||
var/M = null
|
||||
if (param)
|
||||
for (var/mob/A in view(null, null))
|
||||
if (param == A.name)
|
||||
M = A
|
||||
break
|
||||
if (!M)
|
||||
param = null
|
||||
|
||||
if (param)
|
||||
message = "<B>[src]</B> salutes to [param]."
|
||||
else
|
||||
message = "<B>[src]</b> salutes."
|
||||
m_type = 1
|
||||
|
||||
if ("choke")
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> chokes!"
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a strong noise."
|
||||
m_type = 2
|
||||
|
||||
if ("clap")
|
||||
if (!src.restrained())
|
||||
message = "<B>[src]</B> claps."
|
||||
m_type = 2
|
||||
if ("flap")
|
||||
if (!src.restrained())
|
||||
message = "<B>[src]</B> flaps his wings."
|
||||
m_type = 2
|
||||
|
||||
if ("aflap")
|
||||
if (!src.restrained())
|
||||
message = "<B>[src]</B> flaps his wings ANGRILY!"
|
||||
m_type = 2
|
||||
|
||||
if ("drool")
|
||||
message = "<B>[src]</B> drools."
|
||||
m_type = 1
|
||||
|
||||
if ("eyebrow")
|
||||
message = "<B>[src]</B> raises an eyebrow."
|
||||
m_type = 1
|
||||
|
||||
if ("chuckle")
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> chuckles."
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a noise."
|
||||
m_type = 2
|
||||
|
||||
if ("twitch")
|
||||
message = "<B>[src]</B> twitches violently."
|
||||
m_type = 1
|
||||
|
||||
if ("twitch_s")
|
||||
message = "<B>[src]</B> twitches."
|
||||
m_type = 1
|
||||
|
||||
if ("faint")
|
||||
message = "<B>[src]</B> faints."
|
||||
src.sleeping = 1
|
||||
m_type = 1
|
||||
|
||||
if ("cough")
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> coughs!"
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a strong noise."
|
||||
m_type = 2
|
||||
|
||||
if ("frown")
|
||||
message = "<B>[src]</B> frowns."
|
||||
m_type = 1
|
||||
|
||||
if ("nod")
|
||||
message = "<B>[src]</B> nods."
|
||||
m_type = 1
|
||||
|
||||
if ("blush")
|
||||
message = "<B>[src]</B> blushes."
|
||||
m_type = 1
|
||||
|
||||
if ("gasp")
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> gasps!"
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a weak noise."
|
||||
m_type = 2
|
||||
|
||||
if ("deathgasp")
|
||||
message = "<B>[src]</B> seizes up and falls limp, \his eyes dead and lifeless..."
|
||||
m_type = 1
|
||||
|
||||
if ("giggle")
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> giggles."
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a noise."
|
||||
m_type = 2
|
||||
|
||||
if ("glare")
|
||||
var/M = null
|
||||
if (param)
|
||||
for (var/mob/A in view(null, null))
|
||||
if (param == A.name)
|
||||
M = A
|
||||
break
|
||||
if (!M)
|
||||
param = null
|
||||
|
||||
if (param)
|
||||
message = "<B>[src]</B> glares at [param]."
|
||||
else
|
||||
message = "<B>[src]</B> glares."
|
||||
|
||||
if ("stare")
|
||||
var/M = null
|
||||
if (param)
|
||||
for (var/mob/A in view(null, null))
|
||||
if (param == A.name)
|
||||
M = A
|
||||
break
|
||||
if (!M)
|
||||
param = null
|
||||
|
||||
if (param)
|
||||
message = "<B>[src]</B> stares at [param]."
|
||||
else
|
||||
message = "<B>[src]</B> stares."
|
||||
|
||||
if ("look")
|
||||
var/M = null
|
||||
if (param)
|
||||
for (var/mob/A in view(null, null))
|
||||
if (param == A.name)
|
||||
M = A
|
||||
break
|
||||
|
||||
if (!M)
|
||||
param = null
|
||||
|
||||
if (param)
|
||||
message = "<B>[src]</B> looks at [param]."
|
||||
else
|
||||
message = "<B>[src]</B> looks."
|
||||
m_type = 1
|
||||
|
||||
if ("grin")
|
||||
message = "<B>[src]</B> grins."
|
||||
m_type = 1
|
||||
|
||||
if ("cry")
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> cries."
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a weak noise. \He frowns."
|
||||
m_type = 2
|
||||
|
||||
if ("sigh")
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> sighs."
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a weak noise."
|
||||
m_type = 2
|
||||
|
||||
if ("laugh")
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> laughs."
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a noise."
|
||||
m_type = 2
|
||||
|
||||
if ("mumble")
|
||||
message = "<B>[src]</B> mumbles!"
|
||||
m_type = 2
|
||||
|
||||
if ("grumble")
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> grumbles!"
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a noise."
|
||||
m_type = 2
|
||||
|
||||
if ("groan")
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> groans!"
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a loud noise."
|
||||
m_type = 2
|
||||
|
||||
if ("moan")
|
||||
message = "<B>[src]</B> moans!"
|
||||
m_type = 2
|
||||
|
||||
if ("johnny")
|
||||
var/M
|
||||
if (param)
|
||||
M = param
|
||||
if (!M)
|
||||
param = null
|
||||
else
|
||||
message = "<B>[src]</B> says, \"[M], please. He had a family.\" [src.name] takes a drag from a cigarette and blows his name out in smoke."
|
||||
m_type = 2
|
||||
|
||||
if ("point")
|
||||
if (!src.restrained())
|
||||
var/mob/M = null
|
||||
if (param)
|
||||
for (var/atom/A as mob|obj|turf|area in view(null, null))
|
||||
if (param == A.name)
|
||||
M = A
|
||||
break
|
||||
|
||||
if (!M)
|
||||
message = "<B>[src]</B> points."
|
||||
else
|
||||
M.point()
|
||||
|
||||
if (M)
|
||||
message = "<B>[src]</B> points to [M]."
|
||||
else
|
||||
m_type = 1
|
||||
|
||||
if ("raise")
|
||||
if (!src.restrained())
|
||||
message = "<B>[src]</B> raises a hand."
|
||||
m_type = 1
|
||||
|
||||
if("shake")
|
||||
message = "<B>[src]</B> shakes \his head."
|
||||
m_type = 1
|
||||
|
||||
if ("shrug")
|
||||
message = "<B>[src]</B> shrugs."
|
||||
m_type = 1
|
||||
|
||||
if ("signal")
|
||||
if (!src.restrained())
|
||||
var/t1 = round(text2num(param))
|
||||
if (isnum(t1))
|
||||
if (t1 <= 5 && (!src.r_hand || !src.l_hand))
|
||||
message = "<B>[src]</B> raises [t1] finger\s."
|
||||
else if (t1 <= 10 && (!src.r_hand && !src.l_hand))
|
||||
message = "<B>[src]</B> raises [t1] finger\s."
|
||||
m_type = 1
|
||||
|
||||
if ("smile")
|
||||
message = "<B>[src]</B> smiles."
|
||||
m_type = 1
|
||||
|
||||
if ("shiver")
|
||||
message = "<B>[src]</B> shivers."
|
||||
m_type = 2
|
||||
|
||||
if ("pale")
|
||||
message = "<B>[src]</B> goes pale for a second."
|
||||
m_type = 1
|
||||
|
||||
if ("tremble")
|
||||
message = "<B>[src]</B> trembles in fear!"
|
||||
m_type = 1
|
||||
|
||||
if ("sneeze")
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> sneezes."
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a strange noise."
|
||||
m_type = 2
|
||||
|
||||
if ("sniff")
|
||||
message = "<B>[src]</B> sniffs."
|
||||
m_type = 2
|
||||
|
||||
if ("snore")
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> snores."
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a noise."
|
||||
m_type = 2
|
||||
|
||||
if ("whimper")
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> whimpers."
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a weak noise."
|
||||
m_type = 2
|
||||
|
||||
if ("wink")
|
||||
message = "<B>[src]</B> winks."
|
||||
m_type = 1
|
||||
|
||||
if ("yawn")
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> yawns."
|
||||
m_type = 2
|
||||
|
||||
if ("collapse")
|
||||
if (!src.paralysis)
|
||||
src.paralysis += 2
|
||||
message = "<B>[src]</B> collapses!"
|
||||
m_type = 2
|
||||
|
||||
if("hug")
|
||||
m_type = 1
|
||||
if (!src.restrained())
|
||||
var/M = null
|
||||
if (param)
|
||||
for (var/mob/A in view(1, null))
|
||||
if (param == A.name)
|
||||
M = A
|
||||
break
|
||||
if (M == src)
|
||||
M = null
|
||||
|
||||
if (M)
|
||||
message = "<B>[src]</B> hugs [M]."
|
||||
else
|
||||
message = "<B>[src]</B> hugs \himself."
|
||||
|
||||
if ("handshake")
|
||||
m_type = 1
|
||||
if (!src.restrained() && !src.r_hand)
|
||||
var/mob/M = null
|
||||
if (param)
|
||||
for (var/mob/A in view(1, null))
|
||||
if (param == A.name)
|
||||
M = A
|
||||
break
|
||||
if (M == src)
|
||||
M = null
|
||||
|
||||
if (M)
|
||||
if (M.canmove && !M.r_hand && !M.restrained())
|
||||
message = "<B>[src]</B> shakes hands with [M]."
|
||||
else
|
||||
message = "<B>[src]</B> holds out \his hand to [M]."
|
||||
|
||||
if("daps")
|
||||
m_type = 1
|
||||
if (!src.restrained())
|
||||
var/M = null
|
||||
if (param)
|
||||
for (var/mob/A in view(1, null))
|
||||
if (param == A.name)
|
||||
M = A
|
||||
break
|
||||
if (M)
|
||||
message = "<B>[src]</B> gives daps to [M]."
|
||||
else
|
||||
message = "<B>[src]</B> sadly can't find anybody to give daps to, and daps \himself. Shameful."
|
||||
|
||||
if ("scream")
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> screams!"
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a very loud noise."
|
||||
m_type = 2
|
||||
|
||||
if ("help")
|
||||
src << "blink, blink_r, blush, bow-(none)/mob, burp, choke, chuckle, clap, collapse, cough,\ncry, custom, deathgasp, drool, eyebrow, frown, gasp, giggle, groan, grumble, handshake, hug-(none)/mob, glare-(none)/mob,\ngrin, laugh, look-(none)/mob, moan, mumble, nod, pale, point-atom, raise, salute, shake, shiver, shrug,\nsigh, signal-#1-10, smile, sneeze, sniff, snore, stare-(none)/mob, tremble, twitch, twitch_s, whimper,\nwink, yawn"
|
||||
|
||||
else
|
||||
src << "\blue Unusable emote '[act]'. Say *help for a list."
|
||||
|
||||
if (message)
|
||||
if (m_type & 1)
|
||||
for (var/mob/O in viewers(src, null))
|
||||
O.show_message(message, m_type)
|
||||
else if (m_type & 2)
|
||||
for (var/mob/O in hearers(src, null))
|
||||
O.show_message(message, m_type)
|
||||
5
code/modules/mob/living/silicon/aihologram/examine.dm
Normal file
5
code/modules/mob/living/silicon/aihologram/examine.dm
Normal file
@@ -0,0 +1,5 @@
|
||||
/mob/living/silicon/aihologram/examine()
|
||||
set src in oview()
|
||||
usr << "\blue *---------*"
|
||||
usr << text("\blue This is \icon[] <B>[]</B>!", src, src.name)
|
||||
return
|
||||
10
code/modules/mob/living/silicon/aihologram/hud.dm
Normal file
10
code/modules/mob/living/silicon/aihologram/hud.dm
Normal file
@@ -0,0 +1,10 @@
|
||||
/obj/hud/proc/aihologram_hud()
|
||||
|
||||
src.station_explosion = new src.h_type( src )
|
||||
src.station_explosion.icon = 'station_explosion.dmi'
|
||||
src.station_explosion.icon_state = "start"
|
||||
src.station_explosion.layer = 20
|
||||
src.station_explosion.mouse_opacity = 0
|
||||
src.station_explosion.screen_loc = "1,3"
|
||||
|
||||
return
|
||||
1
code/modules/mob/living/silicon/aihologram/laws.dm
Normal file
1
code/modules/mob/living/silicon/aihologram/laws.dm
Normal file
@@ -0,0 +1 @@
|
||||
//I don't even know -- Urist
|
||||
10
code/modules/mob/living/silicon/aihologram/login.dm
Normal file
10
code/modules/mob/living/silicon/aihologram/login.dm
Normal file
@@ -0,0 +1,10 @@
|
||||
/mob/dead/aihologram/Login()
|
||||
..()
|
||||
|
||||
src.client.screen = null
|
||||
|
||||
if (!isturf(src.loc))
|
||||
src.client.eye = src.loc
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
|
||||
return
|
||||
16
code/modules/mob/living/silicon/aihologram/say.dm
Normal file
16
code/modules/mob/living/silicon/aihologram/say.dm
Normal file
@@ -0,0 +1,16 @@
|
||||
/mob/living/silicon/aihologram/say_understands(var/other)
|
||||
if (istype(other, /mob/living/carbon/human))
|
||||
return 1
|
||||
if (istype(other, /mob/living/silicon))
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/aihologram/say_quote(var/text)
|
||||
var/ending = copytext(text, length(text))
|
||||
|
||||
if (ending == "?")
|
||||
return "queries, \"[text]\"";
|
||||
else if (ending == "!")
|
||||
return "declares, \"[copytext(text, 1, length(text))]\"";
|
||||
|
||||
return "states, \"[text]\"";
|
||||
Reference in New Issue
Block a user