This commit is contained in:
Chinsky
2013-06-01 04:18:43 +04:00
119 changed files with 2905 additions and 2690 deletions

View File

@@ -64,6 +64,7 @@ var/list/admin_verbs_admin = list(
/client/proc/cmd_admin_change_custom_event,
/client/proc/cmd_admin_rejuvenate,
/client/proc/toggleattacklogs,
/client/proc/toggledebuglogs,
/datum/admins/proc/show_skills,
/client/proc/check_customitem_activity
)
@@ -134,7 +135,8 @@ var/list/admin_verbs_debug = list(
/client/proc/reload_admins,
/client/proc/restart_controller,
/client/proc/enable_debug_verbs,
/client/proc/callproc
/client/proc/callproc,
/client/proc/toggledebuglogs
)
var/list/admin_verbs_possess = list(
/proc/possess,
@@ -222,6 +224,7 @@ var/list/admin_verbs_mod = list(
/client/proc/cmd_admin_pm_context, /*right-click adminPM interface*/
/client/proc/cmd_admin_pm_panel, /*admin-pm list*/
/client/proc/debug_variables, /*allows us to -see- the variables of any instance in the game.*/
/client/proc/toggledebuglogs,
/datum/admins/proc/PlayerNotes,
/client/proc/admin_ghost, /*allows us to ghost/reenter body at will*/
/client/proc/cmd_mod_say,
@@ -721,4 +724,15 @@ var/list/admin_verbs_mod = list(
if (prefs.toggles & CHAT_ATTACKLOGS)
usr << "You now will get attack log messages"
else
usr << "You now won't get attack log messages"
usr << "You now won't get attack log messages"
/client/proc/toggledebuglogs()
set name = "Toggle Debug Log Messages"
set category = "Preferences"
prefs.toggles ^= CHAT_DEBUGLOGS
if (prefs.toggles & CHAT_DEBUGLOGS)
usr << "You now will get debug log messages"
else
usr << "You now won't get debug log messages"

View File

@@ -158,7 +158,7 @@
icon_state = "suspenders"
blood_overlay_type = "armor" //it's the less thing that I can put here
/obj/item/clothing/suit/fr_jacket
/obj/item/clothing/suit/storage/fr_jacket
name = "first responder jacket"
desc = "A high-visibility jacket worn by medical first responders."
icon_state = "fr_jacket_open"

View File

@@ -20,6 +20,8 @@
sleep(2400)
*/
var/list/event_last_fired = list()
//Always triggers an event when called, dynamically chooses events based on job population
/proc/spawn_dynamic_event()
if(!config.allow_random_events)
@@ -58,22 +60,24 @@
possibleEvents[/datum/event/infestation] = 50 + 25 * active_with_role["Janitor"]
possibleEvents[/datum/event/communications_blackout] = 50 + 25 * active_with_role["AI"] + active_with_role["Scientist"] * 25
possibleEvents[/datum/event/ionstorm] = 25 + active_with_role["AI"] * 25 + active_with_role["Cyborg"] * 25 + active_with_role["Engineer"] * 10 + active_with_role["Scientist"] * 5
possibleEvents[/datum/event/grid_check] = 25 + 10 * active_with_role["Engineer"]
possibleEvents[/datum/event/electrical_storm] = 75 + 25 * active_with_role["Janitor"] + 5 * active_with_role["Engineer"]
possibleEvents[/datum/event/ionstorm] = active_with_role["AI"] * 25 + active_with_role["Cyborg"] * 25 + active_with_role["Engineer"] * 10 + active_with_role["Scientist"] * 5
possibleEvents[/datum/event/grid_check] = 25 + 20 * active_with_role["Engineer"]
possibleEvents[/datum/event/electrical_storm] = 10 * active_with_role["Janitor"] + 5 * active_with_role["Engineer"]
possibleEvents[/datum/event/wallrot] = 30 * active_with_role["Engineer"] + 50 * active_with_role["Botanist"]
if(!spacevines_spawned)
possibleEvents[/datum/event/spacevine] = 5 + 10 * active_with_role["Engineer"]
possibleEvents[/datum/event/spacevine] = 5 + 5 * active_with_role["Engineer"]
if(minutes_passed >= 30) // Give engineers time to set up engine
possibleEvents[/datum/event/meteor_wave] = 20 * active_with_role["Engineer"]
possibleEvents[/datum/event/meteor_shower] = 80 * active_with_role["Engineer"]
possibleEvents[/datum/event/blob] = 30 * active_with_role["Engineer"]
possibleEvents[/datum/event/meteor_wave] = 10 * active_with_role["Engineer"]
possibleEvents[/datum/event/meteor_shower] = 40 * active_with_role["Engineer"]
possibleEvents[/datum/event/blob] = 20 * active_with_role["Engineer"]
possibleEvents[/datum/event/viral_infection] = 25 + active_with_role["Medical"] * 25
possibleEvents[/datum/event/viral_infection] = 25 + active_with_role["Medical"] * 100
if(active_with_role["Medical"] > 0)
possibleEvents[/datum/event/radiation_storm] = active_with_role["Medical"] * 100
possibleEvents[/datum/event/spontaneous_appendicitis] = active_with_role["Medical"] * 75
possibleEvents[/datum/event/viral_outbreak] = active_with_role["Medical"] * 5
possibleEvents[/datum/event/radiation_storm] = active_with_role["Medical"] * 50
possibleEvents[/datum/event/spontaneous_appendicitis] = active_with_role["Medical"] * 150
possibleEvents[/datum/event/viral_outbreak] = active_with_role["Medical"] * 10
possibleEvents[/datum/event/organ_failure] = active_with_role["Medical"] * 50
possibleEvents[/datum/event/prison_break] = active_with_role["Security"] * 50
if(active_with_role["Security"] > 0)
@@ -84,16 +88,26 @@
if(!sent_ninja_to_station && toggle_space_ninja)
possibleEvents[/datum/event/space_ninja] = max(active_with_role["Security"], 5)
for(var/event_type in event_last_fired) if(possibleEvents[event_type])
var/time_passed = world.time - event_last_fired[event_type]
var/full_recharge_after = 60 * 60 * 10 * 3 // 3 hours
var/weight_modifier = max(0, (full_recharge_after - time_passed) / 300)
possibleEvents[event_type] = max(possibleEvents[event_type] - weight_modifier, 0)
var/picked_event = pickweight(possibleEvents)
event_last_fired[picked_event] = world.time
// Debug code below here, very useful for testing so don't delete please.
/*var/debug_message = "Firing random event. "
var/debug_message = "Firing random event. "
for(var/V in active_with_role)
debug_message += "#[V]:[active_with_role[V]] "
debug_message += "||| "
for(var/V in possibleEvents)
debug_message += "[V]:[possibleEvents[V]]"
message_admins(debug_message)*/
debug_message += "|||Picked:[picked_event]"
log_debug(debug_message)
var/picked_event = pickweight(possibleEvents)
if(!picked_event)
return
@@ -176,6 +190,7 @@
active_with_role["AI"] = 0
active_with_role["Cyborg"] = 0
active_with_role["Janitor"] = 0
active_with_role["Botanist"] = 0
for(var/mob/M in player_list)
if(!M.mind || !M.client || M.client.inactivity > 10 * 10 * 60) // longer than 10 minutes AFK counts them as inactive
@@ -208,4 +223,7 @@
if(M.mind.assigned_role == "Janitor")
active_with_role["Janitor"]++
if(M.mind.assigned_role == "Botanist")
active_with_role["Botanist"]++
return active_with_role

View File

@@ -2,8 +2,8 @@ var/list/allEvents = typesof(/datum/event) - /datum/event
var/list/potentialRandomEvents = typesof(/datum/event) - /datum/event
//var/list/potentialRandomEvents = typesof(/datum/event) - /datum/event - /datum/event/spider_infestation - /datum/event/alien_infestation
var/eventTimeLower = 10000 //15 minutes
var/eventTimeUpper = 25000 //30 minutes
var/eventTimeLower = 9000 //15 minutes
var/eventTimeUpper = 15000 //25 minutes
var/scheduledEvent = null
@@ -30,7 +30,9 @@ var/scheduledEvent = null
playercount_modifier = 0.9
if(36 to 100000)
playercount_modifier = 0.8
scheduledEvent = world.timeofday + rand(eventTimeLower, eventTimeUpper) * playercount_modifier
var/next_event_delay = rand(eventTimeLower, eventTimeUpper) * playercount_modifier
scheduledEvent = world.timeofday + next_event_delay
log_debug("Next event in [next_event_delay/600] minutes.")
else if(world.timeofday > scheduledEvent)
spawn_dynamic_event()

View File

@@ -21,7 +21,7 @@
//
/datum/event/meteor_shower
startWhen = 6
startWhen = 5
endWhen = 7
var/next_meteor = 6
var/waves = 1

View File

@@ -0,0 +1,28 @@
datum/event/organ_failure
var/severity = 1
datum/event/organ_failure/setup()
announceWhen = rand(0, 300)
endWhen = announceWhen + 1
severity = rand(1, 3)
datum/event/organ_failure/announce()
command_alert("Confirmed outbreak of level [rand(3,7)] biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
world << sound('sound/AI/outbreak5.ogg')
datum/event/organ_failure/start()
var/list/candidates = list() //list of candidate keys
for(var/mob/living/carbon/human/G in player_list)
if(G.mind && G.mind.current && G.mind.current.stat != DEAD && G.health > 70)
candidates += G
if(!candidates.len) return
candidates = shuffle(candidates)//Incorporating Donkie's list shuffle
while(severity > 0 && candidates.len)
var/mob/living/carbon/human/C = candidates[1]
// Bruise one of their organs
var/datum/organ/internal/I = pick(C.internal_organs)
I.damage = I.min_bruised_damage
candidates.Remove(C)
severity--

View File

@@ -1,36 +1,46 @@
/datum/event/radiation_storm
announceWhen = 5
announceWhen = 1
oneShot = 1
/datum/event/radiation_storm/announce()
command_alert("High levels of radiation detected near the station. Please report to the Med-bay if you feel strange.", "Anomaly Alert")
world << sound('sound/AI/radiation.ogg')
// Don't do anything, we want to pack the announcement with the actual event
/datum/event/radiation_storm/start()
for(var/mob/living/carbon/human/H in living_mob_list)
var/turf/T = get_turf(H)
if(!T)
continue
if(T.z != 1)
continue
if(istype(H,/mob/living/carbon/human))
H.apply_effect((rand(15,75)),IRRADIATE,0)
if(prob(5))
H.apply_effect((rand(90,150)),IRRADIATE,0)
if(prob(25))
if (prob(75))
randmutb(H)
domutcheck(H,null,1)
else
randmutg(H)
domutcheck(H,null,1)
spawn()
world << sound('sound/AI/radiation.ogg')
command_alert("High levels of radiation detected near the station. Please evacuate into one of the shielded maintenance tunnels.", "Anomaly Alert")
for(var/mob/living/carbon/monkey/M in living_mob_list)
var/turf/T = get_turf(M)
if(!T)
continue
if(T.z != 1)
continue
M.apply_effect((rand(15,75)),IRRADIATE,0)
sleep(600)
command_alert("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++)
for(var/mob/living/carbon/human/H in living_mob_list)
var/turf/T = get_turf(H)
if(!T)
continue
if(T.z != 1)
continue
if(istype(T.loc, /area/maintenance) || istype(T.loc, /area/crew_quarters))
continue
if(istype(H,/mob/living/carbon/human))
H.apply_effect((rand(2,15)),IRRADIATE,0)
if(prob(5))
H.apply_effect((rand(10,30)),IRRADIATE,0)
if (prob(75))
randmutb(H)
domutcheck(H,null,1)
else
randmutg(H)
domutcheck(H,null,1)
for(var/mob/living/carbon/monkey/M in living_mob_list)
var/turf/T = get_turf(M)
if(!T)
continue
if(T.z != 1)
continue
M.apply_effect((rand(5,25)),IRRADIATE,0)
sleep(100)
command_alert("The station has passed the radiation belt. Please report to medbay if you experience any unusual symptoms.", "Anomaly Alert")

View File

@@ -1,5 +1,5 @@
/datum/event/spontaneous_appendicitis/start()
for(var/mob/living/carbon/human/H in shuffle(living_mob_list))
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

View File

@@ -14,7 +14,7 @@ datum/event/viral_infection/announce()
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.mind && G.mind.current && G.mind.current.stat != DEAD))
if(G.client && G.stat != DEAD)
candidates += G
if(!candidates.len) return
candidates = shuffle(candidates)//Incorporating Donkie's list shuffle

View File

@@ -14,7 +14,7 @@ datum/event/viral_outbreak/announce()
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.mind && G.mind.current && G.mind.current.stat != DEAD))
if(G.client && G.stat != DEAD)
candidates += G
if(!candidates.len) return
candidates = shuffle(candidates)//Incorporating Donkie's list shuffle

View File

@@ -0,0 +1,37 @@
/turf/simulated/wall
datum/event/wallrot
var/severity = 1
datum/event/wallrot/setup()
announceWhen = rand(0, 300)
endWhen = announceWhen + 1
severity = rand(5, 10)
datum/event/wallrot/announce()
command_alert("Harmful fungi detected on station. Station structures may be contaminated.", "Biohazard Alert")
datum/event/wallrot/start()
spawn()
var/turf/center = null
// 100 attempts
for(var/i=0, i<100, i++)
var/turf/candidate = locate(rand(1, world.maxx), rand(1, world.maxy), 1)
if(istype(candidate, /turf/simulated/wall))
center = candidate
if(center)
// Make sure at least one piece of wall rots!
center:rot()
// Have a chance to rot lots of other walls.
var/rotcount = 0
for(var/turf/simulated/wall/W in range(5, center)) if(prob(50))
W:rot()
rotcount++
// Only rot up to severity walls
if(rotcount >= severity)
break

View File

@@ -6,7 +6,8 @@ mob/living/carbon/proc/dream()
"light","a scientist","a monkey","a catastrophe","a loved one","a gun","warmth","freezing","the sun",
"a hat","the Luna","a ruined station","a planet","plasma","air","the medical bay","the bridge","blinking lights",
"a blue light","an abandoned laboratory","Nanotrasen","The Syndicate","blood","healing","power","respect",
"riches","space","a crash","happiness","pride","a fall","water","flames","ice","melons","flying","the eggs"
"riches","space","a crash","happiness","pride","a fall","water","flames","ice","melons","flying","the eggs","money",
"a beach","the holodeck","a smokey room","a voice","the cold","a mouse","an operating table","the bar","the rain"
)
spawn(0)
for(var/i = rand(1,4),i > 0, i--)

View File

@@ -32,19 +32,13 @@ mob/proc/custom_emote(var/m_type=1,var/message = null)
continue
if(findtext(message," snores.")) //Because we have so many sleeping people.
break
if(M.stat == 2 && M.client.ghost_sight && !(M in viewers(src,null)))
if(M.stat == 2 && (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))
if(istype(O,/mob/living/carbon/human))
for(var/mob/living/parasite/P in O:parasites)
P.show_message(message, m_type)
O.show_message(message, m_type)
else if (m_type & 2)
for (var/mob/O in hearers(src.loc, null))
if(istype(O,/mob/living/carbon/human))
for(var/mob/living/parasite/P in O:parasites)
P.show_message(message, m_type)
O.show_message(message, m_type)

View File

@@ -9,7 +9,7 @@
return
if (length(message) >= 2)
if (copytext(message, 1, 3) == ":a" || copytext(message, 1, 3) == "#a" || copytext(message, 1, 3) == ".a" )
if (department_radio_keys[copytext(message, 1, 3)] == "alientalk")
message = copytext(message, 3)
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
if (stat == 2)

View File

@@ -5,7 +5,7 @@
if(!(container && (istype(container, /obj/item/device/mmi) || istype(container, /obj/item/device/mmi/posibrain))))
return //No MMI, can't speak, bucko./N
else
if ((copytext(message, 1, 3) == ":b") || (copytext(message, 1, 3) == ":B") && (container && istype(container, /obj/item/device/mmi/posibrain)))
if ((department_radio_keys[copytext(message, 1, 3)] == "binary") && (container && istype(container, /obj/item/device/mmi/posibrain)))
message = copytext(message, 3)
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
robot_talk(message)

View File

@@ -53,27 +53,17 @@
var/input = copytext(sanitize(input("Choose an emote to display.") as text|null),1,MAX_MESSAGE_LEN)
if (!input)
return
if(copytext(input,1,5) == "says")
src << "\red Invalid emote."
return
else if(copytext(input,1,9) == "exclaims")
src << "\red Invalid emote."
return
else if(copytext(input,1,5) == "asks")
src << "\red Invalid emote."
return
else
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.")
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
message = "<B>[src]</B> [input]"
m_type = 2
else
alert("Unable to use this emote, must be either hearable or visible.")
return
message = "<B>[src]</B> [input]"
if ("me")
if(silent)
@@ -88,17 +78,7 @@
return
if(!(message))
return
if(copytext(message,1,5) == "says")
src << "\red Invalid emote."
return
else if(copytext(message,1,9) == "exclaims")
src << "\red Invalid emote."
return
else if(copytext(message,1,5) == "asks")
src << "\red Invalid emote."
return
else
message = "<B>[src]</B> [message]"
message = "<B>[src]</B> [message]"
if ("salute")
if (!src.buckled)

View File

@@ -439,7 +439,7 @@
//Returns "Unknown" if facially disfigured and real_name if not. Useful for setting name when polyacided or when updating a human's name variable
/mob/living/carbon/human/proc/get_face_name()
var/datum/organ/external/head/head = get_organ("head")
if( !head || head.disfigured || (head.status & ORGAN_DESTROYED) || !real_name ) //disfigured. use id-name if possible
if( !head || head.disfigured || (head.status & ORGAN_DESTROYED) || !real_name || (HUSK in mutations) ) //disfigured. use id-name if possible
return "Unknown"
return real_name
@@ -823,6 +823,15 @@
else if(src.dna.mutantrace == "tajaran")
return "Tajaran"
/mob/living/carbon/proc/update_mutantrace_languages()
if(src.dna)
if(src.dna.mutantrace == "lizard")
src.soghun_talk_understand = 1
else if(src.dna.mutantrace == "skrell")
src.skrell_talk_understand = 1
else if(src.dna.mutantrace == "tajaran")
src.tajaran_talk_understand = 1
/mob/living/carbon/human/proc/play_xylophone()
if(!src.xylophone)
visible_message("\red [src] begins playing his ribcage like a xylophone. It's quite spooky.","\blue You begin to play a spooky refrain on your ribcage.","\red You hear a spooky xylophone melody.")

View File

@@ -28,6 +28,7 @@
var/pressure_alert = 0
var/prev_gender = null // Debug for plural genders
var/temperature_alert = 0
var/in_stasis = 0
/mob/living/carbon/human/Life()
@@ -59,8 +60,11 @@
life_tick++
var/datum/gas_mixture/environment = loc.return_air()
in_stasis = istype(loc, /obj/structure/closet/body_bag/cryobag) && loc:opened == 0
if(in_stasis) loc:used++
//No need to update all of these procs if the guy is dead.
if(stat != DEAD)
if(stat != DEAD && !in_stasis)
if(air_master.current_cycle%4==2 || failed_last_breath) //First, resolve location and get a breath
breathe() //Only try to take a breath every 4 ticks, unless suffocating
@@ -86,18 +90,20 @@
handle_virus_updates()
//stuff in the stomach
handle_stomach()
handle_shock()
handle_pain()
handle_medical_side_effects()
handle_stasis_bag()
//Handle temperature/pressure differences between body and environment
handle_environment(environment)
//stuff in the stomach
handle_stomach()
handle_shock()
handle_pain()
handle_medical_side_effects()
//Status updates, death etc.
handle_regular_status_updates() //TODO: optimise ~Carn
update_canmove()
@@ -196,6 +202,16 @@
src << "\red Your legs won't respond properly, you fall down."
lying = 1
proc/handle_stasis_bag()
// Handle side effects from stasis bag
if(in_stasis)
// First off, there's no oxygen supply, so the mob will slowly take brain damage
adjustBrainLoss(0.1)
// Next, the method to induce stasis has some adverse side-effects, manifesting
// as cloneloss
adjustCloneLoss(0.1)
proc/handle_mutations_and_radiation()
if(getFireLoss())
if((COLD_RESISTANCE in mutations) || (prob(1)))
@@ -787,8 +803,8 @@
var/total_plasmaloss = 0
for(var/obj/item/I in src)
if(I.contaminated)
total_plasmaloss += vsc.plc.CONTAMINATION_LOSS
if(status_flags & GODMODE) return 0 //godmode
total_plasmaloss += vsc.plc.CONTAMINATION_LOSS
if(status_flags & GODMODE) return 0 //godmode
adjustToxLoss(total_plasmaloss)
// if(dna && dna.mutantrace == "plant") //couldn't think of a better place to place it, since it handles nutrition -- Urist
@@ -886,8 +902,10 @@
silent = 0
else //ALIVE. LIGHTS ARE ON
updatehealth() //TODO
handle_organs()
handle_blood()
if(!in_stasis)
handle_organs()
handle_blood()
if(health <= config.health_threshold_dead || brain_op_stage == 4.0)
death()
blinded = 1

View File

@@ -7,7 +7,7 @@
if(miming)
if(length(message) >= 2)
if(mind && mind.changeling)
if(copytext(message, 1, 2) != "*" && copytext(message, 1, 3) != ":g" && copytext(message, 1, 3) != ":G" && copytext(message, 1, 3) != ":<3A>")
if(copytext(message, 1, 2) != "*" && department_radio_keys[copytext(message, 1, 3)] != "changeling")
return
else
return ..(message)
@@ -93,7 +93,7 @@
else if(istype(wear_mask, /obj/item/clothing/mask/horsehead))
var/obj/item/clothing/mask/horsehead/hoers = wear_mask
if(hoers.voicechange)
if(!(copytext(message, 1, 2) == "*" || (mind && mind.changeling && (copytext(message, 1, 3) == ":g" || copytext(message, 1, 3) == ":G" || copytext(message, 1, 3) == ":<3A>"))))
if(!(copytext(message, 1, 2) == "*" || (mind && mind.changeling && department_radio_keys[copytext(message, 1, 3)] != "changeling")))
message = pick("NEEIIGGGHHHH!", "NEEEIIIIGHH!", "NEIIIGGHH!", "HAAWWWWW!", "HAAAWWW!")
if ((HULK in mutations) && health >= 25 && length(message))

View File

@@ -1,4 +1,4 @@
/mob/living/carbon/slime/emote(var/act)
/mob/living/carbon/slime/emote(var/act, var/type, var/desc)
if (findtext(act, "-", 1, null))
@@ -13,6 +13,10 @@
var/message
switch(act)
if ("me")
return custom_emote(m_type, desc)
if ("custom")
return custom_emote(m_type, desc)
if("moan")
message = "<B>The [src.name]</B> moans."
m_type = 2

View File

@@ -1,4 +1,4 @@
/mob/living/carbon/monkey/emote(var/act)
/mob/living/carbon/monkey/emote(var/act, var/type, var/desc)
var/param = null
if (findtext(act, "-", 1, null))
@@ -14,6 +14,12 @@
var/message
switch(act)
if ("me")
return custom_emote(m_type, desc)
if ("custom")
return custom_emote(m_type, desc)
if("sign")
if (!src.restrained())
message = text("<B>The monkey</B> signs[].", (text2num(param) ? text(" the number []", text2num(param)) : null))

View File

@@ -54,7 +54,10 @@ var/list/department_radio_keys = list(
":<3A>" = "alientalk", "#<23>" = "alientalk", ".<2E>" = "alientalk",
":<3A>" = "Syndicate", "#<23>" = "Syndicate", ".<2E>" = "Syndicate",
":<3A>" = "Supply", "#<23>" = "Supply", ".<2E>" = "Supply",
":<3A>" = "changeling", "#<23>" = "changeling", ".<2E>" = "changeling"
":<3A>" = "changeling", "#<23>" = "changeling", ".<2E>" = "changeling",
":<3A>" = "skrell", "#<23>" = "skrell", ".<2E>" = "skrell",
":<3A>" = "tajaran", "#<23>" = "tajaran", ".<2E>" = "tajaran",
":<3A>" = "soghun", "#<23>" = "soghun", ".<2E>" = "soghun"
)
/mob/living/proc/binarycheck()
@@ -402,7 +405,7 @@ var/list/department_radio_keys = list(
var/deaf_message = ""
var/deaf_type = 1
if(M != src)
deaf_message = "<span class='name'>[name][alt_name]</span> talks but you cannot hear them."
deaf_message = "<span class='name'>[name]</span>[alt_name] talks but you cannot hear them."
else
deaf_message = "<span class='notice'>You cannot hear yourself!</span>"
deaf_type = 2 // Since you should be able to hear yourself without looking
@@ -416,12 +419,12 @@ var/list/department_radio_keys = list(
message_b = voice_message
else
message_b = stars(message)
message_b = say_quote(message_b)
message_b = say_quote(message_b,is_speaking_soghun,is_speaking_skrell,is_speaking_taj)
if (italics)
message_b = "<i>[message_b]</i>"
rendered = "<span class='game say'><span class='name'>[voice_name]</span> <span class='message'>[message_b]</span></span>"
rendered = "<span class='game say'><span class='name'>[name]</span>[alt_name] <span class='message'>[message_b]</span></span>" //Voice_name isn't too useful. You'd be able to tell who was talking presumably.
for (var/M in heard_b)

View File

@@ -178,6 +178,7 @@ var/list/ai_list = list()
..()
statpanel("Status")
if (client.statpanel == "Status")
stat(null, "Station Time: [worldtime2text()]")
if(emergency_shuttle.online && emergency_shuttle.location < 2)
var/timeleft = emergency_shuttle.timeleft()
if (timeleft)

View File

@@ -9,6 +9,12 @@
act = copytext(act,1,length(act))
switch(act)
if ("me")
return custom_emote(m_type, message)
if ("custom")
return custom_emote(m_type, message)
if ("salute")
if (!src.buckled)
var/M = null
@@ -56,20 +62,6 @@
message = "<B>[src]</B> flaps his wings ANGRILY!"
m_type = 2
if ("custom")
var/input = copytext(sanitize(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")
m_type = 2
else
alert("Unable to use this emote, must be either hearable or visible.")
return
message = "<B>[src]</B> [input]"
if ("me")
if (src.client)
if(client.prefs.muted & MUTE_IC)

View File

@@ -123,7 +123,10 @@
updatename(mod)
module = new /obj/item/weapon/robot_module/standard(src)
hands.icon_state = "standard"
icon_state = "robot"
var/icontype = input("Select an icon!", "Robot", null, null) in list("Basic", "Standard")
switch(icontype)
if("Basic") icon_state = "robot_old"
else icon_state = "robot"
modtype = "Stand"
feedback_inc("cyborg_standard",1)
@@ -145,7 +148,11 @@
updatename(mod)
module = new /obj/item/weapon/robot_module/miner(src)
hands.icon_state = "miner"
icon_state = "Miner"
var/icontype = input("Select an icon!", "Robot", null, null) in list("Basic", "Advanced Droid", "Treadhead")
switch(icontype)
if("Basic") icon_state = "Miner_old"
if("Advanced Droid") icon_state = "droid-miner"
else icon_state = "Miner"
modtype = "Miner"
feedback_inc("cyborg_miner",1)
channels = list("Mining" = 1)
@@ -154,7 +161,12 @@
updatename(mod)
module = new /obj/item/weapon/robot_module/medical(src)
hands.icon_state = "medical"
icon_state = "surgeon"
var/icontype = input("Select an icon!", "Robot", null, null) in list("Basic", "Advanced Droid", "Needles", "Hoverbot")
switch(icontype)
if("Basic") icon_state = "Medbot"
if("Advanced Droid") icon_state = "droid-medical"
if("Needles") icon_state = "medicalrobot"
else icon_state = "surgeon"
modtype = "Med"
status_flags &= ~CANPUSH
feedback_inc("cyborg_medical",1)
@@ -164,7 +176,12 @@
updatename(mod)
module = new /obj/item/weapon/robot_module/security(src)
hands.icon_state = "security"
icon_state = "bloodhound"
var/icontype = input("Select an icon!", "Robot", null, null) in list("Basic", "Red Knight", "Black Knight", "Bloodhound")
switch(icontype)
if("Basic") icon_state = "secborg"
if("Red Knight") icon_state = "Security"
if("Black Knight") icon_state = "securityrobot"
else icon_state = "bloodhound"
modtype = "Sec"
//speed = -1 Secborgs have nerfed tasers now, so the speed boost is not necessary
status_flags &= ~CANPUSH
@@ -175,7 +192,11 @@
updatename(mod)
module = new /obj/item/weapon/robot_module/engineering(src)
hands.icon_state = "engineer"
icon_state = "landmate"
var/icontype = input("Select an icon!", "Robot", null, null) in list("Basic", "Antique", "Landmate")
switch(icontype)
if("Basic") icon_state = "Engineering"
if("Antique") icon_state = "Engineerrobot"
else icon_state = "landmate"
modtype = "Eng"
feedback_inc("cyborg_engineering",1)
channels = list("Engineering" = 1)
@@ -184,7 +205,11 @@
updatename(mod)
module = new /obj/item/weapon/robot_module/janitor(src)
hands.icon_state = "janitor"
icon_state = "mopgearrex"
var/icontype = input("Select an icon!", "Robot", null, null) in list("Basic", "Mopbot", "Zamboni")
switch(icontype)
if("Basic") icon_state = "JanBot2"
if("Mopbot") icon_state = "janitorrobot"
else icon_state = "mopgearrex"
modtype = "Jan"
feedback_inc("cyborg_janitor",1)
@@ -210,6 +235,7 @@
/mob/living/silicon/robot/verb/Namepick()
if(custom_name)
return 0
spawn(0)
var/newname
newname = input(src,"You are a robot. Enter a name, or leave blank for the default name.", "Name change","") as text

View File

@@ -18,17 +18,14 @@
return
if (length(message) >= 2)
if ((copytext(message, 1, 3) == ":b") || (copytext(message, 1, 3) == ":B") || \
(copytext(message, 1, 3) == "#b") || (copytext(message, 1, 3) == "#B") || \
(copytext(message, 1, 3) == ".b") || (copytext(message, 1, 3) == ".B"))
var/prefix = copytext(message, 1, 3)
if (department_radio_keys[prefix] == "binary")
if(istype(src, /mob/living/silicon/pai))
return ..(message)
message = copytext(message, 3)
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
robot_talk(message)
else if ((copytext(message, 1, 3) == ":h") || (copytext(message, 1, 3) == ":H") || \
(copytext(message, 1, 3) == "#h") || (copytext(message, 1, 3) == "#H") || \
(copytext(message, 1, 3) == ".h") || (copytext(message, 1, 3) == ".H"))
else if (department_radio_keys[prefix] == "department")
if(isAI(src)&&client)//For patching directly into AI holopads.
var/mob/living/silicon/ai/U = src
message = copytext(message, 3)

View File

@@ -226,14 +226,8 @@
/mob/living/simple_animal/emote(var/act, var/type, var/desc)
if(act)
if(act == "scream") act = "makes a loud and pained whimper" //ugly hack to stop animals screaming when crushed :P
if(act == "me") //Allow me-emotes.
act = desc
if( findtext(act,".",lentext(act)) == 0 && findtext(act,"!",lentext(act)) == 0 && findtext(act,"?",lentext(act)) == 0 )
act = addtext(act,".") //Makes sure all emotes end with a period.
for (var/mob/O in viewers(src, null))
O.show_message("<B>[src]</B> [act]")
if(act == "scream") act = "whimper" //ugly hack to stop animals screaming when crushed :P
..(act, type, desc)
/mob/living/simple_animal/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)

View File

@@ -65,6 +65,10 @@
Stat()
..()
statpanel("Status")
if (client.statpanel == "Status" && ticker)
if (ticker.current_state != GAME_STATE_PREGAME)
stat(null, "Station Time: [worldtime2text()]")
statpanel("Lobby")
if(client.statpanel=="Lobby" && ticker)
if(ticker.hide_mode)
@@ -277,6 +281,8 @@
character.loc = pick(latejoin)
character.lastarea = get_area(loc)
ticker.mode.latespawn(character)
//ticker.mode.latespawn(character)
if(character.mind.assigned_role != "Cyborg")

View File

@@ -75,31 +75,32 @@
//tcomms code is still runtiming somewhere here
var/ending = copytext(text, length(text))
if (is_speaking_soghun)
return "hisses, \"<span class='soghun'>[text]</span>\"";
return "<span class='say_quote'>hisses</span>, \"<span class='soghun'>[text]</span>\"";
if (is_speaking_skrell)
return "warbles, \"<span class='skrell'>[text]</span>\"";
return "<span class='say_quote'>warbles</span>, \"<span class='skrell'>[text]</span>\"";
if (is_speaking_tajaran)
return "mrowls, \"<span class='tajaran'>[text]</span>\"";
return "<span class='say_quote'>mrowls</span>, \"<span class='tajaran'>[text]</span>\"";
//Needs Virus2
// if (src.disease_symptoms & DISEASE_HOARSE)
// return "rasps, \"[text]\"";
if (src.stuttering)
return "stammers, \"[text]\"";
return "<span class='say_quote'>stammers</span>, \"[text]\"";
if (src.slurring)
return "slurrs, \"[text]\"";
return "<span class='say_quote'>slurrs</span>, \"[text]\"";
if(isliving(src))
var/mob/living/L = src
if (L.getBrainLoss() >= 60)
return "gibbers, \"[text]\"";
return "<span class='say_quote'>gibbers</span>, \"[text]\"";
if (ending == "?")
return "asks, \"[text]\"";
return "<span class='say_quote'>asks</span>, \"[text]\"";
if (ending == "!")
return "exclaims, \"[text]\"";
return "<span class='say_quote'>exclaims</span>, \"[text]\"";
return "says, \"[text]\"";
return "<span class='say_quote'>says</span>, \"[text]\"";
/mob/proc/emote(var/act)
return
/mob/proc/emote(var/act, var/type, var/message)
if(act == "me")
return custom_emote(type, message)
/mob/proc/get_ear()
// returns an atom representing a location on the map from which this

View File

@@ -236,7 +236,8 @@
if(href_list["write"])
var/id = href_list["write"]
//var/t = strip_html_simple(input(usr, "What text do you wish to add to " + (id=="end" ? "the end of the paper" : "field "+id) + "?", "[name]", null),8192) as message
var/t = strip_html_simple(input("Enter what you want to write:", "Write", null, null) as message, MAX_MESSAGE_LEN)
//var/t = strip_html_simple(input("Enter what you want to write:", "Write", null, null) as message, MAX_MESSAGE_LEN)
var/t = input("Enter what you want to write:", "Write", null, null) as message
var/obj/item/i = usr.get_active_hand() // Check to see if he still got that darn pen, also check if he's using a crayon or pen.
var/iscrayon = 0
if(!istype(i, /obj/item/weapon/pen))
@@ -248,6 +249,17 @@
if((!in_range(src, usr) && loc != usr && !( istype(loc, /obj/item/weapon/clipboard) ) && loc.loc != usr && usr.get_active_hand() != i)) // Some check to see if he's allowed to write
return
t = checkhtml(t)
// check for exploits
for(var/bad in paper_blacklist)
if(findtext(t,bad))
usr << "\blue You think to yourself, \"Hm.. this is only paper...\""
log_admin("PAPER: [usr] ([usr.ckey]) tried to use forbidden word in [src]: [bad].")
message_admins("PAPER: [usr] ([usr.ckey]) tried to use forbidden word in [src]: [bad].")
return
t = replacetext(t, "\n", "<BR>")
t = parsepencode(t, i, usr, iscrayon) // Encode everything from pencode to html
if(id!="end")

View File

@@ -187,10 +187,7 @@
else
icon_state = basestate
else if (opened == 2)
if ((stat & BROKEN) || malfhack )
icon_state = "[basestate]-b-nocover"
else /* if (emagged)*/
icon_state = "[basestate]-nocover"
icon_state = "[basestate]-nocover"
else if (stat & BROKEN)
icon_state = "apc-b"
else if(emagged || malfai)

View File

@@ -1,5 +1,4 @@
//updated by cael_aislinn on 5/3/2013 to be rotateable, moveable and generally more flexible
/obj/machinery/power/generator
name = "thermoelectric generator"
desc = "It's a high efficiency thermoelectric generator."
@@ -57,39 +56,26 @@
if(lastgenlev != 0)
overlays += image('icons/obj/power.dmi', "teg-op[lastgenlev]")
/obj/machinery/power/generator/process()
//world << "Generator process ran"
if(!circ1 || !circ2 || !anchored || stat & (BROKEN|NOPOWER))
return
//world << "circ1 and circ2 pass"
updateDialog()
var/datum/gas_mixture/air1 = circ1.return_transfer_air()
var/datum/gas_mixture/air2 = circ2.return_transfer_air()
lastgen = 0
//world << "hot_air = [hot_air]; cold_air = [cold_air];"
if(air1 && air2)
//world << "hot_air = [hot_air] temperature = [air2.temperature]; cold_air = [cold_air] temperature = [air2.temperature];"
//world << "coldair and hotair pass"
var/air1_heat_capacity = air1.heat_capacity()
var/air2_heat_capacity = air2.heat_capacity()
var/delta_temperature = abs(air2.temperature - air1.temperature)
//world << "delta_temperature = [delta_temperature]; air1_heat_capacity = [air1_heat_capacity]; air2_heat_capacity = [air2_heat_capacity]"
if(delta_temperature > 0 && air1_heat_capacity > 0 && air2_heat_capacity > 0)
var/efficiency = 0.65
var/energy_transfer = delta_temperature*air2_heat_capacity*air1_heat_capacity/(air2_heat_capacity+air1_heat_capacity)
var/heat = energy_transfer*(1-efficiency)
lastgen = energy_transfer*efficiency*0.05
if(air2.temperature > air1.temperature)
air2.temperature = air2.temperature - energy_transfer/air2_heat_capacity
@@ -98,20 +84,29 @@
air2.temperature = air2.temperature + heat/air2_heat_capacity
air1.temperature = air1.temperature - energy_transfer/air1_heat_capacity
lastgen = circ1.ReturnPowerGeneration() + circ2.ReturnPowerGeneration()
if(lastgen > 0)
add_avail(lastgen)
//Transfer the air
circ1.air2.merge(air1)
circ2.air2.merge(air2)
else
add_load(-lastgen)
//Update the gas networks
if(circ1.network2)
circ1.network2.update = 1
if(circ2.network2)
circ2.network2.update = 1
// update icon overlays and power usage only if displayed level has changed
var/genlev = max(0, min( round(11*lastgen / 100000), 11))
if(lastgen > 250000 && prob(10))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
lastgen *= 0.5
var/genlev = max(0, min( round(11*lastgen / 250000), 11))
if(lastgen > 100 && genlev == 0)
genlev = 1
if(genlev != lastgenlev)
lastgenlev = genlev
updateicon()
updateDialog()
add_avail(lastgen)
/obj/machinery/power/generator/attack_ai(mob/user)
if(stat & (BROKEN|NOPOWER)) return
@@ -145,19 +140,17 @@
if(circ1 && circ2)
t += "Output : [round(lastgen)] W<BR><BR>"
t += "<B>Primary Circulator (top/right)</B><BR>"
t += "<B>Primary Circulator (top or right)</B><BR>"
t += "Inlet Pressure: [round(circ1.air1.return_pressure(), 0.1)] kPa<BR>"
t += "Inlet Temperature: [round(circ1.air1.temperature, 0.1)] K<BR>"
t += "Outlet Pressure: [round(circ1.air2.return_pressure(), 0.1)] kPa<BR>"
t += "Outlet Temperature: [round(circ1.air2.temperature, 0.1)] K<BR>"
t += "Turbine Status: <A href='?src=\ref[src];turbine1=1'>[circ1.turbine_pumping ? "Pumping" : "Generating"]</a><br><br>"
t += "<B>Secondary Circulator (bottom/left)</B><BR>"
t += "<B>Secondary Circulator (bottom or left)</B><BR>"
t += "Inlet Pressure: [round(circ2.air1.return_pressure(), 0.1)] kPa<BR>"
t += "Inlet Temperature: [round(circ2.air1.temperature, 0.1)] K<BR>"
t += "Outlet Pressure: [round(circ2.air2.return_pressure(), 0.1)] kPa<BR>"
t += "Outlet Temperature: [round(circ2.air2.temperature, 0.1)] K<BR>"
t += "Turbine Status: <A href='?src=\ref[src];turbine2=1'>[circ2.turbine_pumping ? "Pumping" : "Generating"]</a><br>"
else
t += "Unable to connect to circulators.<br>"
@@ -179,14 +172,6 @@
usr.unset_machine()
return 0
if( href_list["turbine2"] )
if(circ2)
circ2.turbine_pumping = !circ2.turbine_pumping
if( href_list["turbine1"] )
if(circ1)
circ1.turbine_pumping = !circ1.turbine_pumping
updateDialog()
return 1

View File

@@ -92,6 +92,7 @@
loaded -= AC
AM.loc = get_turf(src)
empty_mag = null
update_icon()
user << "\blue You unload magazine from \the [src]!"
else
user << "\red Nothing loaded in \the [src]!"

View File

@@ -19,7 +19,7 @@
icon_state = "mini-uzi"
w_class = 3.0
max_shells = 16
caliber = " .45"
caliber = ".45"
origin_tech = "combat=5;materials=2;syndicate=8"
ammo_type = "/obj/item/ammo_casing/c45"

View File

@@ -1214,6 +1214,17 @@ datum
..()
return
// Clear off wallrot fungi
reaction_turf(var/turf/T, var/volume)
if(istype(T, /turf/simulated/wall))
var/turf/simulated/wall/W = T
if(W.rotting)
W.rotting = 0
for(var/obj/effect/E in W) if(E.name == "Wallrot") del E
for(var/mob/O in viewers(W, null))
O.show_message(text("\blue The fungi are completely dissolved by the solution!"), 1)
reaction_obj(var/obj/O, var/volume)
if(istype(O,/obj/effect/alien/weeds/))
var/obj/effect/alien/weeds/alien_weeds = O

View File

@@ -42,9 +42,9 @@
icon_state = "chocolateglass"
name = "Glass of chocolate"
desc = "Tasty"
if("lemon")
if("lemonjuice")
icon_state = "lemonglass"
name = "Glass of lemon"
name = "Glass of lemonjuice"
desc = "Sour..."
if("cola")
icon_state = "glass_brown"

View File

@@ -49,12 +49,20 @@
D.icon += mix_color_from_reagents(D.reagents.reagent_list)
var/turf/A_turf = get_turf(A)
spawn(0)
for(var/i=0, i<3, i++)
step_towards(D,A)
D.reagents.reaction(get_turf(D))
for(var/atom/T in get_turf(D))
D.reagents.reaction(T)
// When spraying against the wall, also react with the wall, but
// not its contents.
if(get_dist(D, A_turf) == 1 && A_turf.density)
D.reagents.reaction(A_turf)
sleep(2)
sleep(3)
del(D)