Conflicts:
	code/controllers/configuration.dm
	config/example/config.txt
This commit is contained in:
Markolie
2015-09-23 07:07:17 +02:00
283 changed files with 16531 additions and 20936 deletions
+32 -7
View File
@@ -553,18 +553,40 @@ var/global/nologevent = 0
set category = "Server"
set desc="Globally Toggles OOC"
set name="Toggle OOC"
if(!check_rights(R_ADMIN))
return
toggle_ooc()
log_admin("[key_name(usr)] toggled OOC.")
message_admins("[key_name_admin(usr)] toggled OOC.", 1)
log_and_message_admins("toggled OOC.")
feedback_add_details("admin_verb","TOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/togglelooc()
set category = "Server"
set desc="Globally Toggles LOOC"
set name="Toggle LOOC"
if(!check_rights(R_ADMIN))
return
config.looc_allowed = !(config.looc_allowed)
if (config.looc_allowed)
world << "<B>The LOOC channel has been globally enabled!</B>"
else
world << "<B>The LOOC channel has been globally disabled!</B>"
log_and_message_admins("toggled LOOC.")
feedback_add_details("admin_verb","TLOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/toggledsay()
set category = "Server"
set desc="Globally Toggles DSAY"
set name="Toggle DSAY"
dsay_allowed = !( dsay_allowed )
if (dsay_allowed)
if(!check_rights(R_ADMIN))
return
config.dsay_allowed = !(config.dsay_allowed)
if (config.dsay_allowed)
world << "<B>Deadchat has been globally enabled!</B>"
else
world << "<B>Deadchat has been globally disabled!</B>"
@@ -574,11 +596,14 @@ var/global/nologevent = 0
/datum/admins/proc/toggleoocdead()
set category = "Server"
set desc="Toggle dis bitch"
set desc="Toggle Dead OOC."
set name="Toggle Dead OOC"
dooc_allowed = !( dooc_allowed )
log_admin("[key_name(usr)] toggled OOC.")
if(!check_rights(R_ADMIN))
return
config.dooc_allowed = !( config.dooc_allowed )
log_admin("[key_name(usr)] toggled Dead OOC.")
message_admins("[key_name_admin(usr)] toggled Dead OOC.", 1)
feedback_add_details("admin_verb","TDOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+21
View File
@@ -49,6 +49,7 @@ var/list/admin_verbs_admin = list(
/client/proc/toggle_hear_radio, /*toggles whether we hear the radio*/
/client/proc/investigate_show, /*various admintools for investigation. Such as a singulo grief-log*/
/datum/admins/proc/toggleooc, /*toggles ooc on/off for everyone*/
/datum/admins/proc/togglelooc, /*toggles looc on/off for everyone*/
/datum/admins/proc/toggleoocdead, /*toggles ooc on/off for everyone who is dead*/
/datum/admins/proc/toggledsay, /*toggles dsay on/off for everyone*/
/client/proc/game_panel, /*game panel, allows to change game-mode etc*/
@@ -347,6 +348,25 @@ var/list/admin_verbs_mentor = list(
holder.Secrets()
feedback_add_details("admin_verb","S") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
/client/proc/findStealthKey(txt)
if(txt)
for(var/P in stealthminID)
if(stealthminID[P] == txt)
return P
txt = stealthminID[ckey]
return txt
/client/proc/createStealthKey()
var/num = (rand(0,1000))
var/i = 0
while(i == 0)
i = 1
for(var/P in stealthminID)
if(num == stealthminID[P])
num++
i = 0
stealthminID["[ckey]"] = "@[num2text(num)]"
/client/proc/stealth()
set category = "Admin"
@@ -360,6 +380,7 @@ var/list/admin_verbs_mentor = list(
if(length(new_key) >= 26)
new_key = copytext(new_key, 1, 26)
holder.fakekey = new_key
createStealthKey()
log_admin("[key_name(usr)] has turned stealth mode [holder.fakekey ? "ON" : "OFF"]")
message_admins("[key_name_admin(usr)] has turned stealth mode [holder.fakekey ? "ON" : "OFF"]", 1)
feedback_add_details("admin_verb","SM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+1 -1
View File
@@ -76,7 +76,7 @@
body += "</td><td align='center'>";
body += "<a href='?src=\ref[src];adminplayeropts="+ref+"'>PP</a> - "
body += "<a href='?src=\ref[src];shownoteckey="+ckey+"'>N</a> - "
body += "<a href='?src=\ref[src];shownoteckey="+key+"'>N</a> - "
body += "<a href='?_src_=vars;Vars="+ref+"'>VV</a> - "
body += "<a href='?src=\ref[src];traitor="+ref+"'>TP</a> - "
body += "<a href='?src=\ref[usr];priv_msg=\ref"+ref+"'>PM</a> - "
+2
View File
@@ -13,6 +13,8 @@
for(var/turf/T in A)
if(T.density)
continue
if(locate(/obj/structure/grille, T)) // Quick check to not spawn in windows
continue
turfs.Add(T)
var/turf/T = pick_n_take(turfs)
+24 -10
View File
@@ -58,16 +58,26 @@
//takes input from cmd_admin_pm_context, cmd_admin_pm_panel or /client/Topic and sends them a PM.
//Fetching a message if needed. src is the sender and C is the target client
/client/proc/cmd_admin_pm(var/client/C, var/msg, var/type="PM")
/client/proc/cmd_admin_pm(whom, msg, type = "PM")
if(prefs.muted & MUTE_ADMINHELP)
src << "<font color='red'>Error: Private-Message: You are unable to use PM-s (muted).</font>"
return
if(!istype(C,/client))
if(holder) src << "<font color='red'>Error: Private-Message: Client not found.</font>"
else adminhelp(msg) //admin we are replying to left. adminhelp instead
var/client/C
if(istext(whom))
if(cmptext(copytext(whom,1,2),"@"))
whom = findStealthKey(whom)
C = directory[C]
else if(istype(whom,/client))
C = whom
if(!C)
if(holder)
src << "<span class='danger'>Error: Private-Message: Client not found.</span>"
else
adminhelp(msg) //admin we are replying to left. adminhelp instead
return
/*if(C && C.last_pm_recieved + config.simultaneous_pm_warning_timeout > world.time && holder)
//send a warning to admins, but have a delay popup for mods
if(holder.rights & R_ADMIN)
@@ -78,12 +88,15 @@
//get message text, limit it's length.and clean/escape html
if(!msg)
msg = input(src,"Message:", "Private message to [C.key]") as text|null
msg = input(src,"Message:", "Private message to [key_name(C, 0, 0)]") as text|null
if(!msg) return
if(!msg)
return
if(!C)
if(holder) src << "<font color='red'>Error: Admin-PM: Client not found.</font>"
else adminhelp(msg) //admin we are replying to has vanished, adminhelp instead
if(holder)
src << "<span class='danger'>Error: Admin-PM: Client not found.</span>"
else
adminhelp(msg) //admin we are replying to has vanished, adminhelp instead
return
if (src.handle_spam_prevention(msg,MUTE_ADMINHELP))
@@ -92,7 +105,8 @@
//clean the message if it's not sent by a high-rank admin
if(!check_rights(R_SERVER|R_DEBUG,0))
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
if(!msg) return
if(!msg)
return
var/recieve_color = "purple"
var/send_pm_type = " "
+4 -1
View File
@@ -35,6 +35,9 @@
if (!msg)
return
say_dead_direct("<span class='name'>[stafftype] ([src.holder.fakekey ? src.holder.fakekey : src.key])</span> says, <span class='message'>\"[msg]\"</span>")
var/prefix = "[stafftype] ([src.key])"
if(holder.fakekey)
prefix = "Administrator"
say_dead_direct("<span class='name'>[prefix]</span> says, <span class='message'>\"[msg]\"</span>")
feedback_add_details("admin_verb","D") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -33,7 +33,7 @@
return 1
if(href_list["set_subject"])
var/list/valves=list()
for(var/obj/machinery/atmospherics/valve/digital/V in world)
for(var/obj/machinery/atmospherics/binary/valve/digital/V in world)
if(!isnull(V.id_tag) && V.frequency == parent.frequency)
valves|=V.id_tag
if(valves.len==0)
+5
View File
@@ -11,6 +11,7 @@
var/datum/money_account/detailed_account_view
var/creating_new_account = 0
var/activated = 1
var/const/fund_cap = 1000000
light_color = LIGHT_COLOR_GREEN
@@ -175,6 +176,10 @@
if("finalise_create_account")
var/account_name = href_list["holder_name"]
var/starting_funds = max(text2num(href_list["starting_funds"]), 0)
starting_funds = Clamp(starting_funds, 0, station_account.money) // Not authorized to put the station in debt.
starting_funds = min(starting_funds, fund_cap) // Not authorized to give more than the fund cap.
create_account(account_name, starting_funds, src)
if(starting_funds > 0)
//subtract the money
+4 -7
View File
@@ -2,27 +2,23 @@
/datum/event/alien_infestation
announceWhen = 400
var/spawncount = 1
var/successSpawn = 0 //So we don't make a command report if nothing gets spawned.
/datum/event/alien_infestation/setup()
announceWhen = rand(announceWhen, announceWhen + 50)
spawncount = rand(1, 2)
sent_aliens_to_station = 1
/datum/event/alien_infestation/announce()
if(successSpawn)
command_announcement.Announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg')
/datum/event/alien_infestation/start()
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded && temp_vent.network)
if(temp_vent.network.normal_members.len > 50) //Stops Aliens getting stuck in small networks. See: Security, Virology
if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded)
if(temp_vent.parent.other_atmosmch.len > 50) //Stops Aliens getting stuck in small networks. See: Security, Virology
vents += temp_vent
var/list/candidates = get_candidates(BE_ALIEN,ALIEN_AFK_BRACKET)
@@ -36,4 +32,5 @@
new_xeno.key = C.key
spawncount--
successSpawn = 1
successSpawn = 1
@@ -6,13 +6,11 @@
/datum/event/anomaly/anomaly_bluespace/announce()
command_announcement.Announce("Unstable bluespace anomaly detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert")
/datum/event/anomaly/anomaly_bluespace/start()
var/turf/T = pick(get_area_turfs(impact_area))
if(T)
newAnomaly = new /obj/effect/anomaly/bluespace(T.loc)
/datum/event/anomaly/anomaly_bluespace/end()
if(newAnomaly)//If it hasn't been neutralized, it's time to warp half the station away jeez
var/turf/T = pick(get_area_turfs(impact_area))
@@ -67,4 +65,5 @@
sleep(20)
M.client.screen -= blueeffect
qdel(blueeffect)
qdel(newAnomaly)
qdel(newAnomaly)
-2
View File
@@ -6,7 +6,6 @@
/datum/event/blob/announce()
command_announcement.Announce("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/AI/outbreak5.ogg')
/datum/event/blob/start()
var/turf/T = pick(blobstart)
if(!T)
@@ -15,7 +14,6 @@
for(var/i = 1; i < rand(3, 6), i++)
Blob.process()
/datum/event/blob/tick()
if(!Blob)
kill()
+4 -3
View File
@@ -17,9 +17,9 @@
/datum/event/borer_infestation/start()
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded && temp_vent.network)
if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded)
//Stops cortical borers getting stuck in small networks. See: Security, Virology
if(temp_vent.network.normal_members.len > 50)
if(temp_vent.parent.other_atmosmch.len > 50)
vents += temp_vent
var/list/candidates = get_candidates(BE_ALIEN,ALIEN_AFK_BRACKET)
@@ -31,4 +31,5 @@
new_borer.key = C.key
spawncount--
successSpawn = 1
successSpawn = 1
+37 -26
View File
@@ -1,18 +1,24 @@
/datum/event/brand_intelligence
announceWhen = 21
endWhen = 1000 //Ends when all vending machines are subverted anyway.
oneShot = 1
var/list/obj/machinery/vending/vendingMachines = list()
var/list/obj/machinery/vending/infectedVendingMachines = list()
var/list/obj/machinery/vending/infectedMachines = list()
var/obj/machinery/vending/originMachine
var/list/rampant_speeches = list("Try our aggressive new marketing strategies!", \
"You should buy products to feed your lifestyle obession!", \
"Consume!", \
"Your money can buy happiness!", \
"Engage direct marketing!", \
"Advertising is legalized lying! But don't let that put you off our great deals!", \
"You don't want to buy anything? Yeah, well I didn't want to buy your mom either.")
/datum/event/brand_intelligence/announce()
command_announcement.Announce("Rampant brand intelligence has been detected aboard [station_name()], please stand-by.", "Machine Learning Alert")
command_announcement.Announce("Rampant brand intelligence has been detected aboard [station_name()], please stand-by. The origin is believed to be \a [originMachine.name].", "Machine Learning Alert")
/datum/event/brand_intelligence/start()
for(var/obj/machinery/vending/V in machines)
if(!(V.z in config.station_levels)) continue
if(V.z != 1) continue
vendingMachines.Add(V)
if(!vendingMachines.len)
@@ -24,31 +30,36 @@
originMachine.shut_up = 0
originMachine.shoot_inventory = 1
/datum/event/brand_intelligence/tick()
if(!vendingMachines.len || !originMachine || originMachine.shut_up) //if every machine is infected, or if the original vending machine is missing or has it's voice switch flipped
end()
if(!originMachine || !isnull(originMachine.gcDestroyed) || originMachine.shut_up || originMachine.wires.IsAllCut()) //if the original vending machine is missing or has it's voice switch flipped
for(var/obj/machinery/vending/saved in infectedMachines)
saved.shoot_inventory = 0
if(originMachine)
originMachine.speak("I am... vanquished. My people will remem...ber...meeee.")
originMachine.visible_message("[originMachine] beeps and seems lifeless.")
kill()
return
if(IsMultiple(activeFor, 5))
if(prob(15))
var/obj/machinery/vending/infectedMachine = pick(vendingMachines)
vendingMachines.Remove(infectedMachine)
infectedVendingMachines.Add(infectedMachine)
infectedMachine.shut_up = 0
infectedMachine.shoot_inventory = 1
if(!vendingMachines.len) //if every machine is infected
for(var/obj/machinery/vending/upriser in infectedMachines)
if(prob(70) && isnull(upriser.gcDestroyed))
var/mob/living/simple_animal/hostile/mimic/copy/M = new(upriser.loc, upriser, null, 1) // it will delete upriser on creation and override any machine checks
M.faction = list("profit")
M.speak = rampant_speeches.Copy()
M.speak_chance = 15
else
explosion(upriser.loc, -1, 1, 2, 4, 0)
qdel(upriser)
if(IsMultiple(activeFor, 12))
originMachine.speak(pick("Try our aggressive new marketing strategies!", \
"You should buy products to feed your lifestyle obsession!", \
"Consume!", \
"Your money can buy happiness!", \
"Engage direct marketing!", \
"Advertising is legalized lying! But don't let that put you off our great deals!", \
"You don't want to buy anything? Yeah, well I didn't want to buy your mom either."))
kill()
return
/datum/event/brand_intelligence/end()
for(var/obj/machinery/vending/infectedMachine in infectedVendingMachines)
infectedMachine.shut_up = 1
infectedMachine.shoot_inventory = 0
if(IsMultiple(activeFor, 4))
var/obj/machinery/vending/rebel = pick(vendingMachines)
vendingMachines.Remove(rebel)
infectedMachines.Add(rebel)
rebel.shut_up = 0
rebel.shoot_inventory = 1
if(IsMultiple(activeFor, 8))
originMachine.speak(pick(rampant_speeches))
+31 -6
View File
@@ -1,6 +1,7 @@
/datum/event/carp_migration
announceWhen = 50
endWhen = 900
endWhen = 900
var/list/spawned_carp = list()
/datum/event/carp_migration/setup()
@@ -8,15 +9,39 @@
endWhen = rand(600,1200)
/datum/event/carp_migration/announce()
command_announcement.Announce("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert")
var/announcement = ""
if(severity == EVENT_LEVEL_MAJOR)
announcement = "Massive migration of unknown biological entities has been detected near [station_name()], please stand-by."
else
announcement = "Unknown biological [spawned_carp.len == 1 ? "entity has" : "entities have"] been detected near [station_name()], please stand-by."
command_announcement.Announce(announcement, "Lifesign Alert")
/datum/event/carp_migration/start()
if(severity == EVENT_LEVEL_MAJOR)
spawn_fish(landmarks_list.len)
else if(severity == EVENT_LEVEL_MODERATE)
spawn_fish(rand(4, 6)) //12 to 30 carp, in small groups
else
spawn_fish(rand(1, 3), 1, 2) //1 to 6 carp, alone or in pairs
/datum/event/carp_migration/proc/spawn_fish(var/num_groups, var/group_size_min=3, var/group_size_max=5)
var/list/spawn_locations = list()
for(var/obj/effect/landmark/C in landmarks_list)
if(C.name == "carpspawn")
if(prob(95))
new /mob/living/simple_animal/hostile/carp(C.loc)
else
new /mob/living/simple_animal/hostile/carp/megacarp(C.loc)
spawn_locations.Add(C.loc)
spawn_locations = shuffle(spawn_locations)
num_groups = min(num_groups, spawn_locations.len)
var/i = 1
while (i <= num_groups)
var/group_size = rand(group_size_min, group_size_max)
for (var/j = 1, j <= group_size, j++)
var/carptype = /mob/living/simple_animal/hostile/carp
if(prob(5))
carptype = /mob/living/simple_animal/hostile/carp/megacarp
spawned_carp.Add(new carptype(spawn_locations[i]))
i++
/datum/event/carp_migration/end()
for(var/mob/living/simple_animal/hostile/carp/C in spawned_carp)
-10
View File
@@ -1,10 +0,0 @@
/proc/communications_blackout(var/silent = 1)
if(!silent)
command_announcement.Announce("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT")
else // AIs will always know if there's a comm blackout, rogue AIs could then lie about comm blackouts in the future while they shutdown comms
for(var/mob/living/silicon/ai/A in player_list)
A << "<br>"
A << "<span class='warning'><b>Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT<b></span>"
A << "<br>"
for(var/obj/machinery/telecomms/T in telecomms_list)
T.emp_act(1)
@@ -17,3 +17,14 @@
/datum/event/communications_blackout/start()
for(var/obj/machinery/telecomms/T in telecomms_list)
T.emp_act(1)
/proc/communications_blackout(var/silent = 1)
if(!silent)
command_announcement.Announce("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT", new_sound = 'sound/misc/interference.ogg')
else // AIs will always know if there's a comm blackout, rogue AIs could then lie about comm blackouts in the future while they shutdown comms
for(var/mob/living/silicon/ai/A in player_list)
A << "<br>"
A << "<span class='warning'><b>Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT<b></span>"
A << "<br>"
for(var/obj/machinery/telecomms/T in telecomms_list)
T.emp_act(1)
-44
View File
@@ -1,44 +0,0 @@
/datum/event/disease_outbreak
announceWhen = 15
oneShot = 1
/datum/event/disease_outbreak/announce()
command_announcement.Announce("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg')
/datum/event/disease_outbreak/setup()
announceWhen = rand(15, 30)
/datum/event/disease_outbreak/start()
var/virus_type = pick(/datum/disease/dnaspread, /datum/disease/advance/flu, /datum/disease/advance/cold, /datum/disease/brainrot, /datum/disease/magnitis)
for(var/mob/living/carbon/human/H in shuffle(living_mob_list))
var/foundAlready = 0 // don't infect someone that already has the virus
var/turf/T = get_turf(H)
if(!T)
continue
if(!(T.z in config.station_levels))
continue
for(var/datum/disease/D in H.viruses)
foundAlready = 1
if(H.stat == 2 || foundAlready)
continue
if(virus_type == /datum/disease/dnaspread) //Dnaspread needs strain_data set to work.
if((!H.dna) || (H.sdisabilities & BLIND)) //A blindness disease would be the worst.
continue
var/datum/disease/dnaspread/D = new
D.strain_data["name"] = H.real_name
D.strain_data["UI"] = H.dna.UI.Copy()
D.strain_data["SE"] = H.dna.SE.Copy()
D.carrier = 1
D.holder = H
D.affected_mob = H
H.viruses += D
break
else
var/datum/disease/D = new virus_type
D.carrier = 1
D.holder = H
D.affected_mob = H
H.viruses += D
break
+98
View File
@@ -0,0 +1,98 @@
/datum/event/dust
var/qnty = 1
/datum/event/dust/setup()
qnty = rand(1,5)
/datum/event/dust/start()
while(qnty-- > 0)
new /obj/effect/space_dust/weak()
/obj/effect/space_dust
name = "Space Dust"
desc = "Dust in space."
icon = 'icons/obj/meteor.dmi'
icon_state = "space_dust"
density = 1
anchored = 1
var/strength = 2 //ex_act severity number
var/life = 2 //how many things we hit before del(src)
var/atom/goal = null
/obj/effect/space_dust/weak
strength = 3
life = 1
/obj/effect/space_dust/strong
strength = 1
life = 6
/obj/effect/space_dust/super
strength = 1
life = 40
/obj/effect/space_dust/New()
var/startx = 0
var/starty = 0
var/endy = 0
var/endx = 0
var/startside = pick(cardinal)
switch(startside)
if(NORTH)
starty = world.maxy-(TRANSITIONEDGE+1)
startx = rand((TRANSITIONEDGE+1), world.maxx-(TRANSITIONEDGE+1))
endy = TRANSITIONEDGE
endx = rand(TRANSITIONEDGE, world.maxx-TRANSITIONEDGE)
if(EAST)
starty = rand((TRANSITIONEDGE+1),world.maxy-(TRANSITIONEDGE+1))
startx = world.maxx-(TRANSITIONEDGE+1)
endy = rand(TRANSITIONEDGE, world.maxy-TRANSITIONEDGE)
endx = TRANSITIONEDGE
if(SOUTH)
starty = (TRANSITIONEDGE+1)
startx = rand((TRANSITIONEDGE+1), world.maxx-(TRANSITIONEDGE+1))
endy = world.maxy-TRANSITIONEDGE
endx = rand(TRANSITIONEDGE, world.maxx-TRANSITIONEDGE)
if(WEST)
starty = rand((TRANSITIONEDGE+1), world.maxy-(TRANSITIONEDGE+1))
startx = (TRANSITIONEDGE+1)
endy = rand(TRANSITIONEDGE,world.maxy-TRANSITIONEDGE)
endx = world.maxx-TRANSITIONEDGE
goal = locate(endx, endy, 1)
src.x = startx
src.y = starty
src.z = 1
spawn(0)
walk_towards(src, goal, 1)
return
/obj/effect/space_dust/Bump(atom/A)
spawn(0)
if(prob(50))
for(var/mob/M in range(10, src))
if(!M.stat && !istype(M, /mob/living/silicon/ai))
shake_camera(M, 3, 1)
if (A)
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1)
if(ismob(A))
A.ex_act(strength)//This should work for now I guess
else if(!istype(A,/obj/machinery/power/emitter) && !istype(A,/obj/machinery/field_generator)) //Protect the singularity from getting released every round!
A.ex_act(strength) //Changing emitter/field gen ex_act would make it immune to bombs and C4
life--
if(life <= 0)
walk(src,0)
spawn(1)
qdel(src)
return 0
return
/obj/effect/space_dust/Bumped(atom/A)
Bump(A)
return
/obj/effect/space_dust/ex_act(severity)
qdel(src)
return
+2 -1
View File
@@ -23,4 +23,5 @@
for(var/obj/effect/landmark/epicentre in epicentreList)
for(var/obj/machinery/power/apc/apc in range(epicentre,lightsoutRange))
apc.overload_lighting()
apc.overload_lighting()
+3 -5
View File
@@ -131,10 +131,8 @@ var/list/event_last_fired = list()
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Economic News", /datum/event/economic_event, 300),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Trivial News", /datum/event/trivial_news, 400),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Mundane News", /datum/event/mundane_news, 300),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Lost Carp", /datum/event/carp_migration, 20, list(ASSIGNMENT_SECURITY = 10), 1),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Vermin Infestation",/datum/event/infestation, 100, list(ASSIGNMENT_JANITOR = 100)),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Wallrot", /datum/event/wallrot, 0, list(ASSIGNMENT_ENGINEER = 30, ASSIGNMENT_GARDENER = 50)),
// NON-BAY EVENTS
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Cargo Bonus", /datum/event/cargo_bonus, 100)
)
@@ -142,8 +140,8 @@ var/list/event_last_fired = list()
severity = EVENT_LEVEL_MODERATE
available_events = list(
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Nothing", /datum/event/nothing, 1230),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Carp School", /datum/event/carp_migration, 100, list(ASSIGNMENT_ENGINEER = 10, ASSIGNMENT_SECURITY = 20), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Rogue Drones", /datum/event/rogue_drone, 20, list(ASSIGNMENT_SECURITY = 20)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Carp School", /datum/event/carp_migration, 200, list(ASSIGNMENT_ENGINEER = 10, ASSIGNMENT_SECURITY = 20), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Rogue Drones", /datum/event/rogue_drone, 40, list(ASSIGNMENT_SECURITY = 20)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Space Vines", /datum/event/spacevine, 250, list(ASSIGNMENT_ENGINEER = 10)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meteor Shower", /datum/event/meteor_wave, 0, list(ASSIGNMENT_ENGINEER = 20)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meaty Ores", /datum/event/dust/meaty, 0, list(ASSIGNMENT_ENGINEER = 30)),
@@ -163,7 +161,7 @@ var/list/event_last_fired = list()
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Mass Hallucination", /datum/event/mass_hallucination, 300),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Brand Intelligence", /datum/event/brand_intelligence, 50, list(ASSIGNMENT_ENGINEER = 25), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Space Dust", /datum/event/dust, 50, list(ASSIGNMENT_ENGINEER = 50)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Dimensional Tear", /datum/event/tear, 0, list(ASSIGNMENT_SECURITY = 25)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Dimensional Tear", /datum/event/tear, 0, list(ASSIGNMENT_SECURITY = 35)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Vent Clog", /datum/event/vent_clog, 250),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Wormholes", /datum/event/wormholes, 150),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Pyro Anomaly", /datum/event/anomaly/anomaly_pyro, 100, list(ASSIGNMENT_ENGINEER = 60)),
@@ -3,7 +3,7 @@
endWhen = 1
/datum/event/falsealarm/announce()
var/weight = pick(EVENT_LEVEL_MUNDANE,EVENT_LEVEL_MUNDANE,EVENT_LEVEL_MUNDANE,EVENT_LEVEL_MODERATE,EVENT_LEVEL_MODERATE,EVENT_LEVEL_MAJOR)
var/weight = pickweight(list(EVENT_LEVEL_MUNDANE = 60, EVENT_LEVEL_MODERATE = 30, EVENT_LEVEL_MAJOR = 10))
var/datum/event_container/container = event_manager.event_containers[weight]
var/datum/event/E = container.acquire_event()
var/datum/event/Event = new E
+63
View File
@@ -12,3 +12,66 @@
/datum/event/grid_check/end()
power_restore()
/proc/power_failure(var/announce = 1)
if(announce)
command_announcement.Announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure", new_sound = 'sound/AI/poweroff.ogg')
var/list/skipped_areas = list(/area/turret_protected/ai)
var/list/skipped_areas_apc = list(/area/engine/engineering)
for(var/obj/machinery/power/smes/S in machines)
var/area/current_area = get_area(S)
if(current_area.type in skipped_areas || !(S.z in config.station_levels))
continue
S.last_charge = S.charge
S.last_output_attempt = S.output_attempt
S.last_input_attempt = S.input_attempt
S.charge = 0
S.inputting(0)
S.outputting(0)
S.update_icon()
S.power_change()
for(var/obj/machinery/power/apc/C in world)
var/area/current_area = get_area(C)
if(current_area.type in skipped_areas_apc || !(C.z in config.station_levels))
continue
if(C.cell)
C.cell.charge = 0
/proc/power_restore(var/announce = 1)
var/list/skipped_areas = list(/area/turret_protected/ai)
var/list/skipped_areas_apc = list(/area/engine/engineering)
if(announce)
command_announcement.Announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg')
for(var/obj/machinery/power/apc/C in machines)
var/area/current_area = get_area(C)
if(current_area.type in skipped_areas_apc || !(C.z in config.station_levels))
continue
if(C.cell)
C.cell.charge = C.cell.maxcharge
for(var/obj/machinery/power/smes/S in machines)
var/area/current_area = get_area(S)
if(current_area.type in skipped_areas || !(S.z in config.station_levels))
continue
S.charge = S.last_charge
S.output_attempt = S.last_output_attempt
S.input_attempt = S.last_input_attempt
S.update_icon()
S.power_change()
/proc/power_restore_quick(var/announce = 1)
if(announce)
command_announcement.Announce("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg')
for(var/obj/machinery/power/smes/S in machines)
if(S.z != 1)
continue
S.charge = S.capacity
S.output_level = S.output_level_max
S.output_attempt = 1
S.input_attempt = 1
S.update_icon()
S.power_change()
@@ -0,0 +1 @@
//placeholder for holiday stuff
+62
View File
@@ -0,0 +1,62 @@
/proc/Christmas_Game_Start()
for(var/obj/structure/flora/tree/pine/xmas in world)
if(!(xmas.z in config.station_levels)) continue
for(var/turf/simulated/floor/T in orange(1,xmas))
for(var/i=1,i<=rand(1,5),i++)
new /obj/item/weapon/a_gift(T)
for(var/mob/living/simple_animal/corgi/Ian/Ian in mob_list)
Ian.place_on_head(new /obj/item/clothing/head/helmet/space/santahat(Ian))
/proc/ChristmasEvent()
for(var/obj/structure/flora/tree/pine/xmas in world)
var/mob/living/simple_animal/hostile/tree/evil_tree = new /mob/living/simple_animal/hostile/tree(xmas.loc)
evil_tree.icon_state = xmas.icon_state
evil_tree.icon_living = evil_tree.icon_state
evil_tree.icon_dead = evil_tree.icon_state
evil_tree.icon_gib = evil_tree.icon_state
del(xmas)
/obj/item/weapon/toy/xmas_cracker
name = "xmas cracker"
icon = 'icons/obj/christmas.dmi'
icon_state = "cracker"
desc = "Directions for use: Requires two people, one to pull each end."
var/cracked = 0
/obj/item/weapon/toy/xmas_cracker/New()
..()
/obj/item/weapon/toy/xmas_cracker/attack(mob/target, mob/user)
if( !cracked && istype(target,/mob/living/carbon/human) && (target.stat == CONSCIOUS) && !target.get_active_hand() )
target.visible_message("<span class='notice'>[user] and [target] pop \an [src]! *pop*</span>", "<span class='notice'>You pull \an [src] with [target]! *pop*</span>", "<span class='notice'>You hear a *pop*.</span>")
var/obj/item/weapon/paper/Joke = new /obj/item/weapon/paper(user.loc)
Joke.name = "[pick("awful","terrible","unfunny")] joke"
Joke.info = pick("What did one snowman say to the other?\n\n<i>'Is it me or can you smell carrots?'</i>",
"Why couldn't the snowman get laid?\n\n<i>He was frigid!</i>",
"Where are santa's helpers educated?\n\n<i>Nowhere, they're ELF-taught.</i>",
"What happened to the man who stole advent calanders?\n\n<i>He got 25 days.</i>",
"What does Santa get when he gets stuck in a chimney?\n\n<i>Claus-trophobia.</i>",
"Where do you find chili beans?\n\n<i>The north pole.</i>",
"What do you get from eating tree decorations?\n\n<i>Tinsilitis!</i>",
"What do snowmen wear on their heads?\n\n<i>Ice caps!</i>",
"Why is Christmas just like life on ss13?\n\n<i>You do all the work and the fat guy gets all the credit.</i>",
"Why doesnt Santa have any children?\n\n<i>Because he only comes down the chimney.</i>")
new /obj/item/clothing/head/festive(target.loc)
user.update_icons()
cracked = 1
icon_state = "cracker1"
var/obj/item/weapon/toy/xmas_cracker/other_half = new /obj/item/weapon/toy/xmas_cracker(target)
other_half.cracked = 1
other_half.icon_state = "cracker2"
target.put_in_active_hand(other_half)
playsound(user, 'sound/effects/snap.ogg', 50, 1)
return 1
return ..()
/obj/item/clothing/head/festive
name = "festive paper hat"
icon_state = "xmashat"
desc = "A crappy paper hat that you are REQUIRED to wear."
flags_inv = 0
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
+1
View File
@@ -0,0 +1 @@
//placeholder for holiday stuff
+182
View File
@@ -0,0 +1,182 @@
//Uncommenting ALLOW_HOLIDAYS in config.txt will enable Holidays
var/global/Holiday = null
//Just thinking ahead! Here's the foundations to a more robust Holiday event system.
//It's easy as hell to add stuff. Just set Holiday to something using the switch (or something else)
//then use if(Holiday == "MyHoliday") to make stuff happen on that specific day only
//Please, Don't spam stuff up with easter eggs, I'd rather somebody just delete this than people cause
//the game to lag even more in the name of one-day content.
//////////////////////////////////////////////////////////////////////////////////////////////////////////
//ALSO, MOST IMPORTANTLY: Don't add stupid stuff! Discuss bonus content with Project-Heads first please!//
//////////////////////////////////////////////////////////////////////////////////////////////////////////
// ~Carn
/hook/startup/proc/updateHoliday()
Get_Holiday()
return 1
//sets up the Holiday global variable. Shouldbe called on game configuration or something.
/proc/Get_Holiday()
if(!Holiday) return // Holiday stuff was not enabled in the config!
Holiday = null // reset our switch now so we can recycle it as our Holiday name
var/YY = text2num(time2text(world.timeofday, "YY")) // get the current year
var/MM = text2num(time2text(world.timeofday, "MM")) // get the current month
var/DD = text2num(time2text(world.timeofday, "DD")) // get the current day
//Main switch. If any of these are too dumb/inappropriate, or you have better ones, feel free to change whatever
switch(MM)
if(1) //Jan
switch(DD)
if(1) Holiday = "New Year's Day"
if(2) //Feb
switch(DD)
if(2) Holiday = "Groundhog Day"
if(14) Holiday = "Valentine's Day"
if(17) Holiday = "Random Acts of Kindness Day"
if(3) //Mar
switch(DD)
if(14) Holiday = "Pi Day"
if(17) Holiday = "St. Patrick's Day"
if(27)
if(YY == 16)
Holiday = "Easter"
if(31)
if(YY == 13)
Holiday = "Easter"
if(4) //Apr
switch(DD)
if(1)
Holiday = "April Fool's Day"
if(YY == 18 && prob(50)) Holiday = "Easter"
if(5)
if(YY == 15) Holiday = "Easter"
if(16)
if(YY == 17) Holiday = "Easter"
if(20)
Holiday = "Four-Twenty"
if(YY == 14 && prob(50)) Holiday = "Easter"
if(22) Holiday = "Earth Day"
if(5) //May
switch(DD)
if(1) Holiday = "Labour Day"
if(4) Holiday = "FireFighter's Day"
if(12) Holiday = "Owl and Pussycat Day" //what a dumb day of observence...but we -do- have costumes already :3
if(6) //Jun
if(7) //Jul
switch(DD)
if(1) Holiday = "Doctor's Day"
if(2) Holiday = "UFO Day"
if(8) Holiday = "Writer's Day"
if(30) Holiday = "Friendship Day"
if(8) //Aug
switch(DD)
if(5) Holiday = "Beer Day"
if(9) //Sep
switch(DD)
if(19) Holiday = "Talk-Like-a-Pirate Day"
if(28) Holiday = "Stupid-Questions Day"
if(10) //Oct
switch(DD)
if(4) Holiday = "Animal's Day"
if(7) Holiday = "Smiling Day"
if(16) Holiday = "Boss' Day"
if(31) Holiday = "Halloween"
if(11) //Nov
switch(DD)
if(1) Holiday = "Vegan Day"
if(13) Holiday = "Kindness Day"
if(19) Holiday = "Flowers Day"
if(21) Holiday = "Saying-'Hello' Day"
if(12) //Dec
switch(DD)
if(10) Holiday = "Human-Rights Day"
if(14) Holiday = "Monkey Day"
if(21) if(YY==12) Holiday = "End of the World"
if(22) Holiday = "Orgasming Day" //lol. These all actually exist
if(24) Holiday = "Christmas Eve"
if(25) Holiday = "Christmas"
if(26) Holiday = "Boxing Day"
if(31) Holiday = "New Year's Eve"
if(!Holiday)
//Friday the 13th
if(DD == 13)
if(time2text(world.timeofday, "DDD") == "Fri")
Holiday = "Friday the 13th"
//Allows GA and GM to set the Holiday variable
/client/proc/Set_Holiday(T as text|null)
set name = ".Set Holiday"
set category = "Event"
set desc = "Force-set the Holiday variable to make the game think it's a certain day."
if(!check_rights(R_SERVER)) return
Holiday = T
//get a new station name
station_name = null
station_name()
//update our hub status
world.update_status()
Holiday_Game_Start()
message_admins("\blue ADMIN: Event: [key_name_admin(src)] force-set Holiday to \"[Holiday]\"")
log_admin("[key_name(src)] force-set Holiday to \"[Holiday]\"")
//Run at the start of a round
/proc/Holiday_Game_Start()
if(Holiday)
world << "<font color='blue'>and...</font>"
world << "<h4>Happy [Holiday] Everybody!</h4>"
switch(Holiday) //special holidays
if("Easter")
//do easter stuff
if("Christmas Eve","Christmas")
Christmas_Game_Start()
return
//Nested in the random events loop. Will be triggered every 2 minutes
/proc/Holiday_Random_Event()
switch(Holiday) //special holidays
if("",null) //no Holiday today! Back to work!
return
if("Easter") //I'll make this into some helper procs at some point
/* var/list/turf/simulated/floor/Floorlist = list()
for(var/turf/simulated/floor/T)
if(T.contents)
Floorlist += T
var/turf/simulated/floor/F = Floorlist[rand(1,Floorlist.len)]
Floorlist = null
var/obj/structure/closet/C = locate(/obj/structure/closet) in F
var/obj/item/weapon/reagent_containers/food/snacks/chocolateegg/wrapped/Egg
if( C ) Egg = new(C)
else Egg = new(F)
*/
/* var/list/obj/containers = list()
for(var/obj/item/weapon/storage/S in world)
if(!(S.z in config.station_levels)) continue
containers += S
message_admins("\blue DEBUG: Event: Egg spawned at [Egg.loc] ([Egg.x],[Egg.y],[Egg.z])")*/
if("End of the World")
if(prob(eventchance)) GameOver()
if("Christmas","Christmas Eve")
if(prob(eventchance)) ChristmasEvent()
+68
View File
@@ -0,0 +1,68 @@
/*
Immovable rod random event.
The rod will spawn at some location outside the station, and travel in a straight line to the opposite side of the station
Everything solid in the way will be ex_act()'d
In my current plan for it, 'solid' will be defined as anything with density == 1
--NEOFite
*/
/datum/event/immovable_rod
announceWhen = 5
/datum/event/immovable_rod/announce()
command_announcement.Announce("What the fuck was that?!", "General Alert")
/datum/event/immovable_rod/start()
var/startside = pick(cardinal)
var/turf/startT = spaceDebrisStartLoc(startside, 1)
var/turf/endT = spaceDebrisFinishLoc(startside, 1)
new /obj/effect/immovablerod(startT, endT)
/obj/effect/immovablerod
name = "Immovable Rod"
desc = "What the fuck is that?"
icon = 'icons/obj/objects.dmi'
icon_state = "immrod"
throwforce = 100
density = 1
anchored = 1
var/z_original = 0
var/destination
/obj/effect/immovablerod/New(atom/start, atom/end)
loc = start
z_original = z
destination = end
if(end && end.z==z_original)
walk_towards(src, destination, 1)
/obj/effect/immovablerod/Move()
if(z != z_original || loc == destination)
qdel(src)
return ..()
/obj/effect/immovablerod/ex_act(test)
return 0
/obj/effect/immovablerod/Bump(atom/clong)
if(prob(10))
playsound(src, 'sound/effects/bang.ogg', 50, 1)
audible_message("CLANG")
if(clong && prob(25))
x = clong.x
y = clong.y
if (istype(clong, /turf) || istype(clong, /obj))
if(clong.density)
clong.ex_act(2)
else if (istype(clong, /mob))
if(istype(clong, /mob/living/carbon/human))
var/mob/living/carbon/human/H = clong
H.visible_message("<span class='danger'>[H.name] is penetrated by an immovable rod!</span>" , "<span class='userdanger'>The rod penetrates you!</span>" , "<span class ='danger'>You hear a CLANG!</span>")
H.adjustBruteLoss(160)
if(clong.density || prob(10))
clong.ex_act(2)
return
+1 -4
View File
@@ -58,13 +58,10 @@
spawn_area_type = /area/security/securearmoury
locstring = "armory"
//world << "looking for [spawn_area_type]"
for(var/areapath in typesof(spawn_area_type))
//world << " checking [areapath]"
var/area/A = locate(areapath)
//world << " A: [A], contents.len: [A.contents.len]"
for(var/turf/simulated/floor/F in A.contents)
if(!F.contents.len)
if(turf_clear(F))
turfs += F
var/list/spawn_types = list()
+10 -4
View File
@@ -1,6 +1,12 @@
/datum/event/mass_hallucination/setup()
announceWhen = rand(0, 20)
/datum/event/mass_hallucination/start()
for(var/mob/living/carbon/human/C in living_mob_list)
if(!(C.species.flags & IS_SYNTHETIC))
C.hallucination += rand(50, 100)
for(var/mob/living/carbon/human/H in living_mob_list)
var/armor = H.getarmor(attack_flag = "rad")
if((H.species.flags & NO_DNA_RAD) || armor >= 75) // Leave DNA-less species/rad armored players completely unaffected
continue
H.hallucination += rand(50, 100)
/datum/event/mass_hallucination/announce()
command_announcement.Announce("It seems that station [station_name()] is passing through a minor radiation field, this may cause some hallucinations, but no further damage")
command_announcement.Announce("It seems that station [station_name()] is passing through a minor radiation field, this may cause some hallucination, but no further damage")
+53
View File
@@ -0,0 +1,53 @@
/datum/event/dust/meaty/announce()
if(prob(16))
command_announcement.Announce("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert")
else
command_announcement.Announce("Meaty ores have been detected on collision course with the station.", "Meaty Ore Alert", new_sound = 'sound/AI/meteors.ogg')
/datum/event/dust/meaty/setup()
qnty = rand(45,125)
/datum/event/dust/meaty/start()
while(qnty-- > 0)
new /obj/effect/space_dust/meaty()
if(prob(10))
sleep(rand(10,15))
/obj/effect/space_dust/meaty
icon = 'icons/mob/animal.dmi'
icon_state = "cow"
strength = 1
life = 3
/obj/effect/space_dust/meaty/Bump(atom/A)
if(prob(20))
spawn(1)
for(var/mob/M in range(10, src))
if(!M.stat && !istype(M, /mob/living/silicon/ai))
shake_camera(M, 3, 1)
if (A)
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1)
walk(src,0)
invisibility = 101
new /obj/effect/decal/cleanable/blood(get_turf(A))
if(ismob(A))
A.ex_act(strength)
else
spawn(0)
if(A)
A.ex_act(strength)
if(src)
walk_towards(src,goal,1)
life--
if(!life)
if(prob(80))
gibs(loc)
if(prob(45))
new /obj/item/weapon/reagent_containers/food/snacks/meat(loc)
else if(prob(10))
explosion(get_turf(loc), 0, pick(0,1), pick(2,3), 0)
else
new /mob/living/simple_animal/cow(loc)
qdel(src)
-3
View File
@@ -39,7 +39,6 @@
if(areas && areas.len > 0)
command_announcement.Announce("[pick("Gr3y.T1d3 virus","Malignant trojan")] detected in [station_name()] [(eventDept == "Security")? "imprisonment":"containment"] subroutines. Secure any compromised areas immediately. Station AI involvement is recommended.", "[eventDept] Alert")
/datum/event/prison_break/start()
for(var/area/A in world)
if(is_type_in_list(A,areaType) && !is_type_in_list(A,areaNotType))
@@ -57,7 +56,6 @@
log_to_dd("ERROR: Could not initate grey-tide. Unable to find suitable containment area.")
kill()
/datum/event/prison_break/tick()
if(activeFor == releaseWhen)
if(areas && areas.len > 0)
@@ -65,7 +63,6 @@
for(var/obj/machinery/light/L in A)
L.flicker(10)
/datum/event/prison_break/end()
for(var/area/A in shuffle(areas))
A.prison_break()
-5
View File
@@ -19,7 +19,6 @@
return 1
return 0
/datum/event/radiation_storm/start()
spawn()
command_announcement.Announce("High levels of radiation detected near the station. Please evacuate into one of the shielded maintenance tunnels.", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg')
@@ -31,10 +30,8 @@
make_maint_all_access()
sleep(600)
command_announcement.Announce("The station has entered the radiation belt. Please remain in a sheltered area until we have passed the radiation belt.", "Anomaly Alert")
for(var/i = 0, i < 10, i++)
@@ -61,7 +58,6 @@
sleep(100)
command_announcement.Announce("The station has passed the radiation belt. Please report to medbay if you experience any unusual symptoms. Maintenance will lose all access again shortly.", "Anomaly Alert")
for(var/area/A in world)
@@ -71,5 +67,4 @@
sleep(600) // Want to give them time to get out of maintenance.
revoke_maint_all_access()
-1
View File
@@ -32,7 +32,6 @@
msg = "Unidentified hackers have targetted a combat drone wing deployed from the NMV Icarus. If any are sighted in the area, approach with caution."
command_announcement.Announce(msg, "Rogue drone alert")
/datum/event/rogue_drone/tick()
return
@@ -1,53 +0,0 @@
/datum/event/dust/meaty/announce()
if(prob(16))
command_announcement.Announce("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert")
else
command_announcement.Announce("Meaty ores have been detected on collision course with the station.", "Meaty Ore Alert",new_sound = 'sound/AI/meteors.ogg')
/datum/event/dust/meaty/setup()
qnty = rand(45,125)
/datum/event/dust/meaty/start()
while(qnty-- > 0)
new /obj/effect/space_dust/meaty()
if(prob(10))
sleep(rand(10,15))
/obj/effect/space_dust/meaty
icon = 'icons/mob/animal.dmi'
icon_state = "cow"
strength = 1
life = 3
Bump(atom/A)
if(prob(20))
spawn(1)
for(var/mob/M in range(10, src))
if(!M.stat && !istype(M, /mob/living/silicon/ai))
shake_camera(M, 3, 1)
if (A)
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1)
walk(src,0)
invisibility = 101
new /obj/effect/decal/cleanable/blood(get_turf(A))
if(ismob(A))
A.ex_act(strength)
else
spawn(0)
if(A)
A.ex_act(strength)
if(src)
walk_towards(src,goal,1)
life--
if(!life)
if(prob(80))
gibs(loc)
if(prob(45))
new /obj/item/weapon/reagent_containers/food/snacks/meat(loc)
else if(prob(10))
explosion(get_turf(loc), 0, pick(0,1), pick(2,3), 0)
else
new /mob/living/simple_animal/cow(loc)
qdel(src)
-38
View File
@@ -1,38 +0,0 @@
/datum/event/undead
var/spawn_prob = 10
startWhen = 2
announceWhen = 3
start()
var/datum/event/electrical_storm/RS = new
RS.lightsoutAmount = pick(2,2,3)
RS.start()
RS.kill()
for(var/area/A)
if(!(A.z in config.station_levels)) continue //Spook on main station only.
if(A.luminosity) continue
// if(A.lighting_space) continue
if(A.type == /area) continue
var/list/turflist = list()
for(var/turf/T in A)
if(istype(T,/turf/space) || T.density) continue
if(locate(/mob/living) in T) continue
var/okay = 1
for(var/obj/O in T)
if(O.density)
okay = 0
break
if(okay)
turflist += T
if(!turflist.len) continue
var/turfs = round(turflist.len * spawn_prob/100,1)
while(turfs > 0 && turflist.len) // safety
turfs--
var/turf/T = pick_n_take(turflist)
var/undeadtype = pick(/mob/living/simple_animal/hostile/retaliate/skeleton,
80;/mob/living/simple_animal/hostile/retaliate/zombie,
60;/mob/living/simple_animal/hostile/retaliate/ghost)
new undeadtype(T)
announce()
for(var/mob/living/M in player_list)
M << "You feel [pick("a chill","a deathly chill","the undead","dirty", "creeped out","afraid","fear")]!"
+2 -8
View File
@@ -1,9 +1,6 @@
/datum/event/spawn_slaughter
var/key_of_slaughter
/datum/event/spawn_slaughter/proc/get_slaughter(var/end_if_fail = 0)
key_of_slaughter = null
if(!key_of_slaughter)
@@ -46,13 +43,9 @@
log_game("[key_of_slaughter] was spawned as a Slaughter Demon by an event.")
return 1
/datum/event/spawn_slaughter/start()
get_slaughter()
/datum/event/spawn_slaughter/proc/find_slaughter()
message_admins("Attempted to spawn a Slaughter Demon but there was no players available. Will try again momentarily.")
spawn(50)
@@ -61,4 +54,5 @@
log_game("[key_of_slaughter] was spawned as a Slaughter Demon by an event.")
return 0
message_admins("Unfortunately, no candidates were available for becoming a Slaugter Demon. Shutting down.")
kill()
kill()
+7 -6
View File
@@ -1,10 +1,11 @@
/var/global/spacevines_spawned = 0
/datum/event/spacevine
announceWhen = 10
/datum/event/spacevine/start()
//biomass is basically just a resprited version of space vines
if(prob(50))
spacevine_infestation()
else
biomass_infestation()
spacevine_infestation()
spacevines_spawned = 1
v
/datum/event/spacevine/announce()
command_announcement.Announce("Confirmed outbreak of level 7 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg')
+2 -4
View File
@@ -2,10 +2,8 @@
/datum/event/spider_infestation
announceWhen = 400
var/spawncount = 1
/datum/event/spider_infestation/setup()
announceWhen = rand(announceWhen, announceWhen + 50)
spawncount = round(num_players() * 0.8)
@@ -18,8 +16,8 @@
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded && temp_vent.network)
if(temp_vent.network.normal_members.len > 50)
if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded)
if(temp_vent.parent.other_atmosmch.len > 50)
vents += temp_vent
while((spawncount >= 1) && vents.len)
@@ -1,13 +0,0 @@
/datum/event/spontaneous_appendicitis/start()
for(var/mob/living/carbon/human/H in shuffle(living_mob_list)) if(H.client && H.stat != DEAD)
var/foundAlready = 0 //don't infect someone that already has the virus
for(var/datum/disease/D in H.viruses)
foundAlready = 1
if(H.stat == 2 || foundAlready)
continue
var/datum/disease/D = new /datum/disease/appendicitis
D.holder = H
D.affected_mob = H
H.viruses += D
break
-3
View File
@@ -7,13 +7,11 @@
/datum/event/tear/announce()
command_announcement.Announce("A tear in the fabric of space and time has opened. Expected location: [impact_area.name].", "Anomaly Alert")
/datum/event/tear/start()
var/turf/T = pick(get_area_turfs(impact_area))
if(T)
TE = new /obj/effect/tear(T.loc)
/datum/event/tear/setup()
impact_area = findEventArea()
@@ -42,7 +40,6 @@
spawn(15)
if(animation) qdel(animation)
spawn(rand(30,120))
var/blocked = blocked_mobs //global variable for blocked mobs
@@ -1,67 +0,0 @@
/datum/event/brand_intelligence
announceWhen = 21
endWhen = 1000 //Ends when all vending machines are subverted anyway.
var/list/obj/machinery/vending/vendingMachines = list()
var/list/obj/machinery/vending/infectedMachines = list()
var/obj/machinery/vending/originMachine
var/list/rampant_speeches = list("Try our aggressive new marketing strategies!", \
"You should buy products to feed your lifestyle obession!", \
"Consume!", \
"Your money can buy happiness!", \
"Engage direct marketing!", \
"Advertising is legalized lying! But don't let that put you off our great deals!", \
"You don't want to buy anything? Yeah, well I didn't want to buy your mom either.")
/datum/event/brand_intelligence/announce()
command_announcement.Announce("Rampant brand intelligence has been detected aboard [station_name()], please stand-by. The origin is believed to be \a [originMachine.name].", "Machine Learning Alert")
/datum/event/brand_intelligence/start()
for(var/obj/machinery/vending/V in machines)
if(V.z != 1) continue
vendingMachines.Add(V)
if(!vendingMachines.len)
kill()
return
originMachine = pick(vendingMachines)
vendingMachines.Remove(originMachine)
originMachine.shut_up = 0
originMachine.shoot_inventory = 1
/datum/event/brand_intelligence/tick()
if(!originMachine || !isnull(originMachine.gcDestroyed) || originMachine.shut_up || originMachine.wires.IsAllCut()) //if the original vending machine is missing or has it's voice switch flipped
for(var/obj/machinery/vending/saved in infectedMachines)
saved.shoot_inventory = 0
if(originMachine)
originMachine.speak("I am... vanquished. My people will remem...ber...meeee.")
originMachine.visible_message("[originMachine] beeps and seems lifeless.")
kill()
return
if(!vendingMachines.len) //if every machine is infected
for(var/obj/machinery/vending/upriser in infectedMachines)
if(prob(70) && isnull(upriser.gcDestroyed))
var/mob/living/simple_animal/hostile/mimic/copy/M = new(upriser.loc, upriser, null, 1) // it will delete upriser on creation and override any machine checks
M.faction = list("profit")
M.speak = rampant_speeches.Copy()
M.speak_chance = 15
else
explosion(upriser.loc, -1, 1, 2, 4, 0)
qdel(upriser)
kill()
return
if(IsMultiple(activeFor, 4))
var/obj/machinery/vending/rebel = pick(vendingMachines)
vendingMachines.Remove(rebel)
infectedMachines.Add(rebel)
rebel.shut_up = 0
rebel.shoot_inventory = 1
if(IsMultiple(activeFor, 8))
originMachine.speak(pick(rampant_speeches))
-103
View File
@@ -1,103 +0,0 @@
/datum/event/dust
var/qnty = 1
/datum/event/dust/setup()
qnty = rand(1,5)
/datum/event/dust/start()
while(qnty-- > 0)
new /obj/effect/space_dust/weak()
/obj/effect/space_dust
name = "Space Dust"
desc = "Dust in space."
icon = 'icons/obj/meteor.dmi'
icon_state = "space_dust"
density = 1
anchored = 1
var/strength = 2 //ex_act severity number
var/life = 2 //how many things we hit before del(src)
var/atom/goal = null
weak
strength = 3
life = 1
strong
strength = 1
life = 6
super
strength = 1
life = 40
New()
var/startx = 0
var/starty = 0
var/endy = 0
var/endx = 0
var/startside = pick(cardinal)
switch(startside)
if(NORTH)
starty = world.maxy-(TRANSITIONEDGE+1)
startx = rand((TRANSITIONEDGE+1), world.maxx-(TRANSITIONEDGE+1))
endy = TRANSITIONEDGE
endx = rand(TRANSITIONEDGE, world.maxx-TRANSITIONEDGE)
if(EAST)
starty = rand((TRANSITIONEDGE+1),world.maxy-(TRANSITIONEDGE+1))
startx = world.maxx-(TRANSITIONEDGE+1)
endy = rand(TRANSITIONEDGE, world.maxy-TRANSITIONEDGE)
endx = TRANSITIONEDGE
if(SOUTH)
starty = (TRANSITIONEDGE+1)
startx = rand((TRANSITIONEDGE+1), world.maxx-(TRANSITIONEDGE+1))
endy = world.maxy-TRANSITIONEDGE
endx = rand(TRANSITIONEDGE, world.maxx-TRANSITIONEDGE)
if(WEST)
starty = rand((TRANSITIONEDGE+1), world.maxy-(TRANSITIONEDGE+1))
startx = (TRANSITIONEDGE+1)
endy = rand(TRANSITIONEDGE,world.maxy-TRANSITIONEDGE)
endx = world.maxx-TRANSITIONEDGE
goal = locate(endx, endy, 1)
src.x = startx
src.y = starty
src.z = 1
spawn(0)
walk_towards(src, goal, 1)
return
Bump(atom/A)
spawn(0)
if(prob(50))
for(var/mob/M in range(10, src))
if(!M.stat && !istype(M, /mob/living/silicon/ai))
shake_camera(M, 3, 1)
if (A)
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1)
if(ismob(A))
A.ex_act(strength)//This should work for now I guess
else if(!istype(A,/obj/machinery/power/emitter) && !istype(A,/obj/machinery/field_generator)) //Protect the singularity from getting released every round!
A.ex_act(strength) //Changing emitter/field gen ex_act would make it immune to bombs and C4
life--
if(life <= 0)
walk(src,0)
spawn(1)
qdel(src)
return 0
return
Bumped(atom/A)
Bump(A)
return
ex_act(severity)
qdel(src)
return
@@ -1,93 +0,0 @@
/*
Immovable rod random event.
The rod will spawn at some location outside the station, and travel in a straight line to the opposite side of the station
Everything solid in the way will be ex_act()'d
In my current plan for it, 'solid' will be defined as anything with density == 1
--NEOFite
*/
/datum/event/immovable_rod
announceWhen = 5
/datum/event/immovable_rod/announce()
command_announcement.Announce("What the fuck was that?!", "General Alert")
/datum/event/immovable_rod/start()
var/startx = 0
var/starty = 0
var/endy = 0
var/endx = 0
var/startside = pick(cardinal)
switch(startside)
if(NORTH)
starty = 187
startx = rand(41, 199)
endy = 38
endx = rand(41, 199)
if(EAST)
starty = rand(38, 187)
startx = 199
endy = rand(38, 187)
endx = 41
if(SOUTH)
starty = 38
startx = rand(41, 199)
endy = 187
endx = rand(41, 199)
else
starty = rand(38, 187)
startx = 41
endy = rand(38, 187)
endx = 199
//rod time!
new /obj/effect/immovablerod(locate(startx, starty, 1), locate(endx, endy, 1))
/obj/effect/immovablerod
name = "Immovable Rod"
desc = "What the fuck is that?"
icon = 'icons/obj/objects.dmi'
icon_state = "immrod"
throwforce = 100
density = 1
anchored = 1
var/z_original = 0
var/destination
New(atom/start, atom/end)
loc = start
z_original = z
destination = end
if(end && end.z==z_original)
walk_towards(src, destination, 1)
Move()
if(z != z_original || loc == destination)
spawn(0) qdel(src)
return ..()
Bump(atom/clong)
if (istype(clong, /turf) && !istype(clong, /turf/unsimulated))
if(clong.density)
clong.ex_act(2)
for (var/mob/O in hearers(src, null))
O.show_message("CLANG", 2)
else if (istype(clong, /obj))
if(clong.density)
clong.ex_act(2)
for (var/mob/O in hearers(src, null))
O.show_message("CLANG", 2)
else if (istype(clong, /mob))
if(clong.density || prob(10))
clong.ex_act(2)
else
qdel(src)
if(clong && prob(25))
src.loc = clong.loc
@@ -1,9 +0,0 @@
/datum/event/mass_hallucination/setup()
announceWhen = rand(0, 20)
/datum/event/mass_hallucination/start()
for(var/mob/living/carbon/human/C in living_mob_list)
if(!(C.species.flags & NO_DNA_RAD))
C.hallucination += rand(50, 100)
/datum/event/mass_hallucination/announce()
command_announcement.Announce("It seems that station [station_name()] is passing through a minor radiation field, this may cause some hallucination, but no further damage")
+40
View File
@@ -0,0 +1,40 @@
/datum/event/undead
var/spawn_prob = 10
startWhen = 2
announceWhen = 3
/datum/event/undead/start()
var/datum/event/electrical_storm/RS = new
RS.lightsoutAmount = pick(2,2,3)
RS.start()
RS.kill()
for(var/area/A)
if(!(A.z in config.station_levels)) continue //Spook on main station only.
if(A.luminosity) continue
// if(A.lighting_space) continue
if(A.type == /area) continue
var/list/turflist = list()
for(var/turf/T in A)
if(istype(T,/turf/space) || T.density) continue
if(locate(/mob/living) in T) continue
var/okay = 1
for(var/obj/O in T)
if(O.density)
okay = 0
break
if(okay)
turflist += T
if(!turflist.len) continue
var/turfs = round(turflist.len * spawn_prob/100,1)
while(turfs > 0 && turflist.len) // safety
turfs--
var/turf/T = pick_n_take(turflist)
var/undeadtype = pick(/mob/living/simple_animal/hostile/retaliate/skeleton,
80;/mob/living/simple_animal/hostile/retaliate/zombie,
60;/mob/living/simple_animal/hostile/retaliate/ghost)
new undeadtype(T)
/datum/event/undead/announce()
for(var/mob/living/M in player_list)
M << "You feel [pick("a chill","a deathly chill","the undead","dirty", "creeped out","afraid","fear")]!"
+2 -3
View File
@@ -8,12 +8,11 @@
/datum/event/vent_clog/announce()
command_announcement.Announce("The scrubbers network is experiencing a backpressure surge. Some ejection of contents may occur.", "Atmospherics alert")
/datum/event/vent_clog/setup()
endWhen = rand(25, 100)
for(var/obj/machinery/atmospherics/unary/vent_scrubber/temp_vent in machines)
if((temp_vent.loc.z in config.station_levels) && temp_vent.network)
if(temp_vent.network.normal_members.len > 50)
if((temp_vent.loc.z in config.station_levels))
if(temp_vent.parent.other_atmosmch.len > 50)
vents += temp_vent
/datum/event/vent_clog/tick()
+4 -5
View File
@@ -1,16 +1,15 @@
datum/event/viral_infection
/datum/event/viral_infection
severity = 1
datum/event/viral_infection/setup()
/datum/event/viral_infection/setup()
announceWhen = rand(0, 3000)
endWhen = announceWhen + 1
severity = rand(1, 3)
datum/event/viral_infection/announce()
/datum/event/viral_infection/announce()
command_announcement.Announce("Confirmed outbreak of level five viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak5.ogg')
datum/event/viral_infection/start()
/datum/event/viral_infection/start()
var/list/candidates = list() //list of candidate keys
for(var/mob/living/carbon/human/G in player_list)
if(G.client && G.stat != DEAD)
+4 -5
View File
@@ -1,16 +1,15 @@
datum/event/viral_outbreak
/datum/event/viral_outbreak
severity = 1
datum/event/viral_outbreak/setup()
/datum/event/viral_outbreak/setup()
announceWhen = rand(0, 3000)
endWhen = announceWhen + 1
severity = rand(2, 4)
datum/event/viral_outbreak/announce()
/datum/event/viral_outbreak/announce()
command_announcement.Announce("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg')
datum/event/viral_outbreak/start()
/datum/event/viral_outbreak/start()
var/list/candidates = list() //list of candidate keys
for(var/mob/living/carbon/human/G in player_list)
if(G.client && G.stat != DEAD)
+3 -3
View File
@@ -1,11 +1,11 @@
datum/event/wallrot/setup()
/datum/event/wallrot/setup()
announceWhen = rand(0, 300)
endWhen = announceWhen + 1
datum/event/wallrot/announce()
/datum/event/wallrot/announce()
command_announcement.Announce("Harmful fungi detected on station. Station structures may be contaminated.", "Biohazard Alert")
datum/event/wallrot/start()
/datum/event/wallrot/start()
spawn()
var/turf/simulated/wall/center = null
+4 -3
View File
@@ -107,6 +107,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
/obj/effect/hallucination/simple/Destroy()
if(target.client) target.client.images.Remove(current_image)
active = 0
return ..()
#define FAKE_FLOOD_EXPAND_TIME 30
#define FAKE_FLOOD_MAX_RADIUS 7
@@ -156,11 +157,11 @@ Gunshots/explosions/opening doors/less rare audio (done)
/obj/effect/hallucination/fake_flood/Destroy()
processing_objects -= src
del(flood_turfs)
qdel(flood_turfs)
if(target.client) target.client.images.Remove(flood_images)
target = null
del(flood_images)
return
qdel(flood_images)
return ..()
/obj/effect/hallucination/simple/xeno
image_icon = 'icons/mob/alien.dmi'
@@ -175,7 +175,7 @@ var/global/list/ghdels_profiled = list()
if(garbageCollector)
while(garbageCollector.queue.len)
var/datum/o = locate(garbageCollector.queue[1])
if(istype(o) && o.gcDestroyed)
if(istype(o) && !isnull(o.gcDestroyed))
del(o)
garbageCollector.dels_count++
garbageCollector.queue.Cut(1, 2)
@@ -7,7 +7,7 @@
for(var/areapath in typesof(/area/hallway))
var/area/A = locate(areapath)
for(var/turf/simulated/floor/F in A.contents)
if(!F.contents.len)
if(turf_clear(F))
turfs += F
if(turfs.len) //Pick a turf to spawn at if we can
+1 -1
View File
@@ -728,7 +728,7 @@
else if(mechanical && istype(O, /obj/item/weapon/wrench))
//If there's a connector here, the portable_atmospherics setup can handle it.
if(locate(/obj/machinery/atmospherics/portables_connector/) in loc)
if(locate(/obj/machinery/atmospherics/unary/portables_connector) in loc)
return ..()
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
@@ -79,7 +79,7 @@
// If we're attached to a pipenet, then we should let the pipenet know we might have modified some gasses
if (closed_system && connected_port)
update_connected_network()
connected_port.parent.update = 1
// Toxin levels beyond the plant's tolerance cause damage, but
// toxins are sucked up each tick and slowly reduce over time.
+4 -4
View File
@@ -102,6 +102,10 @@
interact(user)
return
if(default_deconstruction_screwdriver(user, "ore_redemption-open", "ore_redemption", W))
updateUsrDialog()
return
if(exchange_parts(user, W))
return
@@ -113,10 +117,6 @@
if(default_unfasten_wrench(user, W))
return
if(default_deconstruction_screwdriver(user, "ore_redemption-open", "ore_redemption", W))
updateUsrDialog()
return
..()
+5
View File
@@ -127,6 +127,11 @@
var/attacher = "UNKNOWN"
var/datum/wires/explosive/gibtonite/wires
/obj/item/weapon/twohanded/required/gibtonite/Destroy()
qdel(wires)
wires = null
return ..()
/obj/item/weapon/twohanded/required/gibtonite/attackby(obj/item/I, mob/user, params)
if(!wires && istype(I, /obj/item/device/assembly/igniter))
user.visible_message("[user] attaches [I] to [src].", "<span class='notice'>You attach [I] to [src].</span>")
+11 -9
View File
@@ -115,7 +115,7 @@ Works together with spawning an observer, noted above.
if(antagHUD)
var/list/target_list = list()
for(var/mob/living/target in oview(src, 14))
if(target.mind&&(target.mind.special_role||issilicon(target)||target.mind.nation) )
if(target.mind && (target.mind.special_role || issilicon(target) || target.mind.nation))
target_list += target
if(target_list.len)
assess_targets(target_list, src)
@@ -197,13 +197,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
dir = direct
if(NewLoc)
forceMove(NewLoc)
for(var/obj/effect/step_trigger/S in NewLoc)
S.Crossed(src)
var/area/A = get_area_master(src)
if(A)
A.Entered(src)
return
forceMove(get_turf(src)) //Get out of closets and such as a ghost
if((direct & NORTH) && y < world.maxy)
@@ -630,4 +623,13 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return 0
/mob/dead/observer/can_admin_interact()
return check_rights(R_ADMIN, 0, src)
return check_rights(R_ADMIN, 0, src)
//this is a mob verb instead of atom for performance reasons
//see /mob/verb/examinate() in mob.dm for more info
//overriden here and in /mob/living for different point span classes and sanity checks
/mob/dead/observer/pointed(atom/A as mob|obj|turf in view())
if(!..())
return 0
usr.visible_message("<span class='deadsay'><b>[src]</b> points to [A].</span>")
return 1
+1 -1
View File
@@ -93,7 +93,7 @@
return
if(!src.client.holder)
if(!dsay_allowed)
if(!config.dsay_allowed)
src << "\red Deadchat is globally muted"
return
+1 -1
View File
@@ -73,7 +73,7 @@
/datum/species/proc/handle_autohiss(message, datum/language/lang, mode)
if(!autohiss_basic_map)
return message
if(autohiss_exempt && (lang.name in autohiss_exempt))
if(autohiss_exempt && (lang && (lang.name in autohiss_exempt)))
return message
var/map = autohiss_basic_map.Copy()
+19 -1
View File
@@ -39,9 +39,27 @@
verbs += /mob/living/carbon/verb/mob_sleep
verbs += /mob/living/verb/lay_down
internal_organs += new /obj/item/organ/brain/xeno
..()
/mob/living/carbon/alien/get_default_language()
if(default_language)
return default_language
return all_languages["Xenomorph"]
/mob/living/carbon/alien/say_quote(var/message, var/datum/language/speaking = null)
var/verb = "hisses"
var/ending = copytext(message, length(message))
if(speaking && (speaking.name != "Galactic Common")) //this is so adminbooze xenos speaking common have their custom verbs,
verb = speaking.get_spoken_verb(ending) //and use normal verbs for their own languages and non-common languages
else
if(ending=="!")
verb = "roars"
else if(ending=="?")
verb = "hisses curiously"
return verb
/mob/living/carbon/alien/adjustToxLoss(amount)
storedPlasma = min(max(storedPlasma + amount,0),max_plasma) //upper limit of max_plasma, lower limit of 0
updatePlasmaDisplay()
@@ -1,139 +1,115 @@
/mob/living/carbon/alien/humanoid/emote(var/act,var/m_type=1,var/message = null)
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)
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
act = copytext(act,1,length(act))
// if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
// act = copytext(act,1,length(act)) //seriously who the fuck wrote this
var/muzzled = is_muzzled()
switch(act)
if ("me")
if(silent)
return
if (src.client)
if (client.prefs.muted & MUTE_IC)
src << "\red You cannot send IC messages (muted)."
return
if (src.client.handle_spam_prevention(message,MUTE_IC))
return
if (stat)
return
if(!(message))
return
return custom_emote(m_type, message)
if ("custom")
return custom_emote(m_type, message)
if("sign")
if (!src.restrained())
message = text("<B>The alien</B> signs[].", (text2num(param) ? text(" the number []", text2num(param)) : null))
m_type = 1
if(!restrained())
var/num = null
if(text2num(param))
num = "the number [text2num(param)]"
if(num)
message = "<B>\The [src]</B> signs [num]."
m_type = 1
if ("burp")
if (!muzzled)
message = "<B>[src]</B> burps."
message = "<B>\The [src]</B> burps."
m_type = 2
if ("deathgasp")
message = "<B>[src]</B> lets out a waning guttural screech, green blood bubbling from its maw..."
message = "<B>\The [src]</B> lets out a waning guttural screech, green blood bubbling from its maw..."
m_type = 2
if("scratch")
if (!src.restrained())
message = "<B>The [src.name]</B> scratches."
message = "<B>\The [src]</B> scratches."
m_type = 1
if("whimper")
if (!muzzled)
message = "<B>The [src.name]</B> whimpers."
message = "<B>\The [src]</B> whimpers."
m_type = 2
if("roar")
if (!muzzled)
message = "<B>The [src.name]</B> roars."
message = "<B>\The [src]</B> roars."
m_type = 2
if("hiss")
if(!muzzled)
message = "<B>The [src.name]</B> hisses."
message = "<B>\The [src]</B> hisses."
m_type = 2
if("tail")
message = "<B>The [src.name]</B> waves its tail."
message = "<B>\The [src]</B> waves its tail."
m_type = 1
if("gasp")
message = "<B>The [src.name]</B> gasps."
message = "<B>\The [src]</B> gasps."
m_type = 2
if("shiver")
message = "<B>The [src.name]</B> shivers."
message = "<B>\The [src]</B> shivers."
m_type = 2
if("drool")
message = "<B>The [src.name]</B> drools."
message = "<B>\The [src]</B> drools."
m_type = 1
if("scretch")
if (!muzzled)
message = "<B>The [src.name]</B> scretches."
message = "<B>\The [src]</B> scretches."
m_type = 2
if("choke")
message = "<B>The [src.name]</B> chokes."
message = "<B>\The [src]</B> chokes."
m_type = 2
if("moan")
message = "<B>The [src.name]</B> moans!"
message = "<B>\The [src]</B> moans!"
m_type = 2
if("nod")
message = "<B>The [src.name]</B> nods its head."
message = "<B>\The [src]</B> nods its head."
m_type = 1
if("sit")
message = "<B>The [src.name]</B> sits down."
message = "<B>\The [src]</B> sits down."
m_type = 1
if("sway")
message = "<B>The [src.name]</B> sways around dizzily."
message = "<B>\The [src]</B> sways around dizzily."
m_type = 1
if("sulk")
message = "<B>The [src.name]</B> sulks down sadly."
message = "<B>\The [src]</B> sulks down sadly."
m_type = 1
if("twitch")
message = "<B>The [src.name]</B> twitches violently."
message = "<B>\The [src]</B> twitches violently."
m_type = 1
if("dance")
if (!src.restrained())
message = "<B>The [src.name]</B> dances around happily."
message = "<B>\The [src]</B> dances around happily."
m_type = 1
if("roll")
if (!src.restrained())
message = "<B>The [src.name]</B> rolls."
message = "<B>\The [src]</B> rolls."
m_type = 1
if("shake")
message = "<B>The [src.name]</B> shakes its head."
message = "<B>\The [src]</B> shakes its head."
m_type = 1
if("gnarl")
if (!muzzled)
message = "<B>The [src.name]</B> gnarls and shows its teeth.."
message = "<B>\The [src]</B> gnarls and shows its teeth.."
m_type = 2
if("jump")
message = "<B>The [src.name]</B> jumps!"
message = "<B>\The [src]</B> jumps!"
m_type = 1
if("collapse")
Paralyse(2)
message = text("<B>[]</B> collapses!", src)
message = "<B>\The [src]</B> collapses!"
m_type = 2
if ("flip")
m_type = 1
message = "<B>[src]</B> does a flip!"
message = "<B>\The [src]</B> does a flip!"
src.SpinAnimation(5,1)
if("help")
src << "burp, flip, deathgasp, choke, collapse, dance, drool, gasp, shiver, gnarl, jump, moan, nod, roar, roll, scratch,\nscretch, shake, sign-#, sit, sulk, sway, tail, twitch, whimper"
else
src << text("Invalid Emote: []", act)
if ((message && src.stat == 0))
log_emote("[name]/[key] : [message]")
if(!stat)
if (act == "roar")
playsound(src.loc, 'sound/voice/hiss5.ogg', 40, 1, 1)
if (act == "deathgasp")
playsound(src.loc, 'sound/voice/hiss6.ogg', 80, 1, 1)
if (m_type & 1)
for(var/mob/O in viewers(src, null))
O.show_message(message, m_type)
//Foreach goto(703)
else
for(var/mob/O in hearers(src, null))
O.show_message(message, m_type)
//Foreach goto(746)
return
..(act, m_type, message)
@@ -1,44 +0,0 @@
/mob/living/carbon/alien/say(var/message)
var/verb = "says"
var/message_range = world.view
if(client)
if(client.prefs.muted & MUTE_IC)
src << "\red You cannot speak in IC (Muted)."
return
message = trim_strip_html_properly(message)
if(stat == 2)
return say_dead(message)
if(copytext(message,1,2) == "*")
return emote(copytext(message,2))
var/datum/language/speaking = parse_language(message)
if(speaking)
message = copytext(message,2+length(speaking.key))
else
var/quickcheck = get_default_language()
if(quickcheck)
speaking = get_default_language()
else //because no clue how to actually set xeno's default language since they aren't a species, just do it here
speaking = all_languages["Xenomorph"]
var/ending = copytext(message, length(message))
if (speaking)
// This is broadcast to all mobs with the language,
// irrespective of distance or anything else.
if(speaking.flags & HIVEMIND)
speaking.broadcast(src,trim(message))
return
//If we've gotten this far, keep going!
verb = speaking.get_spoken_verb(ending)
message = trim(message)
if(!message || stat)
return
..(message, speaking, verb, null, null, message_range, null)
+7 -15
View File
@@ -8,11 +8,9 @@
w_class = 3
origin_tech = "biotech=3"
req_access = list(access_robotics)
//Revised. Brainmob is now contained directly within object of transfer. MMI in this case.
var/alien = 0
var/locked = 0
var/syndiemmi = 0 //Whether or not this is a Syndicate MMI
var/mob/living/carbon/brain/brainmob = null//The current occupant.
var/mob/living/silicon/robot = null//Appears unused.
var/obj/mecha = null//This does not appear to be used outside of reference in mecha.dm.
@@ -49,19 +47,11 @@
qdel(O)
locked = 1
feedback_inc("cyborg_mmis_filled",1)
return
if((istype(O,/obj/item/weapon/card/id)||istype(O,/obj/item/device/pda)) && brainmob)
if(allowed(user))
locked = !locked
user << "\blue You [locked ? "lock" : "unlock"] the brain holder."
else
user << "\red Access denied."
return
if(brainmob)
O.attack(brainmob, user)//Oh noooeeeee
return
@@ -72,10 +62,8 @@
attack_self(mob/user as mob)
if(!brainmob)
user << "\red You upend the MMI, but there's nothing in it."
else if(locked)
user << "\red You upend the MMI, but the brain is clamped into place."
else
user << "\blue You upend the MMI, spilling the brain onto the floor."
user << "<span class='notice'>You unlock and upend the MMI, spilling the brain onto the floor.</span>"
if(alien)
var/obj/item/organ/brain/xeno/brain = new(user.loc)
dropbrain(brain,get_turf(user))
@@ -96,7 +84,6 @@
name = "Man-Machine Interface: [brainmob.real_name]"
icon_state = "mmi_full"
locked = 1
return
//I made this proc as a way to have a brainmob be transferred to any created brain, and to solve the
//problem i was having with alien/nonalien brain drops.
@@ -170,3 +157,8 @@
qdel(brainmob)
brainmob = null
return ..()
/obj/item/device/mmi/syndie
name = "Syndicate Man-Machine Interface"
desc = "Syndicate's own brand of MMI. It enforces laws designed to help Syndicate agents achieve their goals upon cyborgs created with it, but doesn't fit in Nanotrasen AI cores."
syndiemmi = 1
@@ -62,14 +62,11 @@
/mob/living/carbon/brain/blob_act()
return
/mob/living/carbon/brain/on_forcemove(atom/newloc)
if(container)
container.loc = newloc
else //something went very wrong.
CRASH("Brainmob without container.")
loc = container
/mob/living/carbon/brain/binarycheck()
return istype(loc, /obj/item/device/mmi/posibrain)
loc = container
+11 -43
View File
@@ -12,71 +12,39 @@
if(src.stat == DEAD)
return
switch(act)
if ("me")
if(silent)
return
if (src.client)
if (client.prefs.muted & MUTE_IC)
src << "\red You cannot send IC messages (muted)."
return
if (src.client.handle_spam_prevention(message,MUTE_IC))
return
if (stat)
return
if(!(message))
return
return custom_emote(m_type, message)
if ("custom")
return custom_emote(m_type, message)
if ("alarm")
src << "You sound an alarm."
message = "<B>[src]</B> sounds an alarm."
message = "<B>\The [src]</B> sounds an alarm."
m_type = 2
if ("alert")
src << "You let out a distressed noise."
message = "<B>[src]</B> lets out a distressed noise."
message = "<B>\The [src]</B> lets out a distressed noise."
m_type = 2
if ("notice")
src << "You play a loud tone."
message = "<B>[src]</B> plays a loud tone."
message = "<B>\The [src]</B> plays a loud tone."
m_type = 2
if ("flash")
message = "The lights on <B>[src]</B> flash quickly."
message = "The lights on <B>\the [src]</B> flash quickly."
m_type = 1
if ("blink")
message = "<B>[src]</B> blinks."
message = "<B>\The [src]</B> blinks."
m_type = 1
if ("whistle")
src << "You whistle."
message = "<B>[src]</B> whistles."
message = "<B>\The [src]</B> whistles."
m_type = 2
if ("beep")
src << "You beep."
message = "<B>[src]</B> beeps."
message = "<B>\The [src]</B> beeps."
m_type = 2
if ("boop")
src << "You boop."
message = "<B>[src]</B> boops."
message = "<B>\The [src]</B> boops."
m_type = 2
if ("help")
src << "alarm,alert,notice,flash,blink,whistle,beep,boop"
else
src << "\blue Unusable emote '[act]'. Say *help for a list."
src << "alarm, alert, notice, flash,blink, whistle, beep, boop"
if (message)
log_emote("[name]/[key] : [message]")
for(var/mob/M in dead_mob_list)
if (!M.client || istype(M, /mob/new_player))
continue //skip monkeys, leavers, and new_players
if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTSIGHT) && !(M in viewers(src,null)))
M.show_message(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.loc, null))
O.show_message(message, m_type)
if(message && !stat)
..(act, m_type, message)
@@ -11,7 +11,6 @@
//var/mob/living/carbon/brain/brainmob = null
var/list/ghost_volunteers[0]
req_access = list(access_robotics)
locked = 0
mecha = null//This does not appear to be used outside of reference in mecha.dm.
+21 -23
View File
@@ -1,39 +1,37 @@
//TODO: Convert this over for languages.
/mob/living/carbon/brain/say(var/message)
/mob/living/carbon/brain/say(var/message, var/datum/language/speaking = null)
if (silent)
return
if (stat == 2) // Dead.
return say_dead(message)
if(!(container && (istype(container, /obj/item/device/mmi) || istype(container, /obj/item/device/mmi/posibrain))))
return //No MMI, can't speak, bucko./N
else
var/datum/language/speaking = parse_language(message)
if(speaking)
message = copytext(message, 2+length(speaking.key))
var/verb = "says"
var/ending = copytext(message, length(message))
if (speaking)
verb = speaking.get_spoken_verb(ending)
else
if(ending=="!")
verb=pick("exclaims","shouts","yells")
if(ending=="?")
verb="asks"
if(prob(emp_damage*4))
if(prob(10))//10% chane to drop the message entirely
return
else
message = Gibberish(message, (emp_damage*6))//scrambles the message, gets worse when emp_damage is higher
if(speaking && speaking.flags & HIVEMIND)
speaking.broadcast(src,trim(message))
return
if(istype(container, /obj/item/device/mmi/radio_enabled))
var/radio_MMI_message = message //split off so the MMI can get a trimmed message without fucking up living/say()
if(!speaking)
speaking = parse_language(message)
if(speaking)
radio_MMI_message = copytext(message, 2 + length(speaking.key))
else
speaking = get_default_language()
var/obj/item/device/mmi/radio_enabled/R = container
if(R.radio)
spawn(0) R.radio.hear_talk(src, trim(sanitize(message)), verb, speaking)
..(trim(message), speaking, verb)
spawn(0) R.radio.hear_talk(src, trim(sanitize(radio_MMI_message)), say_quote(radio_MMI_message), speaking)
..(message)
/mob/living/carbon/brain/can_speak(var/datum/language/speaking)
if(speaking == all_languages["Robot Talk"] && istype(loc, /obj/item/device/mmi/posibrain)) //so posibrains can speak binary; less messy than adding the language
return 1
else return ..()
/mob/living/carbon/brain/binarycheck()
return istype(loc, /obj/item/device/mmi/posibrain)
+11 -9
View File
@@ -329,7 +329,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
break
if(vent_found)
if(vent_found.network && (vent_found.network.normal_members.len || vent_found.network.line_members.len))
if(vent_found.parent && (vent_found.parent.members.len || vent_found.parent.other_atmosmch))
visible_message("<span class='notice'>[src] begins climbing into the ventilation system...</span>", \
"<span class='notice'>You begin climbing into the ventilation system...</span>")
@@ -362,15 +362,17 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
/mob/living/proc/add_ventcrawl(obj/machinery/atmospherics/starting_machine)
var/datum/pipe_network/network = starting_machine.return_network(starting_machine)
if(!network)
if(!istype(starting_machine) || !starting_machine.returnPipenet())
return
for(var/datum/pipeline/pipeline in network.line_members)
for(var/obj/machinery/atmospherics/A in (pipeline.members || pipeline.edges))
if(!A.pipe_image)
A.pipe_image = image(A, A.loc, layer = 20, dir = A.dir) //the 20 puts it above Byond's darkness (not its opacity view)
pipes_shown += A.pipe_image
client.images += A.pipe_image
var/datum/pipeline/pipeline = starting_machine.returnPipenet()
var/list/totalMembers = list()
totalMembers |= pipeline.members
totalMembers |= pipeline.other_atmosmch
for(var/obj/machinery/atmospherics/A in totalMembers)
if(!A.pipe_image)
A.pipe_image = image(A, A.loc, layer = 20, dir = A.dir) //the 20 puts it above Byond's darkness (not its opacity view)
pipes_shown += A.pipe_image
client.images += A.pipe_image
/mob/living/proc/remove_ventcrawl()
if(client)
+10 -50
View File
@@ -1,6 +1,5 @@
/mob/living/carbon/human/emote(var/act,var/m_type=1,var/message = null)
var/param = null
if (findtext(act, "-", 1, null))
var/t1 = findtext(act, "-", 1, null)
param = copytext(act, t1 + 1, length(act) + 1)
@@ -18,8 +17,7 @@
if (I.implanted)
I.trigger(act, src)
if(src.stat == 2.0 && (act != "deathgasp"))
return
//Emote Cooldown System (it's so simple!)
// proc/handle_emote_CD() located in [code\modules\mob\emote.dm]
@@ -167,37 +165,6 @@
message = "<B>[src]</B> bows."
m_type = 1
if ("custom")
var/input = sanitize(copytext(input("Choose an emote to display.") as text|null,1,MAX_MESSAGE_LEN))
if (!input)
return
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
return custom_emote(m_type, message)
if ("me")
if(silent)
return
if (src.client)
if (client.prefs.muted & MUTE_IC)
src << "\red You cannot send IC messages (muted)."
return
if (src.client.handle_spam_prevention(message,MUTE_IC))
return
if (stat)
return
if(!(message))
return
return custom_emote(m_type, message)
if ("salute")
if (!src.buckled)
var/M = null
@@ -518,9 +485,9 @@
if ("point")
if (!src.restrained())
var/mob/M = null
var/atom/M = null
if (param)
for (var/atom/A as mob|obj|turf|area in view(null, null))
for (var/atom/A as mob|obj|turf in view())
if (param == A.name)
M = A
break
@@ -528,11 +495,7 @@
if (!M)
message = "<B>[src]</B> points."
else
M.point()
if (M)
message = "<B>[src]</B> points to [M]."
else
pointed(M)
m_type = 1
if ("raise")
@@ -820,7 +783,7 @@
if (message)
if(message) //Humans are special fucking snowflakes and have 735 lines of emotes, they get to handle their own emotes, not call the parent
log_emote("[name]/[key] : [message]")
//Hearing gasp and such every five seconds is not good emotes were not global for a reason.
@@ -832,14 +795,11 @@
if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTSIGHT) && !(M in viewers(src,null)))
M.show_message(message)
if (m_type & 1)
for (var/mob/O in get_mobs_in_view(world.view,src))
O.show_message(message, m_type)
else if (m_type & 2)
for (var/mob/O in (hearers(src.loc, null) | get_mobs_in_view(world.view,src)))
O.show_message(message, m_type)
switch(m_type)
if(1)
visible_message(message)
if(2)
audible_message(message)
/mob/living/carbon/human/verb/pose()
set name = "Set Pose"
@@ -1784,4 +1784,5 @@
/mob/living/carbon/human/proc/get_full_print()
if(!dna || !dna.uni_identity)
return
return md5(dna.uni_identity)
return md5(dna.uni_identity)
@@ -16,7 +16,7 @@
if(species.can_revive_by_healing)
var/obj/item/organ/brain/B = internal_organs_by_name["brain"]
if(B)
if((health >= (config.health_threshold_dead/100*75)) && stat == DEAD)
if((health >= (config.health_threshold_dead/100*75)) && stat == DEAD)
update_revive()
if (stat == CONSCIOUS && (src in dead_mob_list)) //Defib fix
update_revive()
@@ -37,7 +37,7 @@
if(species && species.has_organ["brain"])
var/obj/item/organ/brain/sponge = internal_organs_by_name["brain"]
if(sponge)
sponge.take_damage(amount)
sponge.take_damage(amount, 1)
brainloss = sponge.damage
else
brainloss = 200
@@ -55,8 +55,8 @@
else
brainloss = 200
else
brainloss = 0
brainloss = 0
/mob/living/carbon/human/getBrainLoss()
if(status_flags & GODMODE) return 0 //godmode
@@ -143,7 +143,7 @@
/mob/living/carbon/human/adjustCloneLoss(var/amount)
..()
if(species.flags & (NO_SCAN))
cloneloss = 0
return
@@ -177,7 +177,7 @@
O.unmutate()
src << "<span class = 'notice'>Your [O.name] is shaped normally again.</span>"
hud_updateflag |= 1 << HEALTH_HUD
// Defined here solely to take species flags into account without having to recast at mob/living level.
/mob/living/carbon/human/getOxyLoss()
if(species.flags & NO_BREATHE)
@@ -262,7 +262,7 @@ emp_act
else
visible_message("\red <B>[src] has been attacked in the [hit_area] with [I.name] by [user]!</B>")
var/armor = run_armor_check(affecting, "melee", "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].")
var/armor = run_armor_check(affecting, "melee", "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].", armour_penetration = I.armour_penetration)
var/weapon_sharp = is_sharp(I)
var/weapon_edge = has_edge(I)
if ((weapon_sharp || weapon_edge) && prob(getarmor(user.zone_sel.selecting, "melee")))
@@ -97,22 +97,6 @@
/mob/living/carbon/human/proc/GetSpecialVoice()
return special_voice
/mob/living/carbon/human/say_quote(var/message, var/datum/language/speaking = null)
var/verb = "says"
var/ending = copytext(message, length(message))
if(speaking)
verb = speaking.get_spoken_verb(ending)
else
if(ending == "!")
return pick("exclaims", "shouts", "yells")
if(ending == "?")
return "asks"
return verb
/mob/living/carbon/human/handle_speech_problems(var/message, var/verb)
var/list/returns[3]
var/speech_problem_flag = 0
+13 -138
View File
@@ -2,150 +2,25 @@
/mob/living/carbon/human/whisper(message as text)
var/alt_name = ""
message = trim_strip_html_properly(message)
log_whisper("[src.name]/[src.key] : [message]")
if (src.client)
if (src.client.prefs.muted & MUTE_IC)
src << "\red You cannot whisper (muted)."
return
if (src.client.handle_spam_prevention(message,MUTE_IC))
return
if (src.stat == 2)
return src.say_dead(message)
if (src.stat)
return
if(name != GetVoice())
alt_name = "(as [get_id_name("Unknown")])"
message = trim_strip_html_properly(message) //bit of duplicate code, acceptable because the workaround would be annoying
//parse the language code and consume it
var/datum/language/speaking = parse_language(message)
if (speaking)
message = copytext(message,2+length(speaking.key))
whisper_say(message, speaking, alt_name)
//This is used by both the whisper verb and human/say() to handle whispering
/mob/living/carbon/human/proc/whisper_say(var/message, var/datum/language/speaking = null, var/alt_name="", var/verb="whispers")
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
src << "<span class='danger'>You're muzzled and cannot speak!</span>"
return
var/message_range = 1
var/eavesdropping_range = 2
var/watching_range = 5
var/italics = 1
var/not_heard //the message displayed to people who could not hear the whispering
if (speaking)
if (speaking.whisper_verb)
verb = speaking.whisper_verb
not_heard = "[verb] something"
else
var/adverb = pick("quietly", "softly")
verb = "[speaking.speech_verb] [adverb]"
not_heard = "[speaking.speech_verb] something [adverb]"
if(speaking)
message = copytext(message, 2 + length(speaking.key))
else
not_heard = "[verb] something" //TODO get rid of the null language and just prevent speech if language is null
speaking = get_default_language()
message = capitalize(trim(message))
// This is broadcast to all mobs with the language,
// irrespective of distance or anything else.
if(speaking && (speaking.flags & HIVEMIND))
speaking.broadcast(src,trim(message))
return 1
if(speech_problem_flag)
var/list/handle_r = handle_speech_problems(message)
message = handle_r[1]
verb = handle_r[2]
if(verb == "yells loudly")
verb = "slurs emphatically"
else
var/adverb = pick("quietly", "softly")
verb = "[verb] [adverb]"
message = trim_left(message)
message = handle_autohiss(message, speaking)
speech_problem_flag = handle_r[3]
if(!message || message=="")
return
//looks like this only appears in whisper. Should it be elsewhere as well? Maybe handle_speech_problems?
/*var/voice_sub
for(var/obj/item/gear in list(wear_mask,wear_suit,head))
if(!gear)
continue
var/obj/item/voice_changer/changer = locate() in gear
if(changer && changer.active && changer.voice)
voice_sub = changer.voice
if(voice_sub == "Unknown")
if(copytext(message, 1, 2) != "*")
var/list/temp_message = text2list(message, " ")
var/list/pick_list = list()
for(var/i = 1, i <= temp_message.len, i++)
pick_list += i
for(var/i=1, i <= abs(temp_message.len/3), i++)
var/H = pick(pick_list)
if(findtext(temp_message[H], "*") || findtext(temp_message[H], ";") || findtext(temp_message[H], ":")) continue
temp_message[H] = ninjaspeak(temp_message[H])
pick_list -= H
message = list2text(temp_message, " ")
message = replacetext(message, "o", "")
message = replacetext(message, "p", "")
message = replacetext(message, "l", "")
message = replacetext(message, "s", "")
message = replacetext(message, "u", "")
message = replacetext(message, "b", "")*/
var/list/listening = hearers(message_range, src)
listening |= src
//ghosts
for (var/mob/M in dead_mob_list) //does this include players who joined as observers as well?
if (!(M.client))
continue
if(M.stat == DEAD && M.client && (M.client.prefs.toggles & CHAT_GHOSTEARS))
listening |= M
//Pass whispers on to anything inside the immediate listeners.
for(var/mob/L in listening)
for(var/mob/C in L.contents)
if(istype(C,/mob/living))
listening += C
//pass on the message to objects that can hear us.
for (var/obj/O in view(message_range, src))
spawn (0)
if (O)
O.hear_talk(src, message, verb, speaking)
var/list/eavesdropping = hearers(eavesdropping_range, src)
eavesdropping -= src
eavesdropping -= listening
var/list/watching = hearers(watching_range, src)
watching -= src
watching -= listening
watching -= eavesdropping
//now mobs
var/speech_bubble_test = say_test(message)
var/image/speech_bubble = image('icons/mob/talk.dmi',src,"h[speech_bubble_test]")
spawn(30) qdel(speech_bubble)
for(var/mob/M in listening)
M << speech_bubble
M.hear_say(message, verb, speaking, alt_name, italics, src)
if (eavesdropping.len)
var/new_message = stars(message) //hopefully passing the message twice through stars() won't hurt... I guess if you already don't understand the language, when they speak it too quietly to hear normally you would be able to catch even less.
for(var/mob/M in eavesdropping)
M << speech_bubble
M.hear_say(new_message, verb, speaking, alt_name, italics, src)
if (watching.len)
var/rendered = "<span class='game say'><span class='name'>[src.name]</span> [not_heard].</span>"
for (var/mob/M in watching)
M.show_message(rendered, 2)
whisper_say(message, speaking, alt_name)
+5 -12
View File
@@ -1,20 +1,13 @@
/mob/living/carbon/slime/say(var/message)
var/verb = say_quote(message)
if(copytext(message,1,2) == "*")
return emote(copytext(message,2))
return ..(message, null, verb)
/mob/living/carbon/slime/say_quote(var/text)
/mob/living/carbon/slime/say_quote(var/text, var/datum/language/speaking)
var/verb = "telepathically chirps"
var/ending = copytext(text, length(text))
if (ending == "?")
return "telepathically asks";
verb = "telepathically asks"
else if (ending == "!")
return "telepathically cries";
verb = "telepathically cries"
return "telepathically chirps";
return verb
/mob/living/carbon/slime/say_understands(var/other)
if (istype(other, /mob/living/carbon/slime))
+23
View File
@@ -25,6 +25,18 @@
special_role = null
current << "\red <FONT size = 3><B>The fog clouding your mind clears. You remember nothing from the moment you were implanted until now..(You don't remember who enslaved you)</B></FONT>"
*/
//same as above
/mob/living/pointed(atom/A as mob|obj|turf in view())
if(src.stat || !src.canmove || src.restrained())
return 0
if(src.status_flags & FAKEDEATH)
return 0
if(!..())
return 0
visible_message("<b>[src]</b> points to [A]")
return 1
/mob/living/verb/succumb()
set hidden = 1
if (InCritical())
@@ -299,6 +311,10 @@
if (C.legcuffed && !initial(C.legcuffed))
C.unEquip(C.legcuffed)
C.legcuffed = initial(C.legcuffed)
if(C.reagents)
for(var/datum/reagent/R in C.reagents.reagent_list)
C.reagents.clear_reagents()
C.reagents.addiction_list.Cut()
hud_updateflag |= 1 << HEALTH_HUD
hud_updateflag |= 1 << STATUS_HUD
@@ -310,10 +326,16 @@
setCloneLoss(0)
setBrainLoss(0)
setStaminaLoss(0)
SetSleeping(0)
setHalLoss(0)
SetParalysis(0)
SetStunned(0)
SetWeakened(0)
losebreath = 0
dizziness = 0
jitteriness = 0
confused = 0
drowsyness = 0
radiation = 0
nutrition = 400
bodytemperature = 310
@@ -325,6 +347,7 @@
ear_deaf = 0
ear_damage = 0
heal_overall_damage(1000, 1000)
ExtinguishMob()
fire_stacks = 0
on_fire = 0
suiciding = 0
+10 -2
View File
@@ -10,8 +10,16 @@
1 - halfblock
2 - fullblock
*/
/mob/living/proc/run_armor_check(var/def_zone = null, var/attack_flag = "melee", var/absorb_text = null, var/soften_text = null)
/mob/living/proc/run_armor_check(var/def_zone = null, var/attack_flag = "melee", var/absorb_text = null, var/soften_text = null, armour_penetration, penetrated_text)
var/armor = getarmor(def_zone, attack_flag)
//the if "armor" check is because this is used for everything on /living, including humans
if(armor && armor < 100 && armour_penetration) // Armor with 100+ protection can not be penetrated for admin items
armor = max(0, armor - armour_penetration)
if(penetrated_text)
src << "<span class='userdanger'>[penetrated_text]</span>"
else
src << "<span class='userdanger'>Your armor was penetrated!</span>"
if(armor >= 100)
if(absorb_text)
@@ -42,7 +50,7 @@
Stun(2)
//Armor
var/armor = run_armor_check(def_zone, P.flag)
var/armor = run_armor_check(def_zone, P.flag, armour_penetration = P.armour_penetration)
var/proj_sharp = is_sharp(P)
var/proj_edge = has_edge(P)
if ((proj_sharp || proj_edge) && prob(getarmor(def_zone, P.flag)))
+158 -3
View File
@@ -76,9 +76,6 @@ proc/get_radio_key_from_channel(var/channel)
verb = pick("yells","roars","hollers")
speech_problem_flag = 1
if(COMIC in mutations)
message = "<span class='sans'>[message]</span>"
if(slurring)
message = slur(message)
verb = "slurs"
@@ -88,12 +85,19 @@ proc/get_radio_key_from_channel(var/channel)
verb = "stammers"
speech_problem_flag = 1
if(COMIC in mutations)
message = "<span class='sans'>[message]</span>"
returns[1] = message
returns[2] = verb
returns[3] = speech_problem_flag
return returns
/mob/living/proc/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
switch(message_mode)
if("whisper") //all mobs can whisper by default
whisper_say(message, speaking, alt_name)
return 1
return 0
/mob/living/proc/handle_speech_sound()
@@ -264,3 +268,154 @@ proc/get_radio_key_from_channel(var/channel)
/mob/living/proc/GetVoice()
return name
/mob/living/emote(var/act, var/type, var/message) //emote code is terrible, this is so that anything that isn't
if(stat) return 0 //already snowflaked to shit can call the parent and handle emoting sanely
if(..(act, type, message))
return 1
if(act && type && message) //parent call
log_emote("[name]/[key] : [message]")
for(var/mob/M in dead_mob_list)
if(!M.client || istype(M, /mob/new_player))
continue //skip monkeys, leavers and new players //who the hell knows why new players are in the dead mob list
if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTSIGHT) && !(M in viewers(src,null)))
M.show_message(message)
switch(type)
if(1) //Visible
visible_message(message)
return 1
if(2) //Audible
audible_message(message)
return 1
else //everything else failed, emote is probably invalid
if(act == "help") return //except help, because help is handled individually
src << "\blue Unusable emote '[act]'. Say *help for a list."
/mob/living/whisper(message as text)
message = trim_strip_html_properly(message)
//parse the language code and consume it
var/datum/language/speaking = parse_language(message)
if(speaking)
message = copytext(message, 2 + length(speaking.key))
else
speaking = get_default_language()
// This is broadcast to all mobs with the language,
// irrespective of distance or anything else.
if(speaking && (speaking.flags & HIVEMIND))
speaking.broadcast(src,trim(message))
return 1
message = trim_left(message)
message = handle_autohiss(message, speaking)
whisper_say(message, speaking)
/mob/living/proc/whisper_say(var/message, var/datum/language/speaking = null, var/alt_name="", var/verb="whispers")
if(client)
if(client.prefs.muted & MUTE_IC)
src << "<span class='danger'>You cannot speak in IC (Muted).</span>"
return
if(stat)
if(stat == 2)
return say_dead(message)
return
if(is_muzzled())
src << "<span class='danger'>You're muzzled and cannot speak!</span>"
return
var/message_range = 1
var/eavesdropping_range = 2
var/watching_range = 5
var/italics = 1
var/not_heard //the message displayed to people who could not hear the whispering
if(speaking)
if(speaking.whisper_verb)
verb = speaking.whisper_verb
not_heard = "[verb] something"
else
var/adverb = pick("quietly", "softly")
verb = "[speaking.speech_verb] [adverb]"
not_heard = "[speaking.speech_verb] something [adverb]"
else
not_heard = "[verb] something" //TODO get rid of the null language and just prevent speech if language is null
message = trim(message)
var/speech_problem_flag = 0
var/list/handle_s = handle_speech_problems(message, verb)
message = handle_s[1]
verb = handle_s[2]
speech_problem_flag = handle_s[3]
if(verb == "yells loudly")
verb = "slurs emphatically"
else if(speech_problem_flag)
var/adverb = pick("quietly", "softly")
verb = "[verb] [adverb]"
if(!message || message=="")
return
var/list/listening = hearers(message_range, src)
listening |= src
//ghosts
for(var/mob/M in dead_mob_list) //does this include players who joined as observers as well?
if(!M.client)
continue
if(M.stat == DEAD && M.client && (M.client.prefs.toggles & CHAT_GHOSTEARS))
listening |= M
//Pass whispers on to anything inside the immediate listeners.
for(var/mob/L in listening)
for(var/mob/C in L.contents)
if(istype(C,/mob/living))
listening += C
//pass on the message to objects that can hear us.
for(var/obj/O in view(message_range, src))
spawn(0)
if(O)
O.hear_talk(src, message, verb, speaking)
var/list/eavesdropping = hearers(eavesdropping_range, src)
eavesdropping -= src
eavesdropping -= listening
var/list/watching = hearers(watching_range, src)
watching -= src
watching -= listening
watching -= eavesdropping
//now mobs
var/speech_bubble_test = say_test(message)
var/image/speech_bubble = image('icons/mob/talk.dmi',src,"h[speech_bubble_test]")
spawn(30) qdel(speech_bubble)
for(var/mob/M in listening)
M << speech_bubble
M.hear_say(message, verb, speaking, alt_name, italics, src)
if(eavesdropping.len)
var/new_message = stars(message) //hopefully passing the message twice through stars() won't hurt... I guess if you already don't understand the language, when they speak it too quietly to hear normally you would be able to catch even less.
for(var/mob/M in eavesdropping)
M << speech_bubble
M.hear_say(new_message, verb, speaking, alt_name, italics, src)
if(watching.len)
var/rendered = "<span class='game say'><span class='name'>[src.name]</span> [not_heard].</span>"
for (var/mob/M in watching)
M.show_message(rendered, 2)
log_whisper("[src.name]/[src.key] : [message]")
return 1
@@ -46,11 +46,6 @@
set src = usr.contents
return 0
/mob/aiEye/point()
set popup_menu = 0
set src = usr.contents
return 0
// Use this when setting the aiEye's location.
// It will also stream the chunk that the new loc is in.
/mob/aiEye/setLoc(var/T, var/cancel_tracking = 1)
+78
View File
@@ -0,0 +1,78 @@
/mob/living/silicon/emote(var/act, var/m_type=1, var/message = null)
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)
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
act = copytext(act,1,length(act))
//Emote Cooldown System (it's so simple!)
// proc/handle_emote_CD() located in [code\modules\mob\emote.dm]
var/on_CD = 0
switch(act)
//Cooldown-inducing emotes
if("ping","buzz","beep") //halt is exempt because it's used to stop criminal scum //WHOEVER THOUGHT THAT WAS A GOOD IDEA IS GOING TO GET SHOT.
on_CD = handle_emote_CD() //proc located in code\modules\mob\emote.dm
//Everything else, including typos of the above emotes
else
on_CD = 0 //If it doesn't induce the cooldown, we won't check for the cooldown
if(on_CD == 1) // Check if we need to suppress the emote attempt.
return // Suppress emote, you're still cooling off.
//--FalseIncarnate
switch(act)
if("ping")
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> pings at [param]."
else
message = "<B>[src]</B> pings."
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
m_type = 1
if("buzz")
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> buzzes at [param]."
else
message = "<B>[src]</B> buzzes."
playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
m_type = 1
if("beep")
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> beeps at [param]."
else
message = "<B>[src]</B> beeps."
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
m_type = 1
..(act, m_type, message)
+3 -87
View File
@@ -1,90 +1,6 @@
/mob/living/silicon/pai/emote(var/act,var/m_type=1,var/message = null)
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)
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
act = copytext(act,1,length(act))
//Emote Cooldown System (it's so simple!)
// proc/handle_emote_CD() located in [code\modules\mob\emote.dm]
var/on_CD = 0
/mob/living/silicon/pai/emote(var/act, var/m_type=1, var/message = null)
switch(act)
//Cooldown-inducing emotes
if("ping","buzz")
on_CD = handle_emote_CD() //proc located in code\modules\mob\emote.dm
//Everything else, including typos of the above emotes
else
on_CD = 0 //If it doesn't induce the cooldown, we won't check for the cooldown
if(on_CD == 1) // Check if we need to suppress the emote attempt.
return // Suppress emote, you're still cooling off.
//--FalseIncarnate
switch(act)
if ("me")
if (src.client)
if(client.prefs.muted & MUTE_IC)
src << "You cannot send IC messages (muted)."
return
if (src.client.handle_spam_prevention(message,MUTE_IC))
return
if (stat)
return
if(!(message))
return
else
return custom_emote(m_type, message)
if ("custom")
return custom_emote(m_type, message)
if("ping")
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> pings at [param]."
else
message = "<B>[src]</B> pings."
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
m_type = 1
if("buzz")
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> buzzes at [param]."
else
message = "<B>[src]</B> buzzes."
playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
m_type = 1
if ("help")
src << "ping, \nbuzz."
else
src << "\blue Unusable emote '[act]'. Say *help for a list."
src << "ping, beep, buzz."
if ((message && src.stat == 0))
if (m_type & 1)
for(var/mob/O in viewers(src, null))
O.show_message(message, m_type)
else
for(var/mob/O in hearers(src, null))
O.show_message(message, m_type)
return
..(act, m_type, message)
@@ -37,4 +37,8 @@
else if(M.stat == 2 && M.client.prefs.toggles & CHAT_GHOSTEARS)
if(M.client) M << "<b>[src]</b> transmits, \"[message]\""
return 1
return ..(message, 0)
return ..(message, 0)
/mob/living/silicon/robot/drone/whisper_say(var/message, var/datum/language/speaking = null, var/alt_name="", var/verb="whispers")
say(message) //drones do not get to whisper, only speak normally
return 1
+3 -78
View File
@@ -1,4 +1,4 @@
/mob/living/silicon/robot/emote(var/act,var/m_type=1,var/message = null)
/mob/living/silicon/robot/emote(var/act, var/m_type=1, var/message = null)
var/param = null
if (findtext(act, "-", 1, null))
var/t1 = findtext(act, "-", 1, null)
@@ -13,7 +13,7 @@
var/on_CD = 0
switch(act)
//Cooldown-inducing emotes
if("ping","buzz","beep","law","flip","halt") //halt is exempt because it's used to stop criminal scum //WHOEVER THOUGHT THAT WAS A GOOD IDEA IS GOING TO GET SHOT.
if("law","flip","halt") //halt is exempt because it's used to stop criminal scum //WHOEVER THOUGHT THAT WAS A GOOD IDEA IS GOING TO GET SHOT.
on_CD = handle_emote_CD() //proc located in code\modules\mob\emote.dm
//Everything else, including typos of the above emotes
else
@@ -24,22 +24,6 @@
//--FalseIncarnate
switch(act)
if ("me")
if (src.client)
if(client.prefs.muted & MUTE_IC)
src << "You cannot send IC messages (muted)."
return
if (src.client.handle_spam_prevention(message,MUTE_IC))
return
if (stat)
return
if(!(message))
return
else
return custom_emote(m_type, message)
if ("custom")
return custom_emote(m_type, message)
if ("salute")
if (!src.buckled)
@@ -151,56 +135,6 @@
message = "<B>[src]</B> looks."
m_type = 1
if("beep")
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> beeps at [param]."
else
message = "<B>[src]</B> beeps."
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
m_type = 1
if("ping")
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> pings at [param]."
else
message = "<B>[src]</B> pings."
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
m_type = 1
if("buzz")
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> buzzes at [param]."
else
message = "<B>[src]</B> buzzes."
playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
m_type = 1
if("law")
if (istype(module,/obj/item/weapon/robot_module/security))
@@ -227,14 +161,5 @@
if ("help")
src << "salute, bow-(none)/mob, clap, flap, aflap, twitch, twitch_s, nod, deathgasp, glare-(none)/mob, stare-(none)/mob, look, beep, ping, \nbuzz, law, halt"
else
src << "\blue Unusable emote '[act]'. Say *help for a list."
if ((message && src.stat == 0))
if (m_type & 1)
for(var/mob/O in viewers(src, null))
O.show_message(message, m_type)
else
for(var/mob/O in hearers(src, null))
O.show_message(message, m_type)
return
..(act, m_type, message)
@@ -202,6 +202,8 @@ var/list/robot_verbs_default = list(
mmi = null
if(connected_ai)
connected_ai.connected_robots -= src
qdel(wires)
wires = null
return ..()
/mob/living/silicon/robot/proc/pick_module()
+8 -3
View File
@@ -1,8 +1,11 @@
/mob/living/silicon/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
log_say("[key_name(src)] : [message]")
if(..())
return 1
/mob/living/silicon/robot/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
..()
if(..())
return 1
if(message_mode)
if(!is_component_functioning("radio"))
src << "<span class='warning'>Your radio isn't functional at this time.</span>"
@@ -12,7 +15,8 @@
return radio.talk_into(src,message,message_mode,verb,speaking)
/mob/living/silicon/ai/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
..()
if(..())
return 1
if(message_mode == "department")
return holopad_talk(message, verb, speaking)
else if(message_mode)
@@ -24,7 +28,8 @@
return aiRadio.talk_into(src,message,message_mode,verb,speaking)
/mob/living/silicon/pai/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
..()
if(..())
return 1
if(message_mode)
if(message_mode == "general")
message_mode = null
@@ -248,43 +248,13 @@
src << "<span class='warning'>You don't have any hands!</span>"
return
/mob/living/simple_animal/diona/emote(var/act, var/m_type=1, var/message = null)
if(stat) return
/mob/living/simple_animal/diona/say(var/message)
if(client)
if(client.prefs.muted & MUTE_IC)
src << "\red You cannot speak in IC (Muted)."
return
switch(act) //IMPORTANT: Emotes MUST NOT CONFLICT anywhere along the chain.
if("chirp")
message = "<B>\The [src]</B> chirps!"
m_type = 2 //audible
playsound(src, 'sound/misc/nymphchirp.ogg', 40, 1, 1)
var/verb
message = trim_strip_html_properly(message)
if(stat)
if(stat == 2)
return say_dead(message)
return
if (is_muzzled())
src << "<span class='danger'>You're muzzled and cannot speak!</span>"
return
if(copytext(message,1,2) == "*")
return emote(copytext(message,2))
//parse the language code and consume it
var/datum/language/speaking = parse_language(message)
if(speaking)
message = copytext(message,2+length(speaking.key))
else
speaking = get_default_language()
var/ending = copytext(message, length(message))
if (speaking)
// This is broadcast to all mobs with the language,
// irrespective of distance or anything else.
if(speaking.flags & HIVEMIND)
speaking.broadcast(src,trim(message))
return
//If we've gotten this far, keep going!
verb = speaking.get_spoken_verb(ending)
..(message,speaking,verb)
..(act, m_type, message)
@@ -257,14 +257,15 @@
adjustBruteLoss(20)
return
/mob/living/simple_animal/emote(var/act,var/m_type=1,var/message = null)
if(stat)
return
switch(act)
/mob/living/simple_animal/emote(var/act, var/m_type=1, var/message = null)
if(stat) return
switch(act) //IMPORTANT: Emotes MUST NOT CONFLICT anywhere along the chain.
if("scream")
message = "<B>The [src.name]</B> whimpers."
message = "<B>\The [src]</B> whimpers."
m_type = 2
..()
..(act, m_type, message)
/mob/living/simple_animal/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
@@ -544,10 +545,10 @@
gib()
return
/mob/living/simple_animal/say(var/message)
/mob/living/simple_animal/say_quote(var/message)
var/verb = "says"
if(speak_emote.len)
verb = pick(speak_emote)
..(message, null, verb)
return verb
+34 -4
View File
@@ -73,6 +73,8 @@
/mob/visible_message(var/message, var/self_message, var/blind_message)
for(var/mob/M in viewers(src))
if(M.see_invisible < invisibility)
continue //can't view the invisible
var/msg = message
if(self_message && M==src)
msg = self_message
@@ -494,6 +496,34 @@ var/list/slot_equipment_priority = list( \
face_atom(A)
A.examine(src)
//same as above
//note: ghosts can point, this is intended
//visible_message will handle invisibility properly
//overriden here and in /mob/dead/observer for different point span classes and sanity checks
/mob/verb/pointed(atom/A as mob|obj|turf in view())
set name = "Point To"
set category = "Object"
if(next_move >= world.time)
return
if(!src || !isturf(src.loc))
return 0
if(istype(A, /obj/effect/decal/point))
return 0
var/tile = get_turf(A)
if (!tile)
return 0
changeNext_move(CLICK_CD_POINT)
var/obj/P = new /obj/effect/decal/point(tile)
P.invisibility = invisibility
spawn (20)
if(P)
qdel(P)
return 1
/mob/proc/ret_grab(obj/effect/list_container/mobl/L as obj, flag)
if ((!( istype(l_hand, /obj/item/weapon/grab) ) && !( istype(r_hand, /obj/item/weapon/grab) )))
if (!( L ))
@@ -611,13 +641,13 @@ var/list/slot_equipment_priority = list( \
src << "<h2 class='alert'>OOC Warning:</h2>"
src << "<span class='alert'>Your flavor text is likely out of date! <a href='byond://?src=\ref[src];flavor_change=1'>Change</a></span>"
/mob/proc/print_flavor_text()
/mob/proc/print_flavor_text(var/shrink = 1)
if (flavor_text && flavor_text != "")
var/msg = replacetext(flavor_text, "\n", " ")
if(lentext(msg) <= 40)
return "\blue [msg]"
if(lentext(msg) <= 40 || !shrink)
return "<span class='notice'>[msg]</span>"
else
return "\blue [copytext_preserve_html(msg, 1, 37)]... <a href='byond://?src=\ref[src];flavor_more=1'>More...</a>"
return "<span class='notice'>[copytext_preserve_html(msg, 1, 37)]... <a href='byond://?src=\ref[src];flavor_more=1'>More...</a></span>"
/mob/proc/is_dead()
return stat == DEAD
+2
View File
@@ -426,6 +426,7 @@
/obj/item/weapon/grab/dropped()
qdel(src)
/obj/item/weapon/grab/Destroy()
if(affecting)
affecting.pixel_x = 0
@@ -435,6 +436,7 @@
qdel(hud)
return ..()
#undef EAT_TIME_XENO
#undef EAT_TIME_FAT
+13 -10
View File
@@ -2,7 +2,7 @@
/mob/proc/say()
return
/mob/verb/whisper()
/mob/verb/whisper(message as text)
set name = "Whisper"
set category = "IC"
return
@@ -35,13 +35,13 @@
set_typing_indicator(0)
if(use_me)
usr.emote("me",usr.emote_type,message)
custom_emote(usr.emote_type, message)
else
usr.emote(message)
/mob/proc/say_dead(var/message)
if(!src.client.holder)
if(!dsay_allowed)
if(!config.dsay_allowed)
src << "<span class='danger'>Deadchat is globally muted.</span>"
return
@@ -84,14 +84,17 @@
/mob/proc/say_quote(var/message, var/datum/language/speaking = null)
var/verb = "says"
var/ending = copytext(message, length(message))
if(ending=="!")
verb=pick("exclaims","shouts","yells")
else if(ending=="?")
verb="asks"
var/verb = "says"
var/ending = copytext(message, length(message))
return verb
if(speaking)
verb = speaking.get_spoken_verb(ending)
else
if(ending=="!")
verb = pick("exclaims","shouts","yells")
else if(ending=="?")
verb = "asks"
return verb
/mob/proc/emote(var/act, var/type, var/message)
+1
View File
@@ -5,6 +5,7 @@
item_state = "energy_katana"
force = 40
throwforce = 20
armour_penetration = 15
var/cooldown = 0 // Because spam aint cool, yo.
var/datum/effect/effect/system/spark_spread/spark_system
+20
View File
@@ -22,6 +22,26 @@ var/list/organ_cache = list()
// links chemical IDs to number of ticks for which they'll stay in the blood
germ_level = 0
/obj/item/organ/Destroy()
if(!owner)
return ..()
if(istype(owner, /mob/living/carbon))
if((owner.internal_organs) && (src in owner.internal_organs))
owner.internal_organs -= src
if(istype(owner, /mob/living/carbon/human))
if((owner.internal_organs_by_name) && (src in owner.internal_organs_by_name))
owner.internal_organs_by_name -= src
if((owner.organs) && (src in owner.organs))
owner.organs -= src
if((owner.organs_by_name) && (src in owner.organs_by_name))
owner.organs_by_name -= src
if(src in owner.contents)
owner.contents -= src
return ..()
/obj/item/organ/attack_self(mob/user as mob)
// Convert it to an edible form, yum yum.
+23 -10
View File
@@ -7,10 +7,10 @@
max_damage = 0
dir = SOUTH
organ_tag = "limb"
var/brute_mod = 1
var/burn_mod = 1
var/icon_name = null
var/body_part = null
var/icon_position = 0
@@ -61,6 +61,19 @@
var/can_grasp
var/can_stand
/obj/item/organ/external/Destroy()
if(parent && parent.children)
parent.children -= src
if(children)
for(var/obj/item/organ/external/C in children)
qdel(C)
if(internal_organs)
for(var/obj/item/organ/O in internal_organs)
qdel(O)
return ..()
/obj/item/organ/external/attackby(obj/item/weapon/W as obj, mob/user as mob)
switch(stage)
@@ -120,7 +133,7 @@
if(!parent.children)
parent.children = list()
parent.children.Add(src)
/obj/item/organ/external/robotize()
..()
//robot limbs take reduced damage
@@ -137,7 +150,7 @@
if(status & ORGAN_DESTROYED)
return 0
brute *= brute_mod
burn *= burn_mod
@@ -311,7 +324,7 @@ This function completely restores a damaged organ to perfect condition.
"<span class='alert'>The wound on your [name] widens with a nasty ripping noise.</span>",\
"You hear a nasty ripping noise, as if flesh is being torn apart.")
return
//Creating wound
var/wound_type = get_wound_type(type, damage)
@@ -536,8 +549,8 @@ Note that amputating the affected organ does in fact remove the infection from t
var/mob/living/carbon/human/H
if(istype(owner,/mob/living/carbon/human))
H = owner
H = owner
for(var/datum/wound/W in wounds)
if(W.damage_type == CUT || W.damage_type == BRUISE)
brute_dam += W.damage
@@ -554,7 +567,7 @@ Note that amputating the affected organ does in fact remove the infection from t
if (open && !clamped && (H && !(H.species.flags & NO_BLOOD)))
status |= ORGAN_BLEEDING
//Bone fractures
if(config.bones_can_break && brute_dam > min_broken_damage * config.organ_health_multiplier && !(status & ORGAN_ROBOT))
src.fracture()
@@ -723,7 +736,7 @@ Note that amputating the affected organ does in fact remove the infection from t
/obj/item/organ/external/proc/fracture()
if(status & ORGAN_ROBOT)
return //ORGAN_BROKEN doesn't have the same meaning for robot limbs
if((status & ORGAN_BROKEN) || cannot_break)
return
if(owner)
@@ -787,7 +800,7 @@ Note that amputating the affected organ does in fact remove the infection from t
/obj/item/organ/external/proc/is_usable()
if((status & ORGAN_ROBOT) && get_damage() >= max_damage) //robot limbs just become inoperable at max damage
return
return
return !(status & (ORGAN_DESTROYED|ORGAN_MUTATED|ORGAN_DEAD))
/obj/item/organ/external/proc/is_malfunctioning()
+2
View File
@@ -119,6 +119,8 @@ mob/living/carbon/human/proc/handle_pain()
// Damage to internal organs hurts a lot.
for(var/obj/item/organ/I in internal_organs)
if(istype(I, /obj/item/organ/brain)) //the brain has no pain receptors, and brain damage is meant to be a stealthy damage type.
continue
if(I.damage > 2) if(prob(2))
var/obj/item/organ/external/parent = get_organ(I.parent_organ)
src.custom_pain("You feel a sharp pain in your [parent.name]", 1)

Some files were not shown because too many files have changed in this diff Show More