Merge pull request #9314 from PsiOmegaDelta/dev

Dev
This commit is contained in:
PsiOmegaDelta
2015-05-16 22:53:46 +02:00
11 changed files with 152 additions and 107 deletions
+1 -1
View File
@@ -169,7 +169,7 @@
switch(grown_seed.get_trait(TRAIT_CARNIVOROUS))
if(1)
dat += "<br>It is carniovorous and will eat tray pests for sustenance."
dat += "<br>It is carnivorous and will eat tray pests for sustenance."
if(2)
dat += "<br>It is carnivorous and poses a significant threat to living things around it."
+10 -2
View File
@@ -35,6 +35,7 @@
var/locked = 0
var/mob/living/carbon/brain/brainmob = null//The current occupant.
var/obj/item/organ/brain/brainobj = null //The current brain organ.
var/obj/mecha = null//This does not appear to be used outside of reference in mecha.dm.
attackby(var/obj/item/O as obj, var/mob/user as mob)
@@ -60,7 +61,8 @@
living_mob_list += brainmob
user.drop_item()
qdel(O)
brainobj = O
brainobj.loc = src
name = "Man-Machine Interface: [brainmob.real_name]"
icon_state = "mmi_full"
@@ -91,7 +93,13 @@
user << "\red You upend the MMI, but the brain is clamped into place."
else
user << "\blue You upend the MMI, spilling the brain onto the floor."
var/obj/item/organ/brain/brain = new(user.loc)
var/obj/item/organ/brain/brain
if (brainobj) //Pull brain organ out of MMI.
brainobj.loc = user.loc
brain = brainobj
brainobj = null
else //Or make a new one if empty.
brain = new(user.loc)
brainmob.container = null//Reset brainmob mmi var.
brainmob.loc = brain//Throw mob into brain.
living_mob_list -= brainmob//Get outta here
+6 -5
View File
@@ -52,12 +52,13 @@
/mob/visible_message(var/message, var/self_message, var/blind_message)
for(var/mob/M in viewers(src))
if(M.see_invisible < invisibility)
continue // Cannot view the invisible
var/msg = message
if(self_message && M==src)
msg = self_message
M.show_message( msg, 1, blind_message, 2)
M.show_message(self_message, 1, blind_message, 2)
else if(M.see_invisible < invisibility) // Cannot view the invisible, but you can hear it.
if(blind_message)
M.show_message(blind_message, 2)
else
M.show_message(message, 1, blind_message, 2)
// Show a message to all mobs in sight of this atom
// Use for objects performing visible actions
+1 -1
View File
@@ -135,7 +135,7 @@
/obj/item/ammo_magazine/examine(mob/user)
..()
user << "There [(stored_ammo.len > 1)? "are" : "is"] [stored_ammo.len] round\s left!"
user << "There [(stored_ammo.len == 1)? "is" : "are"] [stored_ammo.len] round\s left!"
//magazine icon state caching
/var/global/list/magazine_icondata_keys = list()
@@ -68,14 +68,14 @@
/obj/item/weapon/gun/launcher/crossbow/consume_next_projectile(mob/user=null)
if(tension <= 0)
user << "\red \The [src] is not drawn back!"
user << "<span class='warning'>\The [src] is not drawn back!</span>"
return null
return bolt
/obj/item/weapon/gun/launcher/crossbow/handle_post_fire(mob/user, atom/target)
bolt = null
icon_state = "crossbow"
tension = 0
update_icon()
..()
/obj/item/weapon/gun/launcher/crossbow/attack_self(mob/living/user as mob)
@@ -89,7 +89,7 @@
else
user.visible_message("[user] relaxes the tension on [src]'s string.","You relax the tension on [src]'s string.")
tension = 0
icon_state = "crossbow"
update_icon()
else
draw(user)
@@ -106,15 +106,19 @@
user.visible_message("[user] begins to draw back the string of [src].","<span class='notice'>You begin to draw back the string of [src].</span>")
tension = 1
while(bolt && tension && current_user == user)
while(bolt && tension && loc == current_user)
if(!do_after(user, 25)) //crossbow strings don't just magically pull back on their own.
user.visible_message("[usr] stops drawing and relaxes the string of [src].","<span class='warning'>You stop drawing back and relax the string of [src].</span>")
tension = 0
icon_state = "crossbow"
update_icon()
return
//double check that the user hasn't removed the bolt in the meantime
if(!(bolt && tension && loc == current_user))
return
tension++
icon_state = "crossbow-drawn"
update_icon()
if(tension >= max_tension)
tension = max_tension
@@ -132,11 +136,10 @@
/obj/item/weapon/gun/launcher/crossbow/attackby(obj/item/W as obj, mob/user as mob)
if(!bolt)
if (istype(W,/obj/item/weapon/arrow))
user.drop_item()
user.drop_from_inventory(W, src)
bolt = W
bolt.loc = src
user.visible_message("[user] slides [bolt] into [src].","You slide [bolt] into [src].")
icon_state = "crossbow-nocked"
update_icon()
return
else if(istype(W,/obj/item/stack/rods))
var/obj/item/stack/rods/R = W
@@ -144,7 +147,7 @@
bolt = new /obj/item/weapon/arrow/rod(src)
bolt.fingerprintslast = src.fingerprintslast
bolt.loc = src
icon_state = "crossbow-nocked"
update_icon()
user.visible_message("[user] jams [bolt] into [src].","You jam [bolt] into [src].")
superheat_rod(user)
return
@@ -182,6 +185,14 @@
bolt.icon_state = "metal-rod-superheated"
cell.use(500)
/obj/item/weapon/gun/launcher/crossbow/update_icon()
if(tension > 1)
icon_state = "crossbow-drawn"
else if(bolt)
icon_state = "crossbow-nocked"
else
icon_state = "crossbow"
// Crossbow construction.
/obj/item/weapon/crossbowframe
@@ -209,11 +220,11 @@
if(buildstate == 0)
var/obj/item/stack/rods/R = W
if(R.use(3))
user << "\blue You assemble a backbone of rods around the wooden stock."
user << "<span class='notice'>You assemble a backbone of rods around the wooden stock.</span>"
buildstate++
update_icon()
else
user << "\blue You need at least three rods to complete this task."
user << "<span class='notice'>You need at least three rods to complete this task.</span>"
return
else if(istype(W,/obj/item/weapon/weldingtool))
if(buildstate == 1)
@@ -221,7 +232,7 @@
if(T.remove_fuel(0,user))
if(!src || !T.isOn()) return
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
user << "\blue You weld the rods into place."
user << "<span class='notice'>You weld the rods into place.</span>"
buildstate++
update_icon()
return
@@ -229,33 +240,33 @@
var/obj/item/stack/cable_coil/C = W
if(buildstate == 2)
if(C.use(5))
user << "\blue You wire a crude cell mount into the top of the crossbow."
user << "<span class='notice'>You wire a crude cell mount into the top of the crossbow.</span>"
buildstate++
update_icon()
else
user << "\blue You need at least five segments of cable coil to complete this task."
user << "<span class='notice'>You need at least five segments of cable coil to complete this task.</span>"
return
else if(buildstate == 4)
if(C.use(5))
user << "\blue You string a steel cable across the crossbow's lath."
user << "<span class='notice'>You string a steel cable across the crossbow's lath.</span>"
buildstate++
update_icon()
else
user << "\blue You need at least five segments of cable coil to complete this task."
user << "<span class='notice'>You need at least five segments of cable coil to complete this task.</span>"
return
else if(istype(W,/obj/item/stack/sheet/mineral/plastic))
if(buildstate == 3)
var/obj/item/stack/sheet/mineral/plastic/P = W
if(P.use(3))
user << "\blue You assemble and install a heavy plastic lath onto the crossbow."
user << "<span class='notice'>You assemble and install a heavy plastic lath onto the crossbow.</span>"
buildstate++
update_icon()
else
user << "\blue You need at least three plastic sheets to complete this task."
user << "<span class='notice'>You need at least three plastic sheets to complete this task.</span>"
return
else if(istype(W,/obj/item/weapon/screwdriver))
if(buildstate == 5)
user << "\blue You secure the crossbow's various parts."
user << "<span class='notice'>You secure the crossbow's various parts.</span>"
new /obj/item/weapon/gun/launcher/crossbow(get_turf(src))
qdel(src)
return
@@ -14,17 +14,20 @@
var/max_w_class = 3 // Hopper intake size.
var/max_storage_space = 20 // Total internal storage size.
var/obj/item/weapon/tank/tank = null // Tank of gas for use in firing the cannon.
var/obj/item/weapon/storage/tank_container // Something to hold the tank item so we don't accidentally fire it.
var/obj/item/weapon/storage/item_storage
var/pressure_setting = 10 // Percentage of the gas in the tank used to fire the projectile.
var/possible_pressure_amounts = list(5,10,20,25,50) // Possible pressure settings.
var/minimum_tank_pressure = 10 // Minimum pressure to fire the gun.
var/force_divisor = 400 // Force equates to speed. Speed/5 equates to a damage multiplier for whoever you hit.
// For reference, a fully pressurized oxy tank at 50% gas release firing a health
// analyzer with a force_divisor of 10 hit with a damage multiplier of 3000+.
/obj/item/weapon/gun/launcher/pneumatic/New()
..()
tank_container = new(src)
tank_container.tag = "gas_tank_holder"
item_storage = new(src)
item_storage.name = "hopper"
item_storage.max_w_class = max_w_class
item_storage.max_storage_space = max_storage_space
item_storage.use_sound = null
/obj/item/weapon/gun/launcher/pneumatic/verb/set_pressure() //set amount of tank pressure.
set name = "Set Valve Pressure"
@@ -35,69 +38,65 @@
pressure_setting = N
usr << "You dial the pressure valve to [pressure_setting]%."
/obj/item/weapon/gun/launcher/pneumatic/verb/eject_tank() //Remove the tank.
set name = "Eject Tank"
set category = "Object"
set src in range(0)
if(tank)
usr << "You twist the valve and pop the tank out of [src]."
tank.loc = usr.loc
tank = null
icon_state = "pneumatic"
item_state = "pneumatic"
if (ismob(src.loc))
var/mob/M = src.loc
M.update_icons()
else
usr << "There's no tank in [src]."
/obj/item/weapon/gun/launcher/pneumatic/attackby(obj/item/W as obj, mob/user as mob)
if(!tank && istype(W,/obj/item/weapon/tank))
user.drop_item()
tank = W
tank.loc = src.tank_container
user.visible_message("[user] jams [W] into [src]'s valve and twists it closed.","You jam [W] into [src]'s valve and twist it closed.")
icon_state = "pneumatic-tank"
item_state = "pneumatic-tank"
user.update_icons()
else if(istype(W) && W.w_class <= max_w_class)
var/total_stored = 0
for(var/obj/item/O in src.contents)
total_stored += O.get_storage_cost()
if(total_stored + W.get_storage_cost() <= max_storage_space)
user.remove_from_mob(W)
W.loc = src
user << "You shove [W] into the hopper."
else
user << "That won't fit into the hopper - it's too full."
/obj/item/weapon/gun/launcher/pneumatic/proc/eject_tank(mob/user) //Remove the tank.
if(!tank)
user << "There's no tank in [src]."
return
else
user << "That won't fit into the hopper."
/obj/item/weapon/gun/launcher/pneumatic/attack_self(mob/user as mob)
if(contents.len > 0)
var/obj/item/removing = contents[contents.len]
removing.loc = get_turf(src)
user << "You twist the valve and pop the tank out of [src]."
user.put_in_hands(tank)
tank = null
update_icon()
/obj/item/weapon/gun/launcher/pneumatic/proc/unload_hopper(mob/user)
if(item_storage.contents.len > 0)
var/obj/item/removing = item_storage.contents[item_storage.contents.len]
item_storage.remove_from_storage(removing, src.loc)
user.put_in_hands(removing)
user << "You remove [removing] from the hopper."
else
user << "There is nothing to remove in \the [src]."
return
/obj/item/weapon/gun/launcher/pneumatic/attack_hand(mob/user as mob)
if(user.get_inactive_hand() == src)
unload_hopper(user)
else
return ..()
/obj/item/weapon/gun/launcher/pneumatic/attackby(obj/item/W as obj, mob/user as mob)
if(!tank && istype(W,/obj/item/weapon/tank))
user.drop_from_inventory(W, src)
tank = W
user.visible_message("[user] jams [W] into [src]'s valve and twists it closed.","You jam [W] into [src]'s valve and twist it closed.")
update_icon()
else if(istype(W) && item_storage.can_be_inserted(W))
item_storage.handle_item_insertion(W)
/obj/item/weapon/gun/launcher/pneumatic/attack_self(mob/user as mob)
eject_tank(user)
/obj/item/weapon/gun/launcher/pneumatic/consume_next_projectile(mob/user=null)
if(!contents.len)
if(!item_storage.contents.len)
return null
if (!tank)
user << "There is no gas tank in [src]!"
return null
var/fire_pressure = (tank.air_contents.return_pressure()/100)*pressure_setting
if(fire_pressure < minimum_tank_pressure)
var/environment_pressure = 10
var/turf/T = get_turf(src)
if(T)
var/datum/gas_mixture/environment = T.return_air()
if(environment)
environment_pressure = environment.return_pressure()
fire_pressure = (tank.air_contents.return_pressure() - environment_pressure)*pressure_setting/100
if(fire_pressure < 10)
user << "There isn't enough gas in the tank to fire [src]."
return null
return contents[1]
var/obj/item/launched = item_storage.contents[1]
item_storage.remove_from_storage(launched, src)
return launched
/obj/item/weapon/gun/launcher/pneumatic/examine(mob/user)
if(!..(user, 2))
@@ -119,11 +118,24 @@
if(tank)
var/lost_gas_amount = tank.air_contents.total_moles*(pressure_setting/100)
var/datum/gas_mixture/removed = tank.air_contents.remove(lost_gas_amount)
var/turf/T = get_turf(src.loc)
if(T) T.assume_air(removed)
..()
/obj/item/weapon/gun/launcher/pneumatic/update_icon()
if(tank)
icon_state = "pneumatic-tank"
item_state = "pneumatic-tank"
else
icon_state = "pneumatic"
item_state = "pneumatic"
if (ismob(src.loc))
var/mob/M = src.loc
M.update_inv_r_hand()
M.update_inv_l_hand()
//Constructable pneumatic cannon.
/obj/item/weapon/cannonframe
@@ -149,9 +161,9 @@
/obj/item/weapon/cannonframe/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/pipe))
if(buildstate == 0)
user.drop_item()
user.drop_from_inventory(W)
qdel(W)
user << "\blue You secure the piping inside the frame."
user << "<span class='notice'>You secure the piping inside the frame.</span>"
buildstate++
update_icon()
return
@@ -159,17 +171,17 @@
if(buildstate == 2)
var/obj/item/stack/sheet/metal/M = W
if(M.use(5))
user << "\blue You assemble a chassis around the cannon frame."
user << "<span class='notice'>You assemble a chassis around the cannon frame.</span>"
buildstate++
update_icon()
else
user << "\blue You need at least five metal sheets to complete this task."
user << "<span class='notice'>You need at least five metal sheets to complete this task.</span>"
return
else if(istype(W,/obj/item/device/transfer_valve))
if(buildstate == 4)
user.drop_item()
user.drop_from_inventory(W)
qdel(W)
user << "\blue You install the transfer valve and connect it to the piping."
user << "<span class='notice'>You install the transfer valve and connect it to the piping.</span>"
buildstate++
update_icon()
return
@@ -179,7 +191,7 @@
if(T.remove_fuel(0,user))
if(!src || !T.isOn()) return
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
user << "\blue You weld the pipe into place."
user << "<span class='notice'>You weld the pipe into place.</span>"
buildstate++
update_icon()
if(buildstate == 3)
@@ -187,7 +199,7 @@
if(T.remove_fuel(0,user))
if(!src || !T.isOn()) return
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
user << "\blue You weld the metal chassis together."
user << "<span class='notice'>You weld the metal chassis together.</span>"
buildstate++
update_icon()
if(buildstate == 5)
@@ -195,7 +207,7 @@
if(T.remove_fuel(0,user))
if(!src || !T.isOn()) return
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
user << "\blue You weld the valve into place."
user << "<span class='notice'>You weld the valve into place.</span>"
new /obj/item/weapon/gun/launcher/pneumatic(get_turf(src))
qdel(src)
return
+8 -8
View File
@@ -182,15 +182,15 @@
//admin logs
if(!no_attack_log)
if(istype(firer, /mob))
target_mob.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[target_mob]/[target_mob.ckey]</b> with a <b>[src.type]</b>"
firer.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[target_mob]/[target_mob.ckey]</b> with a <b>[src.type]</b>"
msg_admin_attack("[firer] ([firer.ckey]) shot [target_mob] ([target_mob.ckey]) with a [src] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[firer.x];Y=[firer.y];Z=[firer.z]'>JMP</a>)") //BS12 EDIT ALG
else if(firer)
target_mob.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[target_mob]/[target_mob.ckey]</b> with a <b>[src]</b>"
msg_admin_attack("UNKNOWN shot [target_mob] ([target_mob.ckey]) with a [src] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[firer.x];Y=[firer.y];Z=[firer.z]'>JMP</a>)") //BS12 EDIT ALG
var/attacker_message = "shot with \a [src.type]"
var/victim_message = "shot with \a [src.type]"
var/admin_message = "shot (\a [src.type])"
admin_attack_log(firer, target_mob, attacker_message, victim_message, admin_message)
else
target_mob.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[target_mob]/[target_mob.ckey]</b> with a <b>[src]</b>"
msg_admin_attack("UNKNOWN shot [target_mob] ([target_mob.ckey]) with a [src] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[target_mob.x];Y=[target_mob.y];Z=[target_mob.z]'>JMP</a>)") //BS12 EDIT ALG
target_mob.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[target_mob]/[target_mob.ckey]</b> with <b>\a [src]</b>"
msg_admin_attack("UNKNOWN shot [target_mob] ([target_mob.ckey]) with \a [src] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[target_mob.x];Y=[target_mob.y];Z=[target_mob.z]'>JMP</a>)")
//sometimes bullet_act() will want the projectile to continue flying
if (target_mob.bullet_act(src, def_zone) == -1)
+10
View File
@@ -56,6 +56,16 @@
-->
<div class="commit sansserif">
<h2 class="date">16 May 2015</h2>
<h3 class="author">GinjaNinja32 updated:</h3>
<ul class="changes bgimages16">
<li class="rscadd">Rewrote tables. To construct a table, use steel to make a table frame, then plate the frame with a material such as steel, gold, wood, etc. Hold a stack in your hand and drag it to the table to reinforce it. To deconstruct a table, use a screwdriver to remove the reinforcements (if present), then a wrench to remove the plating, and a wrench again to dismantle the frame. Use a welder to repair any damage. Use a carpet tile on a table to add felt, and a crowbar to remove it.</li>
</ul>
<h3 class="author">HarpyEagle updated:</h3>
<ul class="changes bgimages16">
<li class="rscadd">Adds tail animations for tajaran and unathi. Animations are controlled using emotes.</li>
</ul>
<h2 class="date">14 May 2015</h2>
<h3 class="author">PsiOmegaDelta updated:</h3>
<ul class="changes bgimages16">
+12
View File
@@ -1779,3 +1779,15 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py.
with the shotgun.
- bugfix: Portable air pumps now fill based on external/airtank pressure when pumping
in.
2015-05-16:
GinjaNinja32:
- rscadd: Rewrote tables. To construct a table, use steel to make a table frame,
then plate the frame with a material such as steel, gold, wood, etc. Hold a
stack in your hand and drag it to the table to reinforce it. To deconstruct
a table, use a screwdriver to remove the reinforcements (if present), then a
wrench to remove the plating, and a wrench again to dismantle the frame. Use
a welder to repair any damage. Use a carpet tile on a table to add felt, and
a crowbar to remove it.
HarpyEagle:
- rscadd: Adds tail animations for tajaran and unathi. Animations are controlled
using emotes.
@@ -1,5 +0,0 @@
author: GinjaNinja32
delete-after: True
changes:
- rscadd: "Rewrote tables. To construct a table, use steel to make a table frame, then plate the frame with a material such as steel, gold, wood, etc. Hold a stack in your hand and drag it to the table to reinforce it. To deconstruct a table, use a screwdriver to remove the reinforcements (if present), then a wrench to remove the plating, and a wrench again to dismantle the frame. Use a welder to repair any damage. Use a carpet tile on a table to add felt, and a crowbar to remove it."
-4
View File
@@ -1,4 +0,0 @@
author: HarpyEagle
delete-after: True
changes:
- rscadd: "Adds tail animations for tajaran and unathi. Animations are controlled using emotes."