Merge branch 'master' into codejanitoring

This commit is contained in:
Jordan Brown
2017-10-07 14:53:43 -04:00
committed by GitHub
193 changed files with 597 additions and 565 deletions
+13 -9
View File
@@ -2281,7 +2281,7 @@
name = "Emergency Shuttle Airlock"
},
/obj/docking_port/mobile/emergency{
name = "Box emergency shuttle";
name = "Box emergency shuttle"
},
/obj/docking_port/stationary{
dir = 4;
@@ -64022,6 +64022,10 @@
/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/turf/open/floor/plating,
/area/maintenance/department/medical/morgue)
"cTW" = (
/obj/machinery/computer/camera_advanced/shuttle_docker/whiteship,
/turf/open/floor/mineral/titanium,
/area/shuttle/abandoned)
(1,1,1) = {"
aaa
@@ -75982,7 +75986,7 @@ aaa
cyc
cyy
cyc
czy
cTW
cyO
cyi
cyi
@@ -105020,7 +105024,7 @@ bfS
biE
bkf
bfS
cTP
cTO
bmZ
bpL
bre
@@ -105277,7 +105281,7 @@ bfS
biD
bke
bfS
cTQ
cTO
bmZ
bpK
brd
@@ -105534,7 +105538,7 @@ bfS
bfS
bfS
bfS
cTR
cTO
bmZ
bon
bon
@@ -105790,13 +105794,13 @@ cTJ
cHD
bgo
cTK
cTN
cTK
blq
cTS
cTT
cTK
bpQ
cTU
cTV
cTK
cTJ
btm
buy
bvz
+45 -8
View File
@@ -79816,7 +79816,6 @@
/area/shuttle/abandoned)
"cWT" = (
/obj/structure/table,
/obj/item/device/camera,
/obj/effect/decal/cleanable/dirt{
desc = "A thin layer of dust coating the floor.";
name = "dust"
@@ -79824,6 +79823,8 @@
/obj/structure/light_construct{
dir = 1
},
/obj/item/folder/blue,
/obj/item/pen,
/turf/open/floor/mineral/titanium,
/area/shuttle/abandoned)
"cWU" = (
@@ -79832,6 +79833,8 @@
desc = "A thin layer of dust coating the floor.";
name = "dust"
},
/obj/structure/table,
/obj/item/device/camera,
/turf/open/floor/mineral/titanium,
/area/shuttle/abandoned)
"cWV" = (
@@ -80229,13 +80232,15 @@
/turf/open/floor/mineral/titanium/blue,
/area/shuttle/abandoned)
"cXH" = (
/obj/structure/table,
/obj/effect/decal/cleanable/dirt{
desc = "A thin layer of dust coating the floor.";
name = "dust"
},
/obj/item/device/megaphone,
/obj/structure/light_construct,
/obj/machinery/computer/camera_advanced/shuttle_docker/whiteship{
x_offset = -3;
y_offset = -7
},
/turf/open/floor/mineral/titanium,
/area/shuttle/abandoned)
"cXI" = (
@@ -90386,6 +90391,38 @@
/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/turf/open/floor/plating,
/area/maintenance/starboard/fore)
"dDN" = (
/obj/effect/decal/cleanable/dirt{
desc = "A thin layer of dust coating the floor.";
name = "dust"
},
/obj/effect/decal/cleanable/dirt{
desc = "A thin layer of dust coating the floor.";
name = "dust"
},
/obj/structure/chair/office/light{
dir = 1
},
/turf/open/floor/mineral/titanium/blue,
/area/shuttle/abandoned)
"dDO" = (
/obj/effect/decal/cleanable/blood/old,
/obj/effect/decal/cleanable/dirt{
desc = "A thin layer of dust coating the floor.";
name = "dust"
},
/obj/structure/chair/office/light,
/turf/open/floor/mineral/titanium/blue,
/area/shuttle/abandoned)
"dDP" = (
/obj/effect/decal/cleanable/dirt{
desc = "A thin layer of dust coating the floor.";
name = "dust"
},
/obj/structure/table,
/obj/item/device/megaphone,
/turf/open/floor/mineral/titanium,
/area/shuttle/abandoned)
(1,1,1) = {"
aaa
@@ -101583,10 +101620,10 @@ cWt
cWE
cVF
cWU
cXe
cWo
cXB
cXa
cWo
cXa
dDP
cVF
cJI
cYp
@@ -101840,9 +101877,9 @@ cVG
cVF
cVF
cWT
cVY
dDN
cWo
cWR
dDO
cXH
cVF
cVF
@@ -30349,6 +30349,7 @@
dir = 8
},
/obj/effect/turf_decal/bot,
/obj/machinery/computer/rdconsole,
/turf/open/floor/plasteel,
/area/science/robotics/lab)
"bbP" = (
+5 -1
View File
@@ -373,6 +373,10 @@
},
/turf/open/floor/plating,
/area/shuttle/abandoned)
"bu" = (
/obj/machinery/computer/camera_advanced/shuttle_docker/whiteship,
/turf/open/floor/mineral/titanium,
/area/shuttle/abandoned)
(1,1,1) = {"
aa
@@ -1148,7 +1152,7 @@ aa
aC
ax
aC
bb
bu
aJ
aj
aj
+45 -8
View File
@@ -722,11 +722,12 @@
desc = "A thin layer of dust coating the floor.";
name = "dust"
},
/obj/structure/table,
/obj/item/device/camera,
/turf/open/floor/mineral/titanium,
/area/shuttle/abandoned)
"bs" = (
/obj/structure/table,
/obj/item/device/camera,
/obj/effect/decal/cleanable/dirt{
desc = "A thin layer of dust coating the floor.";
name = "dust"
@@ -734,6 +735,8 @@
/obj/structure/light_construct{
dir = 1
},
/obj/item/folder/blue,
/obj/item/pen,
/turf/open/floor/mineral/titanium,
/area/shuttle/abandoned)
"bt" = (
@@ -1162,13 +1165,15 @@
/turf/open/floor/mineral/titanium,
/area/shuttle/abandoned)
"cg" = (
/obj/structure/table,
/obj/effect/decal/cleanable/dirt{
desc = "A thin layer of dust coating the floor.";
name = "dust"
},
/obj/item/device/megaphone,
/obj/structure/light_construct,
/obj/machinery/computer/camera_advanced/shuttle_docker/whiteship{
x_offset = -3;
y_offset = -7
},
/turf/open/floor/mineral/titanium,
/area/shuttle/abandoned)
"ch" = (
@@ -1765,6 +1770,38 @@
},
/turf/open/floor/mineral/titanium,
/area/shuttle/abandoned)
"dk" = (
/obj/effect/decal/cleanable/dirt{
desc = "A thin layer of dust coating the floor.";
name = "dust"
},
/obj/effect/decal/cleanable/dirt{
desc = "A thin layer of dust coating the floor.";
name = "dust"
},
/obj/structure/chair/office/light{
dir = 1
},
/turf/open/floor/mineral/titanium/blue,
/area/shuttle/abandoned)
"dl" = (
/obj/effect/decal/cleanable/blood/old,
/obj/effect/decal/cleanable/dirt{
desc = "A thin layer of dust coating the floor.";
name = "dust"
},
/obj/structure/chair/office/light,
/turf/open/floor/mineral/titanium/blue,
/area/shuttle/abandoned)
"dm" = (
/obj/effect/decal/cleanable/dirt{
desc = "A thin layer of dust coating the floor.";
name = "dust"
},
/obj/structure/table,
/obj/item/device/megaphone,
/turf/open/floor/mineral/titanium,
/area/shuttle/abandoned)
(1,1,1) = {"
aa
@@ -2130,10 +2167,10 @@ aR
bc
ac
br
bC
aL
bZ
bx
aL
bx
dm
ac
cA
cN
@@ -2147,9 +2184,9 @@ ae
ac
ac
bs
ax
dk
aL
bp
dl
cg
ac
ac
+8
View File
@@ -176,3 +176,11 @@
#define LAVALAND_DEFAULT_ATMOS "o2=14;n2=23;TEMP=300"
#define THERMAL_ENERGY(gas) (gas.temperature * gas.heat_capacity())
#define ADD_GAS(gas_id, out_list)\
var/list/tmp_gaslist = GLOB.gaslist_cache[gas_id];\
out_list[gas_id] = tmp_gaslist.Copy();
//ASSERT_GAS(gas_id, gas_mixture) - used to guarantee that the gas list for this id exists in gas_mixture.gases.
//Must be used before adding to a gas. May be used before reading from a gas.
#define ASSERT_GAS(gas_id, gas_mixture) if (!gas_mixture.gases[gas_id]) { ADD_GAS(gas_id, gas_mixture.gases) };
-2
View File
@@ -55,8 +55,6 @@ GLOBAL_LIST_EMPTY(all_scripture) //a list containing scripture instances; not us
#define POWER_PLASTEEL (CLOCKCULT_POWER_UNIT*0.05) //how much power is in one sheet of plasteel
#define RATVAR_POWER_CHECK "ratvar?" //when passed into can_use_power(), converts it into a check for if ratvar has woken/the fabricator is debug
//Ark defines
#define GATEWAY_SUMMON_RATE 1 //the time amount the Gateway to the Celestial Derelict gets each process tick; defaults to 1 per tick
+1
View File
@@ -2,6 +2,7 @@
#define CONFIG_DEF(X) /datum/config_entry/##X { resident_file = CURRENT_RESIDENT_FILE }; /datum/config_entry/##X
#define CONFIG_GET(X) global.config.Get(/datum/config_entry/##X)
#define CONFIG_SET(X, Y) global.config.Set(/datum/config_entry/##X, ##Y)
#define CONFIG_TWEAK(X) /datum/config_entry/##X
#define CONFIG_MAPS_FILE "maps.txt"
+2 -1
View File
@@ -196,7 +196,8 @@
plane = HUD_PLANE
/obj/screen/drop/Click()
usr.drop_item_v()
if(usr.stat == CONSCIOUS)
usr.dropItemToGround(usr.get_active_held_item())
/obj/screen/act_intent
name = "intent"
@@ -56,7 +56,6 @@ CONFIG_DEF(flag/log_twitter) // log certain expliotable parrots and other such f
CONFIG_DEF(flag/log_world_topic) // log all world.Topic() calls
CONFIG_DEF(flag/allow_admin_ooccolor) // Allows admins with relevant permissions to have their own ooc colour
protection = CONFIG_ENTRY_LOCKED
CONFIG_DEF(flag/allow_vote_restart) // allow votes to restart
@@ -348,4 +347,26 @@ CONFIG_DEF(number/error_msg_delay) // How long to wait between messaging admins
CONFIG_DEF(flag/irc_announce_new_game)
CONFIG_DEF(flag/debug_admin_hrefs)
CONFIG_DEF(flag/debug_admin_hrefs)
CONFIG_DEF(number/mc_tick_rate/base_mc_tick_rate)
integer = FALSE
value = 1
CONFIG_DEF(number/mc_tick_rate/high_pop_mc_tick_rate)
integer = FALSE
value = 1.1
CONFIG_DEF(number/mc_tick_rate/high_pop_mc_mode_amount)
value = 65
CONFIG_DEF(number/mc_tick_rate/disable_high_pop_mc_mode_amount)
value = 60
CONFIG_TWEAK(number/mc_tick_rate)
abstract_type = /datum/config_entry/number/mc_tick_rate
CONFIG_TWEAK(number/mc_tick_rate/ValidateAndSet(str_val))
. = ..()
if (.)
Master.UpdateTickRate()
+10
View File
@@ -573,3 +573,13 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
for(var/S in subsystems)
var/datum/controller/subsystem/SS = S
SS.StopLoadingMap()
/datum/controller/master/proc/UpdateTickRate()
if (!processing)
return
var/client_count = length(GLOB.clients)
if (client_count < CONFIG_GET(number/mc_tick_rate/disable_high_pop_mc_mode_amount))
processing = CONFIG_GET(number/mc_tick_rate/base_mc_tick_rate)
else if (client_count > CONFIG_GET(number/mc_tick_rate/high_pop_mc_mode_amount))
processing = CONFIG_GET(number/mc_tick_rate/high_pop_mc_tick_rate)
@@ -61,7 +61,7 @@ BONUS
if(power >= 1.5)
var/obj/item/I = M.get_active_held_item()
if(I && I.w_class == WEIGHT_CLASS_TINY)
M.drop_item()
M.dropItemToGround(I)
if(power >= 2 && prob(10))
to_chat(M, "<span notice='userdanger'>[pick("You have a coughing fit!", "You can't stop coughing!")]</span>")
M.Stun(20)
+3 -4
View File
@@ -85,7 +85,7 @@
"<span class='userdanger'>[A] strikes your abdomen, neck and back consecutively!</span>")
playsound(get_turf(D), 'sound/weapons/cqchit2.ogg', 50, 1, -1)
var/obj/item/I = D.get_active_held_item()
if(I && D.drop_item())
if(I && D.temporarilyRemoveItemFromInventory(I))
A.put_in_hands(I)
D.adjustStaminaLoss(50)
D.apply_damage(25, BRUTE)
@@ -145,7 +145,7 @@
D.visible_message("<span class='warning'>[A] strikes [D]'s jaw with their hand!</span>", \
"<span class='userdanger'>[A] strikes your jaw, disorienting you!</span>")
playsound(get_turf(D), 'sound/weapons/cqchit1.ogg', 50, 1, -1)
if(I && D.drop_item())
if(I && D.temporarilyRemoveItemFromInventory(I))
A.put_in_hands(I)
D.Jitter(2)
D.apply_damage(5, BRUTE)
@@ -193,7 +193,6 @@
to_chat(user, "<span class='boldannounce'>You remember the basics of CQC.</span>")
var/datum/martial_art/cqc/D = new(null)
D.teach(user)
user.drop_item()
visible_message("<span class='warning'>[src] beeps ominously, and a moment later it bursts up in flames.</span>")
new /obj/effect/decal/cleanable/ash(get_turf(src))
qdel(src)
new /obj/effect/decal/cleanable/ash(user.drop_location())
+1 -1
View File
@@ -150,7 +150,7 @@
if(prob(60))
I = D.get_active_held_item()
if(I)
if(D.drop_item())
if(D.temporarilyRemoveItemFromInventory(I))
A.put_in_hands(I)
D.visible_message("<span class='danger'>[A] has disarmed [D]!</span>", \
"<span class='userdanger'>[A] has disarmed [D]!</span>")
+4 -5
View File
@@ -41,7 +41,7 @@
"<span class='userdanger'>[A] grabs your wrist and violently wrenches it to the side!</span>")
playsound(get_turf(A), 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
D.emote("scream")
D.drop_item()
D.dropItemToGround(D.get_active_held_item())
D.apply_damage(5, BRUTE, pick("l_arm", "r_arm"))
D.Stun(60)
return 1
@@ -79,7 +79,7 @@
D.visible_message("<span class='warning'>[A] kicks [D] in the head!</span>", \
"<span class='userdanger'>[A] kicks you in the jaw!</span>")
D.apply_damage(20, BRUTE, "head")
D.drop_item()
D.drop_all_held_items()
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 50, 1, -1)
D.Stun(80)
return 1
@@ -168,10 +168,9 @@
to_chat(user, message)
var/datum/martial_art/the_sleeping_carp/theSleepingCarp = new(null)
theSleepingCarp.teach(user)
user.drop_item()
visible_message("<span class='warning'>[src] lights up in fire and quickly burns to ash.</span>")
new /obj/effect/decal/cleanable/ash(get_turf(src))
qdel(src)
visible_message("<span class='warning'>[src] lights up in fire and quickly burns to ash.</span>")
new /obj/effect/decal/cleanable/ash(user.drop_location())
/obj/item/twohanded/bostaff
name = "bo staff"
+1 -1
View File
@@ -270,7 +270,7 @@ GLOBAL_LIST_EMPTY(mutations_list)
/datum/mutation/human/cough/on_life(mob/living/carbon/human/owner)
if(prob(5) && owner.stat == CONSCIOUS)
owner.drop_item()
owner.drop_all_held_items()
owner.emote("cough")
/datum/mutation/human/dwarfism
+3 -2
View File
@@ -250,9 +250,10 @@
if(istype(I, /obj/item/device/assembly))
var/obj/item/device/assembly/A = I
if(A.attachable)
if(!L.drop_item())
if(!L.temporarilyRemoveItemFromInventory(A))
return
attach_assembly(target_wire, A)
if(!attach_assembly(target_wire, A))
A.forceMove(L.drop_location())
. = TRUE
else
to_chat(L, "<span class='warning'>You need an attachable assembly!</span>")
+1 -1
View File
@@ -90,7 +90,7 @@
if("healing")
M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/charge(null))
M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/forcewall(null))
M.put_in_hands_or_del(new /obj/item/gun/magic/staff/healing(M))
M.put_in_hands(new /obj/item/gun/magic/staff/healing(M), TRUE)
to_chat(M, "<B>Your service has not gone unrewarded, however. Studying under [wizard_name], you have learned livesaving survival spells. You are able to cast charge and forcewall.")
if("robeless")
M.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/knock(null))
@@ -37,8 +37,9 @@
return 1
/obj/effect/proc_holder/changeling/weapon/sting_action(mob/living/user)
if(!user.drop_item())
to_chat(user, "<span class='warning'>The [user.get_active_held_item()] is stuck to your hand, you cannot grow a [weapon_name_simple] over it!</span>")
var/obj/item/held = user.get_active_held_item()
if(held && !user.dropItemToGround(held))
to_chat(user, "<span class='warning'>[held] is stuck to your hand, you cannot grow a [weapon_name_simple] over it!</span>")
return
var/limb_regen = 0
if(user.active_hand_index % 2 == 0) //we regen the arm before changing it into the weapon
@@ -338,7 +339,7 @@
if(INTENT_DISARM)
var/obj/item/I = C.get_active_held_item()
if(I)
if(C.drop_item())
if(C.dropItemToGround(I))
C.visible_message("<span class='danger'>[I] is yanked off [C]'s hand by [src]!</span>","<span class='userdanger'>A tentacle pulls [I] away from you!</span>")
on_hit(I) //grab the item as if you had hit it directly with the tentacle
return 1
@@ -127,8 +127,9 @@
/obj/effect/proc_holder/changeling/sting/false_armblade/sting_action(mob/user, mob/target)
add_logs(user, target, "stung", object="falso armblade sting")
if(!target.drop_item())
to_chat(user, "<span class='warning'>The [target.get_active_held_item()] is stuck to their hand, you cannot grow a false armblade over it!</span>")
var/obj/item/held = target.get_active_held_item()
if(held && !target.dropItemToGround(held))
to_chat(user, "<span class='warning'>[held] is stuck to their hand, you cannot grow a false armblade over it!</span>")
return
if(ismonkey(target))
@@ -88,7 +88,7 @@
if(istype(I, /obj/item/clockwork/slab))
to_chat(user, "<span class='heavy_brass'>\"I don't think you want to drop your slab into that.\"\n\"If you really want to, try throwing it.\"</span>")
return TRUE
if(user.drop_item() && uses)
if(uses && user.dropItemToGround(I))
user.visible_message("<span class='warning'>[user] drops [I] into [src]!</span>", "<span class='danger'>You drop [I] into [src]!</span>")
pass_through_gateway(I, TRUE)
return TRUE
@@ -20,7 +20,6 @@
"<span class='alloy'>You crush [src], capturing its escaping energy for use as power.</span>")
playsound(user, 'sound/effects/pop_expl.ogg', 50, TRUE)
adjust_clockwork_power(POWER_WALL_TOTAL)
user.drop_item()
qdel(src)
/obj/item/clockwork/component/pickup(mob/living/user)
@@ -28,7 +28,6 @@
if(weapon.loc == owner)
owner.visible_message("<span class='danger'>[owner]'s [weapon.name] flickers and disappears!</span>")
to_chat(owner, "<span class='brass'>You dismiss [weapon].</span>")
owner.drop_item()
QDEL_NULL(weapon)
weapon_reset(RATVARIAN_SPEAR_COOLDOWN * 0.5)
return
@@ -136,7 +136,7 @@
to_chat(user, "<span class='heavy_brass'>\"You reek of blood. You've got a lot of nerve to even look at that slab.\"</span>")
user.visible_message("<span class='warning'>A sizzling sound comes from [user]'s hands!</span>", "<span class='userdanger'>[src] suddenly grows extremely hot in your hands!</span>")
playsound(get_turf(user), 'sound/weapons/sear.ogg', 50, 1)
user.drop_item()
user.dropItemToGround(src)
user.emote("scream")
user.apply_damage(5, BURN, "l_arm")
user.apply_damage(5, BURN, "r_arm")
@@ -90,7 +90,7 @@
if(!no_table_check)
return TRUE
return FALSE
if(get_clockwork_power(RATVAR_POWER_CHECK))
if(GLOB.ratvar_awakens)
fabrication_values["power_cost"] = 0
var/turf/Y = get_turf(user)
@@ -167,7 +167,7 @@
return FALSE
if(target.type != expected_type)
return FALSE
if(get_clockwork_power(RATVAR_POWER_CHECK))
if(GLOB.ratvar_awakens)
fabrication_values["power_cost"] = 0
if(!get_clockwork_power(fabrication_values["power_cost"]))
if(get_clockwork_power() - fabrication_values["power_cost"] < 0)
@@ -212,7 +212,7 @@
return FALSE
repair_values["healing_for_cycle"] = min(repair_values["amount_to_heal"], FABRICATOR_REPAIR_PER_TICK) //modify the healing for this cycle
repair_values["power_required"] = round(repair_values["healing_for_cycle"]*MIN_CLOCKCULT_POWER, MIN_CLOCKCULT_POWER) //and get the power cost from that
if(!get_clockwork_power(RATVAR_POWER_CHECK) && !get_clockwork_power(repair_values["power_required"]))
if(!GLOB.ratvar_awakens && !get_clockwork_power(repair_values["power_required"]))
if(!silent)
to_chat(user, "<span class='warning'>You need at least <b>[DisplayPower(repair_values["power_required"])]</b> power to start repairin[target == user ? "g yourself" : "g [target]"], and at least \
<b>[DisplayPower(repair_values["amount_to_heal"]*MIN_CLOCKCULT_POWER, MIN_CLOCKCULT_POWER)]</b> to fully repair [target == user ? "yourself" : "[target.p_them()]"]!</span>")
+2 -5
View File
@@ -21,7 +21,6 @@
if(invoke(user))
uses--
if(uses <= 0)
user.drop_item()
qdel(src)
/obj/item/paper/talisman/proc/invoke(mob/living/user, successfuluse = 1)
@@ -182,7 +181,6 @@
C.Jitter(15)
if(is_servant_of_ratvar(target))
target.adjustBruteLoss(15)
user.drop_item()
qdel(src)
return
..()
@@ -204,13 +202,13 @@
user.equip_to_slot_or_del(new /obj/item/clothing/suit/cultrobes/alt(user), slot_wear_suit)
user.equip_to_slot_or_del(new /obj/item/clothing/shoes/cult/alt(user), slot_shoes)
user.equip_to_slot_or_del(new /obj/item/storage/backpack/cultpack(user), slot_back)
user.drop_item()
user.dropItemToGround(src)
user.put_in_hands(new /obj/item/melee/cultblade(user))
user.put_in_hands(new /obj/item/restraints/legcuffs/bola/cult(user))
/obj/item/paper/talisman/armor/attack(mob/living/target, mob/living/user)
if(iscultist(user) && iscultist(target))
user.drop_item()
user.temporarilyRemoveItemFromInventory(src)
invoke(target)
qdel(src)
return
@@ -335,7 +333,6 @@
else
to_chat(user, "<span class='warning'>[C] is already bound.</span>")
if(uses <= 0)
user.drop_item()
qdel(src)
/obj/item/restraints/handcuffs/energy/cult //For the talisman of shackling
@@ -184,7 +184,7 @@
"<span class='userdanger'>[M] has pushed down [src]!</span>")
else
if (prob(25))
drop_item()
dropItemToGround(get_active_held_item())
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("<span class='danger'>[M] has disarmed [src]!</span>", \
"<span class='userdanger'>[M] has disarmed [src]!</span>")
@@ -49,7 +49,7 @@
/datum/surgery_step/gland_insert/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] inserts [tool] into [target].", "<span class ='notice'>You insert [tool] into [target].</span>")
user.drop_item()
user.temporarilyRemoveItemFromInventory(tool, TRUE)
var/obj/item/organ/heart/gland/gland = tool
gland.Insert(target, 2)
return 1
@@ -353,7 +353,7 @@
return ..()
user.visible_message("<span class='notice'>[user] scatters [src] in all directions.</span>", \
"<span class='notice'>You scatter [src] across the area. The particles slowly fade away.</span>")
user.drop_item()
user.dropItemToGround(src)
scatter()
/obj/item/ectoplasm/revenant/throw_impact(atom/hit_atom)
@@ -97,7 +97,7 @@
return
user.visible_message("<span class='warning'>[user]'s eyes flare a deep crimson!</span>", \
"<span class='userdanger'>You feel a strange power seep into your body... you have absorbed the demon's blood-travelling powers!</span>")
user.drop_item()
user.temporarilyRemoveItemFromInventory(src, TRUE)
src.Insert(user) //Consuming the heart literally replaces your heart with a demon heart. H A R D C O R E
/obj/item/organ/heart/demon/Insert(mob/living/carbon/M, special = 0)
+2 -3
View File
@@ -91,7 +91,7 @@
to_chat(synd_mind.current, "<B>In your hand you will find a special item capable of triggering a greater challenge for your team. Examine it carefully and consult with your fellow operatives before activating it.</B>")
var/obj/item/device/nuclear_challenge/challenge = new /obj/item/device/nuclear_challenge
synd_mind.current.put_in_hands_or_del(challenge)
synd_mind.current.put_in_hands(challenge, TRUE)
var/list/foundIDs = synd_mind.current.search_contents_for(/obj/item/card/id)
if(foundIDs.len)
@@ -110,8 +110,7 @@
P.info = "The nuclear authorization code is: <b>[nuke_code]</b>"
P.name = "nuclear bomb code"
var/mob/living/carbon/human/H = synd_mind.current
P.forceMove(H.drop_location())
H.put_in_hands_or_del(P)
H.put_in_hands(P, TRUE)
H.update_icons()
else
nuke_code = "code will be provided later"
+3 -6
View File
@@ -105,9 +105,8 @@
/obj/machinery/nuclearbomb/attackby(obj/item/I, mob/user, params)
if (istype(I, /obj/item/disk/nuclear))
if(!user.drop_item())
if(!user.transferItemToLoc(I, src))
return
I.forceMove(src)
auth = I
add_fingerprint(user)
return
@@ -309,10 +308,8 @@
. = TRUE
if("insert_disk")
if(!auth)
var/obj/item/I = usr.get_active_held_item()
if(istype(I, /obj/item/disk/nuclear))
usr.drop_item()
I.forceMove(src)
var/obj/item/I = usr.is_holding_item_of_type(/obj/item/disk/nuclear)
if(I && usr.transferItemToLoc(I, src))
auth = I
. = TRUE
if("keypad")
+2 -2
View File
@@ -193,8 +193,8 @@
H.equip_to_slot_or_del(new hat(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/clothing/under/roman(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/roman(H), slot_shoes)
H.put_in_hands_or_del(new /obj/item/shield/riot/roman(H))
H.put_in_hands_or_del(new /obj/item/claymore(H))
H.put_in_hands(new /obj/item/shield/riot/roman(H), TRUE)
H.put_in_hands(new /obj/item/claymore(H), TRUE)
H.equip_to_slot_or_del(new /obj/item/twohanded/spear(H), slot_back)
+1 -1
View File
@@ -159,7 +159,7 @@
wizard_mob.equip_to_slot_or_del(new /obj/item/teleportation_scroll(wizard_mob), slot_r_store)
var/obj/item/spellbook/spellbook = new /obj/item/spellbook(wizard_mob)
spellbook.owner = wizard_mob
wizard_mob.put_in_hands_or_del(spellbook)
wizard_mob.put_in_hands(spellbook, TRUE)
to_chat(wizard_mob, "You will find a list of available spells in your spell book. Choose your magic arsenal carefully.")
to_chat(wizard_mob, "The spellbook is bound to you, and others cannot use it.")
+5 -9
View File
@@ -71,15 +71,11 @@
if(storedpda)
to_chat(user, "<span class='warning'>There is already a PDA inside!</span>")
return
else
var/obj/item/device/pda/P = user.get_active_held_item()
if(istype(P))
if(!user.drop_item())
return
storedpda = P
P.loc = src
P.add_fingerprint(user)
update_icon()
else if(!user.transferItemToLoc(O, src))
return
storedpda = O
O.add_fingerprint(user)
update_icon()
else if(istype(O, /obj/item/weldingtool) && user.a_intent != INTENT_HARM)
var/obj/item/weldingtool/WT = O
+2 -2
View File
@@ -149,10 +149,10 @@
else if(istype(W, /obj/item/device/analyzer))
if(!isXRay())
if(!user.drop_item(W))
if(!user.temporarilyRemoveItemFromInventory(W))
return
upgradeXRay()
qdel(W)
upgradeXRay()
to_chat(user, "[msg]")
else
to_chat(user, "[msg2]")
@@ -109,11 +109,10 @@
// Upgrades!
if(is_type_in_typecache(W, possible_upgrades) && !is_type_in_list(W, upgrades)) // Is a possible upgrade and isn't in the camera already.
if(!user.drop_item(W))
if(!user.transferItemToLoc(W, src))
return
to_chat(user, "<span class='notice'>You attach \the [W] into the assembly inner circuits.</span>")
upgrades += W
W.forceMove(src)
return
// Taking out upgrades
@@ -92,18 +92,13 @@
beacon = findbeacon()
if("handle_id")
if(id)
if(!usr.get_active_held_item())
usr.put_in_hands(id)
id = null
else
id.forceMove(get_turf(src))
id = null
usr.put_in_hands(id)
id = null
else
var/obj/item/I = usr.get_active_held_item()
if(istype(I, /obj/item/card/id/prisoner))
if(!usr.drop_item())
var/obj/item/I = usr.is_holding_item_of_type(/obj/item/card/id/prisoner)
if(I)
if(!usr.transferItemToLoc(I, src))
return
I.forceMove(src)
id = I
if("set_goal")
var/new_goal = input("Set the amount of points:", "Points", id.goal) as num|null
+6 -11
View File
@@ -27,9 +27,8 @@
/obj/machinery/computer/med_data/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/card/id) && !scan)
if(!user.drop_item())
if(!user.transferItemToLoc(O, src))
return
O.loc = src
scan = O
to_chat(user, "<span class='notice'>You insert [O].</span>")
else
@@ -215,17 +214,13 @@
src.temp = null
if(href_list["scan"])
if(src.scan)
if(ishuman(usr) && !usr.get_active_held_item())
usr.put_in_hands(scan)
else
scan.loc = get_turf(src)
src.scan = null
usr.put_in_hands(scan)
scan = null
else
var/obj/item/I = usr.get_active_held_item()
if(istype(I, /obj/item/card/id))
if(!usr.drop_item())
var/obj/item/I = usr.is_holding_item_of_type(/obj/item/card/id)
if(I)
if(!usr.transferItemToLoc(I, src))
return
I.loc = src
src.scan = I
else if(href_list["logout"])
src.authenticated = null
+3 -4
View File
@@ -90,11 +90,10 @@
if(href_list["id"])
if(href_list["id"] =="insert" && !inserted_id)
var/obj/item/card/id/prisoner/I = usr.get_active_held_item()
if(istype(I))
if(!usr.drop_item())
var/obj/item/card/id/prisoner/I = usr.is_holding_item_of_type(/obj/item/card/id/prisoner)
if(I)
if(!usr.transferItemToLoc(I, src))
return
I.loc = src
inserted_id = I
else
to_chat(usr, "<span class='danger'>No valid ID.</span>")
+5 -10
View File
@@ -37,9 +37,8 @@
/obj/machinery/computer/secure_data/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/card/id))
if(!scan)
if(!user.drop_item())
if(!user.transferItemToLoc(O, src))
return
O.loc = src
scan = O
to_chat(user, "<span class='notice'>You insert [O].</span>")
else
@@ -303,17 +302,13 @@ What a mess.*/
if("Confirm Identity")
if(scan)
if(ishuman(usr) && !usr.get_active_held_item())
usr.put_in_hands(scan)
else
scan.loc = get_turf(src)
usr.put_in_hands(scan)
scan = null
else
var/obj/item/I = usr.get_active_held_item()
if(istype(I, /obj/item/card/id))
if(!usr.drop_item())
var/obj/item/I = usr.is_holding_item_of_type(/obj/item/card/id)
if(I)
if(!usr.transferItemToLoc(I, src))
return
I.loc = src
scan = I
if("Log Out")
@@ -29,21 +29,19 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
ID = rand(1,999)
name = "[name] [ID]"
/obj/machinery/computer/telecrystals/uplinker/attackby(obj/item/O, mob/user, params)
/obj/machinery/computer/telecrystals/uplinker/attackby(obj/item/I, mob/user, params)
if(uplinkholder)
to_chat(user, "<span class='notice'>The [src] already has an uplink in it.</span>")
return
if(O.hidden_uplink)
var/obj/item/I = user.get_active_held_item()
if(!user.drop_item())
if(I.hidden_uplink)
if(!user.transferItemToLoc(I, src))
return
uplinkholder = I
I.loc = src
I.add_fingerprint(user)
update_icon()
updateUsrDialog()
else
to_chat(user, "<span class='notice'>The [O] doesn't appear to be an uplink...</span>")
to_chat(user, "<span class='notice'>[I] doesn't appear to be an uplink...</span>")
/obj/machinery/computer/telecrystals/uplinker/update_icon()
..()
+2 -4
View File
@@ -128,12 +128,11 @@
to_chat(user, "<span class='warning'>The frame needs to be secured first!</span>")
return
var/obj/item/circuitboard/machine/B = P
if(!user.drop_item())
if(!user.transferItemToLoc(B, src))
return
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
to_chat(user, "<span class='notice'>You add the circuit board to the frame.</span>")
circuit = B
B.loc = src
icon_state = "box_2"
state = 3
components = list()
@@ -239,10 +238,9 @@
req_components[I] -= used_amt
to_chat(user, "<span class='notice'>You add [P] to [src].</span>")
return
if(!user.drop_item())
if(!user.transferItemToLoc(P, src))
break
to_chat(user, "<span class='notice'>You add [P] to [src].</span>")
P.forceMove(src)
components += P
req_components[I]--
return 1
+1 -2
View File
@@ -1170,10 +1170,9 @@
to_chat(user, "<span class='warning'>The maintenance panel is destroyed!</span>")
return
to_chat(user, "<span class='warning'>You apply [C]. Next time someone opens the door, it will explode.</span>")
user.drop_item()
panel_open = FALSE
update_icon()
C.forceMove(src)
user.transferItemToLoc(C, src, TRUE)
charge = C
else if(istype(C, /obj/item/paper) || istype(C, /obj/item/photo))
if(note)
-1
View File
@@ -426,7 +426,6 @@
return
if(constructionStep != CONSTRUCTION_NOCIRCUIT)
return
user.drop_item()
qdel(C)
user.visible_message("<span class='notice'>[user] adds a circuit to [src].</span>", \
"<span class='notice'>You insert and secure [C].</span>")
+1 -2
View File
@@ -63,10 +63,9 @@
else if (istype(W, /obj/item/device/assembly/flash/handheld))
if (!bulb)
if(!user.drop_item())
if(!user.transferItemToLoc(W, src))
return
user.visible_message("[user] installs [W] into [src].", "<span class='notice'>You install [W] into [src].</span>")
W.forceMove(src)
bulb = W
power_change()
else
+6 -12
View File
@@ -33,9 +33,8 @@
/obj/machinery/gulag_item_reclaimer/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/card/id/prisoner))
if(!inserted_id)
if(!user.drop_item())
if(!user.transferItemToLoc(I, src))
return
I.forceMove(src)
inserted_id = I
to_chat(user, "<span class='notice'>You insert [I].</span>")
return
@@ -82,18 +81,13 @@
switch(action)
if("handle_id")
if(inserted_id)
if(!usr.get_active_held_item())
usr.put_in_hands(inserted_id)
inserted_id = null
else
inserted_id.forceMove(get_turf(src))
inserted_id = null
usr.put_in_hands(inserted_id)
inserted_id = null
else
var/obj/item/I = usr.get_active_held_item()
if(istype(I, /obj/item/card/id/prisoner))
if(!usr.drop_item())
var/obj/item/I = usr.is_holding_item_of_type(/obj/item/card/id/prisoner)
if(I)
if(!usr.transferItemToLoc(I, src))
return
I.forceMove(src)
inserted_id = I
if("release_items")
var/mob/M = locate(params["mobref"])
+1 -3
View File
@@ -95,10 +95,8 @@
if(beaker)
to_chat(user, "<span class='warning'>There is already a reagent container loaded!</span>")
return
if(!user.drop_item())
if(!user.transferItemToLoc(W, src))
return
W.forceMove(src)
beaker = W
to_chat(user, "<span class='notice'>You attach [W] to [src].</span>")
update_icon()
+3 -5
View File
@@ -786,11 +786,9 @@ GLOBAL_LIST_EMPTY(allCasters)
else
qdel(photo)
photo = null
if(istype(user.get_active_held_item(), /obj/item/photo))
photo = user.get_active_held_item()
if(!user.drop_item())
return
photo.loc = src
photo = user.is_holding_item_of_type(/obj/item/photo)
if(photo && !user.transferItemToLoc(photo, src))
photo = null
if(issilicon(user))
var/list/nametemp = list()
var/find
@@ -71,8 +71,6 @@
add_fingerprint(user)
if (istype(W, /obj/item/pipe) || istype(W, /obj/item/pipe_meter))
to_chat(usr, "<span class='notice'>You put [W] back into [src].</span>")
if(!user.drop_item())
return
qdel(W)
return
else if (istype(W, /obj/item/wrench))
@@ -84,9 +84,8 @@
if(PTURRET_INTERNAL_ARMOUR_ON)
if(istype(I, /obj/item/gun/energy)) //the gun installation part
var/obj/item/gun/energy/E = I
if(!user.drop_item())
if(!user.transferItemToLoc(E, src))
return
E.forceMove(src)
installed_gun = E
to_chat(user, "<span class='notice'>You add [I] to the turret.</span>")
build_step = PTURRET_GUN_EQUIPPED
@@ -101,7 +100,7 @@
if(PTURRET_GUN_EQUIPPED)
if(isprox(I))
build_step = PTURRET_SENSORS_ON
if(!user.drop_item())
if(!user.temporarilyRemoveItemFromInventory(I))
return
to_chat(user, "<span class='notice'>You add the proximity sensor to the turret.</span>")
qdel(I)
+1 -2
View File
@@ -50,9 +50,8 @@
to_chat(user, "<span class='notice'>Your gun has no external power connector.</span>")
return 1
if(!user.drop_item())
if(!user.transferItemToLoc(G, src))
return 1
G.loc = src
charging = G
use_power = ACTIVE_POWER_USE
update_icon(scan = TRUE)
+2 -3
View File
@@ -83,16 +83,15 @@
if(istype(I, /obj/item/coin))
var/obj/item/coin/C = I
if(prob(2))
if(!user.drop_item())
if(!user.transferItemToLoc(C, drop_location()))
return
C.loc = loc
C.throw_at(user, 3, 10)
if(prob(10))
balance = max(balance - SPIN_PRICE, 0)
to_chat(user, "<span class='warning'>[src] spits your coin back out!</span>")
else
if(!user.drop_item())
if(!user.temporarilyRemoveItemFromInventory(C))
return
to_chat(user, "<span class='notice'>You insert a [C.cmineral] coin into [src]'s slot!</span>")
balance += C.value
+6 -11
View File
@@ -140,18 +140,13 @@
if(cell)
to_chat(user, "<span class='warning'>There is already a power cell inside!</span>")
return
else
// insert cell
var/obj/item/stock_parts/cell/C = usr.get_active_held_item()
if(istype(C))
if(!user.drop_item())
return
cell = C
C.loc = src
C.add_fingerprint(usr)
else if(!user.transferItemToLoc(I, src))
return
cell = I
I.add_fingerprint(usr)
user.visible_message("\The [user] inserts a power cell into \the [src].", "<span class='notice'>You insert the power cell into \the [src].</span>")
SStgui.update_uis(src)
user.visible_message("\The [user] inserts a power cell into \the [src].", "<span class='notice'>You insert the power cell into \the [src].</span>")
SStgui.update_uis(src)
else
to_chat(user, "<span class='warning'>The hatch must be open to insert a power cell!</span>")
return
+4 -5
View File
@@ -298,32 +298,31 @@
if(suit)
to_chat(user, "<span class='warning'>The unit already contains a suit!.</span>")
return
if(!user.drop_item())
if(!user.transferItemToLoc(I, src))
return
suit = I
else if(istype(I, /obj/item/clothing/head/helmet))
if(helmet)
to_chat(user, "<span class='warning'>The unit already contains a helmet!</span>")
return
if(!user.drop_item())
if(!user.transferItemToLoc(I, src))
return
helmet = I
else if(istype(I, /obj/item/clothing/mask))
if(mask)
to_chat(user, "<span class='warning'>The unit already contains a mask!</span>")
return
if(!user.drop_item())
if(!user.transferItemToLoc(I, src))
return
mask = I
else
if(storage)
to_chat(user, "<span class='warning'>The auxiliary storage compartment is full!</span>")
return
if(!user.drop_item())
if(!user.transferItemToLoc(I, src))
return
storage = I
I.loc = src
visible_message("<span class='notice'>[user] inserts [I] into [src]</span>", "<span class='notice'>You load [I] into [src].</span>")
update_icon()
return
+2 -4
View File
@@ -150,11 +150,10 @@
to_chat(user, "<span class='warning'>The cover is screwed on, it won't pry off!</span>")
else if(istype(I, /obj/item/bombcore))
if(!payload)
if(!user.drop_item())
if(!user.transferItemToLoc(I, src))
return
payload = I
to_chat(user, "<span class='notice'>You place [payload] into [src].</span>")
payload.loc = src
else
to_chat(user, "<span class='warning'>[payload] is already loaded into [src]! You'll have to remove it first.</span>")
else if(istype(I, /obj/item/weldingtool))
@@ -463,11 +462,10 @@
return
else if(istype(I, /obj/item/reagent_containers/glass/beaker) || istype(I, /obj/item/reagent_containers/glass/bottle))
if(beakers.len < max_beakers)
if(!user.drop_item())
if(!user.transferItemToLoc(I, src))
return
beakers += I
to_chat(user, "<span class='notice'>You load [src] with [I].</span>")
I.loc = src
else
to_chat(user, "<span class='warning'>The [I] wont fit! The [src] can only hold up to [max_beakers] containers.</span>")
return
+2 -4
View File
@@ -189,9 +189,8 @@
var/obj/item/reagent_containers/food/snacks/S = W
if(!S.junkiness)
if(!iscompartmentfull(user))
if(!user.drop_item())
if(!user.transferItemToLoc(W, src))
return
W.loc = src
food_load(W)
to_chat(user, "<span class='notice'>You insert [W] into [src]'s chef compartment.</span>")
else
@@ -279,9 +278,8 @@
if(!premium.len)
to_chat(user, "<span class='warning'>[src] doesn't have a coin slot.</span>")
return
if(!user.drop_item())
if(!user.transferItemToLoc(W, src))
return
W.loc = src
coin = W
to_chat(user, "<span class='notice'>You insert [W] into [src].</span>")
return
@@ -430,7 +430,7 @@
if(!istype(T))
return
var/datum/gas_mixture/GM = new
GM.assert_gas("plasma")
ASSERT_GAS("plasma", GM)
if(prob(10))
GM.gases["plasma"][MOLES] += 100
GM.temperature = 1500+T0C //should be enough to start a fire
+1
View File
@@ -30,6 +30,7 @@
var/dir_in = 2//What direction will the mech face when entered/powered on? Defaults to South.
var/step_energy_drain = 10
var/melee_energy_drain = 15
var/overload_step_energy_drain_min = 100
max_integrity = 300 //max_integrity is base health
var/deflect_chance = 10 //chance to deflect the incoming projectiles, hits, or lesser the effect of ex_act.
armor = list(melee = 20, bullet = 10, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 100)
+1 -1
View File
@@ -203,7 +203,7 @@
chassis.leg_overload_mode = 1
chassis.bumpsmash = 1
chassis.step_in = min(1, round(chassis.step_in/2))
chassis.step_energy_drain = chassis.step_energy_drain*chassis.leg_overload_coeff
chassis.step_energy_drain = max(chassis.overload_step_energy_drain_min,chassis.step_energy_drain*chassis.leg_overload_coeff)
chassis.occupant_message("<span class='danger'>You enable leg actuators overload.</span>")
else
chassis.leg_overload_mode = 0
+2 -3
View File
@@ -161,7 +161,7 @@
var/obj/item/mecha_parts/mecha_equipment/E = W
spawn()
if(E.can_attach(src))
if(!user.drop_item())
if(!user.temporarilyRemoveItemFromInventory(W))
return
E.attach(src)
user.visible_message("[user] attaches [W] to [src].", "<span class='notice'>You attach [W] to [src].</span>")
@@ -226,11 +226,10 @@
else if(istype(W, /obj/item/stock_parts/cell))
if(state==4)
if(!cell)
if(!user.drop_item())
if(!user.transferItemToLoc(W, src))
return
var/obj/item/stock_parts/cell/C = W
to_chat(user, "<span class='notice'>You install the powercell.</span>")
C.forceMove(src)
cell = C
log_message("Powercell installed")
else
@@ -128,7 +128,7 @@
/obj/effect/particle_effect/smoke/bad/smoke_mob(mob/living/carbon/M)
if(..())
M.drop_item()
M.drop_all_held_items()
M.adjustOxyLoss(1)
M.emote("cough")
return 1
@@ -169,7 +169,7 @@
qdel(H)
var/list/G_gases = G.gases
if(G_gases["plasma"])
G.assert_gas("n2")
ASSERT_GAS("n2", G)
G_gases["n2"][MOLES] += (G_gases["plasma"][MOLES])
G_gases["plasma"][MOLES] = 0
G.garbage_collect()
@@ -205,7 +205,6 @@
/obj/effect/particle_effect/smoke/sleeping/smoke_mob(mob/living/carbon/M)
if(..())
M.drop_item()
M.Sleeping(200)
M.emote("cough")
return 1
+1 -1
View File
@@ -529,7 +529,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
to_chat(M, "<span class='danger'>You become nearsighted!</span>")
if(prob(50))
if(M.stat != DEAD)
if(M.drop_item())
if(M.drop_all_held_items())
to_chat(M, "<span class='danger'>You drop what you're holding and clutch at your eyes!</span>")
M.adjust_blurriness(10)
M.Unconscious(20)
+1 -1
View File
@@ -513,7 +513,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(!lit)
set_lit(TRUE)
if(fancy)
user.visible_message("Without even breaking stride, [user] flips open and lights [src] in one smooth movement.", "<span class='notice'>Without even breaking stride, you flip open and lights [src] in one smooth movement.</span>")
user.visible_message("Without even breaking stride, [user] flips open and lights [src] in one smooth movement.", "<span class='notice'>Without even breaking stride, you flip open and light [src] in one smooth movement.</span>")
else
var/prot = FALSE
var/mob/living/carbon/human/H = user
+2 -2
View File
@@ -59,7 +59,7 @@
if(target.handcuffed)
return
if(!user.drop_item() && !dispense)
if(!user.temporarilyRemoveItemFromInventory(src) && !dispense)
return
var/obj/item/restraints/handcuffs/cuffs = src
@@ -68,7 +68,7 @@
else if(dispense)
cuffs = new type()
cuffs.loc = target
cuffs.forceMove(target)
target.handcuffed = cuffs
target.update_handcuffed()
+3 -3
View File
@@ -233,7 +233,7 @@
/obj/item/melee/supermatter_sword/afterattack(target, mob/user, proximity_flag)
if(user && target == user)
user.drop_item()
user.dropItemToGround(src)
if(proximity_flag)
consume_everything(target)
..()
@@ -243,7 +243,7 @@
if(ismob(target))
var/mob/M
if(src.loc == M)
M.drop_item()
M.dropItemToGround(src)
consume_everything(target)
/obj/item/melee/supermatter_sword/pickup(user)
@@ -267,7 +267,7 @@
/obj/item/melee/supermatter_sword/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] touches [src]'s blade. It looks like [user.p_theyre()] tired of waiting for the radiation to kill [user.p_them()]!</span>")
user.drop_item()
user.dropItemToGround(src, TRUE)
shard.CollidedWith(user)
/obj/item/melee/supermatter_sword/proc/consume_everything(target)
+1 -2
View File
@@ -7,8 +7,7 @@
var/obj/machinery/machine
/obj/item/pai_cable/proc/plugin(obj/machinery/M, mob/living/user)
if(!user.drop_item())
if(!user.transferItemToLoc(src, M))
return
user.visible_message("[user] inserts [src] into a data port on [M].", "<span class='notice'>You insert [src] into a data port on [M].</span>", "<span class='italics'>You hear the satisfying click of a wire jack fastening into place.</span>")
src.loc = M
machine = M
+1 -1
View File
@@ -122,7 +122,7 @@
return
if(user.disabilities & CLUMSY && prob(75) && clumsyCheck)
user.visible_message("<span class='warning'>[user] loses their grip on [src], causing it to go off!</span>", "<span class='userdanger'>[src] slips out of your hands and goes off!</span>")
user.drop_item()
user.dropItemToGround(src, TRUE)
if(prob(10))
target = get_turf(user)
else
+1 -1
View File
@@ -254,7 +254,7 @@
if(!isturf(loc))
to_chat(user, "<span class='warning'>You cannot install[M], the frame has to be standing on the ground to be perfectly precise!</span>")
return
if(!user.drop_item())
if(!user.temporarilyRemoveItemFromInventory(M))
to_chat(user, "<span class='warning'>[M] is stuck to your hand!</span>")
return
qdel(M)
+1 -1
View File
@@ -48,7 +48,7 @@
/obj/item/storage/backpack/holding/suicide_act(mob/living/user)
user.visible_message("<span class='suicide'>[user] is jumping into [src]! It looks like [user.p_theyre()] trying to commit suicide.</span>")
user.drop_item()
user.dropItemToGround(src, TRUE)
user.Stun(100, ignore_canstun = TRUE)
sleep(20)
playsound(src, "rustle", 50, 1, -5)
+2 -4
View File
@@ -57,11 +57,9 @@
close_all()
to_chat(user, "<span class='notice'>You fold [src] flat.</span>")
var/obj/item/I = new foldable(get_turf(src))
user.drop_item()
user.put_in_hands(I)
user.update_inv_hands()
var/obj/item/I = new foldable
qdel(src)
user.put_in_hands(I)
/obj/item/storage/box/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/stack/packageWrap))
+2 -2
View File
@@ -17,7 +17,7 @@
/obj/item/tank/jetpack/New()
..()
if(gas_type)
air_contents.assert_gas(gas_type)
ASSERT_GAS(gas_type,air_contents)
air_contents.gases[gas_type][MOLES] = (6 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C)
ion_trail = new
@@ -193,7 +193,7 @@
//Return a jetpack that the mob can use
//Back worn jetpacks, hardsuit internal packs, and so on.
//Used in Process_Spacemove() and wherever you want to check for/get a jetpack
//Used in Process_Spacemove() and wherever you want to check for/get a jetpack
/mob/proc/get_jetpack()
return
+7 -10
View File
@@ -21,7 +21,7 @@
/obj/item/tank/internals/oxygen/New()
..()
air_contents.assert_gas("o2")
ASSERT_GAS("o2", air_contents)
air_contents.gases["o2"][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
@@ -87,7 +87,7 @@
/obj/item/tank/internals/plasma/New()
..()
air_contents.assert_gas("plasma")
ASSERT_GAS("plasma", air_contents)
air_contents.gases["plasma"][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
@@ -105,8 +105,7 @@
return ..()
/obj/item/tank/internals/plasma/full/New()
..()
air_contents.assert_gas("plasma")
..() // Plasma asserted in parent
air_contents.gases["plasma"][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
@@ -125,13 +124,12 @@
/obj/item/tank/internals/plasmaman/New()
..()
air_contents.assert_gas("plasma")
ASSERT_GAS("plasma", air_contents)
air_contents.gases["plasma"][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/tank/internals/plasmaman/full/New()
..()
air_contents.assert_gas("plasma")
..() // Plasma asserted in parent
air_contents.gases["plasma"][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
@@ -145,8 +143,7 @@
w_class = WEIGHT_CLASS_SMALL //thanks i forgot this
/obj/item/tank/internals/plasmaman/belt/full/New()
..()
air_contents.assert_gas("plasma")
..() // Plasma asserted in parent
air_contents.gases["plasma"][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
@@ -169,7 +166,7 @@
/obj/item/tank/internals/emergency_oxygen/New()
..()
air_contents.assert_gas("o2")
ASSERT_GAS("o2", air_contents)
air_contents.gases["o2"][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
+4 -4
View File
@@ -1023,8 +1023,8 @@
throwforce = 12 //pelt your enemies to death with lumps of snow
/obj/item/toy/snowball/afterattack(atom/target as mob|obj|turf|area, mob/user)
user.drop_item()
src.throw_at(target, throw_range, throw_speed)
if(user.dropItemToGround(src))
throw_at(target, throw_range, throw_speed)
/obj/item/toy/snowball/throw_impact(atom/hit_atom)
if(!..())
@@ -1042,8 +1042,8 @@
w_class = WEIGHT_CLASS_BULKY //Stops people from hiding it in their bags/pockets
/obj/item/toy/beach_ball/afterattack(atom/target as mob|obj|turf|area, mob/user)
user.drop_item()
src.throw_at(target, throw_range, throw_speed)
if(user.dropItemToGround(src))
throw_at(target, throw_range, throw_speed)
/*
* Xenomorph action figure
+1 -1
View File
@@ -53,7 +53,7 @@
return
if(iscyborg(user))
return
if(!user.drop_item())
if(!user.drop_all_held_items())
return
if (O.loc != src.loc)
step(O, get_dir(O, src))
@@ -58,14 +58,14 @@
playsound(src.loc, W.usesound, 50, 1)
deconstruct()
else if(istype(W, /obj/item/assembly/shock_kit))
if(!user.drop_item())
if(!user.temporarilyRemoveItemFromInventory(W))
return
var/obj/item/assembly/shock_kit/SK = W
var/obj/structure/chair/e_chair/E = new /obj/structure/chair/e_chair(src.loc)
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
E.setDir(dir)
E.part = SK
SK.loc = E
SK.forceMove(E)
SK.master = E
qdel(src)
else
+4 -5
View File
@@ -27,7 +27,8 @@ LINEN BINS
..()
/obj/item/bedsheet/attack_self(mob/user)
user.drop_item()
if(!user.dropItemToGround(src))
return
if(layer == initial(layer))
layer = ABOVE_MOB_LAYER
to_chat(user, "<span class='notice'>You cover yourself with [src].</span>")
@@ -275,18 +276,16 @@ LINEN BINS
/obj/structure/bedsheetbin/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/bedsheet))
if(!user.drop_item())
if(!user.transferItemToLoc(I, src))
return
I.loc = src
sheets.Add(I)
amount++
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
update_icon()
else if(amount && !hidden && I.w_class < WEIGHT_CLASS_BULKY) //make sure there's sheets to hide it among, make sure nothing else is hidden in there.
if(!user.drop_item())
if(!user.transferItemToLoc(I, src))
to_chat(user, "<span class='warning'>\The [I] is stuck to your hand, you cannot hide it among the sheets!</span>")
return
I.loc = src
hidden = I
to_chat(user, "<span class='notice'>You hide [I] among the sheets.</span>")
@@ -229,8 +229,7 @@
"<span class='notice'>You cut \the [src] apart with \the [W].</span>")
deconstruct(TRUE)
return 0
if(user.drop_item()) // so we put in unlit welder too
W.forceMove(loc)
if(user.transferItemToLoc(W, drop_location())) // so we put in unlit welder too
return 1
else if(istype(W, /obj/item/weldingtool) && can_weld_shut)
var/obj/item/weldingtool/WT = W
@@ -603,10 +603,9 @@
if(do_after(user, 40, target = src))
if( src.state != 1 )
return
if(!user.drop_item())
if(!user.transferItemToLoc(W, src))
return
W.loc = src
to_chat(user, "<span class='notice'>You install the airlock electronics.</span>")
src.state = 2
src.name = "near finished airlock assembly"
+1 -2
View File
@@ -54,9 +54,8 @@
return
if(istype(I, /obj/item/extinguisher))
if(!stored_extinguisher && opened)
if(!user.drop_item())
if(!user.transferItemToLoc(I, src))
return
contents += I
stored_extinguisher = I
to_chat(user, "<span class='notice'>You place [I] in [src].</span>")
update_icon()
+1 -2
View File
@@ -53,10 +53,9 @@
if(F.wielded)
to_chat(user, "<span class='warning'>Unwield the [F.name] first.</span>")
return
if(!user.drop_item())
if(!user.transferItemToLoc(F, src))
return
fireaxe = F
F.forceMove(src)
to_chat(user, "<span class='caution'>You place the [F.name] back in the [name].</span>")
update_icon()
return
+1 -2
View File
@@ -259,9 +259,8 @@
else if(istype(W, /obj/item/pipe))
var/obj/item/pipe/P = W
if (P.pipe_type in list(0, 1, 5)) //simple pipes, simple bends, and simple manifolds.
if(!user.drop_item())
if(!user.transferItemToLoc(P, drop_location()))
return
P.loc = src.loc
to_chat(user, "<span class='notice'>You fit the pipe into \the [src].</span>")
else
return ..()
+1 -2
View File
@@ -39,9 +39,8 @@
return
if(istype(I, gun_category) && open)
if(LAZYLEN(contents) < capacity)
if(!user.drop_item())
if(!user.transferItemToLoc(I, src))
return
I.forceMove(src)
to_chat(user, "<span class='notice'>You place [I] in [src].</span>")
update_icon()
else
+1 -2
View File
@@ -32,9 +32,8 @@
return 1
/obj/structure/janitorialcart/proc/put_in_cart(obj/item/I, mob/user)
if(!user.drop_item())
if(!user.transferItemToLoc(I, src))
return
I.loc = src
updateUsrDialog()
to_chat(user, "<span class='notice'>You put [I] into [src].</span>")
return
+4
View File
@@ -100,6 +100,10 @@
/obj/structure/ladder/attackby(obj/item/W, mob/user, params)
return attack_hand(user)
/obj/structure/ladder/attack_robot(mob/living/silicon/robot/R)
if(R.Adjacent(src))
return attack_hand(R)
/obj/structure/ladder/attack_ghost(mob/dead/observer/user)
use(user,1)
+1 -2
View File
@@ -160,10 +160,9 @@ FLOOR SAFES
. = 1 //no afterattack
if(I.w_class + space <= maxspace)
space += I.w_class
if(!user.drop_item())
if(!user.transferItemToLoc(I, src))
to_chat(user, "<span class='warning'>\The [I] is stuck to your hand, you cannot put it in the safe!</span>")
return
I.forceMove(src)
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
updateUsrDialog()
return
-1
View File
@@ -104,7 +104,6 @@
"<span class='notice'>You attach the sign to [T].</span>")
playsound(T, 'sound/items/deconstruct.ogg', 50, 1)
new sign_path(T)
user.drop_item()
qdel(src)
else
return ..()
+4 -6
View File
@@ -131,8 +131,7 @@
// If the tray IS empty, continue on (tray will be placed on the table like other items)
if(user.a_intent != INTENT_HARM && !(I.flags_1 & ABSTRACT_1))
if(user.drop_item())
I.Move(loc)
if(user.transferItemToLoc(I, drop_location()))
var/list/click_params = params2list(params)
//Center the icon where the user clicked.
if(!click_params || !click_params["icon-x"] || !click_params["icon-y"])
@@ -441,7 +440,7 @@
/obj/structure/rack/MouseDrop_T(obj/O, mob/user)
if ((!( istype(O, /obj/item) ) || user.get_active_held_item() != O))
return
if(!user.drop_item())
if(!user.dropItemToGround(O))
return
if(O.loc != src.loc)
step(O, get_dir(O, src))
@@ -454,8 +453,7 @@
return
if(user.a_intent == INTENT_HARM)
return ..()
if(user.drop_item())
W.Move(loc)
if(user.transferItemToLoc(W, drop_location()))
return 1
/obj/structure/rack/attack_paw(mob/living/user)
@@ -518,7 +516,7 @@
building = TRUE
to_chat(user, "<span class='notice'>You start constructing a rack...</span>")
if(do_after(user, 50, target = user, progress=TRUE))
if(!user.drop_item())
if(!user.temporarilyRemoveItemFromInventory(src))
return
var/obj/structure/rack/R = new /obj/structure/rack(user.loc)
user.visible_message("<span class='notice'>[user] assembles \a [R].\
@@ -62,9 +62,8 @@
to_chat(user, "<span class='notice'>[src] can't hold any more of [I].</span>")
return
if(!user.drop_item())
if(!user.transferItemToLoc(I, src))
return
I.loc = src
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
update_icon()
+1 -2
View File
@@ -23,12 +23,11 @@
/obj/structure/target_stake/attackby(obj/item/target/T, mob/user)
if(pinned_target)
return
if(istype(T) && user.drop_item())
if(istype(T) && user.transferItemToLoc(T, drop_location()))
pinned_target = T
T.pinnedLoc = src
T.density = TRUE
T.layer = OBJ_LAYER + 0.01
T.loc = loc
to_chat(user, "<span class='notice'>You slide the target into the stake.</span>")
/obj/structure/target_stake/attack_hand(mob/user)
+2 -4
View File
@@ -88,10 +88,9 @@
if(w_items + I.w_class > WEIGHT_CLASS_HUGE)
to_chat(user, "<span class='warning'>The cistern is full!</span>")
return
if(!user.drop_item())
if(!user.transferItemToLoc(I, src))
to_chat(user, "<span class='warning'>\The [I] is stuck to your hand, you cannot put it in the cistern!</span>")
return
I.loc = src
w_items += I.w_class
to_chat(user, "<span class='notice'>You carefully place [I] into the cistern.</span>")
@@ -173,10 +172,9 @@
if(I.w_class > 1)
to_chat(user, "<span class='warning'>[I] is too large for the drain enclosure.</span>")
return
if(!user.drop_item())
if(!user.transferItemToLoc(I, src))
to_chat(user, "<span class='warning'>\[I] is stuck to your hand, you cannot put it in the drain enclosure!</span>")
return
I.forceMove(src)
hiddenitem = I
to_chat(user, "<span class='notice'>You place [I] into the drain enclosure.</span>")
@@ -209,11 +209,10 @@
//Adding airlock electronics for access. Step 6 complete.
else if(istype(W, /obj/item/electronics/airlock))
if(!user.drop_item())
if(!user.transferItemToLoc(W, src))
return
playsound(loc, W.usesound, 100, 1)
user.visible_message("[user] installs the electronics into the airlock assembly.", "<span class='notice'>You start to install electronics into the airlock assembly...</span>")
W.loc = src
if(do_after(user, 40, target = src))
if(!src || electronics)
@@ -72,7 +72,7 @@
if(..())
return
if(istype(C, /obj/item/light/bulb)) //only for light tiles
if(state && user.drop_item())
if(state && user.temporarilyRemoveItemFromInventory(C))
qdel(C)
state = 0 //fixing it by bashing it with a light bulb, fun eh?
update_icon()
+1 -1
View File
@@ -290,7 +290,7 @@
continue
var/list/S_gases = S.air.gases
for(var/id in S_gases)
total.assert_gas(id)
ASSERT_GAS(id, total)
total_gases[id][MOLES] += S_gases[id][MOLES]
total.temperature += S.air.temperature
+1 -1
View File
@@ -716,7 +716,7 @@ GLOBAL_PROTECT(LastAdminCalledProc)
if(Rad.anchored)
if(!Rad.loaded_tank)
var/obj/item/tank/internals/plasma/Plasma = new/obj/item/tank/internals/plasma(Rad)
Plasma.air_contents.assert_gas("plasma")
ASSERT_GAS("plasma", Plasma.air_contents)
Plasma.air_contents.gases["plasma"][MOLES] = 70
Rad.drainratio = 0
Rad.loaded_tank = Plasma
+5 -7
View File
@@ -89,22 +89,20 @@
var/mob/M = user
if(isigniter(S.a_left) == isigniter(S.a_right)) //Check if either part of the assembly has an igniter, but if both parts are igniters, then fuck it
return
if(!M.drop_item()) //Remove the assembly from your hands
if(!M.temporarilyRemoveItemFromInventory(src)) //Remove the assembly from your hands
return
var/obj/item/device/onetankbomb/R = new /obj/item/device/onetankbomb(loc)
var/obj/item/device/onetankbomb/R = new
M.temporarilyRemoveItemFromInventory(src, TRUE) //Remove the tank from your character,in case you were holding it
if(!M.put_in_hands(R)) //Equips the bomb if possible, or puts it on the floor.
forceMove(get_turf(M))
M.put_in_hands(R) //Equips the bomb if possible, or puts it on the floor.
R.bombassembly = S //Tell the bomb about its assembly part
S.master = R //Tell the assembly about its new owner
S.loc = R //Move the assembly out of the fucking way
S.forceMove(R) //Move the assembly out of the fucking way
R.bombtank = src //Same for tank
master = R
loc = R
forceMove(R)
R.update_icon()
return
@@ -21,10 +21,6 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
cached_gas[ARCHIVE] = 0
cached_gas[GAS_META] = GLOB.meta_gas_info[id]
#define GASLIST(id, out_list)\
var/list/tmp_gaslist = GLOB.gaslist_cache[id];\
out_list = tmp_gaslist.Copy();
/datum/gas_mixture
var/list/gases
var/temperature //kelvins
@@ -43,30 +39,18 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
//listmos procs
//assert_gas(gas_id) - used to guarantee that the gas list for this id exists.
//Must be used before adding to a gas. May be used before reading from a gas.
/datum/gas_mixture/proc/assert_gas(gas_id)
var/cached_gases = gases
if(cached_gases[gas_id])
return
GASLIST(gas_id, cached_gases[gas_id])
// The following procs used to live here: thermal_energy(), assert_gas() and add_gas(). They have been moved into defines in code/__DEFINES/atmospherics.dm
//assert_gases(args) - shorthand for calling assert_gas() once for each gas type.
//assert_gases(args) - shorthand for calling ASSERT_GAS() once for each gas type.
/datum/gas_mixture/proc/assert_gases()
for(var/id in args)
assert_gas(id)
//add_gas(gas_id) - similar to assert_gas(), but does not check for an existing
//gas list for this id. This can clobber existing gases.
//Used instead of assert_gas() when you know the gas does not exist. Faster than assert_gas().
/datum/gas_mixture/proc/add_gas(gas_id)
GASLIST(gas_id, gases[gas_id])
ASSERT_GAS(id, src)
//add_gases(args) - shorthand for calling add_gas() once for each gas_type.
/datum/gas_mixture/proc/add_gases()
var/cached_gases = gases
for(var/id in args)
GASLIST(id, cached_gases[id])
ADD_GAS(id, cached_gases)
//garbage_collect() - removes any gas list which is empty.
//If called with a list as an argument, only removes gas lists with IDs from that list.
@@ -80,6 +64,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
cached_gases -= id
//PV = nRT
/datum/gas_mixture/proc/heat_capacity() //joules per kelvin
var/list/cached_gases = gases
. = 0
@@ -195,7 +180,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
var/list/giver_gases = giver.gases
//gas transfer
for(var/giver_id in giver_gases)
assert_gas(giver_id)
ASSERT_GAS(giver_id, src)
cached_gases[giver_id][MOLES] += giver_gases[giver_id][MOLES]
return 1
@@ -212,7 +197,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
removed.temperature = temperature
for(var/id in cached_gases)
removed.add_gas(id)
ADD_GAS(id, removed.gases)
removed_gases[id][MOLES] = QUANTIZE((cached_gases[id][MOLES] / sum) * amount)
cached_gases[id][MOLES] -= removed_gases[id][MOLES]
garbage_collect()
@@ -230,7 +215,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
removed.temperature = temperature
for(var/id in cached_gases)
removed.add_gas(id)
ADD_GAS(id, removed.gases)
removed_gases[id][MOLES] = QUANTIZE(cached_gases[id][MOLES] * ratio)
cached_gases[id][MOLES] -= removed_gases[id][MOLES]
@@ -245,18 +230,19 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
copy.temperature = temperature
for(var/id in cached_gases)
copy.add_gas(id)
ADD_GAS(id, copy.gases)
copy_gases[id][MOLES] = cached_gases[id][MOLES]
return copy
/datum/gas_mixture/copy_from(datum/gas_mixture/sample)
var/list/cached_gases = gases //accessing datum vars is slower than proc vars
var/list/sample_gases = sample.gases
temperature = sample.temperature
for(var/id in sample_gases)
assert_gas(id)
ASSERT_GAS(id,src)
cached_gases[id][MOLES] = sample_gases[id][MOLES]
//remove all gases not in the sample
@@ -282,7 +268,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
gas -= "TEMP"
gases.Cut()
for(var/id in gas)
add_gas(id)
ADD_GAS(id, gases)
gases[id][MOLES] = text2num(gas[id])
return 1
@@ -310,10 +296,9 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
//GAS TRANSFER
for(var/id in sharer_gases - cached_gases) // create gases not in our cache
add_gas(id)
ADD_GAS(id, gases)
for(var/id in cached_gases) // transfer gases
if(!sharer_gases[id]) //checking here prevents an uneeded proc call if the check fails.
sharer.add_gas(id)
ASSERT_GAS(id, sharer)
var/gas = cached_gases[id]
var/sharergas = sharer_gases[id]
@@ -69,7 +69,7 @@
/datum/gas_mixture/immutable/cloner/garbage_collect()
..()
add_gas("n2")
ADD_GAS("n2", gases)
gases["n2"][MOLES] = MOLES_O2STANDARD + MOLES_N2STANDARD
/datum/gas_mixture/immutable/cloner/heat_capacity()
@@ -57,7 +57,7 @@
cached_gases["co2"][MOLES] -= reaction_rate
cached_gases["agent_b"][MOLES] -= reaction_rate*0.05
air.assert_gas("o2") //only need to assert oxygen, as this reaction doesn't occur without the other gases existing
ASSERT_GAS("o2", air) //only need to assert oxygen, as this reaction doesn't occur without the other gases existing
cached_gases["o2"][MOLES] += reaction_rate
air.temperature -= (reaction_rate*20000)/air.heat_capacity()
@@ -126,7 +126,7 @@
if(burned_fuel)
energy_released += FIRE_CARBON_ENERGY_RELEASED * burned_fuel
air.assert_gas("co2")
ASSERT_GAS("co2", air)
cached_gases["co2"][MOLES] += burned_fuel
cached_results[id] += burned_fuel
@@ -142,14 +142,14 @@
else
temperature_scale = (temperature-PLASMA_MINIMUM_BURN_TEMPERATURE)/(PLASMA_UPPER_TEMPERATURE-PLASMA_MINIMUM_BURN_TEMPERATURE)
if(temperature_scale > 0)
air.assert_gas("o2")
ASSERT_GAS("o2", air)
oxygen_burn_rate = OXYGEN_BURN_RATE_BASE - temperature_scale
if(cached_gases["o2"][MOLES] > cached_gases["plasma"][MOLES]*PLASMA_OXYGEN_FULLBURN)
plasma_burn_rate = (cached_gases["plasma"][MOLES]*temperature_scale)/PLASMA_BURN_RATE_DELTA
else
plasma_burn_rate = (temperature_scale*(cached_gases["o2"][MOLES]/PLASMA_OXYGEN_FULLBURN))/PLASMA_BURN_RATE_DELTA
if(plasma_burn_rate > MINIMUM_HEAT_CAPACITY)
air.assert_gas("co2")
ASSERT_GAS("co2", air)
cached_gases["plasma"][MOLES] = QUANTIZE(cached_gases["plasma"][MOLES] - plasma_burn_rate)
cached_gases["o2"][MOLES] = QUANTIZE(cached_gases["o2"][MOLES] - (plasma_burn_rate * oxygen_burn_rate))
cached_gases["co2"][MOLES] += plasma_burn_rate
@@ -96,7 +96,7 @@
var/datum/gas_mixture/filtered_out = new
filtered_out.temperature = removed.temperature
filtered_out.assert_gas(filter_type)
ASSERT_GAS(filter_type, filtered_out)
filtered_out.gases[filter_type][MOLES] = removed.gases[filter_type][MOLES]
removed.gases[filter_type][MOLES] = 0
@@ -166,4 +166,3 @@
if(. && on && is_operational())
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
return FALSE

Some files were not shown because too many files have changed in this diff Show More