Merge remote-tracking branch 'origin/master' into what-should-i-name-this-branch

This commit is contained in:
LetterN
2021-11-12 08:50:23 +08:00
100 changed files with 814 additions and 709 deletions
+15 -15
View File
@@ -319,38 +319,38 @@ GLOBAL_LIST_EMPTY(teleportlocs)
*
* Sends to all ai players, alert consoles, drones and alarm monitor programs in the world
*/
/area/proc/poweralert(state, obj/source)
/area/proc/poweralert(set_alarm, obj/source)
if (area_flags & NO_ALERTS)
return
if (state != poweralm)
poweralm = state
if (set_alarm != poweralm)
poweralm = set_alarm
if(istype(source)) //Only report power alarms on the z-level where the source is located.
for (var/item in GLOB.silicon_mobs)
var/mob/living/silicon/aiPlayer = item
if (state == 1)
aiPlayer.cancelAlarm("Power", src, source)
else
if (set_alarm)
aiPlayer.triggerAlarm("Power", src, cameras, source)
else
aiPlayer.cancelAlarm("Power", src, source)
for (var/item in GLOB.alert_consoles)
var/obj/machinery/computer/station_alert/a = item
if(state == 1)
a.cancelAlarm("Power", src, source)
else
if (set_alarm)
a.triggerAlarm("Power", src, cameras, source)
else
a.cancelAlarm("Power", src, source)
for (var/item in GLOB.drones_list)
var/mob/living/simple_animal/drone/D = item
if(state == 1)
D.cancelAlarm("Power", src, source)
else
if (set_alarm)
D.triggerAlarm("Power", src, cameras, source)
else
D.cancelAlarm("Power", src, source)
for(var/item in GLOB.alarmdisplay)
var/datum/computer_file/program/alarm_monitor/p = item
if(state == 1)
p.cancelAlarm("Power", src, source)
else
if (set_alarm)
p.triggerAlarm("Power", src, cameras, source)
else
p.cancelAlarm("Power", src, source)
/area/proc/atmosalert(danger_level, obj/source)
if (area_flags & NO_ALERTS)
@@ -63,7 +63,7 @@
required_candidates = 1
weight = 7
cost = 5
requirements = list(40,30,20,10,10,10,10,10,10,10)
requirements = list(101,40,25,20,15,10,10,10,10,10)
repeatable = TRUE
//////////////////////////////////////////////
@@ -159,5 +159,5 @@
required_candidates = 1
weight = 4
cost = 10
requirements = list(101,101,101,50,40,10,10,10,10,10)
requirements = list(101,101,101,50,40,20,20,15,10,10)
repeatable = TRUE
@@ -254,7 +254,7 @@
antag_flag = ROLE_MALF
enemy_roles = list("Security Officer", "Warden","Detective","Head of Security", "Captain", "Scientist", "Chemist", "Research Director", "Chief Engineer")
exclusive_roles = list("AI")
required_enemies = list(4,4,4,4,4,4,2,2,2,0)
required_enemies = list(0,0,0,0,0,0,0,0,0,0)
required_candidates = 1
weight = 3
cost = 35
@@ -304,11 +304,11 @@
antag_flag = "wizard mid"
antag_flag_override = ROLE_WIZARD
enemy_roles = list("Security Officer","Detective","Head of Security", "Captain")
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_enemies = list(0,0,0,0,0,0,0,0,0,0)
required_candidates = 1
weight = 2
cost = 20
requirements = list(101,101,100,80,50,30,20,10,10,10)
requirements = list(101,101,100,60,40,20,20,20,10,10)
repeatable = TRUE
var/datum/mind/wizard
@@ -351,11 +351,11 @@
antag_datum = /datum/antagonist/nukeop
antag_flag_override = ROLE_OPERATIVE
enemy_roles = list("AI", "Cyborg", "Security Officer", "Warden","Detective","Head of Security", "Captain")
required_enemies = list(3,3,3,3,3,2,1,1,0,0)
required_enemies = list(0,0,0,0,0,0,0,0,0,0)
required_candidates = 5
weight = 3
cost = 35
requirements = list(101,101,101,80,50,40,30,15,10,10)
requirements = list(101,101,101,60,40,30,20,15,10,10)
var/list/operative_cap = list(2,2,3,3,3,4,5,5,5,5)
var/datum/team/nuclear/nuke_team
flags = HIGH_IMPACT_RULESET
@@ -393,11 +393,11 @@
antag_datum = /datum/antagonist/blob
antag_flag = ROLE_BLOB
enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain")
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_enemies = list(0,0,0,0,0,0,0,0,0,0)
required_candidates = 1
weight = 2
cost = 10
requirements = list(101,101,101,101,70,40,25,20,10,10)
requirements = list(101,101,101,101,50,40,30,20,10,10)
repeatable = TRUE
/datum/dynamic_ruleset/midround/from_ghosts/blob/generate_ruleset_body(mob/applicant)
@@ -412,11 +412,11 @@
protected_roles = list("Prisoner", "Security Officer", "Warden", "Detective", "Head of Security", "Captain")
restricted_roles = list("Cyborg", "AI", "Positronic Brain")
enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain")
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_enemies = list(0,0,0,0,0,0,0,0,0,0)
required_candidates = 1
weight = 2
cost = 10
requirements = list(101,101,101,101,70,40,25,20,10,10)
requirements = list(101,101,101,101,50,40,30,20,10,10)
repeatable = TRUE
/datum/dynamic_ruleset/midround/blob_infection/trim_candidates()
@@ -450,11 +450,11 @@
antag_datum = /datum/antagonist/xeno
antag_flag = ROLE_ALIEN
enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain")
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_enemies = list(0,0,0,0,0,0,0,0,0,0)
required_candidates = 1
weight = 3
cost = 10
requirements = list(101,101,101,101,60,50,30,20,10,10)
requirements = list(101,101,101,101,50,40,30,20,10,10)
repeatable = TRUE
var/list/vents = list()
@@ -496,11 +496,11 @@
antag_flag = "Nightmare"
antag_flag_override = ROLE_ALIEN
enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain")
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_enemies = list(0,0,0,0,0,0,0,0,0,0)
required_candidates = 1
weight = 4
cost = 10
requirements = list(101,101,101,40,30,20,10,10,10,10)
requirements = list(101,101,50,30,25,20,10,10,10,10)
repeatable = TRUE
var/list/spawn_locs = list()
@@ -542,11 +542,11 @@
antag_flag = ROLE_SPACE_DRAGON
antag_flag_override = ROLE_SPACE_DRAGON
enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain")
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_enemies = list(0,0,0,0,0,0,0,0,0,0)
required_candidates = 1
weight = 3
cost = 10
requirements = list(101,101,101,101,60,50,30,20,10,10)
requirements = list(101,101,101,101,50,40,30,20,10,10)
repeatable = TRUE
var/list/spawn_locs = list()
@@ -586,12 +586,12 @@
antag_flag = "Abductor"
antag_flag_override = ROLE_ABDUCTOR
enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain")
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_enemies = list(0,0,0,0,0,0,0,0,0,0)
required_candidates = 2
required_applicants = 2
weight = 3
cost = 10
requirements = list(101,101,101,101,101,40,25,20,10,10)
requirements = list(101,101,101,101,101,30,20,15,10,10)
repeatable = TRUE
var/datum/team/abductor_team/new_team
@@ -625,11 +625,11 @@
antag_flag_override = ROLE_ALIEN
required_type = /mob/dead/observer
enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain")
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_enemies = list(0,0,0,0,0,0,0,0,0,0)
required_candidates = 0
weight = 3
cost = 10
requirements = list(101,101,101,101,60,50,30,20,10,10)
requirements = list(101,101,101,101,50,40,30,20,10,10)
repeatable = TRUE
/datum/dynamic_ruleset/midround/swarmers/execute()
@@ -658,11 +658,11 @@
antag_flag = "Space Ninja"
antag_flag_override = ROLE_NINJA
enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain")
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_enemies = list(0,0,0,0,0,0,0,0,0,0)
required_candidates = 1
weight = 4
cost = 10
requirements = list(101,101,101,80,60,50,30,20,10,10)
requirements = list(101,101,101,60,50,30,10,10,10,10)
repeatable = TRUE
var/list/spawn_locs = list()
@@ -699,11 +699,11 @@
antag_flag = "Revenant"
antag_flag_override = ROLE_REVENANT
enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain")
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_enemies = list(0,0,0,0,0,0,0,0,0,0)
required_candidates = 1
weight = 4
cost = 10
requirements = list(101,101,101,70,50,40,20,15,10,10)
requirements = list(101,101,50,30,25,20,10,10,10,10)
repeatable = TRUE
var/dead_mobs_required = 20
var/need_extra_spawns_value = 15
@@ -748,7 +748,7 @@
required_candidates = 1
weight = 4
cost = 10
requirements = list(101,101,101,70,50,40,20,15,10,10)
requirements = list(101,101,50,30,25,20,10,10,10,10)
repeatable = TRUE
/datum/dynamic_ruleset/midround/from_ghosts/sentient_disease/generate_ruleset_body(mob/applicant)
@@ -765,11 +765,11 @@
antag_flag = "Space Pirates"
required_type = /mob/dead/observer
enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain")
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_enemies = list(0,0,0,0,0,0,0,0,0,0)
required_candidates = 0
weight = 4
cost = 10
requirements = list(101,101,101,50,40,25,10,10,10,10)
requirements = list(101,101,101,40,30,20,10,10,10,10)
repeatable = TRUE
/datum/dynamic_ruleset/midround/pirates/acceptable(population=0, threat=0)
@@ -103,7 +103,7 @@
weight = 3
cost = 16
scaling_cost = 10
requirements = list(101,70,60,50,40,20,20,10,10,10)
requirements = list(101,60,50,40,30,20,15,10,10,10)
antag_cap = list("denominator" = 29)
/datum/dynamic_ruleset/roundstart/changeling/pre_execute(population)
@@ -138,7 +138,7 @@
weight = 3
cost = 15
scaling_cost = 9
requirements = list(101,101,101,55,40,25,20,15,10,10)//higher because of 'round end'
requirements = list(101,101,101,50,40,20,20,15,10,10)//higher because of 'round end'
antag_cap = list("denominator" = 24)
@@ -179,7 +179,7 @@
required_candidates = 1
weight = 3
cost = 20
requirements = list(101,101,100,80,50,40,30,20,10,10)//100 because of configt, otherwise equal to nukies
requirements = list(101,101,100,60,40,20,20,20,10,10)//100 because of configt, otherwise equal to nukies
var/list/roundstart_wizards = list()
/datum/dynamic_ruleset/roundstart/wizard/acceptable(population=0, threat=0)
@@ -223,7 +223,7 @@
weight = 2 //lower weight because of easy steamroll potential
cost = 20
//requirements = list(100,90,80,60,40,30,10,10,10,10)
requirements = list(101,101,101,101,60,40,20,10,10,10)
requirements = list(101,101,101,101,50,40,20,10,10,10)
flags = HIGH_IMPACT_RULESET
antag_cap = list("denominator" = 20, "offset" = 1)
var/datum/team/cult/main_cult
@@ -279,7 +279,7 @@
required_candidates = 5
weight = 3
cost = 20
requirements = list(101,101,101,80,50,40,30,15,10,10)
requirements = list(101,101,101,60,40,30,20,15,10,10)
flags = HIGH_IMPACT_RULESET
antag_cap = list("denominator" = 18, "offset" = 1)
var/datum/team/nuclear/nuke_team
@@ -365,7 +365,7 @@
weight = 2
delay = 7 MINUTES
cost = 20
requirements = list(101,101,101,101,60,40,20,10,10,10)
requirements = list(101,101,101,101,50,40,20,10,10,10)
antag_cap = 3
flags = HIGH_IMPACT_RULESET
blocking_rules = list(/datum/dynamic_ruleset/latejoin/provocateur)
@@ -445,7 +445,7 @@
required_candidates = 2
weight = 3 //higher weight than blood cult and revs because it's more balanced
cost = 20
requirements = list(101,101,101,101,60,40,20,10,10,10) //slightly higher than nukies
requirements = list(101,101,101,101,50,40,20,10,10,10) //slightly higher than nukies
flags = HIGH_IMPACT_RULESET
antag_cap = list("denominator" = 20, "offset" = 1)
var/datum/team/clockcult/main_clockcult
+2 -2
View File
@@ -62,7 +62,7 @@ GLOBAL_LIST_EMPTY(allConsoles)
update_icon()
/obj/machinery/requests_console/update_icon_state()
if(CHECK_BITFIELD(stat, NOPOWER))
if((stat & NOPOWER))
set_light(0)
else
set_light(1.4, 0.7, "#34D352")//green light
@@ -72,7 +72,7 @@ GLOBAL_LIST_EMPTY(allConsoles)
icon_state="req_comp_open"
else
icon_state="req_comp_rewired"
else if(CHECK_BITFIELD(stat, NOPOWER))
else if((stat & NOPOWER))
if(icon_state != "req_comp_off")
icon_state = "req_comp_off"
else
@@ -1,5 +1,5 @@
/*
The log console for viewing the entire telecomms
The log console for viewing the entire telecomms
network log
*/
@@ -15,7 +15,7 @@
var/network = "NULL" // the network to probe
var/notice = ""
var/universal_translate = FALSE // set to TRUE(1) if it can translate nonhuman speech
var/universal_translate = FALSE // set to TRUE(1) if it can translate nonhuman speech
/obj/machinery/computer/telecomms/server/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
@@ -53,7 +53,7 @@
if(!LAZYLEN(SelectedMachine.log_entries))
return data_out
for(var/datum/comm_log_entry/C in SelectedMachine.log_entries)
var/list/data = list()
data["name"] = C.name //name of the file
@@ -104,7 +104,7 @@
data["message"] = C.parameters["message"]
else
data["message"] = "(unintelligible)"
data_out["selected_logs"] += list(data)
return data_out
@@ -133,7 +133,7 @@
if(LAZYLEN(machinelist) > 0)
notice = "FAILED: Cannot probe when buffer full"
return
for(var/obj/machinery/telecomms/T in GLOB.telecomms_list) //telecomms just went global!
if(T.network == network)
LAZYADD(machinelist, T)
@@ -147,7 +147,7 @@
SelectedMachine = T
break
if("delete")
if(!src.allowed(usr) && !CHECK_BITFIELD(obj_flags, EMAGGED))
if(!src.allowed(usr) && !(obj_flags & EMAGGED))
to_chat(usr, "<span class='danger'>ACCESS DENIED.</span>")
return
@@ -156,7 +156,7 @@
return
var/datum/comm_log_entry/D = locate(params["value"])
if(!istype(D))
notice = "NOTICE: Object not found"
notice = "NOTICE: Object not found"
return
notice = "Deleted entry: [D.name]"
LAZYREMOVE(SelectedMachine.log_entries, D)
@@ -94,9 +94,9 @@
if(istype(S) && S.hack_software)
data_out["canhack"] = TRUE
data_out["hacking"] = (hacking || CHECK_BITFIELD(obj_flags, EMAGGED))
data_out["hacking"] = (hacking || (obj_flags & EMAGGED))
if(hacking)
data_out["borg"] = ((isAI(user) || iscyborg(user)) && !CHECK_BITFIELD(obj_flags, EMAGGED)) //even borgs can't read emag
data_out["borg"] = ((isAI(user) || iscyborg(user)) && !(obj_flags & EMAGGED)) //even borgs can't read emag
return data_out
data_out["servers"] = list()
@@ -324,7 +324,7 @@
update_static_data(usr)
/obj/machinery/computer/message_monitor/attackby(obj/item/O, mob/living/user, params)
if(O.tool_behaviour == TOOL_SCREWDRIVER && CHECK_BITFIELD(obj_flags, EMAGGED))
if(O.tool_behaviour == TOOL_SCREWDRIVER && (obj_flags & EMAGGED))
//Stops people from just unscrewing the monitor and putting it back to get the console working again.
//Why this though, you should make it emag to a board level. (i wont do it)
to_chat(user, "<span class='warning'>It is too hot to mess with!</span>")
@@ -333,12 +333,12 @@
/obj/machinery/computer/message_monitor/emag_act(mob/user)
. = ..()
if(CHECK_BITFIELD(obj_flags, EMAGGED))
if((obj_flags & EMAGGED))
return
if(isnull(linkedServer))
to_chat(user, "<span class='notice'>A no server error appears on the screen.</span>")
return
ENABLE_BITFIELD(obj_flags, EMAGGED)
obj_flags |= EMAGGED
spark_system.set_up(5, 0, src)
spark_system.start()
var/obj/item/paper/monitorkey/MK = new(loc, linkedServer)
@@ -366,7 +366,7 @@
message = ""
/obj/machinery/computer/message_monitor/proc/UnmagConsole()
DISABLE_BITFIELD(obj_flags, EMAGGED)
obj_flags &= ~(EMAGGED)
message = ""
/obj/machinery/computer/message_monitor/proc/ResetMessage()
@@ -119,7 +119,7 @@ GLOBAL_LIST_EMPTY(telecomms_list)
/obj/machinery/telecomms/proc/update_power()
if(toggled)
// if powered, on. if not powered, off. if too damaged, off
if(CHECK_BITFIELD(stat, (BROKEN | NOPOWER | EMPED)))
if(stat &(BROKEN | NOPOWER | EMPED))
on = FALSE
else
on = TRUE
@@ -137,11 +137,11 @@ GLOBAL_LIST_EMPTY(telecomms_list)
/obj/machinery/telecomms/emp_act(severity)
. = ..()
if(CHECK_BITFIELD(., EMP_PROTECT_SELF))
if((. & EMP_PROTECT_SELF))
return
if(prob(severity))
if(!CHECK_BITFIELD(stat, EMPED))
ENABLE_BITFIELD(stat, EMPED)
if(!(stat & EMPED))
stat |= EMPED
var/duration = severity * 35
spawn(rand(duration - 20, duration + 20)) // Takes a long time for the machines to reboot.
DISABLE_BITFIELD(stat, EMPED)
stat &= ~(EMPED)
@@ -276,7 +276,7 @@
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/critfail()
..()
if(reagents)
DISABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
reagents.reagents_holder_flags &= ~(NO_REACT)
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/can_attach(obj/mecha/medical/M)
if(..())
+5 -5
View File
@@ -468,8 +468,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
A.Remove(user)
if(item_flags & DROPDEL)
qdel(src)
DISABLE_BITFIELD(item_flags, IN_INVENTORY)
DISABLE_BITFIELD(item_flags, IN_STORAGE)
item_flags &= ~(IN_INVENTORY)
item_flags &= ~(IN_STORAGE)
SEND_SIGNAL(src, COMSIG_ITEM_DROPPED,user)
if(!silent)
playsound(src, drop_sound, DROP_SOUND_VOLUME, ignore_walls = FALSE)
@@ -546,8 +546,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
if(item_action_slot_check(slot, user, A)) //some items only give their actions buttons when in a specific slot.
A.Grant(user)
item_flags |= IN_INVENTORY
if(CHECK_BITFIELD(item_flags, IN_STORAGE)) // Left storage item but somehow has the bitfield active still.
DISABLE_BITFIELD(item_flags, IN_STORAGE)
if((item_flags & IN_STORAGE)) // Left storage item but somehow has the bitfield active still.
item_flags &= ~(IN_STORAGE)
// if(!initial)
// if(equip_sound && (slot_flags & slot))
// playsound(src, equip_sound, EQUIP_SOUND_VOLUME, TRUE, ignore_walls = FALSE)
@@ -1079,7 +1079,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
*/
/obj/item/proc/set_slowdown(new_slowdown)
slowdown = new_slowdown
if(CHECK_BITFIELD(item_flags, IN_INVENTORY))
if((item_flags & IN_INVENTORY))
var/mob/living/L = loc
if(istype(L))
L.update_equipment_speed_mods()
+5 -5
View File
@@ -190,7 +190,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
qdel(src)
return
// allowing reagents to react after being lit
DISABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
reagents.reagents_holder_flags &= ~(NO_REACT)
reagents.handle_reactions()
icon_state = icon_on
item_state = icon_on
@@ -762,7 +762,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(!screw)
screw = TRUE
to_chat(user, "<span class='notice'>You open the cap on [src].</span>")
ENABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER)
reagents.reagents_holder_flags |= OPENCONTAINER
if(obj_flags & EMAGGED)
add_overlay("vapeopen_high")
else if(super)
@@ -772,7 +772,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
else
screw = FALSE
to_chat(user, "<span class='notice'>You close the cap on [src].</span>")
DISABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER)
reagents.reagents_holder_flags &= ~(OPENCONTAINER)
cut_overlays()
if(O.tool_behaviour == TOOL_MULTITOOL)
@@ -822,7 +822,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(slot == SLOT_WEAR_MASK)
if(!screw)
to_chat(user, "<span class='notice'>You start puffing on the vape.</span>")
DISABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
reagents.reagents_holder_flags &= ~(NO_REACT)
START_PROCESSING(SSobj, src)
else //it will not start if the vape is opened.
to_chat(user, "<span class='warning'>You need to close the cap first!</span>")
@@ -831,7 +831,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
. = ..()
var/mob/living/carbon/C = user
if(C.get_item_by_slot(SLOT_WEAR_MASK) == src)
ENABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
reagents.reagents_holder_flags |= NO_REACT
STOP_PROCESSING(SSobj, src)
/obj/item/clothing/mask/vape/proc/hand_reagents()//had to rename to avoid duplicate error
+27 -2
View File
@@ -72,6 +72,10 @@
var/datum/team/gang/gang //For marking territory.
var/gang_tag_delay = 30 //this is the delay for gang mode tag applications on anything that gang = true on.
var/precision_mode = FALSE
var/precision_x = 0
var/precision_y = 0
/obj/item/toy/crayon/proc/isValidSurface(surface)
return istype(surface, /turf/open/floor)
@@ -228,6 +232,12 @@
.["can_change_colour"] = can_change_colour
.["current_colour"] = paint_color
.["precision_mode"] = precision_mode
.["x"] = precision_x
.["y"] = precision_y
.["min_offset"] = -world.icon_size/2
.["max_offset"] = world.icon_size/2
/obj/item/toy/crayon/ui_act(action, list/params)
if(..())
return
@@ -256,6 +266,17 @@
. = TRUE
paint_mode = PAINT_NORMAL
drawtype = "a"
if("toggle_precision")
precision_mode = !precision_mode
. = TRUE
if("set_precision_x")
var/x = text2num(params["x"])
precision_x = x
. = TRUE
if("set_precision_y")
var/y = text2num(params["y"])
precision_y = y
. = TRUE
update_icon()
/obj/item/toy/crayon/proc/select_colour(mob/user)
@@ -400,8 +421,12 @@
if(PAINT_NORMAL)
var/obj/effect/decal/cleanable/crayon/C = new(target, paint_color, drawing, temp, graf_rot)
C.add_hiddenprint(user)
C.pixel_x = clickx
C.pixel_y = clicky
if(precision_mode)
C.pixel_x = clamp(precision_x, -(world.icon_size/2), world.icon_size/2)
C.pixel_y = clamp(precision_y, -(world.icon_size/2), world.icon_size/2)
else
C.pixel_x = clickx
C.pixel_y = clicky
affected_turfs += target
if(PAINT_LARGE_HORIZONTAL)
var/turf/left = locate(target.x-1,target.y,target.z)
@@ -326,7 +326,7 @@
cleaning_cycles--
cleaning = TRUE
for(var/mob/living/carbon/C in (touchable_items))
if((C.status_flags & GODMODE) || !CHECK_BITFIELD(C.vore_flags, DIGESTABLE))
if((C.status_flags & GODMODE) || !(C.vore_flags & DIGESTABLE))
items_preserved += C
else
C.adjustBruteLoss(2)
@@ -335,7 +335,7 @@
var/atom/target = pick(touchable_items)
if(iscarbon(target)) //Handle the target being a mob
var/mob/living/carbon/T = target
if(T.stat == DEAD && CHECK_BITFIELD(T.vore_flags, DIGESTABLE)) //Mob is now dead
if(T.stat == DEAD && (T.vore_flags & DIGESTABLE)) //Mob is now dead
message_admins("[key_name(hound)] has digested [key_name(T)] as a dogborg. ([hound ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[hound.x];Y=[hound.y];Z=[hound.z]'>JMP</a>" : "null"])")
to_chat(hound,"<span class='notice'>You feel your belly slowly churn around [T], breaking them down into a soft slurry to be used as power for your systems.</span>")
to_chat(T,"<span class='notice'>You feel [hound]'s belly slowly churn around your form, breaking you down into a soft slurry to be used as power for [hound]'s systems.</span>")
@@ -433,7 +433,7 @@
var/mob/living/silicon/robot/hound = get_host()
if(!hound || !istype(target) || !proximity || target.anchored)
return
if (!CHECK_BITFIELD(target.vore_flags,DEVOURABLE))
if (!(target.vore_flags & DEVOURABLE))
to_chat(user, "The target registers an error code. Unable to insert into [src].")
return
if(patient)
+12 -12
View File
@@ -174,11 +174,11 @@
/obj/item/shield/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
if(ismovable(object))
var/atom/movable/AM = object
if(CHECK_BITFIELD(shield_flags, SHIELD_TRANSPARENT) && (AM.pass_flags & PASSGLASS))
if((shield_flags & SHIELD_TRANSPARENT) && (AM.pass_flags & PASSGLASS))
return BLOCK_NONE
if(CHECK_BITFIELD(shield_flags, SHIELD_NO_RANGED) && (attack_type & ATTACK_TYPE_PROJECTILE))
if((shield_flags & SHIELD_NO_RANGED) && (attack_type & ATTACK_TYPE_PROJECTILE))
return BLOCK_NONE
if(CHECK_BITFIELD(shield_flags, SHIELD_NO_MELEE) && (attack_type & ATTACK_TYPE_MELEE))
if((shield_flags & SHIELD_NO_MELEE) && (attack_type & ATTACK_TYPE_MELEE))
return BLOCK_NONE
if(attack_type & ATTACK_TYPE_THROWN)
final_block_chance += 30
@@ -249,15 +249,15 @@
if(attack_type & ATTACK_TYPE_MELEE)
var/obj/hittingthing = object
if(hittingthing.damtype == BURN)
if(CHECK_BITFIELD(shield_flags, SHIELD_ENERGY_WEAK))
if((shield_flags & SHIELD_ENERGY_WEAK))
final_damage *= 2
else if(CHECK_BITFIELD(shield_flags, SHIELD_ENERGY_STRONG))
else if((shield_flags & SHIELD_ENERGY_STRONG))
final_damage *= 0.5
if(hittingthing.damtype == BRUTE)
if(CHECK_BITFIELD(shield_flags, SHIELD_KINETIC_WEAK))
if((shield_flags & SHIELD_KINETIC_WEAK))
final_damage *= 2
else if(CHECK_BITFIELD(shield_flags, SHIELD_KINETIC_STRONG))
else if((shield_flags & SHIELD_KINETIC_STRONG))
final_damage *= 0.5
if(hittingthing.damtype == STAMINA || hittingthing.damtype == TOX || hittingthing.damtype == CLONE || hittingthing.damtype == BRAIN || hittingthing.damtype == OXY)
@@ -266,19 +266,19 @@
if(attack_type & ATTACK_TYPE_PROJECTILE)
var/obj/item/projectile/shootingthing = object
if(is_energy_reflectable_projectile(shootingthing))
if(CHECK_BITFIELD(shield_flags, SHIELD_ENERGY_WEAK))
if((shield_flags & SHIELD_ENERGY_WEAK))
final_damage *= 2
else if(CHECK_BITFIELD(shield_flags, SHIELD_ENERGY_STRONG))
else if((shield_flags & SHIELD_ENERGY_STRONG))
final_damage *= 0.5
if(!is_energy_reflectable_projectile(object))
if(CHECK_BITFIELD(shield_flags, SHIELD_KINETIC_WEAK))
if((shield_flags & SHIELD_KINETIC_WEAK))
final_damage *= 2
else if(CHECK_BITFIELD(shield_flags, SHIELD_KINETIC_STRONG))
else if((shield_flags & SHIELD_KINETIC_STRONG))
final_damage *= 0.5
if(shootingthing.damage_type == STAMINA)
if(CHECK_BITFIELD(shield_flags, SHIELD_DISABLER_DISRUPTED))
if((shield_flags & SHIELD_DISABLER_DISRUPTED))
final_damage *= 3 //disablers melt these kinds of shields. Really meant more for holoshields.
else
final_damage = 0
+2 -2
View File
@@ -1290,9 +1290,9 @@
var/toxic_risk = min(round(spess_current_year - expiration_date * 0.01), 1)
for(var/obj/item/reagent_containers/food/snacks/S in contents)
if(prob(gross_risk))
ENABLE_BITFIELD(S.foodtype, GROSS)
S.foodtype |= GROSS
if(prob(toxic_risk))
ENABLE_BITFIELD(S.foodtype, TOXIC)
S.foodtype |= TOXIC
/obj/item/storage/box/mre/menu1
name = "\improper Nanotrasen MRE Ration Kit Menu 1"
+1 -1
View File
@@ -370,7 +370,7 @@ GLOBAL_LIST_EMPTY(rubber_toolbox_icons)
desc = replacetext(desc, "Danger", "Bouncy")
desc = replacetext(desc, "robust", "safe")
desc = replacetext(desc, "heavier", "bouncier")
DISABLE_BITFIELD(flags_1, CONDUCT_1)
flags_1 &= ~(CONDUCT_1)
custom_materials = null
damtype = STAMINA
force += 3 //to compensate the higher stamina K.O. threshold compared to actual health.
+1 -1
View File
@@ -48,7 +48,7 @@
var/obj/item/clothing/mask/M = check
if(M.mask_adjusted)
M.adjustmask(H)
if(CHECK_BITFIELD(check.clothing_flags, ALLOWINTERNALS))
if((check.clothing_flags & ALLOWINTERNALS))
internals = TRUE
if(!internals)
+2 -2
View File
@@ -291,10 +291,10 @@
status = !status
if(status)
to_chat(user, "<span class='notice'>You resecure [src] and close the fuel tank.</span>")
DISABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER)
reagents.reagents_holder_flags &= ~(OPENCONTAINER)
else
to_chat(user, "<span class='notice'>[src] can now be attached, modified, and refuelled.</span>")
ENABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER)
reagents.reagents_holder_flags |= OPENCONTAINER
add_fingerprint(user)
/obj/item/weldingtool/proc/flamethrower_rods(obj/item/I, mob/user)
+1
View File
@@ -58,6 +58,7 @@
desc = "A wondrous decorated Christmas tree."
icon_state = "pine_c"
icon_states = null
resistance_flags = INDESTRUCTIBLE //Sorry grinch, not this time
/obj/structure/flora/tree/pine/xmas/presents
icon_state = "pinepresents"
+1 -1
View File
@@ -512,7 +512,7 @@ GLOBAL_LIST_EMPTY(station_turfs)
/turf/shove_act(mob/living/target, mob/living/user, pre_act = FALSE)
var/list/possibilities
for(var/obj/O in contents)
if(CHECK_BITFIELD(O.obj_flags, SHOVABLE_ONTO))
if((O.obj_flags & SHOVABLE_ONTO))
LAZYADD(possibilities, O)
else if(!O.CanPass(target, src))
return FALSE