resolve conflicts

This commit is contained in:
CornMyCob
2020-06-29 15:20:03 +01:00
360 changed files with 69775 additions and 145021 deletions
+7 -7
View File
@@ -11,7 +11,7 @@
/atom/movable/attack_hand(mob/living/user)
. = ..()
if(can_buckle && has_buckled_mobs())
if(buckled_mobs.len > 1)
if(length(buckled_mobs) > 1)
var/unbuckled = input(user, "Who do you wish to unbuckle?", "Unbuckle Who?") as null|mob in buckled_mobs
if(user_unbuckle_mob(unbuckled,user))
return TRUE
@@ -26,15 +26,12 @@
return TRUE
/atom/movable/proc/has_buckled_mobs()
if(!buckled_mobs)
return FALSE
if(buckled_mobs.len)
return TRUE
return length(buckled_mobs)
/atom/movable/attack_robot(mob/living/user)
. = ..()
if(can_buckle && has_buckled_mobs() && Adjacent(user)) // attack_robot is called on all ranges, so the Adjacent check is needed
if(buckled_mobs.len > 1)
if(length(buckled_mobs) > 1)
var/unbuckled = input(user, "Who do you wish to unbuckle?", "Unbuckle Who?") as null|mob in buckled_mobs
if(user_unbuckle_mob(unbuckled,user))
return TRUE
@@ -54,7 +51,7 @@
if(check_loc && M.loc != loc)
return FALSE
if((!can_buckle && !force) || M.buckled || (buckled_mobs.len >= max_buckled_mobs) || (buckle_requires_restraints && !M.restrained()) || M == src)
if((!can_buckle && !force) || M.buckled || (length(buckled_mobs) >= max_buckled_mobs) || (buckle_requires_restraints && !M.restrained()) || M == src)
return FALSE
M.buckling = src
if(!M.can_buckle() && !force)
@@ -69,6 +66,9 @@
if(buckle_prevents_pull)
M.pulledby.stop_pulling()
for(var/obj/item/grab/G in M.grabbed_by)
qdel(G)
if(!check_loc && M.loc != loc)
M.forceMove(loc)
@@ -6,7 +6,8 @@
var/lootdoubles = 1 //if the same item can be spawned twice
var/list/loot //a list of possible items to spawn e.g. list(/obj/item, /obj/structure, /obj/effect)
/obj/effect/spawner/lootdrop/New()
/obj/effect/spawner/lootdrop/Initialize(mapload)
..()
if(loot && loot.len)
for(var/i = lootcount, i > 0, i--)
if(!loot.len) break
@@ -15,8 +16,8 @@
loot.Remove(lootspawn)
if(lootspawn)
new lootspawn(get_turf(src))
qdel(src)
new lootspawn(loc)
return INITIALIZE_HINT_QDEL
/obj/effect/spawner/lootdrop/armory_contraband
name = "armory contraband gun spawner"
+1 -1
View File
@@ -51,7 +51,7 @@
var/list/affecting = list()
/obj/effect/step_trigger/thrower/Trigger(atom/A)
if(!A || !ismovableatom(A))
if(!A || !ismovable(A))
return
var/atom/movable/AM = A
var/curtiles = 0
+2 -2
View File
@@ -88,7 +88,7 @@
var/turf/T = A
if(!T)
continue
var/dist = hypotenuse(T.x, T.y, x0, y0)
var/dist = HYPOTENUSE(T.x, T.y, x0, y0)
if(config.reactionary_explosions)
var/turf/Trajectory = T
@@ -209,7 +209,7 @@
var/list/wipe_colours = list()
for(var/turf/T in spiral_range_turfs(max_range, epicenter))
wipe_colours += T
var/dist = hypotenuse(T.x, T.y, x0, y0)
var/dist = HYPOTENUSE(T.x, T.y, x0, y0)
if(newmode == "Yes")
var/turf/TT = T
+4 -3
View File
@@ -19,6 +19,7 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect
can_be_hit = FALSE
suicidal_hands = TRUE
var/list/attack_verb //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
var/hitsound = null
var/usesound = null
var/throwhitsound
@@ -124,10 +125,10 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect
return ..()
/obj/item/proc/check_allowed_items(atom/target, not_inside, target_self)
if(((src in target) && !target_self) || ((!istype(target.loc, /turf)) && (!istype(target, /turf)) && (not_inside)))
return 0
if(((src in target) && !target_self) || (!isturf(target.loc) && !isturf(target) && not_inside))
return FALSE
else
return 1
return TRUE
/obj/item/blob_act(obj/structure/blob/B)
if(B && B.loc == loc)
@@ -241,6 +241,7 @@
user.base_icon = disguise
user.icon_state = disguise
user.cham_proj = src
user.bubble_icon = "robot"
active = TRUE
user.update_icons()
@@ -249,6 +250,7 @@
S = user
user.base_icon = initial(user.base_icon)
user.icon_state = initial(user.icon_state)
user.bubble_icon = "syndibot"
active = FALSE
user.update_icons()
-11
View File
@@ -113,7 +113,6 @@
/obj/item/flash/attack(mob/living/M, mob/user)
if(!try_use_flash(user))
return 0
if(iscarbon(M))
flash_carbon(M, user, 5, 1)
if(overcharged)
@@ -121,22 +120,12 @@
M.IgniteMob()
burn_out()
return 1
else if(issilicon(M))
if(isrobot(M))
var/mob/living/silicon/robot/R = M
if(R.module) // Perhaps they didn't choose a module yet
for(var/obj/item/borg/combat/shield/S in R.module.modules)
if(R.activated(S))
add_attack_logs(user, M, "Flashed with [src]")
user.visible_message("<span class='disarm'>[user] tries to overloads [M]'s sensors with the [src.name], but is blocked by [M]'s shield!</span>", "<span class='danger'>You try to overload [M]'s sensors with the [src.name], but are blocked by [M.p_their()] shield!</span>")
return 1
add_attack_logs(user, M, "Flashed with [src]")
if(M.flash_eyes(affect_silicon = 1))
M.Weaken(rand(5,10))
user.visible_message("<span class='disarm'>[user] overloads [M]'s sensors with the [src.name]!</span>", "<span class='danger'>You overload [M]'s sensors with the [src.name]!</span>")
return 1
user.visible_message("<span class='disarm'>[user] fails to blind [M] with the [src.name]!</span>", "<span class='warning'>You fail to blind [M] with the [src.name]!</span>")
@@ -167,7 +167,7 @@
// Negative numbers will subtract
/obj/item/lightreplacer/proc/AddUses(amount = 1)
uses = Clamp(uses + amount, 0, max_uses)
uses = clamp(uses + amount, 0, max_uses)
/obj/item/lightreplacer/proc/AddShards(amount = 1, user)
bulb_shards += amount
@@ -27,7 +27,7 @@
desc = "A box suited for pizzas."
icon_state = "pizzabox1"
return
timer = Clamp(timer, 10, 100)
timer = clamp(timer, 10, 100)
icon_state = "pizzabox1"
to_chat(user, "<span class='notice'>You set the timer to [timer / 10] before activating the payload and closing \the [src].")
message_admins("[key_name_admin(usr)] has set a timer on a pizza bomb to [timer/10] seconds at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[loc.x];Y=[loc.y];Z=[loc.z]'>(JMP)</a>.")
@@ -52,7 +52,7 @@
if(disarmed)
visible_message("<span class='danger'>[bicon(src)] Sparks briefly jump out of the [correct_wire] wire on \the [src], but it's disarmed!")
return
src.audible_message("[bicon(src)] <b>[src]</b> beeps, \"Enjoy the pizza!\"")
atom_say("Enjoy the pizza!")
src.visible_message("<span class='userdanger'>\The [src] violently explodes!</span>")
explosion(src.loc,1,2,4,flame_range = 2) //Identical to a minibomb
qdel(src)
@@ -65,7 +65,7 @@
else if(href_list["code"])
code += text2num(href_list["code"])
code = round(code)
code = Clamp(code, 1, 100)
code = clamp(code, 1, 100)
else if(href_list["power"])
on = !on
@@ -46,16 +46,15 @@
name = "station intercom (Security)"
frequency = SEC_I_FREQ
/obj/item/radio/intercom/New(turf/loc, ndir, building = 3)
..()
/obj/item/radio/intercom/New(turf/loc, direction, building = 3)
. = ..()
buildstage = building
if(buildstage)
START_PROCESSING(SSobj, src)
else
if(ndir)
pixel_x = (ndir & EAST|WEST) ? (ndir == EAST ? 28 : -28) : 0
pixel_y = (ndir & NORTH|SOUTH) ? (ndir == NORTH ? 28 : -28) : 0
dir=ndir
if(direction)
setDir(direction)
set_pixel_offsets_from_dir(28, -28, 28, -28)
b_stat=1
on = 0
GLOB.global_intercoms.Add(src)
@@ -204,7 +203,7 @@
STOP_PROCESSING(SSobj, src)
/obj/item/radio/intercom/welder_act(mob/user, obj/item/I)
if(!buildstage)
if(buildstage != 0)
return
. = TRUE
if(!I.tool_use_check(user, 3))
@@ -295,7 +295,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
universal_speak = 1
/mob/living/automatedannouncer/New()
lifetime_timer = addtimer(CALLBACK(src, .proc/autocleanup), SecondsToTicks(10), TIMER_STOPPABLE)
lifetime_timer = addtimer(CALLBACK(src, .proc/autocleanup), 10 SECONDS, TIMER_STOPPABLE)
..()
/mob/living/automatedannouncer/Destroy()
@@ -623,6 +623,9 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
..()
set_frequency(ERT_FREQ)
/obj/item/radio/borg/ert/specops
keyslot = new /obj/item/encryptionkey/centcom
/obj/item/radio/borg/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/encryptionkey/))
user.set_machine(src)
@@ -6,5 +6,5 @@
mount_reqs = list("simfloor", "nospace")
/obj/item/mounted/frame/firealarm/do_build(turf/on_wall, mob/user)
new /obj/machinery/firealarm(get_turf(src), get_dir(on_wall, user), 1)
new /obj/machinery/firealarm(get_turf(src), get_dir(user, on_wall), 1)
qdel(src)
+34 -23
View File
@@ -9,23 +9,23 @@
origin_tech = "programming=2"
var/locked = 0
var/installed = 0
var/require_module = 0
var/require_module = FALSE
var/module_type = null
/obj/item/borg/upgrade/proc/action(mob/living/silicon/robot/R)
if(R.stat == DEAD)
to_chat(usr, "<span class='notice'>[src] will not function on a deceased cyborg.</span>")
return 1
return TRUE
if(module_type && !istype(R.module, module_type))
to_chat(R, "Upgrade mounting error! No suitable hardpoint detected!")
to_chat(usr, "There's no mounting point for the module!")
return 1
return TRUE
/obj/item/borg/upgrade/reset
name = "cyborg module reset board"
desc = "Used to reset a cyborg's module. Destroys any other upgrades applied to the cyborg."
icon_state = "cyborg_upgrade1"
require_module = 1
require_module = TRUE
/obj/item/borg/upgrade/reset/action(mob/living/silicon/robot/R)
if(..())
@@ -55,7 +55,7 @@
R.custom_name = heldname
R.real_name = heldname
return 1
return TRUE
/obj/item/borg/upgrade/restart
name = "cyborg emergency reboot module"
@@ -77,14 +77,14 @@
GLOB.alive_mob_list += R
R.notify_ai(1)
return 1
return TRUE
/obj/item/borg/upgrade/vtec
name = "robotic VTEC Module"
desc = "Used to kick in a robot's VTEC systems, increasing their speed."
icon_state = "cyborg_upgrade2"
require_module = 1
require_module = TRUE
origin_tech = "engineering=4;materials=5;programming=4"
/obj/item/borg/upgrade/vtec/action(var/mob/living/silicon/robot/R)
@@ -97,14 +97,14 @@
R.speed = -1 // Gotta go fast.
return 1
return TRUE
/obj/item/borg/upgrade/disablercooler
name = "cyborg rapid disabler cooling module"
desc = "Used to cool a mounted disabler, increasing the potential current in it and thus its recharge rate."
icon_state = "cyborg_upgrade3"
origin_tech = "engineering=4;powerstorage=4;combat=4"
require_module = 1
require_module = TRUE
module_type = /obj/item/robot_module/security
/obj/item/borg/upgrade/disablercooler/action(mob/living/silicon/robot/R)
@@ -122,7 +122,7 @@
T.charge_delay = max(2 , T.charge_delay - 4)
return 1
return TRUE
/obj/item/borg/upgrade/thrusters
name = "ion thruster upgrade"
@@ -139,14 +139,14 @@
return
R.ionpulse = 1
return 1
return TRUE
/obj/item/borg/upgrade/ddrill
name = "mining cyborg diamond drill"
desc = "A diamond drill replacement for the mining module's standard drill."
icon_state = "cyborg_upgrade3"
origin_tech = "engineering=4;materials=5"
require_module = 1
require_module = TRUE
module_type = /obj/item/robot_module/miner
/obj/item/borg/upgrade/ddrill/action(mob/living/silicon/robot/R)
@@ -161,14 +161,14 @@
R.module.modules += new /obj/item/pickaxe/drill/cyborg/diamond(R.module)
R.module.rebuild()
return 1
return TRUE
/obj/item/borg/upgrade/soh
name = "mining cyborg satchel of holding"
desc = "A satchel of holding replacement for mining cyborg's ore satchel module."
icon_state = "cyborg_upgrade3"
origin_tech = "engineering=4;materials=4;bluespace=4"
require_module = 1
require_module = TRUE
module_type = /obj/item/robot_module/miner
/obj/item/borg/upgrade/soh/action(mob/living/silicon/robot/R)
@@ -181,35 +181,46 @@
R.module.modules += new /obj/item/storage/bag/ore/holding(R.module)
R.module.rebuild()
return 1
return TRUE
/obj/item/borg/upgrade/syndicate
name = "illegal equipment module"
name = "safety override module"
desc = "Unlocks the hidden, deadlier functions of a cyborg. Also prevents emag subversion."
icon_state = "cyborg_upgrade3"
origin_tech = "combat=4;syndicate=1"
require_module = 1
require_module = TRUE
/obj/item/borg/upgrade/syndicate/action(mob/living/silicon/robot/R)
if(..())
return
if(R.emagged)
return
if(R.weapons_unlock)
to_chat(R, "<span class='warning'>Internal diagnostic error: incompatible upgrade module detected.</span>");
return
R.emagged = 1
return TRUE
return 1
/obj/item/borg/upgrade/lavaproof
name = "mining cyborg lavaproof chassis"
desc = "An upgrade kit to apply specialized coolant systems and insulation layers to a mining cyborg's chassis, enabling them to withstand exposure to molten rock."
icon_state = "ash_plating"
resistance_flags = LAVA_PROOF | FIRE_PROOF
require_module = TRUE
module_type = /obj/item/robot_module/miner
/obj/item/borg/upgrade/lavaproof/action(mob/living/silicon/robot/R)
if(..())
return
if(istype(R))
R.weather_immunities += "lava"
return TRUE
/obj/item/borg/upgrade/selfrepair
name = "self-repair module"
desc = "This module will repair the cyborg over time."
icon_state = "cyborg_upgrade5"
require_module = 1
require_module = TRUE
var/repair_amount = -1
var/repair_tick = 1
var/msg_cooldown = 0
@@ -230,7 +241,7 @@
icon_state = "selfrepair_off"
var/datum/action/A = new /datum/action/item_action/toggle(src)
A.Grant(R)
return 1
return TRUE
/obj/item/borg/upgrade/selfrepair/Destroy()
cyborg = null
@@ -169,9 +169,9 @@ GLOBAL_LIST_INIT(sinew_recipes, list ( \
return
if(is_type_in_typecache(target, goliath_platable_armor_typecache))
var/obj/item/clothing/C = target
var/list/current_armor = C.armor
if(current_armor["melee"] < 60)
current_armor["melee"] = min(current_armor["melee"] + 10, 60)
var/datum/armor/current_armor = C.armor
if(current_armor.getRating("melee") < 60)
C.armor = current_armor.setRating(melee_value = min(current_armor.getRating("melee") + 10, 60))
to_chat(user, "<span class='info'>You strengthen [target], improving its resistance against melee attacks.</span>")
use(1)
else
@@ -180,9 +180,9 @@ GLOBAL_LIST_INIT(sinew_recipes, list ( \
var/obj/mecha/working/ripley/D = target
if(D.hides < 3)
D.hides++
D.armor["melee"] = min(D.armor["melee"] + 10, 70)
D.armor["bullet"] = min(D.armor["bullet"] + 5, 50)
D.armor["laser"] = min(D.armor["laser"] + 5, 50)
D.armor = D.armor.setRating(melee_value = min(D.armor.getRating("melee") + 10, 70))
D.armor = D.armor.setRating(bullet_value = min(D.armor.getRating("bullet") + 5, 50))
D.armor = D.armor.setRating(laser_value = min(D.armor.getRating("laser") + 5, 50))
to_chat(user, "<span class='info'>You strengthen [target], improving its resistance against melee attacks.</span>")
D.update_icon()
if(D.hides == 3)
@@ -4,7 +4,7 @@
// No delay means there is no start message, and no reason to call tool_start_check before use_tool.
// Run the start check here so we wouldn't have to call it manually.
target.add_fingerprint(user)
if(!tool_start_check(user, amount) && !delay)
if(!tool_start_check(target, user, amount) && !delay)
return
delay *= toolspeed
@@ -39,7 +39,7 @@
// Called before use_tool if there is a delay, or by use_tool if there isn't.
// Only ever used by welding tools and stacks, so it's not added on any other use_tool checks.
/obj/item/proc/tool_start_check(mob/living/user, amount=0)
/obj/item/proc/tool_start_check(atom/target, mob/living/user, amount=0)
return tool_use_check(user, amount)
// A check called by tool_start_check once, and by use_tool on every tick of delay.
+3 -3
View File
@@ -108,9 +108,9 @@
return FALSE
// When welding is about to start, run a normal tool_use_check, then flash a mob if it succeeds.
/obj/item/weldingtool/tool_start_check(mob/living/user, amount=0)
/obj/item/weldingtool/tool_start_check(atom/target, mob/living/user, amount=0)
. = tool_use_check(user, amount)
if(. && user)
if(. && user && !ismob(target)) // Don't flash the user if they're repairing robo limbs or repairing a borg etc. Only flash them if the target is an object
user.flash_eyes(light_intensity)
/obj/item/weldingtool/use(amount)
@@ -167,7 +167,7 @@
/obj/item/weldingtool/update_icon()
if(low_fuel_changes_icon)
var/ratio = GET_FUEL / maximum_fuel
ratio = Ceiling(ratio*4) * 25
ratio = CEILING(ratio*4, 1) * 25
if(ratio == 100)
icon_state = initial(icon_state)
else
+2 -1
View File
@@ -1408,6 +1408,7 @@ obj/item/toy/cards/deck/syndicate/black
name = "xenomorph action figure"
desc = "MEGA presents the new Xenos Isolated action figure! Comes complete with realistic sounds! Pull back string to use."
w_class = WEIGHT_CLASS_SMALL
bubble_icon = "alien"
var/cooldown = 0
/obj/item/toy/toy_xeno/attack_self(mob/user)
@@ -1416,7 +1417,7 @@ obj/item/toy/cards/deck/syndicate/black
user.visible_message("<span class='notice'>[user] pulls back the string on [src].</span>")
icon_state = "[initial(icon_state)]_used"
sleep(5)
audible_message("<span class='danger'>[bicon(src)] Hiss!</span>")
atom_say("Hiss!")
var/list/possible_sounds = list('sound/voice/hiss1.ogg', 'sound/voice/hiss2.ogg', 'sound/voice/hiss3.ogg', 'sound/voice/hiss4.ogg')
playsound(get_turf(src), pick(possible_sounds), 50, 1)
spawn(45)
+1 -3
View File
@@ -477,9 +477,7 @@ GLOBAL_LIST_INIT(rcd_door_types, list(
return R.cell.charge >= (amount * use_multiplier)
/obj/item/rcd/proc/detonate_pulse()
audible_message("<span class='danger'><b>[src] begins to vibrate and \
buzz loudly!</b></span>","<span class='danger'><b>[src] begins \
vibrating violently!</b></span>")
audible_message("<span class='danger'><b>[src] begins to vibrate and buzz loudly!</b></span>", "<span class='danger'><b>[src] begins vibrating violently!</b></span>")
// 5 seconds to get rid of it
addtimer(CALLBACK(src, .proc/detonate_pulse_explode), 50)
@@ -188,7 +188,7 @@
/obj/structure/chrono_field/update_icon()
var/ttk_frame = 1 - (tickstokill / initial(tickstokill))
ttk_frame = Clamp(Ceiling(ttk_frame * CHRONO_FRAME_COUNT), 1, CHRONO_FRAME_COUNT)
ttk_frame = clamp(CEILING(ttk_frame * CHRONO_FRAME_COUNT, 1), 1, CHRONO_FRAME_COUNT)
if(ttk_frame != RPpos)
RPpos = ttk_frame
mob_underlay.icon_state = "frame[RPpos]"
+1 -1
View File
@@ -72,7 +72,7 @@
if(powered) //so it doesn't show charge if it's unpowered
if(cell)
var/ratio = cell.charge / cell.maxcharge
ratio = Ceiling(ratio*4) * 25
ratio = CEILING(ratio*4, 1) * 25
overlays += "[icon_state]-charge[ratio]"
/obj/item/defibrillator/CheckParts(list/parts_list)
+1 -1
View File
@@ -138,7 +138,7 @@
/obj/item/dice/proc/diceroll(mob/user)
result = roll(sides)
if(rigged != DICE_NOT_RIGGED && result != rigged_value)
if(rigged == DICE_BASICALLY_RIGGED && prob(Clamp(1/(sides - 1) * 100, 25, 80)))
if(rigged == DICE_BASICALLY_RIGGED && prob(clamp(1/(sides - 1) * 100, 25, 80)))
result = rigged_value
else if(rigged == DICE_TOTALLY_RIGGED)
result = rigged_value
@@ -62,7 +62,7 @@
return
var/newtime = input(usr, "Please set the timer.", "Timer", det_time) as num
if(user.is_in_active_hand(src))
newtime = Clamp(newtime, 10, 60000)
newtime = clamp(newtime, 10, 60000)
det_time = newtime
to_chat(user, "Timer set for [det_time] seconds.")
@@ -6,7 +6,7 @@
var/list/nemesis_factions //Any mob with a faction that exists in this list will take bonus damage/effects
w_class = WEIGHT_CLASS_SMALL
var/w_class_on = WEIGHT_CLASS_BULKY
var/icon_state_on = "axe1"
var/icon_state_on
var/list/attack_verb_on = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
hitsound = 'sound/weapons/blade1.ogg' // Probably more appropriate than the previous hitsound. -- Dave
usesound = 'sound/weapons/blade1.ogg'
@@ -48,9 +48,9 @@
throw_speed = 4
if(attack_verb_on.len)
attack_verb = attack_verb_on
if(!item_color)
if(icon_state_on)
icon_state = icon_state_on
set_light(brightness_on)
set_light(brightness_on, l_color = item_color ? colormap[item_color] : null)
else
icon_state = "sword[item_color]"
set_light(brightness_on, l_color=colormap[item_color])
@@ -80,6 +80,7 @@
name = "energy axe"
desc = "An energised battle axe."
icon_state = "axe0"
icon_state_on = "axe1"
force = 40
force_on = 150
throwforce = 25
@@ -301,9 +302,9 @@
throw_speed = 4
if(attack_verb_on.len)
attack_verb = attack_verb_on
if(!item_color)
if(icon_state_on)
icon_state = icon_state_on
set_light(brightness_on)
set_light(brightness_on, l_color = item_color ? colormap[item_color] : null)
else
icon_state = "sword[item_color]"
set_light(brightness_on, l_color=colormap[item_color])
+3 -3
View File
@@ -34,15 +34,15 @@
if(TH.force_wielded > initial(TH.force_wielded))
to_chat(user, "<span class='warning'>[TH] has already been refined before. It cannot be sharpened further!</span>")
return
TH.force_wielded = Clamp(TH.force_wielded + increment, 0, max)//wieldforce is increased since normal force wont stay
TH.force_wielded = clamp(TH.force_wielded + increment, 0, max)//wieldforce is increased since normal force wont stay
if(I.force > initial(I.force))
to_chat(user, "<span class='warning'>[I] has already been refined before. It cannot be sharpened further!</span>")
return
user.visible_message("<span class='notice'>[user] sharpens [I] with [src]!</span>", "<span class='notice'>You sharpen [I], making it much more deadly than before.</span>")
if(!requires_sharpness)
I.sharp = 1
I.force = Clamp(I.force + increment, 0, max)
I.throwforce = Clamp(I.throwforce + increment, 0, max)
I.force = clamp(I.force + increment, 0, max)
I.throwforce = clamp(I.throwforce + increment, 0, max)
I.name = "[prefix] [I.name]"
playsound(get_turf(src), usesound, 50, 1)
name = "worn out [name]"
+3 -3
View File
@@ -30,9 +30,9 @@
return 0
var/armor_protection = 0
if(damage_flag)
armor_protection = armor[damage_flag]
armor_protection = armor.getRating(damage_flag)
if(armor_protection) //Only apply weak-against-armor/hollowpoint effects if there actually IS armor.
armor_protection = Clamp(armor_protection - armour_penetration, min(armor_protection, 0), 100)
armor_protection = clamp(armor_protection - armour_penetration, min(armor_protection, 0), 100)
return round(damage_amount * (100 - armor_protection)*0.01, DAMAGE_PRECISION)
///the sound played when the obj is damaged.
@@ -201,7 +201,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
return
..()
if(exposed_temperature && !(resistance_flags & FIRE_PROOF))
take_damage(Clamp(0.02 * exposed_temperature, 0, 20), BURN, "fire", 0)
take_damage(clamp(0.02 * exposed_temperature, 0, 20), BURN, "fire", 0)
if(!(resistance_flags & ON_FIRE) && (resistance_flags & FLAMMABLE) && !(resistance_flags & FIRE_PROOF))
resistance_flags |= ON_FIRE
SSfires.processing[src] = src
+57 -51
View File
@@ -1,15 +1,14 @@
/obj
//var/datum/module/mod //not used
var/origin_tech = null //Used by R&D to determine what research bonuses it grants.
var/crit_fail = 0
var/crit_fail = FALSE
animate_movement = 2
var/list/attack_verb = list() //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
var/list/species_exception = null // list() of species types, if a species cannot put items in a certain slot, but species type is in list, it will be able to wear that item
var/sharp = 0 // whether this object cuts
var/in_use = 0 // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING!
var/sharp = FALSE // whether this object cuts
var/in_use = FALSE // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING!
var/damtype = "brute"
var/force = 0
var/list/armor
var/datum/armor/armor
var/obj_integrity //defaults to max_integrity
var/max_integrity = 500
var/integrity_failure = 0 //0 if we have no special broken behavior
@@ -22,9 +21,9 @@
var/can_be_hit = TRUE //can this be bludgeoned by items?
var/Mtoollink = 0 // variable to decide if an object should show the multitool menu linking menu, not all objects use it
var/Mtoollink = FALSE // variable to decide if an object should show the multitool menu linking menu, not all objects use it
var/being_shocked = 0
var/being_shocked = FALSE
var/speed_process = FALSE
var/on_blueprints = FALSE //Are we visible on the station blueprints at roundstart?
@@ -33,8 +32,6 @@
/obj/New()
..()
if(!armor)
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0)
if(obj_integrity == null)
obj_integrity = max_integrity
if(on_blueprints && isturf(loc))
@@ -44,25 +41,34 @@
else
T.add_blueprints_preround(src)
/obj/Topic(href, href_list, var/nowindow = 0, var/datum/topic_state/state = GLOB.default_state)
/obj/Initialize(mapload)
. = ..()
if(islist(armor))
armor = getArmor(arglist(armor))
else if(!armor)
armor = getArmor()
else if(!istype(armor, /datum/armor))
stack_trace("Invalid type [armor.type] found in .armor during /obj Initialize()")
/obj/Topic(href, href_list, nowindow = FALSE, datum/topic_state/state = GLOB.default_state)
// Calling Topic without a corresponding window open causes runtime errors
if(!nowindow && ..())
return 1
return TRUE
// In the far future no checks are made in an overriding Topic() beyond if(..()) return
// Instead any such checks are made in CanUseTopic()
if(CanUseTopic(usr, state, href_list) == STATUS_INTERACTIVE)
CouldUseTopic(usr)
return 0
return FALSE
CouldNotUseTopic(usr)
return 1
return TRUE
/obj/proc/CouldUseTopic(var/mob/user)
/obj/proc/CouldUseTopic(mob/user)
var/atom/host = nano_host()
host.add_fingerprint(user)
/obj/proc/CouldNotUseTopic(var/mob/user)
/obj/proc/CouldNotUseTopic(mob/user)
// Nada
/obj/Destroy()
@@ -110,23 +116,23 @@
// null if object handles breathing logic for lifeform
// datum/air_group to tell lifeform to process using that breath return
//DEFAULT: Take air from turf to give to have mob process
if(breath_request>0)
if(breath_request > 0)
return remove_air(breath_request)
else
return null
/obj/proc/updateUsrDialog()
if(in_use)
var/is_in_use = 0
var/is_in_use = FALSE
var/list/nearby = viewers(1, src)
for(var/mob/M in nearby)
if((M.client && M.machine == src))
is_in_use = 1
is_in_use = TRUE
src.attack_hand(M)
if(istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot))
if(!(usr in nearby))
if(usr.client && usr.machine==src) // && M.machine == src is omitted because if we triggered this by using the dialog, it doesn't matter if our machine changed in between triggering it and this - the dialog is probably still supposed to refresh.
is_in_use = 1
is_in_use = TRUE
src.attack_ai(usr)
// check for TK users
@@ -134,8 +140,8 @@
if(istype(usr, /mob/living/carbon/human))
if(istype(usr.l_hand, /obj/item/tk_grab) || istype(usr.r_hand, /obj/item/tk_grab/))
if(!(usr in nearby))
if(usr.client && usr.machine==src)
is_in_use = 1
if(usr.client && usr.machine == src)
is_in_use = TRUE
src.attack_hand(usr)
in_use = is_in_use
@@ -143,15 +149,15 @@
// Check that people are actually using the machine. If not, don't update anymore.
if(in_use)
var/list/nearby = viewers(1, src)
var/is_in_use = 0
var/is_in_use = FALSE
for(var/mob/M in nearby)
if((M.client && M.machine == src))
is_in_use = 1
is_in_use = TRUE
src.interact(M)
var/ai_in_use = AutoUpdateAI(src)
if(!ai_in_use && !is_in_use)
in_use = 0
in_use = FALSE
/obj/proc/interact(mob/user)
return
@@ -168,12 +174,12 @@
/atom/movable/proc/on_unset_machine(mob/user)
return
/mob/proc/set_machine(var/obj/O)
/mob/proc/set_machine(obj/O)
if(src.machine)
unset_machine()
src.machine = O
if(istype(O))
O.in_use = 1
O.in_use = TRUE
/obj/item/proc/updateSelfDialog()
var/mob/M = src.loc
@@ -183,48 +189,48 @@
/obj/proc/hide(h)
return
/obj/proc/hear_talk(mob/M, list/message_pieces)
return
/obj/proc/hear_message(mob/M as mob, text)
/obj/proc/hear_message(mob/M, text)
/obj/proc/multitool_menu(var/mob/user,var/obj/item/multitool/P)
/obj/proc/multitool_menu(mob/user, obj/item/multitool/P)
return "<b>NO MULTITOOL_MENU!</b>"
/obj/proc/linkWith(var/mob/user, var/obj/buffer, var/context)
return 0
/obj/proc/linkWith(mob/user, obj/buffer, context)
return FALSE
/obj/proc/unlinkFrom(var/mob/user, var/obj/buffer)
return 0
/obj/proc/unlinkFrom(mob/user, obj/buffer)
return FALSE
/obj/proc/canLink(var/obj/O, var/context)
return 0
/obj/proc/canLink(obj/O, list/context)
return FALSE
/obj/proc/isLinkedWith(var/obj/O)
return 0
/obj/proc/isLinkedWith(obj/O)
return FALSE
/obj/proc/getLink(var/idx)
/obj/proc/getLink(idx)
return null
/obj/proc/linkMenu(var/obj/O)
var/dat=""
/obj/proc/linkMenu(obj/O)
var/dat = ""
if(canLink(O, list()))
dat += " <a href='?src=[UID()];link=1'>\[Link\]</a> "
return dat
/obj/proc/format_tag(var/label,var/varname, var/act="set_tag")
/obj/proc/format_tag(label, varname, act = "set_tag")
var/value = vars[varname]
if(!value || value=="")
value="-----"
if(!value || value == "")
value = "-----"
return "<b>[label]:</b> <a href=\"?src=[UID()];[act]=[varname]\">[value]</a>"
/obj/proc/update_multitool_menu(mob/user as mob)
/obj/proc/update_multitool_menu(mob/user)
var/obj/item/multitool/P = get_multitool(user)
if(!istype(P))
return 0
return FALSE
var/dat = {"<html>
<head>
<title>[name] Configuration</title>
@@ -246,13 +252,13 @@ a {
<h3>[name]</h3>
"}
if(allowed(user))//no, assistants, you're not ruining all vents on the station with just a multitool
dat += multitool_menu(user,P)
dat += multitool_menu(user, P)
if(Mtoollink)
if(P)
if(P.buffer)
var/id = null
if("id_tag" in P.buffer.vars)
id=P.buffer:id_tag
id = P.buffer:id_tag
dat += "<p><b>MULTITOOL BUFFER:</b> [P.buffer] [id ? "([id])" : ""]"
dat += linkMenu(P.buffer)
@@ -309,12 +315,12 @@ a {
/obj/singularity_pull(S, current_size)
..()
if(!anchored || current_size >= STAGE_FIVE)
step_towards(src,S)
step_towards(src, S)
/obj/proc/container_resist(var/mob/living)
/obj/proc/container_resist(mob/living)
return
/obj/proc/CanAStarPass()
/obj/proc/CanAStarPass(ID, dir, caller)
. = !density
/obj/proc/on_mob_move(dir, mob/user)
@@ -343,4 +349,4 @@ a {
.["Make normal process"] = "?_src_=vars;makenormalspeed=[UID()]"
/obj/proc/check_uplink_validity()
return 1
return TRUE
+5 -2
View File
@@ -7,8 +7,6 @@
var/broken = FALSE
/obj/structure/New()
if (!armor)
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50)
..()
if(smooth)
if(SSticker && SSticker.current_state == GAME_STATE_PLAYING)
@@ -20,6 +18,11 @@
if(SSticker)
GLOB.cameranet.updateVisibility(src)
/obj/structure/Initialize(mapload)
if(!armor)
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50)
return ..()
/obj/structure/Destroy()
if(SSticker)
GLOB.cameranet.updateVisibility(src)
@@ -12,6 +12,8 @@
var/opened = FALSE
var/welded = FALSE
var/locked = FALSE
var/large = TRUE
var/can_be_emaged = FALSE
var/wall_mounted = 0 //never solid (You can always pass over it)
var/lastbang
var/sound = 'sound/machines/click.ogg'
@@ -143,84 +145,21 @@
/obj/structure/closet/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/rcs) && !opened)
if(user in contents) //to prevent self-teleporting.
return
var/obj/item/rcs/E = W
if(E.rcell && (E.rcell.charge >= E.chargecost))
if(!is_level_reachable(z))
to_chat(user, "<span class='warning'>The rapid-crate-sender can't locate any telepads!</span>")
return
if(E.mode == 0)
if(!E.teleporting)
var/list/L = list()
var/list/areaindex = list()
for(var/obj/machinery/telepad_cargo/R in GLOB.machines)
if(R.stage == 0)
var/turf/T = get_turf(R)
var/tmpname = T.loc.name
if(areaindex[tmpname])
tmpname = "[tmpname] ([++areaindex[tmpname]])"
else
areaindex[tmpname] = 1
L[tmpname] = R
var/desc = input("Please select a telepad.", "RCS") in L
E.pad = L[desc]
if(!Adjacent(user))
to_chat(user, "<span class='notice'>Unable to teleport, too far from crate.</span>")
return
playsound(E.loc, E.usesound, 50, 1)
to_chat(user, "<span class='notice'>Teleporting [name]...</span>")
E.teleporting = 1
if(!do_after(user, 50 * E.toolspeed, target = src))
E.teleporting = 0
return
E.teleporting = 0
if(user in contents)
to_chat(user, "<span class='warning'>Error: User located in container--aborting for safety.</span>")
playsound(E.loc, 'sound/machines/buzz-sigh.ogg', 50, 1)
return
if(!(E.rcell && E.rcell.use(E.chargecost)))
to_chat(user, "<span class='notice'>Unable to teleport, insufficient charge.</span>")
return
do_sparks(5, 1, src)
do_teleport(src, E.pad, 0)
to_chat(user, "<span class='notice'>Teleport successful. [round(E.rcell.charge/E.chargecost)] charge\s left.</span>")
return
else
E.rand_x = rand(50,200)
E.rand_y = rand(50,200)
var/L = locate(E.rand_x, E.rand_y, 6)
if(!Adjacent(user))
to_chat(user, "<span class='notice'>Unable to teleport, too far from crate.</span>")
return
playsound(E.loc, E.usesound, 50, 1)
to_chat(user, "<span class='notice'>Teleporting [name]...</span>")
E.teleporting = 1
if(!do_after(user, 50, E.toolspeed, target = src))
E.teleporting = 0
return
E.teleporting = 0
if(user in contents)
to_chat(user, "<span class='warning'>Error: User located in container--aborting for safety.</span>")
playsound(E.loc, 'sound/machines/buzz-sigh.ogg', 50, 1)
return
if(!(E.rcell && E.rcell.use(E.chargecost)))
to_chat(user, "<span class='notice'>Unable to teleport, insufficient charge.</span>")
return
do_sparks(5, 1, src)
do_teleport(src, L)
to_chat(user, "<span class='notice'>Teleport successful. [round(E.rcell.charge/E.chargecost)] charge\s left.</span>")
return
else
to_chat(user, "<span class='warning'>Out of charges.</span>")
return
E.try_send_container(user, src)
return
if(opened)
if(istype(W, /obj/item/grab))
MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
if(istype(W,/obj/item/tk_grab))
var/obj/item/grab/G = W
if(large)
MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
else
to_chat(user, "<span class='notice'>[src] is too small to stuff [G.affecting] into!</span>")
if(istype(W, /obj/item/tk_grab))
return FALSE
if(user.a_intent != INTENT_HELP) // Stops you from putting your baton in the closet on accident
return
if(isrobot(user))
return
if(!user.drop_item()) //couldn't drop the item
@@ -228,13 +167,20 @@
return
if(W)
W.forceMove(loc)
return TRUE // It's resolved. No afterattack needed. Stops you from emagging lockers when putting in an emag
else if(can_be_emaged && (istype(W, /obj/item/card/emag) || istype(W, /obj/item/melee/energy/blade) && !broken))
emag_act(user)
else if(istype(W, /obj/item/stack/packageWrap))
return
else if(user.a_intent != INTENT_HARM)
attack_hand(user)
closed_item_click(user)
else
return ..()
// What happens when the closet is attacked by a random item not on harm mode
/obj/structure/closet/proc/closed_item_click(mob/user)
attack_hand(user)
/obj/structure/closet/welder_act(mob/user, obj/item/I)
. = TRUE
if(!opened && user.loc == src)
@@ -115,6 +115,8 @@
new /obj/item/clothing/shoes/black(src)
new /obj/item/clothing/glasses/sunglasses/big(src)
new /obj/item/clothing/glasses/sunglasses/big(src)
new /obj/item/clothing/accessory/lawyers_badge(src)
new /obj/item/clothing/accessory/lawyers_badge(src)
//Paramedic
@@ -7,10 +7,10 @@
opened = 0
locked = 1
broken = 0
can_be_emaged = TRUE
max_integrity = 250
armor = list("melee" = 30, "bullet" = 50, "laser" = 50, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80)
damage_deflection = 20
var/large = 1
icon_closed = "secure"
var/icon_locked = "secure1"
icon_opened = "secureopen"
@@ -66,31 +66,8 @@
else
to_chat(user, "<span class='notice'>Access Denied</span>")
/obj/structure/closet/secure_closet/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/rcs))
return ..()
if(opened)
if(istype(W, /obj/item/grab))
if(large)
MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
else
to_chat(user, "<span class='notice'>The locker is too small to stuff [W:affecting] into!</span>")
if(isrobot(user))
return
if(!user.drop_item()) //couldn't drop the item
to_chat(user, "<span class='notice'>\The [W] is stuck to your hand, you cannot put it in \the [src]!</span>")
return
if(W)
W.forceMove(loc)
else if((istype(W, /obj/item/card/emag)||istype(W, /obj/item/melee/energy/blade)) && !broken)
emag_act(user)
else if(istype(W,/obj/item/stack/packageWrap) || istype(W,/obj/item/weldingtool))
return ..(W, user)
else if(user.a_intent != INTENT_HARM)
togglelock(user)
else
return ..()
/obj/structure/closet/secure_closet/closed_item_click(mob/user)
togglelock(user)
/obj/structure/closet/secure_closet/emag_act(mob/user)
if(!broken)
@@ -426,7 +426,7 @@
icon_off = "wall-lockeroff"
//too small to put a man in
large = 0
large = FALSE
/obj/structure/closet/secure_closet/wall/update_icon()
if(broken)
@@ -466,3 +466,4 @@
new /obj/item/gavelhammer(src)
new /obj/item/clothing/head/justice_wig(src)
new /obj/item/clothing/accessory/medal/legal(src)
new /obj/item/clothing/accessory/lawyers_badge(src)
@@ -79,111 +79,42 @@
return TRUE
/obj/structure/closet/crate/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/rcs) && !src.opened)
var/obj/item/rcs/E = W
if(E.rcell && (E.rcell.charge >= E.chargecost))
if(!is_level_reachable(src.z)) // This is inconsistent with the closet sending code
to_chat(user, "<span class='warning'>The rapid-crate-sender can't locate any telepads!</span>")
return
if(E.mode == 0)
if(!E.teleporting)
var/list/L = list()
var/list/areaindex = list()
for(var/obj/machinery/telepad_cargo/R in GLOB.machines)
if(R.stage == 0)
var/turf/T = get_turf(R)
var/tmpname = T.loc.name
if(areaindex[tmpname])
tmpname = "[tmpname] ([++areaindex[tmpname]])"
else
areaindex[tmpname] = 1
L[tmpname] = R
var/desc = input("Please select a telepad.", "RCS") in L
E.pad = L[desc]
if(!Adjacent(user))
to_chat(user, "<span class='notice'>Unable to teleport, too far from crate.</span>")
return
playsound(E.loc, E.usesound, 50, 1)
to_chat(user, "<span class='notice'>Teleporting [src.name]...</span>")
E.teleporting = TRUE
if(!do_after(user, 50 * E.toolspeed, target = src))
E.teleporting = 0
return
E.teleporting = 0
if(!(E.rcell && E.rcell.use(E.chargecost)))
to_chat(user, "<span class='notice'>Unable to teleport, insufficient charge.</span>")
return
do_sparks(5, 1, src)
do_teleport(src, E.pad, 0)
to_chat(user, "<span class='notice'>Teleport successful. [round(E.rcell.charge/E.chargecost)] charge\s left.</span>")
return
else
E.rand_x = rand(50,200)
E.rand_y = rand(50,200)
var/L = locate(E.rand_x, E.rand_y, 6)
if(!Adjacent(user))
to_chat(user, "<span class='notice'>Unable to teleport, too far from crate.</span>")
return
playsound(E.loc, E.usesound, 50, 1)
to_chat(user, "<span class='notice'>Teleporting [src.name]...</span>")
E.teleporting = TRUE
if(!do_after(user, 50 * E.toolspeed, target = src))
E.teleporting = FALSE
return
E.teleporting = 0
if(!(E.rcell && E.rcell.use(E.chargecost)))
to_chat(user, "<span class='notice'>Unable to teleport, insufficient charge.</span>")
return
do_sparks(5, 1, src)
do_teleport(src, L)
to_chat(user, "<span class='notice'>Teleport successful. [round(E.rcell.charge/E.chargecost)] charge\s left.</span>")
return
else
to_chat(user, "<span class='warning'>Out of charges.</span>")
return
if(opened)
if(isrobot(user))
return
if(!user.drop_item()) //couldn't drop the item
to_chat(user, "<span class='notice'>\The [W] is stuck to your hand, you cannot put it in \the [src]!</span>")
return
if(W)
W.forceMove(loc)
else if(istype(W, /obj/item/stack/packageWrap))
if(!opened && try_rig(W, user))
return
else if(istype(W, /obj/item/stack/cable_coil))
return ..()
/obj/structure/closet/crate/proc/try_rig(obj/item/W, mob/user)
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
if(rigged)
to_chat(user, "<span class='notice'>[src] is already rigged!</span>")
return
return TRUE
if(C.use(15))
to_chat(user, "<span class='notice'>You rig [src].</span>")
rigged = TRUE
else
to_chat(user, "<span class='warning'>You need atleast 15 wires to rig [src]!</span>")
return
else if(istype(W, /obj/item/radio/electropack))
return TRUE
if(istype(W, /obj/item/radio/electropack))
if(rigged)
if(!user.drop_item())
to_chat(user, "<span class='warning'>[W] seems to be stuck to your hand!</span>")
return TRUE
to_chat(user, "<span class='notice'>You attach [W] to [src].</span>")
user.drop_item()
W.forceMove(src)
return
else if(istype(W, /obj/item/wirecutters))
if(rigged)
to_chat(user, "<span class='notice'>You cut away the wiring.</span>")
playsound(loc, W.usesound, 100, 1)
rigged = FALSE
return
else if(user.a_intent != INTENT_HARM)
attack_hand(user)
else
return ..()
return TRUE
/obj/structure/closet/singularity_act()
dump_contents()
..()
/obj/structure/closet/crate/wirecutter_act(mob/living/user, obj/item/I)
if(opened)
return
if(!rigged)
return
if(I.use_tool(src, user))
to_chat(user, "<span class='notice'>You cut away the wiring.</span>")
playsound(loc, I.usesound, 100, 1)
rigged = FALSE
return TRUE
/obj/structure/closet/crate/welder_act()
return
@@ -229,9 +160,10 @@
max_integrity = 500
armor = list("melee" = 30, "bullet" = 50, "laser" = 50, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80)
damage_deflection = 25
var/tamperproof = 0
broken = 0
locked = 1
var/tamperproof = FALSE
broken = FALSE
locked = TRUE
can_be_emaged = TRUE
/obj/structure/closet/crate/secure/update_icon()
..()
@@ -306,17 +238,8 @@
else
src.toggle(user)
/obj/structure/closet/crate/secure/attackby(obj/item/W, mob/user, params)
if(is_type_in_list(W, list(/obj/item/stack/packageWrap, /obj/item/stack/cable_coil, /obj/item/radio/electropack, /obj/item/wirecutters,/obj/item/rcs)))
return ..()
if((istype(W, /obj/item/card/emag) || istype(W, /obj/item/melee/energy/blade)))
emag_act(user)
return
if(!opened)
src.togglelock(user)
return
return ..()
/obj/structure/closet/crate/secure/closed_item_click(mob/user)
togglelock(user)
/obj/structure/closet/crate/secure/emag_act(mob/user)
if(locked)
+2 -2
View File
@@ -46,7 +46,7 @@
/obj/structure/curtain/screwdriver_act(mob/user, obj/item/I)
. = TRUE
if(!I.tool_start_check(user, 0))
if(!I.tool_start_check(src, user, 0))
return
if(anchored)
user.visible_message("<span class='warning'>[user] unscrews [src] from the floor.</span>", "<span class='notice'>You start to unscrew [src] from the floor...</span>", "You hear rustling noises.")
@@ -65,7 +65,7 @@
if(anchored)
return
. = TRUE
if(!I.tool_start_check(user, 0))
if(!I.tool_start_check(src, user, 0))
return
WIRECUTTER_ATTEMPT_DISMANTLE_MESSAGE
if(I.use_tool(src, user, 50, volume = I.tool_volume))
+1 -1
View File
@@ -56,7 +56,7 @@
/obj/structure/dresser/crowbar_act(mob/user, obj/item/I)
. = TRUE
if(!I.tool_start_check(user, 0))
if(!I.tool_start_check(src, user, 0))
return
TOOL_ATTEMPT_DISMANTLE_MESSAGE
if(I.use_tool(src, user, 50, volume = I.tool_volume))
+5 -6
View File
@@ -17,11 +17,11 @@
var/opened = 0
var/material_drop = /obj/item/stack/sheet/metal
/obj/structure/extinguisher_cabinet/New(turf/loc, ndir = null)
/obj/structure/extinguisher_cabinet/New(turf/loc, direction = null)
..()
if(ndir)
pixel_x = (ndir & EAST|WEST) ? (ndir == EAST ? 28 : -28) : 0
pixel_y = (ndir & NORTH|SOUTH)? (ndir == WEST ? 28 : -28) : 0
if(direction)
setDir(direction)
set_pixel_offsets_from_dir(28, -28, 30, -30)
switch(extinguishertype)
if(NO_EXTINGUISHER)
return
@@ -165,9 +165,8 @@
else
icon_state = "extinguisher_empty"
/obj/structure/extinguisher_cabinet/empty/New(turf/loc, ndir = null)
/obj/structure/extinguisher_cabinet/empty
extinguishertype = NO_EXTINGUISHER
..()
#undef NO_EXTINGUISHER
#undef NORMAL_EXTINGUISHER
+1 -1
View File
@@ -374,7 +374,7 @@
/obj/structure/girder/CanAStarPass(ID, dir, caller)
. = !density
if(ismovableatom(caller))
if(ismovable(caller))
var/atom/movable/mover = caller
. = . || mover.checkpass(PASSGRILLE)
+1 -1
View File
@@ -111,7 +111,7 @@
/obj/structure/grille/CanAStarPass(ID, dir, caller)
. = !density
if(ismovableatom(caller))
if(ismovable(caller))
var/atom/movable/mover = caller
. = . || mover.checkpass(PASSGRILLE)
@@ -130,16 +130,18 @@
release_mob(M)
/obj/structure/kitchenspike/proc/release_mob(mob/living/M)
var/matrix/m180 = matrix(M.transform)
m180.Turn(180)
animate(M, transform = m180, time = 3)
M.pixel_y = M.get_standard_pixel_y_offset(180)
M.adjustBruteLoss(30)
src.visible_message(text("<span class='danger'>[M] falls free of [src]!</span>"))
unbuckle_mob(M, force = TRUE)
M.emote("scream")
M.AdjustWeakened(10)
/obj/structure/kitchenspike/post_unbuckle_mob(mob/living/M)
M.pixel_y = M.get_standard_pixel_y_offset(0)
var/matrix/m180 = matrix(M.transform)
m180.Turn(180)
animate(M, transform = m180, time = 3)
/obj/structure/kitchenspike/Destroy()
if(has_buckled_mobs())
for(var/mob/living/L in buckled_mobs)
+1 -1
View File
@@ -232,7 +232,7 @@
/obj/structure/tray/m_tray/CanAStarPass(ID, dir, caller)
. = !density
if(ismovableatom(caller))
if(ismovable(caller))
var/atom/movable/mover = caller
. = . || mover.checkpass(PASSTABLE)
+3 -2
View File
@@ -246,7 +246,7 @@ GLOBAL_LIST_EMPTY(safes)
var/ticks = text2num(href_list["turnright"])
for(var/i = 1 to ticks)
dial = Wrap(dial - 1, 0, 100)
dial = WRAP(dial - 1, 0, 100)
var/invalid_turn = current_tumbler_index % 2 == 0 || current_tumbler_index > number_of_tumblers
if(invalid_turn) // The moment you turn the wrong way or go too far, the tumblers reset
@@ -274,7 +274,7 @@ GLOBAL_LIST_EMPTY(safes)
var/ticks = text2num(href_list["turnleft"])
for(var/i = 1 to ticks)
dial = Wrap(dial + 1, 0, 100)
dial = WRAP(dial + 1, 0, 100)
var/invalid_turn = current_tumbler_index % 2 != 0 || current_tumbler_index > number_of_tumblers
if(invalid_turn) // The moment you turn the wrong way or go too far, the tumblers reset
@@ -373,6 +373,7 @@ GLOBAL_LIST_EMPTY(safes)
info = "<div style='text-align:center;'><img src='ntlogo.png'><center><h3>Safe Codes</h3></center>"
/obj/item/paper/safe_code/Initialize(mapload)
..()
return INITIALIZE_HINT_LATELOAD
/obj/item/paper/safe_code/LateInitialize(mapload)
+4 -4
View File
@@ -128,7 +128,7 @@
/obj/structure/table/CanAStarPass(ID, dir, caller)
. = !density
if(ismovableatom(caller))
if(ismovable(caller))
var/atom/movable/mover = caller
. = . || mover.checkpass(PASSTABLE)
@@ -224,8 +224,8 @@
if(!click_params || !click_params["icon-x"] || !click_params["icon-y"])
return
//Clamp it so that the icon never moves more than 16 pixels in either direction (thus leaving the table turf)
I.pixel_x = Clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
I.pixel_y = Clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
I.pixel_x = clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
I.pixel_y = clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
item_placed(I)
else
return ..()
@@ -666,7 +666,7 @@
/obj/structure/rack/CanAStarPass(ID, dir, caller)
. = !density
if(ismovableatom(caller))
if(ismovable(caller))
var/atom/movable/mover = caller
. = . || mover.checkpass(PASSTABLE)