mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Merge branch 'master' of https://github.com/Baystation12/Baystation12
Conflicts: code/game/objects/items/devices/transfer_valve.dm
This commit is contained in:
@@ -14,7 +14,10 @@
|
||||
/obj/item/clothing/suit/space/rig
|
||||
)
|
||||
|
||||
/obj/item/device/modkit/afterattack(obj/O, mob/user as mob)
|
||||
/obj/item/device/modkit/afterattack(obj/O, mob/user as mob, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
if (!target_species)
|
||||
return //it shouldn't be null, okay?
|
||||
|
||||
@@ -38,6 +41,7 @@
|
||||
var/in_list = (target_species in I.species_restricted)
|
||||
if (excluding ^ in_list)
|
||||
user << "<span class='notice'>[I] is already modified.</span>"
|
||||
return
|
||||
|
||||
if(!isturf(O.loc))
|
||||
user << "<span class='warning'>[O] must be safely placed on the ground for modification.</span>"
|
||||
|
||||
@@ -6,7 +6,10 @@
|
||||
var/list/modes = list("grey","red","blue","cyan","green","yellow","purple")
|
||||
var/mode = "grey"
|
||||
|
||||
/obj/item/device/pipe_painter/afterattack(atom/A, mob/user as mob)
|
||||
/obj/item/device/pipe_painter/afterattack(atom/A, mob/user as mob, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
if(!istype(A,/obj/machinery/atmospherics/pipe) || istype(A,/obj/machinery/atmospherics/pipe/tank) || istype(A,/obj/machinery/atmospherics/pipe/vent) || istype(A,/obj/machinery/atmospherics/pipe/simple/heat_exchanging) || istype(A,/obj/machinery/atmospherics/pipe/simple/insulated) || !in_range(user, A))
|
||||
return
|
||||
var/obj/machinery/atmospherics/pipe/P = A
|
||||
|
||||
@@ -386,7 +386,9 @@ REAGENT SCANNER
|
||||
var/details = 0
|
||||
var/recent_fail = 0
|
||||
|
||||
/obj/item/device/reagent_scanner/afterattack(obj/O, mob/user as mob)
|
||||
/obj/item/device/reagent_scanner/afterattack(obj/O, mob/user as mob, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if (user.stat)
|
||||
return
|
||||
if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
return 1
|
||||
|
||||
/obj/item/device/transfer_valve/attackby(obj/item/item, mob/user)
|
||||
var/turf/location = get_turf(src) // For admin logs
|
||||
if(istype(item, /obj/item/weapon/tank))
|
||||
if(tank_one && tank_two)
|
||||
user << "<span class='warning'>There are already two tanks attached, remove one first.</span>"
|
||||
@@ -31,6 +32,8 @@
|
||||
user.drop_item()
|
||||
item.loc = src
|
||||
user << "<span class='notice'>You attach the tank to the transfer valve.</span>"
|
||||
message_admins("[key_name_admin(user)] attached both tanks to a transfer valve. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)")
|
||||
log_game("[key_name_admin(user)] attached both tanks to a transfer valve.")
|
||||
|
||||
update_icon()
|
||||
nanomanager.update_uis(src) // update all UIs attached to src
|
||||
@@ -51,7 +54,7 @@
|
||||
A.toggle_secure() //this calls update_icon(), which calls update_icon() on the holder (i.e. the bomb).
|
||||
|
||||
bombers += "[key_name(user)] attached a [item] to a transfer valve."
|
||||
message_admins("[key_name_admin(user)] attached a [item] to a transfer valve. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.loc.x];Y=[user.loc.y];Z=[user.loc.z]'>JMP</a>)")
|
||||
message_admins("[key_name_admin(user)] attached a [item] to a transfer valve. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)")
|
||||
log_game("[key_name_admin(user)] attached a [item] to a transfer valve.")
|
||||
attacher = user
|
||||
nanomanager.update_uis(src) // update all UIs attached to src
|
||||
@@ -66,7 +69,7 @@
|
||||
|
||||
/obj/item/device/transfer_valve/attack_self(mob/user as mob)
|
||||
ui_interact(user)
|
||||
|
||||
|
||||
/obj/item/device/transfer_valve/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
||||
|
||||
// this is the data which will be sent to the ui
|
||||
@@ -77,7 +80,7 @@
|
||||
data["valveOpen"] = valve_open ? 1 : 0
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
|
||||
@@ -52,15 +52,19 @@
|
||||
use(1)
|
||||
else
|
||||
return 1
|
||||
else
|
||||
|
||||
else if(!in_use)
|
||||
if(amount < 2)
|
||||
user << "\blue You need at least two rods to do this."
|
||||
return
|
||||
usr << "\blue Assembling grille..."
|
||||
in_use = 1
|
||||
if (!do_after(usr, 10))
|
||||
in_use = 0
|
||||
return
|
||||
var/obj/structure/grille/F = new /obj/structure/grille/ ( usr.loc )
|
||||
usr << "\blue You assemble a grille"
|
||||
in_use = 0
|
||||
F.add_fingerprint(usr)
|
||||
use(2)
|
||||
return
|
||||
|
||||
@@ -236,77 +236,6 @@
|
||||
|
||||
return 0
|
||||
|
||||
/*
|
||||
* Glass shards - TODO: Move this into code/game/object/item/weapons
|
||||
*/
|
||||
/obj/item/weapon/shard/Bump()
|
||||
|
||||
spawn( 0 )
|
||||
if (prob(20))
|
||||
src.force = 15
|
||||
else
|
||||
src.force = 4
|
||||
..()
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/weapon/shard/New()
|
||||
|
||||
src.icon_state = pick("large", "medium", "small")
|
||||
switch(src.icon_state)
|
||||
if("small")
|
||||
src.pixel_x = rand(-12, 12)
|
||||
src.pixel_y = rand(-12, 12)
|
||||
if("medium")
|
||||
src.pixel_x = rand(-8, 8)
|
||||
src.pixel_y = rand(-8, 8)
|
||||
if("large")
|
||||
src.pixel_x = rand(-5, 5)
|
||||
src.pixel_y = rand(-5, 5)
|
||||
else
|
||||
return
|
||||
|
||||
/obj/item/weapon/shard/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if ( istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
var/obj/item/stack/sheet/glass/NG = new (user.loc)
|
||||
for (var/obj/item/stack/sheet/glass/G in user.loc)
|
||||
if(G==NG)
|
||||
continue
|
||||
if(G.amount>=G.max_amount)
|
||||
continue
|
||||
G.attackby(NG, user)
|
||||
usr << "You add the newly-formed glass to the stack. It now contains [NG.amount] sheets."
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/shard/HasEntered(AM as mob|obj)
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
M << "\red <B>You step in the broken glass!</B>"
|
||||
playsound(src.loc, 'sound/effects/glass_step.ogg', 50, 1)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
return
|
||||
|
||||
if( !H.shoes && ( !H.wear_suit || !(H.wear_suit.body_parts_covered & FEET) ) )
|
||||
var/datum/organ/external/affecting = H.get_organ(pick("l_foot", "r_foot"))
|
||||
if(affecting.status & ORGAN_ROBOT)
|
||||
return
|
||||
H.Weaken(3)
|
||||
if(affecting.take_damage(5, 0))
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
..()
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Phoron Glass sheets
|
||||
|
||||
@@ -114,7 +114,9 @@
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/implanter/compressed/afterattack(atom/A, mob/user as mob)
|
||||
/obj/item/weapon/implanter/compressed/afterattack(atom/A, mob/user as mob, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(istype(A,/obj/item) && imp)
|
||||
var/obj/item/weapon/implant/compressed/c = imp
|
||||
if (c.scanned)
|
||||
|
||||
114
code/game/objects/items/weapons/shards.dm
Normal file
114
code/game/objects/items/weapons/shards.dm
Normal file
@@ -0,0 +1,114 @@
|
||||
// Glass shards
|
||||
|
||||
/obj/item/weapon/shard
|
||||
name = "glass shard"
|
||||
icon = 'icons/obj/shards.dmi'
|
||||
icon_state = "large"
|
||||
sharp = 1
|
||||
edge = 1
|
||||
desc = "Could probably be used as ... a throwing weapon?"
|
||||
w_class = 2.0
|
||||
force = 5.0
|
||||
throwforce = 8.0
|
||||
item_state = "shard-glass"
|
||||
matter = list("glass" = 3750)
|
||||
attack_verb = list("stabbed", "slashed", "sliced", "cut")
|
||||
|
||||
/obj/item/weapon/shard/suicide_act(mob/user)
|
||||
viewers(user) << pick("\red <b>[user] is slitting \his wrists with \the [src]! It looks like \he's trying to commit suicide.</b>", \
|
||||
"\red <b>[user] is slitting \his throat with \the [src]! It looks like \he's trying to commit suicide.</b>")
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/shard/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/shard/Bump()
|
||||
|
||||
spawn( 0 )
|
||||
if (prob(20))
|
||||
src.force = 15
|
||||
else
|
||||
src.force = 4
|
||||
..()
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/weapon/shard/New()
|
||||
|
||||
src.icon_state = pick("large", "medium", "small")
|
||||
switch(src.icon_state)
|
||||
if("small")
|
||||
src.pixel_x = rand(-12, 12)
|
||||
src.pixel_y = rand(-12, 12)
|
||||
if("medium")
|
||||
src.pixel_x = rand(-8, 8)
|
||||
src.pixel_y = rand(-8, 8)
|
||||
if("large")
|
||||
src.pixel_x = rand(-5, 5)
|
||||
src.pixel_y = rand(-5, 5)
|
||||
else
|
||||
return
|
||||
|
||||
/obj/item/weapon/shard/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if ( istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
var/obj/item/stack/sheet/glass/NG = new (user.loc)
|
||||
for (var/obj/item/stack/sheet/glass/G in user.loc)
|
||||
if(G==NG)
|
||||
continue
|
||||
if(G.amount>=G.max_amount)
|
||||
continue
|
||||
G.attackby(NG, user)
|
||||
usr << "You add the newly-formed glass to the stack. It now contains [NG.amount] sheets."
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/shard/HasEntered(AM as mob|obj)
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
M << "\red <B>You step on \the [src]!</B>"
|
||||
playsound(src.loc, 'sound/effects/glass_step.ogg', 50, 1) // not sure how to handle metal shards with sounds
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
return
|
||||
|
||||
if( !H.shoes && ( !H.wear_suit || !(H.wear_suit.body_parts_covered & FEET) ) )
|
||||
var/datum/organ/external/affecting = H.get_organ(pick("l_foot", "r_foot"))
|
||||
if(affecting.status & ORGAN_ROBOT)
|
||||
return
|
||||
H.Weaken(3)
|
||||
if(affecting.take_damage(5, 0))
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
..()
|
||||
|
||||
// Shrapnel
|
||||
|
||||
/obj/item/weapon/shard/shrapnel
|
||||
name = "shrapnel"
|
||||
icon = 'icons/obj/shards.dmi'
|
||||
icon_state = "shrapnellarge"
|
||||
desc = "A bunch of tiny bits of shattered metal."
|
||||
|
||||
/obj/item/weapon/shard/shrapnel/New()
|
||||
|
||||
src.icon_state = pick("shrapnellarge", "shrapnelmedium", "shrapnelsmall")
|
||||
switch(src.icon_state)
|
||||
if("shrapnelsmall")
|
||||
src.pixel_x = rand(-12, 12)
|
||||
src.pixel_y = rand(-12, 12)
|
||||
if("shrapnelmedium")
|
||||
src.pixel_x = rand(-8, 8)
|
||||
src.pixel_y = rand(-8, 8)
|
||||
if("shrapnellarge")
|
||||
src.pixel_x = rand(-5, 5)
|
||||
src.pixel_y = rand(-5, 5)
|
||||
else
|
||||
return
|
||||
@@ -65,7 +65,9 @@
|
||||
O.show_message(text("\red [] waves [] over []'s head.", user, src, M), 1)
|
||||
return
|
||||
|
||||
/obj/item/weapon/nullrod/afterattack(atom/A, mob/user as mob)
|
||||
/obj/item/weapon/nullrod/afterattack(atom/A, mob/user as mob, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if (istype(A, /turf/simulated/floor))
|
||||
user << "\blue You hit the floor with the [src]."
|
||||
call(/obj/effect/rune/proc/revealrunes)(src)
|
||||
@@ -231,7 +233,7 @@
|
||||
update_icon(user)
|
||||
|
||||
/obj/item/weapon/butterfly/switchblade
|
||||
name = "/proper switchblade"
|
||||
name = "switchblade"
|
||||
desc = "A classic switchblade with gold engraving. Just holding it makes you feel like a gangster."
|
||||
icon_state = "switchblade"
|
||||
|
||||
|
||||
@@ -18,12 +18,17 @@
|
||||
buckled_mob.dir = dir
|
||||
|
||||
/obj/structure/stool/bed/chair/wheelchair/relaymove(mob/user, direction)
|
||||
// Redundant check?
|
||||
if(user.stat || user.stunned || user.weakened || user.paralysis || user.lying || user.restrained())
|
||||
if(user==pulling)
|
||||
pulling = null
|
||||
user.pulledby = null
|
||||
user << "\red You lost your grip!"
|
||||
return
|
||||
if(buckled_mob && pulling && user == buckled_mob)
|
||||
if(pulling.stat || pulling.stunned || pulling.weakened || pulling.paralysis || pulling.lying || pulling.restrained())
|
||||
pulling.pulledby = null
|
||||
pulling = null
|
||||
if(user.pulling && (user == pulling))
|
||||
pulling = null
|
||||
user.pulledby = null
|
||||
@@ -136,12 +141,12 @@
|
||||
if(propelled || (pulling && (pulling.a_intent == "hurt")))
|
||||
var/mob/living/occupant = buckled_mob
|
||||
unbuckle()
|
||||
|
||||
|
||||
if (pulling && (pulling.a_intent == "hurt"))
|
||||
occupant.throw_at(A, 3, 3, pulling)
|
||||
else if (propelled)
|
||||
occupant.throw_at(A, 3, propelled)
|
||||
|
||||
|
||||
occupant.apply_effect(6, STUN, 0)
|
||||
occupant.apply_effect(6, WEAKEN, 0)
|
||||
occupant.apply_effect(6, STUTTER, 0)
|
||||
|
||||
Reference in New Issue
Block a user