mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 20:45:28 +01:00
Adds a few turf istype helpers (#20754)
* a very calming act when the world is too much, too fast * i'm tired but i have to be efficient, infinite * lick your lips at the sight of me a fantasy made reality
This commit is contained in:
@@ -50,15 +50,15 @@
|
||||
T.dump_contents()
|
||||
qdel(target)
|
||||
|
||||
if(istype(target, /turf/closed/mineral))
|
||||
if(ismineralturf(target))
|
||||
var/turf/closed/mineral/M = target
|
||||
M.ChangeTurf(M.baseturf)
|
||||
|
||||
if(istype(target, /turf/open/floor))
|
||||
if(isfloorturf(target))
|
||||
var/turf/open/floor/F = target
|
||||
F.ChangeTurf(F.baseturf)
|
||||
|
||||
if(istype(target, /turf/closed/wall))
|
||||
if(iswallturf(target))
|
||||
var/turf/closed/wall/W = target
|
||||
W.dismantle_wall(1)
|
||||
|
||||
|
||||
@@ -272,7 +272,7 @@ list(name = "- Carbon Dioxide", desc = " This informational poster teaches the v
|
||||
if(!D)
|
||||
return
|
||||
|
||||
if(istype(src,/turf/closed/wall) && user && user.loc == temp_loc) //Let's check if everything is still there
|
||||
if(iswallturf(src) && user && user.loc == temp_loc) //Let's check if everything is still there
|
||||
user << "<span class='notice'>You place the poster!</span>"
|
||||
else
|
||||
D.roll_and_drop(temp_loc,D.official)
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
var/blast = 0
|
||||
|
||||
/datum/effect_system/smoke_spread/freezing/proc/Chilled(atom/A)
|
||||
if(istype(A,/turf/open))
|
||||
if(isopenturf(A))
|
||||
var/turf/open/T = A
|
||||
if(T.air)
|
||||
var/datum/gas_mixture/G = T.air
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
//------- TURF FIRES -------
|
||||
|
||||
if(T)
|
||||
if(flame_dist && prob(40) && !istype(T, /turf/open/space) && !T.density)
|
||||
if(flame_dist && prob(40) && !isspaceturf(T) && !T.density)
|
||||
PoolOrNew(/obj/effect/hotspot, T) //Mostly for ambience!
|
||||
if(dist > 0)
|
||||
T.ex_act(dist)
|
||||
|
||||
@@ -284,7 +284,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
|
||||
/obj/item/attack_ai(mob/user)
|
||||
if(istype(src.loc, /obj/item/weapon/robot_module))
|
||||
//If the item is part of a cyborg module, equip it
|
||||
if(!isrobot(user))
|
||||
if(!iscyborg(user))
|
||||
return
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(!R.low_power_mode) //can't equip modules with an empty cell.
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
return
|
||||
var/turf/loc = get_turf(usr)
|
||||
var/area/A = loc.loc
|
||||
if(!istype(loc, /turf/open/floor))
|
||||
if(!isfloorturf(loc))
|
||||
usr << "<span class='warning'>You cannot place [src] on this spot!</span>"
|
||||
return
|
||||
if(A.requires_power == 0 || istype(A, /area/space))
|
||||
@@ -51,7 +51,7 @@
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
// For camera-building borgs
|
||||
var/turf/T = get_step(get_turf(user), user.dir)
|
||||
if(istype(T, /turf/closed/wall))
|
||||
if(iswallturf(T))
|
||||
T.attackby(src, user, params)
|
||||
|
||||
var/metal_amt = round(materials[MAT_METAL]/MINERAL_MATERIAL_AMOUNT)
|
||||
|
||||
@@ -710,7 +710,7 @@
|
||||
|
||||
/obj/item/toy/crayon/spraycan/borg/afterattack(atom/target,mob/user,proximity)
|
||||
var/diff = ..()
|
||||
if(!isrobot(user))
|
||||
if(!iscyborg(user))
|
||||
user << "<span class='notice'>How did you get this?</span>"
|
||||
qdel(src)
|
||||
return FALSE
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
master.disrupt()
|
||||
|
||||
/obj/effect/dummy/chameleon/relaymove(mob/user, direction)
|
||||
if(istype(loc, /turf/open/space) || !direction)
|
||||
if(isspaceturf(loc) || !direction)
|
||||
return //No magical space movement!
|
||||
|
||||
if(can_move)
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
outmsg = "<span class='warning'>You fail to blind [C] by shining [src] at their eyes!</span>"
|
||||
|
||||
//robots
|
||||
else if(isrobot(target))
|
||||
else if(iscyborg(target))
|
||||
var/mob/living/silicon/S = target
|
||||
//20% chance to actually hit the sensors
|
||||
if(prob(effectchance * diode.rating))
|
||||
|
||||
@@ -277,7 +277,7 @@
|
||||
jobname = "AI"
|
||||
|
||||
// --- Cyborg ---
|
||||
else if(isrobot(M))
|
||||
else if(iscyborg(M))
|
||||
var/mob/living/silicon/robot/B = M
|
||||
jobname = "[B.designation] Cyborg"
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
if(H.check_shields(0, "[M]'s [name]", src, MELEE_ATTACK))
|
||||
playsound(M, 'sound/weapons/Genhit.ogg', 50, 1)
|
||||
return 0
|
||||
if(isrobot(user))
|
||||
if(iscyborg(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(!R.cell.use(charge_cost))
|
||||
return
|
||||
@@ -43,7 +43,7 @@
|
||||
var/shockallowed = 0//Can it be a stunarm when emagged. Only PK borgs get this by default.
|
||||
|
||||
/obj/item/borg/cyborghug/attack_self(mob/living/user)
|
||||
if(isrobot(user))
|
||||
if(iscyborg(user))
|
||||
var/mob/living/silicon/robot/P = user
|
||||
if(P.emagged&&shockallowed == 1)
|
||||
if(mode < 3)
|
||||
@@ -107,7 +107,7 @@
|
||||
"<span class='danger'>You electrocute [M] with your touch!</span>")
|
||||
M.update_canmove()
|
||||
else
|
||||
if(!isrobot(M))
|
||||
if(!iscyborg(M))
|
||||
M.adjustFireLoss(10)
|
||||
user.visible_message("<span class='userdanger'>[user] shocks [M]!</span>", \
|
||||
"<span class='danger'>You shock [M]!</span>")
|
||||
@@ -161,7 +161,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/borg/charger/afterattack(obj/item/target, mob/living/silicon/robot/user, proximity_flag)
|
||||
if(!proximity_flag || !isrobot(user))
|
||||
if(!proximity_flag || !iscyborg(user))
|
||||
return
|
||||
if(mode == "draw")
|
||||
if(is_type_in_list(target, charge_machines))
|
||||
@@ -282,7 +282,7 @@
|
||||
user << "<font color='red'>The device is still recharging!</font>"
|
||||
return
|
||||
|
||||
if(isrobot(user))
|
||||
if(iscyborg(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(R.cell.charge < 1200)
|
||||
user << "<font color='red'>You don't have enough charge to do this!</font>"
|
||||
@@ -302,7 +302,7 @@
|
||||
playsound(get_turf(src), 'sound/AI/harmalarm.ogg', 70, 3)
|
||||
cooldown = world.time + 200
|
||||
log_game("[user.ckey]([user]) used a Cyborg Harm Alarm in ([user.x],[user.y],[user.z])")
|
||||
if(isrobot(user))
|
||||
if(iscyborg(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
R.connected_ai << "<br><span class='notice'>NOTICE - Peacekeeping 'HARM ALARM' used by: [user]</span><br>"
|
||||
|
||||
|
||||
@@ -78,12 +78,6 @@
|
||||
var/title as text
|
||||
var/can_build = 1
|
||||
can_build = can_build && (max_multiplier>0)
|
||||
/*
|
||||
if (R.one_per_turf)
|
||||
can_build = can_build && !(locate(R.result_type) in usr.loc)
|
||||
if (R.on_floor)
|
||||
can_build = can_build && istype(usr.loc, /turf/open/floor)
|
||||
*/
|
||||
if (R.res_amount>1)
|
||||
title+= "[R.res_amount]x [R.title]\s"
|
||||
else
|
||||
@@ -168,7 +162,7 @@
|
||||
if (R.one_per_turf && (locate(R.result_type) in usr.loc))
|
||||
usr << "<span class='warning'>There is another [R.title] here!</span>"
|
||||
return 0
|
||||
if (R.on_floor && !istype(usr.loc, /turf/open/floor))
|
||||
if(R.on_floor && !isfloorturf(usr.loc))
|
||||
usr << "<span class='warning'>\The [R.title] must be constructed on the floor!</span>"
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -230,7 +230,7 @@ RCD
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/rcd/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(isrobot(user)) //Make sure cyborgs can't load their RCDs
|
||||
if(iscyborg(user)) //Make sure cyborgs can't load their RCDs
|
||||
return
|
||||
var/loaded = 0
|
||||
if(istype(W, /obj/item/weapon/rcd_ammo))
|
||||
@@ -307,7 +307,7 @@ RCD
|
||||
|
||||
switch(mode)
|
||||
if(1)
|
||||
if(istype(A, /turf/open/space))
|
||||
if(isspaceturf(A))
|
||||
var/turf/open/space/S = A
|
||||
if(useResource(floorcost, user))
|
||||
user << "<span class='notice'>You start building floor...</span>"
|
||||
@@ -316,7 +316,7 @@ RCD
|
||||
return 1
|
||||
return 0
|
||||
|
||||
if(istype(A, /turf/open/floor))
|
||||
if(isfloorturf(A))
|
||||
var/turf/open/floor/F = A
|
||||
if(checkResource(wallcost, user))
|
||||
user << "<span class='notice'>You start building wall...</span>"
|
||||
@@ -330,7 +330,7 @@ RCD
|
||||
return 0
|
||||
|
||||
if(2)
|
||||
if(istype(A, /turf/open/floor))
|
||||
if(isfloorturf(A))
|
||||
if(checkResource(airlockcost, user))
|
||||
var/door_check = 1
|
||||
for(var/obj/machinery/door/D in A)
|
||||
@@ -370,12 +370,12 @@ RCD
|
||||
return 0
|
||||
|
||||
if(3)
|
||||
if(istype(A, /turf/closed/wall))
|
||||
if(iswallturf(A))
|
||||
var/turf/closed/wall/W = A
|
||||
if(istype(W, /turf/closed/wall/r_wall) && !canRturf)
|
||||
return 0
|
||||
if(checkResource(deconwallcost, user))
|
||||
user << "<span class='notice'>You start deconstructing wall...</span>"
|
||||
user << "<span class='notice'>You start deconstructing [W]...</span>"
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, deconwalldelay, target = A))
|
||||
if(!useResource(deconwallcost, user)) return 0
|
||||
@@ -384,7 +384,7 @@ RCD
|
||||
return 1
|
||||
return 0
|
||||
|
||||
if(istype(A, /turf/open/floor))
|
||||
if(isfloorturf(A))
|
||||
var/turf/open/floor/F = A
|
||||
if(istype(F, /turf/open/floor/engine) && !canRturf)
|
||||
return 0
|
||||
@@ -435,7 +435,7 @@ RCD
|
||||
return 0
|
||||
|
||||
if (4)
|
||||
if(istype(A, /turf/open/floor))
|
||||
if(isfloorturf(A))
|
||||
if(checkResource(grillecost, user))
|
||||
if(locate(/obj/structure/grille) in A)
|
||||
user << "<span class='warning'>There is already a grille there!</span>"
|
||||
@@ -504,7 +504,7 @@ RCD
|
||||
canRturf = 1
|
||||
|
||||
/obj/item/weapon/rcd/borg/useResource(amount, mob/user)
|
||||
if(!isrobot(user))
|
||||
if(!iscyborg(user))
|
||||
return 0
|
||||
var/mob/living/silicon/robot/borgy = user
|
||||
if(!borgy.cell)
|
||||
@@ -517,7 +517,7 @@ RCD
|
||||
return .
|
||||
|
||||
/obj/item/weapon/rcd/borg/checkResource(amount, mob/user)
|
||||
if(!isrobot(user))
|
||||
if(!iscyborg(user))
|
||||
return 0
|
||||
var/mob/living/silicon/robot/borgy = user
|
||||
if(!borgy.cell)
|
||||
|
||||
@@ -64,13 +64,13 @@ RSF
|
||||
/obj/item/weapon/rsf/afterattack(atom/A, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if (!(istype(A, /obj/structure/table) || istype(A, /turf/open/floor)))
|
||||
if (!(istype(A, /obj/structure/table) || isfloorturf(A)))
|
||||
return
|
||||
|
||||
if(matter < 1)
|
||||
user << "<span class='warning'>\The [src] doesn't have enough matter left.</span>"
|
||||
return
|
||||
if(isrobot(user))
|
||||
if(iscyborg(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(!R.cell || R.cell.charge < 200)
|
||||
user << "<span class='warning'>You do not have enough power to use [src].</span>"
|
||||
@@ -105,7 +105,7 @@ RSF
|
||||
use_matter(10, user)
|
||||
|
||||
/obj/item/weapon/rsf/proc/use_matter(charge, mob/user)
|
||||
if (isrobot(user))
|
||||
if (iscyborg(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
R.cell.charge -= charge
|
||||
else
|
||||
@@ -141,7 +141,7 @@ RSF
|
||||
|
||||
/obj/item/weapon/cookiesynth/attack_self(mob/user)
|
||||
var/mob/living/silicon/robot/P = null
|
||||
if(isrobot(user))
|
||||
if(iscyborg(user))
|
||||
P = user
|
||||
if(emagged&&!toxin)
|
||||
toxin = 1
|
||||
@@ -162,12 +162,12 @@ RSF
|
||||
return
|
||||
if(!proximity)
|
||||
return
|
||||
if (!(istype(A, /obj/structure/table) || istype(A, /turf/open/floor)))
|
||||
if (!(istype(A, /obj/structure/table) || isfloorturf(A)))
|
||||
return
|
||||
if(matter < 1)
|
||||
user << "<span class='warning'>The [src] doesn't have enough matter left. Wait for it to recharge!</span>"
|
||||
return
|
||||
if(isrobot(user))
|
||||
if(iscyborg(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(!R.cell || R.cell.charge < 400)
|
||||
user << "<span class='warning'>You do not have enough power to use [src].</span>"
|
||||
@@ -178,7 +178,7 @@ RSF
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/cookie/S = new /obj/item/weapon/reagent_containers/food/snacks/cookie(T)
|
||||
if(toxin)
|
||||
S.reagents.add_reagent("chloralhydrate2", 10)
|
||||
if (isrobot(user))
|
||||
if (iscyborg(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
R.cell.charge -= 100
|
||||
else
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
// Find out if there is an open turf in front of us,
|
||||
// and if not, pick the turf we are standing on.
|
||||
var/turf/T = get_step(get_turf(src), user.dir)
|
||||
if(!istype(T, /turf/open))
|
||||
if(!isopenturf(T))
|
||||
T = get_turf(src)
|
||||
|
||||
// they managed to lose their lungs between then and
|
||||
|
||||
@@ -353,7 +353,7 @@
|
||||
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
return
|
||||
if(!wielded)
|
||||
if(isrobot(user))
|
||||
if(iscyborg(user))
|
||||
user << "<span class='warning'>You must activate the paddles in your active module before you can use them on someone!</span>"
|
||||
else
|
||||
user << "<span class='warning'>You need to wield the paddles in both hands before you can use them on someone!</span>"
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
reagents.clear_reagents()
|
||||
|
||||
var/turf/T = get_turf(loc)
|
||||
if(istype(T, /turf/open))
|
||||
if(isopenturf(T))
|
||||
var/turf/open/theturf = T
|
||||
theturf.MakeSlippery(min_wet_time = 10, wet_time_to_add = 5)
|
||||
|
||||
|
||||
@@ -29,25 +29,25 @@
|
||||
icon_state = "frag"
|
||||
|
||||
/obj/item/weapon/grenade/gluon
|
||||
desc = "An advanced grenade that releases a harmful stream of gluons inducing radiation in those nearby. These gluon streams will also make victims feel exhausted, and induce shivering. This extreme coldness will also likely wet any nearby floors."
|
||||
name = "gluon frag grenade"
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "bluefrag"
|
||||
item_state = "flashbang"
|
||||
var/freeze_range = 4
|
||||
var/rad_damage = 35
|
||||
var/stamina_damage = 30
|
||||
desc = "An advanced grenade that releases a harmful stream of gluons inducing radiation in those nearby. These gluon streams will also make victims feel exhausted, and induce shivering. This extreme coldness will also likely wet any nearby floors."
|
||||
name = "gluon frag grenade"
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "bluefrag"
|
||||
item_state = "flashbang"
|
||||
var/freeze_range = 4
|
||||
var/rad_damage = 35
|
||||
var/stamina_damage = 30
|
||||
|
||||
/obj/item/weapon/grenade/gluon/prime()
|
||||
update_mob()
|
||||
playsound(loc, 'sound/effects/EMPulse.ogg', 50, 1)
|
||||
radiation_pulse(loc,freeze_range,freeze_range+1,rad_damage)
|
||||
for(var/turf/T in view(freeze_range,loc))
|
||||
if(istype(T,/turf/open/floor))
|
||||
var/turf/open/floor/F = T
|
||||
F.wet = TURF_WET_PERMAFROST
|
||||
addtimer(F, "MakeDry", rand(3000, 3100), 0, TURF_WET_PERMAFROST)
|
||||
for(var/mob/living/carbon/L in T)
|
||||
L.adjustStaminaLoss(stamina_damage)
|
||||
L.bodytemperature -= 230
|
||||
qdel(src)
|
||||
update_mob()
|
||||
playsound(loc, 'sound/effects/EMPulse.ogg', 50, 1)
|
||||
radiation_pulse(loc,freeze_range,freeze_range+1,rad_damage)
|
||||
for(var/turf/T in view(freeze_range,loc))
|
||||
if(isfloorturf(T))
|
||||
var/turf/open/floor/F = T
|
||||
F.wet = TURF_WET_PERMAFROST
|
||||
addtimer(F, "MakeDry", rand(3000, 3100), 0, TURF_WET_PERMAFROST)
|
||||
for(var/mob/living/carbon/L in T)
|
||||
L.adjustStaminaLoss(stamina_damage)
|
||||
L.bodytemperature -= 230
|
||||
qdel(src)
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/restraints/handcuffs/cable/zipties/cyborg/attack(mob/living/carbon/C, mob/user)
|
||||
if(isrobot(user))
|
||||
if(iscyborg(user))
|
||||
if(!C.handcuffed)
|
||||
playsound(loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2)
|
||||
C.visible_message("<span class='danger'>[user] is trying to put zipties on [C]!</span>", \
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
var/shock = 0
|
||||
|
||||
/obj/item/weapon/holosign_creator/cyborg/attack_self(mob/user)
|
||||
if(isrobot(user))
|
||||
if(iscyborg(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
|
||||
if(shock)
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
else
|
||||
user.take_bodypart_damage(2*force)
|
||||
return
|
||||
if(isrobot(target))
|
||||
if(iscyborg(target))
|
||||
..()
|
||||
return
|
||||
if(!isliving(target))
|
||||
@@ -90,7 +90,7 @@
|
||||
if (user.a_intent == "harm")
|
||||
if(!..())
|
||||
return
|
||||
if(!isrobot(target))
|
||||
if(!iscyborg(target))
|
||||
return
|
||||
else
|
||||
if(cooldown <= world.time)
|
||||
@@ -190,7 +190,7 @@
|
||||
consume_everything(target)
|
||||
else
|
||||
var/turf/T = get_turf(src)
|
||||
if(!istype(T,/turf/open/space))
|
||||
if(!isspaceturf(T))
|
||||
consume_turf(T)
|
||||
|
||||
/obj/item/weapon/melee/supermatter_sword/afterattack(target, mob/user, proximity_flag)
|
||||
|
||||
@@ -26,7 +26,7 @@ obj/item/weapon/mop/proc/clean(turf/A)
|
||||
for(var/obj/effect/O in A)
|
||||
if(is_cleanable(O))
|
||||
qdel(O)
|
||||
if(istype(A, /turf/closed))
|
||||
if(isclosedturf(A))
|
||||
var/turf/closed/C = A
|
||||
C.thermite = 0
|
||||
reagents.reaction(A, TOUCH, 10) //Needed for proper floor wetting.
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
if(paintleft <= 0)
|
||||
icon_state = "paint_empty"
|
||||
return
|
||||
if(!istype(target) || istype(target, /turf/open/space))
|
||||
if(!istype(target) || isspaceturf(target))
|
||||
return
|
||||
target.color = "#" + item_color
|
||||
|
||||
|
||||
@@ -302,7 +302,7 @@
|
||||
/obj/item/weapon/storage/backpack/satchel/flat/secret/New()
|
||||
..()
|
||||
|
||||
if(istype(loc,/turf/open/floor) && !istype(loc,/turf/open/floor/plating/))
|
||||
if(isfloorturf(loc) && !istype(loc,/turf/open/floor/plating/))
|
||||
hide(1)
|
||||
|
||||
/obj/item/weapon/storage/backpack/satchel/flat/secret/hide(intact)
|
||||
|
||||
@@ -187,7 +187,7 @@ var/global/list/bibleitemstates = list("bible", "koran", "scrapbook", "bible", "
|
||||
/obj/item/weapon/storage/book/bible/afterattack(atom/A, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if (istype(A, /turf/open/floor))
|
||||
if(isfloorturf(A))
|
||||
user << "<span class='notice'>You hit the floor with the bible.</span>"
|
||||
if(user.mind && (user.mind.assigned_role == "Chaplain"))
|
||||
for(var/obj/effect/rune/R in orange(2,user))
|
||||
|
||||
@@ -386,7 +386,7 @@
|
||||
if(labeler.mode)
|
||||
return 0
|
||||
. = 1 //no afterattack
|
||||
if(isrobot(user))
|
||||
if(iscyborg(user))
|
||||
return //Robots can't interact with storage items.
|
||||
|
||||
if(!can_be_inserted(W, 0 , user))
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
deductcharge(hitcost)
|
||||
return
|
||||
|
||||
if(isrobot(M))
|
||||
if(iscyborg(M))
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
if(H.check_shields(0, "[user]'s [name]", src, MELEE_ATTACK)) //No message; check_shields() handles that
|
||||
playsound(L, 'sound/weapons/Genhit.ogg', 50, 1)
|
||||
return 0
|
||||
if(isrobot(loc))
|
||||
if(iscyborg(loc))
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
if(!R || !R.cell || !R.cell.use(hitcost))
|
||||
return 0
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
else //something wrong
|
||||
name = "[initial(name)]"
|
||||
update_icon()
|
||||
if(isrobot(user))
|
||||
if(iscyborg(user))
|
||||
user << "<span class='notice'>You free up your module.</span>"
|
||||
else if(istype(src, /obj/item/weapon/twohanded/required))
|
||||
user << "<span class='notice'>You drop \the [name].</span>"
|
||||
@@ -71,7 +71,7 @@
|
||||
force = force_wielded
|
||||
name = "[name] (Wielded)"
|
||||
update_icon()
|
||||
if(isrobot(user))
|
||||
if(iscyborg(user))
|
||||
user << "<span class='notice'>You dedicate your module to [name].</span>"
|
||||
else
|
||||
user << "<span class='notice'>You grab the [name] with both hands.</span>"
|
||||
@@ -362,7 +362,7 @@
|
||||
/obj/item/weapon/twohanded/spear/afterattack(atom/movable/AM, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(istype(AM, /turf/open)) //So you can actually melee with it
|
||||
if(isopenturf(AM)) //So you can actually melee with it
|
||||
return
|
||||
if(explosive && wielded)
|
||||
user.say("[war_cry]")
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
return
|
||||
if ((!( istype(O, /obj/item/weapon) ) || user.get_active_held_item() != O))
|
||||
return
|
||||
if(isrobot(user))
|
||||
if(iscyborg(user))
|
||||
return
|
||||
if(!user.drop_item())
|
||||
return
|
||||
|
||||
@@ -195,7 +195,7 @@
|
||||
if(3)
|
||||
icon = 'icons/obj/smooth_structures/alien/weeds3.dmi'
|
||||
linked_node = node
|
||||
if(istype(loc, /turf/open/space))
|
||||
if(isspaceturf(loc))
|
||||
qdel(src)
|
||||
return
|
||||
addtimer(src, "Life", rand(150, 200))
|
||||
@@ -208,7 +208,7 @@
|
||||
set background = BACKGROUND_ENABLED
|
||||
var/turf/U = get_turf(src)
|
||||
|
||||
if(istype(U, /turf/open/space))
|
||||
if(isspaceturf(U))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -217,7 +217,7 @@
|
||||
|
||||
for(var/turf/T in U.GetAtmosAdjacentTurfs())
|
||||
|
||||
if (locate(/obj/structure/alien/weeds) in T || istype(T, /turf/open/space))
|
||||
if (locate(/obj/structure/alien/weeds) in T || isspaceturf(T))
|
||||
continue
|
||||
|
||||
new /obj/structure/alien/weeds(T, linked_node)
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(isrobot(user) || isalien(user))
|
||||
if(iscyborg(user) || isalien(user))
|
||||
return
|
||||
if(istype(I, /obj/item/weapon/extinguisher))
|
||||
if(!has_extinguisher && opened)
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
|
||||
/obj/structure/extinguisher_cabinet/attack_hand(mob/user)
|
||||
if(isrobot(user) || isalien(user))
|
||||
if(iscyborg(user) || isalien(user))
|
||||
return
|
||||
if(has_extinguisher)
|
||||
user.put_in_hands(has_extinguisher)
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
if(T.density)
|
||||
user << "<span class='warning'>[src] is blocked!</span>"
|
||||
return
|
||||
if(!istype(T, /turf/open/floor))
|
||||
if(!isfloorturf(T))
|
||||
user << "<span class='warning'>[src] bolts must be tightened on the floor!</span>"
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] tightens some bolts on the wall.</span>", "<span class='notice'>You tighten the bolts on the wall.</span>")
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/structure/fireaxecabinet/attackby(obj/item/I, mob/user, params)
|
||||
if(isrobot(user) || istype(I,/obj/item/device/multitool))
|
||||
if(iscyborg(user) || istype(I,/obj/item/device/multitool))
|
||||
toggle_lock(user)
|
||||
return
|
||||
if(open || health <= 0)
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wrench))
|
||||
if(state == GIRDER_DISPLACED)
|
||||
if(!istype(loc, /turf/open/floor))
|
||||
if(!isfloorturf(loc))
|
||||
user << "<span class='warning'>A floor must be present to secure the girder!</span>"
|
||||
return
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
@@ -86,10 +86,10 @@
|
||||
qdel(src)
|
||||
|
||||
else if(istype(W, /obj/item/stack))
|
||||
if (istype(src.loc, /turf/closed/wall))
|
||||
if(iswallturf(loc))
|
||||
user << "<span class='warning'>There is already a wall present!</span>"
|
||||
return
|
||||
if (!istype(src.loc, /turf/open/floor))
|
||||
if(!isfloorturf(src.loc))
|
||||
user << "<span class='warning'>A floor must be present to build a false wall!</span>"
|
||||
return
|
||||
if (locate(/obj/structure/falsewall) in src.loc.contents)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
add_overlay("[icon_state]_door")
|
||||
|
||||
/obj/structure/guncase/attackby(obj/item/I, mob/user, params)
|
||||
if(isrobot(user) || isalien(user))
|
||||
if(iscyborg(user) || isalien(user))
|
||||
return
|
||||
if(istype(I, gun_category))
|
||||
if(contents.len < capacity && open)
|
||||
@@ -53,7 +53,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/guncase/attack_hand(mob/user)
|
||||
if(isrobot(user) || isalien(user))
|
||||
if(iscyborg(user) || isalien(user))
|
||||
return
|
||||
if(contents.len && open)
|
||||
ShowWindow(user)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
/obj/structure/mineral_door/attack_ai(mob/user) //those aren't machinery, they're just big fucking slabs of a mineral
|
||||
if(isAI(user)) //so the AI can't open it
|
||||
return
|
||||
else if(isrobot(user)) //but cyborgs can
|
||||
else if(iscyborg(user)) //but cyborgs can
|
||||
if(get_dist(user,src) <= 1) //not remotely though
|
||||
return TryToSwitchState(user)
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
"<span class='notice'>You loosen the [name]'s bolts!</span>")
|
||||
anchored = 0
|
||||
else
|
||||
if (!istype(src.loc, /turf/open/floor))
|
||||
if(!isfloorturf(src.loc))
|
||||
user.visible_message("<span class='warning'>A floor must be present to secure the [name]!</span>")
|
||||
return
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
mob.client.Move(get_step(loc, direction), direction)
|
||||
mob.reset_perspective(null)
|
||||
|
||||
//if(moving && istype(loc, /turf/open/space))
|
||||
//if(moving && isspaceturf(loc))
|
||||
// Todo: If you get out of a moving pod in space, you should move as well.
|
||||
// Same direction as pod? Direcion you moved? Halfway between?
|
||||
|
||||
|
||||
@@ -208,7 +208,7 @@
|
||||
else
|
||||
wash_obj(G)
|
||||
else
|
||||
if(istype(loc, /turf/open))
|
||||
if(isopenturf(loc))
|
||||
var/turf/open/tile = loc
|
||||
tile.MakeSlippery(min_wet_time = 5, wet_time_to_add = 1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user