mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merge remote-tracking branch 'upstream/dev' into sanitize_procs
This commit is contained in:
@@ -19,6 +19,10 @@ var/datum/antagonist/rogue_ai/malf
|
||||
var/station_captured
|
||||
var/can_nuke = 0
|
||||
|
||||
/datum/antagonist/rogue_ai/New()
|
||||
..()
|
||||
malf = src
|
||||
|
||||
/datum/antagonist/rogue_ai/proc/hack_apc(var/obj/machinery/power/apc/apc)
|
||||
hacked_apcs |= apc
|
||||
|
||||
|
||||
@@ -396,7 +396,7 @@
|
||||
control_computer.frozen_crew += "[occupant.real_name]"
|
||||
|
||||
announce.autosay("[occupant.real_name] [on_store_message]", "[on_store_name]")
|
||||
visible_message("<span class='notice'>\The [src] hums and hisses as it moves [occupant.real_name] into storage.</span>", 3)
|
||||
visible_message("<span class='notice'>\The [initial(name)] hums and hisses as it moves [occupant.real_name] into storage.</span>", 3)
|
||||
|
||||
set_occupant(null)
|
||||
// Delete the mob.
|
||||
@@ -555,7 +555,7 @@
|
||||
src.occupant = occupant
|
||||
name = initial(name)
|
||||
if(occupant)
|
||||
name = "[name] ([occupant])]"
|
||||
name = "[name] ([occupant])"
|
||||
|
||||
|
||||
//Attacks/effects.
|
||||
|
||||
@@ -844,19 +844,20 @@ About the new airlock wires panel:
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/machinery/door/airlock/can_close(var/forced)
|
||||
/obj/machinery/door/airlock/can_close()
|
||||
if(locked || welded)
|
||||
return 0
|
||||
if(!forced)
|
||||
//despite the name, this wire is for general door control.
|
||||
//Bolts are already covered by the check for locked, above
|
||||
if(!arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_OPEN_DOOR))
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/machinery/door/airlock/close(var/forced=0)
|
||||
if(!can_close(forced))
|
||||
return
|
||||
if(!can_close())
|
||||
return 0
|
||||
|
||||
if(!forced)
|
||||
//despite the name, this wire is for general door control.
|
||||
//Bolts are already covered by the check for locked in can_close()
|
||||
if(!arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_OPEN_DOOR))
|
||||
return 0
|
||||
|
||||
if(safe)
|
||||
for(var/turf/turf in locs)
|
||||
|
||||
@@ -88,10 +88,10 @@
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/machinery/door/proc/can_close(var/forced = 0)
|
||||
if(!density && !operating && !(!forced && (stat & (BROKEN|NOPOWER))))
|
||||
return 1
|
||||
return 0
|
||||
/obj/machinery/door/proc/can_close()
|
||||
if(density || operating || !ticker)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/machinery/door/Bumped(atom/AM)
|
||||
if(p_open || operating) return
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
open_layer = DOOR_OPEN_LAYER - 0.01 // Just below doors when open
|
||||
closed_layer = DOOR_CLOSED_LAYER + 0.01 // Just above doors when closed
|
||||
|
||||
//These are frequenly used with windows, so make sure zones can pass.
|
||||
//These are frequenly used with windows, so make sure zones can pass.
|
||||
//Generally if a firedoor is at a place where there should be a zone boundery then there will be a regular door underneath it.
|
||||
block_air_zones = 0
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
"\The [src]", "Yes, [density ? "open" : "close"]", "No")
|
||||
if(answer == "No")
|
||||
return
|
||||
if(user.stat || user.stunned || user.weakened || user.paralysis || (!user.canmove && !isAI(user)) || (get_dist(src, user) > 1 && !isAI(user)))
|
||||
if(user.stat || user.stunned || user.weakened || user.paralysis || (!user.canmove && !user.isSilicon()) || (get_dist(src, user) > 1 && !isAI(user)))
|
||||
user << "Sorry, you must remain able bodied and close to \the [src] in order to use it."
|
||||
return
|
||||
if(density && (stat & (BROKEN|NOPOWER))) //can still close without power
|
||||
@@ -169,7 +169,7 @@
|
||||
if(alarmed)
|
||||
// Accountability!
|
||||
users_to_open |= user.name
|
||||
needs_to_close = 1
|
||||
needs_to_close = !user.isSilicon()
|
||||
spawn()
|
||||
open()
|
||||
else
|
||||
@@ -272,7 +272,7 @@
|
||||
spawn(0)
|
||||
close()
|
||||
return
|
||||
|
||||
|
||||
return ..()
|
||||
|
||||
// CHECK PRESSURE
|
||||
|
||||
@@ -270,9 +270,9 @@ Class Procs:
|
||||
|
||||
if(temp_apc && temp_apc.terminal && temp_apc.terminal.powernet)
|
||||
temp_apc.terminal.powernet.trigger_warning()
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
if(user.stunned)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/machinery/proc/default_deconstruction_crowbar(var/mob/user, var/obj/item/weapon/crowbar/C)
|
||||
if(!istype(C))
|
||||
|
||||
@@ -123,23 +123,6 @@
|
||||
else
|
||||
user << "<span class='notice'>The [affecting.display_name] is cut open, you'll need more than a bandage!</span>"
|
||||
|
||||
/obj/item/stack/medical/bruise_pack/tajaran
|
||||
name = "\improper S'rendarr's Hand leaf"
|
||||
singular_name = "S'rendarr's Hand leaf"
|
||||
desc = "A poultice made of soft leaves that is rubbed on bruises."
|
||||
//icon = 'icons/obj/harvest.dmi'
|
||||
icon_state = "shandp"
|
||||
heal_brute = 7
|
||||
|
||||
/obj/item/stack/medical/ointment/tajaran
|
||||
name = "\improper Messa's Tear petals"
|
||||
singular_name = "Messa's Tear petals"
|
||||
desc = "A poultice made of cold, blue petals that is rubbed on burns."
|
||||
//icon = 'icons/obj/harvest.dmi'
|
||||
icon_state = "mtearp"
|
||||
heal_burn = 7
|
||||
|
||||
|
||||
/obj/item/stack/medical/advanced/bruise_pack
|
||||
name = "advanced trauma kit"
|
||||
singular_name = "advanced trauma kit"
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#ifndef T_BOARD
|
||||
#error T_BOARD macro is not defined but we need it!
|
||||
#endif
|
||||
|
||||
/obj/item/weapon/circuitboard/miningdrill
|
||||
name = T_BOARD("mining drill head")
|
||||
build_path = "/obj/machinery/mining/drill"
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=1;engineering=1"
|
||||
frame_desc = "Requires 1 capacitor, 1 cell, 1 matter bin, and 1 micro laser."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/capacitor" = 1,
|
||||
"/obj/item/weapon/cell" = 1,
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 1,
|
||||
"/obj/item/weapon/stock_parts/micro_laser" = 1)
|
||||
@@ -30,7 +30,8 @@
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
return 2
|
||||
if(usr.stunned)
|
||||
return 2
|
||||
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||
for(var/obj/O in src)
|
||||
|
||||
@@ -68,12 +68,12 @@
|
||||
//Flimsy grilles aren't so great at stopping projectiles. However they can absorb some of the impact
|
||||
var/damage = Proj.damage
|
||||
var/passthrough = 0
|
||||
|
||||
|
||||
//20% chance that the grille provides a bit more cover than usual. Support structure for example might take up 20% of the grille's area.
|
||||
//If they click on the grille itself then we assume they are aiming at the grille itself and the extra cover behaviour is always used.
|
||||
switch(Proj.damage_type)
|
||||
if(BRUTE)
|
||||
//bullets
|
||||
//bullets
|
||||
if(Proj.original == src || prob(20))
|
||||
Proj.damage *= between(0, Proj.damage/60, 0.5)
|
||||
if(prob(max((damage-10)/25, 0))*100)
|
||||
@@ -86,11 +86,11 @@
|
||||
if(!(Proj.original == src || prob(20)))
|
||||
Proj.damage *= 0.5
|
||||
passthrough = 1
|
||||
|
||||
|
||||
if(passthrough)
|
||||
. = -1
|
||||
damage = between(0, (damage - Proj.damage)*(Proj.damage_type == BRUTE? 0.4 : 1), 10) //if the bullet passes through then the grille avoids most of the damage
|
||||
|
||||
|
||||
src.health -= damage*0.2
|
||||
spawn(0) healthcheck() //spawn to make sure we return properly if the grille is deleted
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
|
||||
user << "<span class='notice'>There is already a window facing this way there.</span>"
|
||||
return
|
||||
|
||||
|
||||
var/wtype = ST.created_window
|
||||
if (ST.use(1))
|
||||
var/obj/structure/window/WD = new wtype(loc, dir_to_set, 1)
|
||||
@@ -197,7 +197,8 @@
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
return 1
|
||||
if(user.stunned)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user