mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 22:50:26 +01:00
Merge remote-tracking branch 'upstream/master' into qdelFixes
Conflicts: code/modules/mob/living/silicon/robot/robot.dm
This commit is contained in:
@@ -72,7 +72,7 @@
|
||||
|
||||
//Wrapper procs that handle sanity and user feedback
|
||||
/obj/proc/user_buckle_mob(mob/living/M, mob/user)
|
||||
if(!user.Adjacent(M) || user.restrained() || user.lying || user.stat)
|
||||
if(!user.Adjacent(M) || user.lying || user.incapacitated())
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -1,32 +1,78 @@
|
||||
// APC HULL
|
||||
/obj/item/wallframe
|
||||
materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT*2)
|
||||
flags = CONDUCT
|
||||
origin_tech = "materials=1;engineering=1"
|
||||
item_state = "syringe_kit"
|
||||
w_class = 2
|
||||
var/result_path
|
||||
var/inverse = 0
|
||||
// For inverse dir frames like light fixtures.
|
||||
|
||||
/obj/item/apc_frame
|
||||
/obj/item/wallframe/proc/try_build(turf/on_wall)
|
||||
if(get_dist(on_wall,usr)>1)
|
||||
return
|
||||
var/ndir = get_dir(on_wall, usr)
|
||||
if(!(ndir in cardinal))
|
||||
return
|
||||
var/turf/loc = get_turf(usr)
|
||||
var/area/A = loc.loc
|
||||
if(!istype(loc, /turf/simulated/floor))
|
||||
usr << "<span class='warning'>You cannot place [src] on this spot!</span>"
|
||||
return
|
||||
if(A.requires_power == 0 || istype(A, /area/space))
|
||||
usr << "<span class='warning'>You cannot place [src] in this area!</span>"
|
||||
return
|
||||
if(gotwallitem(loc, ndir, inverse*2))
|
||||
usr << "<span class='warning'>There's already an item on this wall!</span>"
|
||||
return
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/wallframe/proc/attach(turf/on_wall)
|
||||
if(result_path)
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 75, 1)
|
||||
usr.visible_message("[usr.name] attaches [src] to the wall.",
|
||||
"<span class='notice'>You attach [src] to the wall.</span>",
|
||||
"<span class='italics'>You hear clicking.</span>")
|
||||
var/ndir = get_dir(on_wall,usr)
|
||||
if(inverse)
|
||||
ndir = turn(ndir, 180)
|
||||
|
||||
var/obj/O = new result_path(get_turf(usr), ndir, 1)
|
||||
transfer_fingerprints_to(O)
|
||||
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/wallframe/attackby(obj/item/weapon/W, mob/user, params)
|
||||
..()
|
||||
var/metal_amt = round(materials[MAT_METAL]/MINERAL_MATERIAL_AMOUNT)
|
||||
var/glass_amt = round(materials[MAT_GLASS]/MINERAL_MATERIAL_AMOUNT)
|
||||
|
||||
if (istype(W, /obj/item/weapon/wrench) && (metal_amt || glass_amt))
|
||||
user << "<span class='notice'>You dismantle [src].</span>"
|
||||
if(metal_amt)
|
||||
new /obj/item/stack/sheet/metal(get_turf(src), metal_amt)
|
||||
if(glass_amt)
|
||||
new /obj/item/stack/sheet/glass(get_turf(src), glass_amt)
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
// APC HULL
|
||||
/obj/item/wallframe/apc
|
||||
name = "\improper APC frame"
|
||||
desc = "Used for repairing or building APCs"
|
||||
icon = 'icons/obj/apc_repair.dmi'
|
||||
icon_state = "apc_frame"
|
||||
flags = CONDUCT
|
||||
result_path = /obj/machinery/power/apc
|
||||
|
||||
/obj/item/apc_frame/attackby(obj/item/weapon/W, mob/user, params)
|
||||
..()
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
new /obj/item/stack/sheet/metal( get_turf(src.loc), 2 )
|
||||
qdel(src)
|
||||
|
||||
/obj/item/apc_frame/proc/try_build(turf/on_wall)
|
||||
if (get_dist(on_wall,usr)>1)
|
||||
return
|
||||
var/ndir = get_dir(usr,on_wall)
|
||||
if (!(ndir in cardinal))
|
||||
/obj/item/wallframe/apc/try_build(turf/on_wall)
|
||||
if(!..())
|
||||
return
|
||||
var/turf/loc = get_turf(usr)
|
||||
var/area/A = loc.loc
|
||||
if (!istype(loc, /turf/simulated/floor))
|
||||
usr << "<span class='warning'>APC cannot be placed on this spot!</span>"
|
||||
return
|
||||
if (A.requires_power == 0 || istype(A, /area/space))
|
||||
usr << "<span class='warning'>APC cannot be placed in this area!</span>"
|
||||
return
|
||||
if (A.get_apc())
|
||||
usr << "<span class='warning'>This area already has APC!</span>"
|
||||
return //only one APC per area
|
||||
@@ -39,5 +85,15 @@
|
||||
C.amount = 10
|
||||
usr << "<span class='notice'>You cut the cables and disassemble the unused power terminal.</span>"
|
||||
qdel(T)
|
||||
new /obj/machinery/power/apc(loc, ndir, 1)
|
||||
qdel(src)
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/weapon/electronics
|
||||
desc = "Looks like a circuit. Probably is."
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "door_electronics"
|
||||
item_state = "electronic"
|
||||
flags = CONDUCT
|
||||
w_class = 2
|
||||
origin_tech = "engineering=2;programming=1"
|
||||
materials = list(MAT_METAL=50, MAT_GLASS=50)
|
||||
@@ -99,6 +99,10 @@
|
||||
..()
|
||||
wires = new(src)
|
||||
|
||||
/obj/item/device/pizza_bomb/Destroy()
|
||||
qdel(wires)
|
||||
wires = null
|
||||
return ..()
|
||||
|
||||
/obj/item/device/pizza_bomb/proc/disarm()
|
||||
audible_message("\icon[src] \The [src] suddenly stops beeping and seems lifeless.")
|
||||
|
||||
@@ -93,7 +93,9 @@
|
||||
qdel(wires)
|
||||
wires = null
|
||||
remove_radio_all(src) //Just to be sure
|
||||
..()
|
||||
patch_link = null
|
||||
keyslot = null
|
||||
return ..()
|
||||
|
||||
/obj/item/device/radio/MouseDrop(obj/over_object, src_location, over_location)
|
||||
var/mob/M = usr
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
var/stop_bleeding = 0
|
||||
var/self_delay = 50
|
||||
|
||||
/obj/item/stack/medical/attack(mob/living/carbon/M, mob/user)
|
||||
/obj/item/stack/medical/attack(mob/living/M, mob/user)
|
||||
|
||||
if(M.stat == 2)
|
||||
var/t_him = "it"
|
||||
@@ -25,8 +25,8 @@
|
||||
user << "<span class='danger'>\The [M] is dead, you cannot help [t_him]!</span>"
|
||||
return
|
||||
|
||||
if(!istype(M))
|
||||
user << "<span class='danger'>You don't know how to apply \the [src] to [M]...</span>"
|
||||
if(!istype(M, /mob/living/carbon) && !istype(M, /mob/living/simple_animal))
|
||||
user << "<span class='danger'>You don't know how to apply \the [src] to [M]!</span>"
|
||||
return 1
|
||||
|
||||
if(!user.IsAdvancedToolUser())
|
||||
@@ -48,7 +48,18 @@
|
||||
return
|
||||
|
||||
if(user)
|
||||
if(M != user)
|
||||
if (M != user)
|
||||
if (istype(M, /mob/living/simple_animal))
|
||||
var/mob/living/simple_animal/critter = M
|
||||
if (!(critter.healable))
|
||||
user << "<span class='notice'> You cannot use [src] on [M]!</span>"
|
||||
return
|
||||
else if (critter.health == critter.maxHealth)
|
||||
user << "<span class='notice'> [M] is at full health.</span>"
|
||||
return
|
||||
else if(src.heal_brute < 1)
|
||||
user << "<span class='notice'> [src] won't help [M] at all.</span>"
|
||||
return
|
||||
user.visible_message("<span class='green'>[user] applies [src] on [M].</span>", "<span class='green'>You apply [src] on [M].</span>")
|
||||
else
|
||||
var/t_himself = "itself"
|
||||
|
||||
@@ -297,7 +297,7 @@
|
||||
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(!H.gloves)
|
||||
if(!H.gloves && !(PIERCEIMMUNE in H.dna.species.specflags)) // golems, etc
|
||||
H << "<span class='warning'>[src] cuts into your hand!</span>"
|
||||
var/organ = (H.hand ? "l_" : "r_") + "arm"
|
||||
var/obj/item/organ/limb/affecting = H.get_organ(organ)
|
||||
|
||||
@@ -33,12 +33,13 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
|
||||
new/datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, time = 25, one_per_turf = 1, on_floor = 1), \
|
||||
null, \
|
||||
new/datum/stack_recipe("grenade casing", /obj/item/weapon/grenade/chem_grenade), \
|
||||
new/datum/stack_recipe("light fixture frame", /obj/item/light_fixture_frame, 2), \
|
||||
new/datum/stack_recipe("small light fixture frame", /obj/item/light_fixture_frame/small, 1), \
|
||||
new/datum/stack_recipe("light fixture frame", /obj/item/wallframe/light_fixture, 2), \
|
||||
new/datum/stack_recipe("small light fixture frame", /obj/item/wallframe/light_fixture/small, 1), \
|
||||
null, \
|
||||
new/datum/stack_recipe("apc frame", /obj/item/apc_frame, 2), \
|
||||
new/datum/stack_recipe("air alarm frame", /obj/item/alarm_frame, 2), \
|
||||
new/datum/stack_recipe("fire alarm frame", /obj/item/firealarm_frame, 2), \
|
||||
new/datum/stack_recipe("apc frame", /obj/item/wallframe/apc, 2), \
|
||||
new/datum/stack_recipe("air alarm frame", /obj/item/wallframe/alarm, 2), \
|
||||
new/datum/stack_recipe("fire alarm frame", /obj/item/wallframe/firealarm, 2), \
|
||||
new/datum/stack_recipe("button frame", /obj/item/wallframe/button, 1), \
|
||||
null, \
|
||||
new/datum/stack_recipe("iron door", /obj/structure/mineral_door/iron, 20, one_per_turf = 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
@@ -357,7 +357,7 @@ RCD
|
||||
activate()
|
||||
var/obj/machinery/door/airlock/T = new airlock_type( A )
|
||||
|
||||
T.electronics = new/obj/item/weapon/airlock_electronics( src.loc )
|
||||
T.electronics = new/obj/item/weapon/electronics/airlock( src.loc )
|
||||
|
||||
if(conf_access)
|
||||
T.electronics.conf_access = conf_access.Copy()
|
||||
|
||||
@@ -21,6 +21,12 @@
|
||||
image_overlay = image('icons/obj/assemblies.dmi', "plastic-explosive2")
|
||||
..()
|
||||
|
||||
/obj/item/weapon/c4/Destroy()
|
||||
qdel(wires)
|
||||
wires = null
|
||||
target = null
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/c4/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] activates the [src.name] and holds it above \his head! It looks like \he's going out with a bang!</span>")
|
||||
var/message_say = "FOR NO RAISIN!"
|
||||
|
||||
@@ -45,8 +45,8 @@
|
||||
new /obj/item/weapon/reagent_containers/pill/patch/silver_sulf(src)
|
||||
new /obj/item/weapon/reagent_containers/pill/patch/silver_sulf(src)
|
||||
new /obj/item/weapon/reagent_containers/pill/patch/silver_sulf(src)
|
||||
new /obj/item/weapon/reagent_containers/pill/salicyclic(src)
|
||||
new /obj/item/weapon/reagent_containers/pill/salicyclic(src)
|
||||
new /obj/item/weapon/reagent_containers/pill/oxandrolone(src)
|
||||
new /obj/item/weapon/reagent_containers/pill/oxandrolone(src)
|
||||
new /obj/item/weapon/reagent_containers/hypospray/medipen(src)
|
||||
new /obj/item/device/healthanalyzer(src)
|
||||
return
|
||||
|
||||
@@ -166,6 +166,7 @@
|
||||
|
||||
/obj/structure/closet/ex_act(severity, target)
|
||||
contents_explosion(severity, target)
|
||||
new /obj/item/stack/sheet/metal(loc)
|
||||
dump_contents()
|
||||
qdel(src)
|
||||
..()
|
||||
|
||||
@@ -37,9 +37,9 @@
|
||||
new /obj/item/weapon/storage/toolbox/electrical(src)
|
||||
new /obj/item/weapon/storage/toolbox/electrical(src)
|
||||
new /obj/item/weapon/storage/toolbox/electrical(src)
|
||||
new /obj/item/weapon/module/power_control(src)
|
||||
new /obj/item/weapon/module/power_control(src)
|
||||
new /obj/item/weapon/module/power_control(src)
|
||||
new /obj/item/weapon/electronics/apc(src)
|
||||
new /obj/item/weapon/electronics/apc(src)
|
||||
new /obj/item/weapon/electronics/apc(src)
|
||||
new /obj/item/device/multitool(src)
|
||||
new /obj/item/device/multitool(src)
|
||||
new /obj/item/device/multitool(src)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
var/icontext = ""
|
||||
var/base_icon_state = "door_as_"
|
||||
var/glass_base_icon_state = "door_as_g"
|
||||
var/obj/item/weapon/airlock_electronics/electronics = null
|
||||
var/obj/item/weapon/electronics/airlock/electronics = null
|
||||
var/airlock_type = /obj/machinery/door/airlock //the type path of the airlock once completed
|
||||
var/glass_type = /obj/machinery/door/airlock/glass
|
||||
var/created_name = null
|
||||
@@ -506,7 +506,7 @@
|
||||
src.state = 0
|
||||
src.name = "secured airlock assembly"
|
||||
|
||||
else if(istype(W, /obj/item/weapon/airlock_electronics) && state == 1 )
|
||||
else if(istype(W, /obj/item/weapon/electronics/airlock) && state == 1 )
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
user.visible_message("[user] installs the electronics into the airlock assembly.", \
|
||||
"<span class='notice'>You start to install electronics into the airlock assembly...</span>")
|
||||
@@ -534,9 +534,9 @@
|
||||
user << "<span class='notice'>You remove the airlock electronics.</span>"
|
||||
src.state = 1
|
||||
src.name = "wired airlock assembly"
|
||||
var/obj/item/weapon/airlock_electronics/ae
|
||||
var/obj/item/weapon/electronics/airlock/ae
|
||||
if (!electronics)
|
||||
ae = new/obj/item/weapon/airlock_electronics( src.loc )
|
||||
ae = new/obj/item/weapon/electronics/airlock( src.loc )
|
||||
else
|
||||
ae = electronics
|
||||
electronics = null
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
new remains(loc)
|
||||
qdel(src)
|
||||
if(3.0)
|
||||
if (prob(15))
|
||||
if (prob(40))
|
||||
var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal)
|
||||
new remains(loc)
|
||||
qdel(src)
|
||||
|
||||
@@ -79,7 +79,8 @@
|
||||
|
||||
/obj/structure/grille/attack_animal(var/mob/living/simple_animal/M)
|
||||
M.changeNext_move(CLICK_CD_MELEE)
|
||||
if(M.melee_damage_upper == 0) return
|
||||
if(M.melee_damage_upper == 0 || (M.melee_damage_type != BRUTE && M.melee_damage_type != BURN))
|
||||
return
|
||||
M.do_attack_animation(src)
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
M.visible_message("<span class='warning'>[M] smashes against [src].</span>", \
|
||||
|
||||
@@ -176,10 +176,11 @@ var/global/list/crematoriums = new/list()
|
||||
for(var/mob/living/M in contents)
|
||||
if (M.stat!=2)
|
||||
M.emote("scream")
|
||||
//Logging for this causes runtimes resulting in the cremator locking up. Commenting it out until that's figured out.
|
||||
//M.attack_log += "\[[time_stamp()]\] Has been cremated by <b>[user]/[user.ckey]</b>" //No point in this when the mob's about to be deleted
|
||||
user.attack_log +="\[[time_stamp()]\] Cremated <b>[M]/[M.ckey]</b>"
|
||||
log_attack("\[[time_stamp()]\] <b>[user]/[user.ckey]</b> cremated <b>[M]/[M.ckey]</b>")
|
||||
if(user)
|
||||
user.attack_log +="\[[time_stamp()]\] Cremated <b>[M]/[M.ckey]</b>"
|
||||
log_attack("\[[time_stamp()]\] <b>[user]/[user.ckey]</b> cremated <b>[M]/[M.ckey]</b>")
|
||||
else
|
||||
log_attack("\[[time_stamp()]\] <b>UNKNOWN</b> cremated <b>[M]/[M.ckey]</b>")
|
||||
M.death(1)
|
||||
M.ghostize()
|
||||
qdel(M)
|
||||
@@ -194,26 +195,6 @@ var/global/list/crematoriums = new/list()
|
||||
update_icon()
|
||||
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) //you horrible people
|
||||
|
||||
/*
|
||||
Crematorium Switch
|
||||
*/
|
||||
/obj/machinery/crema_switch/attack_hand(mob/user)
|
||||
if(src.allowed(usr))
|
||||
for (var/obj/structure/bodycontainer/crematorium/C in crematoriums)
|
||||
if (C.id != id)
|
||||
continue
|
||||
|
||||
C.cremate(user)
|
||||
else
|
||||
usr << "<span class='danger'>Access denied.</span>"
|
||||
return
|
||||
|
||||
/obj/machinery/crema_switch/attackby(obj/item/W, mob/user, params)
|
||||
if(W.GetID())
|
||||
attack_hand(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/*
|
||||
* Generic Tray
|
||||
@@ -286,4 +267,4 @@ Crematorium Switch
|
||||
if(locate(/obj/structure/table) in get_turf(mover))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
return 0
|
||||
|
||||
@@ -11,11 +11,13 @@
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
if (prob(70))
|
||||
new /obj/item/stack/sheet/metal(loc)
|
||||
qdel(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(5))
|
||||
if (prob(50))
|
||||
new /obj/item/stack/sheet/metal(loc)
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
dir = NORTH
|
||||
|
||||
var/ini_dir
|
||||
var/obj/item/weapon/airlock_electronics/electronics = null
|
||||
var/obj/item/weapon/electronics/airlock/electronics = null
|
||||
var/created_name = null
|
||||
|
||||
//Vars to help with the icon's name
|
||||
@@ -189,7 +189,7 @@
|
||||
name = "anchored windoor assembly"
|
||||
|
||||
//Adding airlock electronics for access. Step 6 complete.
|
||||
else if(istype(W, /obj/item/weapon/airlock_electronics))
|
||||
else if(istype(W, /obj/item/weapon/electronics/airlock))
|
||||
if(!user.drop_item())
|
||||
return
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
@@ -219,7 +219,7 @@
|
||||
return
|
||||
user << "<span class='notice'>You remove the airlock electronics.</span>"
|
||||
name = "wired windoor assembly"
|
||||
var/obj/item/weapon/airlock_electronics/ae
|
||||
var/obj/item/weapon/electronics/airlock/ae
|
||||
ae = electronics
|
||||
electronics = null
|
||||
ae.loc = loc
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
|
||||
var/mob/living/simple_animal/M = user
|
||||
M.do_attack_animation(src)
|
||||
if(M.melee_damage_upper <= 0)
|
||||
if(M.melee_damage_upper <= 0 || (M.melee_damage_type != BRUTE && M.melee_damage_type != BURN))
|
||||
return
|
||||
|
||||
attack_generic(M, M.melee_damage_upper)
|
||||
|
||||
Reference in New Issue
Block a user