Merge branch 'bleeding-edge-freeze' of https://github.com/Baystation12/Baystation12 into bleeding-edge-freeze

Conflicts:
	html/changelog.html

Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
Cael_Aislinn
2013-03-05 17:22:05 +10:00
31 changed files with 1091 additions and 69 deletions
+3 -2
View File
@@ -124,8 +124,9 @@
icon_state = "rig-medical"
name = "medical hardsuit"
item_state = "medical_hardsuit"
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/storage/firstaid,/obj/item/device/healthanalyzer,/obj/item/stack/medical,/obj/item/roller)
slowdown = 2.0
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/storage/firstaid,/obj/item/device/healthanalyzer,/obj/item/stack/medical)
//Security
/obj/item/clothing/head/helmet/space/rig/security
name = "security hardsuit helmet"
@@ -10,14 +10,13 @@
var/construction_time = 75
var/searching = 0
var/askDelay = 10 * 60 * 1
var/mob/living/carbon/brain/brainmob = null
req_access = list(access_robotics)
var/locked = 0
var/mob/living/carbon/brain/brainmob = null//The current occupant.
var/obj/mecha = null//This does not appear to be used outside of reference in mecha.dm.
attack_self(mob/user as mob)
if(!brainmob && searching == 0)
if(!brainmob.key && searching == 0)
//Start the process of searching for a new user.
user << "\blue You carefully locate the manual activation switch and start the positronic brain's boot process."
icon_state = "posibrain-searching"
@@ -37,7 +36,7 @@
spawn(0)
if(!C) return
var/response = alert(C, "Someone is requesting a personality for a positronic brain. Would you like to play as one?", "Positronic brain request", "Yes", "No", "Never for this round")
if(!C || brainmob) return //handle logouts that happen whilst the alert is waiting for a response, and responses issued after a brain has been located.
if(!C || brainmob.key) return //handle logouts that happen whilst the alert is waiting for a response, and responses issued after a brain has been located.
if(response == "Yes")
transfer_personality(C.mob)
else if (response == "Never for this round")
@@ -47,25 +46,10 @@
proc/transfer_personality(var/mob/candidate)
var/mob/living/carbon/brain/B = new(src)
src.searching = 0
src.brainmob = B
src.brainmob.mind = candidate.mind
src.brainmob.name = "[pick(list("PBU","HIU","SINA","ARMA","OSI"))]-[rand(100, 999)]"
src.brainmob.real_name = src.brainmob.name
src.name = "positronic brain ([src.brainmob.name])"
src.brainmob.loc = src
src.brainmob.container = src
src.brainmob.robot_talk_understand = 1
src.brainmob.stat = 0
src.brainmob.silent = 0
src.brainmob.brain_op_stage = 4.0
src.brainmob.key = candidate.key
dead_mob_list -= src.brainmob
living_mob_list += src.brainmob
src.name = "positronic brain ([src.brainmob.name])"
src.brainmob << "<b>You are a positronic brain, brought into existence on [station_name()].</b>"
src.brainmob << "<b>As a synthetic intelligence, you answer to all crewmembers, as well as the AI.</b>"
@@ -101,7 +85,7 @@
var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n[desc]\n"
msg += "<span class='warning'>"
if(src.brainmob)
if(src.brainmob.key)
switch(src.brainmob.stat)
if(CONSCIOUS)
if(!src.brainmob.client) msg += "It appears to be in stand-by mode.\n" //afk
@@ -124,4 +108,19 @@
brainmob.emp_damage += rand(10,20)
if(3)
brainmob.emp_damage += rand(0,10)
..()
/obj/item/device/posibrain/New()
src.brainmob = new(src)
src.brainmob.name = "[pick(list("PBU","HIU","SINA","ARMA","OSI"))]-[rand(100, 999)]"
src.brainmob.real_name = src.brainmob.name
src.brainmob.loc = src
src.brainmob.container = src
src.brainmob.robot_talk_understand = 1
src.brainmob.stat = 0
src.brainmob.silent = 0
src.brainmob.brain_op_stage = 4.0
dead_mob_list -= src.brainmob
..()
+12 -9
View File
@@ -38,6 +38,11 @@
organs_by_name["l_foot"] = new/datum/organ/external/l_foot(organs_by_name["l_leg"])
organs_by_name["r_foot"] = new/datum/organ/external/r_foot(organs_by_name["r_leg"])
new/datum/organ/internal/heart(src)
new/datum/organ/internal/lungs(src)
new/datum/organ/internal/liver(src)
new/datum/organ/internal/kidney(src)
// connect feet to legs and hands to arms
/* var/datum/organ/external/organ = organs_by_name["l_hand"]
@@ -899,26 +904,24 @@
H.brainmob.mind.transfer_to(src)
del(H)
var/datum/organ/external/chest/E = get_organ("chest")
if(E.ruptured_lungs == 1)
E.ruptured_lungs = 0
for(var/datum/organ/internal/I in internal_organs)
I.damage = 0
for (var/datum/disease/virus in viruses)
virus.cure()
..()
/mob/living/carbon/human/proc/is_lung_ruptured()
var/datum/organ/external/chest/E = get_organ("chest")
return E.ruptured_lungs
var/datum/organ/internal/lungs/L = internal_organs["lungs"]
return L.is_bruised()
/mob/living/carbon/human/proc/rupture_lung()
var/datum/organ/external/chest/E = get_organ("chest")
var/datum/organ/internal/lungs/L = internal_organs["lungs"]
if(E.ruptured_lungs == 0)
if(!L.is_bruised())
src.custom_pain("You feel a stabbing pain in your chest!", 1)
L.damage = L.min_bruised_damage
E.ruptured_lungs = 1
/*
/mob/living/carbon/human/verb/simulate()
set name = "sim"
@@ -155,6 +155,16 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
//At this point, we dun care which blood we are adding to, as long as they get more blood.
B.volume = B.volume + 0.1 // regenerate blood VERY slowly
// Damaged heart virtually reduces the blood volume, as the blood isn't
// being pumped properly anymore.
var/datum/organ/internal/heart/heart = internal_organs["heart"]
switch(heart.damage)
if(5 to 10)
blood_volume *= 0.8
if(11 to 20)
blood_volume *= 0.5
if(21 to INFINITY)
blood_volume *= 0.3
switch(blood_volume)
if(BLOOD_VOLUME_SAFE to 10000)
@@ -1044,6 +1054,22 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
var/datum/organ/O = pick(organs)
O.trace_chemicals[A.name] = 100
var/damaged_liver_process_accuracy = 10
if(life_tick % damaged_liver_process_accuracy == 0)
// Damaged liver means some chemicals are very dangerous
var/datum/organ/internal/liver/liver = internal_organs["liver"]
if(liver.damage >= liver.min_bruised_damage)
for(var/datum/reagent/R in src.reagents.reagent_list)
// Ethanol and all drinks are bad
if(istype(R, /datum/reagent/ethanol))
adjustToxLoss(0.1 * damaged_liver_process_accuracy)
// Can't cope with toxins at all
for(var/toxin in list("toxin", "plasma", "sacid", "pacid", "cyanide", "lexorin", "amatoxin", "chloralhydrate", "carpotoxin", "zombiepowder", "mindbreaker"))
if(src.reagents.has_reagent(toxin))
adjustToxLoss(0.3 * damaged_liver_process_accuracy)
updatehealth()
return //TODO: DEFERRED
+1 -1
View File
@@ -106,7 +106,7 @@
var/list/listening = hearers(1, src)
listening -= src
//listening += src
listening += src
var/list/heard = list()
for (var/mob/M in listening)
@@ -0,0 +1,325 @@
/mob/living/simple_animal/spiderbot
min_oxy = 0
max_tox = 0
max_co2 = 0
minbodytemp = 0
maxbodytemp = 500
var/obj/item/device/radio/borg/radio = null
var/mob/living/silicon/ai/connected_ai = null
var/obj/item/weapon/cell/cell = null
var/obj/machinery/camera/camera = null
var/obj/item/device/mmi/mmi = null
var/list/req_access = list(access_robotics) //Access needed to pop out the brain.
name = "Spider-bot"
desc = "A skittering robotic friend!"
icon = 'icons/mob/robots.dmi'
icon_state = "spiderbot-chassis"
icon_living = "spiderbot-chassis"
icon_dead = "spiderbot-smashed"
wander = 0
health = 10
maxHealth = 10
attacktext = "shocks"
attacktext = "shocks"
melee_damage_lower = 1
melee_damage_upper = 3
response_help = "pets"
response_disarm = "shoos"
response_harm = "stomps on"
var/obj/item/held_item = null //Storage for single item they can hold.
var/emagged = 0 //IS WE EXPLODEN?
var/syndie = 0 //IS WE SYNDICAT? (currently unused)
speed = -1 //Spiderbots gotta go fast.
//pass_flags = PASSTABLE //Maybe griefy?
small = 1
speak_emote = list("beeps","clicks","chirps")
/mob/living/simple_animal/spiderbot/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/device/mmi) || istype(O, /obj/item/device/posibrain))
var/obj/item/device/mmi/B = O
if(src.mmi) //There's already a brain in it.
user << "\red There's already a brain in [src]!"
return
if(!B.brainmob)
user << "\red Sticking an empty MMI into the frame would sort of defeat the purpose."
return
if(!B.brainmob.key)
var/ghost_can_reenter = 0
if(B.brainmob.mind)
for(var/mob/dead/observer/G in player_list)
if(G.can_reenter_corpse && G.mind == B.brainmob.mind)
ghost_can_reenter = 1
break
if(!ghost_can_reenter)
user << "<span class='notice'>[O] is completely unresponsive; there's no point.</span>"
return
if(B.brainmob.stat == DEAD)
user << "\red [O] is dead. Sticking it into the frame would sort of defeat the purpose."
return
if(jobban_isbanned(B.brainmob, "Cyborg"))
user << "\red [O] does not seem to fit."
return
user << "\blue You install [O] in [src]!"
user.drop_item()
src.mmi = O
src.transfer_personality(O)
O.loc = src
src.update_icon()
return 1
if (istype(O, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = O
if (WT.remove_fuel(0))
if(health < maxHealth)
health += pick(1,1,1,2,2,3)
if(health > maxHealth)
health = maxHealth
add_fingerprint(user)
for(var/mob/W in viewers(user, null))
W.show_message(text("\red [user] has spot-welded some of the damage to [src]!"), 1)
else
user << "\blue [src] is undamaged!"
else
user << "Need more welding fuel!"
return
else if(istype(O, /obj/item/weapon/card/id)||istype(O, /obj/item/device/pda))
if (!mmi)
user << "\red There's no reason to swipe your ID - the spiderbot has no brain to remove."
return 0
var/obj/item/weapon/card/id/id_card
if(istype(O, /obj/item/weapon/card/id))
id_card = O
else
var/obj/item/device/pda/pda = O
id_card = pda.id
if(access_robotics in id_card.access)
user << "\blue You swipe your access card and pop the brain out of [src]."
eject_brain()
if(held_item)
held_item.loc = src.loc
held_item = null
return 1
else
user << "\red You swipe your card, with no effect."
return 0
else if (istype(O, /obj/item/weapon/card/emag))
if (emagged)
user << "\red [src] is already overloaded - better run."
return 0
else
emagged = 1
user << "\blue You short out the security protocols and overload [src]'s cell, priming it to explode in a short time."
spawn(100) src << "\red Your cell seems to be outputting a lot of power..."
spawn(200) src << "\red Internal heat sensors are spiking! Something is badly wrong with your cell!"
spawn(300) src.explode()
else
if(O.force)
var/damage = O.force
if (O.damtype == HALLOSS)
damage = 0
adjustBruteLoss(damage)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red \b [src] has been attacked with the [O] by [user]. ")
else
usr << "\red This weapon is ineffective, it does no damage."
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red [user] gently taps [src] with the [O]. ")
/mob/living/simple_animal/spiderbot/proc/transfer_personality(var/obj/item/device/mmi/M as obj)
src.mind = M.brainmob.mind
src.mind.key = M.brainmob.key
src.name = "Spider-bot ([M.brainmob.name])"
/mob/living/simple_animal/spiderbot/proc/explode() //When emagged.
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red [src] makes an odd warbling noise, fizzles, and explodes.")
explosion(get_turf(loc), -1, -1, 3, 5)
eject_brain()
Die()
/mob/living/simple_animal/spiderbot/proc/update_icon()
if(mmi)
if (istype(mmi,/obj/item/device/mmi))
icon_state = "spiderbot-chassis-mmi"
icon_living = "spiderbot-chassis-mmi"
else
icon_state = "spiderbot-chassis-posi"
icon_living = "spiderbot-chassis-posi"
else
icon_state = "spiderbot-chassis"
icon_living = "spiderbot-chassis"
/mob/living/simple_animal/spiderbot/proc/eject_brain()
if(mmi)
var/turf/T = get_turf(loc)
if(T)
mmi.loc = T
if(mind) mind.transfer_to(mmi.brainmob)
mmi = null
src.name = "Spider-bot"
update_icon()
/mob/living/simple_animal/spiderbot/Del()
eject_brain()
..()
/mob/living/simple_animal/spiderbot/New()
radio = new /obj/item/device/radio/borg(src)
camera = new /obj/machinery/camera(src)
camera.c_tag = "Spiderbot-[real_name]"
camera.network = list("SS13")
..()
/mob/living/simple_animal/spiderbot/Die()
living_mob_list -= src
dead_mob_list += src
if(camera)
camera.status = 0
robogibs(src.loc, viruses)
src.Del()
return
//copy paste from alien/larva, if that func is updated please update this one also
/mob/living/simple_animal/spiderbot/verb/ventcrawl()
set name = "Crawl through Vent"
set desc = "Enter an air vent and crawl through the pipe system."
set category = "Spiderbot"
// if(!istype(V,/obj/machinery/atmoalter/siphs/fullairsiphon/air_vent))
// return
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
var/welded = 0
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
if(!v.welded)
vent_found = v
break
else
welded = 1
if(vent_found)
if(vent_found.network&&vent_found.network.normal_members.len)
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in vent_found.network.normal_members)
if(temp_vent.loc == loc)
continue
vents.Add(temp_vent)
var/list/choices = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/vent in vents)
if(vent.loc.z != loc.z)
continue
var/atom/a = get_turf(vent)
choices.Add(a.loc)
var/turf/startloc = loc
var/obj/selection = input("Select a destination.", "Duct System") in choices
var/selection_position = choices.Find(selection)
if(loc==startloc)
var/obj/target_vent = vents[selection_position]
if(target_vent)
loc = target_vent.loc
else
src << "\blue You need to remain still while entering a vent."
else
src << "\blue This vent is not connected to anything."
else if(welded)
src << "\red That vent is welded."
else
src << "\blue You must be standing on or beside an air vent to enter it."
return
//copy paste from alien/larva, if that func is updated please update this one alsoghost
/mob/living/simple_animal/spiderbot/verb/hide()
set name = "Hide"
set desc = "Allows to hide beneath tables or certain items. Toggled on or off."
set category = "Spiderbot"
if (layer != TURF_LAYER+0.2)
layer = TURF_LAYER+0.2
src << text("\blue You are now hiding.")
else
layer = MOB_LAYER
src << text("\blue You have stopped hiding.")
//Cannibalized from the parrot mob. ~Zuhayr
/mob/living/simple_animal/spiderbot/verb/drop_held_item()
set name = "Drop held item"
set category = "Spiderbot"
set desc = "Drop the item you're holding."
if(stat)
return
if(!held_item)
usr << "\red You have nothing to drop!"
return 0
if(istype(held_item, /obj/item/weapon/grenade))
visible_message("\red [src] launches the [held_item]!", "\red You launch the [held_item]!", "You hear a skittering noise and a thump!")
var/obj/item/weapon/grenade/G = held_item
G.loc = src.loc
G.prime()
held_item = null
return 1
visible_message("\blue [src] drops the [held_item]!", "\blue You drop the [held_item]!", "You hear a skittering noise and a soft thump.")
held_item.loc = src.loc
held_item = null
return 1
return
/mob/living/simple_animal/spiderbot/verb/get_item()
set name = "Pick up item"
set category = "Spiderbot"
set desc = "Allows you to take a nearby small item."
if(stat)
return -1
if(held_item)
src << "\red You are already holding the [held_item]"
return 1
var/list/items = list()
for(var/obj/item/I in view(1,src))
if(I.loc != src && I.w_class <= 2)
items.Add(I)
var/obj/selection = input("Select an item.", "Pickup") in items
if(selection)
held_item = selection
selection.loc = src
visible_message("\blue [src] scoops up the [held_item]!", "\blue You grab the [held_item]!", "You hear a skittering noise and a clink.")
return held_item
src << "\red There is nothing of interest to take."
return 0
+8
View File
@@ -127,6 +127,14 @@
/obj/item/device/camera/attack(mob/living/carbon/human/M as mob, mob/user as mob)
return
/obj/item/device/camera/attack_self(mob/user as mob)
on = !on
if(on)
src.icon_state = "camera"
else
src.icon_state = "camera_off"
user << "You switch the camera [on ? "on" : "off"]."
return
/obj/item/device/camera/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/device/camera_film))
+1 -1
View File
@@ -37,8 +37,8 @@
if(isnull(AC) || !istype(AC))
return 0
AC.loc = get_turf(src) //Eject casing onto ground.
AC.desc += " This one is spent." //descriptions are magic
if(AC.BB)
AC.desc += " This one is spent." //descriptions are magic - only when there's a projectile in the casing
in_chamber = AC.BB //Load projectile into chamber.
AC.BB.loc = src //Set projectile loc to gun.
return 1
+50 -10
View File
@@ -109,7 +109,7 @@
affected.fracture()
if (prob(40))
user.visible_message("\red Rib pierces the lung!")
affected.ruptured_lungs = 1
target.rupture_lung()
/datum/surgery_step/ribcage/mend_ribcage
required_tool = /obj/item/weapon/bonegel
@@ -168,9 +168,9 @@
//////////////////////////////////////////////////////////////////
// LUNG SURGERY //
// CHEST INTERNAL ORGAN SURGERY //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/ribcage/fix_lungs
/datum/surgery_step/ribcage/fix_chest_internal
required_tool = /obj/item/weapon/scalpel
allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
@@ -178,19 +178,59 @@
max_duration = 90
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.is_lung_ruptured() && target.op_stage.ribcage == 2
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)
is_chest_organ_damaged = 1
break
return ..() && is_chest_organ_damaged && target.op_stage.ribcage == 2
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts mending the rupture in [target]'s lungs with \the [tool].", \
"You start mending the rupture in [target]'s lungs with \the [tool]." )
var/datum/organ/internal/heart/heart = target.internal_organs["heart"]
var/datum/organ/internal/lungs/lungs = target.internal_organs["lungs"]
var/datum/organ/internal/liver/liver = target.internal_organs["liver"]
var/datum/organ/internal/liver/kidney = target.internal_organs["kidney"]
if(lungs.damage > 0)
user.visible_message("[user] starts mending the rupture in [target]'s lungs with \the [tool].", \
"You start mending the rupture in [target]'s lungs with \the [tool]." )
if(heart.damage > 0)
user.visible_message("[user] starts mending the bruises on [target]'s heart with \the [tool].", \
"You start mending the bruises on [target]'s heart with \the [tool]." )
if(liver.damage > 0)
user.visible_message("[user] starts mending the bruises on [target]'s liver with \the [tool].", \
"You start mending the bruises on [target]'s liver with \the [tool]." )
if(kidney.damage > 0)
user.visible_message("[user] starts mending the bruises on [target]'s kidney with \the [tool].", \
"You start mending the bruises on [target]'s kidney with \the [tool]." )
target.custom_pain("The pain in your chest is living hell!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/chest/affected = target.get_organ("chest")
user.visible_message("\blue [user] mends the rupture in [target]'s lungs with \the [tool].", \
"\blue You mend the rupture in [target]'s lungs with \the [tool]." )
affected.ruptured_lungs = 0
var/datum/organ/internal/heart/heart = target.internal_organs["heart"]
var/datum/organ/internal/lungs/lungs = target.internal_organs["lungs"]
var/datum/organ/internal/liver/liver = target.internal_organs["liver"]
var/datum/organ/internal/liver/kidney = target.internal_organs["kidney"]
if(lungs.damage > 0)
user.visible_message("\blue [user] mends the rupture in [target]'s lungs with \the [tool].", \
"\blue You mend the rupture in [target]'s lungs with \the [tool]." )
lungs.damage = 0
if(heart.damage > 0)
user.visible_message("\blue [user] treats the bruises on [target]'s heart with \the [tool].", \
"\blue You treats the bruises on [target]'s heart with \the [tool]." )
heart.damage = 0
if(liver.damage > 0)
user.visible_message("\blue [user] treats the bruises on [target]'s liver with \the [tool].", \
"\blue You treats the bruises on [target]'s liver with \the [tool]." )
liver.damage = 0
if(kidney.damage > 0)
user.visible_message("\blue [user] treats the bruises on [target]'s kidney with \the [tool].", \
"\blue You treats the bruises on [target]'s kidney with \the [tool]." )
kidney.damage = 0
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/chest/affected = target.get_organ("chest")