Merge branch 'master' into upstream-merge-32249
This commit is contained in:
@@ -56,13 +56,6 @@
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/blob/handle_inherent_channels(message, message_mode)
|
||||
if(message_mode == MODE_BINARY)
|
||||
blob_chat(message)
|
||||
return 1
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/blob/proc/blob_chat(msg)
|
||||
var/spanned_message = say_quote(msg, get_spans())
|
||||
var/rendered = "<font color=\"#EE4000\"><b>\[Blob Telepathy\] [real_name]</b> [spanned_message]</font>"
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
to_chat(target, "<span class='userdanger'>A migraine throbs behind your eyes, you hear yourself screaming - but your mouth has not opened!</span>")
|
||||
for(var/mi in GLOB.mob_list)
|
||||
var/mob/M = mi
|
||||
if(M.lingcheck() == 2)
|
||||
if(M.lingcheck() == LINGHIVE_LING)
|
||||
to_chat(M, "<i><font color=#800080>We can sense a foreign presence in the hivemind...</font></i>")
|
||||
target.mind.linglink = 1
|
||||
target.say(":g AAAAARRRRGGGGGHHHHH!!")
|
||||
|
||||
@@ -734,6 +734,33 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
owner.playsound_local(owner, "sparks", 50, 0)
|
||||
|
||||
|
||||
//Disable Emergency Lights
|
||||
/datum/AI_Module/small/emergency_lights
|
||||
module_name = "Disable Emergency Lights"
|
||||
mod_pick_name = "disable_emergency_lights"
|
||||
description = "Cuts emergency lights across the entire station. If power is lost to light fixtures, they will not attempt to fall back on emergency power reserves."
|
||||
cost = 10
|
||||
one_purchase = TRUE
|
||||
power_type = /datum/action/innate/ai/emergency_lights
|
||||
unlock_text = "<span class='notice'>You hook into the powernet and locate the connections between light fixtures and their fallbacks.</span>"
|
||||
unlock_sound = "sparks"
|
||||
|
||||
/datum/action/innate/ai/emergency_lights
|
||||
name = "Disable Emergency Lights"
|
||||
desc = "Disables all emergency lighting. Note that emergency lights can be restored through reboot at an APC."
|
||||
button_icon_state = "emergency_lights"
|
||||
uses = 1
|
||||
|
||||
/datum/action/innate/ai/emergency_lights/Activate()
|
||||
for(var/obj/machinery/light/L in GLOB.machines)
|
||||
if(L.z in GLOB.station_z_levels)
|
||||
L.no_emergency = TRUE
|
||||
INVOKE_ASYNC(L, /obj/machinery/light/.proc/update, FALSE)
|
||||
CHECK_TICK
|
||||
to_chat(owner, "<span class='notice'>Emergency light connections severed.</span>")
|
||||
owner.playsound_local(owner, 'sound/effects/light_flicker.ogg', 50, FALSE)
|
||||
|
||||
|
||||
//Reactivate Camera Network: Reactivates up to 30 cameras across the station.
|
||||
/datum/AI_Module/small/reactivate_cameras
|
||||
module_name = "Reactivate Camera Network"
|
||||
|
||||
@@ -121,13 +121,6 @@
|
||||
if(statpanel("Status"))
|
||||
stat("Resources:",resources)
|
||||
|
||||
/mob/living/simple_animal/hostile/swarmer/handle_inherent_channels(message, message_mode)
|
||||
if(message_mode == MODE_BINARY)
|
||||
swarmer_chat(message)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/swarmer/get_spans()
|
||||
return ..() | SPAN_ROBOT
|
||||
|
||||
|
||||
@@ -264,10 +264,11 @@
|
||||
var/TC_uses = 0
|
||||
for(var/datum/mind/syndicate in syndicates)
|
||||
text += printplayer(syndicate)
|
||||
for(var/obj/item/device/uplink/H in GLOB.uplinks)
|
||||
if(H && H.owner && H.owner == syndicate.key)
|
||||
TC_uses += H.spent_telecrystals
|
||||
purchases += H.purchase_log
|
||||
for(var/datum/component/uplink/H in GLOB.uplinks)
|
||||
if(H.purchase_log)
|
||||
purchases += H.purchase_log.generate_render()
|
||||
else
|
||||
stack_trace("WARNING: Uplink with no purchase_log in nuclear mode! Owner: [H.owner]")
|
||||
text += "<br>"
|
||||
text += "(Syndicates used [TC_uses] TC) [purchases]"
|
||||
if(TC_uses == 0 && station_was_nuked && !are_operatives_dead())
|
||||
@@ -325,9 +326,7 @@
|
||||
R.freqlock = 1
|
||||
|
||||
if(tc)
|
||||
var/obj/item/device/radio/uplink/nuclear/U = new(H)
|
||||
U.hidden_uplink.owner = "[H.key]"
|
||||
U.hidden_uplink.telecrystals = tc
|
||||
var/obj/item/device/radio/uplink/nuclear/U = new(H, H.key, tc)
|
||||
H.equip_to_slot_or_del(U, slot_in_backpack)
|
||||
|
||||
var/obj/item/implant/weapons_auth/W = new/obj/item/implant/weapons_auth(H)
|
||||
|
||||
@@ -54,10 +54,7 @@
|
||||
var/obj/item/circuitboard/computer/syndicate_shuttle/board = V
|
||||
board.challenge = TRUE
|
||||
|
||||
var/obj/item/device/radio/uplink/nuclear/U = new(get_turf(user))
|
||||
U.hidden_uplink.owner = "[user.key]"
|
||||
U.hidden_uplink.telecrystals = CHALLENGE_TELECRYSTALS
|
||||
U.hidden_uplink.set_gamemode(/datum/game_mode/nuclear)
|
||||
new /obj/item/device/radio/uplink/nuclear(get_turf(user), user.key, CHALLENGE_TELECRYSTALS)
|
||||
CONFIG_SET(number/shuttle_refuel_delay, max(CONFIG_GET(number/shuttle_refuel_delay), CHALLENGE_SHUTTLE_DELAY))
|
||||
SSblackbox.record_feedback("amount", "nuclear_challenge_mode", 1)
|
||||
|
||||
@@ -66,22 +63,22 @@
|
||||
/obj/item/device/nuclear_challenge/proc/check_allowed(mob/living/user)
|
||||
if(declaring_war)
|
||||
to_chat(user, "You are already in the process of declaring war! Make your mind up.")
|
||||
return 0
|
||||
return FALSE
|
||||
if(GLOB.player_list.len < CHALLENGE_MIN_PLAYERS)
|
||||
to_chat(user, "The enemy crew is too small to be worth declaring war on.")
|
||||
return 0
|
||||
return FALSE
|
||||
if(user.z != ZLEVEL_CENTCOM)
|
||||
to_chat(user, "You have to be at your base to use this.")
|
||||
return 0
|
||||
return FALSE
|
||||
if(world.time-SSticker.round_start_time > CHALLENGE_TIME_LIMIT)
|
||||
to_chat(user, "It's too late to declare hostilities. Your benefactors are already busy with other schemes. You'll have to make do with what you have on hand.")
|
||||
return 0
|
||||
return FALSE
|
||||
for(var/V in GLOB.syndicate_shuttle_boards)
|
||||
var/obj/item/circuitboard/computer/syndicate_shuttle/board = V
|
||||
if(board.moved)
|
||||
to_chat(user, "The shuttle has already been moved! You have forfeit the right to declare war.")
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
#undef CHALLENGE_TELECRYSTALS
|
||||
#undef CHALLENGE_MIN_PLAYERS
|
||||
|
||||
@@ -28,7 +28,7 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE)
|
||||
var/global/list/spawn_forbidden = list(
|
||||
/obj/item/tk_grab, /obj/item/implant, // not implanter, the actual thing that is inside you
|
||||
/obj/item/assembly, /obj/item/device/onetankbomb, /obj/item/radio, /obj/item/device/pda/ai,
|
||||
/obj/item/device/uplink, /obj/item/smallDelivery, /obj/item/projectile,
|
||||
/obj/item/smallDelivery, /obj/item/projectile,
|
||||
/obj/item/borg/sight, /obj/item/borg/stun, /obj/item/robot_module)
|
||||
|
||||
/datum/hSB/proc/update()
|
||||
|
||||
@@ -103,11 +103,11 @@
|
||||
var/TC_uses = 0
|
||||
var/uplink_true = FALSE
|
||||
var/purchases = ""
|
||||
for(var/obj/item/device/uplink/H in GLOB.uplinks)
|
||||
for(var/datum/component/uplink/H in GLOB.uplinks)
|
||||
if(H && H.owner && H.owner == traitor.key)
|
||||
TC_uses += H.spent_telecrystals
|
||||
uplink_true = TRUE
|
||||
purchases += H.purchase_log
|
||||
purchases += H.purchase_log.generate_render(FALSE)
|
||||
|
||||
var/objectives = ""
|
||||
if(traitor.objectives.len)//If the traitor had no objectives, don't need to process this.
|
||||
|
||||
@@ -33,7 +33,8 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
|
||||
if(uplinkholder)
|
||||
to_chat(user, "<span class='notice'>[src] already has an uplink in it.</span>")
|
||||
return
|
||||
if(I.hidden_uplink)
|
||||
GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, I)
|
||||
if(hidden_uplink)
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
uplinkholder = I
|
||||
@@ -56,26 +57,28 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
|
||||
|
||||
/obj/machinery/computer/telecrystals/uplinker/proc/donateTC(amt, addLog = 1)
|
||||
if(uplinkholder && linkedboss)
|
||||
GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, uplinkholder)
|
||||
if(amt < 0)
|
||||
linkedboss.storedcrystals += uplinkholder.hidden_uplink.telecrystals
|
||||
linkedboss.storedcrystals += hidden_uplink.telecrystals
|
||||
if(addLog)
|
||||
linkedboss.logTransfer("[src] donated [uplinkholder.hidden_uplink.telecrystals] telecrystals to [linkedboss].")
|
||||
uplinkholder.hidden_uplink.telecrystals = 0
|
||||
else if(amt <= uplinkholder.hidden_uplink.telecrystals)
|
||||
uplinkholder.hidden_uplink.telecrystals -= amt
|
||||
linkedboss.logTransfer("[src] donated [hidden_uplink.telecrystals] telecrystals to [linkedboss].")
|
||||
hidden_uplink.telecrystals = 0
|
||||
else if(amt <= hidden_uplink.telecrystals)
|
||||
hidden_uplink.telecrystals -= amt
|
||||
linkedboss.storedcrystals += amt
|
||||
if(addLog)
|
||||
linkedboss.logTransfer("[src] donated [amt] telecrystals to [linkedboss].")
|
||||
|
||||
/obj/machinery/computer/telecrystals/uplinker/proc/giveTC(amt, addLog = 1)
|
||||
if(uplinkholder && linkedboss)
|
||||
GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, uplinkholder)
|
||||
if(amt < 0)
|
||||
uplinkholder.hidden_uplink.telecrystals += linkedboss.storedcrystals
|
||||
hidden_uplink.telecrystals += linkedboss.storedcrystals
|
||||
if(addLog)
|
||||
linkedboss.logTransfer("[src] received [linkedboss.storedcrystals] telecrystals from [linkedboss].")
|
||||
linkedboss.storedcrystals = 0
|
||||
else if(amt <= linkedboss.storedcrystals)
|
||||
uplinkholder.hidden_uplink.telecrystals += amt
|
||||
hidden_uplink.telecrystals += amt
|
||||
linkedboss.storedcrystals -= amt
|
||||
if(addLog)
|
||||
linkedboss.logTransfer("[src] received [amt] telecrystals from [linkedboss].")
|
||||
@@ -95,7 +98,8 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
|
||||
dat += "No linked management consoles detected. Scan for uplink stations using the management console.<BR><BR>"
|
||||
|
||||
if(uplinkholder)
|
||||
dat += "[uplinkholder.hidden_uplink.telecrystals] telecrystals remain in this uplink.<BR>"
|
||||
GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, uplinkholder)
|
||||
dat += "[hidden_uplink.telecrystals] telecrystals remain in this uplink.<BR>"
|
||||
if(linkedboss)
|
||||
dat += "Donate TC: <a href='byond://?src=[REF(src)];donate=1'>1</a> | <a href='byond://?src=[REF(src)];donate=5'>5</a> | <a href='byond://?src=[REF(src)];donate=-1'>All</a>"
|
||||
dat += "<br><a href='byond://?src=[REF(src)];eject=1'>Eject Uplink</a>"
|
||||
@@ -175,7 +179,8 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
|
||||
for(var/obj/machinery/computer/telecrystals/uplinker/A in TCstations)
|
||||
dat += "[A.name] | "
|
||||
if(A.uplinkholder)
|
||||
dat += "[A.uplinkholder.hidden_uplink.telecrystals] telecrystals."
|
||||
GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, A.uplinkholder)
|
||||
dat += "[hidden_uplink.telecrystals] telecrystals."
|
||||
if(storedcrystals)
|
||||
dat+= "<BR>Add TC: <a href ='?src=[REF(src)];target=[REF(A)];give=1'>1</a> | <a href ='?src=[REF(src)];target=[REF(A)];give=5'>5</a> | <a href ='?src=[REF(src)];target=[REF(A)];give=10'>10</a> | <a href ='?src=[REF(src)];target=[REF(A)];give=-1'>All</a>"
|
||||
dat += "<BR>"
|
||||
|
||||
@@ -47,6 +47,12 @@ Possible to do for anyone motivated enough:
|
||||
var/temp = ""
|
||||
var/list/holo_calls //array of /datum/holocalls
|
||||
var/datum/holocall/outgoing_call //do not modify the datums only check and call the public procs
|
||||
var/obj/item/disk/holodisk/disk //Record disk
|
||||
var/replay_mode = FALSE //currently replaying a recording
|
||||
var/record_mode = FALSE //currently recording
|
||||
var/record_start = 0 //recording start time
|
||||
var/record_user //user that inititiated the recording
|
||||
var/obj/effect/overlay/holo_pad_hologram/replay_holo //replay hologram
|
||||
var/static/force_answer_call = FALSE //Calls will be automatically answered after a couple rings, here for debugging
|
||||
var/static/list/holopads = list()
|
||||
|
||||
@@ -64,6 +70,14 @@ Possible to do for anyone motivated enough:
|
||||
|
||||
for (var/I in masters)
|
||||
clear_holo(I)
|
||||
|
||||
if(replay_mode)
|
||||
replay_stop()
|
||||
if(record_mode)
|
||||
record_stop()
|
||||
|
||||
QDEL_NULL(disk)
|
||||
|
||||
holopads -= src
|
||||
return ..()
|
||||
|
||||
@@ -72,6 +86,10 @@ Possible to do for anyone motivated enough:
|
||||
stat &= ~NOPOWER
|
||||
else
|
||||
stat |= NOPOWER
|
||||
if(replay_mode)
|
||||
replay_stop()
|
||||
if(record_mode)
|
||||
record_stop()
|
||||
if(outgoing_call)
|
||||
outgoing_call.ConnectionFailure(src)
|
||||
|
||||
@@ -101,6 +119,18 @@ Possible to do for anyone motivated enough:
|
||||
|
||||
if(default_deconstruction_crowbar(P))
|
||||
return
|
||||
|
||||
if(istype(P,/obj/item/disk/holodisk))
|
||||
if(disk)
|
||||
to_chat(user,"<span class='notice'>There's already a disk inside [src]</span>")
|
||||
return
|
||||
if (!user.transferItemToLoc(P,src))
|
||||
return
|
||||
to_chat(user,"<span class='notice'>You insert [P] into [src]</span>")
|
||||
disk = P
|
||||
updateDialog()
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/holopad/AltClick(mob/living/carbon/human/user)
|
||||
@@ -122,6 +152,17 @@ Possible to do for anyone motivated enough:
|
||||
else
|
||||
dat = "<a href='?src=[REF(src)];AIrequest=1'>Request an AI's presence.</a><br>"
|
||||
dat += "<a href='?src=[REF(src)];Holocall=1'>Call another holopad.</a><br>"
|
||||
if(disk)
|
||||
if(disk.record)
|
||||
//Replay
|
||||
dat += "<a href='?src=[REF(src)];replay_start=1'>Replay disk recording.</a><br>"
|
||||
//Clear
|
||||
dat += "<a href='?src=[REF(src)];record_clear=1'>Clear disk recording.</a><br>"
|
||||
else
|
||||
//Record
|
||||
dat += "<a href='?src=[REF(src)];record_start=1'>Start new recording.</a><br>"
|
||||
//Eject
|
||||
dat += "<a href='?src=[REF(src)];disk_eject=1'>Eject disk.</a><br>"
|
||||
|
||||
if(LAZYLEN(holo_calls))
|
||||
dat += "=====================================================<br>"
|
||||
@@ -145,7 +186,7 @@ Possible to do for anyone motivated enough:
|
||||
dat += "<a href='?src=[REF(src)];disconnectcall=[REF(HC)]'>Disconnect call from [HC.user].</a><br>"
|
||||
|
||||
|
||||
var/datum/browser/popup = new(user, "holopad", name, 300, 130)
|
||||
var/datum/browser/popup = new(user, "holopad", name, 300, 150)
|
||||
popup.set_content(dat)
|
||||
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
|
||||
popup.open()
|
||||
@@ -215,6 +256,22 @@ Possible to do for anyone motivated enough:
|
||||
temp = ""
|
||||
if(outgoing_call)
|
||||
outgoing_call.Disconnect()
|
||||
|
||||
else if(href_list["disk_eject"])
|
||||
if(disk && !replay_mode)
|
||||
disk.forceMove(drop_location())
|
||||
disk = null
|
||||
|
||||
else if(href_list["replay_stop"])
|
||||
replay_stop()
|
||||
else if(href_list["replay_start"])
|
||||
replay_start()
|
||||
else if(href_list["record_start"])
|
||||
record_start(usr)
|
||||
else if(href_list["record_stop"])
|
||||
record_stop()
|
||||
else if(href_list["record_clear"])
|
||||
record_clear()
|
||||
|
||||
updateDialog()
|
||||
|
||||
@@ -269,6 +326,7 @@ Possible to do for anyone motivated enough:
|
||||
else
|
||||
playsound(src, 'sound/machines/twobeep.ogg', 100) //bring, bring!
|
||||
|
||||
|
||||
/obj/machinery/holopad/proc/activate_holo(mob/living/user)
|
||||
var/mob/living/silicon/ai/AI = user
|
||||
if(!istype(AI))
|
||||
@@ -321,15 +379,24 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
if(outgoing_call && speaker == outgoing_call.user)
|
||||
outgoing_call.hologram.say(raw_message)
|
||||
|
||||
if(record_mode && speaker == record_user)
|
||||
record_message(speaker,raw_message,message_language)
|
||||
|
||||
/obj/machinery/holopad/proc/SetLightsAndPower()
|
||||
var/total_users = masters.len + LAZYLEN(holo_calls)
|
||||
use_power = total_users > 0 ? ACTIVE_POWER_USE : IDLE_POWER_USE
|
||||
active_power_usage = HOLOPAD_PASSIVE_POWER_USAGE + (HOLOGRAM_POWER_USAGE * total_users)
|
||||
if(total_users)
|
||||
if(total_users || replay_mode)
|
||||
set_light(2)
|
||||
icon_state = "holopad1"
|
||||
else
|
||||
set_light(0)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/holopad/update_icon()
|
||||
var/total_users = masters.len + LAZYLEN(holo_calls)
|
||||
if(total_users || replay_mode)
|
||||
icon_state = "holopad1"
|
||||
else
|
||||
icon_state = "holopad0"
|
||||
|
||||
/obj/machinery/holopad/proc/set_holo(mob/living/user, var/obj/effect/overlay/holo_pad_hologram/h)
|
||||
@@ -365,6 +432,128 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
clear_holo(user)
|
||||
return TRUE
|
||||
|
||||
// RECORDED MESSAGES
|
||||
|
||||
/obj/machinery/holopad/proc/setup_replay_holo(datum/holorecord/record)
|
||||
var/obj/effect/overlay/holo_pad_hologram/Hologram = new(loc)//Spawn a blank effect at the location.
|
||||
Hologram.add_overlay(record.caller_image)
|
||||
Hologram.alpha = 170
|
||||
Hologram.add_atom_colour("#77abff", FIXED_COLOUR_PRIORITY)
|
||||
Hologram.dir = SOUTH //for now
|
||||
Hologram.grant_all_languages(omnitongue=TRUE)
|
||||
var/datum/language_holder/holder = Hologram.get_language_holder()
|
||||
holder.selected_default_language = record.language
|
||||
Hologram.mouse_opacity = MOUSE_OPACITY_TRANSPARENT//So you can't click on it.
|
||||
Hologram.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them.
|
||||
Hologram.anchored = TRUE//So space wind cannot drag it.
|
||||
Hologram.name = "[record.caller_name] (Hologram)"//If someone decides to right click.
|
||||
Hologram.set_light(2) //hologram lighting
|
||||
visible_message("<span class='notice'>A holographic image of [record.caller_name] flickers to life before your eyes!</span>")
|
||||
return Hologram
|
||||
|
||||
/obj/machinery/holopad/proc/replay_start()
|
||||
if(!replay_mode)
|
||||
replay_mode = TRUE
|
||||
replay_holo = setup_replay_holo(disk.record)
|
||||
temp = "Replaying...<br>"
|
||||
temp += "<A href='?src=[REF(src)];replay_stop=1'>End replay.</A>"
|
||||
SetLightsAndPower()
|
||||
replay_entry(1)
|
||||
return
|
||||
|
||||
/obj/machinery/holopad/proc/replay_stop()
|
||||
if(replay_mode)
|
||||
replay_mode = FALSE
|
||||
temp = null
|
||||
QDEL_NULL(replay_holo)
|
||||
SetLightsAndPower()
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/holopad/proc/record_start(mob/living/user)
|
||||
if(!user || !disk || disk.record)
|
||||
return
|
||||
disk.record = new
|
||||
record_mode = TRUE
|
||||
record_start = world.time
|
||||
record_user = user
|
||||
disk.record.caller_image = get_record_icon(user)
|
||||
temp = "Recording...<br>"
|
||||
temp += "<A href='?src=[REF(src)];record_stop=1'>End recording.</A>"
|
||||
|
||||
/obj/machinery/holopad/proc/get_record_icon(mob/living/user)
|
||||
var/olddir = user.dir
|
||||
user.setDir(SOUTH)
|
||||
. = getFlatIcon(user)
|
||||
user.setDir(olddir)
|
||||
|
||||
/obj/machinery/holopad/proc/record_message(mob/living/speaker,message,language)
|
||||
if(!record_mode)
|
||||
return
|
||||
//make this command so you can have multiple languages in single record
|
||||
if(!disk.record.caller_name && istype(speaker))
|
||||
disk.record.caller_name = speaker.name
|
||||
if(!disk.record.language)
|
||||
disk.record.language = language
|
||||
else if(language != disk.record.language)
|
||||
disk.record.entries += list(list(HOLORECORD_LANGUAGE,language))
|
||||
|
||||
var/current_delay = 0
|
||||
for(var/E in disk.record.entries)
|
||||
var/list/entry = E
|
||||
if(entry[1] != HOLORECORD_DELAY)
|
||||
continue
|
||||
current_delay += entry[2]
|
||||
|
||||
var/time_delta = world.time - record_start - current_delay
|
||||
|
||||
if(time_delta >= 1)
|
||||
disk.record.entries += list(list(HOLORECORD_DELAY,time_delta))
|
||||
disk.record.entries += list(list(HOLORECORD_SAY,message))
|
||||
if(disk.record.entries.len >= HOLORECORD_MAX_LENGTH)
|
||||
record_stop()
|
||||
|
||||
/obj/machinery/holopad/proc/replay_entry(entry_number)
|
||||
if(!replay_mode)
|
||||
return
|
||||
if(disk.record.entries.len < entry_number)
|
||||
replay_stop()
|
||||
return
|
||||
var/list/entry = disk.record.entries[entry_number]
|
||||
var/command = entry[1]
|
||||
switch(command)
|
||||
if(HOLORECORD_SAY)
|
||||
var/message = entry[2]
|
||||
if(replay_holo)
|
||||
replay_holo.say(message)
|
||||
if(HOLORECORD_SOUND)
|
||||
playsound(src,entry[2],50,1)
|
||||
if(HOLORECORD_DELAY)
|
||||
addtimer(CALLBACK(src,.proc/replay_entry,entry_number+1),entry[2])
|
||||
return
|
||||
if(HOLORECORD_LANGUAGE)
|
||||
var/datum/language_holder/holder = replay_holo.get_language_holder()
|
||||
holder.selected_default_language = entry[2]
|
||||
if(HOLORECORD_PRESET)
|
||||
var/preset_type = entry[2]
|
||||
var/datum/preset_holoimage/H = new preset_type
|
||||
replay_holo.cut_overlays()
|
||||
replay_holo.add_overlay(H.build_image())
|
||||
if(HOLORECORD_RENAME)
|
||||
replay_holo.name = entry[2] + " (Hologram)"
|
||||
.(entry_number+1)
|
||||
|
||||
/obj/machinery/holopad/proc/record_stop()
|
||||
if(record_mode)
|
||||
record_mode = FALSE
|
||||
temp = null
|
||||
record_user = null
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/holopad/proc/record_clear()
|
||||
if(disk && disk.record)
|
||||
QDEL_NULL(disk.record)
|
||||
updateDialog()
|
||||
|
||||
/obj/effect/overlay/holo_pad_hologram
|
||||
var/mob/living/Impersonation
|
||||
var/datum/holocall/HC
|
||||
|
||||
@@ -242,15 +242,17 @@
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(obj_integrity<max_integrity)
|
||||
if (WT.remove_fuel(0,user))
|
||||
if(WT.remove_fuel(1, user))
|
||||
if (internal_damage & MECHA_INT_TANK_BREACH)
|
||||
clearInternalDamage(MECHA_INT_TANK_BREACH)
|
||||
to_chat(user, "<span class='notice'>You repair the damaged gas tank.</span>")
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] repairs some damage to [name].</span>")
|
||||
user.visible_message("<span class='notice'>[user] repairs some damage to [name].</span>", "<span class='notice'>You repair some damage to [src].</span>")
|
||||
obj_integrity += min(10, max_integrity-obj_integrity)
|
||||
if(obj_integrity == max_integrity)
|
||||
to_chat(user, "<span class='notice'>It looks to be fully repaired now.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The welder must be on for this task!</span>")
|
||||
to_chat(user, "<span class='warning'>[WT] needs to be on for this task!</span>")
|
||||
return 1
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The [name] is at full integrity!</span>")
|
||||
|
||||
@@ -57,7 +57,6 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
var/slowdown = 0 // How much clothing is slowing you down. Negative values speeds you up
|
||||
var/armour_penetration = 0 //percentage of armour effectiveness to remove
|
||||
var/list/allowed = null //suit storage stuff.
|
||||
var/obj/item/device/uplink/hidden_uplink = null
|
||||
var/equip_delay_self = 0 //In deciseconds, how long an item takes to equip; counts only for normal clothing slots, not pockets etc.
|
||||
var/equip_delay_other = 20 //In deciseconds, how long an item takes to put on another person
|
||||
var/strip_delay = 40 //In deciseconds, how long an item takes to remove from another person
|
||||
@@ -224,9 +223,6 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
|
||||
/obj/item/interact(mob/user)
|
||||
add_fingerprint(user)
|
||||
if(hidden_uplink && hidden_uplink.active)
|
||||
hidden_uplink.interact(user)
|
||||
return 1
|
||||
ui_interact(user)
|
||||
|
||||
/obj/item/ui_act(action, params)
|
||||
|
||||
@@ -545,6 +545,7 @@
|
||||
H.set_heartattack(FALSE)
|
||||
H.revive()
|
||||
H.emote("gasp")
|
||||
H.Jitter(100)
|
||||
if(tplus > tloss)
|
||||
H.setBrainLoss( max(0, min(99, ((tlimit - tplus) / tlimit * 100))))
|
||||
add_logs(user, H, "revived", defib)
|
||||
|
||||
@@ -155,15 +155,17 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
return
|
||||
|
||||
/obj/item/device/pda/attack_self(mob/user)
|
||||
if(!user.IsAdvancedToolUser())
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
|
||||
. = ..()
|
||||
|
||||
var/datum/asset/assets = get_asset_datum(/datum/asset/simple/pda)
|
||||
assets.send(user)
|
||||
|
||||
user.set_machine(src)
|
||||
|
||||
if(hidden_uplink && hidden_uplink.active)
|
||||
hidden_uplink.interact(user)
|
||||
return
|
||||
|
||||
var/dat = "<!DOCTYPE html><html><head><title>Personal Data Assistant</title><link href=\"https://fonts.googleapis.com/css?family=Orbitron|Share+Tech+Mono|VT323\" rel=\"stylesheet\"></head><body bgcolor=\"" + background_color + "\"><style>body{" + font_mode + "}ul,ol{list-style-type: none;}a, a:link, a:visited, a:active, a:hover { color: #000000;text-decoration:none; }img {border-style:none;}a img{padding-right: 9px;}</style>"
|
||||
|
||||
|
||||
@@ -496,7 +498,9 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
if("Ringtone")
|
||||
var/t = input(U, "Please enter new ringtone", name, ttone) as text
|
||||
if(in_range(src, U) && loc == U && t)
|
||||
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
|
||||
if(hidden_uplink && (trim(lowertext(t)) == trim(lowertext(lock_code))))
|
||||
hidden_uplink.locked = FALSE
|
||||
hidden_uplink.interact(U)
|
||||
to_chat(U, "The PDA softly beeps.")
|
||||
U << browse(null, "window=pda")
|
||||
@@ -822,8 +826,6 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
var/obj/item/photo/P = C
|
||||
photo = P.img
|
||||
to_chat(user, "<span class='notice'>You scan \the [C].</span>")
|
||||
else if(hidden_uplink && hidden_uplink.active)
|
||||
hidden_uplink.attackby(C, user, params)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
/obj/item/cartridge/virus/message_header()
|
||||
return "<b>[charges] viral files left.</b><HR>"
|
||||
|
||||
|
||||
/obj/item/cartridge/virus/message_special(obj/item/device/pda/target)
|
||||
if (!istype(loc, /obj/item/device/pda))
|
||||
return "" //Sanity check, this shouldn't be possible.
|
||||
@@ -67,11 +67,12 @@
|
||||
var/difficulty = 0
|
||||
if(target.cartridge)
|
||||
difficulty += BitCount(target.cartridge.access&(CART_MEDICAL | CART_SECURITY | CART_ENGINE | CART_CLOWN | CART_JANITOR | CART_MANIFEST))
|
||||
if(target.cartridge.access & CART_MANIFEST)
|
||||
if(target.cartridge.access & CART_MANIFEST)
|
||||
difficulty++ //if cartridge has manifest access it has extra snowflake difficulty
|
||||
else
|
||||
difficulty += 2
|
||||
if(!target.detonatable || prob(difficulty * 15) || (target.hidden_uplink))
|
||||
GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, target)
|
||||
if(!target.detonatable || prob(difficulty * 15) || (hidden_uplink))
|
||||
U.show_message("<span class='danger'>An error flashes on your [src].</span>", 1)
|
||||
else
|
||||
U.show_message("<span class='notice'>Success!</span>", 1)
|
||||
@@ -92,14 +93,14 @@
|
||||
charges--
|
||||
var/lock_code = "[rand(100,999)] [pick(GLOB.phonetic_alphabet)]"
|
||||
to_chat(U, "<span class='notice'>Virus Sent! The unlock code to the target is: [lock_code]</span>")
|
||||
if(!target.hidden_uplink)
|
||||
var/obj/item/device/uplink/uplink = new(target)
|
||||
target.hidden_uplink = uplink
|
||||
GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, target)
|
||||
if(!hidden_uplink)
|
||||
hidden_uplink = target.LoadComponent(/datum/component/uplink)
|
||||
target.lock_code = lock_code
|
||||
else
|
||||
target.hidden_uplink.hidden_crystals += target.hidden_uplink.telecrystals //Temporarially hide the PDA's crystals, so you can't steal telecrystals.
|
||||
target.hidden_uplink.telecrystals = telecrystals
|
||||
hidden_uplink.hidden_crystals += hidden_uplink.telecrystals //Temporarially hide the PDA's crystals, so you can't steal telecrystals.
|
||||
hidden_uplink.telecrystals = telecrystals
|
||||
telecrystals = 0
|
||||
target.hidden_uplink.active = TRUE
|
||||
hidden_uplink.active = TRUE
|
||||
else
|
||||
to_chat(U, "PDA not found.")
|
||||
|
||||
@@ -155,7 +155,9 @@
|
||||
if(.)
|
||||
frequency = sanitize_frequency(tune, freerange)
|
||||
set_frequency(frequency)
|
||||
if(frequency == traitor_frequency && hidden_uplink)
|
||||
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
|
||||
if(hidden_uplink && (frequency == traitor_frequency))
|
||||
hidden_uplink.locked = FALSE
|
||||
hidden_uplink.interact(usr)
|
||||
ui.close()
|
||||
if("listen")
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
// A collection of pre-set uplinks, for admin spawns.
|
||||
/obj/item/device/radio/uplink/Initialize(mapload, _owner, _tc_amount = 20)
|
||||
. = ..()
|
||||
icon_state = "radio"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
LoadComponent(/datum/component/uplink, _owner, FALSE, TRUE, null, _tc_amount)
|
||||
|
||||
/obj/item/device/radio/uplink/nuclear/Initialize()
|
||||
. = ..()
|
||||
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
|
||||
hidden_uplink.set_gamemode(/datum/game_mode/nuclear)
|
||||
|
||||
/obj/item/device/multitool/uplink/Initialize(mapload, _owner, _tc_amount = 20)
|
||||
. = ..()
|
||||
LoadComponent(/datum/component/uplink, _owner, FALSE, TRUE, null, _tc_amount)
|
||||
|
||||
/obj/item/pen/uplink/Initialize(mapload, _owner, _tc_amount = 20)
|
||||
. = ..()
|
||||
LoadComponent(/datum/component/uplink)
|
||||
traitor_unlock_degrees = 360
|
||||
|
||||
/obj/item/device/radio/uplink/old
|
||||
name = "dusty radio"
|
||||
desc = "A dusty looking radio."
|
||||
|
||||
/obj/item/device/radio/uplink/old/Initialize(mapload, _owner, _tc_amount = 10)
|
||||
. = ..()
|
||||
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
|
||||
hidden_uplink.name = "dusty radio"
|
||||
@@ -1,42 +1,48 @@
|
||||
/obj/item/implant/uplink
|
||||
name = "uplink implant"
|
||||
desc = "Sneeki breeki."
|
||||
icon = 'icons/obj/radio.dmi'
|
||||
icon_state = "radio"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
origin_tech = "materials=4;magnets=4;programming=4;biotech=4;syndicate=5;bluespace=5"
|
||||
var/starting_tc = 0
|
||||
|
||||
/obj/item/implant/uplink/New()
|
||||
hidden_uplink = new(src)
|
||||
hidden_uplink.telecrystals = starting_tc
|
||||
..()
|
||||
|
||||
/obj/item/implant/uplink/implant(mob/living/target, mob/user, silent = 0)
|
||||
for(var/X in target.implants)
|
||||
if(istype(X, type))
|
||||
var/obj/item/implant/imp_e = X
|
||||
imp_e.hidden_uplink.telecrystals += hidden_uplink.telecrystals
|
||||
qdel(src)
|
||||
return 1
|
||||
|
||||
if(..())
|
||||
hidden_uplink.owner = "[user.key]"
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/implant/uplink/activate()
|
||||
if(hidden_uplink)
|
||||
hidden_uplink.interact(usr)
|
||||
|
||||
/obj/item/implanter/uplink
|
||||
name = "implanter (uplink)"
|
||||
imp_type = /obj/item/implant/uplink
|
||||
|
||||
/obj/item/implanter/uplink/precharged
|
||||
name = "implanter (precharged uplink)"
|
||||
imp_type = /obj/item/implant/uplink/precharged
|
||||
|
||||
/obj/item/implant/uplink/precharged
|
||||
starting_tc = 10
|
||||
/obj/item/implant/uplink
|
||||
name = "uplink implant"
|
||||
desc = "Sneeki breeki."
|
||||
icon = 'icons/obj/radio.dmi'
|
||||
icon_state = "radio"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
var/starting_tc = 0
|
||||
|
||||
/obj/item/implant/uplink/Initialize(mapload, _owner)
|
||||
. = ..()
|
||||
LoadComponent(/datum/component/uplink, _owner, TRUE, FALSE, null, starting_tc)
|
||||
|
||||
/obj/item/implant/uplink/implant(mob/living/target, mob/user, silent = 0)
|
||||
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
|
||||
if(hidden_uplink)
|
||||
for(var/X in target.implants)
|
||||
if(istype(X, type))
|
||||
var/obj/item/implant/imp_e = X
|
||||
GET_COMPONENT_FROM(their_hidden_uplink, /datum/component/uplink, imp_e)
|
||||
if(their_hidden_uplink)
|
||||
their_hidden_uplink.telecrystals += hidden_uplink.telecrystals
|
||||
qdel(src)
|
||||
return TRUE
|
||||
else
|
||||
qdel(imp_e) //INFERIOR AND EMPTY!
|
||||
|
||||
if(..())
|
||||
if(hidden_uplink)
|
||||
hidden_uplink.owner = "[user.key]"
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/implant/uplink/activate()
|
||||
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
|
||||
if(hidden_uplink)
|
||||
hidden_uplink.interact(usr)
|
||||
|
||||
/obj/item/implanter/uplink
|
||||
name = "implanter (uplink)"
|
||||
imp_type = /obj/item/implant/uplink
|
||||
|
||||
/obj/item/implanter/uplink/precharged
|
||||
name = "implanter (precharged uplink)"
|
||||
imp_type = /obj/item/implant/uplink/precharged
|
||||
|
||||
/obj/item/implant/uplink/precharged
|
||||
starting_tc = 10
|
||||
|
||||
@@ -9,13 +9,91 @@
|
||||
var/list/squeak_override //Weighted list; If you want your plush to have different squeak sounds use this
|
||||
var/stuffed = TRUE //If the plushie has stuffing in it
|
||||
var/obj/item/grenade/grenade //You can remove the stuffing from a plushie and add a grenade to it for *nefarious uses*
|
||||
//--love ~<3--
|
||||
gender = NEUTER
|
||||
var/obj/item/toy/plush/lover
|
||||
var/obj/item/toy/plush/partner
|
||||
var/obj/item/toy/plush/plush_child
|
||||
var/obj/item/toy/plush/paternal_parent //who initiated creation
|
||||
var/obj/item/toy/plush/maternal_parent //who owns, see love()
|
||||
var/list/scorned = list() //who the plush hates
|
||||
var/list/scorned_by = list() //who hates the plush, to remove external references on Destroy()
|
||||
var/heartbroken = FALSE
|
||||
var/vowbroken = FALSE
|
||||
var/young = FALSE
|
||||
var/mood_message
|
||||
var/list/love_message
|
||||
var/list/partner_message
|
||||
var/list/heartbroken_message
|
||||
var/list/vowbroken_message
|
||||
var/list/parent_message
|
||||
var/normal_desc
|
||||
//--end of love :'(--
|
||||
|
||||
/obj/item/toy/plush/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/squeak, squeak_override)
|
||||
|
||||
//have we decided if Pinocchio goes in the blue or pink aisle yet?
|
||||
if(gender == NEUTER)
|
||||
if(prob(50))
|
||||
gender = FEMALE
|
||||
else
|
||||
gender = MALE
|
||||
|
||||
love_message = list("\n[src] is so happy, \he could rip a seam!")
|
||||
partner_message = list("\n[src] has a ring on \his finger! It says bound to my dear [partner].")
|
||||
heartbroken_message = list("\n[src] looks so sad.")
|
||||
vowbroken_message = list("\n[src] lost \his ring...")
|
||||
parent_message = list("\n[src] can't remember what sleep is.")
|
||||
|
||||
normal_desc = desc
|
||||
|
||||
/obj/item/toy/plush/Destroy()
|
||||
QDEL_NULL(grenade)
|
||||
|
||||
//inform next of kin and... acquaintances
|
||||
if(partner)
|
||||
partner.bad_news(src)
|
||||
partner = null
|
||||
lover = null
|
||||
else if(lover)
|
||||
lover.bad_news(src)
|
||||
lover = null
|
||||
|
||||
if(paternal_parent)
|
||||
paternal_parent.bad_news(src)
|
||||
paternal_parent = null
|
||||
|
||||
if(maternal_parent)
|
||||
maternal_parent.bad_news(src)
|
||||
maternal_parent = null
|
||||
|
||||
if(plush_child)
|
||||
plush_child.bad_news(src)
|
||||
plush_child = null
|
||||
|
||||
var/i
|
||||
var/obj/item/toy/plush/P
|
||||
for(i=1, i<=scorned.len, i++)
|
||||
P = scorned[i]
|
||||
P.bad_news(src)
|
||||
scorned = null
|
||||
|
||||
for(i=1, i<=scorned_by.len, i++)
|
||||
P = scorned_by[i]
|
||||
P.bad_news(src)
|
||||
scorned_by = null
|
||||
|
||||
//null remaining lists
|
||||
squeak_override = null
|
||||
|
||||
love_message = null
|
||||
partner_message = null
|
||||
heartbroken_message = null
|
||||
vowbroken_message = null
|
||||
parent_message = null
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/toy/plush/handle_atom_del(atom/A)
|
||||
@@ -66,8 +144,221 @@
|
||||
var/turf/T = get_turf(user)
|
||||
log_game("[key_name(user)] added a grenade ([I.name]) to [src] at [COORD(T)].")
|
||||
return
|
||||
if(istype(I, /obj/item/toy/plush))
|
||||
love(I, user)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/toy/plush/proc/love(obj/item/toy/plush/Kisser, mob/living/user) //~<3
|
||||
var/chance = 100 //to steal a kiss, surely there's a 100% chance no-one would reject a plush such as I?
|
||||
var/concern = 20 //perhaps something might cloud true love with doubt
|
||||
var/loyalty = 30 //why should another get between us?
|
||||
var/duty = 50 //conquering another's is what I live for
|
||||
|
||||
//we are not catholic
|
||||
if(young == TRUE || Kisser.young == TRUE)
|
||||
user.show_message("<span class='notice'>[src] plays tag with [Kisser].</span>", 1,
|
||||
"<span class='notice'>They're happy.</span>", 0)
|
||||
Kisser.cheer_up()
|
||||
cheer_up()
|
||||
|
||||
//never again
|
||||
else if(Kisser in scorned)
|
||||
//message, visible, alternate message, neither visible nor audible
|
||||
user.show_message("<span class='notice'>[src] rejects the advances of [Kisser]!</span>", 1,
|
||||
"<span class='notice'>That didn't feel like it worked.</span>", 0)
|
||||
else if(src in Kisser.scorned)
|
||||
user.show_message("<span class='notice'>[Kisser] realises who [src] is and turns away.</span>", 1,
|
||||
"<span class='notice'>That didn't feel like it worked.</span>", 0)
|
||||
|
||||
//first comes love
|
||||
else if(Kisser.lover != src && Kisser.partner != src) //cannot be lovers or married
|
||||
if(Kisser.lover) //if the initiator has a lover
|
||||
Kisser.lover.heartbreak(Kisser) //the old lover can get over the kiss-and-run whilst the kisser has some fun
|
||||
chance -= concern //one heart already broken, what does another mean?
|
||||
if(lover) //if the recipient has a lover
|
||||
chance -= loyalty //mustn't... but those lips
|
||||
if(partner) //if the recipient has a partner
|
||||
chance -= duty //do we mate for life?
|
||||
|
||||
if(prob(chance)) //did we bag a date?
|
||||
user.visible_message("<span class='notice'>[user] makes [Kisser] kiss [src]!</span>",
|
||||
"<span class='notice'>You make [Kisser] kiss [src]!</span>")
|
||||
if(lover) //who cares for the past, we live in the present
|
||||
lover.heartbreak(src)
|
||||
new_lover(Kisser)
|
||||
Kisser.new_lover(src)
|
||||
else
|
||||
user.show_message("<span class='notice'>[src] rejects the advances of [Kisser], maybe next time?</span>", 1,
|
||||
"<span class='notice'>That didn't feel like it worked, this time.</span>", 0)
|
||||
|
||||
//then comes marriage
|
||||
else if(Kisser.lover == src && Kisser.partner != src) //need to be lovers (assumes loving is a two way street) but not married (also assumes similar)
|
||||
user.visible_message("<span class='notice'>[user] pronounces [Kisser] and [src] married! D'aw.</span>",
|
||||
"<span class='notice'>You pronounce [Kisser] and [src] married!</span>")
|
||||
new_partner(Kisser)
|
||||
Kisser.new_partner(src)
|
||||
|
||||
//then comes a baby in a baby's carriage, or an adoption in an adoption's orphanage
|
||||
else if(Kisser.partner == src && !plush_child) //the one advancing does not take ownership of the child and we have a one child policy in the toyshop
|
||||
user.visible_message("<span class='notice'>[user] is going to break [Kisser] and [src] by bashing them like that.</span>",
|
||||
"<span class='notice'>[Kisser] passionately embraces [src] in your hands. Look away you perv!</span>")
|
||||
plop(Kisser)
|
||||
user.visible_message("<span class='notice'>Something drops at the feet of [user].</span>",
|
||||
"<span class='notice'>The miracle of oh god did that just come out of [src]?!</span>")
|
||||
|
||||
//then comes protection, or abstinence if we are catholic
|
||||
else if(Kisser.partner == src && plush_child)
|
||||
user.visible_message("<span class='notice'>[user] makes [Kisser] nuzzle [src]!</span>",
|
||||
"<span class='notice'>You make [Kisser] nuzzle [src]!</span>")
|
||||
|
||||
//then oh fuck something unexpected happened
|
||||
else
|
||||
user.show_message("<span class='warning'>[Kisser] and [src] don't know what to do with one another.</span>", 0)
|
||||
|
||||
/obj/item/toy/plush/proc/heartbreak(obj/item/toy/plush/Brutus)
|
||||
if(lover != Brutus)
|
||||
to_chat(world, "lover != Brutus")
|
||||
return //why are we considering someone we don't love?
|
||||
|
||||
scorned.Add(Brutus)
|
||||
Brutus.scorned_by(src)
|
||||
|
||||
lover = null
|
||||
Brutus.lover = null //feeling's mutual
|
||||
|
||||
heartbroken = TRUE
|
||||
mood_message = pick(heartbroken_message)
|
||||
|
||||
if(partner == Brutus) //oh dear...
|
||||
partner = null
|
||||
Brutus.partner = null //it'd be weird otherwise
|
||||
vowbroken = TRUE
|
||||
mood_message = pick(vowbroken_message)
|
||||
|
||||
update_desc()
|
||||
|
||||
/obj/item/toy/plush/proc/scorned_by(obj/item/toy/plush/Outmoded)
|
||||
scorned_by.Add(Outmoded)
|
||||
|
||||
/obj/item/toy/plush/proc/new_lover(obj/item/toy/plush/Juliet)
|
||||
if(lover == Juliet)
|
||||
return //nice try
|
||||
lover = Juliet
|
||||
|
||||
cheer_up()
|
||||
lover.cheer_up()
|
||||
|
||||
mood_message = pick(love_message)
|
||||
update_desc()
|
||||
|
||||
if(partner) //who?
|
||||
partner = null //more like who cares
|
||||
|
||||
/obj/item/toy/plush/proc/new_partner(obj/item/toy/plush/Apple_of_my_eye)
|
||||
if(partner == Apple_of_my_eye)
|
||||
return //double marriage is just insecurity
|
||||
if(lover != Apple_of_my_eye)
|
||||
return //union not born out of love will falter
|
||||
|
||||
partner = Apple_of_my_eye
|
||||
|
||||
heal_memories()
|
||||
partner.heal_memories()
|
||||
|
||||
mood_message = pick(partner_message)
|
||||
update_desc()
|
||||
|
||||
/obj/item/toy/plush/proc/plop(obj/item/toy/plush/Daddy)
|
||||
if(partner != Daddy)
|
||||
return //we do not have bastards in our toyshop
|
||||
|
||||
if(prob(50)) //it has my eyes
|
||||
plush_child = new type(get_turf(loc))
|
||||
else //it has your eyes
|
||||
plush_child = new Daddy.type(get_turf(loc))
|
||||
|
||||
plush_child.make_young(src, Daddy)
|
||||
|
||||
/obj/item/toy/plush/proc/make_young(obj/item/toy/plush/Mama, obj/item/toy/plush/Dada)
|
||||
if(Mama == Dada)
|
||||
return //cloning is reserved for plants and spacemen
|
||||
|
||||
maternal_parent = Mama
|
||||
paternal_parent = Dada
|
||||
young = TRUE
|
||||
name = "[Mama] Jr" //Icelandic naming convention pending
|
||||
normal_desc = "[src] is a little baby of [maternal_parent] and [paternal_parent]!" //original desc won't be used so the child can have moods
|
||||
update_desc()
|
||||
|
||||
Mama.mood_message = pick(Mama.parent_message)
|
||||
Mama.update_desc()
|
||||
Dada.mood_message = pick(Dada.parent_message)
|
||||
Dada.update_desc()
|
||||
|
||||
/obj/item/toy/plush/proc/bad_news(obj/item/toy/plush/Deceased) //cotton to cotton, sawdust to sawdust
|
||||
var/is_that_letter_for_me = FALSE
|
||||
if(partner == Deceased) //covers marriage
|
||||
is_that_letter_for_me = TRUE
|
||||
partner = null
|
||||
lover = null
|
||||
else if(lover == Deceased) //covers lovers
|
||||
is_that_letter_for_me = TRUE
|
||||
lover = null
|
||||
|
||||
//covers children
|
||||
if(maternal_parent == Deceased)
|
||||
is_that_letter_for_me = TRUE
|
||||
maternal_parent = null
|
||||
|
||||
if(paternal_parent == Deceased)
|
||||
is_that_letter_for_me = TRUE
|
||||
paternal_parent = null
|
||||
|
||||
//covers parents
|
||||
if(plush_child == Deceased)
|
||||
is_that_letter_for_me = TRUE
|
||||
plush_child = null
|
||||
|
||||
//covers bad memories
|
||||
if(Deceased in scorned)
|
||||
scorned.Remove(Deceased)
|
||||
cheer_up() //what cold button eyes you have
|
||||
|
||||
if(Deceased in scorned_by)
|
||||
scorned_by.Remove(Deceased)
|
||||
|
||||
//all references to the departed should be cleaned up by now
|
||||
|
||||
if(is_that_letter_for_me)
|
||||
heartbroken = TRUE
|
||||
mood_message = pick(heartbroken_message)
|
||||
update_desc()
|
||||
|
||||
/obj/item/toy/plush/proc/cheer_up() //it'll be all right
|
||||
if(!heartbroken)
|
||||
return //you cannot make smile what is already
|
||||
if(vowbroken)
|
||||
return //it's a pretty big deal
|
||||
|
||||
heartbroken = !heartbroken
|
||||
|
||||
if(mood_message in heartbroken_message)
|
||||
mood_message = null
|
||||
update_desc()
|
||||
|
||||
/obj/item/toy/plush/proc/heal_memories() //time fixes all wounds
|
||||
if(!vowbroken)
|
||||
vowbroken = !vowbroken
|
||||
if(mood_message in vowbroken_message)
|
||||
mood_message = null
|
||||
cheer_up()
|
||||
|
||||
/obj/item/toy/plush/proc/update_desc()
|
||||
desc = normal_desc
|
||||
if(mood_message)
|
||||
desc += mood_message
|
||||
|
||||
/obj/item/toy/plush/carpplushie
|
||||
name = "space carp plushie"
|
||||
desc = "An adorable stuffed toy that resembles a space carp."
|
||||
@@ -88,6 +379,7 @@
|
||||
desc = "An adorable plushie of the clockwork justiciar himself with new and improved spring arm action."
|
||||
icon_state = "plushvar"
|
||||
var/obj/item/toy/plush/narplush/clash_target
|
||||
gender = MALE //he's a boy, right?
|
||||
|
||||
/obj/item/toy/plush/plushvar/Moved()
|
||||
. = ..()
|
||||
@@ -173,6 +465,7 @@
|
||||
desc = "A small stuffed doll of the elder god nar'sie. Who thought this was a good children's toy?"
|
||||
icon_state = "narplush"
|
||||
var/clashing
|
||||
gender = FEMALE //it's canon if the toy is
|
||||
|
||||
/obj/item/toy/plush/narplush/Moved()
|
||||
. = ..()
|
||||
@@ -198,7 +491,7 @@
|
||||
|
||||
/obj/item/toy/plush/nukeplushie
|
||||
name = "operative plushie"
|
||||
desc = "An stuffed toy that resembles a syndicate nuclear operative. The tag claims operatives to be purely fictitious."
|
||||
desc = "A stuffed toy that resembles a syndicate nuclear operative. The tag claims operatives to be purely fictitious."
|
||||
icon_state = "plushie_nuke"
|
||||
item_state = "plushie_nuke"
|
||||
attack_verb = list("shot", "nuked", "detonated")
|
||||
@@ -210,4 +503,5 @@
|
||||
icon_state = "plushie_slime"
|
||||
item_state = "plushie_slime"
|
||||
attack_verb = list("blorbled", "slimed", "absorbed")
|
||||
squeak_override = list('sound/effects/blobattack.ogg' = 1)
|
||||
squeak_override = list('sound/effects/blobattack.ogg' = 1)
|
||||
gender = FEMALE //given all the jokes and drawings, I'm not sure the xenobiologists would make a slimeboy
|
||||
|
||||
@@ -13,18 +13,16 @@
|
||||
if(target == user) //You can't go around smacking people with crystals to find out if they have an uplink or not.
|
||||
for(var/obj/item/implant/uplink/I in target)
|
||||
if(I && I.imp_in)
|
||||
I.hidden_uplink.telecrystals += amount
|
||||
use(amount)
|
||||
to_chat(user, "<span class='notice'>You press [src] onto yourself and charge your hidden uplink.</span>")
|
||||
GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, I)
|
||||
if(hidden_uplink)
|
||||
hidden_uplink.telecrystals += amount
|
||||
use(amount)
|
||||
to_chat(user, "<span class='notice'>You press [src] onto yourself and charge your hidden uplink.</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/telecrystal/afterattack(obj/item/I, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(isitem(I) && I.hidden_uplink && I.hidden_uplink.active) //No metagaming by using this on every PDA around just to see if it gets used up.
|
||||
I.hidden_uplink.telecrystals += amount
|
||||
use(amount)
|
||||
to_chat(user, "<span class='notice'>You slot [src] into [I] and charge its internal uplink.</span>")
|
||||
else if(istype(I, /obj/item/cartridge/virus/frame))
|
||||
if(istype(I, /obj/item/cartridge/virus/frame))
|
||||
var/obj/item/cartridge/virus/frame/cart = I
|
||||
if(!cart.charges)
|
||||
to_chat(user, "<span class='notice'>[cart] is out of charges, it's refusing to accept [src].</span>")
|
||||
@@ -32,6 +30,8 @@
|
||||
cart.telecrystals += amount
|
||||
use(amount)
|
||||
to_chat(user, "<span class='notice'>You slot [src] into [cart]. The next time it's used, it will also give telecrystals.</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/telecrystal/five
|
||||
amount = 5
|
||||
|
||||
@@ -40,14 +40,14 @@
|
||||
icon_state = "pod_g"
|
||||
|
||||
/obj/structure/showcase/machinery/oldpod
|
||||
name = "damaged cyrogenic pod"
|
||||
desc = "A damaged cyrogenic pod long since lost to time, including its former occupant..."
|
||||
name = "damaged cryogenic pod"
|
||||
desc = "A damaged cryogenic pod long since lost to time, including its former occupant..."
|
||||
icon = 'icons/obj/cryogenic2.dmi'
|
||||
icon_state = "sleeper-open"
|
||||
|
||||
/obj/structure/showcase/machinery/oldpod/used
|
||||
name = "opened cyrogenic pod"
|
||||
desc = "Cyrogenic pod that has recently discharged its occupand. The pod appears non-functional."
|
||||
name = "opened cryogenic pod"
|
||||
desc = "A cryogenic pod that has recently discharged its occupant. The pod appears non-functional."
|
||||
|
||||
/obj/structure/showcase/cyborg/old
|
||||
name = "Cyborg Statue"
|
||||
|
||||
@@ -177,8 +177,8 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/statue/plasma/proc/PlasmaBurn()
|
||||
atmos_spawn_air("plasma=400;TEMP=1000")
|
||||
/obj/structure/statue/plasma/proc/PlasmaBurn(exposed_temperature)
|
||||
atmos_spawn_air("plasma=[oreAmount*10];TEMP=[exposed_temperature]")
|
||||
deconstruct(FALSE)
|
||||
|
||||
/obj/structure/statue/plasma/proc/ignite(exposed_temperature)
|
||||
|
||||
+5
-2
@@ -1,4 +1,4 @@
|
||||
/proc/playsound(atom/source, soundin, vol as num, vary, extrarange as num, falloff, frequency = null, channel = 0, pressure_affected = TRUE)
|
||||
/proc/playsound(atom/source, soundin, vol as num, vary, extrarange as num, falloff, frequency = null, channel = 0, pressure_affected = TRUE, ignore_walls = TRUE)
|
||||
if(isarea(source))
|
||||
throw EXCEPTION("playsound(): source is an area")
|
||||
return
|
||||
@@ -11,7 +11,10 @@
|
||||
// Looping through the player list has the added bonus of working for mobs inside containers
|
||||
var/sound/S = sound(get_sfx(soundin))
|
||||
var/maxdistance = (world.view + extrarange) * 3
|
||||
for(var/P in GLOB.player_list)
|
||||
var/list/listeners = GLOB.player_list
|
||||
if(!ignore_walls) //these sounds don't carry through walls
|
||||
listeners = listeners & hearers(maxdistance,turf_source)
|
||||
for(var/P in listeners)
|
||||
var/mob/M = P
|
||||
if(!M || !M.client)
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user