Merge remote-tracking branch 'upstream/master' into dev

Signed-off-by: Mloc-Argent <colmohici@gmail.com>

Conflicts:
	code/game/machinery/computer/card.dm
	code/modules/mob/living/say.dm
This commit is contained in:
Mloc-Argent
2014-06-20 22:02:40 +01:00
41 changed files with 1524 additions and 1577 deletions
-1
View File
@@ -138,7 +138,6 @@
#include "code\datums\diseases\advance\symptoms\weight.dm"
#include "code\datums\helper_datums\construction_datum.dm"
#include "code\datums\helper_datums\events.dm"
#include "code\datums\helper_datums\getrev.dm"
#include "code\datums\helper_datums\global_iterator.dm"
#include "code\datums\helper_datums\teleport.dm"
#include "code\datums\helper_datums\topic_input.dm"
+2 -1
View File
@@ -259,7 +259,8 @@
if(4)
if(pa.Find("left"))
holder.throw_atom = object
if(istype(object, /atom/movable))
holder.throw_atom = object
if(pa.Find("right"))
if(holder.throw_atom)
holder.throw_atom.throw_at(object, 10, 1)
+4 -2
View File
@@ -16,9 +16,11 @@
Note that this proc can be overridden, and is in the case of screen objects.
*/
/atom/Click(location,control,params)
usr.ClickOn(src, params)
if(src)
usr.ClickOn(src, params)
/atom/DblClick(location,control,params)
usr.DblClickOn(src,params)
if(src)
usr.DblClickOn(src,params)
/*
Standard mob ClickOn()
+5
View File
@@ -146,6 +146,11 @@ proc/get_id_photo(var/mob/living/carbon/human/H)
if(E.status & ORGAN_ROBOT)
temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
preview_icon.Blend(temp, ICON_OVERLAY)
//Tail
if(H.species.tail && H.species.flags & HAS_TAIL)
temp = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[H.species.tail]_s")
preview_icon.Blend(temp, ICON_OVERLAY)
// Skin tone
if(H.species.flags & HAS_SKIN_TONE)
-96
View File
@@ -1,96 +0,0 @@
/*
* This datum gets revision info from local svn 'entries' file
* Path to the directory containing it should be in 'config/svndir.txt' file
*
*/
var/global/datum/getrev/revdata = new("config/svndir.txt")
//Oh yeah, I'm an OOP fag, lalala
/datum/getrev
var/revision
var/commiter
var/svndirpath
var/revhref
proc/abort()
spawn()
del src
New(filename)
..()
var/list/Lines = file2list(filename)
if(!Lines.len) return abort()
for(var/t in Lines)
if(!t) continue
t = trim(t)
if (length(t) == 0)
continue
else if (copytext(t, 1, 2) == "#")
continue
var/pos = findtext(t, " ")
var/name = null
var/value = null
if (pos)
name = lowertext(copytext(t, 1, pos))
value = copytext(t, pos + 1)
else
name = lowertext(t)
if(!name)
continue
switch(name)
if("svndir")
svndirpath = value
if("revhref")
revhref = value
if(svndirpath && fexists(svndirpath) && fexists("[svndirpath]/entries") && isfile(file("[svndirpath]/entries")))
var/list/filelist = file2list("[svndirpath]/entries")
var/s_archive = "" //Stores the previous line so the revision owner can be assigned.
//This thing doesn't count blank lines, so doing filelist[4] isn't working.
for(var/s in filelist)
if(!commiter)
if(s == "has-props")//The line before this is the committer.
commiter = s_archive
if(!revision)
var/n = text2num(s)
if(isnum(n))
if(n > 5000 && n < 99999) //Do you think we'll still be up and running at r100000? :) ~Errorage
revision = s
if(revision && commiter)
break
s_archive = s
if(!revision)
abort()
log_misc("Revision info loaded succesfully")
return
return abort()
proc/getRevisionText()
var/output
if(revhref)
output = {"<a href="[revhref][revision]">[revision]</a>"}
else
output = revision
return output
proc/showInfo()
return {"<html>
<head>
</head>
<body>
<p><b>Server Revision:</b> [getRevisionText()]<br/>
<b>Author:</b> [commiter]</p>
</body>
<html>"}
client/verb/showrevinfo()
set category = "OOC"
set name = "Show Server Revision"
var/output = "Sorry, the revision info is unavailable."
output = file2text("/home/bay12/live/data/gitcommit")
output += "Current Infomational Settings: <br>"
output += "Protect Authority Roles From Traitor: [config.protect_roles_from_antagonist]<br>"
usr << browse(output,"window=revdata");
return
@@ -188,7 +188,8 @@
//message_admins("The probability of a new traitor is [traitor_prob]%")
if(prob(traitor_prob))
message_admins("New traitor roll passed. Making a new Traitor.")
forge_traitor_objectives(character.mind)
if (!config.objectives_disabled)
forge_traitor_objectives(character.mind)
equip_traitor(character)
traitors += character.mind
character << "\red <B>You are the traitor.</B>"
@@ -88,6 +88,9 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
//No escape alone because changelings aren't suited for it and it'd probably just lead to rampant robusting
//If it seems like they'd be able to do it in play, add a 10% chance to have to escape alone
if (config.objectives_disabled)
return
var/datum/objective/absorb/absorb_objective = new
absorb_objective.owner = changeling
absorb_objective.gen_amount_goal(2, 3)
+13 -10
View File
@@ -1367,17 +1367,20 @@ It is possible to destroy the net by the occupant or someone else.
playsound(M.loc, 'sound/effects/sparks4.ogg', 50, 1)
anim(M.loc,M,'icons/mob/mob.dmi',,"phaseout",,M.dir)
M.loc = pick(holdingfacility)//Throw mob in to the holding facility.
M << "\red You appear in a strange place!"
if(holdingfacility.len)
M.loc = pick(holdingfacility)//Throw mob in to the holding facility.
spawn(0)
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, M.loc)
spark_system.start()
playsound(M.loc, 'sound/effects/phasein.ogg', 25, 1)
playsound(M.loc, 'sound/effects/sparks2.ogg', 50, 1)
anim(M.loc,M,'icons/mob/mob.dmi',,"phasein",,M.dir)
del(src)//Wait for everything to finish, delete the net. Else it will stop everything once net is deleted, including the spawn(0).
else
M.loc = null
spawn(0)
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, M.loc)
spark_system.start()
playsound(M.loc, 'sound/effects/phasein.ogg', 25, 1)
playsound(M.loc, 'sound/effects/sparks2.ogg', 50, 1)
anim(M.loc,M,'icons/mob/mob.dmi',,"phasein",,M.dir)
del(src)//Wait for everything to finish, delete the net. Else it will stop everything once net is deleted, including the spawn(0).
M << "\red You appear in a strange place!"
for(var/mob/O in viewers(src, 3))
O.show_message(text("[] vanished!", M), 1, text("You hear sparks flying!"), 2)
-2
View File
@@ -112,8 +112,6 @@ Implants;
feedback_set_details("round_start","[time2text(world.realtime)]")
if(ticker && ticker.mode)
feedback_set_details("game_mode","[ticker.mode]")
if(revdata)
feedback_set_details("revision","[revdata.revision]")
feedback_set_details("server_ip","[world.internet_address]:[world.port]")
return 1
+3
View File
@@ -108,6 +108,9 @@
/datum/game_mode/proc/forge_meme_objectives(var/datum/mind/meme, var/datum/mind/first_host)
if (config.objectives_disabled)
return
// meme always needs to attune X hosts
var/datum/objective/meme_attune/attune_objective = new
attune_objective.owner = meme
+2
View File
@@ -85,6 +85,8 @@
return 1
/datum/game_mode/ninja/proc/forge_ninja_objectives(var/datum/mind/ninja)
if (config.objectives_disabled)
return
var/objective_list = list(1,2,3,4,5)
for(var/i=rand(2,4),i>0,i--)
+2
View File
@@ -186,6 +186,8 @@
/datum/game_mode/proc/forge_syndicate_objectives(var/datum/mind/syndicate)
if (config.objectives_disabled)
return
var/datum/objective/nuclear/syndobj = new
syndobj.owner = syndicate
syndicate.objectives += syndobj
+3
View File
@@ -78,6 +78,9 @@
/datum/game_mode/proc/forge_traitor_objectives(var/datum/mind/traitor)
if (config.objectives_disabled)
return
if(istype(traitor.current, /mob/living/silicon))
var/datum/objective/assassinate/kill_objective = new
kill_objective.owner = traitor
+3
View File
@@ -64,6 +64,9 @@
/datum/game_mode/proc/forge_wizard_objectives(var/datum/mind/wizard)
if (config.objectives_disabled)
return
switch(rand(1,100))
if(1 to 30)
+1 -1
View File
@@ -26,7 +26,7 @@
********************/
/obj/machinery/microwave/New()
//..() //do not need this
..()
reagents = new/datum/reagents(100)
reagents.my_atom = src
if (!available_recipes)
+2 -2
View File
@@ -92,7 +92,7 @@ Growing it to term with nothing injected will grab a ghost from the observers. *
/obj/item/seeds/replicapod/proc/request_player()
for(var/mob/dead/observer/O in player_list)
if(jobban_isbanned(O, "Dionaea"))
if(jobban_isbanned(O, "Dionaea") || (!is_alien_whitelisted(src, "Diona") && config.usealienwhitelist))
continue
if(O.client)
if(O.client.prefs.be_special & BE_PLANT)
@@ -101,7 +101,7 @@ Growing it to term with nothing injected will grab a ghost from the observers. *
/obj/item/seeds/replicapod/proc/question(var/client/C)
spawn(0)
if(!C) return
var/response = alert(C, "Someone is harvesting a replica pod. Would you like to play as a Dionaea?", "Replica pod harvest", "Yes", "No", "Never for this round.")
var/response = alert(C, "Someone is harvesting a diona pod. Would you like to play as a diona?", "Dionaea harvest", "Yes", "No", "Never for this round.")
if(!C || ckey)
return
if(response == "Yes")
@@ -27,24 +27,6 @@ would spawn and follow the beaker, even if it is carried or thrown.
reagents.delete()
return
/obj/effect/effect/water/New()
..()
//var/turf/T = src.loc
//if (istype(T, /turf))
// T.firelevel = 0 //TODO: FIX
spawn( 70 )
delete()
return
return
/obj/effect/effect/water/Del()
//var/turf/T = src.loc
//if (istype(T, /turf))
// T.firelevel = 0 //TODO: FIX
..()
return
/obj/effect/effect/water/Move(turf/newloc)
//var/turf/T = src.loc
//if (istype(T, /turf))
@@ -127,6 +127,7 @@
W.reagents.reaction(atm)
if(W.loc == my_target) break
sleep(2)
W.delete()
if((istype(usr.loc, /turf/space)) || (usr.lastarea.has_gravity == 0))
user.inertia_dir = get_dir(target, user)
@@ -7,19 +7,21 @@
prime()
..()
for(var/obj/structure/closet/L in view(get_turf(src), null))
for(var/obj/structure/closet/L in hear(7, get_turf(src)))
if(locate(/mob/living/carbon/, L))
for(var/mob/living/carbon/M in L)
bang(get_turf(src), M)
for(var/mob/living/carbon/M in viewers(get_turf(src), null))
for(var/mob/living/carbon/M in hear(7, get_turf(src)))
bang(get_turf(src), M)
for(var/obj/effect/blob/B in view(8,get_turf(src))) //Blob damage here
for(var/obj/effect/blob/B in hear(8,get_turf(src))) //Blob damage here
var/damage = round(30/(get_dist(B,get_turf(src))+1))
B.health -= damage
B.update_icon()
new/obj/effect/effect/smoke/flashbang(src.loc)
del(src)
return
@@ -30,7 +32,7 @@
S.icon_state = "shield0"
M << "\red <B>BANG</B>"
playsound(src.loc, 'sound/effects/bang.ogg', 25, 1)
playsound(src.loc, 'sound/effects/bang.ogg', 50, 1, 5)
//Checking for protections
var/eye_safety = 0
@@ -98,6 +100,15 @@
M << "\red Your ears start to ring!"
M.update_icons()
/obj/effect/effect/smoke/flashbang
name = "illumination"
time_to_live = 10
opacity = 0
icon_state = "sparks"
/obj/effect/effect/smoke/flashbang/New()
..()
SetLuminosity(15)
/obj/item/weapon/grenade/flashbang/clusterbang//Created by Polymorph, fixed by Sieve
desc = "Use of this weapon may constiute a war crime in your area, consult your local captain."
@@ -48,6 +48,8 @@
/obj/item/weapon/storage/box/gloves
name = "box of latex gloves"
desc = "Contains white gloves."
icon_state = "latex"
New()
..()
new /obj/item/clothing/gloves/latex(src)
+1 -1
View File
@@ -114,7 +114,7 @@
//play the recieving admin the adminhelp sound (if they have them enabled)
//non-admins shouldn't be able to disable this
if(C.prefs.toggles & SOUND_ADMINHELP)
if(C.prefs && C.prefs.toggles & SOUND_ADMINHELP)
C << 'sound/effects/adminhelp.ogg'
log_admin("PM: [key_name(src)]->[key_name(C)]: [msg]")
+10 -5
View File
@@ -4,12 +4,15 @@
//for multiple items just add mutliple entries, unless i change it to be a listlistlist
//yes, it has to be an item, you can't pick up nonitems
/proc/EquipCustomItems(mob/living/carbon/human/M)
// load lines
var/file = file2text("config/custom_items.txt")
var/lines = text2list(file, "\n")
/var/list/custom_items = list()
for(var/line in lines)
/hook/startup/proc/loadCustomItems()
var/custom_items_file = file2text("config/custom_items.txt")
custom_items = text2list(custom_items_file, "\n")
return 1
/proc/EquipCustomItems(mob/living/carbon/human/M)
for(var/line in custom_items)
// split & clean up
var/list/Entry = text2list(line, ":")
for(var/i = 1 to Entry.len)
@@ -24,6 +27,8 @@
var/ok = 0 // 1 if the item was placed successfully
P = trim(P)
var/path = text2path(P)
if(!path) continue
var/obj/item/Item = new path()
if(istype(Item,/obj/item/weapon/card/id))
//id card needs to replace the original ID
+4 -4
View File
@@ -36,19 +36,19 @@
if((istype(get_step(src, NORTH), /turf/simulated/floor)) || (istype(get_step(src, NORTH), /turf/space)) || (istype(get_step(src, NORTH), /turf/simulated/shuttle/floor)))
T = get_step(src, NORTH)
if (T)
T.overlays += image('icons/turf/walls.dmi', "rock_side_s")
T.overlays += image('icons/turf/walls.dmi', "rock_side_s", layer=2)
if((istype(get_step(src, SOUTH), /turf/simulated/floor)) || (istype(get_step(src, SOUTH), /turf/space)) || (istype(get_step(src, SOUTH), /turf/simulated/shuttle/floor)))
T = get_step(src, SOUTH)
if (T)
T.overlays += image('icons/turf/walls.dmi', "rock_side_n", layer=6)
T.overlays += image('icons/turf/walls.dmi', "rock_side_n", layer=2)
if((istype(get_step(src, EAST), /turf/simulated/floor)) || (istype(get_step(src, EAST), /turf/space)) || (istype(get_step(src, EAST), /turf/simulated/shuttle/floor)))
T = get_step(src, EAST)
if (T)
T.overlays += image('icons/turf/walls.dmi', "rock_side_w", layer=6)
T.overlays += image('icons/turf/walls.dmi', "rock_side_w", layer=2)
if((istype(get_step(src, WEST), /turf/simulated/floor)) || (istype(get_step(src, WEST), /turf/space)) || (istype(get_step(src, WEST), /turf/simulated/shuttle/floor)))
T = get_step(src, WEST)
if (T)
T.overlays += image('icons/turf/walls.dmi', "rock_side_e", layer=6)
T.overlays += image('icons/turf/walls.dmi', "rock_side_e", layer=2)
ex_act(severity)
+4 -2
View File
@@ -252,11 +252,13 @@
/mob/living/carbon/proc/throw_mode_off()
src.in_throw_mode = 0
src.throw_icon.icon_state = "act_throw_off"
if(src.throw_icon) //in case we don't have the HUD and we use the hotkey
src.throw_icon.icon_state = "act_throw_off"
/mob/living/carbon/proc/throw_mode_on()
src.in_throw_mode = 1
src.throw_icon.icon_state = "act_throw_on"
if(src.throw_icon)
src.throw_icon.icon_state = "act_throw_on"
/mob/proc/throw_item(atom/target)
return
@@ -10,6 +10,8 @@
icon_state = "nymph1"
var/list/donors = list()
var/ready_evolve = 0
universal_understand = 0 // Dionaea do not need to speak to people
universal_speak = 0 // before becoming an adult. Use *chirp.
/mob/living/carbon/monkey/diona/attack_hand(mob/living/carbon/human/M as mob)
@@ -245,14 +247,11 @@
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
if(stat == 2)
return say_dead(message)
var/datum/language/speaking = null
if(length(message) >= 2)
var/channel_prefix = copytext(message, 1 ,3)
if(languages.len)
@@ -270,6 +269,4 @@
if(!message || stat)
return
..(message, speaking, verb, null, null, message_range, null)
+3 -2
View File
@@ -103,7 +103,7 @@ var/list/department_radio_keys = list(
var/obj/O = I
hearturfs += O.locs[1]
objects |= O
for(var/mob/M in player_list)
if(M.stat == DEAD && M.client && (M.client.prefs.toggles & CHAT_GHOSTEARS))
listening |= M
@@ -113,7 +113,8 @@ var/list/department_radio_keys = list(
for(var/obj/O in objects)
spawn(0)
O.hear_talk(src, message, verb, speaking)
if(O) //It's possible that it could be deleted in the meantime.
O.hear_talk(src, message, verb, speaking)
var/speech_bubble_test = say_test(message)
var/image/speech_bubble = image('icons/mob/talk.dmi',src,"h[speech_bubble_test]")
+11 -23
View File
@@ -250,13 +250,13 @@ var/list/ai_list = list()
for (var/area_name in alarmlist)
var/datum/alarm/alarm = alarmlist[area_name]
dat += "<NOBR>"
var/cameratext = ""
if (alarm.cameras)
for (var/obj/machinery/camera/I in alarm.cameras)
cameratext += text("[]<A HREF=?src=\ref[];switchcamera=\ref[]>[]</A>", (cameratext=="") ? "" : " | ", src, I, I.c_tag)
dat += text("-- [] ([])", alarm.area.name, (cameratext)? cameratext : "No Camera")
if (alarm.sources.len > 1)
dat += text(" - [] sources", alarm.sources.len)
dat += "</NOBR><BR>\n"
@@ -407,23 +407,11 @@ var/list/ai_list = list()
if (href_list["track"])
var/mob/target = locate(href_list["track"]) in mob_list
/*
var/mob/living/silicon/ai/A = locate(href_list["track2"]) in mob_list
if(A && target)
A.ai_actual_track(target)
*/
//Strip off any "(as Derplord)".
//If there's a way to do this via a var that doesn't give the AI extra info, please let me know.
var/seeking = target.name
var/index = findtext(seeking, "(as ")
if(index)
seeking = copytext(seeking, 1, index-1)
if(target && html_decode(href_list["trackname"]) == seeking)
if(target && (!istype(target, /mob/living/carbon/human) || html_decode(href_list["trackname"]) == target:get_face_name()))
ai_actual_track(target)
else
src << "\red System error. Cannot locate [html_decode(href_list["trackname"])]."
src << "\red System error. Cannot locate [html_decode(href_list["trackname"])]."
return
else if (href_list["faketrack"])
@@ -539,24 +527,24 @@ var/list/ai_list = list()
/mob/living/silicon/ai/triggerAlarm(var/class, area/A, list/cameralist, var/source)
if (stat == 2)
return 1
..()
var/cameratext = ""
for (var/obj/machinery/camera/C in cameralist)
cameratext += "[(cameratext == "")? "" : "|"]<A HREF=?src=\ref[src];switchcamera=\ref[C]>[C.c_tag]</A>"
queueAlarm("--- [class] alarm detected in [A.name]! ([(cameratext)? cameratext : "No Camera"])", class)
if (viewalerts) ai_alerts()
/mob/living/silicon/ai/cancelAlarm(var/class, area/A as area, var/source)
var/has_alarm = ..()
if (!has_alarm)
queueAlarm(text("--- [] alarm in [] has been cleared.", class, A.name), class, 0)
if (viewalerts) ai_alerts()
return has_alarm
/mob/living/silicon/ai/cancel_camera()
@@ -212,6 +212,11 @@ datum/preferences
preview_icon.Blend(temp, ICON_OVERLAY)
//Tail
if(current_species && (current_species.flags & HAS_TAIL))
var/icon/temp = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[current_species.tail]_s")
preview_icon.Blend(temp, ICON_OVERLAY)
// Skin color
if(current_species && (current_species.flags & HAS_SKIN_COLOR))
preview_icon.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
+22 -19
View File
@@ -239,28 +239,31 @@ This function completely restores a damaged organ to perfect condition.
for (var/datum/wound/W in wounds)
if (W.can_worsen(type, damage))
compatible_wounds += W
var/datum/wound/W = pick(compatible_wounds)
W.open_wound(damage)
if(prob(25))
//maybe have a separate message for BRUISE type damage?
owner.visible_message("\red The wound on [owner.name]'s [display_name] widens with a nasty ripping voice.",\
"\red The wound on your [display_name] widens with a nasty ripping voice.",\
"You hear a nasty ripping noise, as if flesh is being torn apart.")
return
if(compatible_wounds.len)
var/datum/wound/W = pick(compatible_wounds)
W.open_wound(damage)
if(prob(25))
//maybe have a separate message for BRUISE type damage?
owner.visible_message("\red The wound on [owner.name]'s [display_name] widens with a nasty ripping voice.",\
"\red The wound on your [display_name] widens with a nasty ripping voice.",\
"You hear a nasty ripping noise, as if flesh is being torn apart.")
return
//Creating wound
var/wound_type = get_wound_type(type, damage)
var/datum/wound/W = new wound_type(damage)
//Check whether we can add the wound to an existing wound
for(var/datum/wound/other in wounds)
if(other.can_merge(W))
other.merge_wound(W)
W = null // to signify that the wound was added
break
if(W)
wounds += W
if(wound_type)
var/datum/wound/W = new wound_type(damage)
//Check whether we can add the wound to an existing wound
for(var/datum/wound/other in wounds)
if(other.can_merge(W))
other.merge_wound(W)
W = null // to signify that the wound was added
break
if(W)
wounds += W
/datum/organ/external/proc/get_wound_type(var/type = CUT, var/damage)
//if you look a the names in the wound's stages list for each wound type you will see the logic behind these values
@@ -279,7 +282,7 @@ This function completely restores a damaged organ to perfect condition.
if (damage <= 15) return /datum/wound/burn/large
if (damage <= 30) return /datum/wound/burn/severe
if (damage <= 40) return /datum/wound/burn/deep
if (damage <= 50) return /datum/wound/burn/carbonised
return /datum/wound/burn/carbonised
/****************************************************
PROCESSING & UPDATING
@@ -293,6 +293,7 @@
var/max_pill_count = 20
/obj/machinery/chem_master/New()
..()
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
@@ -234,20 +234,8 @@
flush()
flushing = 1
flick("intake-closing", src)
var/deliveryCheck = 0
var/obj/structure/disposalholder/H = new() // virtual holder object which actually
// travels through the pipes.
for(var/obj/structure/bigDelivery/O in src)
deliveryCheck = 1
if(O.sortTag == 0)
O.sortTag = 1
for(var/obj/item/smallDelivery/O in src)
deliveryCheck = 1
if (O.sortTag == 0)
O.sortTag = 1
if(deliveryCheck == 0)
H.destinationTag = 1
air_contents = new() // new empty gas resv.
sleep(10)
+2
View File
@@ -8,6 +8,8 @@
can_infect = 1
blood_level = 1
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if (!hasorgans(target))
return 0
if (target_zone != "groin")
return 0
var/datum/organ/external/groin = target.get_organ("groin")
+8
View File
@@ -15,6 +15,8 @@
max_duration = 60
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if (!hasorgans(target))
return 0
var/datum/organ/external/affected = target.get_organ(target_zone)
return affected.open == 2 && affected.stage == 0
@@ -47,6 +49,8 @@
max_duration = 70
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if (!hasorgans(target))
return 0
var/datum/organ/external/affected = target.get_organ(target_zone)
return affected.name != "head" && affected.open == 2 && affected.stage == 1
@@ -84,6 +88,8 @@
max_duration = 70
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if (!hasorgans(target))
return 0
var/datum/organ/external/affected = target.get_organ(target_zone)
return affected.name == "head" && affected.open == 2 && affected.stage == 1
@@ -118,6 +124,8 @@
max_duration = 60
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if (!hasorgans(target))
return 0
var/datum/organ/external/affected = target.get_organ(target_zone)
return affected.open == 2 && affected.stage == 2
+18 -14
View File
@@ -35,8 +35,9 @@
max_duration = 110
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
return ..() && affected.open == 0 && target_zone != "mouth"
if(..())
var/datum/organ/external/affected = target.get_organ(target_zone)
return affected.open == 0 && target_zone != "mouth"
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
@@ -74,8 +75,9 @@
max_duration = 120
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
return ..() && affected.open == 0 && target_zone != "mouth"
if(..())
var/datum/organ/external/affected = target.get_organ(target_zone)
return affected.open == 0 && target_zone != "mouth"
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
@@ -114,10 +116,9 @@
max_duration = 110
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(isslime(target))
return 0
var/datum/organ/external/affected = target.get_organ(target_zone)
return ..() && affected.open == 0 && target_zone != "mouth"
if(..())
var/datum/organ/external/affected = target.get_organ(target_zone)
return affected.open == 0 && target_zone != "mouth"
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
@@ -153,8 +154,9 @@
max_duration = 60
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
return ..() && affected.open && (affected.status & ORGAN_BLEEDING)
if(..())
var/datum/organ/external/affected = target.get_organ(target_zone)
return affected.open && (affected.status & ORGAN_BLEEDING)
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
@@ -187,8 +189,9 @@
max_duration = 40
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
return ..() && affected.open == 1 && !(affected.status & ORGAN_BLEEDING)
if(..())
var/datum/organ/external/affected = target.get_organ(target_zone)
return affected.open == 1 && !(affected.status & ORGAN_BLEEDING)
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
@@ -242,8 +245,9 @@
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
return ..() && affected.open && target_zone != "mouth"
if(..())
var/datum/organ/external/affected = target.get_organ(target_zone)
return affected.open && target_zone != "mouth"
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
+15 -10
View File
@@ -28,8 +28,9 @@
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
return ..() && !(affected.status & ORGAN_CUT_AWAY)
if(..())
var/datum/organ/external/affected = target.get_organ(target_zone)
return !(affected.status & ORGAN_CUT_AWAY)
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts peeling back tattered flesh where [target]'s head used to be with \the [tool].", \
@@ -61,8 +62,9 @@
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
return ..() && affected.status & ORGAN_CUT_AWAY && affected.open < 3 && !(affected.status & ORGAN_ATTACHABLE)
if(..())
var/datum/organ/external/affected = target.get_organ(target_zone)
return affected.status & ORGAN_CUT_AWAY && affected.open < 3 && !(affected.status & ORGAN_ATTACHABLE)
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
@@ -94,8 +96,9 @@
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
return ..() && affected.open == 3
if(..())
var/datum/organ/external/affected = target.get_organ(target_zone)
return affected.open == 3
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] is stapling and suturing flesh into place in [target]'s esophagal and vocal region with \the [tool].", \
@@ -128,8 +131,9 @@
max_duration = 70
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
return ..() && affected.open == 4
if(..())
var/datum/organ/external/affected = target.get_organ(target_zone)
return affected.open == 4
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts adjusting area around [target]'s neck with \the [tool].", \
@@ -162,8 +166,9 @@
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/head = target.get_organ(target_zone)
return ..() && head.status & ORGAN_ATTACHABLE
if(..())
var/datum/organ/external/head = target.get_organ(target_zone)
return head.status & ORGAN_ATTACHABLE
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts attaching [tool] to [target]'s reshaped neck.", \
+12 -10
View File
@@ -7,6 +7,8 @@
/datum/surgery_step/cavity
priority = 1
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(!hasorgans(target))
return 0
var/datum/organ/external/affected = target.get_organ(target_zone)
return affected.open == 2 && !(affected.status & ORGAN_BLEEDING) && (target_zone != "chest" || target.op_stage.ribcage == 2)
@@ -41,8 +43,9 @@
max_duration = 80
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
return ..() && !affected.cavity && !affected.hidden
if(..())
var/datum/organ/external/affected = target.get_organ(target_zone)
return !affected.cavity && !affected.hidden
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
@@ -76,8 +79,9 @@
max_duration = 80
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
return ..() && affected.cavity
if(..())
var/datum/organ/external/affected = target.get_organ(target_zone)
return affected.cavity
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
@@ -106,11 +110,9 @@
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(isslime(target))
return 0
var/datum/organ/external/affected = target.get_organ(target_zone)
var/can_fit = !affected.hidden && affected.cavity && tool.w_class <= get_max_wclass(affected)
return ..() && can_fit
if(..())
var/datum/organ/external/affected = target.get_organ(target_zone)
return !affected.hidden && affected.cavity && tool.w_class <= get_max_wclass(affected)
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
@@ -185,7 +187,7 @@
affected.implants -= obj
target.hud_updateflag |= 1 << IMPLOYAL_HUD
//Handle possessive brain borers.
if(istype(obj,/mob/living/simple_animal/borer))
var/mob/living/simple_animal/borer/worm = obj
+3
View File
@@ -17,6 +17,9 @@
max_duration = 90
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(!hasorgans(target))
return 0
var/datum/organ/external/affected = target.get_organ(target_zone)
var/internal_bleeding = 0
+7 -1
View File
@@ -19,7 +19,7 @@
max_duration = 70
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if (!istype(target))
if (!hasorgans(target))
return
var/datum/organ/external/affected = target.get_organ(target_zone)
return ..() && target.op_stage.ribcage == 0 && affected.open >= 2
@@ -197,6 +197,9 @@
max_duration = 90
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(!hasorgans(target))
return 0
var/is_chest_organ_damaged = 0
var/datum/organ/external/chest/chest = target.get_organ("chest")
for(var/datum/organ/internal/I in chest.internal_organs) if(I.damage > 0)
@@ -278,6 +281,9 @@
max_duration = 90
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(!hasorgans(target))
return 0
var/is_chest_organ_damaged = 0
var/datum/organ/internal/heart/heart = target.internal_organs["heart"]
var/datum/organ/external/chest/chest = target.get_organ("chest")
+16 -12
View File
@@ -30,8 +30,9 @@
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
return ..() && !(affected.status & ORGAN_CUT_AWAY)
if(..())
var/datum/organ/external/affected = target.get_organ(target_zone)
return !(affected.status & ORGAN_CUT_AWAY)
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
@@ -64,8 +65,9 @@
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
return ..() && affected.status & ORGAN_CUT_AWAY && affected.open < 3 && !(affected.status & ORGAN_ATTACHABLE)
if(..())
var/datum/organ/external/affected = target.get_organ(target_zone)
return affected.status & ORGAN_CUT_AWAY && affected.open < 3 && !(affected.status & ORGAN_ATTACHABLE)
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
@@ -100,8 +102,9 @@
max_duration = 70
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
return ..() && affected.open == 3
if(..())
var/datum/organ/external/affected = target.get_organ(target_zone)
return affected.open == 3
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
@@ -134,12 +137,13 @@
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/robot_parts/p = tool
if (p.part)
if (!(target_zone in p.part))
return 0
var/datum/organ/external/affected = target.get_organ(target_zone)
return ..() && affected.status & ORGAN_ATTACHABLE
if(..())
var/obj/item/robot_parts/p = tool
if (p.part)
if (!(target_zone in p.part))
return 0
var/datum/organ/external/affected = target.get_organ(target_zone)
return affected.status & ORGAN_ATTACHABLE
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
+8 -9
View File
@@ -71,7 +71,7 @@ var/world_topic_spam_protect_time = world.timeofday
/world/Topic(T, addr, master, key)
diary << "TOPIC: \"[T]\", from:[addr], master:[master], key:[key][log_end]"
if (T == "ping")
var/x = 1
for (var/client/C)
@@ -108,7 +108,6 @@ var/world_topic_spam_protect_time = world.timeofday
n++
s["players"] = n
if(revdata) s["revision"] = revdata.revision
s["admins"] = admins
return list2params(s)
@@ -127,7 +126,7 @@ var/world_topic_spam_protect_time = world.timeofday
var/input[] = params2list(T)
if(input["key"] != config.comms_password)
if(world_topic_spam_protect_ip == addr && abs(world_topic_spam_protect_time - world.time) < 50)
spawn(50)
world_topic_spam_protect_time = world.time
return "Bad Key (Throttled)"
@@ -136,9 +135,9 @@ var/world_topic_spam_protect_time = world.timeofday
world_topic_spam_protect_ip = addr
return "Bad Key"
var/client/C
for(var/client/K in clients)
if(K.ckey == input["adminmsg"])
C = K
@@ -155,7 +154,7 @@ var/world_topic_spam_protect_time = world.timeofday
C << 'sound/effects/adminhelp.ogg'
C << message
for(var/client/A in admins)
if(A != C)
A << amessage
@@ -182,9 +181,9 @@ var/world_topic_spam_protect_time = world.timeofday
return "Bad Key"
return show_player_info_irc(input["notes"])
/world/Reboot(var/reason)
@@ -271,7 +270,7 @@ var/world_topic_spam_protect_time = world.timeofday
var/title = "Moderator"
if(config.mods_are_mentors) title = "Mentor"
var/rights = admin_ranks[title]
var/ckey = copytext(line, 1, length(line)+1)
var/datum/admins/D = new /datum/admins(title, rights, ckey)
D.associate(directory[ckey])
+1309 -1310
View File
File diff suppressed because it is too large Load Diff