Merge branch 'master' into upstream-merge-32311
This commit is contained in:
@@ -78,7 +78,6 @@ GLOBAL_LIST_EMPTY(active_alternate_appearances)
|
||||
QDEL_NULL(ghost_appearance)
|
||||
|
||||
/datum/atom_hud/alternate_appearance/basic/add_to_hud(atom/A)
|
||||
LAZYINITLIST(A.hud_list)
|
||||
A.hud_list[appearance_key] = theImage
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
var/list/firealarms
|
||||
var/firedoors_last_closed_on = 0
|
||||
var/xenobiology_compatible = FALSE //Can the Xenobio management console transverse this area by default?
|
||||
var/list/canSmoothWithAreas //typecache to limit the areas that atoms in this area can smooth with
|
||||
|
||||
/*Adding a wizard area teleport list because motherfucking lag -- Urist*/
|
||||
/*I am far too lazy to make it a proper list of areas so I'll just make it run the usual telepot routine at the start of the game*/
|
||||
@@ -105,6 +106,7 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
uid = ++global_uid
|
||||
related = list(src)
|
||||
map_name = name // Save the initial (the name set in the map) name of the area.
|
||||
canSmoothWithAreas = typecacheof(canSmoothWithAreas)
|
||||
|
||||
if(requires_power)
|
||||
luminosity = 0
|
||||
|
||||
@@ -11,6 +11,11 @@
|
||||
valid_territory = FALSE
|
||||
icon_state = "shuttle"
|
||||
|
||||
/area/shuttle/Initialize()
|
||||
if(!canSmoothWithAreas)
|
||||
canSmoothWithAreas = type
|
||||
. = ..()
|
||||
|
||||
////////////////////////////Multi-area shuttles////////////////////////////
|
||||
|
||||
////////////////////////////Syndicate infiltrator////////////////////////////
|
||||
@@ -19,6 +24,7 @@
|
||||
name = "Syndicate Infiltrator"
|
||||
blob_allowed = FALSE
|
||||
ambientsounds = HIGHSEC
|
||||
canSmoothWithAreas = /area/shuttle/syndicate
|
||||
|
||||
/area/shuttle/syndicate/bridge
|
||||
name = "Syndicate Infiltrator Control"
|
||||
@@ -37,6 +43,18 @@
|
||||
/area/shuttle/syndicate/airlock
|
||||
name = "Syndicate Infiltrator Airlock"
|
||||
|
||||
////////////////////////////Pirate Shuttle////////////////////////////
|
||||
|
||||
/area/shuttle/pirate
|
||||
name = "Pirate Shuttle"
|
||||
blob_allowed = FALSE
|
||||
requires_power = TRUE
|
||||
canSmoothWithAreas = /area/shuttle/pirate
|
||||
|
||||
/area/shuttle/pirate/vault
|
||||
name = "Pirate Shuttle Vault"
|
||||
requires_power = FALSE
|
||||
|
||||
////////////////////////////Single-area shuttles////////////////////////////
|
||||
|
||||
/area/shuttle/transit
|
||||
@@ -76,6 +94,9 @@
|
||||
/area/shuttle/escape
|
||||
name = "Emergency Shuttle"
|
||||
|
||||
/area/shuttle/escape/backup
|
||||
name = "Backup Emergency Shuttle"
|
||||
|
||||
/area/shuttle/escape/luxury
|
||||
name = "Luxurious Emergency Shuttle"
|
||||
noteleport = TRUE
|
||||
@@ -111,12 +132,3 @@
|
||||
/area/shuttle/syndicate_scout
|
||||
name = "Syndicate Scout"
|
||||
blob_allowed = FALSE
|
||||
|
||||
/area/shuttle/pirate
|
||||
name = "Pirate Shuttle"
|
||||
blob_allowed = FALSE
|
||||
requires_power = TRUE
|
||||
|
||||
/area/shuttle/pirate/vault
|
||||
name = "Pirate Shuttle Vault"
|
||||
requires_power = FALSE
|
||||
@@ -132,12 +132,44 @@
|
||||
if (orbiting)
|
||||
orbiting.Check()
|
||||
|
||||
if(flags_1 & CLEAN_ON_MOVE_1)
|
||||
clean_on_move()
|
||||
|
||||
var/datum/proximity_monitor/proximity_monitor = src.proximity_monitor
|
||||
if(proximity_monitor)
|
||||
proximity_monitor.HandleMove()
|
||||
|
||||
return 1
|
||||
|
||||
/atom/movable/proc/clean_on_move()
|
||||
var/turf/tile = loc
|
||||
if(isturf(tile))
|
||||
tile.clean_blood()
|
||||
for(var/A in tile)
|
||||
if(is_cleanable(A))
|
||||
qdel(A)
|
||||
else if(istype(A, /obj/item))
|
||||
var/obj/item/cleaned_item = A
|
||||
cleaned_item.clean_blood()
|
||||
else if(ishuman(A))
|
||||
var/mob/living/carbon/human/cleaned_human = A
|
||||
if(cleaned_human.lying)
|
||||
if(cleaned_human.head)
|
||||
cleaned_human.head.clean_blood()
|
||||
cleaned_human.update_inv_head()
|
||||
if(cleaned_human.wear_suit)
|
||||
cleaned_human.wear_suit.clean_blood()
|
||||
cleaned_human.update_inv_wear_suit()
|
||||
else if(cleaned_human.w_uniform)
|
||||
cleaned_human.w_uniform.clean_blood()
|
||||
cleaned_human.update_inv_w_uniform()
|
||||
if(cleaned_human.shoes)
|
||||
cleaned_human.shoes.clean_blood()
|
||||
cleaned_human.update_inv_shoes()
|
||||
cleaned_human.clean_blood()
|
||||
cleaned_human.wash_cream()
|
||||
to_chat(cleaned_human, "<span class='danger'>[src] cleans your face!</span>")
|
||||
|
||||
/atom/movable/Destroy(force)
|
||||
var/inform_admins = (flags_2 & INFORM_ADMINS_ON_RELOCATE_2)
|
||||
var/stationloving = (flags_2 & STATIONLOVING_2)
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
/obj/effect/proc_holder/changeling/sting/transformation/can_sting(mob/user, mob/living/carbon/target)
|
||||
if(!..())
|
||||
return
|
||||
if((target.has_disability(HUSK)) || !iscarbon(target) || (NOTRANSSTING in target.dna.species.species_traits))
|
||||
if((target.has_disability(DISABILITY_HUSK)) || !iscarbon(target) || (NOTRANSSTING in target.dna.species.species_traits))
|
||||
to_chat(user, "<span class='warning'>Our sting appears ineffective against its DNA.</span>")
|
||||
return 0
|
||||
return 1
|
||||
@@ -131,7 +131,7 @@
|
||||
return
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
if((L.has_disability(HUSK)) || !L.has_dna())
|
||||
if((L.has_disability(DISABILITY_HUSK)) || !L.has_dna())
|
||||
to_chat(user, "<span class='warning'>Our sting appears ineffective against its DNA.</span>")
|
||||
return 0
|
||||
return 1
|
||||
@@ -209,7 +209,7 @@
|
||||
/obj/effect/proc_holder/changeling/sting/blind/sting_action(mob/user, mob/living/carbon/target)
|
||||
add_logs(user, target, "stung", "blind sting")
|
||||
to_chat(target, "<span class='danger'>Your eyes burn horrifically!</span>")
|
||||
target.become_nearsighted(EYE_DAMAGE)
|
||||
target.become_nearsighted()
|
||||
target.blind_eyes(20)
|
||||
target.blur_eyes(40)
|
||||
return TRUE
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
/obj/effect/clockwork/servant_blocker/CanPass(atom/movable/M, turf/target)
|
||||
var/list/target_contents = M.GetAllContents() + M
|
||||
for(var/mob/living/L in target_contents)
|
||||
if(is_servant_of_ratvar(L) && get_dir(M, src) != dir) //Unless we're on the side the arrow is pointing directly away from, no-go
|
||||
if(is_servant_of_ratvar(L) && get_dir(M, src) != dir && L.stat != DEAD) //Unless we're on the side the arrow is pointing directly away from, no-go
|
||||
to_chat(L, "<span class='danger'>The space beyond here can't be accessed by you or other servants.</span>")
|
||||
return
|
||||
return TRUE
|
||||
|
||||
@@ -83,7 +83,6 @@
|
||||
construct_type = /mob/living/simple_animal/drone/cogscarab
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
var/infinite_resources = TRUE
|
||||
var/static/obj/item/seasonal_hat //Share it with all other scarabs, since we're from the same cult!
|
||||
|
||||
/obj/item/clockwork/construct_chassis/cogscarab/Initialize()
|
||||
. = ..()
|
||||
@@ -94,12 +93,6 @@
|
||||
if(infinite_resources)
|
||||
//During rounds where they can't interact with the station, let them experiment with builds
|
||||
construct_type = /mob/living/simple_animal/drone/cogscarab/ratvar
|
||||
if(!seasonal_hat)
|
||||
var/obj/item/drone_shell/D = locate() in GLOB.poi_list
|
||||
if(D && D.possible_seasonal_hats.len)
|
||||
seasonal_hat = pick(D.possible_seasonal_hats)
|
||||
else
|
||||
seasonal_hat = "none"
|
||||
|
||||
/obj/item/clockwork/construct_chassis/cogscarab/post_spawn(mob/living/construct)
|
||||
if(infinite_resources) //Allow them to build stuff and recite scripture
|
||||
@@ -108,6 +101,3 @@
|
||||
F.uses_power = FALSE
|
||||
for(var/obj/item/clockwork/slab/S in cached_stuff)
|
||||
S.no_cost = TRUE
|
||||
if(seasonal_hat && seasonal_hat != "none")
|
||||
var/obj/item/hat = new seasonal_hat(construct)
|
||||
construct.equip_to_slot_or_del(hat, slot_head)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
if(ishuman(loc))
|
||||
var/mob/living/carbon/human/H = loc
|
||||
if(src == H.glasses && !up)
|
||||
if(H.has_disability(BLIND))
|
||||
if(H.has_disability(DISABILITY_BLIND))
|
||||
to_chat(H, "<span class='heavy_brass'>\"You're blind, idiot. Stop embarrassing yourself.\"</span>")
|
||||
return
|
||||
if(blind_cultist(H))
|
||||
@@ -51,7 +51,7 @@
|
||||
to_chat(victim, "<span class='heavy_brass'>\"It looks like Nar-Sie's dogs really don't value their eyes.\"</span>")
|
||||
to_chat(victim, "<span class='userdanger'>Your eyes explode with horrific pain!</span>")
|
||||
victim.emote("scream")
|
||||
victim.become_blind(EYE_DAMAGE)
|
||||
victim.become_blind()
|
||||
victim.adjust_blurriness(30)
|
||||
victim.adjust_blindness(30)
|
||||
return TRUE
|
||||
@@ -76,7 +76,7 @@
|
||||
..()
|
||||
if(slot != slot_glasses || up)
|
||||
return
|
||||
if(user.has_disability(BLIND))
|
||||
if(user.has_disability(DISABILITY_BLIND))
|
||||
to_chat(user, "<span class='heavy_brass'>\"You're blind, idiot. Stop embarrassing yourself.\"</span>" )
|
||||
return
|
||||
if(blind_cultist(user)) //Cultists instantly go blind
|
||||
@@ -115,11 +115,11 @@
|
||||
var/obj/item/clothing/glasses/wraith_spectacles/WS = L.glasses
|
||||
desc = "[glasses_right && !WS.up ? "<font color=#DAAA18><b>":""]You are [glasses_right ? "":"not "]wearing wraith spectacles[glasses_right && !WS.up ? "!</b></font>":"."]<br>\
|
||||
You have taken <font color=#DAAA18><b>[W.eye_damage_done]</b></font> eye damage from them.<br>"
|
||||
if(L.has_disability(NEARSIGHT))
|
||||
if(L.has_disability(DISABILITY_NEARSIGHT))
|
||||
desc += "<font color=#DAAA18><b>You are nearsighted!</b></font><br>"
|
||||
else if(glasses_right && !WS.up)
|
||||
desc += "You will become nearsighted at <font color=#DAAA18><b>[W.nearsight_breakpoint]</b></font> eye damage.<br>"
|
||||
if(L.has_disability(BLIND))
|
||||
if(L.has_disability(DISABILITY_BLIND))
|
||||
desc += "<font color=#DAAA18><b>You are blind!</b></font>"
|
||||
else if(glasses_right && !WS.up)
|
||||
desc += "You will become blind at <font color=#DAAA18><b>[W.blind_breakpoint]</b></font> eye damage."
|
||||
@@ -142,8 +142,8 @@
|
||||
apply_eye_damage(H)
|
||||
else
|
||||
if(GLOB.ratvar_awakens)
|
||||
H.cure_nearsighted(list(EYE_DAMAGE))
|
||||
H.cure_blind(list(EYE_DAMAGE))
|
||||
H.cure_nearsighted()
|
||||
H.cure_blind()
|
||||
H.adjust_eye_damage(-eye_damage_done)
|
||||
eye_damage_done = 0
|
||||
else if(prob(50) && eye_damage_done)
|
||||
@@ -153,20 +153,18 @@
|
||||
qdel(src)
|
||||
|
||||
/datum/status_effect/wraith_spectacles/proc/apply_eye_damage(mob/living/carbon/human/H)
|
||||
if(H.has_disability(BLIND))
|
||||
if(H.has_disability(DISABILITY_BLIND))
|
||||
return
|
||||
H.adjust_eye_damage(0.5)
|
||||
eye_damage_done += 0.5
|
||||
if(eye_damage_done >= 20)
|
||||
H.adjust_blurriness(2)
|
||||
if(eye_damage_done >= nearsight_breakpoint)
|
||||
if(!H.has_disability(NEARSIGHT))
|
||||
if(!H.has_disability(DISABILITY_NEARSIGHT))
|
||||
to_chat(H, "<span class='nzcrentr'>Your vision doubles, then trembles. Darkness begins to close in. You can't keep this up!</span>")
|
||||
H.become_nearsighted(EYE_DAMAGE)
|
||||
if(eye_damage_done >= blind_breakpoint)
|
||||
if(!H.has_disability(BLIND))
|
||||
if(!H.has_disability(DISABILITY_BLIND))
|
||||
to_chat(H, "<span class='nzcrentr_large'>A piercing white light floods your vision. Suddenly, all goes dark!</span>")
|
||||
H.become_blind(EYE_DAMAGE)
|
||||
|
||||
if(prob(min(20, 5 + eye_damage_done)))
|
||||
to_chat(H, "<span class='nzcrentr_small'><i>Your eyes continue to burn.</i></span>")
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
//Helper proc to get an Eminence mob if it exists
|
||||
/proc/get_eminence()
|
||||
return locate(/mob/camera/eminence) in servants_and_ghosts()
|
||||
|
||||
//The Eminence is a unique mob that functions like the leader of the cult. It's incorporeal but can interact with the world in several ways.
|
||||
/mob/camera/eminence
|
||||
name = "\the Emininence"
|
||||
@@ -16,7 +12,6 @@
|
||||
layer = FLY_LAYER
|
||||
faction = list("ratvar")
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
var/turf/last_failed_turf
|
||||
var/static/superheated_walls = 0
|
||||
|
||||
/mob/camera/eminence/CanPass(atom/movable/mover, turf/target)
|
||||
@@ -25,37 +20,25 @@
|
||||
/mob/camera/eminence/Move(NewLoc, direct)
|
||||
var/OldLoc = loc
|
||||
if(NewLoc && !istype(NewLoc, /turf/open/indestructible/reebe_void))
|
||||
var/turf/T = get_turf(NewLoc)
|
||||
if(T.flags_1 & NOJAUNT_1)
|
||||
if(last_failed_turf != T)
|
||||
T.visible_message("<span class='warning'>[T] suddenly emits a ringing sound!</span>", ignore_mob = src)
|
||||
playsound(T, 'sound/machines/clockcult/ark_damage.ogg', 75, FALSE)
|
||||
last_failed_turf = T
|
||||
to_chat(src, "<span class='warning'>This turf is consecrated and can't be crossed!</span>")
|
||||
return
|
||||
if(istype(get_area(T), /area/chapel))
|
||||
to_chat(src, "<span class='warning'>The Chapel is hallowed ground under a heretical deity, and can't be accessed!</span>")
|
||||
return
|
||||
forceMove(T)
|
||||
forceMove(get_turf(NewLoc))
|
||||
Moved(OldLoc, direct)
|
||||
if(GLOB.ratvar_awakens)
|
||||
for(var/turf/T in range(5, src))
|
||||
if(prob(166 - (get_dist(src, T) * 33)))
|
||||
T.ratvar_act() //Causes moving to leave a swath of proselytized area behind the Eminence
|
||||
|
||||
/mob/camera/eminence/Process_Spacemove(movement_dir = 0)
|
||||
return TRUE
|
||||
|
||||
/mob/camera/eminence/Login()
|
||||
..()
|
||||
var/datum/antagonist/clockcult/C = mind.has_antag_datum(/datum/antagonist/clockcult,TRUE)
|
||||
if(C && C.clock_team)
|
||||
if(C.clock_team.eminence && C.clock_team.eminence != src)
|
||||
remove_servant_of_ratvar(src,TRUE)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
C.clock_team.eminence = src
|
||||
if(!C)
|
||||
add_servant_of_ratvar(src, TRUE)
|
||||
C = mind.has_antag_datum(/datum/antagonist/clockcult,TRUE)
|
||||
if(C && C.clock_team)
|
||||
if(C.clock_team.eminence)
|
||||
remove_servant_of_ratvar(src,TRUE)
|
||||
qdel(src)
|
||||
else
|
||||
C.clock_team.eminence = src
|
||||
to_chat(src, "<span class='bold large_brass'>You have been selected as the Eminence!</span>")
|
||||
to_chat(src, "<span class='brass'>As the Eminence, you lead the servants. Anything you say will be heard by the entire cult.</span>")
|
||||
to_chat(src, "<span class='brass'>Though you can move through walls, you're also incorporeal, and largely can't interact with the world except for a few ways.</span>")
|
||||
@@ -70,12 +53,6 @@
|
||||
E.Grant(src)
|
||||
|
||||
/mob/camera/eminence/say(message)
|
||||
if(client)
|
||||
if(client.prefs.muted & MUTE_IC)
|
||||
to_chat(src, "You cannot send IC messages (muted).")
|
||||
return
|
||||
if(client.handle_spam_prevention(message,MUTE_IC))
|
||||
return
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
if(!message)
|
||||
return
|
||||
@@ -83,13 +60,7 @@
|
||||
if(GLOB.ratvar_awakens)
|
||||
visible_message("<span class='brass'><b>You feel light slam into your mind and form words:</b> \"[capitalize(message)]\"</span>")
|
||||
playsound(src, 'sound/machines/clockcult/ark_scream.ogg', 50, FALSE)
|
||||
message = "<span class='big brass'><b>The [GLOB.ratvar_awakens ? "Radiance" : "Eminence"]:</b> \"[message]\"</span>"
|
||||
for(var/mob/M in servants_and_ghosts())
|
||||
if(isobserver(M))
|
||||
var/link = FOLLOW_LINK(M, src)
|
||||
to_chat(M, "[link] [message]")
|
||||
else
|
||||
to_chat(M, message)
|
||||
hierophant_message("<span class='large_brass'><b>The Eminence:</b> \"[message]\"</span>")
|
||||
|
||||
/mob/camera/eminence/Hear(message, atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, message_mode)
|
||||
if(z == ZLEVEL_CITYOFCOGS || is_servant_of_ratvar(speaker) || GLOB.ratvar_approaches || GLOB.ratvar_awakens) //Away from Reebe, the Eminence can't hear anything
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
/obj/structure/destructible/clockwork/massive/celestial_gateway/proc/mass_recall()
|
||||
for(var/V in SSticker.mode.servants_of_ratvar)
|
||||
var/datum/mind/M = V
|
||||
if(M.current.stat != DEAD)
|
||||
if(!M.current.stat)
|
||||
M.current.forceMove(get_turf(src))
|
||||
M.current.overlay_fullscreen("flash", /obj/screen/fullscreen/flash)
|
||||
M.current.clear_fullscreen("flash", 5)
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
/obj/structure/destructible/clockwork/eminence_spire/attack_ghost(mob/user)
|
||||
if(!IsAdminGhost(user))
|
||||
return
|
||||
|
||||
var/datum/antagonist/clockcult/random_cultist = locate() in GLOB.antagonists //if theres no cultists new team without eminence will be created anyway.
|
||||
if(random_cultist && random_cultist.clock_team && random_cultist.clock_team.eminence)
|
||||
to_chat(user, "<span class='warning'>There's already an Eminence - too late!</span>")
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
if(!(BI.resistance_flags & ON_FIRE))
|
||||
BI.fire_act()
|
||||
continue
|
||||
if(is_servant_of_ratvar(L) || (L.has_disability(BLIND)) || L.null_rod_check())
|
||||
if(is_servant_of_ratvar(L) || (L.has_disability(DISABILITY_BLIND)) || L.null_rod_check())
|
||||
continue
|
||||
if(L.stat || L.restrained() || L.buckled || L.lying)
|
||||
continue
|
||||
|
||||
@@ -115,7 +115,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
continue
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
if((H.has_disability(MUTE)) || H.silent)
|
||||
if((H.has_disability(DISABILITY_MUTE)) || H.silent)
|
||||
continue
|
||||
if(L.stat)
|
||||
continue
|
||||
|
||||
@@ -304,7 +304,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
sleep(30)
|
||||
if(!owner || QDELETED(owner))
|
||||
return
|
||||
priority_announce("Hostile runtimes detected in all station systems, please deactivate your AI to prevent possible damage to its morality core.", "Anomaly Alert", 'sound/ai/aimalf.ogg')
|
||||
priority_announce("Hostile runtimes detected in all station systems, please deactivate your AI to prevent possible damage to its morality core.", "Anomaly Alert", 'sound/AI/aimalf.ogg')
|
||||
set_security_level("delta")
|
||||
var/obj/machinery/doomsday_device/DOOM = new(owner_AI)
|
||||
owner_AI.nuking = TRUE
|
||||
|
||||
@@ -576,8 +576,8 @@ Congratulations! You are now trained for invasive xenobiology research!"}
|
||||
flags_1 = DROPDEL_1
|
||||
|
||||
/obj/item/restraints/handcuffs/energy/used/dropped(mob/user)
|
||||
user.visible_message("<span class='danger'>[user]'s [src] break in a discharge of energy!</span>", \
|
||||
"<span class='userdanger'>[user]'s [src] break in a discharge of energy!</span>")
|
||||
user.visible_message("<span class='danger'>[user]'s [name] breaks in a discharge of energy!</span>", \
|
||||
"<span class='userdanger'>[user]'s [name] breaks in a discharge of energy!</span>")
|
||||
var/datum/effect_system/spark_spread/S = new
|
||||
S.set_up(4,0,user.loc)
|
||||
S.start()
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
var/players_per_carrier = 30
|
||||
|
||||
var/datum/objective_team/monkey/monkey_team
|
||||
var/datum/team/monkey/monkey_team
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -524,7 +524,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
var/list/otherwise = M.GetAllContents()
|
||||
for(var/obj/item/disk/tech_disk/TD in otherwise)
|
||||
TD.stored_research.copy_research_to(checking)
|
||||
return checking.researched_nodes.len >= target_amount
|
||||
return checking.researched_nodes.len >= target
|
||||
|
||||
/datum/objective/capture
|
||||
|
||||
|
||||
@@ -57,19 +57,17 @@
|
||||
toggle_cam()
|
||||
|
||||
/obj/machinery/camera/Destroy()
|
||||
toggle_cam(null, 0) //kick anyone viewing out
|
||||
if(can_use())
|
||||
toggle_cam(null, 0) //kick anyone viewing out and remove from the camera chunks
|
||||
GLOB.cameranet.cameras -= src
|
||||
if(isarea(myarea))
|
||||
LAZYREMOVE(myarea.cameras, src)
|
||||
if(assembly)
|
||||
qdel(assembly)
|
||||
assembly = null
|
||||
QDEL_NULL(assembly)
|
||||
if(bug)
|
||||
bug.bugged_cameras -= src.c_tag
|
||||
if(bug.current == src)
|
||||
bug.current = null
|
||||
bug = null
|
||||
GLOB.cameranet.removeCamera(src) //Will handle removal from the camera network and the chunks, so we don't need to worry about that
|
||||
GLOB.cameranet.cameras -= src
|
||||
return ..()
|
||||
|
||||
/obj/machinery/camera/emp_act(severity)
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
/mob/living/silicon/ai/proc/get_camera_list()
|
||||
|
||||
track.cameras.Cut()
|
||||
|
||||
if(src.stat == DEAD)
|
||||
return
|
||||
|
||||
var/list/L = list()
|
||||
for (var/obj/machinery/camera/C in GLOB.cameranet.cameras)
|
||||
L.Add(C)
|
||||
@@ -18,25 +12,18 @@
|
||||
if (tempnetwork.len)
|
||||
T[text("[][]", C.c_tag, (C.can_use() ? null : " (Deactivated)"))] = C
|
||||
|
||||
track.cameras = T
|
||||
return T
|
||||
|
||||
|
||||
/mob/living/silicon/ai/proc/ai_camera_list(camera)
|
||||
if (!camera)
|
||||
return 0
|
||||
|
||||
var/obj/machinery/camera/C = track.cameras[camera]
|
||||
src.eyeobj.setLoc(C)
|
||||
|
||||
return
|
||||
/mob/living/silicon/ai/proc/show_camera_list()
|
||||
var/list/cameras = get_camera_list()
|
||||
var/camera = input(src, "Choose which camera you want to view", "Cameras") as null|anything in cameras
|
||||
switchCamera(cameras[camera])
|
||||
|
||||
/datum/trackable
|
||||
var/list/names = list()
|
||||
var/list/namecounts = list()
|
||||
var/list/humans = list()
|
||||
var/list/others = list()
|
||||
var/list/cameras = list()
|
||||
|
||||
/mob/living/silicon/ai/proc/trackable_mobs()
|
||||
|
||||
@@ -143,13 +130,9 @@
|
||||
/obj/machinery/camera/attack_ai(mob/living/silicon/ai/user)
|
||||
if (!istype(user))
|
||||
return
|
||||
if (!src.can_use())
|
||||
if (!can_use())
|
||||
return
|
||||
user.eyeobj.setLoc(get_turf(src))
|
||||
|
||||
|
||||
/mob/living/silicon/ai/attack_ai(mob/user)
|
||||
ai_camera_list()
|
||||
user.switchCamera(src)
|
||||
|
||||
/proc/camera_sort(list/L)
|
||||
var/obj/machinery/camera/a
|
||||
|
||||
@@ -83,12 +83,23 @@
|
||||
|
||||
if(!eyeobj.eye_initialized)
|
||||
var/camera_location
|
||||
for(var/obj/machinery/camera/C in GLOB.cameranet.cameras)
|
||||
if(!C.can_use() || z_lock.len && !(C.z in z_lock))
|
||||
continue
|
||||
if(C.network & networks)
|
||||
camera_location = get_turf(C)
|
||||
break
|
||||
var/turf/myturf = get_turf(src)
|
||||
if(eyeobj.use_static)
|
||||
if((!z_lock.len || (myturf.z in z_lock)) && GLOB.cameranet.checkTurfVis(myturf))
|
||||
camera_location = myturf
|
||||
else
|
||||
for(var/obj/machinery/camera/C in GLOB.cameranet.cameras)
|
||||
if(!C.can_use() || z_lock.len && !(C.z in z_lock))
|
||||
continue
|
||||
var/list/network_overlap = networks & C.network
|
||||
if(network_overlap.len)
|
||||
camera_location = get_turf(C)
|
||||
break
|
||||
else
|
||||
camera_location = myturf
|
||||
if(z_lock.len && !(myturf.z in z_lock))
|
||||
camera_location = locate(round(world.maxx/2), round(world.maxy/2), z_lock[1])
|
||||
|
||||
if(camera_location)
|
||||
eyeobj.eye_initialized = TRUE
|
||||
give_eye_control(L)
|
||||
@@ -300,9 +311,6 @@
|
||||
else if(isspaceturf(T))
|
||||
to_chat(user, "<span class='sevtug_small'>[prob(1) ? "Servant cannot into space." : "You can't teleport into space."]</span>")
|
||||
return
|
||||
else if(T.flags_1 & NOJAUNT_1)
|
||||
to_chat(user, "<span class='sevtug_small'>This tile is blessed by holy water and deflects the warp.</span>")
|
||||
return
|
||||
var/area/AR = get_area(T)
|
||||
if(!AR.clockwork_warp_allowed)
|
||||
to_chat(user, "<span class='sevtug_small'>[AR.clockwork_warp_fail]</span>")
|
||||
|
||||
@@ -449,7 +449,7 @@
|
||||
scantemp = "<font class='bad'>Subject's brain is not responding to scanning stimuli.</font>"
|
||||
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
|
||||
return
|
||||
if((mob_occupant.has_disability(NOCLONE)) && (src.scanner.scan_level < 2))
|
||||
if((mob_occupant.has_disability(DISABILITY_NOCLONE)) && (src.scanner.scan_level < 2))
|
||||
scantemp = "<font class='bad'>Subject no longer contains the fundamental materials required to create a living clone.</font>"
|
||||
playsound(src, 'sound/machines/terminal_alert.ogg', 50, 0)
|
||||
return
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
if(connected && connected.is_operational())
|
||||
if(connected.occupant) //set occupant_status message
|
||||
viable_occupant = connected.occupant
|
||||
if(viable_occupant.has_dna() && (!(RADIMMUNE in viable_occupant.dna.species.species_traits)) && (!(viable_occupant.has_disability(NOCLONE)) || (connected.scan_level == 3))) //occupant is viable for dna modification
|
||||
if(viable_occupant.has_dna() && (!(RADIMMUNE in viable_occupant.dna.species.species_traits)) && (!(viable_occupant.has_disability(DISABILITY_NOCLONE)) || (connected.scan_level == 3))) //occupant is viable for dna modification
|
||||
occupant_status += "[viable_occupant.name] => "
|
||||
switch(viable_occupant.stat)
|
||||
if(CONSCIOUS)
|
||||
@@ -528,7 +528,7 @@
|
||||
var/mob/living/carbon/viable_occupant = null
|
||||
if(connected)
|
||||
viable_occupant = connected.occupant
|
||||
if(!istype(viable_occupant) || !viable_occupant.dna || (viable_occupant.has_disability(NOCLONE)))
|
||||
if(!istype(viable_occupant) || !viable_occupant.dna || (viable_occupant.has_disability(DISABILITY_NOCLONE)))
|
||||
viable_occupant = null
|
||||
return viable_occupant
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
var/mob/living/mob_occupant = get_mob_or_brainmob(occupant)
|
||||
if(istype(mob_occupant))
|
||||
if(locate_computer(/obj/machinery/computer/cloning))
|
||||
if(!mob_occupant.suiciding && !(mob_occupant.has_disability(NOCLONE)) && !mob_occupant.hellbound)
|
||||
if(!mob_occupant.suiciding && !(mob_occupant.has_disability(DISABILITY_NOCLONE)) && !mob_occupant.hellbound)
|
||||
mob_occupant.notify_ghost_cloning("Your corpse has been placed into a cloning scanner. Re-enter your corpse if you want to be cloned!", source = src)
|
||||
|
||||
// DNA manipulators cannot operate on severed heads or brains
|
||||
|
||||
@@ -251,13 +251,16 @@
|
||||
note = null
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/door/airlock/proc/unzap() //for addtimer
|
||||
justzap = FALSE
|
||||
|
||||
/obj/machinery/door/airlock/bumpopen(mob/living/user) //Airlocks now zap you when you 'bump' them open when they're electrified. --NeoFite
|
||||
if(!issilicon(usr))
|
||||
if(isElectrified())
|
||||
if(!justzap)
|
||||
if(shock(user, 100))
|
||||
justzap = TRUE
|
||||
addtimer(VARSET_CALLBACK(src, justzap, FALSE) , 10)
|
||||
addtimer(CALLBACK(src, .proc/unzap), 10)
|
||||
return
|
||||
else
|
||||
return
|
||||
@@ -677,7 +680,7 @@
|
||||
|
||||
if(ishuman(user) && prob(40) && src.density)
|
||||
var/mob/living/carbon/human/H = user
|
||||
if((H.disabilities & DUMB) && Adjacent(user))
|
||||
if((H.has_disability(DISABILITY_DUMB)) && Adjacent(user))
|
||||
playsound(src.loc, 'sound/effects/bang.ogg', 25, 1)
|
||||
if(!istype(H.head, /obj/item/clothing/head/helmet))
|
||||
H.visible_message("<span class='danger'>[user] headbutts the airlock.</span>", \
|
||||
|
||||
@@ -195,7 +195,7 @@
|
||||
/obj/machinery/door/emp_act(severity)
|
||||
if(prob(20/severity) && (istype(src, /obj/machinery/door/airlock) || istype(src, /obj/machinery/door/window)) )
|
||||
INVOKE_ASYNC(src, .proc/open)
|
||||
if(prob(severity*10 - 20))
|
||||
if(prob(40/severity))
|
||||
if(secondsElectrified == 0)
|
||||
secondsElectrified = -1
|
||||
shockedby += "\[[time_stamp()]\]EM Pulse"
|
||||
|
||||
@@ -1,66 +1,68 @@
|
||||
/obj/machinery/door/poddoor
|
||||
name = "blast door"
|
||||
desc = "A heavy duty blast door that opens mechanically."
|
||||
icon = 'icons/obj/doors/blastdoor.dmi'
|
||||
icon_state = "closed"
|
||||
var/id = 1
|
||||
/obj/machinery/door/poddoor
|
||||
name = "blast door"
|
||||
desc = "A heavy duty blast door that opens mechanically."
|
||||
icon = 'icons/obj/doors/blastdoor.dmi'
|
||||
icon_state = "closed"
|
||||
var/id = 1
|
||||
sub_door = TRUE
|
||||
explosion_block = 3
|
||||
explosion_block = 3
|
||||
heat_proof = TRUE
|
||||
safe = FALSE
|
||||
max_integrity = 600
|
||||
armor = list(melee = 50, bullet = 100, laser = 100, energy = 100, bomb = 50, bio = 100, rad = 100, fire = 100, acid = 70)
|
||||
resistance_flags = FIRE_PROOF
|
||||
damage_deflection = 70
|
||||
|
||||
/obj/machinery/door/poddoor/preopen
|
||||
icon_state = "open"
|
||||
max_integrity = 600
|
||||
armor = list(melee = 50, bullet = 100, laser = 100, energy = 100, bomb = 50, bio = 100, rad = 100, fire = 100, acid = 70)
|
||||
resistance_flags = FIRE_PROOF
|
||||
damage_deflection = 70
|
||||
|
||||
/obj/machinery/door/poddoor/preopen
|
||||
icon_state = "open"
|
||||
density = FALSE
|
||||
opacity = 0
|
||||
|
||||
/obj/machinery/door/poddoor/ert
|
||||
desc = "A heavy duty blast door that only opens for dire emergencies."
|
||||
|
||||
//special poddoors that open when emergency shuttle docks at centcom
|
||||
/obj/machinery/door/poddoor/shuttledock
|
||||
var/checkdir = 4 //door won't open if turf in this dir is `turftype`
|
||||
var/turftype = /turf/open/space
|
||||
|
||||
/obj/machinery/door/poddoor/shuttledock/proc/check()
|
||||
var/turf/T = get_step(src, checkdir)
|
||||
if(!istype(T, turftype))
|
||||
INVOKE_ASYNC(src, .proc/open)
|
||||
else
|
||||
INVOKE_ASYNC(src, .proc/close)
|
||||
|
||||
opacity = 0
|
||||
|
||||
/obj/machinery/door/poddoor/ert
|
||||
desc = "A heavy duty blast door that only opens for dire emergencies."
|
||||
|
||||
//special poddoors that open when emergency shuttle docks at centcom
|
||||
/obj/machinery/door/poddoor/shuttledock
|
||||
var/checkdir = 4 //door won't open if turf in this dir is `turftype`
|
||||
var/turftype = /turf/open/space
|
||||
|
||||
/obj/machinery/door/poddoor/shuttledock/proc/check()
|
||||
var/turf/T = get_step(src, checkdir)
|
||||
if(!istype(T, turftype))
|
||||
INVOKE_ASYNC(src, .proc/open)
|
||||
else
|
||||
INVOKE_ASYNC(src, .proc/close)
|
||||
|
||||
/obj/machinery/door/poddoor/CollidedWith(atom/movable/AM)
|
||||
if(density)
|
||||
return 0
|
||||
else
|
||||
return ..()
|
||||
|
||||
//"BLAST" doors are obviously stronger than regular doors when it comes to BLASTS.
|
||||
/obj/machinery/door/poddoor/ex_act(severity, target)
|
||||
if(severity == 3)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/machinery/door/poddoor/do_animate(animation)
|
||||
switch(animation)
|
||||
if("opening")
|
||||
flick("opening", src)
|
||||
if("closing")
|
||||
flick("closing", src)
|
||||
|
||||
/obj/machinery/door/poddoor/update_icon()
|
||||
if(density)
|
||||
icon_state = "closed"
|
||||
else
|
||||
icon_state = "open"
|
||||
|
||||
/obj/machinery/door/poddoor/try_to_activate_door(mob/user)
|
||||
return
|
||||
|
||||
/obj/machinery/door/poddoor/try_to_crowbar(obj/item/I, mob/user)
|
||||
if(stat & NOPOWER)
|
||||
open(1)
|
||||
if(density)
|
||||
return 0
|
||||
else
|
||||
return ..()
|
||||
|
||||
//"BLAST" doors are obviously stronger than regular doors when it comes to BLASTS.
|
||||
/obj/machinery/door/poddoor/ex_act(severity, target)
|
||||
if(severity == 3)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/machinery/door/poddoor/do_animate(animation)
|
||||
switch(animation)
|
||||
if("opening")
|
||||
flick("opening", src)
|
||||
playsound(src, 'sound/machines/blastdoor.ogg', 30, 1)
|
||||
if("closing")
|
||||
flick("closing", src)
|
||||
playsound(src, 'sound/machines/blastdoor.ogg', 30, 1)
|
||||
|
||||
/obj/machinery/door/poddoor/update_icon()
|
||||
if(density)
|
||||
icon_state = "closed"
|
||||
else
|
||||
icon_state = "open"
|
||||
|
||||
/obj/machinery/door/poddoor/try_to_activate_door(mob/user)
|
||||
return
|
||||
|
||||
/obj/machinery/door/poddoor/try_to_crowbar(obj/item/I, mob/user)
|
||||
if(stat & NOPOWER)
|
||||
open(1)
|
||||
|
||||
@@ -22,7 +22,6 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
var/creationTime
|
||||
var/authorCensor
|
||||
var/bodyCensor
|
||||
var/photo_file
|
||||
|
||||
/datum/newscaster/feed_message/proc/returnAuthor(censor)
|
||||
if(censor == -1)
|
||||
@@ -98,7 +97,6 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
var/scannedUser
|
||||
var/isAdminMsg
|
||||
var/icon/img
|
||||
var/photo_file
|
||||
|
||||
/datum/newscaster/feed_network
|
||||
var/list/datum/newscaster/feed_channel/network_channels = list()
|
||||
@@ -128,7 +126,6 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
if(photo)
|
||||
newMsg.img = photo.img
|
||||
newMsg.caption = photo.scribble
|
||||
newMsg.photo_file = save_photo(photo.img)
|
||||
for(var/datum/newscaster/feed_channel/FC in network_channels)
|
||||
if(FC.channel_name == channel_name)
|
||||
FC.messages += newMsg
|
||||
@@ -146,7 +143,6 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
wanted_issue.isAdminMsg = adminMsg
|
||||
if(photo)
|
||||
wanted_issue.img = photo.img
|
||||
wanted_issue.photo_file = save_photo(photo.img)
|
||||
if(newMessage)
|
||||
for(var/obj/machinery/newscaster/N in GLOB.allCasters)
|
||||
N.newsAlert()
|
||||
@@ -161,12 +157,7 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
for(var/obj/machinery/newscaster/NEWSCASTER in GLOB.allCasters)
|
||||
NEWSCASTER.update_icon()
|
||||
|
||||
/datum/newscaster/feed_network/proc/save_photo(icon/photo)
|
||||
var/photo_file = copytext(md5("\icon[photo]"), 1, 6)
|
||||
if(!fexists("[GLOB.log_directory]/photos/[photo_file].png"))
|
||||
var/icon/p = icon(photo, frame = 1)
|
||||
fcopy(p, "[GLOB.log_directory]/photos/[photo_file].png")
|
||||
return photo_file
|
||||
|
||||
|
||||
/obj/item/wallframe/newscaster
|
||||
name = "newscaster frame"
|
||||
|
||||
+181
-97
@@ -25,8 +25,8 @@
|
||||
integrity_failure = 100
|
||||
armor = list(melee = 20, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 70)
|
||||
circuit = /obj/item/circuitboard/machine/vendor
|
||||
var/active = TRUE //No sales pitches if off!
|
||||
var/vend_ready = TRUE //Are we ready to vend?? Is it time??
|
||||
var/active = 1 //No sales pitches if off!
|
||||
var/vend_ready = 1 //Are we ready to vend?? Is it time??
|
||||
|
||||
// To be filled out at compile time
|
||||
var/list/products = list() //For each, use the following pattern:
|
||||
@@ -227,15 +227,15 @@
|
||||
if(!allowed(user) && !emagged && scan_id)
|
||||
to_chat(user, "<span class='warning'>[src]'s chef compartment blinks red: Access denied.</span>")
|
||||
req_access_txt = "0"
|
||||
return FALSE
|
||||
return 0
|
||||
req_access_txt = "0"
|
||||
return TRUE
|
||||
return 1
|
||||
|
||||
/obj/machinery/vending/snack/proc/iscompartmentfull(mob/user)
|
||||
if(contents.len >= 30) // no more than 30 dishes can fit inside
|
||||
to_chat(user, "<span class='warning'>[src]'s chef compartment is full.</span>")
|
||||
return TRUE
|
||||
return FALSE
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/machinery/vending/snack/proc/food_load(obj/item/reagent_containers/food/snacks/S)
|
||||
if(dish_quants[S.name])
|
||||
@@ -350,6 +350,180 @@
|
||||
/obj/machinery/vending/attack_ai(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/vending/attack_hand(mob/user)
|
||||
var/dat = ""
|
||||
if(panel_open && !isAI(user))
|
||||
return wires.interact(user)
|
||||
else
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
|
||||
dat += "<h3>Select an item</h3>"
|
||||
dat += "<div class='statusDisplay'>"
|
||||
if(product_records.len == 0)
|
||||
dat += "<font color = 'red'>No product loaded!</font>"
|
||||
else
|
||||
var/list/display_records = product_records
|
||||
if(extended_inventory)
|
||||
display_records = product_records + hidden_records
|
||||
if(coin || bill)
|
||||
display_records = product_records + coin_records
|
||||
if((coin || bill) && extended_inventory)
|
||||
display_records = product_records + hidden_records + coin_records
|
||||
dat += "<ul>"
|
||||
for (var/datum/data/vending_product/R in display_records)
|
||||
dat += "<li>"
|
||||
if(R.amount > 0)
|
||||
dat += "<a href='byond://?src=[REF(src)];vend=[REF(R)]'>Vend</a> "
|
||||
else
|
||||
dat += "<span class='linkOff'>Sold out</span> "
|
||||
dat += "<font color = '[R.display_color]'><b>[sanitize(R.product_name)]</b>:</font>"
|
||||
dat += " <b>[R.amount]</b>"
|
||||
dat += "</li>"
|
||||
dat += "</ul>"
|
||||
dat += "</div>"
|
||||
if(premium.len > 0)
|
||||
dat += "<b>Change Return:</b> "
|
||||
if (coin || bill)
|
||||
dat += "[(coin ? coin : "")][(bill ? bill : "")] <a href='byond://?src=[REF(src)];remove_coin=1'>Remove</a>"
|
||||
else
|
||||
dat += "<i>No money</i> <span class='linkOff'>Remove</span>"
|
||||
if(istype(src, /obj/machinery/vending/snack))
|
||||
dat += "<h3>Chef's Food Selection</h3>"
|
||||
dat += "<div class='statusDisplay'>"
|
||||
for (var/O in dish_quants)
|
||||
if(dish_quants[O] > 0)
|
||||
var/N = dish_quants[O]
|
||||
dat += "<a href='byond://?src=[REF(src)];dispense=[sanitize(O)]'>Dispense</A> "
|
||||
dat += "<B>[capitalize(O)]: [N]</B><br>"
|
||||
dat += "</div>"
|
||||
user.set_machine(src)
|
||||
if(seconds_electrified && !(stat & NOPOWER))
|
||||
if(shock(user, 100))
|
||||
return
|
||||
|
||||
var/datum/browser/popup = new(user, "vending", (name))
|
||||
popup.set_content(dat)
|
||||
popup.set_title_image(user.browse_rsc_icon(icon, icon_state))
|
||||
popup.open()
|
||||
|
||||
|
||||
/obj/machinery/vending/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
|
||||
if(href_list["remove_coin"])
|
||||
if(!(coin || bill))
|
||||
to_chat(usr, "<span class='notice'>There is no money in this machine.</span>")
|
||||
return
|
||||
if(coin)
|
||||
if(!usr.get_active_held_item())
|
||||
usr.put_in_hands(coin)
|
||||
else
|
||||
coin.forceMove(get_turf(src))
|
||||
to_chat(usr, "<span class='notice'>You remove [coin] from [src].</span>")
|
||||
coin = null
|
||||
if(bill)
|
||||
if(!usr.get_active_held_item())
|
||||
usr.put_in_hands(bill)
|
||||
else
|
||||
bill.forceMove(get_turf(src))
|
||||
to_chat(usr, "<span class='notice'>You remove [bill] from [src].</span>")
|
||||
bill = null
|
||||
|
||||
|
||||
usr.set_machine(src)
|
||||
|
||||
if((href_list["dispense"]) && (vend_ready))
|
||||
var/N = href_list["dispense"]
|
||||
if(dish_quants[N] <= 0) // Sanity check, there are probably ways to press the button when it shouldn't be possible.
|
||||
return
|
||||
vend_ready = 0
|
||||
use_power(5)
|
||||
|
||||
dish_quants[N] = max(dish_quants[N] - 1, 0)
|
||||
for(var/obj/O in contents)
|
||||
if(O.name == N)
|
||||
O.forceMove(drop_location())
|
||||
break
|
||||
vend_ready = 1
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
if((href_list["vend"]) && (vend_ready))
|
||||
if(panel_open)
|
||||
to_chat(usr, "<span class='notice'>The vending machine cannot dispense products while its service panel is open!</span>")
|
||||
return
|
||||
|
||||
if((!allowed(usr)) && !emagged && scan_id) //For SECURE VENDING MACHINES YEAH
|
||||
to_chat(usr, "<span class='warning'>Access denied.</span>" )
|
||||
flick(icon_deny,src)
|
||||
return
|
||||
|
||||
vend_ready = 0 //One thing at a time!!
|
||||
|
||||
var/datum/data/vending_product/R = locate(href_list["vend"])
|
||||
if(!R || !istype(R) || !R.product_path)
|
||||
vend_ready = 1
|
||||
return
|
||||
|
||||
if(R in hidden_records)
|
||||
if(!extended_inventory)
|
||||
vend_ready = 1
|
||||
return
|
||||
else if(R in coin_records)
|
||||
if(!(coin || bill))
|
||||
to_chat(usr, "<span class='warning'>You need to insert money to get this item!</span>")
|
||||
vend_ready = 1
|
||||
return
|
||||
if(coin && coin.string_attached)
|
||||
if(prob(50))
|
||||
if(usr.put_in_hands(coin))
|
||||
to_chat(usr, "<span class='notice'>You successfully pull [coin] out before [src] could swallow it.</span>")
|
||||
coin = null
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>You couldn't pull [coin] out because your hands are full!</span>")
|
||||
QDEL_NULL(coin)
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>You weren't able to pull [coin] out fast enough, the machine ate it, string and all!</span>")
|
||||
QDEL_NULL(coin)
|
||||
else
|
||||
QDEL_NULL(coin)
|
||||
QDEL_NULL(bill)
|
||||
|
||||
else if (!(R in product_records))
|
||||
vend_ready = 1
|
||||
message_admins("Vending machine exploit attempted by [key_name(usr, usr.client)]!")
|
||||
return
|
||||
|
||||
if (R.amount <= 0)
|
||||
to_chat(usr, "<span class='warning'>Sold out.</span>")
|
||||
vend_ready = 1
|
||||
return
|
||||
else
|
||||
R.amount--
|
||||
|
||||
if(((last_reply + 200) <= world.time) && vend_reply)
|
||||
speak(vend_reply)
|
||||
last_reply = world.time
|
||||
|
||||
use_power(5)
|
||||
if(icon_vend) //Show the vending animation if needed
|
||||
flick(icon_vend,src)
|
||||
new R.product_path(get_turf(src))
|
||||
SSblackbox.record_feedback("nested tally", "vending_machine_usage", 1, list("[type]", "[R.product_path]"))
|
||||
vend_ready = 1
|
||||
return
|
||||
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
else if(href_list["togglevoice"] && panel_open)
|
||||
shut_up = !shut_up
|
||||
|
||||
updateUsrDialog()
|
||||
|
||||
|
||||
/obj/machinery/vending/process()
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
@@ -431,96 +605,6 @@
|
||||
else
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/vending/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.physical_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "vending", name, 350, 475, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/vending/ui_data()
|
||||
var/list/data = list()
|
||||
var/list/listed_products = list()
|
||||
var/list/display_records = product_records
|
||||
if(extended_inventory)
|
||||
display_records += hidden_records
|
||||
if(coin)
|
||||
display_records += coin_records
|
||||
for(var/key = 1 to display_records.len)
|
||||
var/datum/data/vending_product/I = display_records[key]
|
||||
listed_products.Add(list(list(
|
||||
"key" = key,
|
||||
"name" = I.product_name,
|
||||
"color" = I.display_color,
|
||||
"amount" = I.amount)))
|
||||
data["products"] = listed_products
|
||||
if(!isnull(coin))
|
||||
data["coin"] = coin.name
|
||||
data["coinslot"] = premium.len
|
||||
data["canvend"] = vend_ready
|
||||
|
||||
return data
|
||||
|
||||
/obj/machinery/vending/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
if(!vend_ready)
|
||||
return
|
||||
switch(action)
|
||||
if("vend")
|
||||
if(!allowed(usr) && !emagged && scan_id) //For SECURE VENDING MACHINES YEAH
|
||||
to_chat(usr, "<span class='warning'>Access denied.</span>")
|
||||
flick(icon_deny,src)
|
||||
return
|
||||
vend_ready = FALSE
|
||||
addtimer(VARSET_CALLBACK(src, vend_ready, TRUE), 10)
|
||||
var/key = text2num(params["key"])
|
||||
var/datum/data/vending_product/R = product_records[key]
|
||||
if(R in hidden_records)
|
||||
if(!extended_inventory)
|
||||
return
|
||||
else if(R in coin_records)
|
||||
if(!coin)
|
||||
to_chat(usr, "<span class='warning'>You need to insert a coin to get this item!</span>")
|
||||
return
|
||||
if(coin.string_attached)
|
||||
if(prob(50))
|
||||
if(usr.put_in_hands(coin))
|
||||
to_chat(usr, "<span class='notice'>You successfully pull [coin] out before [src] could swallow it.</span>")
|
||||
coin = null
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>You couldn't pull [coin] out because your hands are full!</span>")
|
||||
QDEL_NULL(coin)
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>You weren't able to pull [coin] out fast enough, the machine ate it, string and all!</span>")
|
||||
QDEL_NULL(coin)
|
||||
else
|
||||
QDEL_NULL(coin)
|
||||
else if (!(R in product_records))
|
||||
return
|
||||
|
||||
|
||||
|
||||
if (R.amount <= 0)
|
||||
to_chat(usr, "<span class='warning'>Sold out.</span>")
|
||||
return
|
||||
R.amount--
|
||||
if(((last_reply + 200) <= world.time) && vend_reply)
|
||||
speak(vend_reply)
|
||||
last_reply = world.time
|
||||
use_power(5)
|
||||
if(icon_vend) //Show the vending animation if needed
|
||||
flick(icon_vend,src)
|
||||
new R.product_path(drop_location())
|
||||
return TRUE
|
||||
if("eject")
|
||||
if(!coin)
|
||||
to_chat(usr, "<span class='notice'>There is no coin in this machine.</span>")
|
||||
return
|
||||
usr.put_in_hands(coin)
|
||||
to_chat(usr, "<span class='notice'>You remove [coin] from [src].</span>")
|
||||
coin = null
|
||||
|
||||
/*
|
||||
* Vending machine types
|
||||
*/
|
||||
@@ -1111,4 +1195,4 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
|
||||
|
||||
#undef STANDARD_CHARGE
|
||||
#undef CONTRABAND_CHARGE
|
||||
#undef COIN_CHARGE
|
||||
#undef COIN_CHARGE
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
/obj/effect/landmark/start
|
||||
name = "start"
|
||||
icon = 'icons/mob/landmarks.dmi'
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "x"
|
||||
anchored = TRUE
|
||||
var/jobspawn_override = FALSE
|
||||
@@ -40,9 +40,9 @@
|
||||
|
||||
// START LANDMARKS FOLLOW. Don't change the names unless
|
||||
// you are refactoring shitty landmark code.
|
||||
|
||||
/obj/effect/landmark/start/assistant
|
||||
name = "Assistant"
|
||||
icon_state = "Assistant"
|
||||
|
||||
/obj/effect/landmark/start/assistant/override
|
||||
jobspawn_override = TRUE
|
||||
@@ -50,135 +50,102 @@
|
||||
|
||||
/obj/effect/landmark/start/janitor
|
||||
name = "Janitor"
|
||||
icon_state = "Janitor"
|
||||
|
||||
/obj/effect/landmark/start/cargo_technician
|
||||
name = "Cargo Technician"
|
||||
icon_state = "Cargo Technician"
|
||||
|
||||
/obj/effect/landmark/start/bartender
|
||||
name = "Bartender"
|
||||
icon_state = "Bartender"
|
||||
|
||||
/obj/effect/landmark/start/clown
|
||||
name = "Clown"
|
||||
icon_state = "Clown"
|
||||
|
||||
/obj/effect/landmark/start/mime
|
||||
name = "Mime"
|
||||
icon_state = "Mime"
|
||||
|
||||
/obj/effect/landmark/start/quartermaster
|
||||
name = "Quartermaster"
|
||||
icon_state = "Quartermaster"
|
||||
|
||||
/obj/effect/landmark/start/atmospheric_technician
|
||||
name = "Atmospheric Technician"
|
||||
icon_state = "Atmospheric Technician"
|
||||
|
||||
/obj/effect/landmark/start/cook
|
||||
name = "Cook"
|
||||
icon_state = "Cook"
|
||||
|
||||
/obj/effect/landmark/start/shaft_miner
|
||||
name = "Shaft Miner"
|
||||
icon_state = "Shaft Miner"
|
||||
|
||||
/obj/effect/landmark/start/security_officer
|
||||
name = "Security Officer"
|
||||
icon_state = "Security Officer"
|
||||
|
||||
/obj/effect/landmark/start/botanist
|
||||
name = "Botanist"
|
||||
icon_state = "Botanist"
|
||||
|
||||
/obj/effect/landmark/start/head_of_security
|
||||
name = "Head of Security"
|
||||
icon_state = "Head of Security"
|
||||
|
||||
/obj/effect/landmark/start/captain
|
||||
name = "Captain"
|
||||
icon_state = "Captain"
|
||||
|
||||
/obj/effect/landmark/start/detective
|
||||
name = "Detective"
|
||||
icon_state = "Detective"
|
||||
|
||||
/obj/effect/landmark/start/warden
|
||||
name = "Warden"
|
||||
icon_state = "Warden"
|
||||
|
||||
/obj/effect/landmark/start/chief_engineer
|
||||
name = "Chief Engineer"
|
||||
icon_state = "Chief Engineer"
|
||||
|
||||
/obj/effect/landmark/start/head_of_personnel
|
||||
name = "Head of Personnel"
|
||||
icon_state = "Head of Personnel"
|
||||
|
||||
/obj/effect/landmark/start/librarian
|
||||
name = "Curator"
|
||||
icon_state = "Curator"
|
||||
|
||||
/obj/effect/landmark/start/lawyer
|
||||
name = "Lawyer"
|
||||
icon_state = "Lawyer"
|
||||
|
||||
/obj/effect/landmark/start/station_engineer
|
||||
name = "Station Engineer"
|
||||
icon_state = "Station Engineer"
|
||||
|
||||
/obj/effect/landmark/start/medical_doctor
|
||||
name = "Medical Doctor"
|
||||
icon_state = "Medical Doctor"
|
||||
|
||||
/obj/effect/landmark/start/scientist
|
||||
name = "Scientist"
|
||||
icon_state = "Scientist"
|
||||
|
||||
/obj/effect/landmark/start/chemist
|
||||
name = "Chemist"
|
||||
icon_state = "Chemist"
|
||||
|
||||
/obj/effect/landmark/start/roboticist
|
||||
name = "Roboticist"
|
||||
icon_state = "Roboticist"
|
||||
|
||||
/obj/effect/landmark/start/research_director
|
||||
name = "Research Director"
|
||||
icon_state = "Research Director"
|
||||
|
||||
/obj/effect/landmark/start/geneticist
|
||||
name = "Geneticist"
|
||||
icon_state = "Geneticist"
|
||||
|
||||
/obj/effect/landmark/start/chief_medical_officer
|
||||
name = "Chief Medical Officer"
|
||||
icon_state = "Chief Medical Officer"
|
||||
|
||||
/obj/effect/landmark/start/virologist
|
||||
name = "Virologist"
|
||||
icon_state = "Virologist"
|
||||
|
||||
/obj/effect/landmark/start/chaplain
|
||||
name = "Chaplain"
|
||||
icon_state = "Chaplain"
|
||||
|
||||
/obj/effect/landmark/start/cyborg
|
||||
name = "Cyborg"
|
||||
icon_state = "Cyborg"
|
||||
|
||||
/obj/effect/landmark/start/ai
|
||||
name = "AI"
|
||||
icon_state = "AI"
|
||||
delete_after_roundstart = FALSE
|
||||
|
||||
/obj/effect/landmark/start/captain
|
||||
name = "Captain"
|
||||
|
||||
/obj/effect/landmark/start/detective
|
||||
name = "Detective"
|
||||
|
||||
/obj/effect/landmark/start/warden
|
||||
name = "Warden"
|
||||
|
||||
/obj/effect/landmark/start/chief_engineer
|
||||
name = "Chief Engineer"
|
||||
|
||||
/obj/effect/landmark/start/cyborg
|
||||
name = "Cyborg"
|
||||
|
||||
/obj/effect/landmark/start/head_of_personnel
|
||||
name = "Head of Personnel"
|
||||
|
||||
/obj/effect/landmark/start/librarian
|
||||
name = "Curator"
|
||||
|
||||
/obj/effect/landmark/start/lawyer
|
||||
name = "Lawyer"
|
||||
|
||||
/obj/effect/landmark/start/station_engineer
|
||||
name = "Station Engineer"
|
||||
|
||||
/obj/effect/landmark/start/medical_doctor
|
||||
name = "Medical Doctor"
|
||||
|
||||
/obj/effect/landmark/start/scientist
|
||||
name = "Scientist"
|
||||
|
||||
/obj/effect/landmark/start/chemist
|
||||
name = "Chemist"
|
||||
|
||||
/obj/effect/landmark/start/roboticist
|
||||
name = "Roboticist"
|
||||
|
||||
/obj/effect/landmark/start/research_director
|
||||
name = "Research Director"
|
||||
|
||||
/obj/effect/landmark/start/geneticist
|
||||
name = "Geneticist"
|
||||
|
||||
/obj/effect/landmark/start/chief_medical_officer
|
||||
name = "Chief Medical Officer"
|
||||
|
||||
/obj/effect/landmark/start/virologist
|
||||
name = "Virologist"
|
||||
|
||||
/obj/effect/landmark/start/chaplain
|
||||
name = "Chaplain"
|
||||
|
||||
//Department Security spawns
|
||||
|
||||
/obj/effect/landmark/start/depsec
|
||||
name = "department_sec"
|
||||
icon_state = "Security Officer"
|
||||
|
||||
/obj/effect/landmark/start/depsec/New()
|
||||
..()
|
||||
|
||||
@@ -1,70 +1,70 @@
|
||||
/proc/generate_projectile_beam_between_points(datum/point/starting, datum/point/ending, beam_type, color, qdel_in = 5) //Do not pass z-crossing points as that will not be properly (and likely will never be properly until it's absolutely needed) supported!
|
||||
if(!istype(starting) || !istype(ending) || !ispath(beam_type))
|
||||
return
|
||||
var/datum/point/midpoint = point_midpoint_points(starting, ending)
|
||||
var/obj/effect/projectile_beam/PB = new beam_type
|
||||
PB.apply_vars(angle_between_points(starting, ending), midpoint.return_px(), midpoint.return_py(), color, pixel_length_between_points(starting, ending) / world.icon_size, midpoint.return_turf(), 0)
|
||||
. = PB
|
||||
if(qdel_in)
|
||||
QDEL_IN(PB, qdel_in)
|
||||
|
||||
/obj/effect/projectile_beam
|
||||
icon = 'icons/obj/projectiles.dmi'
|
||||
layer = ABOVE_MOB_LAYER
|
||||
anchored = TRUE
|
||||
light_power = 1
|
||||
light_range = 2
|
||||
light_color = "#00ffff"
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
flags_1 = ABSTRACT_1
|
||||
appearance_flags = 0
|
||||
|
||||
/obj/effect/projectile_beam/singularity_pull()
|
||||
return
|
||||
|
||||
/obj/effect/projectile_beam/singularity_act()
|
||||
return
|
||||
|
||||
/obj/effect/projectile_beam/proc/scale_to(nx,ny,override=TRUE)
|
||||
var/matrix/M
|
||||
if(!override)
|
||||
M = transform
|
||||
else
|
||||
M = new
|
||||
M.Scale(nx,ny)
|
||||
transform = M
|
||||
|
||||
/obj/effect/projectile_beam/proc/turn_to(angle,override=TRUE)
|
||||
var/matrix/M
|
||||
if(!override)
|
||||
M = transform
|
||||
else
|
||||
M = new
|
||||
M.Turn(angle)
|
||||
transform = M
|
||||
|
||||
/obj/effect/projectile_beam/New(angle_override, p_x, p_y, color_override, scaling = 1)
|
||||
if(angle_override && p_x && p_y && color_override && scaling)
|
||||
apply_vars(angle_override, p_x, p_y, color_override, scaling)
|
||||
return ..()
|
||||
|
||||
/obj/effect/projectile_beam/proc/apply_vars(angle_override, p_x = 0, p_y = 0, color_override, scaling = 1, new_loc, increment = 0)
|
||||
var/mutable_appearance/look = new(src)
|
||||
look.pixel_x = p_x
|
||||
look.pixel_y = p_y
|
||||
if(color_override)
|
||||
look.color = color_override
|
||||
appearance = look
|
||||
scale_to(1,scaling, FALSE)
|
||||
turn_to(angle_override, FALSE)
|
||||
if(!isnull(new_loc)) //If you want to null it just delete it...
|
||||
forceMove(new_loc)
|
||||
for(var/i in 1 to increment)
|
||||
pixel_x += round((sin(angle_override)+16*sin(angle_override)*2), 1)
|
||||
pixel_y += round((cos(angle_override)+16*cos(angle_override)*2), 1)
|
||||
|
||||
/obj/effect/projectile_beam/tracer
|
||||
icon_state = "tracer_beam"
|
||||
|
||||
/obj/effect/projectile_beam/tracer/aiming
|
||||
icon_state = "gbeam"
|
||||
/proc/generate_projectile_beam_between_points(datum/point/starting, datum/point/ending, beam_type, color, qdel_in = 5) //Do not pass z-crossing points as that will not be properly (and likely will never be properly until it's absolutely needed) supported!
|
||||
if(!istype(starting) || !istype(ending) || !ispath(beam_type))
|
||||
return
|
||||
var/datum/point/midpoint = point_midpoint_points(starting, ending)
|
||||
var/obj/effect/projectile_beam/PB = new beam_type
|
||||
PB.apply_vars(angle_between_points(starting, ending), midpoint.return_px(), midpoint.return_py(), color, pixel_length_between_points(starting, ending) / world.icon_size, midpoint.return_turf(), 0)
|
||||
. = PB
|
||||
if(qdel_in)
|
||||
QDEL_IN(PB, qdel_in)
|
||||
|
||||
/obj/effect/projectile_beam
|
||||
icon = 'icons/obj/projectiles.dmi'
|
||||
layer = ABOVE_MOB_LAYER
|
||||
anchored = TRUE
|
||||
light_power = 1
|
||||
light_range = 2
|
||||
light_color = "#00ffff"
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
flags_1 = ABSTRACT_1
|
||||
appearance_flags = 0
|
||||
|
||||
/obj/effect/projectile_beam/singularity_pull()
|
||||
return
|
||||
|
||||
/obj/effect/projectile_beam/singularity_act()
|
||||
return
|
||||
|
||||
/obj/effect/projectile_beam/proc/scale_to(nx,ny,override=TRUE)
|
||||
var/matrix/M
|
||||
if(!override)
|
||||
M = transform
|
||||
else
|
||||
M = new
|
||||
M.Scale(nx,ny)
|
||||
transform = M
|
||||
|
||||
/obj/effect/projectile_beam/proc/turn_to(angle,override=TRUE)
|
||||
var/matrix/M
|
||||
if(!override)
|
||||
M = transform
|
||||
else
|
||||
M = new
|
||||
M.Turn(angle)
|
||||
transform = M
|
||||
|
||||
/obj/effect/projectile_beam/New(angle_override, p_x, p_y, color_override, scaling = 1)
|
||||
if(angle_override && p_x && p_y && color_override && scaling)
|
||||
apply_vars(angle_override, p_x, p_y, color_override, scaling)
|
||||
return ..()
|
||||
|
||||
/obj/effect/projectile_beam/proc/apply_vars(angle_override, p_x = 0, p_y = 0, color_override, scaling = 1, new_loc, increment = 0)
|
||||
var/mutable_appearance/look = new(src)
|
||||
look.pixel_x = p_x
|
||||
look.pixel_y = p_y
|
||||
if(color_override)
|
||||
look.color = color_override
|
||||
appearance = look
|
||||
scale_to(1,scaling, FALSE)
|
||||
turn_to(angle_override, FALSE)
|
||||
if(!isnull(new_loc)) //If you want to null it just delete it...
|
||||
forceMove(new_loc)
|
||||
for(var/i in 1 to increment)
|
||||
pixel_x += round((sin(angle_override)+16*sin(angle_override)*2), 1)
|
||||
pixel_y += round((cos(angle_override)+16*cos(angle_override)*2), 1)
|
||||
|
||||
/obj/effect/projectile_beam/tracer
|
||||
icon_state = "tracer_beam"
|
||||
|
||||
/obj/effect/projectile_beam/tracer/aiming
|
||||
icon_state = "gbeam"
|
||||
|
||||
@@ -539,7 +539,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
M.adjust_blurriness(15)
|
||||
if(M.stat != DEAD)
|
||||
to_chat(M, "<span class='danger'>Your eyes start to bleed profusely!</span>")
|
||||
if(!(M.has_disability(BLIND) || M.has_disability(NEARSIGHT)))
|
||||
if(!(M.has_disability(DISABILITY_BLIND) || M.has_disability(DISABILITY_NEARSIGHT)))
|
||||
to_chat(M, "<span class='danger'>You become nearsighted!</span>")
|
||||
M.become_nearsighted(EYE_DAMAGE)
|
||||
if(prob(50))
|
||||
@@ -550,8 +550,8 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
M.Unconscious(20)
|
||||
M.Knockdown(40)
|
||||
if (prob(eyes.eye_damage - 10 + 1))
|
||||
M.become_blind(EYE_DAMAGE)
|
||||
to_chat(M, "<span class='danger'>You go blind!</span>")
|
||||
if(M.become_blind())
|
||||
to_chat(M, "<span class='danger'>You go blind!</span>")
|
||||
|
||||
/obj/item/singularity_pull(S, current_size)
|
||||
..()
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
var/colour = "red"
|
||||
var/open = FALSE
|
||||
|
||||
|
||||
/obj/item/lipstick/purple
|
||||
name = "purple lipstick"
|
||||
colour = "purple"
|
||||
@@ -21,6 +22,7 @@
|
||||
name = "black lipstick"
|
||||
colour = "black"
|
||||
|
||||
|
||||
/obj/item/lipstick/random
|
||||
name = "lipstick"
|
||||
icon_state = "random_lipstick"
|
||||
@@ -31,6 +33,8 @@
|
||||
colour = pick("red","purple","lime","black","green","blue","white")
|
||||
name = "[colour] lipstick"
|
||||
|
||||
|
||||
|
||||
/obj/item/lipstick/attack_self(mob/user)
|
||||
cut_overlays()
|
||||
to_chat(user, "<span class='notice'>You twist \the [src] [open ? "closed" : "open"].</span>")
|
||||
@@ -99,6 +103,7 @@
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/razor
|
||||
name = "electric razor"
|
||||
desc = "The latest and greatest power razor born from the science of shaving."
|
||||
@@ -107,6 +112,7 @@
|
||||
flags_1 = CONDUCT_1
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
|
||||
/obj/item/razor/proc/shave(mob/living/carbon/human/H, location = "mouth")
|
||||
if(location == "mouth")
|
||||
H.facial_hair_style = "Shaved"
|
||||
|
||||
@@ -393,7 +393,7 @@
|
||||
|
||||
/obj/item/twohanded/shockpaddles/proc/can_defib(mob/living/carbon/human/H)
|
||||
var/obj/item/organ/brain/BR = H.getorgan(/obj/item/organ/brain)
|
||||
return (!H.suiciding && !(H.has_disability(NOCLONE)) && !H.hellbound && ((world.time - H.timeofdeath) < tlimit) && (H.getBruteLoss() < 180) && (H.getFireLoss() < 180) && H.getorgan(/obj/item/organ/heart) && BR && !BR.damaged_brain)
|
||||
return (!H.suiciding && !(H.has_disability(DISABILITY_NOCLONE)) && !H.hellbound && ((world.time - H.timeofdeath) < tlimit) && (H.getBruteLoss() < 180) && (H.getFireLoss() < 180) && H.getorgan(/obj/item/organ/heart) && BR && !BR.damaged_brain)
|
||||
|
||||
/obj/item/twohanded/shockpaddles/proc/shock_touching(dmg, mob/H)
|
||||
if(isliving(H.pulledby)) //CLEAR!
|
||||
@@ -514,7 +514,7 @@
|
||||
shock_touching(30, H)
|
||||
var/failed
|
||||
|
||||
if (H.suiciding || (H.has_disability(NOCLONE)))
|
||||
if (H.suiciding || (H.has_disability(DISABILITY_NOCLONE)))
|
||||
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Recovery of patient impossible. Further attempts futile.</span>"
|
||||
else if (H.hellbound)
|
||||
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's soul appears to be on another plane of existence. Further attempts futile.</span>"
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
add_fingerprint(user)
|
||||
if(istype(M) && on && user.zone_selected in list("eyes", "mouth"))
|
||||
|
||||
if((user.has_disability(CLUMSY) || user.has_disability(DUMB)) && prob(50)) //too dumb to use flashlight properly
|
||||
if((user.has_disability(DISABILITY_CLUMSY) || user.has_disability(DISABILITY_DUMB)) && prob(50)) //too dumb to use flashlight properly
|
||||
return ..() //just hit them in the head
|
||||
|
||||
if(!user.IsAdvancedToolUser())
|
||||
@@ -82,7 +82,7 @@
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] directs [src] to [M]'s eyes.</span>", \
|
||||
"<span class='danger'>You direct [src] to [M]'s eyes.</span>")
|
||||
if(M.stat == DEAD || (M.has_disability(BLIND)) || !M.flash_act(visual = 1)) //mob is dead or fully blind
|
||||
if(M.stat == DEAD || (M.has_disability(DISABILITY_BLIND)) || !M.flash_act(visual = 1)) //mob is dead or fully blind
|
||||
to_chat(user, "<span class='warning'>[M]'s pupils don't react to the light!</span>")
|
||||
else if(M.dna && M.dna.check_mutation(XRAY)) //mob has X-RAY vision
|
||||
to_chat(user, "<span class='danger'>[M]'s pupils give an eerie glow!</span>")
|
||||
|
||||
@@ -85,7 +85,7 @@ GAS ANALYZER
|
||||
/obj/item/device/healthanalyzer/attack(mob/living/M, mob/living/carbon/human/user)
|
||||
|
||||
// Clumsiness/brain damage check
|
||||
if ((user.has_disability(CLUMSY) || user.has_disability(DUMB)) && prob(50))
|
||||
if ((user.has_disability(DISABILITY_CLUMSY) || user.has_disability(DISABILITY_DUMB)) && prob(50))
|
||||
to_chat(user, "<span class='notice'>You stupidly try to analyze the floor's vitals!</span>")
|
||||
user.visible_message("<span class='warning'>[user] has analyzed the floor's vitals!</span>")
|
||||
to_chat(user, "<span class='info'>Analyzing results for The floor:\n\tOverall status: <b>Healthy</b>")
|
||||
@@ -181,10 +181,10 @@ GAS ANALYZER
|
||||
to_chat(user, "\t<span class='info'><b>==EAR STATUS==</b></span>")
|
||||
if(istype(ears))
|
||||
var/healthy = TRUE
|
||||
if(C.has_disability(DEAF, GENETIC_MUTATION))
|
||||
if(C.has_disability(DISABILITY_DEAF, GENETIC_MUTATION))
|
||||
healthy = FALSE
|
||||
to_chat(user, "\t<span class='alert'>Subject is genetically deaf.</span>")
|
||||
else if(C.has_disability(DEAF))
|
||||
else if(C.has_disability(DISABILITY_DEAF))
|
||||
healthy = FALSE
|
||||
to_chat(user, "\t<span class='alert'>Subject is deaf.</span>")
|
||||
else
|
||||
@@ -202,10 +202,10 @@ GAS ANALYZER
|
||||
to_chat(user, "\t<span class='info'><b>==EYE STATUS==</b></span>")
|
||||
if(istype(eyes))
|
||||
var/healthy = TRUE
|
||||
if(C.has_disability(BLIND))
|
||||
if(C.has_disability(DISABILITY_BLIND))
|
||||
to_chat(user, "\t<span class='alert'>Subject is blind.</span>")
|
||||
healthy = FALSE
|
||||
if(C.has_disability(NEARSIGHT))
|
||||
if(C.has_disability(DISABILITY_NEARSIGHT))
|
||||
to_chat(user, "\t<span class='alert'>Subject is nearsighted.</span>")
|
||||
healthy = FALSE
|
||||
if(eyes.eye_damage > 30)
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
/obj/item/dnainjector/proc/inject(mob/living/carbon/M, mob/user)
|
||||
prepare()
|
||||
|
||||
if(M.has_dna() && !(RADIMMUNE in M.dna.species.species_traits) && !(M.has_disability(NOCLONE)))
|
||||
if(M.has_dna() && !(RADIMMUNE in M.dna.species.species_traits) && !(M.has_disability(DISABILITY_NOCLONE)))
|
||||
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
|
||||
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
|
||||
for(var/datum/mutation/human/HM in remove_mutations)
|
||||
@@ -313,7 +313,7 @@
|
||||
to_chat(user, "<span class='notice'>You can't modify [M]'s DNA while [M.p_theyre()] dead.</span>")
|
||||
return FALSE
|
||||
|
||||
if(M.has_dna() && !(M.has_disability(NOCLONE)))
|
||||
if(M.has_dna() && !(M.has_disability(DISABILITY_NOCLONE)))
|
||||
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
|
||||
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
|
||||
var/endtime = world.time+duration
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/item/grenade/proc/clown_check(mob/living/carbon/human/user)
|
||||
if(user.has_disability(CLUMSY) && prob(50))
|
||||
if(user.has_disability(DISABILITY_CLUMSY) && prob(50))
|
||||
to_chat(user, "<span class='warning'>Huh? How does this thing work?</span>")
|
||||
preprime(user, 5, FALSE)
|
||||
return FALSE
|
||||
|
||||
@@ -1,19 +1,6 @@
|
||||
/obj/item/restraints
|
||||
breakouttime = 600
|
||||
|
||||
/obj/item/restraints/Destroy()
|
||||
if(iscarbon(loc))
|
||||
var/mob/living/carbon/M = loc
|
||||
if(M.handcuffed == src)
|
||||
M.handcuffed = null
|
||||
M.update_handcuffed()
|
||||
if(M.buckled && M.buckled.buckle_requires_restraints)
|
||||
M.buckled.unbuckle_mob(M)
|
||||
if(M.legcuffed == src)
|
||||
M.legcuffed = null
|
||||
M.update_inv_legcuffed()
|
||||
return ..()
|
||||
|
||||
//Handcuffs
|
||||
|
||||
/obj/item/restraints/handcuffs
|
||||
@@ -39,7 +26,7 @@
|
||||
/obj/item/restraints/handcuffs/attack(mob/living/carbon/C, mob/living/carbon/human/user)
|
||||
if(!istype(C))
|
||||
return
|
||||
if(user.has_disability(CLUMSY) && prob(50))
|
||||
if(user.has_disability(DISABILITY_CLUMSY) && prob(50))
|
||||
to_chat(user, "<span class='warning'>Uh... how do those things work?!</span>")
|
||||
apply_cuffs(user,user)
|
||||
return
|
||||
@@ -392,4 +379,4 @@
|
||||
B.Crossed(hit_atom)
|
||||
qdel(src)
|
||||
..()
|
||||
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
forkload = null
|
||||
|
||||
else if(user.zone_selected == "eyes")
|
||||
if(user.has_disability(CLUMSY) && prob(50))
|
||||
if(user.has_disability(DISABILITY_CLUMSY) && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
else
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
/obj/item/kitchen/knife/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
if(user.zone_selected == "eyes")
|
||||
if(user.has_disability(CLUMSY) && prob(50))
|
||||
if(user.has_disability(DISABILITY_CLUMSY) && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
else
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
return ..()
|
||||
|
||||
add_fingerprint(user)
|
||||
if((user.has_disability(CLUMSY)) && prob(50))
|
||||
if((user.has_disability(DISABILITY_CLUMSY)) && prob(50))
|
||||
to_chat(user, "<span class ='danger'>You club yourself over the head.</span>")
|
||||
user.Knockdown(60 * force)
|
||||
if(ishuman(user))
|
||||
|
||||
@@ -72,6 +72,6 @@
|
||||
to_chat(user, "<span class='notice'>[src] [active ? "is now active":"can now be concealed"].</span>")
|
||||
|
||||
/obj/item/melee/transforming/proc/clumsy_transform_effect(mob/living/user)
|
||||
if(user.has_disability(CLUMSY) && prob(50))
|
||||
if(user.has_disability(DISABILITY_CLUMSY) && prob(50))
|
||||
to_chat(user, "<span class='warning'>You accidentally cut yourself with [src], like a doofus!</span>")
|
||||
user.take_bodypart_damage(5,5)
|
||||
|
||||
@@ -125,14 +125,14 @@
|
||||
loadedWeightClass += I.w_class
|
||||
return TRUE
|
||||
|
||||
/obj/item/pneumatic_cannon/afterattack(atom/target, mob/living/user, flag, params)
|
||||
/obj/item/pneumatic_cannon/afterattack(atom/target, mob/living/carbon/human/user, flag, params)
|
||||
if(flag && user.a_intent == INTENT_HARM) //melee attack
|
||||
return
|
||||
if(!istype(user))
|
||||
return
|
||||
Fire(user, target)
|
||||
|
||||
/obj/item/pneumatic_cannon/proc/Fire(mob/living/user, var/atom/target)
|
||||
/obj/item/pneumatic_cannon/proc/Fire(mob/living/carbon/human/user, var/atom/target)
|
||||
if(!istype(user) && !target)
|
||||
return
|
||||
var/discharge = 0
|
||||
@@ -147,7 +147,7 @@
|
||||
if(tank && !tank.air_contents.remove(gasPerThrow * pressureSetting))
|
||||
to_chat(user, "<span class='warning'>\The [src] lets out a weak hiss and doesn't react!</span>")
|
||||
return
|
||||
if(user.has_disability(CLUMSY) && prob(75) && clumsyCheck && iscarbon(user))
|
||||
if(user.has_disability(DISABILITY_CLUMSY) && prob(75) && clumsyCheck && iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.visible_message("<span class='warning'>[C] loses their grip on [src], causing it to go off!</span>", "<span class='userdanger'>[src] slips out of your hands and goes off!</span>")
|
||||
C.dropItemToGround(src, TRUE)
|
||||
@@ -164,10 +164,9 @@
|
||||
var/turf/T = get_target(target, get_turf(src))
|
||||
playsound(src.loc, 'sound/weapons/sonic_jackhammer.ogg', 50, 1)
|
||||
fire_items(T, user)
|
||||
if(pressureSetting >= 3 && iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.visible_message("<span class='warning'>[C] is thrown down by the force of the cannon!</span>", "<span class='userdanger'>[src] slams into your shoulder, knocking you down!")
|
||||
C.Knockdown(60)
|
||||
if(pressureSetting >= 3 && user)
|
||||
user.visible_message("<span class='warning'>[user] is thrown down by the force of the cannon!</span>", "<span class='userdanger'>[src] slams into your shoulder, knocking you down!")
|
||||
user.Knockdown(60)
|
||||
|
||||
/obj/item/pneumatic_cannon/proc/fire_items(turf/target, mob/user)
|
||||
if(fire_mode == PCANNON_FIREALL)
|
||||
@@ -273,10 +272,3 @@
|
||||
selfcharge = TRUE
|
||||
charge_type = /obj/item/reagent_containers/food/snacks/pie/cream
|
||||
maxWeightClass = 60 //20 pies.
|
||||
|
||||
/obj/item/pneumatic_cannon/pie/selfcharge/cyborg
|
||||
name = "low velocity pie cannon"
|
||||
automatic = FALSE
|
||||
charge_type = /obj/item/reagent_containers/food/snacks/pie/cream/nostun
|
||||
maxWeightClass = 6 //2 pies
|
||||
charge_ticks = 2 //4 second/pie
|
||||
|
||||
@@ -355,9 +355,6 @@
|
||||
var/hitdamage = 0
|
||||
var/emaggedhitdamage = 3
|
||||
|
||||
/obj/item/borg/lollipop/clown
|
||||
emaggedhitdamage = 0
|
||||
|
||||
/obj/item/borg/lollipop/equipped()
|
||||
check_amount()
|
||||
|
||||
|
||||
+142
-142
@@ -1,142 +1,142 @@
|
||||
/obj/item/shield
|
||||
name = "shield"
|
||||
block_chance = 50
|
||||
armor = list(melee = 50, bullet = 50, laser = 50, energy = 0, bomb = 30, bio = 0, rad = 0, fire = 80, acid = 70)
|
||||
|
||||
/obj/item/shield/riot
|
||||
name = "riot shield"
|
||||
desc = "A shield adept at blocking blunt objects from connecting with the torso of the shield wielder."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "riot"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi'
|
||||
slot_flags = SLOT_BACK
|
||||
force = 10
|
||||
throwforce = 5
|
||||
throw_speed = 2
|
||||
throw_range = 3
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
materials = list(MAT_GLASS=7500, MAT_METAL=1000)
|
||||
attack_verb = list("shoved", "bashed")
|
||||
var/cooldown = 0 //shield bash cooldown. based on world.time
|
||||
|
||||
|
||||
/obj/item/shield/riot/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/melee/baton))
|
||||
if(cooldown < world.time - 25)
|
||||
user.visible_message("<span class='warning'>[user] bashes [src] with [W]!</span>")
|
||||
playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1)
|
||||
cooldown = world.time
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/shield/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(attack_type == THROWN_PROJECTILE_ATTACK)
|
||||
final_block_chance += 30
|
||||
if(attack_type == LEAP_ATTACK)
|
||||
final_block_chance = 100
|
||||
return ..()
|
||||
|
||||
/obj/item/shield/riot/roman
|
||||
name = "roman shield"
|
||||
desc = "Bears an inscription on the inside: <i>\"Romanes venio domus\"</i>."
|
||||
icon_state = "roman_shield"
|
||||
item_state = "roman_shield"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi'
|
||||
|
||||
/obj/item/shield/riot/buckler
|
||||
name = "wooden buckler"
|
||||
desc = "A medieval wooden buckler."
|
||||
icon_state = "buckler"
|
||||
item_state = "buckler"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi'
|
||||
materials = list()
|
||||
resistance_flags = FLAMMABLE
|
||||
block_chance = 30
|
||||
|
||||
/obj/item/shield/energy
|
||||
name = "energy combat shield"
|
||||
desc = "A shield capable of stopping most melee attacks. Protects user from almost all energy projectiles. It can be retracted, expanded, and stored anywhere."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "eshield0" // eshield1 for expanded
|
||||
lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi'
|
||||
force = 3
|
||||
throwforce = 3
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
attack_verb = list("shoved", "bashed")
|
||||
var/active = 0
|
||||
|
||||
/obj/item/shield/energy/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
return 0
|
||||
|
||||
/obj/item/shield/energy/IsReflect()
|
||||
return (active)
|
||||
|
||||
/obj/item/shield/energy/attack_self(mob/living/carbon/human/user)
|
||||
if(user.has_disability(CLUMSY) && prob(50))
|
||||
to_chat(user, "<span class='warning'>You beat yourself in the head with [src].</span>")
|
||||
user.take_bodypart_damage(5)
|
||||
active = !active
|
||||
icon_state = "eshield[active]"
|
||||
|
||||
if(active)
|
||||
force = 10
|
||||
throwforce = 8
|
||||
throw_speed = 2
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
playsound(user, 'sound/weapons/saberon.ogg', 35, 1)
|
||||
to_chat(user, "<span class='notice'>[src] is now active.</span>")
|
||||
else
|
||||
force = 3
|
||||
throwforce = 3
|
||||
throw_speed = 3
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
playsound(user, 'sound/weapons/saberoff.ogg', 35, 1)
|
||||
to_chat(user, "<span class='notice'>[src] can now be concealed.</span>")
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/shield/riot/tele
|
||||
name = "telescopic shield"
|
||||
desc = "An advanced riot shield made of lightweight materials that collapses for easy storage."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "teleriot0"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi'
|
||||
slot_flags = null
|
||||
force = 3
|
||||
throwforce = 3
|
||||
throw_speed = 3
|
||||
throw_range = 4
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
var/active = 0
|
||||
|
||||
/obj/item/shield/riot/tele/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(active)
|
||||
return ..()
|
||||
return 0
|
||||
|
||||
/obj/item/shield/riot/tele/attack_self(mob/living/user)
|
||||
active = !active
|
||||
icon_state = "teleriot[active]"
|
||||
playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1)
|
||||
|
||||
if(active)
|
||||
force = 8
|
||||
throwforce = 5
|
||||
throw_speed = 2
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
slot_flags = SLOT_BACK
|
||||
to_chat(user, "<span class='notice'>You extend \the [src].</span>")
|
||||
else
|
||||
force = 3
|
||||
throwforce = 3
|
||||
throw_speed = 3
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
slot_flags = null
|
||||
to_chat(user, "<span class='notice'>[src] can now be concealed.</span>")
|
||||
add_fingerprint(user)
|
||||
/obj/item/shield
|
||||
name = "shield"
|
||||
block_chance = 50
|
||||
armor = list(melee = 50, bullet = 50, laser = 50, energy = 0, bomb = 30, bio = 0, rad = 0, fire = 80, acid = 70)
|
||||
|
||||
/obj/item/shield/riot
|
||||
name = "riot shield"
|
||||
desc = "A shield adept at blocking blunt objects from connecting with the torso of the shield wielder."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "riot"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi'
|
||||
slot_flags = SLOT_BACK
|
||||
force = 10
|
||||
throwforce = 5
|
||||
throw_speed = 2
|
||||
throw_range = 3
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
materials = list(MAT_GLASS=7500, MAT_METAL=1000)
|
||||
attack_verb = list("shoved", "bashed")
|
||||
var/cooldown = 0 //shield bash cooldown. based on world.time
|
||||
|
||||
|
||||
/obj/item/shield/riot/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/melee/baton))
|
||||
if(cooldown < world.time - 25)
|
||||
user.visible_message("<span class='warning'>[user] bashes [src] with [W]!</span>")
|
||||
playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1)
|
||||
cooldown = world.time
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/shield/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(attack_type == THROWN_PROJECTILE_ATTACK)
|
||||
final_block_chance += 30
|
||||
if(attack_type == LEAP_ATTACK)
|
||||
final_block_chance = 100
|
||||
return ..()
|
||||
|
||||
/obj/item/shield/riot/roman
|
||||
name = "roman shield"
|
||||
desc = "Bears an inscription on the inside: <i>\"Romanes venio domus\"</i>."
|
||||
icon_state = "roman_shield"
|
||||
item_state = "roman_shield"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi'
|
||||
|
||||
/obj/item/shield/riot/buckler
|
||||
name = "wooden buckler"
|
||||
desc = "A medieval wooden buckler."
|
||||
icon_state = "buckler"
|
||||
item_state = "buckler"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi'
|
||||
materials = list()
|
||||
resistance_flags = FLAMMABLE
|
||||
block_chance = 30
|
||||
|
||||
/obj/item/shield/energy
|
||||
name = "energy combat shield"
|
||||
desc = "A shield capable of stopping most melee attacks. Protects user from almost all energy projectiles. It can be retracted, expanded, and stored anywhere."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "eshield0" // eshield1 for expanded
|
||||
lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi'
|
||||
force = 3
|
||||
throwforce = 3
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
attack_verb = list("shoved", "bashed")
|
||||
var/active = 0
|
||||
|
||||
/obj/item/shield/energy/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
return 0
|
||||
|
||||
/obj/item/shield/energy/IsReflect()
|
||||
return (active)
|
||||
|
||||
/obj/item/shield/energy/attack_self(mob/living/carbon/human/user)
|
||||
if(user.has_disability(DISABILITY_CLUMSY) && prob(50))
|
||||
to_chat(user, "<span class='warning'>You beat yourself in the head with [src].</span>")
|
||||
user.take_bodypart_damage(5)
|
||||
active = !active
|
||||
icon_state = "eshield[active]"
|
||||
|
||||
if(active)
|
||||
force = 10
|
||||
throwforce = 8
|
||||
throw_speed = 2
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
playsound(user, 'sound/weapons/saberon.ogg', 35, 1)
|
||||
to_chat(user, "<span class='notice'>[src] is now active.</span>")
|
||||
else
|
||||
force = 3
|
||||
throwforce = 3
|
||||
throw_speed = 3
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
playsound(user, 'sound/weapons/saberoff.ogg', 35, 1)
|
||||
to_chat(user, "<span class='notice'>[src] can now be concealed.</span>")
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/shield/riot/tele
|
||||
name = "telescopic shield"
|
||||
desc = "An advanced riot shield made of lightweight materials that collapses for easy storage."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "teleriot0"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi'
|
||||
slot_flags = null
|
||||
force = 3
|
||||
throwforce = 3
|
||||
throw_speed = 3
|
||||
throw_range = 4
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
var/active = 0
|
||||
|
||||
/obj/item/shield/riot/tele/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(active)
|
||||
return ..()
|
||||
return 0
|
||||
|
||||
/obj/item/shield/riot/tele/attack_self(mob/living/user)
|
||||
active = !active
|
||||
icon_state = "teleriot[active]"
|
||||
playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1)
|
||||
|
||||
if(active)
|
||||
force = 8
|
||||
throwforce = 5
|
||||
throw_speed = 2
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
slot_flags = SLOT_BACK
|
||||
to_chat(user, "<span class='notice'>You extend \the [src].</span>")
|
||||
else
|
||||
force = 3
|
||||
throwforce = 3
|
||||
throw_speed = 3
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
slot_flags = null
|
||||
to_chat(user, "<span class='notice'>[src] can now be concealed.</span>")
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -10,23 +10,13 @@
|
||||
var/label = ""
|
||||
var/last_wave = 0
|
||||
|
||||
/obj/item/picket_sign/cyborg
|
||||
name = "metallic nano-sign"
|
||||
desc = "A high tech picket sign used by silicons that can reprogram its surface at will. Probably hurts to get hit by, too."
|
||||
force = 13
|
||||
resistance_flags = NONE
|
||||
actions_types = list(/datum/action/item_action/nano_picket_sign)
|
||||
|
||||
/obj/item/picket_sign/proc/retext(mob/user)
|
||||
var/txt = stripped_input(user, "What would you like to write on the sign?", "Sign Label", null , 30)
|
||||
if(txt && Adjacent(user))
|
||||
label = txt
|
||||
name = "[label] sign"
|
||||
desc = "It reads: [label]"
|
||||
|
||||
/obj/item/picket_sign/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/pen) || istype(W, /obj/item/toy/crayon))
|
||||
retext(user)
|
||||
var/txt = stripped_input(user, "What would you like to write on the sign?", "Sign Label", null , 30)
|
||||
if(txt)
|
||||
label = txt
|
||||
src.name = "[label] sign"
|
||||
desc = "It reads: [label]"
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
if (recipes_sublist && recipe_list[recipes_sublist] && istype(recipe_list[recipes_sublist], /datum/stack_recipe_list))
|
||||
var/datum/stack_recipe_list/srl = recipe_list[recipes_sublist]
|
||||
recipe_list = srl.recipes
|
||||
var/t1 = "Amount Left: [get_amount()]<br>"
|
||||
var/t1 = "Amount Left: [amount]<br>"
|
||||
for(var/i in 1 to length(recipe_list))
|
||||
var/E = recipe_list[i]
|
||||
if (isnull(E))
|
||||
@@ -161,8 +161,8 @@
|
||||
if (href_list["sublist"] && !href_list["make"])
|
||||
interact(usr, text2num(href_list["sublist"]))
|
||||
if (href_list["make"])
|
||||
if (get_amount() < 1 && !is_cyborg)
|
||||
qdel(src)
|
||||
if (get_amount() < 1)
|
||||
qdel(src) //Never should happen
|
||||
|
||||
var/list/recipes_list = recipes
|
||||
if (href_list["sublist"])
|
||||
|
||||
@@ -93,8 +93,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible",
|
||||
if (!user.IsAdvancedToolUser())
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
|
||||
if (user.has_disability(CLUMSY) && prob(50))
|
||||
if (user.has_disability(DISABILITY_CLUMSY) && prob(50))
|
||||
to_chat(user, "<span class='danger'>[src] slips out of your hand and hits your head.</span>")
|
||||
user.take_bodypart_damage(10)
|
||||
user.Unconscious(400)
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/melee/baton/attack(mob/M, mob/living/carbon/human/user)
|
||||
if(status && user.has_disability(CLUMSY) && prob(50))
|
||||
if(status && user.has_disability(DISABILITY_CLUMSY) && prob(50))
|
||||
user.visible_message("<span class='danger'>[user] accidentally hits themself with [src]!</span>", \
|
||||
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
|
||||
user.Knockdown(stunforce*3)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
/obj/item/melee/baton/cattleprod/teleprod/attack(mob/living/carbon/M, mob/living/carbon/user)//handles making things teleport when hit
|
||||
..()
|
||||
if(status && user.has_disability(CLUMSY) && prob(50))
|
||||
if(status && user.has_disability(DISABILITY_CLUMSY) && prob(50))
|
||||
user.visible_message("<span class='danger'>[user] accidentally hits themself with [src]!</span>", \
|
||||
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
|
||||
if(do_teleport(user, get_turf(user), 50))//honk honk
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
return ..()
|
||||
if(user.zone_selected != "eyes" && user.zone_selected != "head")
|
||||
return ..()
|
||||
if(user.has_disability(CLUMSY) && prob(50))
|
||||
if(user.has_disability(DISABILITY_CLUMSY) && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
|
||||
|
||||
@@ -14,8 +14,7 @@
|
||||
materials = list(MAT_METAL=80)
|
||||
attack_verb = list("pinched", "nipped")
|
||||
hitsound = 'sound/items/wirecutter.ogg'
|
||||
usesound = 'sound/items/wirecutter.ogg'
|
||||
|
||||
usesound = 'sound/items/wirecutter.ogg'
|
||||
|
||||
tool_behaviour = TOOL_WIRECUTTER
|
||||
toolspeed = 1
|
||||
@@ -33,6 +32,10 @@
|
||||
/obj/item/wirecutters/attack(mob/living/carbon/C, mob/user)
|
||||
if(istype(C) && C.handcuffed && istype(C.handcuffed, /obj/item/restraints/handcuffs/cable))
|
||||
user.visible_message("<span class='notice'>[user] cuts [C]'s restraints with [src]!</span>")
|
||||
qdel(C.handcuffed)
|
||||
C.handcuffed = null
|
||||
if(C.buckled && C.buckled.buckle_requires_restraints)
|
||||
C.buckled.unbuckle_mob(C)
|
||||
C.update_handcuffed()
|
||||
return
|
||||
else
|
||||
@@ -55,8 +58,7 @@
|
||||
name = "alien wirecutters"
|
||||
desc = "Extremely sharp wirecutters, made out of a silvery-green metal."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
toolspeed = 0.1
|
||||
|
||||
icon_state = "cutters"
|
||||
toolspeed = 0.1
|
||||
|
||||
random_color = FALSE
|
||||
@@ -68,8 +70,7 @@
|
||||
|
||||
/obj/item/wirecutters/power
|
||||
name = "jaws of life"
|
||||
item_state = "jawsoflife"
|
||||
|
||||
desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a cutting head."
|
||||
icon_state = "jaws_cutter"
|
||||
item_state = "jawsoflife"
|
||||
|
||||
@@ -91,12 +92,4 @@
|
||||
|
||||
/obj/item/wirecutters/power/attack_self(mob/user)
|
||||
playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1)
|
||||
user.put_in_active_hand(pryjaws)
|
||||
|
||||
/obj/item/wirecutters/power/attack(mob/living/carbon/C, mob/user)
|
||||
if(istype(C) && C.handcuffed)
|
||||
user.visible_message("<span class='notice'>[user] cuts [C]'s restraints with [src]!</span>")
|
||||
qdel(C.handcuffed)
|
||||
return
|
||||
else
|
||||
..()
|
||||
var/obj/item/crowbar/power/pryjaws = new /obj/item/crowbar/power
|
||||
@@ -302,7 +302,7 @@
|
||||
unwield()
|
||||
return
|
||||
..()
|
||||
if(user.has_disability(CLUMSY) && (wielded) && prob(40))
|
||||
if(user.has_disability(DISABILITY_CLUMSY) && (wielded) && prob(40))
|
||||
impale(user)
|
||||
return
|
||||
if((wielded) && prob(50))
|
||||
|
||||
@@ -10,65 +10,72 @@
|
||||
density = TRUE
|
||||
pixel_x = -16
|
||||
layer = FLY_LAYER
|
||||
var/cut = FALSE
|
||||
var/log_amount = 10
|
||||
|
||||
/obj/structure/flora/tree/attackby(obj/item/W, mob/user, params)
|
||||
if(!cut && log_amount && (!(flags_1 & NODECONSTRUCT_1)))
|
||||
if(log_amount && (!(flags_1 & NODECONSTRUCT_1)))
|
||||
if(W.sharpness && W.force > 0)
|
||||
if(W.hitsound)
|
||||
playsound(get_turf(src), W.hitsound, 100, 0, 0)
|
||||
user.visible_message("<span class='notice'>[user] begins to cut down [src] with [W].</span>","<span class='notice'>You begin to cut down [src] with [W].</span>", "You hear the sound of sawing.")
|
||||
if(do_after(user, 1000/W.force, target = user)) //5 seconds with 20 force, 8 seconds with a hatchet, 20 seconds with a shard.
|
||||
if(cut)
|
||||
return
|
||||
if(do_after(user, 1000/W.force, target = src)) //5 seconds with 20 force, 8 seconds with a hatchet, 20 seconds with a shard.
|
||||
user.visible_message("<span class='notice'>[user] fells [src] with the [W].</span>","<span class='notice'>You fell [src] with the [W].</span>", "You hear the sound of a tree falling.")
|
||||
playsound(get_turf(src), 'sound/effects/meteorimpact.ogg', 100 , 0, 0)
|
||||
icon = 'icons/obj/flora/pinetrees.dmi'
|
||||
icon_state = "tree_stump"
|
||||
density = FALSE
|
||||
pixel_x = -16
|
||||
name += " stump"
|
||||
cut = TRUE
|
||||
for(var/i=1 to log_amount)
|
||||
new /obj/item/grown/log/tree(get_turf(src))
|
||||
|
||||
var/obj/structure/flora/stump/S = new(loc)
|
||||
S.name = "[name] stump"
|
||||
|
||||
qdel(src)
|
||||
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/flora/stump
|
||||
name = "stump"
|
||||
desc = "This represents our promise to the crew, and the station itself, to cut down as many trees as possible." //running naked through the trees
|
||||
icon = 'icons/obj/flora/pinetrees.dmi'
|
||||
icon_state = "tree_stump"
|
||||
density = FALSE
|
||||
pixel_x = -16
|
||||
|
||||
/obj/structure/flora/tree/pine
|
||||
name = "pine tree"
|
||||
desc = "A coniferous pine tree."
|
||||
icon = 'icons/obj/flora/pinetrees.dmi'
|
||||
icon_state = "pine_1"
|
||||
var/list/icon_states = list("pine_1", "pine_2", "pine_3")
|
||||
|
||||
/obj/structure/flora/tree/pine/Initialize()
|
||||
icon_state = "pine_[rand(1, 3)]"
|
||||
. = ..()
|
||||
|
||||
if(islist(icon_states && icon_states.len))
|
||||
icon_state = pick(icon_states)
|
||||
|
||||
/obj/structure/flora/tree/pine/xmas
|
||||
name = "xmas tree"
|
||||
desc = "A wondrous decorated Christmas tree."
|
||||
icon_state = "pine_c"
|
||||
var/gifts_under_tree = FALSE
|
||||
icon_states = null
|
||||
|
||||
/obj/structure/flora/tree/pine/xmas/presents
|
||||
icon_state = "pinepresents"
|
||||
desc = "A wondrous decorated Christmas tree. It has presents!"
|
||||
var/gift_type = /obj/item/a_gift/anything
|
||||
var/list/ckeys_that_took = list()
|
||||
|
||||
/obj/structure/flora/tree/pine/xmas/attack_hand(mob/living/user)
|
||||
if(!gifts_under_tree)
|
||||
return
|
||||
/obj/structure/flora/tree/pine/xmas/presents/attack_hand(mob/living/user)
|
||||
if(!user.ckey)
|
||||
return
|
||||
|
||||
if(ckeys_that_took[user.ckey])
|
||||
to_chat(user, "<span class='warning'>You already took your gift.</span>")
|
||||
to_chat(user, "<span class='warning'>There are no presents with your name on.</span>")
|
||||
return
|
||||
to_chat(user, "<span class='warning'>After a bit of rummaging, you locate a gift with your name on it!</span>")
|
||||
ckeys_that_took[user.ckey] = TRUE
|
||||
var/obj/item/a_gift/anything/A = new
|
||||
user.put_in_hands(A)
|
||||
|
||||
/obj/structure/flora/tree/pine/xmas/Initialize()
|
||||
. = ..()
|
||||
icon_state = "pine_c"
|
||||
var/obj/item/G = new gift_type(src)
|
||||
user.put_in_hands(G)
|
||||
|
||||
/obj/structure/flora/tree/dead
|
||||
icon = 'icons/obj/flora/deadtrees.dmi'
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
L.buckled.unbuckle_mob(L,force=1)
|
||||
L.visible_message("<span class='warning'>[L]'s skin rapidly turns to marble!</span>", "<span class='userdanger'>Your body freezes up! Can't... move... can't... think...</span>")
|
||||
L.forceMove(src)
|
||||
L.add_disability(MUTE, STATUE_MUTE)
|
||||
L.add_disability(DISABILITY_MUTE, STATUE_MUTE)
|
||||
L.faction += "mimic" //Stops mimics from instaqdeling people in statues
|
||||
L.status_flags |= GODMODE
|
||||
obj_integrity = L.health + 100 //stoning damaged mobs will result in easier to shatter statues
|
||||
@@ -59,7 +59,7 @@
|
||||
if(petrified_mob)
|
||||
petrified_mob.status_flags &= ~GODMODE
|
||||
petrified_mob.forceMove(loc)
|
||||
petrified_mob.remove_disability(MUTE, STATUE_MUTE)
|
||||
petrified_mob.remove_disability(DISABILITY_MUTE, STATUE_MUTE)
|
||||
petrified_mob.take_overall_damage((petrified_mob.health - obj_integrity + 100)) //any new damage the statue incurred is transfered to the mob
|
||||
petrified_mob.faction -= "mimic"
|
||||
petrified_mob = null
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
var/new_angle = WRAP(rotation_angle + norm_inc, 180, -180)
|
||||
if(ISINRANGE_EX(norm_inc, -90, 90))
|
||||
return FALSE
|
||||
P.setAngle(new_angle)
|
||||
P.Angle = new_angle
|
||||
return ..()
|
||||
|
||||
//DOUBLE
|
||||
@@ -229,7 +229,7 @@
|
||||
var/new_angle = WRAP(rotation_angle + norm_inc, 180, -180)
|
||||
if(ISINRANGE_EX(norm_inc, -90, 90))
|
||||
new_angle += 180
|
||||
P.setAngle(new_angle)
|
||||
P.Angle = new_angle
|
||||
return ..()
|
||||
|
||||
//BOX
|
||||
@@ -251,7 +251,7 @@
|
||||
anchored = TRUE
|
||||
|
||||
/obj/structure/reflector/box/auto_reflect(obj/item/projectile/P)
|
||||
P.setAngle(rotation_angle)
|
||||
P.Angle = rotation_angle
|
||||
return ..()
|
||||
|
||||
/obj/structure/reflector/ex_act()
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
/turf/closed/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && (mover.pass_flags & PASSCLOSEDTURF))
|
||||
return TRUE
|
||||
else
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/turf/closed/indestructible
|
||||
name = "wall"
|
||||
@@ -165,4 +164,4 @@
|
||||
name = "wall"
|
||||
desc = "A wall made out of a strange metal. The squares on it pulse in a predictable pattern."
|
||||
icon = 'icons/turf/walls/hierophant_wall.dmi'
|
||||
icon_state = "wall"
|
||||
icon_state = "wall"
|
||||
@@ -88,7 +88,7 @@
|
||||
/turf/open/indestructible/clock_spawn_room/proc/port_servants()
|
||||
. = FALSE
|
||||
for(var/mob/living/L in src)
|
||||
if(is_servant_of_ratvar(L))
|
||||
if(is_servant_of_ratvar(L) && L.stat != DEAD)
|
||||
. = TRUE
|
||||
L.forceMove(get_turf(pick(GLOB.servant_spawns)))
|
||||
visible_message("<span class='warning'>[L] vanishes in a flash of red!</span>")
|
||||
|
||||
@@ -146,9 +146,6 @@
|
||||
var/uses_overlay = TRUE
|
||||
var/obj/effect/clockwork/overlay/floor/realappearence
|
||||
|
||||
/turf/open/floor/clockwork/Bless() //Who needs holy blessings when you have DADDY RATVAR?
|
||||
return
|
||||
|
||||
/turf/open/floor/clockwork/Initialize()
|
||||
. = ..()
|
||||
if(uses_overlay)
|
||||
|
||||
@@ -70,10 +70,6 @@
|
||||
if(realappearence)
|
||||
qdel(realappearence)
|
||||
realappearence = null
|
||||
if(heated)
|
||||
var/mob/camera/eminence/E = get_eminence()
|
||||
if(E)
|
||||
E.superheated_walls--
|
||||
return ..()
|
||||
|
||||
/turf/closed/wall/clockwork/ReplaceWithLattice()
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
new_angle_s -= 360
|
||||
while(new_angle_s < -180)
|
||||
new_angle_s += 360
|
||||
P.setAngle(new_angle_s)
|
||||
P.Angle = new_angle_s
|
||||
return TRUE
|
||||
|
||||
/turf/closed/wall/proc/dismantle_wall(devastated=0, explode=0)
|
||||
|
||||
+3
-1
@@ -37,6 +37,9 @@ GLOBAL_PROTECT(security_mode)
|
||||
if(fexists(RESTART_COUNTER_PATH))
|
||||
GLOB.restart_counter = text2num(trim(file2text(RESTART_COUNTER_PATH)))
|
||||
fdel(RESTART_COUNTER_PATH)
|
||||
|
||||
if("no-init" in params)
|
||||
return
|
||||
|
||||
Master.Initialize(10, FALSE)
|
||||
|
||||
@@ -251,4 +254,3 @@ GLOBAL_PROTECT(security_mode)
|
||||
hub_password = "kMZy3U5jJHSiBQjr"
|
||||
else
|
||||
hub_password = "SORRYNOPASSWORD"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user