merge fixes

This commit is contained in:
Seris02
2020-01-19 16:40:45 +08:00
390 changed files with 9827 additions and 7080 deletions
+24
View File
@@ -7,22 +7,33 @@
#define STICKYBAN_MAX_ADMIN_MATCHES 2
/world/IsBanned(key,address,computer_id,type,real_bans_only=FALSE)
var/static/key_cache = list()
if(!real_bans_only)
if(key_cache[key])
return list("reason"="concurrent connection attempts", "desc"="You are attempting to connect too fast. Try again.")
key_cache[key] = 1
if (!key || !address || !computer_id)
if(real_bans_only)
key_cache[key] = 0
return FALSE
log_access("Failed Login (invalid data): [key] [address]-[computer_id]")
key_cache[key] = 0
return list("reason"="invalid login data", "desc"="Error: Could not check ban status, Please try again. Error message: Your computer provided invalid or blank information to the server on connection (byond username, IP, and Computer ID.) Provided information for reference: Username:'[key]' IP:'[address]' Computer ID:'[computer_id]'. (If you continue to get this error, please restart byond or contact byond support.)")
if (text2num(computer_id) == 2147483647) //this cid causes stickybans to go haywire
log_access("Failed Login (invalid cid): [key] [address]-[computer_id]")
key_cache[key] = 0
return list("reason"="invalid login data", "desc"="Error: Could not check ban status, Please try again. Error message: Your computer provided an invalid Computer ID.)")
if (type == "world")
key_cache[key] = 0
return ..() //shunt world topic banchecks to purely to byond's internal ban system
var/ckey = ckey(key)
var/client/C = GLOB.directory[ckey]
if (C && ckey == C.ckey && computer_id == C.computer_id && address == C.address)
key_cache[key] = 0
return //don't recheck connected clients.
var/admin = FALSE
@@ -38,21 +49,25 @@
addclientmessage(ckey,"<span class='adminnotice'>You have been allowed to bypass the whitelist</span>")
else
log_access("Failed Login: [key] - Not on whitelist")
key_cache[key] = 0
return list("reason"="whitelist", "desc" = "\nReason: You are not on the white list for this server")
//Guest Checking
if(!real_bans_only && IsGuestKey(key))
if (CONFIG_GET(flag/guest_ban))
log_access("Failed Login: [key] - Guests not allowed")
key_cache[key] = 0
return list("reason"="guest", "desc"="\nReason: Guests not allowed. Please sign in with a byond account.")
if (CONFIG_GET(flag/panic_bunker) && SSdbcore.Connect())
log_access("Failed Login: [key] - Guests not allowed during panic bunker")
key_cache[key] = 0
return list("reason"="guest", "desc"="\nReason: Sorry but the server is currently not accepting connections from never before seen players or guests. If you have played on this server with a byond account before, please log in to the byond account you have played from.")
//Population Cap Checking
var/extreme_popcap = CONFIG_GET(number/extreme_popcap)
if(!real_bans_only && extreme_popcap && living_player_count() >= extreme_popcap && !admin)
log_access("Failed Login: [key] - Population cap reached")
key_cache[key] = 0
return list("reason"="popcap", "desc"= "\nReason: [CONFIG_GET(string/extreme_popcap_message)]")
if(CONFIG_GET(flag/ban_legacy_system))
@@ -66,6 +81,7 @@
addclientmessage(ckey,"<span class='adminnotice'>You have been allowed to bypass a matching ban on [.["key"]]</span>")
else
log_access("Failed Login: [key] [computer_id] [address] - Banned [.["reason"]]")
key_cache[key] = 0
return .
else
@@ -73,6 +89,7 @@
var/msg = "Ban database connection failure. Key [ckey] not checked"
log_world(msg)
message_admins(msg)
key_cache[key] = 0
return
var/ipquery = ""
@@ -86,6 +103,7 @@
var/datum/DBQuery/query_ban_check = SSdbcore.NewQuery("SELECT IFNULL((SELECT byond_key FROM [format_table_name("player")] WHERE [format_table_name("player")].ckey = [format_table_name("ban")].ckey), ckey), IFNULL((SELECT byond_key FROM [format_table_name("player")] WHERE [format_table_name("player")].ckey = [format_table_name("ban")].a_ckey), a_ckey), reason, expiration_time, duration, bantime, bantype, id, round_id FROM [format_table_name("ban")] WHERE (ckey = '[ckey]' [ipquery] [cidquery]) AND (bantype = 'PERMABAN' OR bantype = 'ADMIN_PERMABAN' OR ((bantype = 'TEMPBAN' OR bantype = 'ADMIN_TEMPBAN') AND expiration_time > Now())) AND isnull(unbanned)")
if(!query_ban_check.Execute(async = TRUE))
qdel(query_ban_check)
key_cache[key] = 0
return
while(query_ban_check.NextRow())
var/pkey = query_ban_check.item[1]
@@ -124,6 +142,7 @@
log_access("Failed Login: [key] [computer_id] [address] - Banned (#[banid]) [.["reason"]]")
qdel(query_ban_check)
key_cache[key] = 0
return .
qdel(query_ban_check)
@@ -138,6 +157,7 @@
//rogue ban in the process of being reverted.
if (cachedban && cachedban["reverting"])
key_cache[key] = 0
return null
if (cachedban && ckey != bannedckey)
@@ -165,6 +185,7 @@
newmatches_admin.len > STICKYBAN_MAX_ADMIN_MATCHES \
)
if (cachedban["reverting"])
key_cache[key] = 0
return null
cachedban["reverting"] = TRUE
@@ -182,6 +203,7 @@
cachedban["admin_matches_this_round"] = list()
cachedban -= "reverting"
world.SetConfig("ban", bannedckey, list2stickyban(cachedban))
key_cache[key] = 0
return null
//byond will not trigger isbanned() for "global" host bans,
@@ -191,6 +213,7 @@
log_admin("The admin [key] has been allowed to bypass a matching host/sticky ban on [bannedckey]")
message_admins("<span class='adminnotice'>The admin [key] has been allowed to bypass a matching host/sticky ban on [bannedckey]</span>")
addclientmessage(ckey,"<span class='adminnotice'>You have been allowed to bypass a matching host/sticky ban on [bannedckey]</span>")
key_cache[key] = 0
return null
if (C) //user is already connected!.
@@ -200,6 +223,7 @@
. = list("reason" = "Stickyban", "desc" = desc)
log_access("Failed Login: [key] [computer_id] [address] - StickyBanned [ban["message"]] Target Username: [bannedckey] Placed by [ban["admin"]]")
key_cache[key] = 0
return .
@@ -91,7 +91,7 @@
target.Stun(40) //Utterly useless without this, its okay since there are so many checks to go through
target.apply_status_effect(STATUS_EFFECT_MESMERIZE, 45) //So you cant rotate with combat mode, plus fancy status alert
if(do_mob(user, target, 40, 0, TRUE, extra_checks=CALLBACK(src, .proc/ContinueActive, user, target)))
if(do_mob(user, target, 40, 0, TRUE, extra_checks = CALLBACK(src, .proc/ContinueActive, user, target)))
PowerActivatedSuccessfully() // PAY COST! BEGIN COOLDOWN!
var/power_time = 90 + level_current * 12
target.apply_status_effect(STATUS_EFFECT_MESMERIZE, power_time + 80)
@@ -345,13 +345,13 @@
/obj/item/projectile/tentacle/on_hit(atom/target, blocked = FALSE)
var/mob/living/carbon/human/H = firer
if(blocked >= 100)
return 0
return BULLET_ACT_BLOCK
if(isitem(target))
var/obj/item/I = target
if(!I.anchored)
to_chat(firer, "<span class='notice'>You pull [I] right into your grasp.</span>")
H.put_in_hands(I) //Because throwing it is goofy as fuck and unreliable. If you land the tentacle despite the penalties to accuracy, you should have your reward.
. = 1
. = BULLET_ACT_HIT
else if(isliving(target))
var/mob/living/L = target
@@ -366,7 +366,7 @@
if(INTENT_HELP)
C.visible_message("<span class='danger'>[L] is pulled by [H]'s tentacle!</span>","<span class='userdanger'>A tentacle grabs you and pulls you towards [H]!</span>")
C.throw_at(get_step_towards(H,C), 8, 2)
return 1
return BULLET_ACT_HIT
if(INTENT_DISARM)
var/obj/item/I = C.get_active_held_item()
@@ -374,27 +374,27 @@
if(C.dropItemToGround(I))
C.visible_message("<span class='danger'>[I] is yanked off [C]'s hand by [src]!</span>","<span class='userdanger'>A tentacle pulls [I] away from you!</span>")
on_hit(I) //grab the item as if you had hit it directly with the tentacle
return 1
return BULLET_ACT_HIT
else
to_chat(firer, "<span class='danger'>You can't seem to pry [I] off [C]'s hands!</span>")
return 0
return BULLET_ACT_BLOCK
else
to_chat(firer, "<span class='danger'>[C] has nothing in hand to disarm!</span>")
return 0
return BULLET_ACT_HIT
if(INTENT_GRAB)
C.visible_message("<span class='danger'>[L] is grabbed by [H]'s tentacle!</span>","<span class='userdanger'>A tentacle grabs you and pulls you towards [H]!</span>")
C.throw_at(get_step_towards(H,C), 8, 2, H, TRUE, TRUE, callback=CALLBACK(src, .proc/tentacle_grab, H, C))
return 1
return BULLET_ACT_HIT
if(INTENT_HARM)
C.visible_message("<span class='danger'>[L] is thrown towards [H] by a tentacle!</span>","<span class='userdanger'>A tentacle grabs you and throws you towards [H]!</span>")
C.throw_at(get_step_towards(H,C), 8, 2, H, TRUE, TRUE, callback=CALLBACK(src, .proc/tentacle_stab, H, C))
return 1
return BULLET_ACT_HIT
else
L.visible_message("<span class='danger'>[L] is pulled by [H]'s tentacle!</span>","<span class='userdanger'>A tentacle grabs you and pulls you towards [H]!</span>")
L.throw_at(get_step_towards(H,L), 8, 2)
. = 1
. = BULLET_ACT_HIT
/obj/item/projectile/tentacle/Destroy()
qdel(chain)
@@ -319,9 +319,9 @@
L.dust()
else
if(!GLOB.ratvar_awakens && L.stat == CONSCIOUS)
vitality_drained = L.adjustToxLoss(1)
vitality_drained = L.adjustToxLoss(1, forced = TRUE)
else
vitality_drained = L.adjustToxLoss(1.5)
vitality_drained = L.adjustToxLoss(1.5, forced = TRUE)
if(vitality_drained)
GLOB.clockwork_vitality += vitality_drained
else
@@ -182,7 +182,7 @@
if(isliving(target))
var/mob/living/L = target
if(is_servant_of_ratvar(L) || L.stat || L.has_status_effect(STATUS_EFFECT_KINDLE))
return
return BULLET_ACT_HIT
var/atom/O = L.anti_magic_check()
playsound(L, 'sound/magic/fireball.ogg', 50, TRUE, frequency = 1.25)
if(O)
@@ -97,7 +97,7 @@
/mob/living/simple_animal/hostile/clockwork/marauder/bullet_act(obj/item/projectile/P)
if(deflect_projectile(P))
return
return BULLET_ACT_BLOCK
return ..()
/mob/living/simple_animal/hostile/clockwork/marauder/proc/deflect_projectile(obj/item/projectile/P)
@@ -31,7 +31,7 @@
if(auto_reflect(P, P.dir, get_turf(P), P.Angle) != -1)
return ..()
return -1
return BULLET_ACT_FORCE_PIERCE
/obj/structure/destructible/clockwork/reflector/proc/auto_reflect(obj/item/projectile/P, pdir, turf/ploc, pangle)
@@ -0,0 +1,108 @@
/obj/machinery/atmospherics/components/binary/relief_valve
name = "binary pressure relief valve"
desc = "Like a manual valve, but opens at a certain pressure rather than being toggleable."
icon = 'icons/obj/atmospherics/components/relief_valve.dmi'
icon_state = "relief_valve-t-map"
can_unwrench = TRUE
construction_type = /obj/item/pipe/binary
var/opened = FALSE
var/open_pressure = ONE_ATMOSPHERE * 3
var/close_pressure = ONE_ATMOSPHERE
pipe_state = "relief_valve-t"
/obj/machinery/atmospherics/components/binary/relief_valve/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/relief_valve/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/relief_valve/update_icon_nopipes()
if(dir==SOUTH)
setDir(NORTH)
else if(dir==WEST)
setDir(EAST)
cut_overlays()
if(!nodes[1] || !opened || !is_operational())
icon_state = "relief_valve-t"
return
icon_state = "relief_valve-t-blown"
/obj/machinery/atmospherics/components/binary/relief_valve/proc/open()
opened = TRUE
update_icon_nopipes()
update_parents()
var/datum/pipeline/parent1 = parents[1]
parent1.reconcile_air()
/obj/machinery/atmospherics/components/binary/relief_valve/proc/close()
opened = FALSE
update_icon_nopipes()
/obj/machinery/atmospherics/components/binary/relief_valve/process_atmos()
..()
if(!is_operational())
return
var/datum/gas_mixture/air_contents = airs[1]
var/our_pressure = air_contents.return_pressure()
if(opened && our_pressure < close_pressure)
close()
else if(!opened && our_pressure >= open_pressure)
open()
/obj/machinery/atmospherics/components/binary/relief_valve/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "atmos_relief", name, 335, 115, master_ui, state)
ui.open()
/obj/machinery/atmospherics/components/binary/relief_valve/ui_data()
var/data = list()
data["open_pressure"] = round(open_pressure)
data["close_pressure"] = round(close_pressure)
data["max_pressure"] = round(50*ONE_ATMOSPHERE)
return data
/obj/machinery/atmospherics/components/binary/relief_valve/ui_act(action, params)
if(..())
return
switch(action)
if("open_pressure")
var/pressure = params["open_pressure"]
if(pressure == "max")
pressure = 50*ONE_ATMOSPHERE
. = TRUE
else if(pressure == "input")
pressure = input("New output pressure ([close_pressure]-[50*ONE_ATMOSPHERE] kPa):", name, open_pressure) as num|null
if(!isnull(pressure) && !..())
. = TRUE
else if(text2num(pressure) != null)
pressure = text2num(pressure)
. = TRUE
if(.)
open_pressure = CLAMP(pressure, close_pressure, 50*ONE_ATMOSPHERE)
investigate_log("open pressure was set to [open_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
if("close_pressure")
var/pressure = params["close_pressure"]
if(pressure == "max")
pressure = open_pressure
. = TRUE
else if(pressure == "input")
pressure = input("New output pressure (0-[open_pressure] kPa):", name, close_pressure) as num|null
if(!isnull(pressure) && !..())
. = TRUE
else if(text2num(pressure) != null)
pressure = text2num(pressure)
. = TRUE
if(.)
close_pressure = CLAMP(pressure, 0, open_pressure)
investigate_log("close pressure was set to [close_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
update_icon()
@@ -0,0 +1,55 @@
/obj/machinery/atmospherics/components/unary/passive_vent
icon_state = "passive_vent_map-2"
name = "passive vent"
desc = "It is an open vent."
can_unwrench = TRUE
level = 1
layer = GAS_SCRUBBER_LAYER
pipe_state = "pvent"
/obj/machinery/atmospherics/components/unary/passive_vent/update_icon_nopipes()
cut_overlays()
if(showpipe)
var/image/cap = getpipeimage(icon, "vent_cap", initialize_directions)
add_overlay(cap)
icon_state = "passive_vent"
/obj/machinery/atmospherics/components/unary/passive_vent/process_atmos()
..()
var/datum/gas_mixture/environment = loc.return_air()
var/environment_pressure = environment.return_pressure()
var/pressure_delta = abs(environment_pressure - airs[1].return_pressure())
if((environment.temperature || airs[1].temperature) && pressure_delta > 0.5)
if(environment_pressure < airs[1].return_pressure())
var/air_temperature = (environment.temperature > 0) ? environment.temperature : airs[1].temperature
var/transfer_moles = (pressure_delta * environment.volume) / (air_temperature * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = airs[1].remove(transfer_moles)
loc.assume_air(removed)
air_update_turf()
else
var/air_temperature = (airs[1].temperature > 0) ? airs[1].temperature : environment.temperature
var/output_volume = airs[1].volume
var/transfer_moles = (pressure_delta * output_volume) / (air_temperature * R_IDEAL_GAS_EQUATION)
transfer_moles = min(transfer_moles, environment.total_moles()*airs[1].volume/environment.volume)
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
if(isnull(removed))
return
airs[1].merge(removed)
air_update_turf()
update_parents()
/obj/machinery/atmospherics/components/unary/passive_vent/can_crawl_through()
return TRUE
/obj/machinery/atmospherics/components/unary/passive_vent/layer1
piping_layer = PIPING_LAYER_MIN
icon_state = "passive_vent_map-1"
/obj/machinery/atmospherics/components/unary/passive_vent/layer3
piping_layer = PIPING_LAYER_MAX
icon_state = "passive_vent_map-3"
@@ -0,0 +1,111 @@
/obj/machinery/atmospherics/components/unary/relief_valve
name = "pressure relief valve"
desc = "A valve that opens to the air at a certain pressure, then closes once it goes below another."
icon = 'icons/obj/atmospherics/components/relief_valve.dmi'
icon_state = "relief_valve-e-map"
can_unwrench = TRUE
var/opened = FALSE
var/open_pressure = ONE_ATMOSPHERE * 3
var/close_pressure = ONE_ATMOSPHERE
pipe_state = "relief_valve-e"
/obj/machinery/atmospherics/components/unary/relief_valve/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/relief_valve/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/relief_valve/atmos
close_pressure = ONE_ATMOSPHERE * 2
/obj/machinery/atmospherics/components/unary/relief_valve/atmos/atmos_waste
name = "atmos waste relief valve"
/obj/machinery/atmospherics/components/unary/relief_valve/update_icon_nopipes()
cut_overlays()
if(!nodes[1] || !opened || !is_operational())
icon_state = "relief_valve-e"
return
icon_state = "relief_valve-e-blown"
/obj/machinery/atmospherics/components/unary/relief_valve/process_atmos()
..()
if(!is_operational())
return
var/datum/gas_mixture/air_contents = airs[1]
var/our_pressure = air_contents.return_pressure()
if(opened && our_pressure < close_pressure)
opened = FALSE
update_icon_nopipes()
else if(!opened && our_pressure >= open_pressure)
opened = TRUE
update_icon_nopipes()
if(opened && air_contents.temperature > 0)
var/datum/gas_mixture/environment = loc.return_air()
var/pressure_delta = our_pressure - environment.return_pressure()
var/transfer_moles = pressure_delta*200/(air_contents.temperature * R_IDEAL_GAS_EQUATION)
if(transfer_moles > 0)
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
loc.assume_air(removed)
air_update_turf()
update_parents()
/obj/machinery/atmospherics/components/unary/relief_valve/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "atmos_relief", name, 335, 115, master_ui, state)
ui.open()
/obj/machinery/atmospherics/components/unary/relief_valve/ui_data()
var/data = list()
data["open_pressure"] = round(open_pressure)
data["close_pressure"] = round(close_pressure)
data["max_pressure"] = round(50*ONE_ATMOSPHERE)
return data
/obj/machinery/atmospherics/components/unary/relief_valve/ui_act(action, params)
if(..())
return
switch(action)
if("open_pressure")
var/pressure = params["open_pressure"]
if(pressure == "max")
pressure = 50*ONE_ATMOSPHERE
. = TRUE
else if(pressure == "input")
pressure = input("New output pressure ([close_pressure]-[50*ONE_ATMOSPHERE] kPa):", name, open_pressure) as num|null
if(!isnull(pressure) && !..())
. = TRUE
else if(text2num(pressure) != null)
pressure = text2num(pressure)
. = TRUE
if(.)
open_pressure = CLAMP(pressure, close_pressure, 50*ONE_ATMOSPHERE)
investigate_log("open pressure was set to [open_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
if("close_pressure")
var/pressure = params["close_pressure"]
if(pressure == "max")
pressure = open_pressure
. = TRUE
else if(pressure == "input")
pressure = input("New output pressure (0-[open_pressure] kPa):", name, close_pressure) as num|null
if(!isnull(pressure) && !..())
. = TRUE
else if(text2num(pressure) != null)
pressure = text2num(pressure)
. = TRUE
if(.)
close_pressure = CLAMP(pressure, 0, open_pressure)
investigate_log("close pressure was set to [close_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
update_icon()
@@ -227,6 +227,11 @@
if(V.on)
PL |= V.parents[1]
PL |= V.parents[2]
else if (istype(atmosmch,/obj/machinery/atmospherics/components/binary/relief_valve))
var/obj/machinery/atmospherics/components/binary/relief_valve/V = atmosmch
if(V.opened)
PL |= V.parents[1]
PL |= V.parents[2]
else if (istype(atmosmch, /obj/machinery/atmospherics/components/unary/portables_connector))
var/obj/machinery/atmospherics/components/unary/portables_connector/C = atmosmch
if(C.connected_device)
@@ -35,7 +35,7 @@ The regular pipe you see everywhere, including bent ones.
/obj/machinery/atmospherics/pipe/simple/general/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/general/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
@@ -58,7 +58,7 @@ The regular pipe you see everywhere, including bent ones.
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/scrubbers
name="scrubbers pipe"
pipe_color=rgb(255,0,0)
@@ -77,7 +77,7 @@ The regular pipe you see everywhere, including bent ones.
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden
level = PIPE_HIDDEN_LEVEL
@@ -90,7 +90,7 @@ The regular pipe you see everywhere, including bent ones.
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/supply
name="air supply pipe"
pipe_color=rgb(0,0,255)
@@ -99,7 +99,7 @@ The regular pipe you see everywhere, including bent ones.
/obj/machinery/atmospherics/pipe/simple/supply/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/supply/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
@@ -122,7 +122,7 @@ The regular pipe you see everywhere, including bent ones.
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/supplymain
name="main air supply pipe"
pipe_color=rgb(130,43,255)
@@ -141,7 +141,7 @@ The regular pipe you see everywhere, including bent ones.
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/supplymain/hidden
level = PIPE_HIDDEN_LEVEL
@@ -154,7 +154,7 @@ The regular pipe you see everywhere, including bent ones.
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/yellow
pipe_color=rgb(255,198,0)
color=rgb(255,198,0)
@@ -172,7 +172,7 @@ The regular pipe you see everywhere, including bent ones.
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/yellow/hidden
level = PIPE_HIDDEN_LEVEL
@@ -185,7 +185,7 @@ The regular pipe you see everywhere, including bent ones.
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/cyan
pipe_color=rgb(0,255,249)
color=rgb(0,255,249)
@@ -193,7 +193,7 @@ The regular pipe you see everywhere, including bent ones.
/obj/machinery/atmospherics/pipe/simple/cyan/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/cyan/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
@@ -206,7 +206,7 @@ The regular pipe you see everywhere, including bent ones.
/obj/machinery/atmospherics/pipe/simple/cyan/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/simple/cyan/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
@@ -224,7 +224,7 @@ The regular pipe you see everywhere, including bent ones.
/obj/machinery/atmospherics/pipe/simple/green/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/green/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
@@ -237,7 +237,7 @@ The regular pipe you see everywhere, including bent ones.
/obj/machinery/atmospherics/pipe/simple/green/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/simple/green/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
@@ -255,7 +255,7 @@ The regular pipe you see everywhere, including bent ones.
/obj/machinery/atmospherics/pipe/simple/orange/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/orange/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
@@ -268,7 +268,7 @@ The regular pipe you see everywhere, including bent ones.
/obj/machinery/atmospherics/pipe/simple/orange/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/simple/orange/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
@@ -286,7 +286,7 @@ The regular pipe you see everywhere, including bent ones.
/obj/machinery/atmospherics/pipe/simple/purple/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/purple/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
@@ -309,7 +309,7 @@ The regular pipe you see everywhere, including bent ones.
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/dark
pipe_color=rgb(69,69,69)
color=rgb(69,69,69)
@@ -317,7 +317,7 @@ The regular pipe you see everywhere, including bent ones.
/obj/machinery/atmospherics/pipe/simple/dark/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/dark/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
@@ -340,7 +340,7 @@ The regular pipe you see everywhere, including bent ones.
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/violet
pipe_color=rgb(64,0,128)
color=rgb(64,0,128)
@@ -348,7 +348,7 @@ The regular pipe you see everywhere, including bent ones.
/obj/machinery/atmospherics/pipe/simple/violet/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/violet/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
@@ -371,7 +371,7 @@ The regular pipe you see everywhere, including bent ones.
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/brown
pipe_color=rgb(178,100,56)
color=rgb(178,100,56)
@@ -379,7 +379,7 @@ The regular pipe you see everywhere, including bent ones.
/obj/machinery/atmospherics/pipe/simple/brown/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/brown/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
+8 -3
View File
@@ -24,7 +24,8 @@ Credit dupes that require a lot of manual work shouldn't be removed, unless they
var/list/exported_atoms = list()//names of atoms sold/deleted by export
var/list/total_amount = list() //export instance => total count of sold objects of its type, only exists if any were sold
var/list/total_value = list() //export instance => total value of sold objects
var/list/total_reagents = list()//export reagents => into the total vaule of the object sold
var/list/reagents_volume = list()//export reagents => into the total volume of the object sold
var/list/reagents_value = list()//export reagents => into the reagent type total value.
// external_report works as "transaction" object, pass same one in if you're doing more than one export in single go
/proc/export_item_and_contents(atom/movable/AM, allowed_categories = EXPORT_CARGO, apply_elastic = TRUE, delete_unsold = TRUE, dry_run=FALSE, datum/export_report/external_report)
@@ -49,8 +50,12 @@ Credit dupes that require a lot of manual work shouldn't be removed, unless they
report.exported_atoms += " [thing.name]"
break
if(thing.reagents)
for(var/datum/reagent/R in thing.reagents.reagent_list)
report.total_reagents[R] += R.volume
for(var/A in thing.reagents.reagent_list)
var/datum/reagent/R = A
if(!R.value)
continue
report.reagents_volume[R.name] += R.volume
report.reagents_value[R.name] += R.volume * R.value
if(!dry_run && (sold || delete_unsold))
if(ismob(thing))
thing.investigate_log("deleted through cargo export",INVESTIGATE_CARGO)
+11
View File
@@ -73,6 +73,17 @@
crate_name = "atmospherics hardsuit"
crate_type = /obj/structure/closet/crate/secure/engineering
/datum/supply_pack/engineering/radhardsuit
name = "Radiation Hardsuit"
desc = "The Singulo is loose? Do you need to do a few changes to its containment and don't want to spent the rest of the shift under the shower? Get this Radiation Hardsuit! It protect from radiations and space only."
cost = 3500
access = ACCESS_ENGINE
contains = list(/obj/item/tank/internals/air,
/obj/item/clothing/mask/gas,
/obj/item/clothing/suit/space/hardsuit/engine/rad)
crate_name = "radiation hardsuit"
crate_type = /obj/structure/closet/crate/secure/engineering
/datum/supply_pack/engineering/industrialrcd
name = "Industrial RCD"
desc = "An industrial RCD in case the station has gone through more then one meteor storm and the CE needs to bring out the somthing a bit more reliable. Does not contain spare ammo for the industrial RCD or any other RCD models."
+5 -4
View File
@@ -2,8 +2,9 @@ GLOBAL_LIST_EMPTY(clientmessages)
/proc/addclientmessage(var/ckey, var/message)
ckey = ckey(ckey)
if (!ckey || !message)
if(!ckey || !message)
return
if (!(ckey in GLOB.clientmessages))
GLOB.clientmessages[ckey] = list()
GLOB.clientmessages[ckey] += message
var/list/L = GLOB.clientmessages[ckey]
if(!L)
GLOB.clientmessages[ckey] = L = list()
L += message
+5
View File
@@ -1007,6 +1007,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<b>Forced Feminization:</b> <a href='?_src_=prefs;preference=feminization'>[(cit_toggles & FORCED_FEM) ? "Allowed" : "Disallowed"]</a><br>"
dat += "<b>Forced Masculinization:</b> <a href='?_src_=prefs;preference=masculinization'>[(cit_toggles & FORCED_MASC) ? "Allowed" : "Disallowed"]</a><br>"
dat += "<b>Lewd Hypno:</b> <a href='?_src_=prefs;preference=hypno'>[(cit_toggles & HYPNO) ? "Allowed" : "Disallowed"]</a><br>"
dat += "<b>Bimbofication:</b> <a href='?_src_=prefs;preference=bimbo'>[(cit_toggles & BIMBOFICATION) ? "Allowed" : "Disallowed"]</a><br>"
dat += "</td>"
dat +="<td width='300px' height='300px' valign='top'>"
dat += "<h2>Other content prefs</h2>"
@@ -1015,6 +1016,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<b>Hypno:</b> <a href='?_src_=prefs;preference=never_hypno'>[(cit_toggles & NEVER_HYPNO) ? "Disallowed" : "Allowed"]</a><br>"
dat += "<b>Aphrodisiacs:</b> <a href='?_src_=prefs;preference=aphro'>[(cit_toggles & NO_APHRO) ? "Disallowed" : "Allowed"]</a><br>"
dat += "<b>Ass Slapping:</b> <a href='?_src_=prefs;preference=ass_slap'>[(cit_toggles & NO_ASS_SLAP) ? "Disallowed" : "Allowed"]</a><br>"
dat += "</tr></table>"
dat += "<br>"
@@ -2234,6 +2236,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if("ass_slap")
cit_toggles ^= NO_ASS_SLAP
if("bimbo")
cit_toggles ^= BIMBOFICATION
//END CITADEL EDIT
+2 -4
View File
@@ -109,10 +109,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
else if(current_version < 23) // we are fixing a gamebreaking bug.
job_preferences = list() //It loaded null from nonexistant savefile field.
if(current_version < 24 && S["feature_exhibitionist"])
var/datum/quirk/exhibitionism/E
var/quirk_name = initial(E.name)
all_quirks += quirk_name
if(current_version < 25)
var/digi
S["feature_lizard_legs"] >> digi
@@ -543,6 +539,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
ENABLE_BITFIELD(cit_toggles,NO_ASS_SLAP)
all_quirks -= V
if(features["meat_type"] == "Inesct")
features["meat_type"] = "Insect"
cit_character_pref_load(S)
return 1
+2 -1
View File
@@ -178,6 +178,7 @@
icon_state = "xenos"
item_state = "xenos_helm"
desc = "A helmet made out of chitinous alien hide."
alternate_screams = list('sound/voice/hiss6.ogg')
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT
/obj/item/clothing/head/fedora
@@ -421,4 +422,4 @@
name = "security cowboy hat"
desc = "A security cowboy hat, perfect for any true lawman"
icon_state = "cowboyhat_sec"
item_state= "cowboyhat_sec"
item_state= "cowboyhat_sec"
@@ -86,6 +86,7 @@
desc = "Perfect for winter in Siberia, da?"
icon_state = "ushankadown"
item_state = "ushankadown"
alternate_screams = list('sound/voice/human/cyka1.ogg', 'sound/voice/human/cheekibreeki.ogg')
flags_inv = HIDEEARS|HIDEHAIR
var/earflaps = 1
cold_protection = HEAD
@@ -164,6 +165,7 @@
icon_state = "cardborg_h"
item_state = "cardborg_h"
flags_cover = HEADCOVERSEYES
alternate_screams = list('modular_citadel/sound/voice/scream_silicon.ogg')
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT
dog_fashion = /datum/dog_fashion/head/cardborg
@@ -203,6 +203,31 @@
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/engine/atmos
//Radiation
/obj/item/clothing/head/helmet/space/hardsuit/engine/rad
name = "radiation hardsuit helmet"
desc = "A special helmet that protects against radiation and space. Not much else unfortunately."
icon_state = "cespace_helmet"
item_state = "nothing"
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 0, "acid" = 0)
item_color = "engineering"
resistance_flags = FIRE_PROOF
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
actions_types = list()
/obj/item/clothing/suit/space/hardsuit/engine/rad
name = "radiation hardsuit"
desc = "A special suit that protects against radiation and space. Not much else unfortunately."
icon_state = "hardsuit-rad"
item_state = "nothing"
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 0, "acid" = 0)
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/engine/rad
resistance_flags = FIRE_PROOF
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
mutantrace_variation = NONE
/obj/item/clothing/head/helmet/space/hardsuit/engine/rad/attack_self()
return //Sprites required for flashlight
//Chief Engineer's hardsuit
/obj/item/clothing/head/helmet/space/hardsuit/engine/elite
@@ -434,7 +434,7 @@ Contains:
strip_delay = 65
/obj/item/clothing/suit/space/fragile/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(!torn && prob(50))
if(!torn && prob(50) && damage >= 5)
to_chat(owner, "<span class='warning'>[src] tears from the damage, breaking the air-tight seal!</span>")
clothing_flags &= ~STOPSPRESSUREDAMAGE
name = "torn [src]."
@@ -826,6 +826,22 @@
armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0)
real = FALSE
/obj/item/clothing/suit/hooded/wintercoat/durathread
name = "durathread winter coat"
desc = "The one coat to rule them all. Extremely durable while providing the utmost comfort."
icon_state = "coatdurathread"
item_state = "coatdurathread"
armor = list("melee" = 15, "bullet" = 8, "laser" = 25, "energy" = 5, "bomb" = 12, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 50)
hoodtype = /obj/item/clothing/head/hooded/winterhood/durathread
/obj/item/clothing/suit/hooded/wintercoat/durathread/Initialize()
. = ..()
allowed = GLOB.security_wintercoat_allowed
/obj/item/clothing/head/hooded/winterhood/durathread
icon_state = "winterhood_durathread"
armor = list("melee" = 20, "bullet" = 8, "laser" = 15, "energy" = 8, "bomb" = 25, "bio" = 10, "rad" = 15, "fire" = 75, "acid" = 37)
/obj/item/clothing/suit/spookyghost
name = "spooky ghost"
+14 -4
View File
@@ -471,6 +471,7 @@
name = "white sundress"
desc = "Makes you want to frolic in a field of lillies."
icon_state = "sundress_white"
item_state = "sundress"
item_color = "sundress_white"
body_parts_covered = CHEST|GROIN
fitted = FEMALE_UNIFORM_TOP
@@ -527,6 +528,16 @@
item_color = "assistant_formal"
can_adjust = FALSE
/obj/item/clothing/under/staffassistant
name = "staff assistant's jumpsuit"
desc = "It's a generic grey jumpsuit. That's about what assistants are worth, anyway."
icon = 'goon/icons/obj/item_js_rank.dmi'
alternate_worn_icon = 'goon/icons/mob/worn_js_rank.dmi'
icon_state = "assistant"
item_state = "gy_suit"
item_color = "assistant"
mutantrace_variation = NONE
/obj/item/clothing/under/blacktango
name = "black tango dress"
desc = "Filled with Latin fire."
@@ -580,7 +591,7 @@
icon_state = "flower_dress"
item_state = "sailordress"
item_color = "flower_dress"
body_parts_covered = CHEST|GROIN
body_parts_covered = CHEST|GROIN|LEGS
fitted = FEMALE_UNIFORM_TOP
can_adjust = FALSE
@@ -605,9 +616,8 @@
/obj/item/clothing/under/croptop
name = "crop top"
desc = "We've saved money by giving you half a shirt!"
icon_state = "sailor_dress"
item_state = "sailordress"
item_color = "sailor_dress"
icon_state = "croptop"
item_color = "croptop"
body_parts_covered = CHEST|GROIN|ARMS
fitted = FEMALE_UNIFORM_TOP
can_adjust = FALSE
+1
View File
@@ -158,6 +158,7 @@
I.CheckParts(parts, R)
if(send_feedback)
SSblackbox.record_feedback("tally", "object_crafted", 1, I.type)
log_craft("[I] crafted by [user] at [loc_name(I.loc)]")
return 0
return "."
return ", missing tool."
@@ -159,6 +159,14 @@
always_availible = TRUE
category = CAT_CLOTHING
/datum/crafting_recipe/durathread_wintercoat
name = "Durathread Winter Coat"
result = /obj/item/clothing/suit/hooded/wintercoat/durathread
reqs = list(/obj/item/stack/sheet/durathread = 12,
/obj/item/stack/sheet/leather = 10)
time = 70
category = CAT_CLOTHING
/datum/crafting_recipe/wintercoat_cosmic
name = "Cosmic Winter Coat"
result = /obj/item/clothing/suit/hooded/wintercoat/cosmic
@@ -65,7 +65,7 @@
reagents.add_reagent(extra_reagent, 3)
/obj/item/reagent_containers/food/snacks/donut/meat
name = "Meat Donut"
name = "meat donut"
desc = "Tastes as gross as it looks."
icon_state = "donut_meat"
bonus_reagents = list(/datum/reagent/consumable/ketchup = 1)
@@ -152,7 +152,7 @@
icon_state = "jelly"
decorated_icon = "jelly_homer"
bonus_reagents = list(/datum/reagent/consumable/sugar = 1, /datum/reagent/consumable/nutriment/vitamin = 1)
extra_reagent = "berryjuice"
extra_reagent = /datum/reagent/consumable/berryjuice
tastes = list("jelly" = 1, "donut" = 3)
foodtype = JUNKFOOD | GRAIN | FRIED | FRUIT | SUGAR | BREAKFAST
@@ -240,7 +240,7 @@
name = "jelly donut"
desc = "You jelly?"
icon_state = "jelly"
extra_reagent = "slimejelly"
extra_reagent = /datum/reagent/toxin/slimejelly
foodtype = JUNKFOOD | GRAIN | FRIED | TOXIC | SUGAR | BREAKFAST
/obj/item/reagent_containers/food/snacks/donut/jelly/slimejelly/plain
+2 -2
View File
@@ -234,8 +234,8 @@
dat += "<tr><td width='260px'>[G.get_name()]</td><td>"
if(can_extract && G.mutability_flags & PLANT_GENE_EXTRACTABLE)
dat += "<a href='?src=[REF(src)];gene=[REF(G)];op=extract'>Extract</a>"
if(G.mutability_flags & PLANT_GENE_REMOVABLE)
dat += "<a href='?src=[REF(src)];gene=[REF(G)];op=remove'>Remove</a>"
if(G.mutability_flags & PLANT_GENE_REMOVABLE)
dat += "<a href='?src=[REF(src)];gene=[REF(G)];op=remove'>Remove</a>"
dat += "</td></tr>"
dat += "</table>"
else
+1
View File
@@ -90,6 +90,7 @@
return ..()
if(istype(Proj , /obj/item/projectile/energy/floramut))
mutate()
return BULLET_ACT_HIT
else if(istype(Proj , /obj/item/projectile/energy/florayield))
return myseed.bullet_act(Proj)
else
+1
View File
@@ -145,6 +145,7 @@ obj/item/seeds/proc/is_gene_forbidden(typepath)
adjust_yield(1 * rating)
else if(prob(1/(yield * yield) * 100))//This formula gives you diminishing returns based on yield. 100% with 1 yield, decreasing to 25%, 11%, 6, 4, 2...
adjust_yield(1 * rating)
return BULLET_ACT_HIT
else
return ..()
@@ -1310,34 +1310,3 @@
set_pin_data(IC_OUTPUT, 2, regurgitated_contents)
push_data()
activate_pin(2)
//Degens
/obj/item/integrated_circuit/input/bonermeter
name = "bonermeter"
desc = "Detects the target's arousal and various statistics about the target's arousal levels. Invasive!"
icon_state = "medscan"
complexity = 4
inputs = list("target" = IC_PINTYPE_REF)
outputs = list(
"current arousal" = IC_PINTYPE_NUMBER,
"minimum arousal" = IC_PINTYPE_NUMBER,
"maximum arousal" = IC_PINTYPE_NUMBER,
"can be aroused" = IC_PINTYPE_BOOLEAN
)
activators = list("scan" = IC_PINTYPE_PULSE_IN, "on scanned" = IC_PINTYPE_PULSE_OUT)
spawn_flags = IC_SPAWN_RESEARCH
power_draw_per_use = 40
/obj/item/integrated_circuit/input/bonermeter/do_work()
var/mob/living/L = get_pin_data_as_type(IC_INPUT, 1, /mob/living)
if(!istype(L) || !L.Adjacent(get_turf(src)) ) //Invalid input
return
set_pin_data(IC_OUTPUT, 1, L.getArousalLoss())
set_pin_data(IC_OUTPUT, 2, L.min_arousal)
set_pin_data(IC_OUTPUT, 3, L.max_arousal)
set_pin_data(IC_OUTPUT, 4, L.canbearoused)
push_data()
activate_pin(2)
+1 -1
View File
@@ -25,7 +25,7 @@
else
log_admin("Client [ckey] was just autokicked for flooding keysends; likely abuse but potentially lagspike.")
message_admins("Client [ckey] was just autokicked for flooding keysends; likely abuse but potentially lagspike.")
QDEL_IN(src, 1)
qdel(src)
return
///Check if the key is short enough to even be a real key
@@ -1,90 +1,4 @@
//Landmarks and other helpers which speed up the mapping process and reduce the number of unique instances/subtypes of items/turf/ect
/obj/effect/baseturf_helper //Set the baseturfs of every turf in the /area/ it is placed.
name = "baseturf editor"
icon = 'icons/effects/mapping_helpers.dmi'
icon_state = ""
var/list/baseturf_to_replace
var/baseturf
layer = POINT_LAYER
/obj/effect/baseturf_helper/Initialize()
. = ..()
return INITIALIZE_HINT_LATELOAD
/obj/effect/baseturf_helper/LateInitialize()
if(!baseturf_to_replace)
baseturf_to_replace = typecacheof(list(/turf/open/space,/turf/baseturf_bottom))
else if(!length(baseturf_to_replace))
baseturf_to_replace = list(baseturf_to_replace = TRUE)
else if(baseturf_to_replace[baseturf_to_replace[1]] != TRUE) // It's not associative
var/list/formatted = list()
for(var/i in baseturf_to_replace)
formatted[i] = TRUE
baseturf_to_replace = formatted
var/area/our_area = get_area(src)
for(var/i in get_area_turfs(our_area, z))
replace_baseturf(i)
qdel(src)
/obj/effect/baseturf_helper/proc/replace_baseturf(turf/thing)
var/list/baseturf_cache = thing.baseturfs
if(length(baseturf_cache))
for(var/i in baseturf_cache)
if(baseturf_to_replace[i])
baseturf_cache -= i
if(!baseturf_cache.len)
thing.assemble_baseturfs(baseturf)
else
thing.PlaceOnBottom(null, baseturf)
else if(baseturf_to_replace[thing.baseturfs])
thing.assemble_baseturfs(baseturf)
else
thing.PlaceOnBottom(null, baseturf)
/obj/effect/baseturf_helper/space
name = "space baseturf editor"
baseturf = /turf/open/space
/obj/effect/baseturf_helper/asteroid
name = "asteroid baseturf editor"
baseturf = /turf/open/floor/plating/asteroid
/obj/effect/baseturf_helper/asteroid/airless
name = "asteroid airless baseturf editor"
baseturf = /turf/open/floor/plating/asteroid/airless
/obj/effect/baseturf_helper/asteroid/basalt
name = "asteroid basalt baseturf editor"
baseturf = /turf/open/floor/plating/asteroid/basalt
/obj/effect/baseturf_helper/asteroid/snow
name = "asteroid snow baseturf editor"
baseturf = /turf/open/floor/plating/asteroid/snow
/obj/effect/baseturf_helper/beach/sand
name = "beach sand baseturf editor"
baseturf = /turf/open/floor/plating/beach/sand
/obj/effect/baseturf_helper/beach/water
name = "water baseturf editor"
baseturf = /turf/open/floor/plating/beach/water
/obj/effect/baseturf_helper/lava
name = "lava baseturf editor"
baseturf = /turf/open/lava/smooth
/obj/effect/baseturf_helper/lava_land/surface
name = "lavaland baseturf editor"
baseturf = /turf/open/lava/smooth/lava_land_surface
/obj/effect/mapping_helpers
icon = 'icons/effects/mapping_helpers.dmi'
icon_state = ""
@@ -94,7 +8,6 @@
..()
return late ? INITIALIZE_HINT_LATELOAD : INITIALIZE_HINT_QDEL
//airlock helpers
/obj/effect/mapping_helpers/airlock
layer = DOOR_HELPER_LAYER
@@ -0,0 +1,82 @@
/obj/effect/baseturf_helper //Set the baseturfs of every turf in the /area/ it is placed.
name = "baseturf editor"
icon = 'icons/effects/mapping_helpers.dmi'
icon_state = ""
var/list/baseturf_to_replace
var/baseturf
layer = POINT_LAYER
/obj/effect/baseturf_helper/Initialize()
. = ..()
return INITIALIZE_HINT_LATELOAD
/obj/effect/baseturf_helper/LateInitialize()
if(!baseturf_to_replace)
baseturf_to_replace = typecacheof(list(/turf/open/space,/turf/baseturf_bottom))
else if(!length(baseturf_to_replace))
baseturf_to_replace = list(baseturf_to_replace = TRUE)
else if(baseturf_to_replace[baseturf_to_replace[1]] != TRUE) // It's not associative
var/list/formatted = list()
for(var/i in baseturf_to_replace)
formatted[i] = TRUE
baseturf_to_replace = formatted
var/area/our_area = get_area(src)
for(var/i in get_area_turfs(our_area, z))
replace_baseturf(i)
qdel(src)
/obj/effect/baseturf_helper/proc/replace_baseturf(turf/thing)
var/list/baseturf_cache = thing.baseturfs
if(length(baseturf_cache))
for(var/i in baseturf_cache)
if(baseturf_to_replace[i])
baseturf_cache -= i
if(!baseturf_cache.len)
thing.assemble_baseturfs(baseturf)
else
thing.PlaceOnBottom(null, baseturf)
else if(baseturf_to_replace[thing.baseturfs])
thing.assemble_baseturfs(baseturf)
else
thing.PlaceOnBottom(null, baseturf)
/obj/effect/baseturf_helper/space
name = "space baseturf editor"
baseturf = /turf/open/space
/obj/effect/baseturf_helper/asteroid
name = "asteroid baseturf editor"
baseturf = /turf/open/floor/plating/asteroid
/obj/effect/baseturf_helper/asteroid/airless
name = "asteroid airless baseturf editor"
baseturf = /turf/open/floor/plating/asteroid/airless
/obj/effect/baseturf_helper/asteroid/basalt
name = "asteroid basalt baseturf editor"
baseturf = /turf/open/floor/plating/asteroid/basalt
/obj/effect/baseturf_helper/asteroid/snow
name = "asteroid snow baseturf editor"
baseturf = /turf/open/floor/plating/asteroid/snow
/obj/effect/baseturf_helper/beach/sand
name = "beach sand baseturf editor"
baseturf = /turf/open/floor/plating/beach/sand
/obj/effect/baseturf_helper/beach/water
name = "water baseturf editor"
baseturf = /turf/open/floor/plating/beach/water
/obj/effect/baseturf_helper/lava
name = "lava baseturf editor"
baseturf = /turf/open/lava/smooth
/obj/effect/baseturf_helper/lava_land/surface
name = "lavaland baseturf editor"
baseturf = /turf/open/lava/smooth/lava_land_surface
@@ -0,0 +1,43 @@
//Builds networks like power cables/atmos lines/etc
//Just a holder parent type for now..
/obj/effect/mapping_helpers/network_builder
/// set var to true to not del on lateload
var/custom_spawned = FALSE
icon = 'icons/effects/mapping_helpers.dmi'
late = TRUE
/// what directions we know connections are in
var/list/network_directions = list()
/obj/effect/mapping_helpers/network_builder/Initialize(mapload)
. = ..()
to_chat(world, "DEBUG: Initializing [COORD(src)]")
var/conflict = check_duplicates()
if(conflict)
stack_trace("WARNING: [type] network building helper found check_duplicates() conflict [conflict] in its location.!")
return INITIALIZE_HINT_QDEL
if(!mapload)
if(GLOB.Debug2)
custom_spawned = TRUE
return INITIALIZE_HINT_NORMAL
else
return INITIALIZE_HINT_QDEL
return INITIALIZE_HINT_LATELOAD
/// How this works: On LateInitialize, detect all directions that this should be applicable to, and do what it needs to do, and then inform all network builders in said directions that it's been around since it won't be around afterwards.
/obj/effect/mapping_helpers/network_builder/LateInitialize()
to_chat(world, "DEBUG: LateInitializing [COORD(src)]")
scan_directions()
build_network()
if(!custom_spawned)
qdel(src)
/obj/effect/mapping_helpers/network_builder/proc/check_duplicates()
CRASH("Base abstract network builder tried to check duplicates.")
/obj/effect/mapping_helpers/network_builder/proc/scan_directions()
CRASH("Base abstract network builder tried to scan directions.")
/obj/effect/mapping_helpers/network_builder/proc/build_network()
CRASH("Base abstract network builder tried to build network.")
@@ -0,0 +1,96 @@
/* Automatically places pipes on init based on any pipes connecting to it and adjacent helpers. Only supports cardinals.
* Conflicts with ANY PIPE ON ITS LAYER, as well as atmos network build helpers on the same layer, as well as any pipe on all layers. Do those manually.
*/
/obj/effect/mapping_helpers/network_builder/atmos_pipe
name = "atmos pipe autobuilder"
icon_state = "atmospipebuilder"
/// Layer to put our pipes on
var/pipe_layer = PIPING_LAYER_DEFAULT
/// Color to set our pipes to
var/pipe_color
/// Whether or not pipes we make are visible
var/visible_pipes = FALSE
color = null
/obj/effect/mapping_helpers/network_builder/atmos_pipe/check_duplicates()
for(var/obj/effect/mapping_helpers/network_builder/atmos_pipe/other in loc)
if(other == src)
continue
if(other.pipe_layer == pipe_layer)
return other
for(var/obj/machinery/atmospherics/A in loc)
if(A.pipe_flags & PIPING_ALL_LAYER)
return A
if(A.piping_layer == pipe_layer)
return A
return FALSE
/// Scans directions, sets network_directions to have every direction that we can link to. If there's another power cable builder detected, make sure they know we're here by adding us to their cable directions list before we're deleted.
/obj/effect/mapping_helpers/network_builder/atmos_pipe/scan_directions()
var/turf/T
for(var/i in GLOB.cardinals)
if(i in network_directions)
continue //we're already set, that means another builder set us.
T = get_step(loc, i)
if(!T)
continue
var/found = FALSE
for(var/obj/effect/mapping_helpers/network_builder/atmos_pipe/other in T)
if(other.pipe_layer == pipe_layer)
network_directions += i
other.network_directions += turn(i, 180)
found = TRUE
break
if(found)
continue
for(var/obj/machinery/atmospherics/A in T)
if((A.piping_layer == pipe_layer) && (A.initialize_directions & turn(i, 180)))
network_directions += i
break
return network_directions
/// Directions should only ever have cardinals.
/obj/effect/mapping_helpers/network_builder/atmos_pipe/build_network()
if(length(network_directions) <= 1)
return
var/obj/machinery/atmospherics/pipe/built
switch(length(network_directions))
if(2) //straight pipe
built = new /obj/machinery/atmospherics/pipe/simple(loc)
var/d1 = network_directions[1]
var/d2 = network_directions[2]
var/combined = d1 | d2
if(combined in GLOB.diagonals)
built.setDir(combined)
else
built.setDir(d1)
if(3) //manifold
var/list/missing = network_directions ^ GLOB.cardinals
missing = missing[1]
built = new /obj/machinery/atmospherics/pipe/manifold(loc)
built.setDir(missing)
if(4) //4 way manifold
built = new /obj/machinery/atmospherics/pipe/manifold4w(loc)
built.SetInitDirections()
built.on_construction(pipe_color, pipe_layer)
built.hide(!visible_pipes)
/obj/effect/mapping_helpers/network_builder/atmos_pipe/distro
name = "distro line autobuilder"
pipe_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
pipe_color = rgb(130,43,255)
color = rgb(130,43,255)
/obj/effect/mapping_helpers/network_builder/atmos_pipe/scrubbers
name = "scrubbers line autobuilder"
pipe_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
pipe_color = rgb(255,0,0)
color = rgb(255,0,0)
@@ -0,0 +1,189 @@
#define NO_KNOT 0
#define KNOT_AUTO 1
#define KNOT_FORCED 2
/// Automatically links on init to power cables and other cable builder helpers. Only supports cardinals.
/obj/effect/mapping_helpers/network_builder/power_cable
name = "power line autobuilder"
icon_state = "powerlinebuilder"
color = "#ff0000"
/// Whether or not we forcefully make a knot
var/knot = NO_KNOT
/// cable color as from GLOB.cable_colors
var/cable_color = "red"
/obj/effect/mapping_helpers/network_builder/power_cable/check_duplicates()
var/obj/structure/cable/C = locate() in loc
if(C)
return C
for(var/obj/effect/mapping_helpers/network_builder/power_cable/other in loc)
if(other == src)
continue
return other
/// Scans directions, sets network_directions to have every direction that we can link to. If there's another power cable builder detected, make sure they know we're here by adding us to their cable directions list before we're deleted.
/obj/effect/mapping_helpers/network_builder/power_cable/scan_directions()
var/turf/T
for(var/i in GLOB.cardinals)
if(i in network_directions)
continue //we're already set, that means another builder set us.
T = get_step(loc, i)
if(!T)
continue
var/obj/effect/mapping_helpers/network_builder/power_cable/other = locate() in T
if(other)
network_directions += i
other.network_directions += turn(i, 180)
continue
for(var/obj/structure/cable/C in T)
if(C.d1 == turn(i, 180) || C.d2 == turn(i, 180))
network_directions += i
continue
return network_directions
/// Directions should only ever have cardinals.
/obj/effect/mapping_helpers/network_builder/power_cable/build_network()
if(!length(network_directions))
return
else if(length(network_directions) == 1)
new /obj/structure/cable(loc, cable_color, NONE, network_directions[1])
else
if(knot == KNOT_FORCED)
for(var/d in network_directions)
new /obj/structure/cable(loc, cable_color, NONE, d)
else
var/do_knot = (knot == KNOT_FORCED) || ((knot == KNOT_AUTO) && should_auto_knot())
var/dirs = length(network_directions)
for(var/i in 1 to dirs - 1)
var/li = (i == 1)? dirs : (i - 1)
var/d1 = network_directions[i]
var/d2 = network_directions[li]
if(d1 > d2) //this is ugly please help me
d1 = network_directions[li]
d2 = network_directions[i]
new /obj/structure/cable(loc, cable_color, d1, d2)
if(do_knot)
new /obj/structure/cable(loc, cable_color, NONE, network_directions[i])
do_knot = FALSE
/obj/effect/mapping_helpers/network_builder/power_cable/proc/should_auto_knot()
return (locate(/obj/machinery/power/terminal) in loc)
/obj/effect/mapping_helpers/network_builder/power_cable/knot
icon_state = "powerlinebuilderknot"
knot = KNOT_FORCED
/obj/effect/mapping_helpers/network_builder/power_cable/auto
icon_state = "powerlinebuilderauto"
knot = KNOT_AUTO
// Red
/obj/effect/mapping_helpers/network_builder/power_cable/red
color = "#ff0000"
cable_color = "red"
/obj/effect/mapping_helpers/network_builder/power_cable/red/knot
icon_state = "powerlinebuilderknot"
knot = KNOT_FORCED
/obj/effect/mapping_helpers/network_builder/power_cable/red/auto
icon_state = "powerlinebuilderauto"
knot = KNOT_AUTO
// White
/obj/effect/mapping_helpers/network_builder/power_cable/white
color = "#ffffff"
cable_color = "white"
/obj/effect/mapping_helpers/network_builder/power_cable/white/knot
icon_state = "powerlinebuilderknot"
knot = KNOT_FORCED
/obj/effect/mapping_helpers/network_builder/power_cable/white/auto
icon_state = "powerlinebuilderauto"
knot = KNOT_AUTO
// Cyan
/obj/effect/mapping_helpers/network_builder/power_cable/cyan
color = "#00ffff"
cable_color = "cyan"
/obj/effect/mapping_helpers/network_builder/power_cable/cyan/knot
icon_state = "powerlinebuilderknot"
knot = KNOT_FORCED
/obj/effect/mapping_helpers/network_builder/power_cable/cyan/auto
icon_state = "powerlinebuilderauto"
knot = KNOT_AUTO
// Orange
/obj/effect/mapping_helpers/network_builder/power_cable/orange
color = "#ff8000"
cable_color = "orange"
/obj/effect/mapping_helpers/network_builder/power_cable/orange/knot
icon_state = "powerlinebuilderknot"
knot = KNOT_FORCED
/obj/effect/mapping_helpers/network_builder/power_cable/orange/auto
icon_state = "powerlinebuilderauto"
knot = KNOT_AUTO
// Pink
/obj/effect/mapping_helpers/network_builder/power_cable/pink
color = "#ff3cc8"
cable_color = "pink"
/obj/effect/mapping_helpers/network_builder/power_cable/pink/knot
icon_state = "powerlinebuilderknot"
knot = KNOT_FORCED
/obj/effect/mapping_helpers/network_builder/power_cable/pink/auto
icon_state = "powerlinebuilderauto"
knot = KNOT_AUTO
// Blue
/obj/effect/mapping_helpers/network_builder/power_cable/blue
color = "#1919c8"
cable_color = "blue"
/obj/effect/mapping_helpers/network_builder/power_cable/blue/knot
icon_state = "powerlinebuilderknot"
knot = KNOT_FORCED
/obj/effect/mapping_helpers/network_builder/power_cable/blue/auto
icon_state = "powerlinebuilderauto"
knot = KNOT_AUTO
// Green
/obj/effect/mapping_helpers/network_builder/power_cable/green
color = "#00aa00"
cable_color = "green"
/obj/effect/mapping_helpers/network_builder/power_cable/green/knot
icon_state = "powerlinebuilderknot"
knot = KNOT_FORCED
/obj/effect/mapping_helpers/network_builder/power_cable/green/auto
icon_state = "powerlinebuilderauto"
knot = KNOT_AUTO
// Yellow
/obj/effect/mapping_helpers/network_builder/power_cable/yellow
color = "#ffff00"
cable_color = "yellow"
/obj/effect/mapping_helpers/network_builder/power_cable/yellow/knot
icon_state = "powerlinebuilderknot"
knot = KNOT_FORCED
/obj/effect/mapping_helpers/network_builder/power_cable/yellow/auto
icon_state = "powerlinebuilderauto"
knot = KNOT_AUTO
#undef NO_KNOT
#undef KNOT_AUTO
#undef KNOT_FORCED
+8
View File
@@ -87,6 +87,14 @@
return
. = ..()
/obj/machinery/computer/shuttle/mining/common
name = "lavaland shuttle console"
desc = "Used to call and send the lavaland shuttle."
req_access = list()
circuit = /obj/item/circuitboard/computer/mining_shuttle/common
shuttleId = "mining_common"
possible_destinations = "whiteship_home;lavaland_common_away;landing_zone_dock;mining_public"
/**********************Mining car (Crate like thing, not the rail car)**************************/
/obj/structure/closet/crate/miningcar
+1 -1
View File
@@ -250,7 +250,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
/obj/item/twohanded/required/gibtonite/bullet_act(obj/item/projectile/P)
GibtoniteReaction(P.firer)
..()
return ..()
/obj/item/twohanded/required/gibtonite/ex_act()
GibtoniteReaction(null, 1)
@@ -244,6 +244,10 @@
name = "Shark"
icon_state = "shark"
/datum/sprite_accessory/mam_snouts/hshark
name = "hShark"
icon_state = "hshark"
/datum/sprite_accessory/mam_snouts/toucan
name = "Toucan"
icon_state = "toucan"
+1 -1
View File
@@ -14,7 +14,7 @@
/obj/effect/dummy/phased_mob/slaughter/ex_act()
return
/obj/effect/dummy/phased_mob/slaughter/bullet_act()
return
return BULLET_ACT_FORCE_PIERCE
/obj/effect/dummy/phased_mob/slaughter/singularity_act()
return
@@ -41,9 +41,6 @@
update_damage_overlays()
else
adjustStaminaLoss(damage_amount, forced = forced)
//citadel code
if(AROUSAL)
adjustArousalLoss(damage_amount)
return TRUE
@@ -51,7 +51,7 @@
if(prob(mind.martial_art.dodge_chance))
var/dodgemessage = pick("dodges under the projectile!","dodges to the right of the projectile!","jumps over the projectile!")
visible_message("<span class='danger'>[src] [dodgemessage]</span>", "<span class='userdanger'>You dodge the projectile!</span>")
return -1
return BULLET_ACT_BLOCK
if(mind.martial_art && !incapacitated(FALSE, TRUE) && mind.martial_art.can_use(src) && mind.martial_art.deflection_chance) //Some martial arts users can deflect projectiles!
if(prob(mind.martial_art.deflection_chance))
if(!lying && dna && !dna.check_mutation(HULK)) //But only if they're not lying down, and hulks can't do it
@@ -60,12 +60,10 @@
else
visible_message("<span class='danger'>[src] deflects the projectile!</span>", "<span class='userdanger'>You deflect the projectile!</span>")
playsound(src, pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, 1)
if(!mind.martial_art.reroute_deflection)
return FALSE
else
if(mind.martial_art.reroute_deflection)
P.firer = src
P.setAngle(rand(0, 360))//SHING
return FALSE
return BULLET_ACT_FORCE_PIERCE
return ..()
@@ -39,10 +39,6 @@
//Stuff jammed in your limbs hurts
handle_embedded_objects()
if(stat != DEAD)
//process your dick energy
handle_arousal(times_fired)
//Update our name based on whether our face is obscured/disfigured
name = get_visible_name()
+11 -23
View File
@@ -323,12 +323,6 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
for(var/datum/disease/A in C.diseases)
A.cure(FALSE)
//CITADEL EDIT
if(NOAROUSAL in species_traits)
C.canbearoused = FALSE
else
if(C.client)
C.canbearoused = C.client.prefs.arousable
if(ishuman(C))
var/mob/living/carbon/human/H = C
if(NOGENITALS in H.dna.species.species_traits)
@@ -1586,10 +1580,10 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
"<span class='notice'>You slap [user == target ? "yourself" : "\the [target]"] in the face! </span>",\
"You hear a slap."
)
if (!HAS_TRAIT(target, TRAIT_NYMPHO))
stop_wagging_tail(target)
user.do_attack_animation(target, ATTACK_EFFECT_FACE_SLAP)
user.adjustStaminaLossBuffered(3)
if (!HAS_TRAIT(target, TRAIT_PERMABONER))
stop_wagging_tail(target)
return FALSE
else if(aim_for_groin && (target == user || target.lying || same_dir) && (target_on_help || target_restrained || target_aiming_for_groin))
if(target.client?.prefs.cit_toggles & NO_ASS_SLAP)
@@ -1597,19 +1591,17 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
return FALSE
user.do_attack_animation(target, ATTACK_EFFECT_ASS_SLAP)
user.adjustStaminaLossBuffered(3)
target.adjust_arousal(20,maso = TRUE)
if (ishuman(target) && HAS_TRAIT(target, TRAIT_MASO) && target.has_dna() && prob(10))
target.mob_climax(forced_climax=TRUE)
if (!HAS_TRAIT(target, TRAIT_PERMABONER))
stop_wagging_tail(target)
playsound(target.loc, 'sound/weapons/slap.ogg', 50, 1, -1)
user.visible_message(\
"<span class='danger'>\The [user] slaps \the [target]'s ass!</span>",\
"<span class='notice'>You slap [user == target ? "your" : "\the [target]'s"] ass!</span>",\
"You hear a slap."
)
if (target.canbearoused)
target.adjustArousalLoss(5)
if (target.getArousalLoss() >= 100 && ishuman(target) && HAS_TRAIT(target, TRAIT_MASO) && target.has_dna())
target.mob_climax(forced_climax=TRUE)
if (!HAS_TRAIT(target, TRAIT_NYMPHO))
stop_wagging_tail(target)
)
return FALSE
else if(attacker_style && attacker_style.disarm_act(user,target))
return 1
@@ -1962,10 +1954,8 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
if(BP)
if(damage > 0 ? BP.receive_damage(damage_amount, 0) : BP.heal_damage(abs(damage_amount), 0))
H.update_damage_overlays()
if(HAS_TRAIT(H, TRAIT_MASO))
H.adjustArousalLoss(damage_amount, 0)
if (H.getArousalLoss() >= 100 && ishuman(H) && H.has_dna())
H.mob_climax(forced_climax=TRUE)
if(HAS_TRAIT(H, TRAIT_MASO) && prob(damage_amount))
H.mob_climax(forced_climax=TRUE)
else//no bodypart, we deal damage with a more general method.
H.adjustBruteLoss(damage_amount)
@@ -1996,8 +1986,6 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
if(BRAIN)
var/damage_amount = forced ? damage : damage * hit_percent * H.physiology.brain_mod
H.adjustOrganLoss(ORGAN_SLOT_BRAIN, damage_amount)
if(AROUSAL) //Citadel edit - arousal
H.adjustArousalLoss(damage * hit_percent)
return 1
/datum/species/proc/on_hit(obj/item/projectile/P, mob/living/carbon/human/H)
@@ -2010,7 +1998,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
/datum/species/proc/bullet_act(obj/item/projectile/P, mob/living/carbon/human/H)
// called before a projectile hit
return 0
return
/////////////
//BREATHING//
@@ -360,8 +360,8 @@
playsound(H, 'sound/effects/shovel_dig.ogg', 70, 1)
H.visible_message("<span class='danger'>The [P.name] sinks harmlessly in [H]'s sandy body!</span>", \
"<span class='userdanger'>The [P.name] sinks harmlessly in [H]'s sandy body!</span>")
return 2
return 0
return BULLET_ACT_BLOCK
return ..()
//Reflects lasers and resistant to burn damage, but very vulnerable to brute damage. Shatters on death.
/datum/species/golem/glass
@@ -397,8 +397,8 @@
var/turf/target = get_turf(P.starting)
// redirect the projectile
P.preparePixelProjectile(locate(CLAMP(target.x + new_x, 1, world.maxx), CLAMP(target.y + new_y, 1, world.maxy), H.z), H)
return -1
return 0
return BULLET_ACT_FORCE_PIERCE
return ..()
//Teleports when hit or when it wants to
/datum/species/golem/bluespace
@@ -60,8 +60,8 @@
if(light_amount < SHADOW_SPECIES_LIGHT_THRESHOLD)
H.visible_message("<span class='danger'>[H] dances in the shadows, evading [P]!</span>")
playsound(T, "bullet_miss", 75, 1)
return -1
return 0
return BULLET_ACT_FORCE_PIERCE
return ..()
/datum/species/shadow/nightmare/check_roundstart_eligible()
return FALSE
-1
View File
@@ -516,7 +516,6 @@ GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put
if(bufferedstam && world.time > stambufferregentime)
var/drainrate = max((bufferedstam*(bufferedstam/(5)))*0.1,1)
bufferedstam = max(bufferedstam - drainrate, 0)
adjustStaminaLoss(drainrate*0.5)
//END OF CIT CHANGES
var/restingpwr = 1 + 4 * resting
@@ -403,7 +403,7 @@
if((Proj.damage_type == BURN) || (Proj.damage_type == BRUTE))
if(!Proj.nodamage && Proj.damage < src.health && isliving(Proj.firer))
retaliate(Proj.firer)
..()
return ..()
/mob/living/carbon/monkey/hitby(atom/movable/AM, skipcatch = FALSE, hitpush = TRUE, blocked = FALSE)
if(istype(AM, /obj/item))
+2 -2
View File
@@ -110,7 +110,7 @@
/mob/living/proc/apply_effects(stun = 0, knockdown = 0, unconscious = 0, irradiate = 0, slur = 0, stutter = 0, eyeblur = 0, drowsy = 0, blocked = FALSE, stamina = 0, jitter = 0, kd_stamoverride, kd_stammax)
if(blocked >= 100)
return 0
return BULLET_ACT_BLOCK
if(stun)
apply_effect(stun, EFFECT_STUN, blocked)
if(knockdown)
@@ -131,7 +131,7 @@
apply_damage(stamina, STAMINA, null, blocked)
if(jitter)
apply_effect(jitter, EFFECT_JITTER, blocked)
return 1
return BULLET_ACT_HIT
/mob/living/proc/getBruteLoss()
+4 -4
View File
@@ -34,7 +34,7 @@
return FALSE
/mob/living/proc/on_hit(obj/item/projectile/P)
return
return BULLET_ACT_HIT
/mob/living/proc/check_shields(atom/AM, damage, attack_text = "the attack", attack_type = MELEE_ATTACK, armour_penetration = 0)
var/block_chance_modifier = round(damage / -3)
@@ -76,16 +76,16 @@
/mob/living/bullet_act(obj/item/projectile/P, def_zone)
if(P.original != src || P.firer != src) //try to block or reflect the bullet, can't do so when shooting oneself
if(reflect_bullet_check(P, def_zone))
return -1 // complete projectile permutation
return BULLET_ACT_FORCE_PIERCE // complete projectile permutation
if(check_shields(P, P.damage, "the [P.name]", PROJECTILE_ATTACK, P.armour_penetration))
P.on_hit(src, 100, def_zone)
return 2
return BULLET_ACT_BLOCK
var/armor = run_armor_check(def_zone, P.flag, null, null, P.armour_penetration, null)
if(!P.nodamage)
apply_damage(P.damage, P.damage_type, def_zone, armor)
if(P.dismemberment)
check_projectile_dismemberment(P, def_zone)
return P.on_hit(src, armor)
return P.on_hit(src, armor) ? BULLET_ACT_HIT : BULLET_ACT_BLOCK
/mob/living/proc/check_projectile_dismemberment(obj/item/projectile/P, def_zone)
return 0
@@ -2,6 +2,21 @@
. = ..()
update_turf_movespeed(loc)
/mob/living/CanPass(atom/movable/mover, turf/target)
if((mover.pass_flags & PASSMOB))
return TRUE
if(istype(mover, /obj/item/projectile))
var/obj/item/projectile/P = mover
return !P.can_hit_target(src, P.permutated, src == P.original, TRUE)
if(mover.throwing)
return (!density || lying)
if(buckled == mover)
return TRUE
if(ismob(mover))
if (mover in buckled_mobs)
return TRUE
return (!mover.density || !density || lying || (mover.throwing && mover.throwing.thrower == src && !ismob(mover)))
/mob/living/toggle_move_intent()
. = ..()
update_move_intent_slowdown()
@@ -42,9 +42,8 @@
/mob/living/silicon/ai/bullet_act(obj/item/projectile/Proj)
..(Proj)
. = ..()
updatehealth()
return 2
/mob/living/silicon/ai/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0)
return // no eyes, no flashing
@@ -55,7 +55,7 @@
if(P.stun)
fold_in(force = TRUE)
visible_message("<span class='warning'>The electrically-charged projectile disrupts [src]'s holomatrix, forcing [src] to fold in!</span>")
. = ..()
return ..()
/mob/living/silicon/pai/stripPanelUnequip(obj/item/what, mob/who, where) //prevents stripping
to_chat(src, "<span class='warning'>Your holochassis stutters and warps intensely as you attempt to interact with the object, forcing you to cease lest the field fail.</span>")
@@ -184,8 +184,7 @@
adjustBruteLoss(30)
/mob/living/silicon/robot/bullet_act(obj/item/projectile/P, def_zone)
..()
. = ..()
updatehealth()
if(prob(75) && P.damage > 0)
spark_system.start()
return 2
@@ -129,7 +129,7 @@
unbuckle_mob(M)
M.visible_message("<span class='boldwarning'>[M] is knocked off of [src] by the [P]!</span>")
P.on_hit(src)
return 2
return BULLET_ACT_HIT
/mob/living/silicon/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash/static)
if(affect_silicon)
@@ -114,7 +114,7 @@
return
apply_damage(Proj.damage, Proj.damage_type)
Proj.on_hit(src)
return 0
return BULLET_ACT_HIT
/mob/living/simple_animal/ex_act(severity, target, origin)
if(origin && istype(origin, /datum/spacevine_mutation) && isvineimmune(src))
@@ -21,7 +21,7 @@
/mob/living/simple_animal/bot/secbot/grievous/bullet_act(obj/item/projectile/P)
visible_message("[src] deflects [P] with its energy swords!")
playsound(src, 'sound/weapons/blade1.ogg', 50, TRUE)
return FALSE
return BULLET_ACT_BLOCK
/mob/living/simple_animal/bot/secbot/grievous/Crossed(atom/movable/AM)
..()
@@ -210,7 +210,7 @@ Auto Patrol[]"},
if((Proj.damage_type == BURN) || (Proj.damage_type == BRUTE))
if(!Proj.nodamage && Proj.damage < src.health && ishuman(Proj.firer))
retaliate(Proj.firer)
..()
return ..()
/mob/living/simple_animal/bot/ed209/handle_automated_action()
if(!..())
@@ -510,11 +510,9 @@ Auto Patrol[]"},
spawn(100)
disabled = 0
icon_state = "[lasercolor]ed2091"
return 1
else
..(Proj)
else
..(Proj)
return BULLET_ACT_HIT
return ..()
return ..()
/mob/living/simple_animal/bot/ed209/bluetag
lasercolor = "b"
@@ -139,7 +139,7 @@ Maintenance panel panel is [open ? "opened" : "closed"]"},
/mob/living/simple_animal/bot/honkbot/bullet_act(obj/item/projectile/Proj)
if((istype(Proj,/obj/item/projectile/beam)) || (istype(Proj,/obj/item/projectile/bullet) && (Proj.damage_type == BURN))||(Proj.damage_type == BRUTE) && (!Proj.nodamage && Proj.damage < health && ishuman(Proj.firer)))
retaliate(Proj.firer)
..()
return ..()
/mob/living/simple_animal/bot/honkbot/UnarmedAttack(atom/A)
if(!on)
@@ -152,7 +152,7 @@
/mob/living/simple_animal/bot/mulebot/bullet_act(obj/item/projectile/Proj)
. = ..()
if(. && !QDELETED(src)) //Got hit and not blown up yet.
if(. == BULLET_ACT_HIT && !QDELETED(src)) //Got hit and not blown up yet.)
if(prob(50) && !isnull(load))
unload(0)
if(prob(25))
@@ -205,7 +205,7 @@ Auto Patrol: []"},
if((Proj.damage_type == BURN) || (Proj.damage_type == BRUTE))
if(!Proj.nodamage && Proj.damage < src.health && ishuman(Proj.firer))
retaliate(Proj.firer)
..()
return ..()
/mob/living/simple_animal/bot/secbot/UnarmedAttack(atom/A)
@@ -167,9 +167,9 @@
new_angle_s -= 360
P.setAngle(new_angle_s)
return -1 // complete projectile permutation
return BULLET_ACT_FORCE_PIERCE // complete projectile permutation
return (..(P))
return ..()
@@ -117,7 +117,7 @@ Difficulty: Very Hard
var/random_y = rand(0, 72)
AT.pixel_y += random_y
..()
return ..()
/mob/living/simple_animal/hostile/megafauna/colossus/proc/enrage(mob/living/L)
if(ishuman(L))
@@ -395,7 +395,7 @@ Difficulty: Very Hard
..()
/obj/machinery/anomalous_crystal/bullet_act(obj/item/projectile/P, def_zone)
..()
. = ..()
if(istype(P, /obj/item/projectile/magic))
ActivationReaction(P.firer, ACTIVATE_MAGIC, P.damage_type)
return
@@ -98,7 +98,7 @@ IGNORE_PROC_IF_NOT_TARGET(attack_slime)
/mob/living/simple_animal/hostile/asteroid/curseblob/bullet_act(obj/item/projectile/Proj)
if(Proj.firer != set_target)
return
return BULLET_ACT_FORCE_PIERCE
return ..()
/mob/living/simple_animal/hostile/asteroid/curseblob/attacked_by(obj/item/I, mob/living/L)
@@ -75,7 +75,7 @@
/mob/living/simple_animal/hostile/asteroid/goldgrub/bullet_act(obj/item/projectile/P)
visible_message("<span class='danger'>The [P.name] was repelled by [name]'s girth!</span>")
return
return BULLET_ACT_BLOCK
/mob/living/simple_animal/hostile/asteroid/goldgrub/adjustHealth(amount, updating_health = TRUE, forced = FALSE)
vision_range = 9
@@ -43,7 +43,7 @@
if(P.damage < 30 && P.damage_type != BRUTE)
P.damage = (P.damage / 3)
visible_message("<span class='danger'>[P] has a reduced effect on [src]!</span>")
..()
return ..()
/mob/living/simple_animal/hostile/asteroid/hitby(atom/movable/AM)//No floor tiling them to death, wiseguy
if(istype(AM, /obj/item))
@@ -179,9 +179,10 @@
if(T.throwforce)
Bruise()
/mob/living/simple_animal/hostile/mushroom/bullet_act()
..()
Bruise()
/mob/living/simple_animal/hostile/mushroom/bullet_act(obj/item/projectile/P)
. = ..()
if(!P.nodamage)
Bruise()
/mob/living/simple_animal/hostile/mushroom/harvest()
var/counter
@@ -128,13 +128,10 @@
return ..()
/mob/living/simple_animal/hostile/syndicate/melee/bullet_act(obj/item/projectile/Proj)
if(!Proj)
return
if(prob(25))
return ..()
else
visible_message("<span class='danger'>[src] blocks [Proj] with its shield!</span>")
return 0
visible_message("<span class='danger'>[src] blocks [Proj] with its shield!</span>")
return BULLET_ACT_BLOCK
/mob/living/simple_animal/hostile/syndicate/melee/sword/space
icon_state = "syndicate_space_sword"
@@ -337,7 +337,7 @@
//Bullets
/mob/living/simple_animal/parrot/bullet_act(obj/item/projectile/Proj)
..()
. = ..()
if(!stat && !client)
if(parrot_state == PARROT_PERCH)
parrot_sleep_dur = parrot_sleep_max //Reset it's sleep timer if it was perched
@@ -347,7 +347,6 @@
//parrot_been_shot += 5
icon_state = icon_living
drop_held_item(0)
return
/*
@@ -220,15 +220,12 @@
return ..() //Heals them
/mob/living/simple_animal/slime/bullet_act(obj/item/projectile/Proj)
if(!Proj)
return
attacked += 10
if((Proj.damage_type == BURN))
adjustBruteLoss(-abs(Proj.damage)) //fire projectiles heals slimes.
Proj.on_hit(src)
else
..(Proj)
return 0
return BULLET_ACT_BLOCK
return ..()
/mob/living/simple_animal/slime/emp_act(severity)
. = ..()
+4
View File
@@ -508,6 +508,10 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0)
usr << browse(text("<HTML><HEAD><TITLE>[]</TITLE></HEAD><BODY><TT>[]</TT></BODY></HTML>", name, replacetext(flavor_text, "\n", "<BR>")), text("window=[];size=500x200", name))
onclose(usr, "[name]")
if(href_list["flavor2_more"])
usr << browse(text("<HTML><HEAD><TITLE>[]</TITLE></HEAD><BODY><TT>[]</TT></BODY></HTML>", name, replacetext(flavor_text_2, "\n", "<BR>")), text("window=[];size=500x200", name))
onclose(usr, "[name]")
if(href_list["flavor_change"])
update_flavor_text()
-12
View File
@@ -1,15 +1,3 @@
/mob/CanPass(atom/movable/mover, turf/target)
if((mover.pass_flags & PASSMOB))
return TRUE
if(istype(mover, /obj/item/projectile) || mover.throwing)
return (!density || lying)
if(buckled == mover)
return TRUE
if(ismob(mover))
if (mover in buckled_mobs)
return TRUE
return (!mover.density || !density || lying || (mover.throwing && mover.throwing.thrower == src && !ismob(mover)))
//DO NOT USE THIS UNLESS YOU ABSOLUTELY HAVE TO. THIS IS BEING PHASED OUT FOR THE MOVESPEED MODIFICATION SYSTEM.
//See mob_movespeed.dm
/mob/proc/movement_delay() //update /living/movement_delay() if you change this
+1 -1
View File
@@ -51,7 +51,7 @@
if(length(msg) <= 40)
return "<span class='notice'>[html_encode(msg)]</span>"
else
return "<span class='notice'>[html_encode(copytext(msg, 1, 37))]... <a href='?src=[REF(src)];flavor_more=1'>More...</span></a>"
return "<span class='notice'>[html_encode(copytext(msg, 1, 37))]... <a href='?src=[REF(src)];flavor2_more=1'>More...</span></a>"
/mob/proc/get_top_level_mob()
@@ -158,4 +158,5 @@
// "Brute" damage mostly damages the casing.
/obj/machinery/modular_computer/bullet_act(obj/item/projectile/Proj)
if(cpu)
cpu.bullet_act(Proj)
return cpu.bullet_act(Proj)
return ..()
+39 -15
View File
@@ -98,6 +98,7 @@
var/force_update = 0
var/emergency_lights = FALSE
var/nightshift_lights = FALSE
var/nightshift_requires_auth = FALSE
var/last_nightshift_switch = 0
var/update_state = -1
var/update_overlay = -1
@@ -239,6 +240,7 @@
update_icon()
make_terminal()
update_nightshift_auth_requirement()
addtimer(CALLBACK(src, .proc/update), 5)
@@ -852,6 +854,7 @@
/obj/machinery/power/apc/ui_data(mob/user)
var/list/data = list(
"locked" = locked && !(integration_cog && is_servant_of_ratvar(user)),
"lock_nightshift" = nightshift_requires_auth,
"failTime" = failure_timer,
"isOperating" = operating,
"externalPower" = main_status,
@@ -959,7 +962,18 @@
. = UI_INTERACTIVE
/obj/machinery/power/apc/ui_act(action, params)
if(..() || !can_use(usr, 1) || (locked && !usr.has_unlimited_silicon_privilege && !failure_timer && !(integration_cog && (is_servant_of_ratvar(usr)))))
if(..() || !can_use(usr, 1))
return
if(failure_timer)
if(action == "reboot")
failure_timer = 0
update_icon()
update()
var/authorized = (!locked || usr.has_unlimited_silicon_privilege || (integration_cog && (is_servant_of_ratvar(usr))))
if((action == "toggle_nightshift") && (!nightshift_requires_auth || authorized))
toggle_nightshift_lights()
return TRUE
if(!authorized)
return
switch(action)
if("lock")
@@ -969,22 +983,19 @@
else
locked = !locked
update_icon()
. = TRUE
return TRUE
if("cover")
coverlocked = !coverlocked
. = TRUE
return TRUE
if("breaker")
toggle_breaker()
. = TRUE
if("toggle_nightshift")
toggle_nightshift_lights()
. = TRUE
return TRUE
if("charge")
chargemode = !chargemode
if(!chargemode)
charging = APC_NOT_CHARGING
update_icon()
. = TRUE
return TRUE
if("channel")
if(params["eqp"])
equipment = setsubsystem(text2num(params["eqp"]))
@@ -998,24 +1009,23 @@
environ = setsubsystem(text2num(params["env"]))
update_icon()
update()
. = TRUE
return TRUE
if("overload")
if(usr.has_unlimited_silicon_privilege)
overload_lighting()
. = TRUE
return TRUE
if("hack")
if(get_malf_status(usr))
malfhack(usr)
return TRUE
if("occupy")
if(get_malf_status(usr))
malfoccupy(usr)
return TRUE
if("deoccupy")
if(get_malf_status(usr))
malfvacate()
if("reboot")
failure_timer = 0
update_icon()
update()
return TRUE
if("emergency_lighting")
emergency_lights = !emergency_lights
for(var/obj/machinery/light/L in area)
@@ -1023,7 +1033,7 @@
L.no_emergency = emergency_lights
INVOKE_ASYNC(L, /obj/machinery/light/.proc/update, FALSE)
CHECK_TICK
return 1
return TRUE
/obj/machinery/power/apc/proc/toggle_breaker()
if(!is_operational() || failure_timer)
@@ -1429,6 +1439,8 @@
/obj/machinery/power/apc/proc/set_nightshift(on)
set waitfor = FALSE
if(nightshift_lights == on)
return
nightshift_lights = on
for(var/obj/machinery/light/L in area)
if(L.nightshift_allowed)
@@ -1436,6 +1448,18 @@
L.update(FALSE)
CHECK_TICK
/obj/machinery/power/apc/proc/update_nightshift_auth_requirement()
nightshift_requires_auth = nightshift_toggle_requires_auth()
/obj/machinery/power/apc/proc/nightshift_toggle_requires_auth()
if(!area)
return FALSE
var/configured_level = CONFIG_GET(number/night_shift_public_areas_only)
var/our_level = area.nightshift_public_area
var/public_requires_auth = CONFIG_GET(flag/nightshift_toggle_public_requires_auth)
var/normal_requires_auth = CONFIG_GET(flag/nightshift_toggle_requires_auth)
return (configured_level && our_level && ((our_level <= configured_level)? public_requires_auth : normal_requires_auth))
#undef UPSTATE_CELL_IN
#undef UPSTATE_OPENED1
#undef UPSTATE_OPENED2
+9 -5
View File
@@ -79,13 +79,17 @@ By design, d1 is the smallest direction and d2 is the highest
color = "#ffffff"
// the power cable object
/obj/structure/cable/Initialize(mapload, param_color)
/obj/structure/cable/Initialize(mapload, param_color, _d1, _d2)
. = ..()
// ensure d1 & d2 reflect the icon_state for entering and exiting cable
var/dash = findtext(icon_state, "-")
d1 = text2num( copytext( icon_state, 1, dash ) )
d2 = text2num( copytext( icon_state, dash+1 ) )
if(isnull(_d1) || isnull(_d2))
// ensure d1 & d2 reflect the icon_state for entering and exiting cable
var/dash = findtext(icon_state, "-")
d1 = text2num( copytext( icon_state, 1, dash ) )
d2 = text2num( copytext( icon_state, dash+1 ) )
else
d1 = _d1
d2 = _d2
var/turf/T = get_turf(src) // hide if turf is not intact
if(level==1)
+1 -1
View File
@@ -74,7 +74,7 @@
addtimer(CALLBACK(GLOBAL_PROC, .proc/explosion, get_turf(src), 2, 3, 4, 8), 100) // Not a normal explosion.
/obj/machinery/power/rtg/abductor/bullet_act(obj/item/projectile/Proj)
..()
. = ..()
if(!going_kaboom && istype(Proj) && !Proj.nodamage && ((Proj.damage_type == BURN) || (Proj.damage_type == BRUTE)))
message_admins("[ADMIN_LOOKUPFLW(Proj.firer)] triggered an Abductor Core explosion at [AREACOORD(src)] via projectile.")
log_game("[key_name(Proj.firer)] triggered an Abductor Core explosion at [AREACOORD(src)] via projectile.")
@@ -113,7 +113,8 @@
/obj/singularity/bullet_act(obj/item/projectile/P)
return 0 //Will there be an impact? Who knows. Will we see it? No.
qdel(P)
return BULLET_ACT_HIT //Will there be an impact? Who knows. Will we see it? No.
/obj/singularity/Bump(atom/A)
@@ -521,7 +521,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
has_been_powered = TRUE
else if(takes_damage)
damage += Proj.damage * config_bullet_energy
return FALSE
return BULLET_ACT_HIT
/obj/machinery/power/supermatter_crystal/singularity_act()
var/gain = 100
-5
View File
@@ -37,7 +37,6 @@
var/burst_spread = 0 //Spread induced by the gun itself during burst fire per iteration. Only checked if spread is 0.
var/randomspread = 1 //Set to 0 for shotguns. This is used for weapons that don't fire all their bullets at once.
var/inaccuracy_modifier = 1
var/pb_knockback = 0
lefthand_file = 'icons/mob/inhands/weapons/guns_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/guns_righthand.dmi'
@@ -126,10 +125,6 @@
if(message)
if(pointblank)
user.visible_message("<span class='danger'>[user] fires [src] point blank at [pbtarget]!</span>", null, null, COMBAT_MESSAGE_RANGE)
if(pb_knockback > 0)
var/atom/throw_target = get_edge_target_turf(pbtarget, user.dir)
pbtarget.throw_at(throw_target, pb_knockback, 2)
else
user.visible_message("<span class='danger'>[user] fires [src]!</span>", null, null, COMBAT_MESSAGE_RANGE)
@@ -267,7 +267,6 @@
fire_delay = 0
pin = /obj/item/firing_pin/implant/pindicate
actions_types = list()
pb_knockback = 2
/obj/item/gun/ballistic/automatic/shotgun/bulldog/unrestricted
pin = /obj/item/firing_pin
@@ -273,7 +273,6 @@
"Maple" = "dshotgun-l",
"Rosewood" = "dshotgun-p"
)
pb_knockback = 3 // it's a super shotgun!
/obj/item/gun/ballistic/revolver/doublebarrel/attackby(obj/item/A, mob/user, params)
..()
@@ -12,8 +12,6 @@
var/recentpump = 0 // to prevent spammage
weapon_weight = WEAPON_MEDIUM
pb_knockback = 2
/obj/item/gun/ballistic/shotgun/attackby(obj/item/A, mob/user, params)
. = ..()
if(.)
@@ -56,7 +56,6 @@
item_flags = NONE
casing_ejector = FALSE
can_suppress = FALSE
pb_knockback = 0
/obj/item/gun/ballistic/shotgun/toy/process_chamber(empty_chamber = 0)
..()
@@ -569,4 +569,4 @@
/obj/item/projectile/beam/beam_rifle/hitscan/aiming_beam/on_hit()
qdel(src)
return FALSE
return BULLET_ACT_HIT
@@ -114,7 +114,7 @@
icon_state = "blastwave"
damage = 0
nodamage = FALSE
forcedodge = TRUE
movement_type = FLYING | UNSTOPPABLE
var/heavyr = 0
var/mediumr = 0
var/lightr = 0
+99 -58
View File
@@ -11,15 +11,16 @@
item_flags = ABSTRACT
pass_flags = PASSTABLE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
movement_type = FLYING
hitsound = 'sound/weapons/pierce.ogg'
var/hitsound_wall = ""
resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
var/def_zone = "" //Aiming at
var/atom/movable/firer = null//Who shot it
var/atom/fired_from = null // the atom that the projectile was fired from (gun, turret)
var/atom/fired_from = null // the atom that the projectile was fired from (gun, turret) var/suppressed = FALSE //Attack message
var/suppressed = FALSE //Attack message
var/candink = FALSE //Can this projectile play the dink sound when hitting the head?
var/candink = FALSE //Can this projectile play the dink sound when hitting the head? var/yo = null
var/yo = null
var/xo = null
var/atom/original = null // the original target clicked
@@ -84,7 +85,8 @@
var/flag = "bullet" //Defines what armor to use when it hits things. Must be set to bullet, laser, energy,or bomb
var/projectile_type = /obj/item/projectile
var/range = 50 //This will de-increment every step. When 0, it will deletze the projectile.
var/decayedRange
var/decayedRange //stores original range
var/reflect_range_decrease = 5 //amount of original range that falls off when reflecting, so it doesn't go forever
var/is_reflectable = FALSE // Can it be reflected or not?
//Effects
var/stun = 0
@@ -99,11 +101,12 @@
var/drowsy = 0
var/stamina = 0
var/jitter = 0
var/forcedodge = 0 //to pass through everything
var/dismemberment = 0 //The higher the number, the greater the bonus to dismembering. 0 will not dismember at all.
var/impact_effect_type //what type of impact effect to show when hitting something
var/log_override = FALSE //is this type spammed enough to not log? (KAs)
var/temporary_unstoppable_movement = FALSE
/obj/item/projectile/Initialize()
. = ..()
permutated = list()
@@ -152,12 +155,12 @@
W.add_dent(WALL_DENT_SHOT, hitx, hity)
return 0
return BULLET_ACT_HIT
if(!isliving(target))
if(impact_effect_type && !hitscan)
new impact_effect_type(target_loca, hitx, hity)
return 0
return BULLET_ACT_HIT
var/mob/living/L = target
@@ -185,7 +188,6 @@
C.bleed(damage)
else
L.add_splatter_floor(target_loca)
else if(impact_effect_type && !hitscan)
new impact_effect_type(target_loca, hitx, hity)
@@ -235,24 +237,20 @@
beam_segments[beam_index] = null
/obj/item/projectile/Bump(atom/A)
var/turf/T = get_turf(A)
if(trajectory && check_ricochet(A) && check_ricochet_flag(A) && ricochets < ricochets_max)
var/datum/point/pcache = trajectory.copy_to()
ricochets++
if(A.handle_ricochet(src))
on_ricochet(A)
ignore_source_check = TRUE
range = initial(range)
decayedRange = max(0, decayedRange - reflect_range_decrease)
range = decayedRange
if(hitscan)
store_hitscan_collision(pcache)
return TRUE
if(firer && !ignore_source_check)
if(A == firer || (A == firer.loc && ismecha(A))) //cannot shoot yourself or your mech
trajectory_ignore_forcemove = TRUE
forceMove(get_turf(A))
trajectory_ignore_forcemove = FALSE
return FALSE
var/distance = get_dist(get_turf(A), starting) // Get the distance between the turf shot from and the mob we hit and use that for the calculations.
var/distance = get_dist(T, starting) // Get the distance between the turf shot from and the mob we hit and use that for the calculations.
def_zone = ran_zone(def_zone, max(100-(7*distance), 5)) //Lower accurancy/longer range tradeoff. 7 is a balanced number to use.
if(isturf(A) && hitsound_wall)
@@ -261,51 +259,66 @@
volume = 5
playsound(loc, hitsound_wall, volume, 1, -1)
var/turf/target_turf = get_turf(A)
return process_hit(T, select_target(T, A))
if(!prehit(A))
if(forcedodge)
trajectory_ignore_forcemove = TRUE
forceMove(target_turf)
trajectory_ignore_forcemove = FALSE
return FALSE
#define QDEL_SELF 1 //Delete if we're not UNSTOPPABLE flagged non-temporarily
#define DO_NOT_QDEL 2 //Pass through.
#define FORCE_QDEL 3 //Force deletion.
var/permutation = A.bullet_act(src, def_zone) // searches for return value, could be deleted after run so check A isn't null
if(permutation == -1 || forcedodge)// the bullet passes through a dense object!
trajectory_ignore_forcemove = TRUE
forceMove(target_turf)
trajectory_ignore_forcemove = FALSE
if(A)
permutated.Add(A)
return FALSE
else
var/atom/alt = select_target(A)
if(alt)
if(!prehit(alt))
return FALSE
alt.bullet_act(src, def_zone)
qdel(src)
return TRUE
/obj/item/projectile/proc/process_hit(turf/T, atom/target, qdel_self, hit_something = FALSE) //probably needs to be reworked entirely when pixel movement is done.
if(QDELETED(src) || !T || !target) //We're done, nothing's left.
if((qdel_self == FORCE_QDEL) || ((qdel_self == QDEL_SELF) && !temporary_unstoppable_movement && !CHECK_BITFIELD(movement_type, UNSTOPPABLE)))
qdel(src)
return hit_something
permutated |= target //Make sure we're never hitting it again. If we ever run into weirdness with piercing projectiles needing to hit something multiple times.. well.. that's a to-do.
if(!prehit(target))
return process_hit(T, select_target(T), qdel_self, hit_something) //Hit whatever else we can since that didn't work.
var/result = target.bullet_act(src, def_zone)
if(result == BULLET_ACT_FORCE_PIERCE)
if(!CHECK_BITFIELD(movement_type, UNSTOPPABLE))
temporary_unstoppable_movement = TRUE
ENABLE_BITFIELD(movement_type, UNSTOPPABLE)
return process_hit(T, select_target(T), qdel_self, TRUE) //Hit whatever else we can since we're piercing through but we're still on the same tile.
else if(result == BULLET_ACT_TURF) //We hit the turf but instead we're going to also hit something else on it.
return process_hit(T, select_target(T), QDEL_SELF, TRUE)
else //Whether it hit or blocked, we're done!
qdel_self = QDEL_SELF
hit_something = TRUE
if((qdel_self == FORCE_QDEL) || ((qdel_self == QDEL_SELF) && !temporary_unstoppable_movement && !CHECK_BITFIELD(movement_type, UNSTOPPABLE)))
qdel(src)
return hit_something
/obj/item/projectile/proc/select_target(atom/A) //Selects another target from a wall if we hit a wall.
if(!A || !A.density || (A.flags_1 & ON_BORDER_1) || ismob(A) || A == original) //if we hit a dense non-border obj or dense turf then we also hit one of the mobs or machines/structures on that tile.
return
var/turf/T = get_turf(A)
if(original in T)
#undef QDEL_SELF
#undef DO_NOT_QDEL
#undef FORCE_QDEL
/obj/item/projectile/proc/select_target(turf/T, atom/target) //Select a target from a turf.
if((original in T) && can_hit_target(original, permutated, TRUE, TRUE))
return original
var/list/mob/possible_mobs = typecache_filter_list(T, GLOB.typecache_mob) - A
if(target && can_hit_target(target, permutated, target == original, TRUE))
return target
var/list/mob/living/possible_mobs = typecache_filter_list(T, GLOB.typecache_mob)
var/list/mob/mobs = list()
for(var/i in possible_mobs)
var/mob/M = i
if(M.lying)
for(var/mob/living/M in possible_mobs)
if(!can_hit_target(M, permutated, M == original, TRUE))
continue
mobs += M
var/mob/M = safepick(mobs)
if(M)
return M.lowest_buckled_mob()
var/obj/O = safepick(typecache_filter_list(T, GLOB.typecache_machine_or_structure) - A)
var/list/obj/possible_objs = typecache_filter_list(T, GLOB.typecache_machine_or_structure)
var/list/obj/objs = list()
for(var/obj/O in possible_objs)
if(!can_hit_target(O, permutated, O == original, TRUE))
continue
objs += O
var/obj/O = safepick(objs)
if(O)
return O
//Nothing else is here that we can hit, hit the turf if we haven't.
if(!(T in permutated) && can_hit_target(T, permutated, T == original, TRUE))
return T
//Returns null if nothing at all was found.
/obj/item/projectile/proc/check_ricochet()
if(prob(ricochet_chance))
@@ -332,7 +345,7 @@
var/turf/ending = return_predicted_turf_after_moves(moves, forced_angle)
return getline(current, ending)
/obj/item/projectile/Process_Spacemove(var/movement_dir = 0)
/obj/item/projectile/Process_Spacemove(movement_dir = 0)
return TRUE //Bullets don't drift in space
/obj/item/projectile/process()
@@ -360,8 +373,7 @@
/obj/item/projectile/proc/fire(angle, atom/direct_target)
if(fired_from)
SEND_SIGNAL(fired_from, COMSIG_PROJECTILE_BEFORE_FIRE, src, original)
//If no angle needs to resolve it from xo/yo!
SEND_SIGNAL(fired_from, COMSIG_PROJECTILE_BEFORE_FIRE, src, original) //If no angle needs to resolve it from xo/yo!
if(!log_override && firer && original)
log_combat(firer, original, "fired at", src, "from [get_area_name(src, TRUE)]")
if(direct_target)
@@ -498,8 +510,6 @@
else if(T != loc)
step_towards(src, T)
hitscan_last = loc
if(can_hit_target(original, permutated))
Bump(original)
if(!hitscanning && !forcemoved)
pixel_x = trajectory.return_px() - trajectory.mpx * trajectory_multiplier * SSprojectiles.global_iterations_per_move
pixel_y = trajectory.return_py() - trajectory.mpy * trajectory_multiplier * SSprojectiles.global_iterations_per_move
@@ -528,8 +538,28 @@
homing_offset_y = -homing_offset_y
//Returns true if the target atom is on our current turf and above the right layer
/obj/item/projectile/proc/can_hit_target(atom/target, var/list/passthrough)
return (target && ((target.layer >= PROJECTILE_HIT_THRESHHOLD_LAYER) || ismob(target)) && (loc == get_turf(target)) && (!(target in passthrough)))
//If direct target is true it's the originally clicked target.
/obj/item/projectile/proc/can_hit_target(atom/target, list/passthrough, direct_target = FALSE, ignore_loc = FALSE)
if(QDELETED(target))
return FALSE
if(!ignore_source_check && firer)
var/mob/M = firer
if((target == firer) || ((target == firer.loc) && ismecha(firer.loc)) || (target in firer.buckled_mobs) || (istype(M) && (M.buckled == target)))
return FALSE
if(!ignore_loc && (loc != target.loc))
return FALSE
if(target in passthrough)
return FALSE
if(target.density) //This thing blocks projectiles, hit it regardless of layer/mob stuns/etc.
return TRUE
if(!isliving(target))
if(target.layer < PROJECTILE_HIT_THRESHHOLD_LAYER)
return FALSE
else
var/mob/living/L = target
if(!direct_target && !L.density)
return FALSE
return TRUE
//Spread is FORCED!
/obj/item/projectile/proc/preparePixelProjectile(atom/target, atom/source, params, spread = 0)
@@ -591,9 +621,20 @@
return list(angle, p_x, p_y)
/obj/item/projectile/Crossed(atom/movable/AM) //A mob moving on a tile with a projectile is hit by it.
..()
if(isliving(AM) && (AM.density || AM == original) && !(src.pass_flags & PASSMOB))
Bump(AM)
. = ..()
if(isliving(AM) && !(pass_flags & PASSMOB))
var/mob/living/L = AM
if(can_hit_target(L, permutated, (AM == original)))
Bump(AM)
/obj/item/projectile/Move(atom/newloc, dir = NONE)
. = ..()
if(.)
if(temporary_unstoppable_movement)
temporary_unstoppable_movement = FALSE
DISABLE_BITFIELD(movement_type, UNSTOPPABLE)
if(fired && can_hit_target(original, permutated, TRUE))
Bump(original)
/obj/item/projectile/Destroy()
if(hitscan)
+3 -3
View File
@@ -107,8 +107,8 @@
/obj/item/projectile/beam/pulse/heavy/on_hit(atom/target, blocked = FALSE)
life -= 10
if(life > 0)
. = -1
..()
. = BULLET_ACT_FORCE_PIERCE
return ..()
/obj/item/projectile/beam/emitter
name = "emitter beam"
@@ -207,4 +207,4 @@
. = ..()
if(isopenturf(target) || istype(target, /turf/closed/indestructible))//shrunk floors wouldnt do anything except look weird, i-walls shouldnt be bypassable
return
target.AddComponent(/datum/component/shrink, shrink_time)
target.AddComponent(/datum/component/shrink, shrink_time)
@@ -15,7 +15,7 @@
if(M.can_inject(null, FALSE, def_zone, piercing)) // Pass the hit zone to see if it can inject by whether it hit the head or the body.
..()
if(skip == TRUE)
return
return BULLET_ACT_HIT
reagents.reaction(M, INJECT)
reagents.trans_to(M, reagents.total_volume)
return TRUE
@@ -27,7 +27,7 @@
..(target, blocked)
DISABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
reagents.handle_reactions()
return TRUE
return BULLET_ACT_HIT
/obj/item/projectile/bullet/dart/metalfoam/Initialize()
. = ..()
@@ -70,11 +70,11 @@
target.visible_message("<span class='notice'>\The [src] beeps!</span>")
to_chat("<span class='notice'><i>You feel a tiny prick as a smartdart embeds itself in you with a beep.</i></span>")
return TRUE
return BULLET_ACT_HIT
else
blocked = 100
target.visible_message("<span class='danger'>\The [src] was deflected!</span>", \
"<span class='userdanger'>You see a [src] bounce off you, booping sadly!</span>")
target.visible_message("<span class='danger'>\The [src] fails to land on target!</span>")
return TRUE
return BULLET_ACT_BLOCK
@@ -12,7 +12,7 @@
if(M.can_inject(null, FALSE, def_zone, FALSE))
if(injector.inject(M, firer))
QDEL_NULL(injector)
return TRUE
return BULLET_ACT_HIT
else
blocked = 100
target.visible_message("<span class='danger'>\The [src] was deflected!</span>", \
@@ -9,4 +9,4 @@
/obj/item/projectile/bullet/a40mm/on_hit(atom/target, blocked = FALSE)
..()
explosion(target, -1, 0, 2, 1, 0, flame_range = 3)
return TRUE
return BULLET_ACT_HIT
@@ -53,7 +53,7 @@
/obj/item/projectile/bullet/shotgun_frag12/on_hit(atom/target, blocked = FALSE)
..()
explosion(target, -1, 0, 1)
return TRUE
return BULLET_ACT_HIT
/obj/item/projectile/bullet/pellet
var/tile_dropoff = 0.75
@@ -34,7 +34,7 @@
icon_state = "gauss"
name = "penetrator round"
damage = 60
forcedodge = TRUE
movement_type = FLYING | UNSTOPPABLE
dismemberment = 0 //It goes through you cleanly.
knockdown = 0
breakthings = FALSE
@@ -3,7 +3,7 @@
/obj/item/projectile/bullet/honker
damage = 0
knockdown = 60
forcedodge = TRUE
movement_type = FLYING | UNSTOPPABLE
nodamage = TRUE
candink = FALSE
hitsound = 'sound/items/bikehorn.ogg'
@@ -15,7 +15,7 @@
var/turf/Tloc = get_turf(target)
if(!locate(/obj/effect/nettingportal) in Tloc)
new /obj/effect/nettingportal(Tloc)
..()
return ..()
/obj/item/projectile/energy/net/on_range()
do_sparks(1, TRUE, src)
@@ -69,7 +69,7 @@
else if(iscarbon(target))
var/obj/item/restraints/legcuffs/beartrap/B = new /obj/item/restraints/legcuffs/beartrap/energy(get_turf(target))
B.Crossed(target)
..()
return ..()
/obj/item/projectile/energy/trap/on_range()
new /obj/item/restraints/legcuffs/beartrap/energy(loc)
@@ -91,7 +91,7 @@
var/obj/item/restraints/legcuffs/beartrap/B = new /obj/item/restraints/legcuffs/beartrap/energy/cyborg(get_turf(target))
B.Crossed(target)
QDEL_IN(src, 10)
..()
return ..()
/obj/item/projectile/energy/trap/cyborg/on_range()
do_sparks(1, TRUE, src)
+15 -14
View File
@@ -17,7 +17,7 @@
var/mob/M = target
if(M.anti_magic_check())
M.visible_message("<span class='warning'>[src] vanishes on contact with [target]!</span>")
return
return BULLET_ACT_BLOCK
M.death(0)
/obj/item/projectile/magic/resurrection
@@ -31,10 +31,10 @@
. = ..()
if(isliving(target))
if(target.hellbound)
return
return BULLET_ACT_BLOCK
if(target.anti_magic_check())
target.visible_message("<span class='warning'>[src] vanishes on contact with [target]!</span>")
return
return BULLET_ACT_BLOCK
if(iscarbon(target))
var/mob/living/carbon/C = target
C.regenerate_limbs()
@@ -60,7 +60,7 @@
var/mob/M = target
if(M.anti_magic_check())
M.visible_message("<span class='warning'>[src] fizzles on contact with [target]!</span>")
return
return BULLET_ACT_BLOCK
var/teleammount = 0
var/teleloc = target
if(!isturf(target))
@@ -116,7 +116,7 @@
if(M.anti_magic_check())
M.visible_message("<span class='warning'>[src] fizzles on contact with [M]!</span>")
qdel(src)
return
return BULLET_ACT_BLOCK
wabbajack(change)
qdel(src)
@@ -264,7 +264,7 @@
/obj/item/projectile/magic/animate/on_hit(atom/target, blocked = FALSE)
target.animate_atom_living(firer)
..()
. = ..()
/atom/proc/animate_atom_living(var/mob/living/owner = null)
if((isitem(src) || isstructure(src)) && !is_type_in_list(src, GLOB.protected_objects))
@@ -315,7 +315,7 @@
if(M.anti_magic_check())
M.visible_message("<span class='warning'>[src] vanishes on contact with [target]!</span>")
qdel(src)
return
return BULLET_ACT_BLOCK
. = ..()
/obj/item/projectile/magic/arcane_barrage
@@ -334,7 +334,7 @@
if(M.anti_magic_check())
M.visible_message("<span class='warning'>[src] vanishes on contact with [target]!</span>")
qdel(src)
return
return BULLET_ACT_BLOCK
. = ..()
@@ -460,7 +460,7 @@
if(M.anti_magic_check())
visible_message("<span class='warning'>[src] fizzles on contact with [target]!</span>")
qdel(src)
return
return BULLET_ACT_BLOCK
tesla_zap(src, tesla_range, tesla_power, tesla_flags)
qdel(src)
@@ -487,7 +487,7 @@
var/mob/living/M = target
if(M.anti_magic_check())
visible_message("<span class='warning'>[src] vanishes into smoke on contact with [target]!</span>")
return
return BULLET_ACT_BLOCK
M.take_overall_damage(0,10) //between this 10 burn, the 10 brute, the explosion brute, and the onfire burn, your at about 65 damage if you stop drop and roll immediately
var/turf/T = get_turf(target)
explosion(T, -1, exp_heavy, exp_light, exp_flash, 0, flame_range = exp_fire)
@@ -504,7 +504,7 @@
if(ismob(target))
var/mob/living/M = target
if(M.anti_magic_check())
return
return BULLET_ACT_BLOCK
var/turf/T = get_turf(target)
for(var/i=0, i<50, i+=10)
addtimer(CALLBACK(GLOBAL_PROC, .proc/explosion, T, -1, exp_heavy, exp_light, exp_flash, FALSE, FALSE, exp_fire), i)
@@ -518,11 +518,11 @@
/obj/item/projectile/magic/nuclear/on_hit(target)
if(used)
return
return BULLET_ACT_HIT
new/obj/effect/temp_visual/slugboom(get_turf(src))
if(ismob(target))
if(target == victim)
return
return BULLET_ACT_FORCE_PIERCE
used = 1
visible_message("<span class='danger'>[victim] slams into [target] with explosive force!</span>")
explosion(src, 2, 3, 4, -1, TRUE, FALSE, 5)
@@ -531,8 +531,9 @@
victim.take_overall_damage(30,30)
victim.Knockdown(60)
explosion(src, -1, -1, -1, -1, FALSE, FALSE, 5)
return BULLET_ACT_HIT
/obj/item/projectile/magic/nuclear/Destroy()
for(var/atom/movable/AM in contents)
AM.forceMove(get_turf(src))
. = ..()
. = ..()
@@ -12,7 +12,7 @@
knockdown = 20
speed = 2
range = 16
forcedodge = TRUE
movement_type = FLYING | UNSTOPPABLE
var/datum/beam/arm
var/handedness = 0
@@ -28,7 +28,7 @@
/obj/item/projectile/curse_hand/prehit(atom/target)
if(target == original)
forcedodge = FALSE
DISABLE_BITFIELD(movement_type, UNSTOPPABLE)
else if(!isturf(target))
return FALSE
return ..()
@@ -37,7 +37,7 @@
if(arm)
arm.End()
arm = null
if(forcedodge)
if(CHECK_BITFIELD(movement_type, UNSTOPPABLE))
playsound(src, 'sound/effects/curse3.ogg', 25, 1, -1)
var/turf/T = get_step(src, dir)
new/obj/effect/temp_visual/dir_setting/curse/hand(T, dir, handedness)
@@ -6,15 +6,12 @@
nodamage = 1
flag = "energy"
impact_effect_type = /obj/effect/temp_visual/impact_effect/ion
var/emp_radius = 1
/obj/item/projectile/ion/on_hit(atom/target, blocked = FALSE)
..()
empulse(target, 1, 1)
return TRUE
empulse(target, emp_radius, emp_radius)
return BULLET_ACT_HIT
/obj/item/projectile/ion/weak
/obj/item/projectile/ion/weak/on_hit(atom/target, blocked = FALSE)
..()
empulse(target, 0, 0)
return TRUE
emp_radius = 0
@@ -29,7 +29,7 @@
mine_range--
range++
if(range > 0)
return -1
return BULLET_ACT_FORCE_PIERCE
/obj/item/projectile/plasma/adv
damage = 28
@@ -6,7 +6,7 @@
/obj/item/projectile/bullet/gyro/on_hit(atom/target, blocked = FALSE)
..()
explosion(target, -1, 0, 2)
return TRUE
return BULLET_ACT_HIT
/obj/item/projectile/bullet/a84mm
name ="\improper HEDP rocket"
@@ -28,7 +28,7 @@
if(issilicon(target))
var/mob/living/silicon/S = target
S.take_overall_damage(anti_armour_damage*0.75, anti_armour_damage*0.25)
return TRUE
return BULLET_ACT_HIT
/obj/item/projectile/bullet/a84mm_he
name ="\improper HE missile"
@@ -43,4 +43,4 @@
explosion(target, 0, 1, 2, 4)
else
explosion(target, 0, 0, 2, 4)
return TRUE
return BULLET_ACT_HIT

Some files were not shown because too many files have changed in this diff Show More