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

Conflicts:
	code/game/objects/items.dm
This commit is contained in:
PsiOmega
2015-07-06 18:33:09 +02:00
22 changed files with 231 additions and 89 deletions

View File

@@ -199,7 +199,7 @@
total_unfilterable_moles += source.gas[g]
var/ratio = source.gas[g]/source.total_moles //converts the specific power per mole of pure gas to specific power per mole of input gas mix
total_specific_power = specific_power_gas[g]*ratio
total_specific_power += specific_power_gas[g]*ratio
//Figure out how much of each gas to filter
if (isnull(total_transfer_moles))
@@ -272,7 +272,7 @@
total_unfilterable_moles += source.gas[g]
var/ratio = source.gas[g]/source.total_moles //converts the specific power per mole of pure gas to specific power per mole of input gas mix
total_specific_power = specific_power_gas[g]*ratio
total_specific_power += specific_power_gas[g]*ratio
//Figure out how much of each gas to filter
if (isnull(total_transfer_moles))

View File

@@ -120,14 +120,14 @@
if(pressure_delta > 0.5)
if(pump_direction) //internal -> external
if (node1 && (environment.temperature || air1.temperature))
var/transfer_moles = calculate_transfer_moles(air1, environment)
var/transfer_moles = calculate_transfer_moles(air1, environment, pressure_delta)
power_draw = pump_gas(src, air1, environment, transfer_moles, power_rating)
if(power_draw >= 0 && network1)
network1.update = 1
else //external -> internal
if (node2 && (environment.temperature || air2.temperature))
var/transfer_moles = calculate_transfer_moles(environment, air2, (network2)? network2.volume : 0)
var/transfer_moles = calculate_transfer_moles(environment, air2, pressure_delta, (network2)? network2.volume : 0)
//limit flow rate from turfs
transfer_moles = min(transfer_moles, environment.total_moles*air2.volume/environment.volume) //group_multiplier gets divided out here

View File

@@ -178,10 +178,10 @@
if((environment.temperature || air_contents.temperature) && pressure_delta > 0.5)
if(pump_direction) //internal -> external
var/transfer_moles = calculate_transfer_moles(air_contents, environment)
var/transfer_moles = calculate_transfer_moles(air_contents, environment, pressure_delta)
power_draw = pump_gas(src, air_contents, environment, transfer_moles, power_rating)
else //external -> internal
var/transfer_moles = calculate_transfer_moles(environment, air_contents, (network)? network.volume : 0)
var/transfer_moles = calculate_transfer_moles(environment, air_contents, pressure_delta, (network)? network.volume : 0)
//limit flow rate from turfs
transfer_moles = min(transfer_moles, environment.total_moles*air_contents.volume/environment.volume) //group_multiplier gets divided out here

View File

@@ -214,7 +214,7 @@ var/obj/screen/robot_inventory
if(!r.robot_modules_background)
return
var/display_rows = round((r.module.modules.len) / 8) +1 //+1 because round() returns floor of number
var/display_rows = -round(-(r.module.modules.len) / 8)
r.robot_modules_background.screen_loc = "CENTER-4:16,SOUTH+1:7 to CENTER+3:16,SOUTH+[display_rows]:7"
r.client.screen += r.robot_modules_background

View File

@@ -166,7 +166,7 @@
return dat
/var/list/acting_rank_prefixes = list("acting", "temporary", "interim")
/var/list/acting_rank_prefixes = list("acting", "temporary", "interim", "provisional")
/proc/make_list_rank(rank)
for(var/prefix in acting_rank_prefixes)

View File

@@ -19,12 +19,15 @@ var/datum/antagonist/raider/raiders
/obj/item/clothing/under/pirate,
/obj/item/clothing/under/redcoat,
/obj/item/clothing/under/serviceoveralls,
/obj/item/clothing/under/captain_fly
/obj/item/clothing/under/captain_fly,
/obj/item/clothing/under/det,
/obj/item/clothing/under/brown,
)
var/list/raider_shoes = list(
/obj/item/clothing/shoes/jackboots,
/obj/item/clothing/shoes/sandal,
/obj/item/clothing/shoes/workboots,
/obj/item/clothing/shoes/brown,
/obj/item/clothing/shoes/laceup
)
@@ -40,7 +43,6 @@ var/datum/antagonist/raider/raiders
/obj/item/clothing/head/pirate,
/obj/item/clothing/head/bandana,
/obj/item/clothing/head/hgpiratecap,
/obj/item/clothing/head/flatcap
)
var/list/raider_suits = list(
@@ -50,7 +52,9 @@ var/datum/antagonist/raider/raiders
/obj/item/clothing/suit/storage/leather_jacket,
/obj/item/clothing/suit/storage/toggle/brown_jacket,
/obj/item/clothing/suit/storage/toggle/hoodie,
/obj/item/clothing/suit/storage/toggle/hoodie/black
/obj/item/clothing/suit/storage/toggle/hoodie/black,
/obj/item/clothing/suit/unathi/mantle,
/obj/item/clothing/suit/poncho,
)
var/list/raider_guns = list(
@@ -60,14 +64,33 @@ var/datum/antagonist/raider/raiders
/obj/item/weapon/gun/energy/mindflayer,
/obj/item/weapon/gun/energy/toxgun,
/obj/item/weapon/gun/energy/stunrevolver,
/obj/item/weapon/gun/energy/ionrifle,
/obj/item/weapon/gun/energy/taser,
/obj/item/weapon/gun/energy/crossbow/largecrossbow,
/obj/item/weapon/gun/launcher/crossbow,
/obj/item/weapon/gun/launcher/grenade,
/obj/item/weapon/gun/launcher/pneumatic,
/obj/item/weapon/gun/projectile/automatic/mini_uzi,
/obj/item/weapon/gun/projectile/automatic/c20r,
/obj/item/weapon/gun/projectile/automatic/wt550,
/obj/item/weapon/gun/projectile/automatic/sts35,
/obj/item/weapon/gun/projectile/silenced,
/obj/item/weapon/gun/projectile/shotgun/pump,
/obj/item/weapon/gun/projectile/shotgun/pump/combat,
/obj/item/weapon/gun/projectile/shotgun/doublebarrel,
/obj/item/weapon/gun/projectile/shotgun/doublebarrel/pellet,
/obj/item/weapon/gun/projectile/shotgun/doublebarrel/sawn,
/obj/item/weapon/gun/projectile/colt,
/obj/item/weapon/gun/projectile/pistol
/obj/item/weapon/gun/projectile/sec,
/obj/item/weapon/gun/projectile/pistol,
/obj/item/weapon/gun/projectile/revolver,
/obj/item/weapon/gun/projectile/pirate
)
var/list/raider_holster = list(
/obj/item/clothing/accessory/holster/armpit,
/obj/item/clothing/accessory/holster/waist,
/obj/item/clothing/accessory/holster/hip
)
/datum/antagonist/raider/New()
@@ -178,14 +201,18 @@ var/datum/antagonist/raider/raiders
var/new_glasses = pick(raider_glasses)
var/new_helmet = pick(raider_helmets)
var/new_suit = pick(raider_suits)
var/new_gun = pick(raider_guns)
player.equip_to_slot_or_del(new new_shoes(player),slot_shoes)
if(!player.shoes)
//If equipping shoes failed, fall back to equipping sandals
var/fallback_type = pick(/obj/item/clothing/shoes/sandal, /obj/item/clothing/shoes/jackboots/unathi)
player.equip_to_slot_or_del(new fallback_type(player), slot_shoes)
player.equip_to_slot_or_del(new new_uniform(player),slot_w_uniform)
player.equip_to_slot_or_del(new new_glasses(player),slot_glasses)
player.equip_to_slot_or_del(new new_helmet(player),slot_head)
player.equip_to_slot_or_del(new new_suit(player),slot_wear_suit)
player.equip_to_slot_or_del(new new_gun(player),slot_belt)
equip_weapons(player)
var/obj/item/weapon/card/id/id = create_id("Visitor", player)
id.name = "[player.real_name]'s Passport"
@@ -198,6 +225,70 @@ var/datum/antagonist/raider/raiders
return 1
/datum/antagonist/raider/proc/equip_weapons(var/mob/living/carbon/human/player)
var/new_gun = pick(raider_guns)
var/new_holster = pick(raider_holster) //raiders don't start with any backpacks, so let's be nice and give them a holster if they can use it.
var/turf/T = get_turf(player)
var/obj/item/primary = new new_gun(T)
var/obj/item/clothing/accessory/holster/holster = null
//Give some of the raiders a pirate gun as a secondary
if(prob(60))
var/obj/item/secondary = new /obj/item/weapon/gun/projectile/pirate(T)
if(!(primary.slot_flags & SLOT_HOLSTER))
holster = new new_holster(T)
holster.holstered = secondary
secondary.loc = holster
else
player.equip_to_slot_or_del(secondary, slot_belt)
if(primary.slot_flags & SLOT_HOLSTER)
holster = new new_holster(T)
holster.holstered = primary
primary.loc = holster
else if(!player.belt && (primary.slot_flags & SLOT_BELT))
player.equip_to_slot_or_del(primary, slot_belt)
else if(!player.back && (primary.slot_flags & SLOT_BACK))
player.equip_to_slot_or_del(primary, slot_back)
else
player.put_in_any_hand_if_possible(primary)
//If they got a projectile gun, give them a little bit of spare ammo
equip_ammo(player, primary)
if(holster)
var/obj/item/clothing/under/uniform = player.w_uniform
if(istype(uniform) && uniform.can_attach_accessory(holster))
uniform.attackby(holster, player)
else
player.put_in_any_hand_if_possible(holster)
/datum/antagonist/raider/proc/equip_ammo(var/mob/living/carbon/human/player, var/obj/item/weapon/gun/gun)
if(istype(gun, /obj/item/weapon/gun/projectile))
var/obj/item/weapon/gun/projectile/bullet_thrower = gun
if(bullet_thrower.magazine_type)
player.equip_to_slot_or_del(new bullet_thrower.magazine_type(player), slot_l_store)
if(prob(20)) //don't want to give them too much
player.equip_to_slot_or_del(new bullet_thrower.magazine_type(player), slot_r_store)
else if(bullet_thrower.ammo_type)
var/obj/item/weapon/storage/box/ammobox = new(get_turf(player.loc))
for(var/i in 1 to rand(3,5) + rand(0,2))
new bullet_thrower.ammo_type(ammobox)
player.put_in_any_hand_if_possible(ammobox)
return
if(istype(gun, /obj/item/weapon/gun/launcher/grenade))
var/list/grenades = list(
/obj/item/weapon/grenade/empgrenade,
/obj/item/weapon/grenade/smokebomb,
/obj/item/weapon/grenade/flashbang
)
var/obj/item/weapon/storage/box/ammobox = new(get_turf(player.loc))
for(var/i in 1 to 7)
var/grenade_type = pick(grenades)
new grenade_type(ammobox)
player.put_in_any_hand_if_possible(ammobox)
/datum/antagonist/raider/proc/equip_vox(var/mob/living/carbon/human/player)
var/uniform_type = pick(list(/obj/item/clothing/under/vox/vox_robes,/obj/item/clothing/under/vox/vox_casual))

View File

@@ -109,9 +109,13 @@
var/shutdown_pump = 0
switch(command)
if("cycle_ext")
//only respond to these commands if the airlock isn't already doing something
//prevents the controller from getting confused and doing strange things
if(state == target_state)
begin_cycle_out()
if("cycle_int")
if(state == target_state)
begin_cycle_in()
if("cycle_ext_door")
@@ -122,14 +126,6 @@
if("abort")
stop_cycling()
/*
//dont do this. If the airlock can't get enough air to pressurize the person inside is stuck
state = STATE_PRESSURIZE
target_state = TARGET_NONE
memory["target_pressure"] = ONE_ATMOSPHERE
signalPump(tag_airpump, 1, 1, memory["target_pressure"])
process()
*/
if("force_ext")
toggleDoor(memory["exterior_status"], tag_exterior_door, memory["secure"], "toggle")
@@ -140,11 +136,9 @@
if("purge")
memory["purge"] = !memory["purge"]
if(memory["purge"])
toggleDoor(memory["exterior_status"], tag_exterior_door, 1, "close")
toggleDoor(memory["interior_status"], tag_interior_door, 1, "close")
state = STATE_DEPRESSURIZE
close_doors()
state = STATE_PREPARE
target_state = TARGET_NONE
signalPump(tag_airpump, 1, 0, 0)
if("secure")
memory["secure"] = !memory["secure"]
@@ -188,12 +182,12 @@
var/target_pressure = memory["target_pressure"]
if(memory["purge"])
//purge apparently means clearing the airlock chamber to vacuum (then refilling, handled later)
target_pressure = 0
state = STATE_DEPRESSURIZE
signalPump(tag_airpump, 1, 0, 0) //send a signal to start depressurizing
if(memory["purge"])
target_pressure = 0
if(chamber_pressure <= target_pressure)
else if(chamber_pressure <= target_pressure)
state = STATE_PRESSURIZE
signalPump(tag_airpump, 1, 1, target_pressure) //send a signal to start pressurizing
@@ -201,40 +195,37 @@
state = STATE_DEPRESSURIZE
signalPump(tag_airpump, 1, 0, target_pressure) //send a signal to start depressurizing
//Check for vacuum - this is set after the pumps so the pumps are aiming for 0
if(!memory["target_pressure"])
memory["target_pressure"] = ONE_ATMOSPHERE * 0.05
//Make sure the airlock isn't aiming for pure vacuum - an impossibility
memory["target_pressure"] = max(target_pressure, ONE_ATMOSPHERE * 0.05)
if(STATE_PRESSURIZE)
if(memory["chamber_sensor_pressure"] >= memory["target_pressure"] * 0.95)
cycleDoors(target_state)
state = STATE_IDLE
target_state = TARGET_NONE
//not done until the pump has reported that it's off
if(memory["pump_status"] != "off")
signalPump(tag_airpump, 0) //send a signal to stop pumping
else
cycleDoors(target_state)
state = STATE_IDLE
target_state = TARGET_NONE
if(STATE_DEPRESSURIZE)
if(memory["chamber_sensor_pressure"] <= memory["target_pressure"] * 1.05)
if(memory["purge"])
if(memory["chamber_sensor_pressure"] <= ONE_ATMOSPHERE * 0.05)
state = STATE_PRESSURIZE
signalPump(tag_airpump, 1, 1, memory["target_pressure"])
memory["purge"] = 0
memory["target_pressure"] = memory["internal_sensor_pressure"]
state = STATE_PREPARE
target_state = TARGET_NONE
else if(memory["chamber_sensor_pressure"] <= memory["target_pressure"] * 1.05)
else if(memory["pump_status"] != "off")
signalPump(tag_airpump, 0)
else
cycleDoors(target_state)
state = STATE_IDLE
target_state = TARGET_NONE
//send a signal to stop pumping
if(memory["pump_status"] != "off")
signalPump(tag_airpump, 0)
memory["processing"] = state != target_state
memory["processing"] = (state != target_state)
return 1

View File

@@ -153,7 +153,7 @@
if(temp && !temp.is_usable())
user << "<span class='notice'>You try to move your [temp.name], but cannot!</span>"
return
src.pickup(user)
if (istype(src.loc, /obj/item/weapon/storage))
var/obj/item/weapon/storage/S = src.loc
S.remove_from_storage(src)
@@ -167,8 +167,6 @@
return
user.next_move = max(user.next_move+2,world.time + 2)
user.put_in_active_hand(src)
if(src.loc == user)
src.pickup(user)
return
/obj/item/attack_ai(mob/user as mob)

View File

@@ -174,16 +174,8 @@
if(M.equip_to_appropriate_slot(newitem))
return newitem
if(istype(M.back,/obj/item/weapon/storage))
var/obj/item/weapon/storage/backpack = M.back
if(backpack.contents.len < backpack.storage_slots)
newitem.loc = M.back
if(M.equip_to_storage(newitem))
return newitem
// Try to place it in any item that can store stuff, on the mob.
for(var/obj/item/weapon/storage/S in M.contents)
if (S.contents.len < S.storage_slots)
newitem.loc = S
return newitem
newitem.loc = get_turf(M.loc)
return newitem

View File

@@ -73,6 +73,21 @@ var/list/slot_equipment_priority = list( \
return 0
/mob/proc/equip_to_storage(obj/item/newitem)
// Try put it in their backpack
if(istype(src.back,/obj/item/weapon/storage))
var/obj/item/weapon/storage/backpack = src.back
if(backpack.contents.len < backpack.storage_slots)
newitem.loc = src.back
return 1
// Try to place it in any item that can store stuff, on the mob.
for(var/obj/item/weapon/storage/S in src.contents)
if (S.contents.len < S.storage_slots)
newitem.loc = S
return 1
return 0
//These procs handle putting s tuff in your hand. It's probably best to use these rather than setting l_hand = ...etc
//as they handle all relevant stuff like adding it to the player's screen and updating their overlays.

View File

@@ -23,6 +23,12 @@
qdel(food)
return ..()
/mob/living/carbon/rejuvenate()
bloodstr.clear_reagents()
ingested.clear_reagents()
touching.clear_reagents()
..()
/mob/living/carbon/Move(NewLoc, direct)
. = ..()
if(.)

View File

@@ -1746,5 +1746,9 @@
if (thermal_protection < 1 && bodytemperature < burn_temperature)
bodytemperature += round(BODYTEMP_HEATING_MAX*(1-thermal_protection), 1)
/mob/living/carbon/human/rejuvenate()
restore_blood()
..()
#undef HUMAN_MAX_OXYLOSS
#undef HUMAN_CRIT_MAX_OXYLOSS

View File

@@ -399,6 +399,7 @@ default behaviour is:
fire_stacks = 0
/mob/living/proc/rejuvenate()
reagents.clear_reagents()
// shut down various types of badness
setToxLoss(0)
@@ -424,16 +425,11 @@ default behaviour is:
ear_damage = 0
heal_overall_damage(getBruteLoss(), getFireLoss())
// restore all of a human's blood
if(ishuman(src))
var/mob/living/carbon/human/human_mob = src
human_mob.restore_blood()
// fix all of our organs
restore_all_organs()
// remove the character from the list of the dead
if(stat == 2)
if(stat == DEAD)
dead_mob_list -= src
living_mob_list += src
tod = null

View File

@@ -126,12 +126,7 @@
//decide whether to aim or shoot normally
var/aiming = 0
if(user && user.client && !(A in aim_targets))
var/client/C = user.client
//If help intent is on and we have clicked on an eligible target, switch to aim mode automatically
if(user.a_intent == I_HELP && isliving(A) && !C.gun_mode)
C.ToggleGunMode()
if(C.gun_mode)
if(user.client.gun_mode)
aiming = PreFire(A,user,params) //They're using the new gun system, locate what they're aiming at.
if (!aiming)

View File

@@ -164,3 +164,37 @@
icon = 'icons/obj/gun.dmi'
icon_state = "silencer"
w_class = 2
/obj/item/weapon/gun/projectile/pirate
name = "zipgun"
desc = "Little more than a barrel, handle, and firing mechanism, cheap makeshift firearms like this one are not uncommon in frontier systems."
icon_state = "sawnshotgun"
item_state = "sawnshotgun"
handle_casings = CYCLE_CASINGS //player has to take the old casing out manually before reloading
load_method = SINGLE_CASING
max_shells = 1 //literally just a barrel
var/global/list/ammo_types = list(
/obj/item/ammo_casing/a357 = ".357",
/obj/item/ammo_casing/c9mmf = "9mm",
/obj/item/ammo_casing/c45f = ".45",
/obj/item/ammo_casing/a12mm = "12mm",
/obj/item/ammo_casing/shotgun = "12 gauge",
/obj/item/ammo_casing/shotgun = "12 gauge",
/obj/item/ammo_casing/shotgun/pellet = "12 gauge",
/obj/item/ammo_casing/shotgun/pellet = "12 gauge",
/obj/item/ammo_casing/shotgun/pellet = "12 gauge",
/obj/item/ammo_casing/shotgun/beanbag = "12 gauge",
/obj/item/ammo_casing/shotgun/stunshell = "12 gauge",
/obj/item/ammo_casing/shotgun/flash = "12 gauge",
/obj/item/ammo_casing/a762 = "7.62mm",
/obj/item/ammo_casing/a556 = "5.56mm"
)
/obj/item/weapon/gun/projectile/pirate/New()
ammo_type = pick(ammo_types)
desc += " Uses [ammo_types[ammo_type]] rounds."
var/obj/item/ammo_casing/ammo = ammo_type
caliber = initial(ammo.caliber)
..()

View File

@@ -47,7 +47,6 @@
max_shells = 7 //match the ammo box capacity, also it can hold a round in the chamber anyways, for a total of 8.
ammo_type = /obj/item/ammo_casing/shotgun
/obj/item/weapon/gun/projectile/shotgun/doublebarrel
name = "double-barreled shotgun"
desc = "A true classic."
@@ -95,8 +94,9 @@
return
if(do_after(user, 30)) //SHIT IS STEALTHY EYYYYY
icon_state = "sawnshotgun"
item_state = "sawnshotgun"
w_class = 3
item_state = "gun"
force = 5
slot_flags &= ~SLOT_BACK //you can't sling it on your back
slot_flags |= (SLOT_BELT|SLOT_HOLSTER) //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally) - or in a holster, why not.
name = "sawn-off shotgun"
@@ -104,3 +104,13 @@
user << "<span class='warning'>You shorten the barrel of \the [src]!</span>"
else
..()
/obj/item/weapon/gun/projectile/shotgun/doublebarrel/sawn
name = "sawn-off shotgun"
desc = "Omar's coming!"
icon_state = "sawnshotgun"
item_state = "sawnshotgun"
slot_flags = SLOT_BELT|SLOT_HOLSTER
ammo_type = /obj/item/ammo_casing/shotgun/pellet
w_class = 3
force = 5

View File

@@ -53,7 +53,7 @@
else if(istype(A, /obj/structure/girder))
chance = 100
else if(istype(A, /obj/machinery) || istype(A, /obj/structure))
chance = 25
chance = damage
if(prob(chance))
if(A.opacity)

View File

@@ -80,10 +80,10 @@
return 1
/obj/machinery/shieldwallgen/process()
spawn(100)
power()
if(power)
storedpower -= 2500 //the generator post itself uses some power
if(storedpower >= max_stored_power)
storedpower = max_stored_power
if(storedpower <= 0)

View File

@@ -56,6 +56,12 @@
-->
<div class="commit sansserif">
<h2 class="date">06 July 2015</h2>
<h3 class="author">GinjaNinja32 updated:</h3>
<ul class="changes bgimages16">
<li class="rscadd">'Provisional' is now also a valid temporary position prefix for manifest sorting.</li>
</ul>
<h2 class="date">04 July 2015</h2>
<h3 class="author">PsiOmegaDelta updated:</h3>
<ul class="changes bgimages16">

View File

@@ -2064,3 +2064,7 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py.
have increased damage resistance in this state.
- bugfix: Crescent portable turrets should no longer act up during attempts to (un)wrench
and alter their settings.
2015-07-06:
GinjaNinja32:
- rscadd: '''Provisional'' is now also a valid temporary position prefix for manifest
sorting.'

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 27 KiB