Updates to tgstation commit 78e471d

This commit is contained in:
deathride58
2018-07-05 01:22:27 -04:00
parent ac6fddcfb3
commit 3e18d8208e
107 changed files with 1054 additions and 1013 deletions
+4 -4
View File
@@ -292,13 +292,13 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
if(throwing)
throwing.finalize(FALSE)
if(loc == user)
if(!allow_attack_hand_drop(user) || !user.dropItemToGround(src))
if(!allow_attack_hand_drop(user) || !user.temporarilyRemoveItemFromInventory(src))
return
pickup(user)
add_fingerprint(user)
if(!user.put_in_active_hand(src))
dropped(user)
user.dropItemToGround(src)
/obj/item/proc/allow_attack_hand_drop(mob/user)
return TRUE
@@ -314,13 +314,13 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
if(throwing)
throwing.finalize(FALSE)
if(loc == user)
if(!user.dropItemToGround(src))
if(!user.temporarilyRemoveItemFromInventory(src))
return
pickup(user)
add_fingerprint(user)
if(!user.put_in_active_hand(src))
dropped(user)
user.dropItemToGround(src)
/obj/item/attack_alien(mob/user)
var/mob/living/carbon/alien/A = user
+1 -2
View File
@@ -112,8 +112,7 @@
/obj/item/areaeditor/blueprints/proc/get_images(turf/T, viewsize)
. = list()
for(var/tt in RANGE_TURFS(viewsize, T))
var/turf/TT = tt
for(var/turf/TT in range(viewsize, T))
if(TT.blueprint_data)
. += TT.blueprint_data
+2 -2
View File
@@ -42,8 +42,8 @@
sprite_name = "miniFE"
dog_fashion = null
/obj/item/extinguisher/New()
..()
/obj/item/extinguisher/Initialize()
. = ..()
create_reagents(max_water)
reagents.add_reagent(chem, max_water)
@@ -62,6 +62,76 @@
return 1
return 0
/obj/item/robot_suit/wrench_act(mob/living/user, obj/item/I) //Deconstucts empty borg shell. Flashes remain unbroken because they haven't been used yet
var/turf/T = get_turf(src)
if(l_leg || r_leg || chest || l_arm || r_arm || head)
if(I.use_tool(src, user, 5, volume=50))
if(l_leg)
l_leg.forceMove(T)
l_leg = null
if(r_leg)
r_leg.forceMove(T)
r_leg = null
if(chest)
if (chest.cell) //Sanity check.
chest.cell.forceMove(T)
chest.cell = null
chest.forceMove(T)
new /obj/item/stack/cable_coil(T, 1)
chest.wired = FALSE
chest = null
if(l_arm)
l_arm.forceMove(T)
l_arm = null
if(r_arm)
r_arm.forceMove(T)
r_arm = null
if(head)
head.forceMove(T)
head.flash1.forceMove(T)
head.flash1 = null
head.flash2.forceMove(T)
head.flash2 = null
head = null
to_chat(user, "<span class='notice'>You disassemble the cyborg shell.</span>")
else
to_chat(user, "<span class='notice'>There is nothing to remove from the endoskeleton.</span>")
updateicon()
/obj/item/robot_suit/proc/put_in_hand_or_drop(mob/living/user, obj/item/I) //normal put_in_hands() drops the item ontop of the player, this drops it at the suit's loc
if(!user.put_in_hands(I))
I.forceMove(drop_location())
return FALSE
return TRUE
/obj/item/robot_suit/screwdriver_act(mob/living/user, obj/item/I) //Swaps the power cell if you're holding a new one in your other hand.
if(!chest) //can't remove a cell if there's no chest to remove it from.
to_chat(user, "<span class='notice'>[src] has no attached torso.</span>")
return
var/obj/item/stock_parts/cell/temp_cell = user.is_holding_item_of_type(/obj/item/stock_parts/cell)
var/swap_failed
if(!temp_cell) //if we're not holding a cell
swap_failed = TRUE
else if(!user.transferItemToLoc(temp_cell, chest))
swap_failed = TRUE
to_chat(user, "<span class='warning'>[temp_cell] is stuck to your hand, you can't put it in [src]!</span>")
if(chest.cell) //drop the chest's current cell no matter what.
put_in_hand_or_drop(user, chest.cell)
if(swap_failed) //we didn't transfer any new items.
if(chest.cell) //old cell ejected, nothing inserted.
to_chat(user, "<span class='notice'>You remove [chest.cell] from [src].</span>")
chest.cell = null
else
to_chat(user, "<span class='notice'>The power cell slot in [src]'s torso is empty.</span>")
return
to_chat(user, "<span class='notice'>You [chest.cell ? "replace [src]'s [chest.cell.name] with [temp_cell]" : "insert [temp_cell] into [src]"].</span>")
chest.cell = temp_cell
return TRUE
/obj/item/robot_suit/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/stack/sheet/metal))
@@ -161,6 +231,9 @@
else if(istype(W, /obj/item/mmi))
var/obj/item/mmi/M = W
if(check_completion())
if(!chest.cell)
to_chat(user, "<span class='warning'>The endoskeleton still needs a power cell!</span>")
return
if(!isturf(loc))
to_chat(user, "<span class='warning'>You can't put [M] in, the frame has to be standing on the ground to be perfectly precise!</span>")
return
+11 -12
View File
@@ -14,23 +14,22 @@
grind_results = list("silicon" = 20, "copper" = 5)
/obj/item/stack/light_w/attackby(obj/item/O, mob/user, params)
var/atom/Tsec = user.drop_location()
if(istype(O, /obj/item/wirecutters))
var/obj/item/stack/cable_coil/CC = new (Tsec, 5)
CC.add_fingerprint(user)
amount--
var/obj/item/stack/sheet/glass/G = new (Tsec)
G.add_fingerprint(user)
if(amount <= 0)
qdel(src)
else if(istype(O, /obj/item/stack/sheet/metal))
if(istype(O, /obj/item/stack/sheet/metal))
var/obj/item/stack/sheet/metal/M = O
if (M.use(1))
var/obj/item/L = new /obj/item/stack/tile/light(user.loc)
var/obj/item/L = new /obj/item/stack/tile/light(user.drop_location())
to_chat(user, "<span class='notice'>You make a light tile.</span>")
L.add_fingerprint(user)
use(1)
else
to_chat(user, "<span class='warning'>You need one metal sheet to finish the light tile!</span>")
else
return ..()
/obj/item/stack/light_w/wirecutter_act(mob/living/user, obj/item/I)
var/atom/Tsec = user.drop_location()
var/obj/item/stack/cable_coil/CC = new (Tsec, 5)
CC.add_fingerprint(user)
var/obj/item/stack/sheet/glass/G = new (Tsec)
G.add_fingerprint(user)
use(1)
+1 -1
View File
@@ -132,7 +132,7 @@
if (istype(E, /datum/stack_recipe))
var/datum/stack_recipe/R = E
var/max_multiplier = round(get_amount() / R.req_amount)
var/title as text
var/title
var/can_build = 1
can_build = can_build && (max_multiplier>0)
+55 -74
View File
@@ -14,45 +14,44 @@
resistance_flags = FIRE_PROOF
var/obj/item/noz
var/on = FALSE
var/volume = 500
/obj/item/watertank/New()
..()
/obj/item/watertank/Initialize()
. = ..()
create_reagents(volume)
noz = make_noz()
/obj/item/watertank/ui_action_click()
toggle_mister()
/obj/item/watertank/ui_action_click(mob/user)
toggle_mister(user)
/obj/item/watertank/item_action_slot_check(slot, mob/user)
if(slot == user.getBackSlot())
return 1
/obj/item/watertank/verb/toggle_mister()
set name = "Toggle Mister"
set category = "Object"
if (usr.get_item_by_slot(usr.getBackSlot()) != src)
to_chat(usr, "<span class='warning'>The watertank must be worn properly to use!</span>")
/obj/item/watertank/proc/toggle_mister(mob/living/user)
if(!istype(user))
return
if(usr.incapacitated())
if(user.get_item_by_slot(user.getBackSlot()) != src)
to_chat(user, "<span class='warning'>The watertank must be worn properly to use!</span>")
return
if(user.incapacitated())
return
on = !on
var/mob/living/carbon/human/user = usr
if(on)
if(noz == null)
noz = make_noz()
if(QDELETED(noz))
noz = make_noz()
if(noz in src)
//Detach the nozzle into the user's hands
if(!user.put_in_hands(noz))
on = FALSE
to_chat(user, "<span class='warning'>You need a free hand to hold the mister!</span>")
return
else
//Remove from their hands and put back "into" the tank
remove_noz()
return
/obj/item/watertank/verb/toggle_mister_verb()
set name = "Toggle Mister"
set category = "Object"
toggle_mister(usr)
/obj/item/watertank/proc/make_noz()
return new /obj/item/reagent_containers/spray/mister(src)
@@ -66,19 +65,17 @@
if(ismob(noz.loc))
var/mob/M = noz.loc
M.temporarilyRemoveItemFromInventory(noz, TRUE)
return
noz.forceMove(src)
/obj/item/watertank/Destroy()
if (on)
qdel(noz)
QDEL_NULL(noz)
return ..()
/obj/item/watertank/attack_hand(mob/user)
. = ..()
if(.)
return
if(loc == user)
ui_action_click()
if (user.get_item_by_slot(user.getBackSlot()) == src)
toggle_mister(user)
else
return ..()
/obj/item/watertank/MouseDrop(obj/over_object)
var/mob/M = loc
@@ -114,40 +111,28 @@
amount_per_transfer_from_this = 50
possible_transfer_amounts = list(25,50,100)
volume = 500
item_flags = NOBLUDGEON
item_flags = NOBLUDGEON | ABSTRACT // don't put in storage
container_type = OPENCONTAINER
slot_flags = 0
var/obj/item/watertank/tank
/obj/item/reagent_containers/spray/mister/New(parent_tank)
..()
if(check_tank_exists(parent_tank, src))
tank = parent_tank
reagents = tank.reagents //This mister is really just a proxy for the tank's reagents
forceMove(tank)
return
/obj/item/reagent_containers/spray/mister/dropped(mob/user)
..()
to_chat(user, "<span class='notice'>The mister snaps back onto the watertank.</span>")
tank.on = 0
forceMove(tank)
/obj/item/reagent_containers/spray/mister/Initialize()
. = ..()
tank = loc
if(!istype(tank))
return INITIALIZE_HINT_QDEL
reagents = tank.reagents //This mister is really just a proxy for the tank's reagents
/obj/item/reagent_containers/spray/mister/attack_self()
return
/proc/check_tank_exists(parent_tank, mob/living/carbon/human/M, obj/O)
if (!parent_tank || !istype(parent_tank, /obj/item/watertank)) //To avoid weird issues from admin spawns
qdel(O)
return 0
else
return 1
/obj/item/reagent_containers/spray/mister/Move()
/obj/item/reagent_containers/spray/mister/doMove(atom/destination)
if(destination && (destination != tank.loc || !ismob(destination)))
if (loc != tank)
to_chat(tank.loc, "<span class='notice'>The mister snaps back onto the watertank.</span>")
destination = tank
..()
if(loc != tank.loc)
forceMove(tank.loc)
/obj/item/reagent_containers/spray/mister/afterattack(obj/target, mob/user, proximity)
if(target.loc == loc) //Safety check so you don't fill your mister with mutagen or something and then blast yourself in the face with it
@@ -161,8 +146,8 @@
icon_state = "waterbackpackjani"
item_state = "waterbackpackjani"
/obj/item/watertank/janitor/New()
..()
/obj/item/watertank/janitor/Initialize()
. = ..()
reagents.add_reagent("cleaner", 500)
/obj/item/reagent_containers/spray/mister/janitor
@@ -197,8 +182,8 @@
volume = 200
slowdown = 0
/obj/item/watertank/atmos/New()
..()
/obj/item/watertank/atmos/Initialize()
. = ..()
reagents.add_reagent("water", 200)
/obj/item/watertank/atmos/make_noz()
@@ -226,25 +211,27 @@
precision = 1
cooling_power = 5
w_class = WEIGHT_CLASS_HUGE
item_flags = ABSTRACT // don't put in storage
var/obj/item/watertank/tank
var/nozzle_mode = 0
var/metal_synthesis_cooldown = 0
var/resin_cooldown = 0
/obj/item/extinguisher/mini/nozzle/New(parent_tank)
..()
if(check_tank_exists(parent_tank, src))
tank = parent_tank
reagents = tank.reagents
max_water = tank.volume
forceMove(tank)
/obj/item/extinguisher/mini/nozzle/Initialize()
. = ..()
tank = loc
if (!istype(tank))
return INITIALIZE_HINT_QDEL
reagents = tank.reagents
max_water = tank.volume
/obj/item/extinguisher/mini/nozzle/Move()
/obj/item/extinguisher/mini/nozzle/doMove(atom/destination)
if(destination && (destination != tank.loc || !ismob(destination)))
if(loc != tank)
to_chat(tank.loc, "<span class='notice'>The nozzle snaps back onto the tank!</span>")
destination = tank
..()
if(loc != tank.loc)
forceMove(tank)
return
/obj/item/extinguisher/mini/nozzle/attack_self(mob/user)
switch(nozzle_mode)
@@ -265,12 +252,6 @@
return
return
/obj/item/extinguisher/mini/nozzle/dropped(mob/user)
..()
to_chat(user, "<span class='notice'>The nozzle snaps back onto the tank!</span>")
tank.on = 0
forceMove(tank)
/obj/item/extinguisher/mini/nozzle/afterattack(atom/target, mob/user)
if(nozzle_mode == EXTINGUISHER)
..()
@@ -453,8 +434,8 @@
volume = 2000
slowdown = 0
/obj/item/watertank/op/New()
..()
/obj/item/watertank/op/Initialize()
. = ..()
reagents.add_reagent("mutagen",350)
reagents.add_reagent("napalm",125)
reagents.add_reagent("welding_fuel",125)
@@ -32,7 +32,7 @@
desc = "A Nanotrasen Bluespace drop pod, this one has been marked with Central Command's designations. Teleports back to Centcom after delivery."
icon_state = "centcompod"
/obj/structure/closet/supplypod/Initialize(mapload, var/SO)
/obj/structure/closet/supplypod/Initialize(mapload, SO)
. = ..()
if(istype(SO, /datum/supply_order))
SupplyOrder = SO//uses Supply Order passed from expressconsole into BDPtarget
@@ -84,7 +84,7 @@
randomdir = FALSE
icon_state = "supplypod_falling"
/obj/effect/temp_visual/DPfall/Initialize(var/dropLocation, var/podID)
/obj/effect/temp_visual/DPfall/Initialize(dropLocation, podID)
if (podID == POD_STANDARD)
icon_state = "supplypod_falling"
name = "Supply Drop Pod"
@@ -104,7 +104,7 @@
light_range = 2
var/obj/effect/temp_visual/fallingPod
/obj/effect/DPtarget/Initialize(mapload, var/SO, var/podID, var/target)
/obj/effect/DPtarget/Initialize(mapload, SO, podID)
. = ..()
var/delayTime = 17 //We're forcefully adminspawned, make it faster
switch(podID)
@@ -117,12 +117,12 @@
addtimer(CALLBACK(src, .proc/beginLaunch, SO, podID), delayTime)//standard pods take 3 seconds to come in, bluespace pods take 1.5
/obj/effect/DPtarget/proc/beginLaunch(var/SO, var/podID)
/obj/effect/DPtarget/proc/beginLaunch(SO, podID)
fallingPod = new /obj/effect/temp_visual/DPfall(drop_location(), podID)
animate(fallingPod, pixel_z = 0, time = 3, easing = LINEAR_EASING)//make and animate a falling pod
addtimer(CALLBACK(src, .proc/endLaunch, SO, podID), 3, TIMER_CLIENT_TIME)//fall 0.3seconds
/obj/effect/DPtarget/proc/endLaunch(var/SO, var/podID)
/obj/effect/DPtarget/proc/endLaunch(SO, podID)
if(podID == POD_STANDARD)
new /obj/structure/closet/supplypod(drop_location(), SO)//pod is created
explosion(src,0,0,2, flame_range = 3) //less advanced equipment than bluespace pod, so larger explosion when landing
@@ -132,6 +132,8 @@
else if(podID == POD_CENTCOM)
new /obj/structure/closet/supplypod/bluespacepod/centcompod(drop_location(), SO)//CentCom supplypods dont create explosions; instead they directly deal 40 fire damage to people on the turf
var/turf/T = get_turf(src)
playsound(src, "explosion", 80, 1)
new /obj/effect/hotspot(T)
T.hotspot_expose(700, 50, 1)//same as fireball
for(var/mob/living/M in T.contents)
M.adjustFireLoss(40)